Ejemplo n.º 1
0
 def get_trees():
     gather_wood = Action.get_gather_wood_action()
     gather_food = Action.get_gather_food_action()
     hunt = Action.get_hunt_action()
     actions = [gather_wood, gather_food, hunt]
     wood = resource.Wood.create(count=2)
     wood2 = resource.Wood.create(count=10000)
     return Trees(name="Trees", type="Base", production=[wood],
                  resources_available=[wood2], actions=actions)
Ejemplo n.º 2
0
 def get_trees_dense():
     gather_wood = Action.get_gather_wood_action()
     hunt = Action.get_hunt_action()
     actions = [gather_wood, hunt]
     wood = resource.Wood.create(count=3)
     wood2 = resource.Wood.create(count=100000)
     return Trees(name="Dense Trees", type="Base", production=[wood],
                  resources_available=[wood2], actions=actions,
                  available_building_names=["Lumberyard"])
Ejemplo n.º 3
0
 def get_trees_sparse():
     gather_wood = Action.get_gather_wood_action()
     gather_food = Action.get_gather_food_action()
     actions = [gather_wood, gather_food]
     wood = resource.Wood.create(count=1)
     wood2 = resource.Wood.create(count=1000)
     food = resource.Food.create(count=2)
     food2 = resource.Food.create(count=20000)
     return Trees(name="Sparse Trees", type="Base", production=[wood, food],
                  resources_available=[wood2, food2], actions=actions)
Ejemplo n.º 4
0
 def build_lumberyard(self, tile, builder):
     wood = resource.Wood.create(count=10000)
     builder.remove_resource(wood)
     action = Action.get_gather_wood_action()
     worker_info = {
         'gather_wood': [builder.key]
     }
     producer = Producer(
         name="Lumberyard", cost=wood, worker_info=worker_info, tile=tile.key,
         actions=[action], daily_trigger_count=1440)
     producer.put()