private BuildList Units() { BuildList result = new BuildList(); result.Morph(UnitTypes.ZERGLING, 14, () => Completed(UnitTypes.SPIRE) == 0 && !TimingAttackTask.Task.AttackSent); result.Morph(UnitTypes.MUTALISK, 8, () => Count(UnitTypes.DRONE) >= 20); result.Morph(UnitTypes.MUTALISK, 4, () => Count(UnitTypes.DRONE) >= 20 && Count(UnitTypes.HYDRALISK_DEN) > 0); result.Morph(UnitTypes.OVERSEER, 2, () => Count(UnitTypes.HYDRALISK) > 0); result.Morph(UnitTypes.HYDRALISK, 100, () => Count(UnitTypes.DRONE) >= 20); return(result); }
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); }
private BuildList RushDefenses() { BuildList result = new BuildList(); result.If(() => BuildDefenses()); 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); }
private BuildList Zerglings() { BuildList result = new BuildList(); result.If(() => !GoingUltras); result.If(() => Count(UnitTypes.DRONE) >= 55 && Count(UnitTypes.HATCHERY) >= 4 && Count(UnitTypes.EVOLUTION_CHAMBER) >= 2); result.Morph(UnitTypes.ZERGLING, 130); result.If(() => !Tyr.Bot.Observation.Observation.RawData.Player.UpgradeIds.Contains(UpgradeType.AdrenalGlands)); result.Morph(UnitTypes.ZERGLING, 30); return(result); }
private BuildList MainBuild() { BuildList result = new BuildList(); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON, Natural, WallIn.Wall[4].Pos, true); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[0].Pos, true, () => Completed(UnitTypes.PYLON) > 0); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[3].Pos, true, () => Completed(UnitTypes.PYLON) > 0 && Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[1].Pos, true, () => Completed(UnitTypes.PYLON) > 0 && Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool); result.Building(UnitTypes.NEXUS, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool || Completed(UnitTypes.ADEPT) + Completed(UnitTypes.ZEALOT) + Completed(UnitTypes.STALKER) >= 8); result.Building(UnitTypes.CYBERNETICS_CORE, Natural, WallIn.Wall[1].Pos, true, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool); result.Building(UnitTypes.CYBERNETICS_CORE, () => Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool && Count(UnitTypes.ZEALOT) >= 6); result.Building(UnitTypes.ASSIMILATOR, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool || Count(UnitTypes.ZEALOT) >= 6); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[3].Pos, true, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool); if (ShieldBatteryPos == null) { result.Building(UnitTypes.SHIELD_BATTERY, Natural, NaturalDefensePos); } else { result.Building(UnitTypes.SHIELD_BATTERY, Natural, ShieldBatteryPos, true); } result.Building(UnitTypes.ASSIMILATOR, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool || Count(UnitTypes.ZEALOT) >= 6); result.Building(UnitTypes.ROBOTICS_FACILITY, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool || Completed(UnitTypes.ADEPT) + Completed(UnitTypes.STALKER) >= 8); result.Upgrade(UpgradeType.WarpGate); result.Building(UnitTypes.ASSIMILATOR, () => !Tyr.Bot.EnemyStrategyAnalyzer.EarlyPool || Count(UnitTypes.ZEALOT) >= 6); result.Building(UnitTypes.PYLON, Natural, () => Count(UnitTypes.CYBERNETICS_CORE) > 0 && Natural.ResourceCenter != null); result.Building(UnitTypes.ROBOTICS_BAY, () => TotalEnemyCount(UnitTypes.ZERGLING) >= 40 && TotalEnemyCount(UnitTypes.MUTALISK) + TotalEnemyCount(UnitTypes.CORRUPTOR) == 0); result.If(() => Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.COLOSUS) > 0 && Completed(UnitTypes.STALKER) >= 6); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.TWILIGHT_COUNSEL); result.Building(UnitTypes.FORGE); result.Upgrade(UpgradeType.ProtossGroundWeapons); result.Building(UnitTypes.FORGE); result.Upgrade(UpgradeType.ProtossGroundArmor); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ROBOTICS_FACILITY); result.Building(UnitTypes.ASSIMILATOR, 4, () => Minerals() >= 700 && Gas() < 200); result.If(() => Count(UnitTypes.IMMORTAL) + Count(UnitTypes.COLOSUS) >= 3 && Count(UnitTypes.STALKER) >= 10); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Count(UnitTypes.STALKER) + Count(UnitTypes.IMMORTAL) + Count(UnitTypes.COLOSUS) + Count(UnitTypes.ADEPT) >= 15); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Completed(UnitTypes.STALKER) + Completed(UnitTypes.COLOSUS) + Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.DISRUPTOR) + Completed(UnitTypes.TEMPEST) + Count(UnitTypes.ADEPT) >= 40 || Minerals() >= 650); result.Building(UnitTypes.NEXUS); return(result); }
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); }
public static BuildList Overlords() { BuildList result = new BuildList(); result.If(() => { return(Tyr.Bot.UnitManager.Count(UnitTypes.SPAWNING_POOL) > 0 && Build.FoodUsed() >= Build.ExpectedAvailableFood() - 2 * Tyr.Bot.UnitManager.Completed(UnitTypes.HATCHERY) - 16 * Tyr.Bot.UnitManager.Completed(UnitTypes.ULTRALISK_CAVERN) - (Tyr.Bot.UnitManager.Count(UnitTypes.HATCHERY) >= 4 && Tyr.Bot.UnitManager.Count(UnitTypes.DRONE) >= 40 ? 8 : 0)); }); result.Morph(UnitTypes.OVERLORD, 25); return(result); }
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); }
public IEnumerable <Build> GetAllBuildsForApp(string appId) { var xml = _wrapper.GetBuildList(appId); BuildList response = XmlParseHelper.Parse <BuildList>(xml); if (string.IsNullOrWhiteSpace(xml)) { return(new Build[0]); } return(response.Builds); }
private BuildList MainBuild() { BuildList result = new BuildList(); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON, Main); result.Building(UnitTypes.GATEWAY, Main, () => Completed(UnitTypes.PYLON) > 0); result.Building(UnitTypes.ASSIMILATOR, () => !Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected || Count(UnitTypes.ZEALOT) >= 2); result.Building(UnitTypes.PYLON, Main, WallIn.Wall[1].Pos, true); result.Building(UnitTypes.GATEWAY, Main, WallIn.Wall[0].Pos, true, () => Completed(UnitTypes.PYLON) >= 2); result.Building(UnitTypes.CYBERNETICS_CORE, () => !Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected || Count(UnitTypes.ZEALOT) >= 2); result.Building(UnitTypes.ASSIMILATOR); result.Building(UnitTypes.ROBOTICS_FACILITY); result.Building(UnitTypes.ROBOTICS_FACILITY, () => (FourGateDetected && Tyr.Bot.Frame >= 22.4 * 60 * 4) || DoubleRoboAllIn); result.Upgrade(UpgradeType.WarpGate); result.If(() => (!FourGateDetected && !DoubleRoboAllIn) || Completed(UnitTypes.IMMORTAL) >= 3); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON, Natural, NaturalDefensePos); result.Building(UnitTypes.FORGE, () => EarlyForge); result.Upgrade(UpgradeType.ProtossGroundWeapons, () => EarlyForge); result.Building(UnitTypes.PHOTON_CANNON, () => EarlyForge); result.Building(UnitTypes.ROBOTICS_FACILITY, () => SecondRobo && !FourGateDetected); result.Building(UnitTypes.ROBOTICS_FACILITY, () => !SecondRobo && !FourGateDetected && Tyr.Bot.Frame >= 22.4 * 60 * 6 && TotalEnemyCount(UnitTypes.STARGATE) + TotalEnemyCount(UnitTypes.VOID_RAY) + TotalEnemyCount(UnitTypes.ORACLE) == 0); result.Building(UnitTypes.ASSIMILATOR, () => SecondRobo); result.Building(UnitTypes.SHIELD_BATTERY, Natural, NaturalDefensePos, 2, () => Completed(Natural, UnitTypes.PYLON) > 0); result.If(() => Completed(UnitTypes.IMMORTAL) > 0 && Completed(UnitTypes.STALKER) >= 20); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ASSIMILATOR); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.TWILIGHT_COUNSEL); result.Building(UnitTypes.FORGE, () => !EarlyForge); result.Upgrade(UpgradeType.ProtossGroundWeapons); result.Building(UnitTypes.FORGE); result.Upgrade(UpgradeType.ProtossGroundArmor); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ROBOTICS_FACILITY, () => TotalEnemyCount(UnitTypes.CARRIER) + TotalEnemyCount(UnitTypes.TEMPEST) == 0); result.Building(UnitTypes.ASSIMILATOR, 4, () => Minerals() >= 700 && Gas() < 200); result.If(() => Count(UnitTypes.IMMORTAL) >= 3 && Count(UnitTypes.STALKER) >= 10); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Count(UnitTypes.STALKER) + Count(UnitTypes.IMMORTAL) + Count(UnitTypes.ADEPT) >= 15); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Completed(UnitTypes.STALKER) + Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.DISRUPTOR) + Completed(UnitTypes.TEMPEST) + Count(UnitTypes.ADEPT) >= 40 || Minerals() >= 650); result.Building(UnitTypes.NEXUS); return(result); }
public async Task <string> Save([FromBody] BuildList bl) { var uid = _ua.AuthenticateUser(this); if (uid == null) { HttpContext.Response.StatusCode = 401; return("log in first"); } if (bl == null) { HttpContext.Response.StatusCode = 400; return("invalid build list"); } var ldata = await this._data.GetKeyAsync(ListNamespace + bl.Id); if (ldata == null) { HttpContext.Response.StatusCode = 404; return("not found"); } var actualList = JsonConvert.DeserializeObject <BuildList>(ldata.Value); if (actualList.Creator != uid.UserId) { HttpContext.Response.StatusCode = 403; return("must be owner to edit list"); } // do not accept updates from these fields bl.Creator = actualList.Creator; bl.Created = actualList.Created; if (bl.Builds == null) { bl.Builds = new List <string>(); } ldata.Value = JsonConvert.SerializeObject(bl); if (await ldata.UpdateAsync()) { return("success"); } else { HttpContext.Response.StatusCode = 500; return("error updating"); } }
private BuildList MainBuild() { BuildList result = new BuildList(); result.Building(UnitTypes.NEXUS); result.If(() => Count(UnitTypes.PROBE) >= 13); if (WallIn.Wall.Count >= 5) { result.Building(UnitTypes.PYLON, Natural, WallIn.Wall[4].Pos, true); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[0].Pos, true, () => Completed(UnitTypes.PYLON) > 0 && Count(UnitTypes.PROBE) >= 16); result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[3].Pos, true, () => Completed(UnitTypes.PYLON) > 0 && EarlyPool.Get().Detected); //result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[1].Pos, true, () => Completed(UnitTypes.PYLON) > 0 && EarlyPool.Get().Detected); } else { result.Building(UnitTypes.PYLON); result.Building(UnitTypes.GATEWAY, () => Completed(UnitTypes.PYLON) > 0 && Count(UnitTypes.PROBE) >= 16); result.Building(UnitTypes.GATEWAY, () => Completed(UnitTypes.PYLON) > 0 && EarlyPool.Get().Detected); } result.If(() => Count(UnitTypes.GATEWAY) > 0); result.Building(UnitTypes.ASSIMILATOR); result.Building(UnitTypes.NEXUS, () => (!EarlyPool.Get().Detected || Completed(UnitTypes.ADEPT) + Completed(UnitTypes.ZEALOT) >= 3) && Count(UnitTypes.PROBE) >= 19); result.If(() => Count(UnitTypes.NEXUS) >= 2); if (WallIn.Wall.Count >= 5) { result.Building(UnitTypes.CYBERNETICS_CORE, Natural, WallIn.Wall[1].Pos, true); } else { result.Building(UnitTypes.CYBERNETICS_CORE); } result.Building(UnitTypes.ASSIMILATOR); result.Building(UnitTypes.PYLON); result.If(() => Count(UnitTypes.STALKER) > 0); result.Upgrade(UpgradeType.WarpGate); result.Building(UnitTypes.TWILIGHT_COUNSEL); result.Building(UnitTypes.ROBOTICS_FACILITY); if (WallIn.Wall.Count >= 5) { result.Building(UnitTypes.GATEWAY, Natural, WallIn.Wall[3].Pos, true, () => !EarlyPool.Get().Detected); } else { result.Building(UnitTypes.GATEWAY, () => !EarlyPool.Get().Detected); } result.Building(UnitTypes.GATEWAY, Main, 2); result.Building(UnitTypes.GATEWAY, Main, 2, () => Count(UnitTypes.WARP_PRISM) > 0); result.Building(UnitTypes.PYLON, () => Count(UnitTypes.GATEWAY) >= 4); result.Building(UnitTypes.PYLON, () => Count(UnitTypes.GATEWAY) >= 5 && Count(UnitTypes.ADEPT) >= 3); return(result); }
private BuildList DefendWorkerRush() { BuildList result = new BuildList(); result.If(() => { return(StrategyAnalysis.WorkerRush.Get().Detected); }); result.Morph(UnitTypes.DRONE, 2); result.Building(UnitTypes.SPAWNING_POOL); result.Morph(UnitTypes.ZERGLING, 10); return(result); }
private BuildList BuildStargatesAgainstLifters() { BuildList result = new BuildList(); result.If(() => { return(Lifting.Get().Detected); }); result += new BuildingStep(UnitTypes.GATEWAY); result += new BuildingStep(UnitTypes.ASSIMILATOR); result += new BuildingStep(UnitTypes.CYBERNETICS_CORE); result += new BuildingStep(UnitTypes.ASSIMILATOR); result += new BuildingStep(UnitTypes.STARGATE, 2); return(result); }
public FileTemplate(FileTemplate source) : base(source) { _files = source._files; _version = source._version; _isLoaded = source._isLoaded; _sourceFile = source._sourceFile; _authoring = source._authoring; _assistant = source._assistant; _properties = source._properties; _description = source._description; _configuration = source._configuration; }
private BuildList Units() { BuildList result = new BuildList(); result.Train(UnitTypes.PROBE, 20); result.Train(UnitTypes.PROBE, 40, () => Count(UnitTypes.NEXUS) >= 2); result.Train(UnitTypes.IMMORTAL); result.Train(UnitTypes.STALKER, 1); result.Upgrade(UpgradeType.WarpGate); result.Train(UnitTypes.STALKER); return(result); }
private BuildList BuildStargatesAgainstLifters() { BuildList result = new BuildList(); result.If(() => { return(Tyr.Bot.EnemyStrategyAnalyzer.LiftingDetected); }); result += new BuildingStep(UnitTypes.GATEWAY); result += new BuildingStep(UnitTypes.ASSIMILATOR); result += new BuildingStep(UnitTypes.CYBERNETICS_CORE); result += new BuildingStep(UnitTypes.ASSIMILATOR); result += new BuildingStep(UnitTypes.STARGATE, 2); return(result); }
private BuildList WorkerRushDefense() { BuildList result = new BuildList(); result.If(() => Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected); result.Morph(UnitTypes.OVERLORD, 2, () => ExpectedAvailableFood() <= FoodUsed() - 2 || Minerals() >= 500); result.Morph(UnitTypes.DRONE, 8); result.Building(UnitTypes.SPAWNING_POOL); result.Morph(UnitTypes.ZERGLING, 4); result.Morph(UnitTypes.ZERGLING, 10); result.Morph(UnitTypes.OVERLORD); return(result); }
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); }
private BuildList BuildPylonForPower() { BuildList result = new BuildList(); result.If(() => { return(Lifting.Get().Detected); }); result.If(() => { return(Minerals() >= 300 && Count(UnitTypes.STARGATE) < 2 && Completed(UnitTypes.CYBERNETICS_CORE) > 0 && Count(UnitTypes.PYLON) == Completed(UnitTypes.PYLON)); }); result += new BuildingStep(UnitTypes.PYLON, 5); return(result); }
public DependencyContent() : base(new BuildKeyedList <DependencyItem>()) { BuildKeyedList <DependencyItem> keyedList = this.List as BuildKeyedList <DependencyItem>; if (keyedList != null) { _dicItems = keyedList.Dictionary; } _paths = new BuildList <BuildDirectoryPath>(); }
private BuildList Units() { BuildList result = new BuildList(); result.Train(UnitTypes.PROBE, 21); if (DefendingStalker) { result.Train(UnitTypes.STALKER, 1, () => Count(UnitTypes.STARGATE) > 0); } result.Train(UnitTypes.TEMPEST); return(result); }
private BuildList MainBuild() { BuildList result = new BuildList(); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON, Main); result.Building(UnitTypes.GATEWAY, Main, () => Completed(UnitTypes.PYLON) > 0); result.Building(UnitTypes.ASSIMILATOR, () => !Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected || Count(UnitTypes.ZEALOT) >= 2); result.Building(UnitTypes.PYLON, Main, WallIn.Wall[1].Pos, true); result.Building(UnitTypes.GATEWAY, Main, WallIn.Wall[0].Pos, true, () => Completed(UnitTypes.PYLON) >= 2); result.Building(UnitTypes.CYBERNETICS_CORE, () => !Tyr.Bot.EnemyStrategyAnalyzer.WorkerRushDetected || Count(UnitTypes.ZEALOT) >= 2); result.Building(UnitTypes.GATEWAY, Main, WallIn.Wall[2].Pos, true, () => ZealotRushSuspected && Count(UnitTypes.STALKER) >= 2 && Completed(UnitTypes.STALKER) <= 8); result.If(() => !ZealotRushSuspected || Count(UnitTypes.STALKER) >= 6); result.Building(UnitTypes.NEXUS, () => EarlyNexus); result.Building(UnitTypes.ROBOTICS_FACILITY, () => (!ZealotRushSuspected || Count(UnitTypes.STALKER) + Count(UnitTypes.ZEALOT) >= 12)); result.Building(UnitTypes.ASSIMILATOR); result.Upgrade(UpgradeType.WarpGate, () => !ZealotRushSuspected || Count(UnitTypes.STALKER) + Count(UnitTypes.ZEALOT) >= 12); result.If(() => !CannonDefenseDetected || Count(UnitTypes.WARP_PRISM) > 0); result.If(() => !ZealotRushSuspected || Count(UnitTypes.STALKER) + Count(UnitTypes.IMMORTAL) >= 14); result.Building(UnitTypes.NEXUS, () => !EarlyNexus); result.Building(UnitTypes.FORGE, () => EarlyForge); result.Upgrade(UpgradeType.ProtossGroundWeapons, () => EarlyForge); result.Building(UnitTypes.PHOTON_CANNON, () => EarlyForge); result.Building(UnitTypes.ASSIMILATOR, () => !ZealotRushSuspected || Count(UnitTypes.STALKER) + Count(UnitTypes.ZEALOT) >= 12); result.Building(UnitTypes.PYLON, Natural, () => Count(UnitTypes.CYBERNETICS_CORE) > 0 && !CannonDefenseDetected); result.Building(UnitTypes.ASSIMILATOR, () => CannonDefenseDetected && StargateDetected); result.If(() => (Completed(UnitTypes.IMMORTAL) > 0 || StargateDetected) && Completed(UnitTypes.STALKER) >= 6); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.TWILIGHT_COUNSEL); result.Building(UnitTypes.FORGE, () => !EarlyForge); result.Upgrade(UpgradeType.ProtossGroundWeapons, () => !CannonDefenseDetected); result.Building(UnitTypes.FORGE); result.Upgrade(UpgradeType.ProtossGroundArmor); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.PYLON); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ROBOTICS_FACILITY, () => TotalEnemyCount(UnitTypes.CARRIER) + TotalEnemyCount(UnitTypes.TEMPEST) == 0); result.Building(UnitTypes.ASSIMILATOR, 4, () => Minerals() >= 700 && Gas() < 200); result.If(() => (Count(UnitTypes.IMMORTAL) >= 3 || StargateDetected) && Count(UnitTypes.STALKER) >= 10); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Count(UnitTypes.STALKER) + Count(UnitTypes.IMMORTAL) + Count(UnitTypes.ADEPT) >= 15); result.Building(UnitTypes.ASSIMILATOR, 2); result.Building(UnitTypes.NEXUS); result.Building(UnitTypes.ASSIMILATOR, 2); result.If(() => Completed(UnitTypes.STALKER) + Completed(UnitTypes.IMMORTAL) + Completed(UnitTypes.DISRUPTOR) + Completed(UnitTypes.TEMPEST) + Count(UnitTypes.ADEPT) >= 40 || Minerals() >= 650); result.Building(UnitTypes.NEXUS); return(result); }
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); }
private BuildList Units() { BuildList result = new BuildList(); result.Train(UnitTypes.PHOENIX, 20); result.If(() => Count(UnitTypes.NEXUS) >= 2 && Count(UnitTypes.STARGATE) >= 1); result.Train(UnitTypes.ZEALOT, 1); result.If(() => Count(UnitTypes.PHOENIX) >= 3); result.Train(UnitTypes.ZEALOT, 2); result.Train(UnitTypes.STALKER, () => Gas() >= 150 && Minerals() >= 250); result.Train(UnitTypes.ZEALOT, () => Minerals() >= 200); return(result); }
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); }
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); }
private BuildList Units() { BuildList result = new BuildList(); result.Train(UnitTypes.PROBE, 20); result.Train(UnitTypes.PROBE, 40, () => Count(UnitTypes.NEXUS) >= 2); result.Train(UnitTypes.OBSERVER, 1, () => Count(UnitTypes.IMMORTAL) >= 4); result.Train(UnitTypes.IMMORTAL); result.Train(UnitTypes.STALKER, 1); result.Upgrade(UpgradeType.WarpGate, () => Count(UnitTypes.IMMORTAL) >= 4); result.Train(UnitTypes.STALKER, () => (Count(UnitTypes.STALKER) < 3 || Gas() >= 125)); return(result); }
private BuildList Units() { BuildList result = new BuildList(); result.Train(UnitTypes.PROBE, 20); result.Train(UnitTypes.ZEALOT, 1, () => Completed(UnitTypes.CYBERNETICS_CORE) == 0); result.Train(UnitTypes.SENTRY, 1); result.Train(UnitTypes.ZEALOT, 8, () => TotalEnemyCount(UnitTypes.ZERGLING) >= 15); result.Train(UnitTypes.STALKER, 2); result.Upgrade(UpgradeType.WarpGate); result.Train(UnitTypes.STALKER); return(result); }
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); }
public static void Main(string[] args) { int[] i = { 1, 2, 3, 4, 55, 4, 3, 2, 3 }; BuildList<int> list = new BuildList<int>(i); List<int> iList = list.List; foreach(int num in iList) { Console.WriteLine(num); } Console.Read(); }
private void SaveSettings(BuildList storedBuilds) { Settings.Default.Domain = TextBoxDomain.Text; Settings.Default.Port = string.IsNullOrEmpty(TextBoxPort.Text) ? 80 : Convert.ToInt32(TextBoxPort.Text); Settings.Default.UserName = TextBoxUserName.Text; Settings.Default.Password = SecureData.Encrypt(PasswordBoxPassword.Password); Settings.Default.RefreshInterval = Convert.ToInt32(ComboBoxRefreshInterval.Text); Settings.Default.UseSsl = Convert.ToBoolean(RadioButtonProtocolHttps.IsChecked); Settings.Default.Builds = storedBuilds; Settings.Default.HideInactive = Convert.ToBoolean(CheckBoxHideInactive.IsChecked); Settings.Default.HideInactiveWeeks = Convert.ToInt32(ComboBoxHideInactive.Text); Settings.Default.ClientType = (ClientType)Enum.Parse(typeof(ClientType), ComboBoxCIType.Text); Settings.Default.NumberOfColumns = Convert.ToInt32(ComboBoxColumnsNumber.Text); Settings.Default.Save(); }
private void ButtonOkay_Click(object sender, RoutedEventArgs e) { if (_backgroundWorker.IsBusy) _backgroundWorker.CancelAsync(); BuildList storedBuilds = new BuildList(); foreach (object item in ListBoxBuilds.Items.Cast<object>().Where(item => ((CheckBox)item).IsChecked == true)) { storedBuilds.Add(((CheckBox)item).Tag as Build); } SaveSettings(storedBuilds); Close(); }