10 #include "../modules/autobuild.h" 12 #include "../modules/builderhelper.h" 18 namespace buildorders {
19 std::shared_ptr<AutoBuildTask>
20 createTask(
UpcId srcUpcId, std::string name, State* state, Module* module);
29 bool canExpand =
false;
30 bool shouldExpand =
false;
31 bool forceExpand =
false;
32 bool preferSafeExpansions =
true;
34 int enemyWorkerCount = 0;
35 int enemyGasCount = 0;
36 int enemyZealotCount = 0;
37 int enemyDragoonCount = 0;
38 int enemyDarkTemplarCount = 0;
39 int enemyHighTemplarCount = 0;
40 int enemyArchonCount = 0;
41 int enemyReaverCount = 0;
42 int enemyVultureCount = 0;
43 int enemyGoliathCount = 0;
44 int enemyTankCount = 0;
45 int enemyMissileTurretCount = 0;
46 int enemyCorsairCount = 0;
47 int enemyScoutCount = 0;
48 int enemyObserverCount = 0;
49 int enemyWraithCount = 0;
50 int enemyValkyrieCount = 0;
51 int enemyBattlecruiserCount = 0;
52 int enemyStaticDefenceCount = 0;
53 int enemyBarracksCount = 0;
54 int enemyRefineryCount = 0;
55 int enemyAcademyCount = 0;
56 int enemyGatewayCount = 0;
57 int enemyCyberneticsCoreCount = 0;
58 int enemyStargateCount = 0;
59 int enemyForgeCount = 0;
60 int enemyZerglingCount = 0;
61 int enemyHydraliskCount = 0;
62 int enemyMutaliskCount = 0;
63 int enemyScourgeCount = 0;
64 int enemySunkenCount = 0;
65 int enemySporeCount = 0;
66 int enemyMarineCount = 0;
67 int enemyMedicCount = 0;
68 int enemyFirebatCount = 0;
69 int enemyFactoryCount = 0;
70 int enemyLairCount = 0;
71 int enemySpireCount = 0;
72 int enemyCloakedUnitCount = 0;
73 bool enemyHasExpanded =
false;
74 bool enemyIsRushing =
false;
75 int enemyBuildingCount = 0;
76 int enemyScienceVesselCount = 0;
77 int enemyArbiterCount = 0;
78 int enemyShuttleCount = 0;
79 int enemyResourceDepots = 0;
80 int enemyGasUnits = 0;
81 int enemyTemplarArchivesCount = 0;
83 int myCompletedHatchCount = 0;
85 int mySunkenCount = 0;
88 int myZerglingCount = 0;
89 int myHydraliskCount = 0;
90 int myMutaliskCount = 0;
91 int myScourgeCount = 0;
92 int myLurkerCount = 0;
93 int myGuardianCount = 0;
94 int myUltraliskCount = 0;
95 int myDefilerCount = 0;
97 int mineralFields = 0;
104 bool hasFoundEnemyBase =
false;
106 bool weArePlanningExpansion =
false;
107 int currentFrame = 0;
111 bool isLosingAnOverlord =
false;
113 Position lastFindNaturalDefencePosEnemyPos{-1, -1};
115 std::vector<uint8_t> inBaseArea =
119 double armySupply = 0.0;
120 double groundArmySupply = 0.0;
121 double airArmySupply = 0.0;
123 double enemySupplyInOurBase = 0.0;
124 double enemyArmySupplyInOurBase = 0.0;
125 double enemyArmySupply = 0.0;
126 double enemyGroundArmySupply = 0.0;
127 double enemyAirArmySupply = 0.0;
128 double enemyAntiAirArmySupply = 0.0;
129 double enemyAttackingArmySupply = 0.0;
130 double enemyAttackingGroundArmySupply = 0.0;
131 double enemyAttackingAirArmySupply = 0.0;
132 int enemyAttackingWorkerCount = 0;
133 double enemyLargeArmySupply = 0.0;
134 double enemySmallArmySupply = 0.0;
135 double enemyBiologicalArmySupply = 0.0;
136 double enemyProximity = 0.0;
138 int enemyProxyBuildingCount = 0;
139 int enemyProxyGatewayCount = 0;
140 int enemyProxyBarracksCount = 0;
141 int enemyProxyForgeCount = 0;
142 int enemyProxyCannonCount = 0;
144 bool enemyForgeIsSpinning =
false;
146 tc::BW::Race enemyRace = tc::BW::Race::Unknown;
148 bool autoExpand =
true;
149 bool autoUpgrade =
true;
150 bool expandNearest =
false;
151 bool buildExtraOverlordsIfLosingThem =
true;
153 void findNaturalDefencePos(
State*);
158 void buildZergStaticDefense(
166 virtual void draw(
State* state)
override;
173 bool morphFirst =
false);
178 bool morphFirst =
false);
191 bool coverMineralsOnly =
false);
195 bool mainBaseOnly =
false,
196 bool coverMineralsOnly =
false);
Game state.
Definition: state.h:42
int FrameNum
Definition: basetypes.h:22
Position enemyBasePos
Definition: base.h:103
Position mainNaturalChoke
Definition: base.h:102
Represents and holds information about buildable types (units, upgrades, techs).
Definition: buildtype.h:36
virtual void buildStep2(autobuild::BuildState &)
Definition: base.h:202
Position naturalPos
Definition: base.h:100
Describes a state of the game, either now or in a hypothetical future, for use in AutoBuilds...
Definition: autobuild.h:54
Position nextBase
Definition: base.h:28
static const unsigned tilesWidth
Definition: tilesinfo.h:98
static const unsigned tilesHeight
Definition: tilesinfo.h:99
virtual void preBuild2(autobuild::BuildState &st)
Definition: base.h:198
virtual void postBuild2(autobuild::BuildState &st)
Definition: base.h:200
Position nextStaticDefencePos
Definition: base.h:105
Position naturalDefencePos
Definition: base.h:101
std::shared_ptr< AutoBuildTask > createTask(UpcId srcUpcId, std::string name, State *state, Module *module)
Definition: base.cpp:21
AutoBuildTasks are "build orders" in the colloquial sense.
Definition: autobuild.h:107
Main namespace for bot-related code.
Definition: areainfo.cpp:17
int UpcId
Definition: basetypes.h:23
Position homePosition
Definition: base.h:99
Interface for bot modules.
Definition: module.h:30
ABBOBase(UpcId upcId, State *state, Module *module)
Definition: base.h:25