Ejemplo n.º 1
0
        /**
         * Deprecated, as cannonRushes seem to be beatable without it.
         */
        private BuildList DefendCannonRush()
        {
            BuildList result = new BuildList();

            result.If(() => ProxyCannons);
            result.Morph(UnitTypes.OVERLORD);
            result.Morph(UnitTypes.DRONE, 14);
            result.Morph(UnitTypes.OVERLORD);
            result.Building(UnitTypes.EXTRACTOR);
            result.Building(UnitTypes.SPAWNING_POOL);
            result.Train(UnitTypes.QUEEN, 4);
            result.Morph(UnitTypes.DRONE, 4);
            result.Building(UnitTypes.ROACH_WARREN);
            result.Morph(UnitTypes.ROACH, 10);
            result.Train(UnitTypes.LAIR, 1);
            result.Building(UnitTypes.EXTRACTOR);
            result.Morph(UnitTypes.DRONE, 2);
            result.Building(UnitTypes.HYDRALISK_DEN);
            result.Morph(UnitTypes.HYDRALISK, 10);
            result.Upgrade(UpgradeType.GroovedSpines);
            result.Morph(UnitTypes.RAVAGER, 4);
            result.Morph(UnitTypes.HYDRALISK, 10);
            result.Morph(UnitTypes.ROACH, 10);
            result.Morph(UnitTypes.HYDRALISK, 10);
            result.Morph(UnitTypes.ROACH, 10);
            result.Morph(UnitTypes.HYDRALISK, 10);
            result.Morph(UnitTypes.ROACH, 10);
            result.Morph(UnitTypes.HYDRALISK, 10);
            result.Morph(UnitTypes.ROACH, 10);

            return(result);
        }
Ejemplo n.º 2
0
        private BuildList MainBuild()
        {
            BuildList result = new BuildList();

            result.Morph(UnitTypes.DRONE, 14);
            result.Building(UnitTypes.HATCHERY, 2);
            result.Building(UnitTypes.SPAWNING_POOL);
            result.Morph(UnitTypes.OVERLORD, 2);
            result.Morph(UnitTypes.DRONE, 3);
            result.Train(UnitTypes.QUEEN, 2);
            result.Building(UnitTypes.EXTRACTOR);
            result.Morph(UnitTypes.DRONE, 3);
            result.Building(UnitTypes.SPINE_CRAWLER, Natural, NaturalDefensePos, 2, () => Completed(UnitTypes.HATCHERY) >= 2 && SpineDefense);
            //result.Morph(UnitTypes.ZERGLING, 4);
            //result.Morph(UnitTypes.ZERGLING, 4);
            result.Building(UnitTypes.HATCHERY, () => { return(AvailableMineralPatches() <= 12); });
            //result.If(() =>
            //{
            //    return Gas() < 100
            //    || Tyr.Bot.Observation.Observation.RawData.Player.UpgradeIds.Contains(66)
            //    || Tyr.Bot.UnitManager.ActiveOrders.Contains(1253);
            //});
            //result.Morph(UnitTypes.ZERGLING, 12);
            //result.If(() =>
            //{
            //    return Gas() < 150
            //    || Count(UnitTypes.HIVE) > 0
            //    || Completed(UnitTypes.INFESTATION_PIT) == 0;
            //});
            //result.If(() => { return !TimingAttackTask.Task.AttackSent || Count(UnitTypes.LAIR) + Count(UnitTypes.HIVE) > 0; });
            //result.Morph(UnitTypes.ZERGLING, 20);
            //result.If(() => { return Completed(UnitTypes.EVOLUTION_CHAMBER) < 2 || ResearchingUpgrades + (MeleeUpgrade / 3) + (ArmorUpgrade / 3) == 2; });
            //result.Morph(UnitTypes.ZERGLING, 400);
            return(result);
        }
Ejemplo n.º 3
0
        private BuildList MainBuildList()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.NEXUS);
            result.Building(UnitTypes.PYLON);
            result.If(() => Completed(UnitTypes.PYLON) > 0);
            result.Building(UnitTypes.GATEWAY);
            result.Building(UnitTypes.ASSIMILATOR);
            if (!DoubleRobo)
            {
                result.Building(UnitTypes.GATEWAY);
            }
            result.Building(UnitTypes.CYBERNETICS_CORE);
            result.Building(UnitTypes.ASSIMILATOR, () => !StartZealots || TotalEnemyCount(UnitTypes.ROACH) > 0);
            result.Building(UnitTypes.ROBOTICS_FACILITY);
            result.Building(UnitTypes.GATEWAY, () => TotalEnemyCount(UnitTypes.BANSHEE) > 0);
            result.Building(UnitTypes.ROBOTICS_FACILITY, () =>
                            (TotalEnemyCount(UnitTypes.BANSHEE) == 0 && Completed(UnitTypes.STALKER) + Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.SENTRY) >= 8) ||
                            DoubleRobo);

            /*
             * result.If(() => Completed(UnitTypes.STALKER) + Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.SENTRY) >= 8 || Count(UnitTypes.IMMORTAL) >= 3 || Minerals() >= 500);
             * result.Building(UnitTypes.NEXUS);
             * result.Building(UnitTypes.PYLON, Natural, NaturalDefensePos);
             * result.Building(UnitTypes.ASSIMILATOR);
             * result.Building(UnitTypes.GATEWAY);
             * result.Building(UnitTypes.ASSIMILATOR);
             */
            return(result);
        }
Ejemplo n.º 4
0
        private BuildList NaturalDefenses()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Tyr.Bot.EnemyRace != Race.Zerg || Count(UnitTypes.GATEWAY) > 0); });
            result.Building(UnitTypes.PYLON, Natural, NaturalDefensePos);
            result.Building(UnitTypes.FORGE, Natural, NaturalDefensePos);
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 2);
            result.If(() => { return(Count(UnitTypes.NEXUS) >= 2 && Beyond2Cannons); });
            if (Tyr.Bot.EnemyRace == Race.Zerg)
            {
                result.If(() => { return(Count(UnitTypes.CYBERNETICS_CORE) > 0); });
            }
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, () => { return(!DefendReapers); });
            if (Tyr.Bot.EnemyRace == Race.Zerg)
            {
                result.If(() => { return(Count(UnitTypes.STARGATE) > 0); });
            }
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, () => { return(!DefendReapers); });
            result.Building(UnitTypes.PYLON, Natural);
            result.Building(UnitTypes.SHIELD_BATTERY, Natural, NaturalDefensePos);
            result.If(() => { return(!DefendReapers); });
            result.If(() => { return(Minerals() >= 650 && Tyr.Bot.Frame % 9 == 0); });
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 2);
            result.If(() => { return(Minerals() >= 650); });
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 2);
            result.If(() => { return(Minerals() >= 650); });
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 2);

            return(result);
        }
Ejemplo n.º 5
0
        private BuildList Broodlords()
        {
            BuildList result = new BuildList();

            result.If(() => { return(GoingBroodlords); });
            result.Morph(UnitTypes.DRONE, 20);
            result.Building(UnitTypes.EXTRACTOR, 4);
            result.Morph(UnitTypes.HYDRALISK, 5);
            result.Morph(UnitTypes.LURKER);
            result.Morph(UnitTypes.HYDRALISK);
            result.Morph(UnitTypes.LURKER);
            result.Morph(UnitTypes.HYDRALISK);
            result.Morph(UnitTypes.LURKER);
            result.Morph(UnitTypes.HYDRALISK);
            result.Morph(UnitTypes.LURKER);
            result.Morph(UnitTypes.HYDRALISK);
            result.Morph(UnitTypes.LURKER);
            result.Morph(UnitTypes.HYDRALISK);
            result.Building(UnitTypes.INFESTATION_PIT);
            result.Building(UnitTypes.SPIRE);
            result.Morph(UnitTypes.CORRUPTOR, 5);
            result.Morph(UnitTypes.BROOD_LORD, 10);
            result.Morph(UnitTypes.HYDRALISK, 100);
            return(result);
        }
Ejemplo n.º 6
0
        private BuildList BuildGateways()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.GATEWAY, 4);
            result.If(() => { return(Count(UnitTypes.ZEALOT) >= 8); });
            result.Building(UnitTypes.GATEWAY, 2);
            return(result);
        }
Ejemplo n.º 7
0
        private BuildList MainBuild()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.PYLON);
            result.Building(UnitTypes.FORGE);

            return(result);
        }
Ejemplo n.º 8
0
        private BuildList AntiLifting()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Tyr.Bot.EnemyStrategyAnalyzer.LiftingDetected); });
            result.Building(UnitTypes.EXTRACTOR, 2);
            result.Building(UnitTypes.SPIRE);
            return(result);
        }
Ejemplo n.º 9
0
        private BuildList AntiLifting()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Lifting.Get().Detected); });
            result.Building(UnitTypes.EXTRACTOR, 2);
            result.Building(UnitTypes.SPIRE);
            return(result);
        }
Ejemplo n.º 10
0
        private BuildList MainBuild()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.SPAWNING_POOL);
            result.Building(UnitTypes.EXTRACTOR);
            result.If(() => { return(Count(UnitTypes.QUEEN) > 0); });
            result.Building(UnitTypes.ROACH_WARREN);
            return(result);
        }
Ejemplo n.º 11
0
        private BuildList AntiWorkerRush()
        {
            BuildList result = new BuildList();

            result.If(() => StrategyAnalysis.WorkerRush.Get().Detected);
            result.Building(UnitTypes.SUPPLY_DEPOT);
            result.Building(UnitTypes.BARRACKS);

            return(result);
        }
Ejemplo n.º 12
0
        private BuildList EmergencyGateways()
        {
            BuildList result = new BuildList();

            result.If(() => { return(EarlyPool.Get().Detected&& !Expanded.Get().Detected); });
            result.Building(UnitTypes.PYLON);
            result.Building(UnitTypes.GATEWAY, 2);

            return(result);
        }
Ejemplo n.º 13
0
        private BuildList EmergencyGateways()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool && !Tyr.Bot.EnemyStrategyAnalyzer.Expanded); });
            result.Building(UnitTypes.PYLON);
            result.Building(UnitTypes.GATEWAY, 2);

            return(result);
        }
Ejemplo n.º 14
0
        private BuildList Nexii()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.NEXUS, 2);
            result.If(() => { return(Attacking); });
            result.Building(UnitTypes.NEXUS);

            return(result);
        }
Ejemplo n.º 15
0
        private BuildList AntiWorkerRush()
        {
            BuildList result = new BuildList();

            result.If(() => Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected);
            result.Building(UnitTypes.SUPPLY_DEPOT);
            result.Building(UnitTypes.BARRACKS);

            return(result);
        }
Ejemplo n.º 16
0
        private BuildList NaturalDefenses()
        {
            BuildList result = new BuildList();

            result.If(() => { return(SmellCheese && Count(UnitTypes.ADEPT) >= 10); });
            result.Building(UnitTypes.FORGE);
            result.If(() => { return(Attacking); });
            result.Building(UnitTypes.PHOTON_CANNON, Main, MainDefensePos, 4);

            return(result);
        }
Ejemplo n.º 17
0
        private BuildList MainBuildList()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.PYLON, Main, () => Count(UnitTypes.PROBE) >= 13);
            result.Building(UnitTypes.GATEWAY, Main);
            result.Building(UnitTypes.GATEWAY, Main);
            result.Train(UnitTypes.ZEALOT);

            return(result);
        }
Ejemplo n.º 18
0
        private BuildList BuildStargatesAgainstLifters()
        {
            BuildList result = new BuildList();

            result.Train(UnitTypes.PROBE, 16);
            result.Building(UnitTypes.PYLON);
            result.Building(UnitTypes.GATEWAY);
            result.Train(UnitTypes.ZEALOT);

            return(result);
        }
Ejemplo n.º 19
0
        private BuildList Nexii()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Count(UnitTypes.GATEWAY) >= 2 && (!SmellCheese || Count(UnitTypes.ADEPT) + Count(UnitTypes.STALKER) >= 8)); });
            result.Building(UnitTypes.NEXUS, 2);
            result.If(() => { return(Attacking); });
            result.Building(UnitTypes.NEXUS);

            return(result);
        }
Ejemplo n.º 20
0
        private BuildList MainBuild()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.PYLON);
            result.Building(UnitTypes.FORGE);
            result.Building(UnitTypes.GATEWAY, 3, () => Minerals() >= 750 - Count(UnitTypes.PHOTON_CANNON) || CannonRushTask.Task.Units.Count == 0);
            result.Train(UnitTypes.ZEALOT);

            return(result);
        }
Ejemplo n.º 21
0
        private BuildList RushDefenses()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Count(UnitTypes.FORGE) > 0 && DefendRush); });
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 4);
            result.If(() => { return(!DefendReapers); });
            result.Building(UnitTypes.PHOTON_CANNON, Natural, NaturalDefensePos, 2);

            return(result);
        }
Ejemplo n.º 22
0
        private BuildList MainBuild()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.SUPPLY_DEPOT, Main, WallIn.Wall[0].Pos, true);
            result.Building(UnitTypes.BARRACKS, Main, WallIn.Wall[2].Pos, true);
            result.Building(UnitTypes.SUPPLY_DEPOT, Main, WallIn.Wall[1].Pos, true);
            result.Building(UnitTypes.BARRACKS, 3);
            result.Building(UnitTypes.BARRACKS, () => { return(TimingAttackTask.Task.AttackSent); });

            return(result);
        }
Ejemplo n.º 23
0
        private BuildList Nexii()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Tyr.Bot.EnemyRace != Race.Terran || Count(UnitTypes.GATEWAY) >= 2); });
            result.If(() => { return(Tyr.Bot.EnemyRace != Race.Zerg || Count(UnitTypes.GATEWAY) >= 1); });
            result.Building(UnitTypes.NEXUS, 2);
            result.If(() => { return(Attacking); });
            result.Building(UnitTypes.NEXUS);

            return(result);
        }
Ejemplo n.º 24
0
        private BuildList ExpansionDefenses(Base expansion)
        {
            BuildList result = new BuildList();

            result.If(() => { return(expansion.Owner == Tyr.Bot.PlayerId); });
            result.Building(UnitTypes.FORGE);
            result.Building(UnitTypes.PYLON, expansion);
            result.If(() => { return(Completed(expansion, UnitTypes.PYLON) > 0); });
            result.Building(UnitTypes.PHOTON_CANNON, expansion);

            return(result);
        }
Ejemplo n.º 25
0
        private BuildList Turrets()
        {
            BuildList result = new BuildList();

            result.If(() => { return(DefendMutas); });
            result.Building(UnitTypes.ENGINEERING_BAY);
            foreach (Base b in Tyr.Bot.BaseManager.Bases)
            {
                result.Building(UnitTypes.MISSILE_TURRET, b, () => { return(b.Owner == Tyr.Bot.PlayerId && b.ResourceCenter != null); });
            }
            result.Building(UnitTypes.MISSILE_TURRET, Main);
            return(result);
        }
Ejemplo n.º 26
0
        private BuildList MainBuildList()
        {
            BuildList result = new BuildList();

            result.Building(UnitTypes.PYLON, Main, () => Count(UnitTypes.PROBE) >= 13);
            result.Building(UnitTypes.GATEWAY, Main);
            result.If(() => Count(UnitTypes.GATEWAY) > 0);
            result.Building(UnitTypes.ASSIMILATOR);
            result.Building(UnitTypes.CYBERNETICS_CORE);
            result.Upgrade(UpgradeType.WarpGate, () => Count(UnitTypes.ROBOTICS_FACILITY) >= 2);
            result.Building(UnitTypes.ASSIMILATOR);

            return(result);
        }
Ejemplo n.º 27
0
        private BuildList Tech()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Count(UnitTypes.LAIR) + Count(UnitTypes.HIVE) > 0); });
            result.Building(UnitTypes.EVOLUTION_CHAMBER, 2);
            result.Building(UnitTypes.EXTRACTOR, 2);
            result.Morph(UnitTypes.DRONE, 34);
            result.If(() => { return(Completed(UnitTypes.LAIR) + Completed(UnitTypes.HIVE) > 0); });
            result.Morph(UnitTypes.OVERSEER, 2);
            result.If(() => { return(MeleeUpgrade + ArmorUpgrade + ResearchingUpgrades >= 4); });
            result.Building(UnitTypes.INFESTATION_PIT);
            return(result);
        }
Ejemplo n.º 28
0
        private BuildList BuildStargatesAgainstLifters()
        {
            BuildList result = new BuildList();

            result.If(() => Lifting.Get().Detected || Bot.Main.Frame >= 22.4 * 60 * 10 || CounterWorkerRush.Get().Detected);
            result.Building(UnitTypes.GATEWAY);
            result.Building(UnitTypes.ASSIMILATOR);
            result.Building(UnitTypes.CYBERNETICS_CORE);
            result.Train(UnitTypes.STALKER, 10, () => BuildStalkers);
            result.Building(UnitTypes.ASSIMILATOR, () => Count(UnitTypes.STALKER) > 0 || !BuildStalkers);
            result.Building(UnitTypes.STARGATE, 2, () => Count(UnitTypes.STALKER) > 0 || !BuildStalkers);

            return(result);
        }
Ejemplo n.º 29
0
        private BuildList ExpandBuildings()
        {
            BuildList result = new BuildList();

            result.If(() => { return(Minerals() >= 550 || OraclesDone || Count(UnitTypes.ORACLE) >= 6); });
            foreach (Base b in Bot.Main.BaseManager.Bases)
            {
                result.Building(UnitTypes.PYLON, b, () => b.ResourceCenter != null && b.ResourceCenter.Unit.BuildProgress >= 0.95);
                result.Building(UnitTypes.GATEWAY, b, 2, () => b.ResourceCenter != null && b.ResourceCenter.Unit.BuildProgress >= 0.95 && Completed(b, UnitTypes.PYLON) >= 1 && Minerals() >= 350);
                result.Building(UnitTypes.PYLON, b, () => b.ResourceCenter != null && b.ResourceCenter.Unit.BuildProgress >= 0.95 && Count(b, UnitTypes.GATEWAY) >= 2 && Minerals() >= 700);
            }

            return(result);
        }
Ejemplo n.º 30
0
        private BuildList RushDefense()
        {
            BuildList result = new BuildList();

            result.If(() => { return(SmellCheese); });
            result.Building(UnitTypes.SPAWNING_POOL);
            result.Building(UnitTypes.SPINE_CRAWLER, Main, MainDefensePos, 2);
            result.Building(UnitTypes.EXTRACTOR);
            result.If(() => { return(Count(UnitTypes.QUEEN) > 0); });
            result.Building(UnitTypes.ROACH_WARREN);
            result.If(() => { return(Count(UnitTypes.ROACH) >= 3); });
            result.Building(UnitTypes.EXTRACTOR);
            return(result);
        }