Open hedara90 opened 3 months ago
The problem is that the Illusion user is behind the Substitute when Illusion gets broken.
The proper behavior is that the Illusion user swaps places with its Substitute, then performs the Illusion breaking animation and lastly swaps back behind the Substitute.
The normal way of showing/hiding mons behind the substitute is done as part of Controller_DoMoveAnimation
in battle_util.c
, which is run through gBattlerControllerFuncs
which is run in BattleMainCB1
in battle_main.c
which is run by gMain.callback1
in the main loop.
The mon must be switched with the Substitute before AbilityBattleEffects
is run for the damage taken if I understand the code correctly.
Description
If Illusion break while the user is behind a substitute, the ability popup will appear and say that the Illusion broke, but neither the name nor the sprite is changed to the Illusion user.
https://github.com/rh-hideout/pokeemerald-expansion/assets/149414898/f202cb05-d511-45f7-a433-5869c8ab9072
Version
1.8.3 (Latest release)
Upcoming/master Version
No response
Discord contact info
hedara