protected Cannon(EnergyContainer source, int damage, int range, PlayerDamageType playerDamageType, IList <ZoneLocation> zonesAffected) { this.source = source; this.damage = damage; this.range = range; this.playerDamageType = playerDamageType; this.zonesAffected = zonesAffected; }
protected Cannon(EnergyContainer source, int damage, int range, PlayerDamageType playerDamageType, IList<ZoneLocation> zonesAffected) { this.source = source; this.damage = damage; this.range = range; this.playerDamageType = playerDamageType; this.zonesAffected = zonesAffected; }
public override void PerformBAction(Player performingPlayer, int currentTurn, bool isHeroic) { var firstBThreat = GetFirstThreatOfType(PlayerAction.B); if (firstBThreat != null) { DamageThreat(firstBThreat, performingPlayer, isHeroic); } else if (!HasIrreparableMalfunctionOfType(PlayerAction.B)) { EnergyContainer.PerformBAction(isHeroic); } }
private void EnergyLeaksOut(EnergyContainer reactor) { Damage(reactor.Energy); reactor.Energy = 0; }
protected LaserCannon(EnergyContainer source, int damage, PlayerDamageType playerDamageType, ZoneLocation currentZone) : base(source, damage, 3, playerDamageType, currentZone) { }
private static void TransferEnergyToShield(EnergyContainer shield, EnergyContainer reactor) { var roomForShields = shield.Capacity - shield.Energy; var energyTransferredToShields = Math.Min(roomForShields, reactor.Energy); shield.Energy += energyTransferredToShields; reactor.Energy -= energyTransferredToShields; }
protected Cannon(EnergyContainer source, int damage, int range, PlayerDamageType playerDamageType, ZoneLocation zoneAffected) : this(source, damage, range, playerDamageType, new[] { zoneAffected }) { }
protected Shield(Reactor source, int capacity, int energy) : base(capacity, energy) { Source = source; }