chrisk123999 / chris-premades

MIT License
42 stars 47 forks source link

Shield Guardian damage taken via Master Amulet rounding down while it should be rounding up #230

Closed morepurplemorebetter closed 4 months ago

morepurplemorebetter commented 4 months ago

The damage transferred to the Shield Guardian is being rounded down while it should be rounded up.

Shield Guardian rule for reference:

If the guardian is within 60 feet of the amulet's wearer, half of any damage the wearer takes (rounded up) is transferred to the guardian.

This used to work well in the past, where uneven damage was correctly distributed between the bonded character and the Shield Guardian, but commit 611aaf9 has changed this behaviour to give both the same amount of damage. For example, when 3 damage is dealt, both the character and the shield guardian take only 1 damage.

Changing line 21 of mastersAmulet.js to

let originalDamage = Math.ceil(ditem.appliedDamage / 2);

fixed the issue for me.

Love this module by the way, it is a great improvement to our game. Keep up the good work!