The intention for this event is to remove the move disabling code away
from ModifyPokemon and to an event that can be run a fewer number of
times. Since the disabledMoves index is used to gray-out moves that cannot
be used, and not for any other purpose, there is no need for the related
code to be run at the ModifyPokemon timing, instead working better as a
once per turn event.
freezing a Shaymin-S transformed into something else -> no change; no
change when it comes back in frozen
freezing a Shaymin-S transformed into Shaymin-S -> reverts to Shaymin
freezing a Shaymin transformed into Shaymin-S -> reverts to Shaymin
freezing a Ditto transformed into Shaymin-S -> no change
freezing a Shaymin-S holding Aspear or Lum -> reverts to Shaymin, then
defrosts
Old implementation allowed Pokemon to use a standard weather move like
Rain Dance successfully against a primal weather like Harsh Sun if a
Pokemon with Cloud Nine or Air Lock was active.
While move.affectedByImmunities was always a Boolean value to denote if
the move was affected by immunities, move.ignoreImmunity can be a Boolean
value if it ignores or is affected by all type immunities, but also can
act as an object such that !!move.ignoreImmunity[type] means it ignores
immunities of that type.
- Gen 5-6: Thaw check is skipped when using a self-thaw move
- Gen 3-4: Thaw check happens before a move is used
- Gen 2: Self-thawing does not happen if the move misses
Moved all checks for primal weather into setWeather() instead of
hard-coding the check into every effect attempting to change the weather.
Also to prevent hardcoding, the check now runs on the event system, and
the primal weathers themselves deny regular weathers from being set.
Added functionality for setAbility to send End events to abilities.
Fixed bug with Mold Breaker negating all Battle#singleEvent ability calls,
even those that don't involve damage calculation.
Fixed Skill Swap to now use End and Start events in the right order:
send the End events, then change the abilities, then send Start events.
If the same ability is swapped, don't send End events (the game simply
re-activates the abilities in question)
Moved SwitchOut/Faint events from weather to ability so the weather
can interact properly with Cloud Nine or Air Lock.
Primal weathers persist if a Pokemon with the relevant ability is
on-field, even if the originator switches out.
- Implement BattlePokemon#runEffectiveness, accounting for battle events.
- Refactor Tools#getEffectiveness accordingly.
- Remove Inverse mod. It's now implemented using the global event 'Effectiveness', and with a few changes in the base data for hazards and Arena Trap.
- NEXT: Fix Filter and Solid Rock not accounting for the special effects of Freeze Dry and Flying Press.
Future moves fail to activate if the opponent has Wonder Guard, and
deals damage if it activated beforehand to a Wonder Guard Pokemon that
is not weak to them. This commit fixes both of those issues. However,
future moves still hit through wonder guard in generation 5, so that
is untouched.