Mercurial > sypikslang
comparison gamelib/gamestate.py @ 135:8d1cf98e39b5
Reputation decays over time
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 10 May 2012 17:07:06 +0200 |
parents | 31ab0af26bb5 |
children | fb8037bc22f1 |
comparison
equal
deleted
inserted
replaced
134:208a79a49c26 | 135:8d1cf98e39b5 |
---|---|
64 def end_turn(self): | 64 def end_turn(self): |
65 # Attempt the missions | 65 # Attempt the missions |
66 mission_results = [] | 66 mission_results = [] |
67 for mission, equipment in self.cur_missions: | 67 for mission, equipment in self.cur_missions: |
68 mission_results.append(mission.attempt(equipment, self)) | 68 mission_results.append(mission.attempt(equipment, self)) |
69 if not self.cur_missions and self.reputation > 0: | |
70 # If you're not doing stuff, you're not in the news | |
71 self.reputation -= M_VALS[self.milestone] | |
69 # Do the science | 72 # Do the science |
70 self.points -= len(self.cur_allocation) | 73 self.points -= len(self.cur_allocation) |
71 if self.points < 0: | 74 if self.points < 0: |
72 raise RuntimeError('Spent too many points') | 75 raise RuntimeError('Spent too many points') |
73 new_stuff = self.lab.spend_points(self.cur_allocation, self.points) | 76 new_stuff = self.lab.spend_points(self.cur_allocation, self.points) |