# HG changeset patch # User Neil Muller # Date 1336818519 -7200 # Node ID 8868ac7ece8b18257aeb32e2d68701568ebf9c27 # Parent 71db080a1fbf6c6c0c5e4b3a64bcc3315efba1e4 Tweak steal research mission diff -r 71db080a1fbf -r 8868ac7ece8b gamelib/missions.py --- a/gamelib/missions.py Sat May 12 11:46:08 2012 +0200 +++ b/gamelib/missions.py Sat May 12 12:28:39 2012 +0200 @@ -571,28 +571,28 @@ " fool invests in some defenses. You'll need to be better prepared" " in the future.") - def succeed(self, msg, state): + def _succ(self, msg, state): reward = choice(('schematic', 'science', 'money', 'money', 'money', 'money', 'money', 'nothing', 'nothing', 'nothing')) if reward == 'nothing': - msg = msg + (" Unfortunately, not only are these people working" - " on ideas you've already covered, they're flat broke.") - raise Result(SUCCESS, msg, money=0, rep=1) + self.succeed("%s Unfortunately, not only are these people working" + " on ideas you've already covered, they're flat broke." % msg, + money=0, rep=1) elif reward == 'money': - msg = msg + (" While their research yields nothing of interest," - " you can repurpose their funding to more worthy causes.") - raise Result(SUCCESS, msg, money=randint(1000, 2000), rep=1) + self.succeed("%s While their research yields nothing of interest," + " you can repurpose their funding to more worthy causes." + % msg, money=randint(1000, 2000), rep=1) elif reward == 'schematic': - msg = msg + (" You find the plans for a new device. How did" - " these fools stumble upon this?") - raise Result(SUCCESS, msg, money=0, rep=randint(2, 5), - new_schematic=choice(state.lab.new_schematics)) + self.succeed("%s You find the plans for a new device. How did" + " these fools stumble upon this?" % msg, + money=0, rep=randint(2, 5), + new_schematic=choice(state.lab.new_schematics)) # New science - msg = msg + (" Their notes are most illuminating. You realise you have" - " sadly neglected research into this field.") - raise Result(SUCCESS, msg, money=0, rep=randint(2, 5), - new_science=choice(state.lab.new_research)) + self.succeed("%s Their notes are most illuminating. You realise you" + " have sadly neglected research into this field." % msg, + money=0, rep=randint(2, 5), + new_science=choice(state.lab.new_research)) def attempt_with(self, categorised, state): @@ -604,11 +604,11 @@ " total destruction of the lab will not help you cause.") if cat.AI in categorised: - self.succeed("Your AI easily takes control of the lab's network.", + self._succ("Your AI easily takes control of the lab's network.", state) if self.combat_power(categorised) > randint(20, 40): - self.succeed( + self._succ( "The resistance is stiff, but your forces prevail" " thanks to your superior technology.", state) else: