public override void Attacked(IDefender defender) { int damage = defender.Attack(this); if (damage > Armor) { damage -= Armor; } else if (damage > 0) { damage = 1; //in the .txt it says "but always at least 1 point", not sure if it refers to this } GetDamage(damage); }
public override void Attacked(IDefender defender) { GetDamage(defender.Attack(this)); }
public override void AttackedBy(IDefender defender) { //Console.WriteLine($"{defender.GetType()} {defender.Name} attacked {this.GetType()} {this.Name} "); defender.Attack(this); }
public override void AttackedBy(IDefender defender) { defender.Attack(this); }