Transform Imposter Illusion fix

This commit is contained in:
DizzyEggg 2020-06-29 13:45:27 +02:00
parent 3bdf675221
commit 36aec5658c
3 changed files with 5 additions and 0 deletions

View File

@ -411,7 +411,10 @@ bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattler, u8 atkBattler, u8 de
} }
if (tableId == B_ANIM_ILLUSION_OFF) if (tableId == B_ANIM_ILLUSION_OFF)
{
gBattleStruct->illusion[activeBattler].broken = 1; gBattleStruct->illusion[activeBattler].broken = 1;
gBattleStruct->illusion[activeBattler].on = 0;
}
gBattleAnimAttacker = atkBattler; gBattleAnimAttacker = atkBattler;
gBattleAnimTarget = defBattler; gBattleAnimTarget = defBattler;

View File

@ -9404,6 +9404,7 @@ static void Cmd_transformdataexecution(void)
gChosenMove = 0xFFFF; gChosenMove = 0xFFFF;
gBattlescriptCurrInstr++; gBattlescriptCurrInstr++;
if (gBattleMons[gBattlerTarget].status2 & STATUS2_TRANSFORMED if (gBattleMons[gBattlerTarget].status2 & STATUS2_TRANSFORMED
|| gBattleStruct->illusion[gBattlerTarget].on
|| gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE) || gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE)
{ {
gMoveResultFlags |= MOVE_RESULT_FAILED; gMoveResultFlags |= MOVE_RESULT_FAILED;

View File

@ -2943,6 +2943,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
if (IsBattlerAlive(BATTLE_OPPOSITE(battler)) if (IsBattlerAlive(BATTLE_OPPOSITE(battler))
&& !(gBattleMons[BATTLE_OPPOSITE(battler)].status2 & (STATUS2_TRANSFORMED | STATUS2_SUBSTITUTE)) && !(gBattleMons[BATTLE_OPPOSITE(battler)].status2 & (STATUS2_TRANSFORMED | STATUS2_SUBSTITUTE))
&& !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) && !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED)
&& !(gBattleStruct->illusion[BATTLE_OPPOSITE(battler)].on)
&& !(gStatuses3[BATTLE_OPPOSITE(battler)] & STATUS3_SEMI_INVULNERABLE)) && !(gStatuses3[BATTLE_OPPOSITE(battler)] & STATUS3_SEMI_INVULNERABLE))
{ {
gBattlerTarget = BATTLE_OPPOSITE(battler); gBattlerTarget = BATTLE_OPPOSITE(battler);