diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cf8463f..0d0c8e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Initial support for Only in Alternate Identity (OIAID). There is a "Heroic Identity" checkbox in the OTHERS tab. [#1431](https://github.com/dmdorman/hero6e-foundryvtt/issues/1431) [#232](https://github.com/dmdorman/hero6e-foundryvtt/issues/232) - Improved automatic spending of END during combat for continuous powers to prevent spending of resources when rewinding or re-doing a turn. [#1448](https://github.com/dmdorman/hero6e-foundryvtt/issues/1448) - MAX characteristic is now color coded when different than CORE. [#1461](https://github.com/dmdorman/hero6e-foundryvtt/issues/1461) +- Improved display of COMPOUNDPOWER costs. [#1434](https://github.com/dmdorman/hero6e-foundryvtt/issues/1461) ## Version 4.0.5 diff --git a/module/item/item.mjs b/module/item/item.mjs index 29b08891..5b529238 100644 --- a/module/item/item.mjs +++ b/module/item/item.mjs @@ -4972,6 +4972,15 @@ export class HeroSystem6eItem extends Item { return this.system.active; } + + get compoundCost() { + if (this.system.XMLID !== "COMPOUNDPOWER") return 0; + let cost = 0; + for (const child of this.childItems) { + cost += parseInt(child.system.realCost); + } + return cost; + } } export function getItem(id) { diff --git a/templates/actor/actor-sheet-partial-powers-item.hbs b/templates/actor/actor-sheet-partial-powers-item.hbs index d8fc1be6..fd3e4030 100644 --- a/templates/actor/actor-sheet-partial-powers-item.hbs +++ b/templates/actor/actor-sheet-partial-powers-item.hbs @@ -24,7 +24,16 @@ height="24" /> {{/if}} -