mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 12:11:07 +01:00
Fixed so the damage calculation is correct. Fixed so the right tooltip is shown for attacks
This commit is contained in:
parent
8f917c3640
commit
51135b6a67
8 changed files with 48 additions and 32 deletions
|
|
@ -35,14 +35,8 @@ export default class RegisterHandlebarsHelpers {
|
|||
return accum;
|
||||
}
|
||||
|
||||
static damageFormula(attack, actor) {
|
||||
const traitTotal = actor.system.traits?.[attack.roll.trait]?.value;
|
||||
const instances = [
|
||||
attack.damage.parts.map(x => Roll.replaceFormulaData(x.value.getFormula(), actor)).join(' + '),
|
||||
traitTotal
|
||||
].filter(x => x);
|
||||
|
||||
return instances.join(traitTotal > 0 ? ' + ' : ' - ');
|
||||
static damageFormula(attack) {
|
||||
return game.system.api.fields.ActionFields.DamageField.getFormulaString.bind(attack)(attack.damage.parts);
|
||||
}
|
||||
|
||||
static formulaValue(formula, item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue