pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Bugfix: Liquid Ooze hurts move user instead of one with ability

Open td76099 opened this issue 9 months ago • 0 comments

@Piefrenzy on Discord

Change description

Previously, Liquid Ooze was hurting the ability user instead of converting draining into healing on the one using the move. This PR addresses that by subtracting that HP from the move user instead of the target with the Liquid Ooze ability.

This fix actually broke healing moves at full HP because super.end() would end up getting called twice in PokemonHealPhase and crash the game. The end of PokemonHealPhase had to have a clause updated to be the opposite of the clause at the beginning (which it used to be before Liquid Ooze was put into the game as seen in this PR)

I also went ahead and combined the Strength Sap logic into HitHealAttr so that the Liquid Ooze logic is not duplicated and only exists once and so that if there are eventually any additional moves that drain bases on a stat this can handle them (or even just a unique message). Hopefully docs are okay - tried to update the classes for the moves/abilities I had to change.

Test cases

Healing move at full HP and missing HP vs Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/ad7fcc31-1f7c-4771-bdb2-bff9493849f2

Healing Move at full HP and missing HP vs no Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/e8f15c2e-4347-4a35-b8a5-a75e322f0862

Strength Sap at full HP and missing HP vs Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/4d43de88-949a-468f-93e1-63a5fa252aa8

Strength Sap at full HP and missing HP vs no Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/d609072e-d9c5-4a83-a8ec-95a5d6adad8a

Leech Seed at full and missing HP vs Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/5e0a3c06-9edb-41c4-ac7e-05439ec33fdb

Leech Seed at full and missing HP vs no Liquid Ooze

https://github.com/pagefaultgames/pokerogue/assets/85713900/aa5e9b0f-794e-4837-b0e2-27c64aab17d7

td76099 avatar May 23 '24 21:05 td76099