Exemplo n.º 1
0
        public override void Hit(Interfaces.IStarship targetShip)
        {
            int reminder = this.Damage - targetShip.Shields;

            targetShip.Shields -= this.Damage;
            if (reminder > 0)
            {
                targetShip.Health -= reminder;
            }
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public override void Hit(Interfaces.IStarship targetShip)
 {
     targetShip.Health  -= this.Damage;
     targetShip.Shields -= 2 * this.Damage;
 }
Exemplo n.º 4
0
 public override void Hit(Interfaces.IStarship ship)
 {
     ship.Health = ship.Health - this.Damage;
 }