changeset 181:07e81cd0cdd6

Take over the city
author Neil Muller <drnlmuller@gmail.com>
date Sat, 12 May 2012 12:28:56 +0200
parents 8868ac7ece8b
children 0cb67bf20f89
files gamelib/missions.py
diffstat 1 files changed, 57 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/missions.py	Sat May 12 12:28:39 2012 +0200
+++ b/gamelib/missions.py	Sat May 12 12:28:56 2012 +0200
@@ -458,6 +458,63 @@
                 " some force to back them up.", rep=randint(2, 4))
 
 
+class TakeOverTheCity(Mission):
+    NAME = "Take over the city"
+    SHORT_DESCRIPTION = "Time to grow"
+    LONG_DESCRIPTION = (
+        "It's time to spread your wings and take your rightful place as"
+        " a major player. And what better way than by securing your base"
+        " of operations?")
+
+    MINIMUM_REPUTATION = 100
+    MINIMUM_MILESTONE = "neighbourhood"
+
+    NO_EQUIP_FAILURE = (
+        "You are thrown out of city hall for making a scene. The fools will"
+        " pay for this when you return with more firepower.")
+    GENERIC_FAILURE = (
+        "Well, that didn't work. Maybe a better equipment selection is in"
+        " order.")
+
+    def attempt_with(self, categorised, state):
+        if cat.DOOMSDAY_DEVICE in categorised:
+            self.data['completed'] = True
+            self.succeed(
+                "Overwhelming force! It works for governments, and it works"
+                " for you. The city cowers before you, and you finally"
+                " feel like you're getting somewhere. Soon, the world will"
+                " be yours.", money=randint(10000, 20000),
+                rep=randint(10, 20), new_milestone='city')
+
+        if cat.AI in categorised:
+            self.use_equipment(
+                {cat.AI: categorised[cat.AI]})
+            self.succeed(
+                "While the AI can't control the entire city, you can at"
+                " least ensure the budget is well spent",
+                money=randint(10000, 30000))
+
+        if cat.MIND_CONTROL in categorised:
+            self.use_equipment(
+                {cat.MIND_CONTROL: categorised[cat.MIND_CONTROL]})
+            self.succeed(
+                "Running a city requires controlling more than just a few"
+                " key people. Still, making the mayor dance to your tune"
+                " is not without it's benefits", money=randint(3000, 7000),
+                rep=randint(3, 7))
+
+        if cat.VEHICLE in categorised:
+            self.fail(
+                "While you can muster a significant force, you don't want"
+                " to destroy the city in the inevitable fighting. You need"
+                " to ensure no-one tries to resist.")
+
+        if cat.HAND_WEAPON in categorised:
+            self.fail(
+                "You'll need more than a handful of guns, no matter"
+                " how powerful, to subdue a city")
+
+
 class ShowThemAll(Mission):
 
     NAME = "And they called me mad!"