Skip to content

Commit

Permalink
update tests to new background items
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Oct 8, 2023
1 parent c820473 commit 427c8f6
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 58 deletions.
2 changes: 1 addition & 1 deletion data/packs/classes.db/level_0__6LEKsG1HEw3dbo27.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
],
"folder": null,
"img": "icons/sundries/documents/document-sealed-brown-red.webp",
"name": "Level-0",
"name": "Level 0",
"system": {
"allArmor": true,
"allWeapons": true,
Expand Down
16 changes: 8 additions & 8 deletions system/src/apps/ShadowdarklingImporterSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@ export default class ShadowdarklingImporterSD extends FormApplication {
xp: 0,
},
slots: json.gearSlotsTotal,
title: json.title,
spellcastingAbility: this._getSpellCastingAbility(json.class.toLowerCase()),
},
};

// Ancestry
const ancestries = await shadowdark.compendiums.ancestries();
const ancestry = ancestries.find(
i => i.name.toLowerCase() === json.ancestry.toLowerCase()
);
importedActor.system.ancestry = ancestry?.uuid ?? "";
if (json.ancestry) {
const ancestries = await shadowdark.compendiums.ancestries();
const ancestry = ancestries.find(
i => i.name.toLowerCase() === json.ancestry.toLowerCase()
);
importedActor.system.ancestry = ancestry?.uuid ?? "";
}

// Background
const backgrounds = await shadowdark.compendiums.backgrounds();
Expand Down Expand Up @@ -355,7 +355,7 @@ export default class ShadowdarklingImporterSD extends FormApplication {
return this._damageDieD12Talent(bonus.bonusTo);
}
if (bonus.name === "ReduceHerbalismDC") {
return this._findInCompendium("Reduced Herbalism DC", "shadowdark.talents");
return this._findInCompendium("Herbalism Check Advantage", "shadowdark.talents");
}
if (bonus.name === "Plus1ToHitAndDamage") {
if (bonus.bonusTo === "Melee attacks") {
Expand Down
Loading

0 comments on commit 427c8f6

Please sign in to comment.