Exemplo n.º 1
0
        public override void OnStart(Tyr tyr)
        {
            DefenseTask.Enable();
            tyr.TaskManager.Add(attackTask);
            tyr.TaskManager.Add(WorkerScoutTask);
            tyr.TaskManager.Add(new ObserverScoutTask());
            tyr.TaskManager.Add(new ArmyObserverTask());
            tyr.TaskManager.Add(new AdeptScoutTask());
            tyr.TaskManager.Add(TimedObserverTask);
            PhasedDisruptorTask.Enable();
            if (tyr.BaseManager.Pocket != null)
            {
                tyr.TaskManager.Add(new ScoutProxyTask(tyr.BaseManager.Pocket.BaseLocation.Pos));
            }
            ArchonMergeTask.Enable();

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

            MicroControllers.Add(new DodgeBallController());
            MicroControllers.Add(FearSpinesController);
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new DisruptorController());

            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 += EmergencyGateways();
            Set += MutaCannons();
            Set += ExpandBuildings();
            Set += Nexii();
            Set += MainBuild();
        }
Exemplo n.º 2
0
        public override void OnStart(Bot bot)
        {
            DefenseTask.Enable();
            bot.TaskManager.Add(attackTask);
            bot.TaskManager.Add(WorkerScoutTask);
            bot.TaskManager.Add(new ObserverScoutTask());
            bot.TaskManager.Add(new ArmyObserverTask());
            bot.TaskManager.Add(new AdeptScoutTask());
            bot.TaskManager.Add(TimedObserverTask);
            PhasedDisruptorTask.Enable();
            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(new DodgeBallController());
            MicroControllers.Add(FearSpinesController);
            MicroControllers.Add(new StalkerController());
            MicroControllers.Add(new StutterController());
            MicroControllers.Add(new HTController());
            MicroControllers.Add(new ColloxenController());
            MicroControllers.Add(new DisruptorController());

            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 += EmergencyGateways();
            Set += MutaCannons();
            Set += ExpandBuildings();
            Set += Nexii();
            Set += MainBuild();
        }