mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Fix] 1325 - Weapon Tooltip Damage Formula (#1355)
* Fixed so the damage calculation is correct. Fixed so the right tooltip is shown for attacks * Moved the damageFormula function to damageAction
This commit is contained in:
parent
b57e98071f
commit
6d8d773a26
8 changed files with 45 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 attack.getDamageFormula();
|
||||
}
|
||||
|
||||
static formulaValue(formula, item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue