public override void AcceptMPLoss(Combatant source, int delta) { CurrentBattle.AddDamageIcon(delta, this, true); _c.MP -= delta; if (source is Enemy) { LastAttacker = source; } }
public override void AcceptDamage(Combatant source, int delta, AttackType type = AttackType.None) { CurrentBattle.AddDamageIcon(delta, this); // limit shtuff goes here if (type == AttackType.Physical) { if (Sleep) { CureSleep(source); } if (Confusion) { CureConfusion(source); } } int hp = _c.HP - delta; if (hp < 0) { hp = 0; } else if (hp >= _c.MaxHP) { hp = _c.MaxHP; } _c.HP = hp; if (HP == 0) { Kill(); } if (source is Enemy) { LastAttacker = source; switch (type) { case AttackType.Physical: LastAttackerPhysical = source; break; case AttackType.Magical: LastAttackerMagical = source; break; } } }
public override void AcceptMPLoss(Combatant source, int delta) { CurrentBattle.AddDamageIcon(delta, this, true); _mp -= delta; if (_mp > _maxmp) { _mp = _maxmp; } else if (_mp < 0) { _mp = 0; } if (source is Ally) { LastAttacker = source; } }