[Engine] Refactor Mana Shield damage handling#8395
[Engine] Refactor Mana Shield damage handling#8395kphoenix137 wants to merge 2 commits intodiasurgical:masterfrom
Conversation
|
I think the removal condition should use the internal fixed-point mana value, not >> 6. In this engine, damage and mana are both handled in 1/64 units, so whole-mana checks are only a UI-level approximation. The old behavior effectively removed the shield when mana was actually exhausted. Using player._pMana == 0 would be safer and more faithful to how the engine works. |
if your comment is about certain lines of code, it's best to actually add the comment to them |
The thing is, that assessment is actually wrong. Blizzard used |
Moves reduction to Mana while Mana Shield is active into a
Playermember functionApplyManaShieldToDamage(), and removesGetManaShieldDamageReduction().ApplyManaShieldToDamage()takestotalDamageas an argument and reduces the Player's Mana (if applicable), and returns the remaining amount of damage to be dealt to the Player's Life.