pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Add PRE_DAMAGE MoveEffectTrigger for Spectral Thief and Brick Break

Open poppedcornfish opened this issue 10 months ago • 3 comments

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 from MoveEffectPhase)
  • 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

poppedcornfish avatar Apr 23 '24 18:04 poppedcornfish

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.

Flashfyre avatar Apr 23 '24 18:04 Flashfyre

Cool, I can rebase on that branch once its in

poppedcornfish avatar Apr 23 '24 18:04 poppedcornfish

Might want to try rebasing, seems like the change got put in.

chacolah avatar Apr 29 '24 17:04 chacolah

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.

bennybroseph avatar May 13 '24 09:05 bennybroseph