# HG changeset patch # User Neil Muller # Date 1336845149 -7200 # Node ID 5ca97ed097384dc0021e127b7e2fd8192d5325a9 # Parent f9426f6cebf45f017cdf200e80e6f1efcbae84f2 rat mission diff -r f9426f6cebf4 -r 5ca97ed09738 gamelib/missions.py --- a/gamelib/missions.py Sat May 12 19:51:58 2012 +0200 +++ b/gamelib/missions.py Sat May 12 19:52:29 2012 +0200 @@ -5,6 +5,7 @@ from gamelib.constants import SUCCESS, FAILURE, GAME_WIN, M_VALS from gamelib.schematics import cat +from gamelib.research import Biogenetics class Result(Exception): @@ -1086,3 +1087,30 @@ "You want to be known as more than just a local gangster." " Guns are an efficient tool, but hardly the means to" " securing your reputation.") + + +class RatArmy(Mission): + NAME = "Breed Rat Burglars" + SHORT_DESCRIPTION = "Your furry money source" + LONG_DESCRIPTION = ( + "Small and easy to breed. An army of rat burgulars will provide" + " a useful supply of steady income") + + def can_attempt(self, state): + if self.get_data('completed'): + return False + if state.lab.meet_requirements(Biogenetics, 1): + return True + return False + + def attempt_no_equipment(self, state): + self.data['completed'] = True + self.succeed( + "You breed an army of small rats, engineered to steal small" + " change. The resulting income is not much, but still useful", + money=0, rep=0, income=randint(10, 15)) + + def attempt_with(self, categorised, state): + self.fail( + "You're overthinking this doctor. Perhaps a simpler approach" + " will work better?")