Skip to content

Commit a8ceab2

Browse files
author
Reynald Pader
committed
Fix enum names changed from new ID generation script
1 parent 9c60adc commit a8ceab2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/zerg_rush_build_order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ async def on_step(self, iteration):
4343
if self.vespene >= 100:
4444
sp = self.units(UnitTypeId.SPAWNINGPOOL).ready
4545
if sp.exists and self.minerals >= 100 and not self.mboost_started:
46-
await self.do(sp.first(AbilityId.ZERGLINGMOVEMENTSPEED))
46+
await self.do(sp.first(AbilityId.RESEARCH_ZERGLINGMETABOLICBOOST))
4747
self.mboost_started = True
4848

4949
await self.build_order.execute_build()
5050

5151
for queen in self.units(UnitTypeId.QUEEN).idle:
5252
if queen.energy >= 25: # Hard coded, since this is not (yet) available
5353
hatchery = self.townhalls.closest_to(queen.position.to2)
54-
await self.do(queen(AbilityId.INJECTLARVA, hatchery))
54+
await self.do(queen(AbilityId.EFFECT_INJECTLARVA, hatchery))
5555

5656
if (self.units(UnitTypeId.ROACH).amount >= 7 and self.units(UnitTypeId.ZERGLING).amount >= 10) or self.attack:
5757
self.attack = True

sc2/bot_ai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ async def distribute_workers(self):
148148
for x in range(0, deficit):
149149
if worker_pool:
150150
w = worker_pool.pop()
151-
if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVESTRETURN]:
151+
if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVEST_RETURN]:
152152
await self.do(w.move(g))
153153
await self.do(w.return_resource(queue=True))
154154
else:
@@ -163,7 +163,7 @@ async def distribute_workers(self):
163163
if worker_pool:
164164
w = worker_pool.pop()
165165
mf = self.state.mineral_field.closest_to(townhall)
166-
if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVESTRETURN]:
166+
if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVEST_RETURN]:
167167
await self.do(w.move(townhall))
168168
await self.do(w.return_resource(queue=True))
169169
await self.do(w.gather(mf, queue=True))

sc2/unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def gather(self, *args, **kwargs):
197197
return self(AbilityId.HARVEST_GATHER, *args, **kwargs)
198198

199199
def return_resource(self, *args, **kwargs):
200-
return self(AbilityId.HARVESTRETURN, *args, **kwargs)
200+
return self(AbilityId.HARVEST_RETURN, *args, **kwargs)
201201

202202
def move(self, *args, **kwargs):
203203
return self(AbilityId.MOVE, *args, **kwargs)

0 commit comments

Comments
 (0)