Electric types immune to paralysis

This commit is contained in:
DizzyEggg 2018-07-29 12:45:08 +02:00
parent 3d93da7133
commit 2f6cc2be80
2 changed files with 15 additions and 0 deletions

View file

@ -1445,6 +1445,7 @@ BattleScript_EffectParalyze::
typecalc
jumpifmovehadnoeffect BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_AlreadyParalyzed
jumpiftype BS_TARGET, TYPE_ELECTRIC, BattleScript_NotAffected
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected

View file

@ -2230,6 +2230,20 @@ void SetMoveEffect(bool8 primary, u8 certain)
else
break;
}
if ((IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_ELECTRIC))
&& (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
{
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_PRLZPrevention;
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
RESET_RETURN
}
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_ELECTRIC))
break;
if (gBattleMons[gEffectBattler].ability == ABILITY_LIMBER)
break;
if (gBattleMons[gEffectBattler].status1)
break;