This doesn't yet handle modded formats that don't validate ability
selection in the ordinary manner. Those formats will continue to work
essentially in the same manner as before, rather than with the correct
mechanics.
Specifically, the TryFieldHit event no longer exists.
Instead, Magic Bounce has separate event handlers for TryHit and
TryHitSide.
This also fixes it so Magic Coat/Bounce happen before ability
absoption (like Water Absorb).
- Moves that are 'evaded' can no longer be critical hits.
- Gems are no longer used up if a move is 'evaded'.
- The issue with Struggle being 'evaded' while the Wonder Guard user has
a Substitute is fixed.
Type changes have been moved out of ModifyPokemon, and now are only
updated manually such as at clearVolatile or during forme changes.
This fixes interaction between: Transform, forme changes,
Conversion, Conversion2, Soak, Camouflage, Reflect Type, and
Color Change.
We're now one more step closer to getting rid of the ModifyPokemon
event.
Type changes in gen3 and gen4 will need to be redone for the new
typechange system.
- Stats are now cached and recalculated every clearVolatile (switchout)
- Power Trick, Power Split, Guard Split, Transform, forme changes now
modify the cached stat value
- This eliminates the need for pokemon.baseSet, so it's been removed
- pokemon.transformInto has been split into transformInto and formeChange
- pokemon.baseBoosts have also been eliminated, boost changes are now
calculated on-the-fly like stats themselves
- Overall, stat changes should be a lot more like the cartridge games now
- We're also one step closer to finally getting rid of the ModifyPokemon
event
- Choice items now lock into a new move properly after losing the
original locked move (due to Mimic/Sketch/Transform)
- Choice items now continue locking into the original locked move (if
there was one) after Embargo, Klutz, or Magic Room's effects end
- General fixes to the priority of ignoring items
- Magic Room is now usable again
- A previous change to Illusion + Mold Breaker interaction broke some UI
for tracking Illusion status.
- This changes Illusion again, to have its clearing be hardcoded... which
isn't a big deal, because most of the rest is hardcoded anyway.
- This also fixes a minor animation bug so Illusion clears before taking
damage, not after