Mercurial > sypikslang
diff gamelib/missions.py @ 247:594c45f0f685
Don't reward science or schematics when we know everything
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 13 May 2012 00:50:18 +0200 |
parents | f5d9a063013b |
children | 7a6396ea2cc6 |
line wrap: on
line diff
--- a/gamelib/missions.py Sun May 13 00:44:31 2012 +0200 +++ b/gamelib/missions.py Sun May 13 00:50:18 2012 +0200 @@ -639,9 +639,14 @@ " in the future.") def _succ(self, msg, state): - reward = choice(('schematic', 'science', - 'money', 'money', 'money', 'money', 'money', - 'nothing', 'nothing', 'nothing')) + possible_rewards = ['schematic', 'science'] + possible_rewards.extend(['money'] * 5) + possible_rewards.extend(['nothing'] * 3) + if not state.lab.new_research: + possible_rewards.remove('science') + if not state.lab.new_schematics: + possible_rewards.remove('schematic') + reward = choice(possible_rewards) if reward == 'nothing': self.succeed("%s Unfortunately, not only are these people working" " on ideas you've already covered, they're flat broke." % msg,