コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: Cannon.cs プロジェクト: knexer/space-alert-resolver
 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;
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 private void EnergyLeaksOut(EnergyContainer reactor)
 {
     Damage(reactor.Energy);
     reactor.Energy = 0;
 }
コード例 #5
0
 protected LaserCannon(EnergyContainer source, int damage, PlayerDamageType playerDamageType, ZoneLocation currentZone)
     : base(source, damage, 3, playerDamageType, currentZone)
 {
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 protected Cannon(EnergyContainer source, int damage, int range, PlayerDamageType playerDamageType, ZoneLocation zoneAffected)
     : this(source, damage, range, playerDamageType, new[] { zoneAffected })
 {
 }
コード例 #8
0
ファイル: Cannon.cs プロジェクト: knexer/space-alert-resolver
 protected Cannon(EnergyContainer source, int damage, int range, PlayerDamageType playerDamageType, ZoneLocation zoneAffected)
     : this(source, damage, range, playerDamageType, new[] { zoneAffected })
 {
 }
コード例 #9
0
ファイル: Shield.cs プロジェクト: knexer/space-alert-resolver
 protected Shield(Reactor source, int capacity, int energy) : base(capacity, energy)
 {
     Source = source;
 }
コード例 #10
0
 protected LaserCannon(EnergyContainer source, int damage, PlayerDamageType playerDamageType, ZoneLocation currentZone)
     : base(source, damage, 3, playerDamageType, currentZone)
 {
 }