Mimicry is now a proud member of ABILITYEFFECT_ON_TERRAIN.
Misc. changes:
-Ditched the dependency on and usage of gBattlerAttacker for the effects inside ABILITYEFFECT_ON_WEATHER and ABILITYEFFECT_ON_TERRAIN.
-Made Cmd_switchineffects activate ABILITYEFFECT_ON_TERRAIN to take into account overworld weather-induced field terrains.
-Updated the text strings printed by the battle scripts inside the aforementioned AbilityBattleEffects caseIDs.
-Removed constant label of unused VARIOUS_TRY_TO_APPLY_MIMICRY which I forgot about.
-Updated ChangeTypeBasedOnTerrain, partly as a result of the aforementioned changes but also for optimization purposes.
-There was never a reason to establish an empty scope, or to use GET_MOVE_TYPE and the variables that complemented it.
-Removed case ABILITY_QUARK_DRIVE from AbilityBattleEffects' case ABILITYEFFECT_ON_SWITCHIN.
A new, probably better way to handle the announcement trigger that abilities such as Protosynthesis and Quark Drive have, when the battle weather or the field terrain change.
Misc. changes:
-EFFECT_DAMAGE_SET_TERRAIN -> EFFECT_HIT_SET_REMOVE_TERRAIN
-It's more appropriate as the effect can be used to force set a terrain or simply to remove an active terrain, after all.
-The main reason for the rename was the inconsistency with the battle script's label.
-Reverted accidentally committed change to B_DOUBLE_WILD_CHANCE, performed back in c8abf00c.
-Renamed TryActivateWindRiderLoop to BattleScript_TryTailwindAbilitiesLoop
-Modified how it handles the check for Wind Rider by using a various and incorporated Wind Power into the mix because that ability is affected by Tailwind as well.
-Added a modifybattlerstatstage macro to handle stat stages in battle.
-Rewrote the checks inside the case ABILITYEFFECT_MOVES_BLOCK of AbilityBattleEffects.
Misc:
-Made the ability pop up stick around until the ability's effect ends just like in ORAS.
-Updated sText_BadDreamsDmg accordingly while I was at it.
- Determined how the various script contexts were used and renamed accordingly.
- ScriptContext2_Enable/Disable => Lock/UnlockPlayerFieldControls - The sole purpose of the flag is to make sure the player can't move around in the overworld. It has nothing to do with script contexts.
- ScriptContext1 => ScriptContext - It is the global script context used to set up scripts which run over many frames.
- ScriptContext2_RunNewScript => RunScriptImmediately - ScriptContext2's sole purpose was to run scripts immediately and in a separate context, usually while the global context is waiting for things like map loads or screen changes.