Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my_strategy = Namespace()
- def init():
- oa.enable_rule(train_villager_darkage, interval=0.5)
- oa.enable_rule(on_feudal, trigger=oa.techresearched("feudal"))
- def train_villager_darkage():
- if oa.food > 100 and oa.villagercount < 30 and oa.idle_towncenters >= 1:
- oa.train_villager()
- def on_feudal():
- oa.disable_rule(train_villager_darkage)
- oa.enable_rule(train_villager_feudal)
- if random(2) == 0:
- my_strategy.fastcastle = True
- else:
- my_strategy.fastcastle = False
- def train_villager_feudal():
- if my_strategy.fastcastle:
- return
- if oa.food > 100 and oa.villagercount < 60 and oa.idle_towncenters >= 1:
- oa.train_villager()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement