Mercurial > sypikslang
changeset 209:5ca97ed09738
rat mission
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 19:52:29 +0200 |
parents | f9426f6cebf4 |
children | e6ae61b7305f |
files | gamelib/missions.py |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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?")