override public void atack(GameObj unit) { Coord range = (this.Position - unit.Position).ABS; if (range.X > 1 || range.Y > 1) { throw new Exception("long range"); } //unit.health -= (this.damage * this.attack) / unit.defense; unit.health -= this.damage; // simple }
abstract public void atack(GameObj unit);