pokerogue
pokerogue copied to clipboard
Add PRE_DAMAGE MoveEffectTrigger for Spectral Thief and Brick Break
These two moves depend on a successful hit, taking into account type immunities. However, both spectral thief and brick break need to make their modifications before the damage calculation happens. The PRE_APPLY trigger doesn't take effect until after the damage calculation.
- add PRE_DAMAGE MoveEffectTrigger
- add hook for PRE_DAMAGE MoveEffectAttrs in
pokemon.apply()
(called fromMoveEffectPhase
) - add StealStatBoostsAttr for spectral thief move, referring to https://bulbapedia.bulbagarden.net/wiki/Spectral_Thief_(move)
- update RemoveScreenAttr to get called before damage calculations
- update RemoveScreenAttr to take into account type immunity
- update StatChangePhase to allow for synchronous stat changes
I already have another branch with a change to aggregate stat change phases, so I'm not sure how it's going to affect this. Will have to merge that first.
Cool, I can rebase on that branch once its in
Might want to try rebasing, seems like the change got put in.
Due to the length of time between now and when this was last worked on and the conflicts, closing this out. Feel free to reopen it should you decide to work on it.