Bugfix pt. 2: Totals now are evaluated in second round

This commit is contained in:
hppeng 2022-06-30 20:44:26 -07:00
parent 59f28f6956
commit 53f502b96d

View file

@ -578,8 +578,17 @@ class SpellDamageCalcNode extends ComputeNode {
type: "heal",
heal_amount: _heal_amount
}
} else if ('hits' in part) {
spell_result = {
}
else {
continue;
}
spell_result.name = part.name;
spell_results.push(spell_result);
spell_result_map.set(part.name, spell_result);
}
for (const part of spell_parts) {
if ('hits' in part) {
let spell_result = {
normal_min: [0, 0, 0, 0, 0, 0],
normal_max: [0, 0, 0, 0, 0, 0],
normal_total: [0, 0],
@ -610,10 +619,10 @@ class SpellDamageCalcNode extends ComputeNode {
spell_result.heal_amount += subpart.heal_amount;
}
}
spell_result.name = part.name;
spell_results.push(spell_result);
spell_result_map.set(part.name, spell_result);
}
spell_result.name = part.name;
spell_results.push(spell_result);
spell_result_map.set(part.name, spell_result);
}
return spell_results;
}