diff --git a/Shadow of the Demon Lord/README.md b/Shadow of the Demon Lord/README.md index 44a29e13d2..60e63a49b3 100644 --- a/Shadow of the Demon Lord/README.md +++ b/Shadow of the Demon Lord/README.md @@ -2,6 +2,9 @@ ## Change log +### Version 7 +* Fixed a bug preventing creation of new NPC attacks + ### Version 6 * Styling cleanup, using CSS grid instead of Flexbox in some key places * Added a rest button diff --git a/Shadow of the Demon Lord/Source/sheetworkers.js b/Shadow of the Demon Lord/Source/sheetworkers.js index c642bc9611..4ffbc256ce 100644 --- a/Shadow of the Demon Lord/Source/sheetworkers.js +++ b/Shadow of the Demon Lord/Source/sheetworkers.js @@ -459,18 +459,23 @@ const updateSheet = version => { calcWeaponDamage(idArray.map(id => `repeating_weapons_${id}_weapon`)); }); } + if (version < 7) { + getSectionIDs("repeating_attacks", idArray => { + idArray.forEach(id => updateNpcAttack(`repeating_attacks_${id}`)); + }); + } }; // Register events on("sheet:opened", () => { getAttrs(["version"], v => { const version = parseInt(v.version); - if (version && version < 6) { - updateSheet(5); + if (version && version < 7) { + updateSheet(version); } setAttrs({ - version: "6", - character_sheet: "Shadow of the Demon Lord v6", + version: "7", + character_sheet: "Shadow of the Demon Lord v7", }); }); setBoonsBanesQuery(); @@ -501,7 +506,7 @@ register(["setting_roll_weapon_damage", "global_damage_bonus", "setting_show_dam }); }); register(["repeating_weapons"], () => calcWeaponDamage(["repeating_weapons_weapon"])); -register(["change:repeating_attacks:attack_range"], () => updateNpcAttack("repeating_attacks_attack")); +register(["repeating_attacks:attack_range"], () => updateNpcAttack("repeating_attacks_attack")); ["weapon", "attack"].forEach(sName => { register([`repeating_${sName}s:${sName}_boons`], () => { calcBoonsDisplay(`repeating_${sName}s_${sName}`); @@ -540,4 +545,4 @@ register(["npc", "sheet:opened"], sanitizeTab); }); // Basic equipment: turn off auto-defense -register(["change:setting_basic_equipment"], handleBasicEquipment); +register(["setting_basic_equipment"], handleBasicEquipment); diff --git a/Shadow of the Demon Lord/shadow-of-the-demon-lord.html b/Shadow of the Demon Lord/shadow-of-the-demon-lord.html index 83288b5d0c..e3f205d966 100644 --- a/Shadow of the Demon Lord/shadow-of-the-demon-lord.html +++ b/Shadow of the Demon Lord/shadow-of-the-demon-lord.html @@ -1,3 +1,3 @@
Bonuses
Layout
House rules
Afflictionsbanes
Weapon Name
Mod
Damage
Boons - Banes
Properties

Weapons

vs
with

Wealth

Defense

Use?
Name
Defense
Total
+000
Total
10

Items

Count?
Name
Amount
Total

Talents

/1
Attack Roll 20+

Traditions

/
/1
Requirement
Target
Area
Duration
Triggered
Attack Roll 20+
Sacrifice
Permanence
Aftereffect
Special

Background

Novice training
Novice training
Expert development
Expert development
Expert objective
Expert objective
Master development
Master development
Master quest
Master quest
Difficulty
Size1
Perception100
Defense10Health10Damage
Strength100Strength—Agility100Agility—Intellect100Intellect—Will100Will—
Speed10
Insanity
Corruption
Afflictionsbanes
Attacks
(reach+)+
withboons()vs
reach+with
Special attacks
Special actions
Power
End of the round
{{#title}}
{{title}}
{{#subtitle}}
{{subtitle}}
{{/subtitle}}
{{/title}}{{#name}}
{{name}}
{{/name}}{{^sacrifice}}
{{#showroll}}
{{roll-label}}{{#boons}}{{#rollGreater() boons 0}}+{{boons}}
with {{boons}} {{#rollLess() boons 2}}boon{{/rollLess() boons 2}}{{#rollGreater() boons 1}}boons{{/rollGreater() boons 1}}
{{/rollGreater() boons 0}}{{#rollLess() boons 0}}{{boons}}
with{{boons}} {{#rollGreater() boons -2}}bane{{/rollGreater() boons -2}}{{#rollLess() boons -1}}banes{{/rollLess() boons -1}}
{{/rollLess() boons 0}}{{/boons}}: {{roll}}{{#versus}} vs {{versus}}{{/versus}}
{{/showroll}}{{#damage}}
Damage: {{damageroll}}
{{/damage}}{{#damageplus}}
{{damageplus}}
{{/damageplus}}
{{/sacrifice}}{{#spell}}{{^sacrifice}}
{{#requirement}}
Requirement {{requirement}}
{{/requirement}}{{#target}}
Target {{target}}
{{/target}}{{#area}}
Area {{area}}
{{/area}}{{#duration}}
Duration {{duration}}
{{/duration}}
{{/sacrifice}}{{/spell}}
{{#sacrifice}}
Sacrifice {{sacrifice}}
{{/sacrifice}}{{^sacrifice}}{{#rollGreater() roll 19}}{{#roll20plus}}
Attack Roll 20+ {{roll20plus}}
{{/roll20plus}}{{/rollGreater() roll 19}}{{#triggered}}
Triggered {{triggered}}
{{/triggered}}{{#permanence}}
Permanence {{permanence}}
{{/permanence}}{{#aftereffect}}
Aftereffect {{aftereffect}}
{{/aftereffect}}{{#special}}
Special {{special}}
{{/special}}{{#description}}
{{description}}
{{/description}}{{/sacrifice}}
- \ No newline at end of file + \ No newline at end of file