Skip to content

Commit

Permalink
Merge pull request dmdorman#1553 from phBalance/phBalance/cost-fixes
Browse files Browse the repository at this point in the history
fix(elemental control): correct slot costing when less than base cost
  • Loading branch information
phBalance authored Nov 30, 2024
2 parents b0f7f3d + 77a4763 commit a8bf96d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Releases

## Version 4.0.10 [Hero System 6e (Unofficial) v2](https://github.com/dmdorman/hero6e-foundryvtt)
## Version 4.0.11 (So far...) [Hero System 6e (Unofficial) v2](https://github.com/dmdorman/hero6e-foundryvtt)

- Correct EC costing.

## Version 4.0.10

- Fix migration SETANDBRACE warning.

Expand Down
3 changes: 2 additions & 1 deletion module/item/item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,8 @@ export class HeroSystem6eItem extends Item {
_realCost /= 5.0;
}
} else if (this.parentItem.system.XMLID === "ELEMENTAL_CONTROL") {
_realCost = _realCost - this.parentItem.system.BASECOST;
const baseCost = (this.parentItem.system.BASECOST = parseFloat(this.parentItem.system.BASECOST));
_realCost = Math.max(baseCost, _realCost - baseCost);
}
}

Expand Down

0 comments on commit a8bf96d

Please sign in to comment.