Beispiel #1
0
        public override void InitializeTasks()
        {
            base.InitializeTasks();

            if (ReaperDefenseTask == null)
            {
                ReaperDefenseTask = new DefenseSquadTask(Main, UnitTypes.STALKER)
                {
                    MaxDefenders = 2, Priority = 10
                }
            }
            ;
            DefenseSquadTask.Enable(ReaperDefenseTask);

            DefenseTask.Enable();
            TimingAttackTask.Enable();
            if (Tyr.Bot.TargetManager.PotentialEnemyStartLocations.Count > 1)
            {
                WorkerScoutTask.Enable();
            }
            if (Tyr.Bot.BaseManager.Pocket != null)
            {
                ScoutProxyTask.Enable(Tyr.Bot.BaseManager.Pocket.BaseLocation.Pos);
            }
            ArmyObserverTask.Enable();
            TimedObserverTask.Enable();
            SaveWorkersTask.Enable();
        }
Beispiel #2
0
        public override void InitializeTasks()
        {
            base.InitializeTasks();

            DefenseTask.Enable();
            TimingAttackTask.Enable();
            if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1 || SendScout)
            {
                WorkerScoutTask.Enable();
            }
            if (Bot.Main.BaseManager.Pocket != null)
            {
                ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
            }
            ArmyObserverTask.Enable();
            TimedObserverTask.Enable();
            ObserverScoutTask.Enable();
            SaveWorkersTask.Enable();
            ForceFieldRampTask.Enable();
            if (ProxyPylon)
            {
                ProxyTask.Enable(new List <ProxyBuilding>()
                {
                    new ProxyBuilding()
                    {
                        UnitType = UnitTypes.PYLON
                    }
                });
                ProxyTask.Task.UseEnemyNatural = true;
                ProxyTask.Task.Stopped         = true;
            }
        }
Beispiel #3
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (!BlockExpand)
     {
         WorkerScoutTask.Enable();
     }
     ArmyObserverTask.Enable();
     ObserverScoutTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     ForwardProbeTask.Enable();
     ShieldRegenTask.Enable();
     HodorTask.Enable();
     if (BlockExpand)
     {
         BlockExpandTask.Enable();
     }
     if (ProxyPylon)
     {
         ProxyTask.Enable(new List <ProxyBuilding>()
         {
             new ProxyBuilding()
             {
                 UnitType = UnitTypes.PYLON
             }
         });
         ProxyTask.Task.UseEnemyNatural = true;
     }
 }
Beispiel #4
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1 || Scouting)
     {
         WorkerScoutTask.Enable();
     }
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ScoutTask.Enable();
     ArmyObserverTask.Enable();
     if (ObserverScout)
     {
         ObserverScoutTask.Enable();
     }
     if (Bot.Main.EnemyRace == SC2APIProtocol.Race.Zerg || Bot.Main.EnemyRace == SC2APIProtocol.Race.Protoss)
     {
         ForceFieldRampTask.Enable();
     }
     if (DenyScouting)
     {
         DenyScoutTask.Enable();
     }
     WorkerRushDefenseTask.Enable();
 }
Beispiel #5
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     TimingAttackTask.Enable();
     WorkerScoutTask.Enable();
     WarpPrismTask.Enable();
     ArmyObserverTask.Enable();
 }
Beispiel #6
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     WorkerRushDefenseTask.Enable();
     ArmyObserverTask.Enable();
 }
Beispiel #7
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     HideUnitsTask.Enable();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     OracleHarassBasesTask.Enable();
     WorkerScoutTask.Enable();
     ArmyObserverTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
 }
Beispiel #8
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     ArmyObserverTask.Enable();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
 }
Beispiel #9
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     ArmyObserverTask.Enable();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     DefendRegionTask.Enable();
     if (Tyr.Bot.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     if (Tyr.Bot.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Tyr.Bot.BaseManager.Pocket.BaseLocation.Pos);
     }
     ProxyTask.Enable(new List <ProxyBuilding>()
     {
         new ProxyBuilding()
         {
             UnitType = UnitTypes.PYLON
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.STARGATE, Number = 1, Test = () => Count(UnitTypes.CYBERNETICS_CORE) > 0
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.PHOTON_CANNON, Number = 1, Test = () => CollectionUtil.Get(ProxyTask.Task.UnitCounts, UnitTypes.STARGATE) > 0
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.STARGATE, Number = 2, Test = () => Count(UnitTypes.FLEET_BEACON) > 0
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.PHOTON_CANNON, Number = 3, Test = () => Minerals() >= 150 && Count(UnitTypes.FLEET_BEACON) > 0 && (Count(UnitTypes.TEMPEST) > 0 || Minerals() >= 600)
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.PYLON, Number = 2, Test = () => Minerals() >= 400 && Count(UnitTypes.PHOTON_CANNON) >= 3
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.SHIELD_BATTERY, Number = 3, Test = () => Minerals() >= 400 && Count(UnitTypes.TEMPEST) > 0
         },
         //new ProxyBuilding() { UnitType = UnitTypes.STARGATE, Number = 1, Test = () => Count(UnitTypes.TEMPEST) >= 2 }
     }, true);
 }
Beispiel #10
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     WorkerScoutTask.Enable();
     ShieldRegenTask.Enable();
     ArmyObserverTask.Enable();
     ObserverScoutTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     ForceFieldRampTask.Enable();
 }
Beispiel #11
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArmyObserverTask.Enable();
     if (Bot.Main.EnemyRace == SC2APIProtocol.Race.Zerg || Bot.Main.EnemyRace == SC2APIProtocol.Race.Protoss)
     {
         ForceFieldRampTask.Enable();
     }
     WorkerRushDefenseTask.Enable();
 }
Beispiel #12
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     HallucinationAttackTask.Enable();
     DefenseTask.Enable();
     MassSentriesTask.Enable();
     WorkerScoutTask.Enable();
     ForceFieldRampTask.Enable();
     KillOwnUnitTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     WorkerRushDefenseTask.Enable();
     ArmyObserverTask.Enable();
     SentryWarpInTask.Enable();
 }
Beispiel #13
0
        public override void OnStart(Bot bot)
        {
            WorkerScoutTask.StartFrame = 1200;

            DefenseTask.Enable();
            bot.TaskManager.Add(AttackTask);
            bot.TaskManager.Add(WorkerScoutTask);
            ArmyObserverTask.Enable();
            bot.TaskManager.Add(new ObserverScoutTask()
            {
                Priority = 6
            });
            if (bot.BaseManager.Pocket != null)
            {
                bot.TaskManager.Add(new ScoutProxyTask(bot.BaseManager.Pocket.BaseLocation.Pos));
            }
            ArchonMergeTask.Enable();

            OverrideDefenseTarget = bot.MapAnalyzer.Walk(NaturalDefensePos, bot.MapAnalyzer.EnemyDistances, 15);

            MicroControllers.Add(FallBackController);
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new SoftLeashController(UnitTypes.STALKER, UnitTypes.IMMORTAL, 6));
            MicroControllers.Add(new DisruptorController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new TempestController());
            if (WallIn == null)
            {
                WallIn = new WallInCreator();
                WallIn.Create(new List <uint>()
                {
                    UnitTypes.GATEWAY, UnitTypes.PYLON, UnitTypes.GATEWAY
                });
                WallIn.ReserveSpace();
            }

            Set += ProtossBuildUtil.Pylons(() => Completed(UnitTypes.PYLON) > 0);
            Set += CannonDefense();
            Set += EmergencyGateways();
            Set += ExpandBuildings();
            Set += Units();
            Set += MainBuild();
        }
Beispiel #14
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Tyr.Bot.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     ArmyObserverTask.Enable();
     if (Tyr.Bot.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Tyr.Bot.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     WorkerRushDefenseTask.Enable();
     PhoenixHarassTask.Enable();
 }
Beispiel #15
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     WorkerScoutTask.Enable();
     ArmyObserverTask.Enable();
     ObserverScoutTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     WorkerRushDefenseTask.Enable();
     ScoutTask.Enable();
     KillOwnUnitTask.Enable();
     AdeptHarassExpandsTask.Enable();
 }
Beispiel #16
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ScoutTask.Enable();
     ArmyObserverTask.Enable();
     ForceFieldRampTask.Enable();
     DenyScoutTask.Enable();
     HuntScoutTask.Enable();
     HuntProxyTask.Enable();
     AttackLocationTask.Enable();
     WorkersAttackLocationTask.Enable();
 }
Beispiel #17
0
        public override void OnStart(Tyr tyr)
        {
            WorkerScoutTask.StartFrame = 1200;

            DefenseTask.Enable();
            tyr.TaskManager.Add(AttackTask);
            tyr.TaskManager.Add(WorkerScoutTask);
            ArmyObserverTask.Enable();
            tyr.TaskManager.Add(new ObserverScoutTask()
            {
                Priority = 6
            });
            tyr.TaskManager.Add(new AdeptScoutTask());
            if (tyr.BaseManager.Pocket != null)
            {
                tyr.TaskManager.Add(new ScoutProxyTask(tyr.BaseManager.Pocket.BaseLocation.Pos));
            }
            ArchonMergeTask.Enable();
            MechDestroyExpandsTask.Enable();

            OverrideDefenseTarget = tyr.MapAnalyzer.Walk(NaturalDefensePos, tyr.MapAnalyzer.EnemyDistances, 15);

            MicroControllers.Add(new VoidrayController());
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new DisruptorController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new TempestController());
            if (WallIn == null)
            {
                WallIn = new WallInCreator();
                WallIn.Create(new List <uint>()
                {
                    UnitTypes.GATEWAY, UnitTypes.PYLON, UnitTypes.GATEWAY
                });
                WallIn.ReserveSpace();
            }

            Set += ProtossBuildUtil.Pylons(() => Completed(UnitTypes.PYLON) > 0);
            Set += CannonDefense();
            Set += ExpandBuildings();
            Set += MainBuild();
        }
Beispiel #18
0
        public override void InitializeTasks()
        {
            base.InitializeTasks();

            DefenseTask.Enable();
            TimingAttackTask.Enable();
            //if (Tyr.Bot.TargetManager.PotentialEnemyStartLocations.Count > 1)
            WorkerScoutTask.Enable();
            if (Bot.Main.BaseManager.Pocket != null)
            {
                ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
            }
            ArmyObserverTask.Enable();
            ObserverScoutTask.Enable();
            ArmyOracleTask.Enable();
            SaveWorkersTask.Enable();
            ObserverHunterTask.Enable();
            PhoenixScoutTask.Enable();
        }
Beispiel #19
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     WarpPrismElevatorTask.Enable();
     TimingAttackTask.Enable();
     WorkerScoutTask.Enable();
     ArmyObserverTask.Enable();
     if (Tyr.Bot.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Tyr.Bot.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     ForwardProbeTask.Enable();
     ShieldRegenTask.Enable();
     WorkerRushDefenseTask.Enable();
     ScoutTask.Enable();
     KillOwnUnitTask.Enable();
 }
Beispiel #20
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     ArmyObserverTask.Enable();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ProxyFourGateTask.Enable();
     ReaperDefenseTask = new DefenseSquadTask(Main, UnitTypes.STALKER);
     ReaperDefenseTask.MaxDefenders = 0;
     DefenseSquadTask.Enable(ReaperDefenseTask);
 }
Beispiel #21
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Tyr.Bot.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     if (Tyr.Bot.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Tyr.Bot.BaseManager.Pocket.BaseLocation.Pos);
     }
     ScoutTask.Enable();
     ArmyObserverTask.Enable();
     if (Tyr.Bot.EnemyRace == SC2APIProtocol.Race.Zerg)
     {
         ForceFieldRampTask.Enable();
     }
 }
Beispiel #22
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     ArmyObserverTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     ShieldRegenTask.Enable();
     WorkerRushDefenseTask.Enable();
     ScoutTask.Enable();
     KillOwnUnitTask.Enable();
     ForceFieldRampTask.Enable();
 }
Beispiel #23
0
        public override void InitializeTasks()
        {
            base.InitializeTasks();
            DefenseTask.Enable();
            TimingAttackTask.Enable();
            if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1 || !HuntProxies)
            {
                WorkerScoutTask.Enable();
            }
            if (Bot.Main.BaseManager.Pocket != null)
            {
                ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
            }
            ArmyObserverTask.Enable();
            ForceFieldRampTask.Enable();
            //ObserverScoutTask.Enable();
            if (HuntProxies)
            {
                HuntProxyTask1.AddMidwayPoint  = false;
                HuntProxyTask2.AddMidwayPoint  = false;
                HuntProxyTask1.CloseBasesFirst = true;
                HuntProxyTask2.CloseBasesFirst = true;
                HuntProxyTask1.StartFrame      = (int)(22.4 * 65);
                HuntProxyTask2.StartFrame      = (int)(22.4 * 65);
                Task.Enable(HuntProxyTask1);
                //Task.Enable(HuntProxyTask2);
            }
            Task.Enable(PerUnitDefenseTask.GroundDefenseTask);
            PerUnitDefenseTask.GroundDefenseTask.Priority = 8;
            PerUnitDefenseTask.GroundDefenseTask.AllowedDefenderTypes.Add(UnitTypes.STALKER);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.MARAUDER);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.MARINE);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.CYCLONE);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.SIEGE_TANK);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.SIEGE_TANK_SIEGED);
            PerUnitDefenseTask.GroundDefenseTask.IgnoreEnemyTypes.Add(UnitTypes.AUTO_TURRET);

            RampDefensePoint = new PotentialHelper(Bot.Main.MapAnalyzer.GetMainRamp(), 5).To(MainDefensePos).Get();
        }
Beispiel #24
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     ArmyObserverTask.Enable();
     DefenseTask.Enable();
     //TimingAttackTask.Enable();
     if (Bot.Main.TargetManager.PotentialEnemyStartLocations.Count > 1)
     {
         WorkerScoutTask.Enable();
     }
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ProxyTask.Enable(new List <ProxyBuilding>()
     {
         new ProxyBuilding()
         {
             UnitType = UnitTypes.PYLON
         },
         new ProxyBuilding()
         {
             UnitType = UnitTypes.ROBOTICS_FACILITY, Number = 2
         }
     });
     if (DefendProxyTask == null)
     {
         DefendProxyTask = new DefenseSquadTask(Main);
         DefendProxyTask.DraftFromFarAway = true;
         DefendProxyTask.AlwaysNeeded     = true;
         DefendProxyTask.MaxDefenders     = 1000000;
         DefendProxyTask.Priority         = 3;
     }
     DefenseSquadTask.Enable(DefendProxyTask);
     ReaperDefenseTask = new DefenseSquadTask(Main, UnitTypes.STALKER);
     ReaperDefenseTask.MaxDefenders = 0;
     DefenseSquadTask.Enable(ReaperDefenseTask);
     WarpPrismElevatorTask.Enable();
 }
Beispiel #25
0
 public override void InitializeTasks()
 {
     base.InitializeTasks();
     DefenseTask.Enable();
     TimingAttackTask.Enable();
     if (!BlockExpand)
     {
         WorkerScoutTask.Enable();
     }
     ArmyObserverTask.Enable();
     ObserverScoutTask.Enable();
     if (Bot.Main.BaseManager.Pocket != null)
     {
         ScoutProxyTask.Enable(Bot.Main.BaseManager.Pocket.BaseLocation.Pos);
     }
     ArchonMergeTask.Enable();
     ForwardProbeTask.Enable();
     ShieldRegenTask.Enable();
     HodorTask.Enable();
     if (BlockExpand)
     {
         BlockExpandTask.Enable();
     }
 }
Beispiel #26
0
        public override void OnStart(Tyr tyr)
        {
            DefenseTask.Enable();
            tyr.TaskManager.Add(attackTask);
            tyr.TaskManager.Add(WorkerScoutTask);
            ArmyObserverTask.Enable();
            tyr.TaskManager.Add(new ObserverScoutTask()
            {
                Priority = 6
            });
            tyr.TaskManager.Add(new AdeptScoutTask());
            if (tyr.BaseManager.Pocket != null)
            {
                tyr.TaskManager.Add(new ScoutProxyTask(tyr.BaseManager.Pocket.BaseLocation.Pos));
            }
            ArchonMergeTask.Enable();

            if (StalkerDefenseSquads == null)
            {
                StalkerDefenseSquads = DefenseSquadTask.GetDefenseTasks(UnitTypes.STALKER);
            }
            else
            {
                foreach (DefenseSquadTask task in StalkerDefenseSquads)
                {
                    Tyr.Bot.TaskManager.Add(task);
                }
            }
            DefenseSquadTask.Enable(StalkerDefenseSquads, true, true);

            OverrideDefenseTarget = tyr.MapAnalyzer.Walk(NaturalDefensePos, tyr.MapAnalyzer.EnemyDistances, 15);

            MicroControllers.Add(new SpreadOutController()
            {
                SpreadTypes = new HashSet <uint>()
                {
                    UnitTypes.IMMORTAL, UnitTypes.ARCHON, UnitTypes.STALKER
                }
            });
            MicroControllers.Add(FearSpinesController);
            MicroControllers.Add(new FearMinesController());
            MicroControllers.Add(new FallBackController());
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new DisruptorController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new TempestController());
            if (WallIn == null)
            {
                WallIn = new WallInCreator();
                WallIn.Create(new List <uint>()
                {
                    UnitTypes.GATEWAY, UnitTypes.PYLON, UnitTypes.GATEWAY
                });
                WallIn.ReserveSpace();
            }

            Set += ProtossBuildUtil.Pylons(() => Completed(UnitTypes.PYLON) > 0 && (Completed(Natural, UnitTypes.PYLON) > 0 || Count(UnitTypes.PYLON) < 2 || Minerals() >= 500));
            Set += CannonDefense();
            Set += EmergencyGateways();
            Set += ExpandBuildings();
            Set += Nexii();
            Set += Units();
            Set += MainBuild();
        }
Beispiel #27
0
        public override void OnStart(Tyr tyr)
        {
            DefenseTask.Enable();
            tyr.TaskManager.Add(attackTask);
            tyr.TaskManager.Add(WorkerScoutTask);
            ArmyObserverTask.Enable();
            tyr.TaskManager.Add(new ObserverScoutTask()
            {
                Priority = 6
            });
            tyr.TaskManager.Add(new AdeptScoutTask());
            if (tyr.BaseManager.Pocket != null)
            {
                tyr.TaskManager.Add(new ScoutProxyTask(tyr.BaseManager.Pocket.BaseLocation.Pos));
            }
            ArchonMergeTask.Enable();

            if (StalkerDefenseSquads == null)
            {
                StalkerDefenseSquads = DefenseSquadTask.GetDefenseTasks(UnitTypes.STALKER);
            }
            else
            {
                foreach (DefenseSquadTask task in StalkerDefenseSquads)
                {
                    Tyr.Bot.TaskManager.Add(task);
                }
            }
            DefenseSquadTask.Enable(StalkerDefenseSquads, true, true);

            OverrideDefenseTarget = tyr.MapAnalyzer.Walk(NaturalDefensePos, tyr.MapAnalyzer.EnemyDistances, 15);

            MicroControllers.Add(FearSpinesController);
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new DisruptorController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new TempestController());
            if (WallIn == null)
            {
                System.Console.WriteLine("Creating wall.");
                WallIn = new WallInCreator();
                WallIn.Create(new List <uint>()
                {
                    UnitTypes.GATEWAY, UnitTypes.PYLON, UnitTypes.GATEWAY
                });
                WallIn.ReserveSpace();
                System.Console.WriteLine("Wall size: " + WallIn.Wall.Count);
                foreach (WallBuilding building in WallIn.Wall)
                {
                    System.Console.WriteLine("Building pos: " + building.Pos);
                }
            }

            Set += ProtossBuildUtil.Pylons(() => Completed(UnitTypes.PYLON) > 0);
            Set += CannonDefense();
            Set += EmergencyGateways();
            Set += ExpandBuildings();
            Set += Nexii();
            Set += MainBuild();
        }