Skip to content

Commit

Permalink
update module.json for 0.6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zarmstrong committed Aug 23, 2021
1 parent b0decb1 commit 305ada4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.9 (August 21, 2021)

* fix focus spells

## 0.6.8 (August 21, 2021)

* update for 0.8.9 compatability
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Pathbuilder 2e Import",
"description": "This module allows players and GMs to import player characters built in Pathbuilder 2e",
"author": "slate",
"version": "0.6.8",
"version": "0.6.9",
"minimumCoreVersion": "0.8.6",
"compatibleCoreVersion": "0.8.9",
"esmodules": [
Expand All @@ -14,7 +14,7 @@
"license": "MIT",
"url": "https://github.com/zarmstrong/foundry-pathbuilder2e-import",
"manifest": "https://raw.githubusercontent.com/zarmstrong/foundry-pathbuilder2e-import/master/module.json",
"download": "https://github.com/zarmstrong/foundry-pathbuilder2e-import/releases/download/foundry-pathbuilder2e-import-0.6.8/foundry-pathbuilder2e-import-0.6.8.zip",
"download": "https://github.com/zarmstrong/foundry-pathbuilder2e-import/releases/download/foundry-pathbuilder2e-import-0.6.9/foundry-pathbuilder2e-import-0.6.9.zip",
"changelog": "https://github.com/zarmstrong/foundry-pathbuilder2e-import/blob/master/CHANGELOG.md",
"bugs": "https://github.com/zarmstrong/herovau.lt-foundry/issues",
"flags": {
Expand Down
4 changes: 2 additions & 2 deletions pathbuilder-import-min.js

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions pathbuilder-import.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var fbpiDebug = false;
const fpbi = "0.6.8";
const fpbi = "0.6.9";
const reportDomain = "https://www.pf2player.com/";

const pbcolor1 = "color: #7bf542"; //bright green
Expand Down Expand Up @@ -29,6 +29,7 @@ var jsonBuild = [];
var addedItems = [];
var pbButton = true;
var pcAlign;
var focusPool=0;

async function doHVExport(hero, act) {
game.modules.get("herovaultfoundry")?.api?.exportToHVFromPBHLO(hero, act);
Expand Down Expand Up @@ -1410,15 +1411,28 @@ async function setSpellcasters(targetActor, arraySpellcasters) {
updated = await targetActor.deleteEmbeddedDocuments("Item", deletions);
// make array of spellcaster instances. put
let requiredSpells = [];

for (var ref in arraySpellcasters) {
if (arraySpellcasters.hasOwnProperty(ref)) {
let spellCaster = arraySpellcasters[ref];
spellCaster.instance = await addSpecificCasterAndSpells(
focusPool+=spellCaster.focusPoints;
if (spellCaster.magicTradition=="focus")
{
spellCaster.instance = await addSpecificCasterAndSpells(
targetActor,
spellCaster,
spellCaster.magicTradition,
spellCaster.magicTradition
);
} else {
spellCaster.instance = await addSpecificCasterAndSpells(
targetActor,
spellCaster,
spellCaster.magicTradition,
spellCaster.spellcastingType
);
}

for (var ref in spellCaster.spells) {
if (spellCaster.spells.hasOwnProperty(ref)) {
let spellListObject = spellCaster.spells[ref];
Expand Down Expand Up @@ -1484,7 +1498,8 @@ async function addSpecificCasterAndSpells(
value: spellCaster.ability,
},
focus: {
pool: spellCaster.focusPoints,
points: spellCaster.focusPoints,
pool: spellCaster.focusPoints
},
proficiency: {
value: spellCaster.proficiency / 2,
Expand Down Expand Up @@ -1689,6 +1704,7 @@ function checkAllFinishedAndCreate(targetActor) {
"flags.exportSource.coreVersion": game.data.version,
"flags.pathbuilderID.value": buildID,
});
targetActor.update({"data.resources.focus.max": focusPool,"data.resources.focus.value": focusPool,})
targetActor.update({ "data.attributes.hp.value": 1234 });
for (var ref in jsonBuild.specials) {
if (jsonBuild.specials.hasOwnProperty(ref)) {
Expand Down

0 comments on commit 305ada4

Please sign in to comment.