Imposter check for semi invulnerable

This commit is contained in:
DizzyEggg 2019-03-30 11:56:15 +01:00
parent ea0049da89
commit e2268bd938

View File

@ -2709,7 +2709,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITY_IMPOSTER:
if (IsBattlerAlive(BATTLE_OPPOSITE(battler))
&& !(gBattleMons[BATTLE_OPPOSITE(battler)].status2 & (STATUS2_TRANSFORMED | STATUS2_SUBSTITUTE))
&& !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED))
&& !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED)
&& !(gStatuses3[BATTLE_OPPOSITE(battler)] & STATUS3_SEMI_INVULNERABLE))
{
gBattlerTarget = BATTLE_OPPOSITE(battler);
BattleScriptPushCursorAndCallback(BattleScript_ImposterActivates);