public override void Hit(Interfaces.IStarship targetShip) { int reminder = this.Damage - targetShip.Shields; targetShip.Shields -= this.Damage; if (reminder > 0) { targetShip.Health -= reminder; } }
public override void Hit(Interfaces.IStarship ship) { int actualDamage = 0; ship.Shields = ship.Shields - this.Damage; if (ship.Shields < 0) { actualDamage = Math.Abs(ship.Shields); } ship.Health = ship.Health - actualDamage; }
public override void Hit(Interfaces.IStarship targetShip) { targetShip.Health -= this.Damage; targetShip.Shields -= 2 * this.Damage; }
public override void Hit(Interfaces.IStarship ship) { ship.Health = ship.Health - this.Damage; }