comparison gamelib/gamestate.py @ 33:12c33aac7684

Gate certain missions by reputation.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 06 May 2012 21:27:33 +0200
parents 4d9610c59efa
children e285b1e31a08
comparison
equal deleted inserted replaced
32:00aff02bc6fc 33:12c33aac7684
35 35
36 def get_available_equipment(self): 36 def get_available_equipment(self):
37 """Return a list of equipment we can produce and afford""" 37 """Return a list of equipment we can produce and afford"""
38 available = [x for x in self.lab.science 38 available = [x for x in self.lab.science
39 if isinstance(x, products.Product) and x.COST <= self.money] 39 if isinstance(x, products.Product) and x.COST <= self.money]
40 return available
41
42 def get_available_missions(self):
43 """Return a list of missions we can feasibly attempt"""
44 available = [x for x in self.missions
45 if (x.MINIMUM_REPUTATION is None
46 or x.MINIMUM_REPUTATION <= self.reputation)]
40 return available 47 return available
41 48
42 def end_turn(self): 49 def end_turn(self):
43 # Attempt the missions 50 # Attempt the missions
44 mission_results = [] 51 mission_results = []