mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-09 21:25:03 +01:00
Transform Imposter Illusion fix
This commit is contained in:
parent
3bdf675221
commit
36aec5658c
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user