public sealed override void ExecuteAndUpdate(BattlePokemon user, BattlePokemon defender) { if (TurnsLeft == 0) { OnUsed(); TurnsLeft = new Random().Next(3, 5); user.ActivateMultiTurnMove(this); if (HasNoEffect(defender)) { OnNoEffect(); } else if (IsAMiss(user, defender)) { OnMissed(); } else { UpdateEffectivenessUpdateCritFlagAndDoDamage(user, defender); } SubtractPP(1); SetLastMoveAndMirrorMove(user, defender); } else { OnThrashingAbout(); if (HasNoEffect(defender)) { OnNoEffect(); } else if (IsAMiss(user, defender)) { OnMissed(); } else { UpdateEffectivenessUpdateCritFlagAndDoDamage(user, defender); } if (TurnsLeft == 1) { user.DeactivateMultiTurnMove(); user.Confuse(); } } --TurnsLeft; }
public sealed override void ExecuteAndUpdate(BattlePokemon user, BattlePokemon defender) { if (HasNoEffect(defender)) { OnNoEffect(); } else if (IsAMiss(user, defender)) { OnMissed(); } else if (!defender.IsSubstituteActive && !defender.IsConfused()) { defender.Confuse(); } else { OnFailed(); } SetLastMoveAndMirrorMove(user, defender); SubtractPP(1); }