public void Damage(float amount, Type damageType) { //1) account for substitute if (Substitute.IsActive) { Substitute.Damage(amount); } else { Pokemon.Damage(amount); } //2) account for Bide if (Bide.Active) { Bide.Damage(amount); } //3) account for Counter if (damageType == Type.Normal || damageType == Type.Fighting) { DamageForCounter = amount; } //4) account for thawing if (Pokemon.Status == Status.Freeze && damageType == Type.Fire) { Pokemon.ClearStatus(); } CheckForRageAndUpdateAttackStatStageIfNecessary(); }
private void BeginningOfTurnEffects(ref bool canMove, Move move) { if (Pokemon.Status == Status.Sleep) { canMove = false; if (SleepTurnsLeft > 0) { OnFastAsleep(); } else { OnWokeUp(); Pokemon.ClearStatus(); } return; } if (Pokemon.Status == Status.Freeze) { canMove = false; OnFrozenSolid(); return; } if (Pokemon.Status == Status.Paralysis && new Random().Next(0, 100) < 25) { canMove = false; OnFullyParalyzed(); if (LastMoveUsed != null) { LastMoveUsed.IfActiveDisruptThrashingMove(this); } if (MultiTurnMove != null) { DeactivateMultiTurnMove(); } if (TwoTurnMove != null) { DeactivateTwoTurnMove(); } if (IsDisabled()) { Disable.Tick(); } return; } if (ConfusionTurnsLeft > 0) { OnConfused(); if (new Random().Next(0, 100) < 50) { canMove = false; OnHurtFromConfusion(); DamageFromConfusion(); if (LastMoveUsed != null) { LastMoveUsed.IfActiveDisruptThrashingMove(this); } --ConfusionTurnsLeft; if (IsDisabled()) { Disable.Tick(); } return; } } if (Flinching) { canMove = false; OnFlinched(); return; } if (IsDisabled() && Disable.GetDisabledMove() == move) { canMove = false; OnMoveAttemptedButIsDisabled(); return; } }
public sealed override void UseOn(Pokemon p) { p.ClearStatus(); }
public void ClearStatus() { Pokemon.ClearStatus(); N = 1f; }
public sealed override void UseOn(Pokemon p) { p.RestoreHP(999999999f); p.ClearStatus(); }