changeset 175:efe82cf956fc

Add more to missions
author Neil Muller <drnlmuller@gmail.com>
date Sat, 12 May 2012 10:11:36 +0200
parents 0d8d3c83a453
children 32ef26f410b8
files gamelib/missions.py
diffstat 1 files changed, 60 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/missions.py	Sat May 12 10:11:17 2012 +0200
+++ b/gamelib/missions.py	Sat May 12 10:11:36 2012 +0200
@@ -327,6 +327,12 @@
                 " that is power.",
                 money=loot, rep=1)
 
+        if cat.AI in categorised:
+            self.success(
+                "Your cunning AI easily penetrates the bank's computing"
+                " systems and transfers the money to you account.",
+                money=loot)
+
         if self.combat_power(categorised) > randint(5, 20):
             self.succeed(
                 "The threat of your weapons is enough to inspire an impressive"
@@ -450,3 +456,57 @@
             self.succeed(
                 "Propaganda and persuasion are good tools, but you'll need"
                 " some force to back them up.", rep=randint(2, 4))
+
+
+class ShowThemAll(Mission):
+
+    NAME = "And they called me mad."
+    SHORT_DESCRIPTION = "Time for revenge."
+    LONG_DESCRIPTION = (
+        "You've outgrown the chains of convention your teachers tried"
+        " to force you into. It's time to show the world what true"
+        " genius can accomplish. And what better way than with a small"
+        " slice of revenge?")
+
+    MINIMUM_REPUTATION = 20
+    MINIMUM_MILESTONE = "neighbourhood"
+
+    NO_EQUIP_FAILURE = (
+        "A security guard escorts you off campus after finding you clawing"
+        " at the science building with your bare hands. He doesn't say"
+        " anything, but you can already hear the gossip.")
+
+    GENERIC_FAILURE = (
+        "Well, that didn't work. Maybe a better equipment selection is in"
+        " order.")
+
+    def attempt_no_equipment(self, state):
+        self.fail(self.NO_EQUIP_FAILURE, rep=-5)
+
+    def attempt_with(self, categorised, state):
+        if cat.DOOM in categorised:
+            self.data['completed'] = True
+            self.succeed(
+                "The fools cower in terror at your display of power. Finally"
+                " they are forced to acknowledge your genius.",
+                rep=randint(10, 15))
+
+        if cat.BEAST in categorised:
+            if any(cat.AQUATIC not in x.CATEGORIES for x in
+                    categorised[cat.BEAST]):
+                self.data['completed'] = True
+                self.succeed(
+                    "Your monstrous creation rampages through campus in a"
+                    " most statisfying way. They will not forgot this.",
+                    rep=randint(5, 12))
+            else:
+                self.fail(
+                    "While the beast is terrifying, the effect is"
+                    " unfortuantely significantly lessened the need for a "
+                    " large water tank, and the it's inability to move "
+                    " independantly. Prehaps you need to rethink your plan?")
+
+        if cat.HAND_WEAPON in categorised:
+            self.fail(
+                "Mere crude force is not the answer. You need some more"
+                " fitting demonstration of your power.")