[Rework] Damage and Damage Resource split (#2094)

This commit is contained in:
WBHarry 2026-07-18 23:31:38 +02:00 committed by GitHub
parent c90c6afc19
commit 3b68c6c895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 730 additions and 531 deletions

View file

@ -8,11 +8,8 @@ export default class DHDamageAction extends DHBaseAction {
* @returns Formula string
*/
getDamageFormula() {
const strings = [];
for (const { value } of this.damage.parts) {
strings.push(Roll.replaceFormulaData(value.getFormula(), this.actor?.getRollData() ?? {}));
}
if (!this.damage.main) return '';
return strings.join(' + ');
return Roll.replaceFormulaData(this.damage.main.value.getFormula(), this.actor?.getRollData() ?? {});
}
}