Esempio 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)
Esempio 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"])
Esempio 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)
Esempio n. 4
0
 def get_plains():
     gather_rocks = Action.get_gather_rocks_action()
     actions = [gather_rocks]
     rocks = resource.Rock.create(count=2)
     rocks2 = resource.Rock.create(count=10000)
     return Plains(name="Plains", type="Base", production=[rocks],
                   resources_available=[rocks2], actions=actions)
Esempio n. 5
0
 def get_river():
     gather_water = Action.get_gather_water_action()
     actions = [gather_water]
     water = resource.Water.create(count=1)
     water2 = resource.Water.create(count=100000000000000000000)
     return River(name="River", type="Base", production=[water],
                  resources_available=[water2], actions=actions)
Esempio n. 6
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()