diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index fd0059f..0fe0deb 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -351,7 +351,7 @@ export class DeltaGreenActorSheet extends ActorSheet { _toggleLethality(event) { const itemId = event.target.getAttribute("item-id"); const isLethal = event.target.getAttribute("is-lethal") === "true"; - const item = this.actor.data.items.find((i) => i.id === itemId); + const item = this.actor.items.find((i) => i.id === itemId); item.update({"data.isLethal": !isLethal}); } diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index ddc0505..5c179e4 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -314,30 +314,30 @@ - {{#unless item.data.data.isLethal}} + {{#unless item.system.isLethal}} - {{toUpperCase item.data.data.damage}}{{#if_eq item.data.data.skill 'unarmed_combat'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.data.data.skill 'melee_weapons'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}} + {{toUpperCase item.system.damage}}{{#if_eq item.system.skill 'unarmed_combat'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.system.skill 'melee_weapons'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}} {{/unless}} - {{#if item.data.data.isLethal}} - - {{item.data.data.lethality}}% + {{item.system.lethality}}% {{/if}} - {{#if item.data.data.lethality}} + {{#if item.system.lethality}} - - {{#if item.data.data.isLethal}} - + {{#if item.system.isLethal}} + {{else}} - + {{/if}} {{/if}}