public SideReactor(CentralReactor source)
     : base(3, 2)
 {
     Source = source;
 }
        //TODO: Wire up all 3 stations if variable range interceptors are allowed
        public SittingDuck()
        {
            CurrentThreatBuffs = new Dictionary<ExternalThreat, ExternalThreatBuff>();
            CurrentInternalThreats = new List<InternalThreat>();
            CurrentExternalThreats = new List<ExternalThreat>();
            var whiteReactor = new CentralReactor();
            var redReactor = new SideReactor(whiteReactor);
            var blueReactor = new SideReactor(whiteReactor);
            var redBatteryPack = new BatteryPack();
            var blueBatteryPack = new BatteryPack();
            var computerComponent = new ComputerComponent();
            var visualConfirmationComponent = new VisualConfirmationComponent();
            var rocketsComponent = new RocketsComponent();
            Computer = computerComponent;
            VisualConfirmationComponent = visualConfirmationComponent;
            RocketsComponent = rocketsComponent;
            var interceptorStation = new InterceptorStation
            {
                StationLocation = StationLocation.Interceptor
            };
            var upperRedStation = new StandardStation
            {
                Cannon = new SideHeavyLaserCannon(redReactor, ZoneLocation.Red),
                EnergyContainer = new SideShield(redReactor),
                StationLocation = StationLocation.UpperRed
            };
            interceptorStation.InterceptorComponent = new InterceptorComponent(null, upperRedStation);
            upperRedStation.CComponent = new InterceptorComponent(interceptorStation, null);
            var upperWhiteStation = new StandardStation
            {
                Cannon = new CentralHeavyLaserCannon(whiteReactor, ZoneLocation.White),
                EnergyContainer = new CentralShield(whiteReactor),
                StationLocation = StationLocation.UpperWhite,
                CComponent = computerComponent
            };
            var upperBlueStation = new StandardStation
            {
                Cannon = new SideHeavyLaserCannon(blueReactor, ZoneLocation.Blue),
                EnergyContainer = new SideShield(blueReactor),
                StationLocation = StationLocation.UpperBlue,
                CComponent = new BattleBotsComponent()
            };
            var lowerRedStation = new StandardStation
            {
                Cannon = new SideLightLaserCannon(redBatteryPack, ZoneLocation.Red),
                EnergyContainer = redReactor,
                StationLocation = StationLocation.LowerRed,
                CComponent = new BattleBotsComponent()
            };

            var lowerWhiteStation = new StandardStation
            {
                Cannon = new PulseCannon(whiteReactor),
                EnergyContainer = whiteReactor,
                StationLocation = StationLocation.LowerWhite,
                CComponent = visualConfirmationComponent
            };
            var lowerBlueStation = new StandardStation
            {
                Cannon = new SideLightLaserCannon(blueBatteryPack, ZoneLocation.Blue),
                EnergyContainer = blueReactor,
                StationLocation = StationLocation.LowerBlue,
                CComponent = rocketsComponent
            };
            upperRedStation.BluewardStation = upperWhiteStation;
            upperRedStation.OppositeDeckStation = lowerRedStation;
            upperWhiteStation.RedwardStation = upperRedStation;
            upperWhiteStation.BluewardStation = upperBlueStation;
            upperWhiteStation.OppositeDeckStation = lowerWhiteStation;
            upperBlueStation.RedwardStation = upperWhiteStation;
            upperBlueStation.OppositeDeckStation = lowerBlueStation;
            lowerRedStation.BluewardStation = lowerWhiteStation;
            lowerRedStation.OppositeDeckStation = upperRedStation;
            lowerWhiteStation.RedwardStation = lowerRedStation;
            lowerWhiteStation.BluewardStation = lowerBlueStation;
            lowerWhiteStation.OppositeDeckStation = upperWhiteStation;
            lowerBlueStation.RedwardStation = lowerWhiteStation;
            lowerBlueStation.OppositeDeckStation = upperBlueStation;

            RedZone = new Zone { LowerStation = lowerRedStation, UpperStation = upperRedStation, ZoneLocation = ZoneLocation.Red, Gravolift = new Gravolift() };
            WhiteZone = new Zone { LowerStation = lowerWhiteStation, UpperStation = upperWhiteStation, ZoneLocation = ZoneLocation.White, Gravolift = new Gravolift() };
            BlueZone = new Zone { LowerStation = lowerBlueStation, UpperStation = upperBlueStation, ZoneLocation = ZoneLocation.Blue, Gravolift = new Gravolift() };
            ZonesByLocation = new[] {RedZone, WhiteZone, BlueZone}.ToDictionary(zone => zone.ZoneLocation);
            StationByLocation = Zones
                .SelectMany(zone => new[] {zone.LowerStation, zone.UpperStation})
                .Concat(new Station[] {interceptorStation})
                .ToDictionary(station => station.StationLocation);
            InterceptorStation = interceptorStation;
        }
示例#3
0
 public SideReactor(CentralReactor source) : base(3, 2)
 {
     Source = source;
 }