Context
My core heirloom has the stat 8% Strength Tower Effect
My fire trap deals 100k damage
A Strength Tower increases damage by 100%, or with my heirloom, by 108%. Or at least, that's the description for it. Here's the wording:
Increases the damage of all Fire Traps on the same Floor as a Strength Tower by 108%
Expectation
So a Fire Trap affected by a Strength Tower should deal 208k damage: 100k increased by 108%
The bug:
it deals 216k instead, 8k too much, it was increased by 116%, the heirloom stat does not increase the effect of the Strength Tower, but the overall damage of a Fire Trap affected by a Strength Tower - the order of operations is wrong.
which reads: first double the base damage, then add the strength effect to the overall damage.
that line should instead be something like this, if it is to match the description:
if (playerSpire.strengthLocations.indexOf(row) != -1) dmg += calcHeirloomBonus("Core", "strengthEffect", dmg);
To Reproduce
Have an heirloom with Strength Tower Effect, have a spire with a row containing a Strength Tower and a Fire Trap, observe incorrect damage tick.
Context My core heirloom has the stat 8% Strength Tower Effect My fire trap deals 100k damage A Strength Tower increases damage by 100%, or with my heirloom, by 108%. Or at least, that's the description for it. Here's the wording:
Expectation So a Fire Trap affected by a Strength Tower should deal 208k damage: 100k increased by 108% The bug: it deals 216k instead, 8k too much, it was increased by 116%, the heirloom stat does not increase the effect of the Strength Tower, but the overall damage of a Fire Trap affected by a Strength Tower - the order of operations is wrong.
Cause/location in code/suggested change This is the offending line: https://github.com/Trimps/Trimps.github.io/blob/65c321e56d4730288f9710cf05a4f3d0df6d832d/playerSpire.js#L1808
which reads: first double the base damage, then add the strength effect to the overall damage. that line should instead be something like this, if it is to match the description:
To Reproduce Have an heirloom with Strength Tower Effect, have a spire with a row containing a Strength Tower and a Fire Trap, observe incorrect damage tick.