comparison gamelib/missions.py @ 94:245ef50de84d

Sanity-check research, schematic and mission classes. (Ironic, no?)
author Jeremy Thurgood <firxen@gmail.com>
date Wed, 09 May 2012 21:22:10 +0200
parents 56b0a1c4de35
children 0f437e0584f7
comparison
equal deleted inserted replaced
93:f0bf77787d1e 94:245ef50de84d
57 # Note: this does not deep-copy. 57 # Note: this does not deep-copy.
58 return self.data.copy() 58 return self.data.copy()
59 59
60 def get_data(self, key): 60 def get_data(self, key):
61 return self.data.get(key, None) 61 return self.data.get(key, None)
62
63 @classmethod
64 def sanity_check(cls):
65 pass
62 66
63 def can_attempt(self, state): 67 def can_attempt(self, state):
64 """Can we currently attempt the mission""" 68 """Can we currently attempt the mission"""
65 if self.get_data('completed'): 69 if self.get_data('completed'):
66 return False 70 return False
290 return Result(SUCCESS, 0, rep, self.SUCCESS_MESSAGE % (result,)) 294 return Result(SUCCESS, 0, rep, self.SUCCESS_MESSAGE % (result,))
291 295
292 def attempt_with(self, categorised, state): 296 def attempt_with(self, categorised, state):
293 rep = randint(5, 10) 297 rep = randint(5, 10)
294 298
295 print categorised
296 if cat.MIND_CONTROL in categorised: 299 if cat.MIND_CONTROL in categorised:
297 result = ( 300 result = (
298 "Your creative use of science has paid off nicely.") 301 "Your creative use of science has paid off nicely.")
299 return Result(SUCCESS, 0, rep, self.SUCCESS_MESSAGE % (result,)) 302 return Result(SUCCESS, 0, rep, self.SUCCESS_MESSAGE % (result,))
300 else: 303 else: