pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Use getBattleStat instead of getStat in BattleStatRatioPowerAttr

Open JakubHanko opened this issue 9 months ago • 2 comments

Usage of getStat causes moves like Electro Ball to use incorrect Stat.SPD (SPD before it gets halved).

JakubHanko avatar May 11 '24 14:05 JakubHanko

Should this also pass opponent in for abilities like Unaware?

I have two questions since my Pokémon skills are rusty:

  1. correct me if I am wrong but Unaware should still respect the speed changes in case of Gyro Ball and Electro Ball. I.e. the paralysis speed change should not be ignored.
  2. right now there aren't any moves in the game that fall into the BattleStatRatio category - are you aware of any moves that are somehow take the ratio of your and opponent's stats into consideration?

JakubHanko avatar May 11 '24 14:05 JakubHanko

Decided to go with two classes, each dedicated to its respective move since both calculations are fairly specific to their use cases.

JakubHanko avatar May 13 '24 20:05 JakubHanko

TSDocs have been added.

JakubHanko avatar May 17 '24 05:05 JakubHanko