Mercurial > sypikslang
changeset 206:2b8b6c9b71eb
Add emergency reputation boost mission
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 19:14:22 +0200 |
parents | d8b0f07a6dbe |
children | ed25c335fd67 |
files | gamelib/missions.py |
diffstat | 1 files changed, 63 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/missions.py Sat May 12 18:59:51 2012 +0200 +++ b/gamelib/missions.py Sat May 12 19:14:22 2012 +0200 @@ -749,7 +749,7 @@ " city from afar. You just have to deal with the local inhabitants" " of your chosen location, but they should not present a problem") MINIONS_REQUIRED = 4 - MINIMUM_MILESTONE = 'city' + MINIMUM_MILESTONE = "city" MINIMUM_REPUTATION = 50 NO_EQUIP_FAILURE = ( @@ -807,7 +807,7 @@ SHORT_DESCRIPTION = "A rival. Inconcievable" LONG_DESCRIPTION = None # We handle this one specially MINIONS_REQUIRED = 3 - MINIMUM_MILESTONE = 'city' + MINIMUM_MILESTONE = "city" MINIMUM_REPUTATION = 50 NO_EQUIP_FAILURE = ( @@ -910,7 +910,7 @@ "You've seen further than others. Surely you can open their" " eyes to the truth (and secure your place in history)?") MINIMUM_REPUTATION = 5 - MINIMUM_MILESTONE = 'basement' + MINIMUM_MILESTONE = "basement" NO_EQUIP_FAILURE = ( "The review board rejects your paper, clearly failing to" @@ -1026,3 +1026,63 @@ " was a great way to cause panic, but not a reliable method" " for securing the loyalties of the mayor. You return to" " the drawing board") + + +class DisruptCityServices(Mission): + NAME = "Disrupt city services" + SHORT_DESCRIPTION = "Keep your name in the news" + LONG_DESCRIPTION = ( + "You're not being talked about in the news. This cannot be allowed" + " to continue. Spreading chaos and fear will remind people about" + " your presence.") + MINIMUM_MILESTONE = "neighbourhood" + MAXIMUM_REPUTATION = 10 + + NO_EQUIP_FAILURE = ( + "There's little one unarmed man can do to disrupt the city. You'd" + " better rethink this plan.") + + def can_attempt(self, state): + if state.reputation > self.MAXIMUM_REPUTATION: + return False + return super(DisruptCityServices, self).can_attempt(state) + + def attempt_no_equipment(self, state): + self.fail(self.NO_EQUIP_FAILURE, rep=-1) + + def attempt_with(self, categorised, state): + if cat.DOOMSDAY_DEVICE in categorised: + self.fail( + "If there's no-one left alive, there'll be no-one to" + " report on your genius. Prehaps less overkill is more" + " suited to the task at hand") + if cat.BEAST in categorised: + self.use_equipment_catefory(categorised, cat.BEAST) + if any(cat.AQUATIC in x.CATEGORIES for x in + categorised[cat.BEAST]): + self.succeed( + "You release the beast into the city sewer system." + " The resulting destruction is both expensive to" + " repair and very visible to the inhabitants.", + rep=randint(5, 10)) + else: + self.succeed( + "The beast causes considerable property damage, and" + " takes out a local substation. It's not a stunning" + " victory, but it's enough to get you name in the" + " news again", rep=randint(2, 5)) + + if cat.VEHICLE in categorised: + self.use_equipment_catefory(categorised, cat.VEHICLE) + self.succeed( + "Your mobile platforms of destruction cause severe" + " traffic chaos, and tie up the local traffic services" + " for hours. The resulting traffic jams headline the" + " evening news. It's not quite the what you were going" + " for, but it's publicity", rep=randint(0, 3)) + + if cat.HAND_WEAPON in categorised: + self.fail( + "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.")