public void ClickTurn() { if (!WasAttacked) { NonDmgHit(); } WasAttacked = false; if (IsMisted) { MistTurns++; if (MistTurns == 5) { IsMisted = false; MistTurns = 0; } } if (Dancing) { DanceTurns++; if (DanceTurns == DanceTurnSeed) { Dancing = false; if (!_iConfused) { Displayer.RelayMessage("Pokemon confused due to fatigue"); TakeConfusion(3); } } } }
public virtual int LeechSeedDmg() { int dmg = _HealthPoints / 8; Displayer.RelayMessage($"Leech seed drained damage from {Name}"); TakeDamage(dmg); return(dmg); }
protected void TakeDamage(int dmg) { _subHPRemaining -= dmg; if (_subHPRemaining <= 0) { _subHPRemaining = 0; _isAlive = false; Displayer.Fainted(OwnerCall, _name); } }
public virtual void BadlyPoisonDmg() { int dmg = (_HealthPoints * T) / 16; dmg = dmg == 0 ? 1 : dmg; Displayer.RelayMessage($"{Name} took poison damage"); TakeDamage(dmg); T++; }
public void HealDamage(int dmg) { if (_subHPRemaining == _HealthPoints) { Displayer.FullHealth(OwnerCall, _name); return; } _subHPRemaining += dmg; if (_subHPRemaining >= _HealthPoints) { _subHPRemaining = _HealthPoints; } Displayer.HealDamage(OwnerCall, _name, dmg); }
private int CappedAdd(int addend, int offset, string name) { addend += offset; if (addend > 6 || addend < -6) { Displayer.TooFat(addend); } else { Displayer.Statup(offset, name); } addend = addend < -6 ? addend = -6 : addend; addend = addend > 6 ? addend = 6 : addend; return(addend); }
public int PokemonBide() { if (BidTurns == 0) { Displayer.RelayMessage("Bide start"); } else if (BidTurns == 1) { Displayer.RelayMessage("Pokemon storing energy"); } else if (BidTurns == 2) { Biding = false; BidTurns = 0; return(DamageBugger.Sum()); } BidTurns++; return(0); }
public void TakeDamage(int dmg, bool physical, float multiplier = 1, bool ignore = false) { if (LightScreen && !physical && !ignore) { dmg = dmg / 2; } else if (Reflect && physical && !ignore) { dmg = dmg / 2; } DamageBugger.Add(dmg); LastDmg = dmg; if (_activeSub) { SubstituteHP -= dmg; if (SubstituteHP <= 0) { _activeSub = false; Displayer.RelayMessage("Substitute broke"); } dmg = 0; } _subHPRemaining -= dmg; Displayer.SuperEffective(multiplier); if (_subHPRemaining <= 0) { _subHPRemaining = 0; _isAlive = false; Displayer.Fainted(OwnerCall, _name); } else { Displayer.ReceiveDamage(OwnerCall, _name, dmg); } }
public virtual void BurnDmg() { TakeDamage(_HealthPoints / 8); Displayer.RelayMessage($"{Name} took burn damage"); }
public virtual void NormalPoisonDmg() { Displayer.RelayMessage($"{Name} took poison damage"); TakeDamage(_HealthPoints / 8); }