# HG changeset patch # User Neil Muller # Date 1336863018 -7200 # Node ID 594c45f0f685ff2aa1b54400954827cc8165e0fb # Parent 235b1faf590e126e50e853865768c63fe6cc40c6 Don't reward science or schematics when we know everything diff -r 235b1faf590e -r 594c45f0f685 gamelib/missions.py --- 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,