changeset 200:553e68128e1c

merge
author Rizmari Versfeld <rizziepit@gmail.com>
date Sat, 12 May 2012 17:53:51 +0200
parents 2f018ddb3c00 (current diff) df350c2f8c10 (diff)
children 6a4457b912a5
files
diffstat 2 files changed, 63 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/missions.py	Sat May 12 17:53:14 2012 +0200
+++ b/gamelib/missions.py	Sat May 12 17:53:51 2012 +0200
@@ -935,3 +935,63 @@
             self.succeed("The review board respond favourably to a little"
                     " light intidimation, and your paper is accepted.",
                     rep=randint(10, 15))
+
+
+class DisruptMarkets(Mission):
+    NAME = "Disrupt local enconomy"
+    SHORT_DESCRIPTION = "Creating chaos and fear."
+    LONG_DESCRIPTION = (
+        "People place far too much value on their money. This is a weakness"
+        " that just begs to be exploited. And, in the chaos and fear, "
+        " there's almost certainly and opportunity to profit.")
+    MINIMUM_MILESTONE = "neighbourhood"
+    MINIMUM_MONEY = 2000
+
+    NO_EQUIP_FAILURE = (
+        "You cannot beat the game just with your mind, doctor. You'll need"
+        " to have some extra toys")
+    GENERIC_FAILURE = (
+        "No-one notices your efforts. Back to the drawing board")
+
+    def can_attempt(self, state):
+        if state.money < self.MINIMUM_MONEY:
+            # You need to be in the game to cheat at it
+            return False
+        return super(DisruptMarkets, self).can_attempt(state)
+
+    def attempt_with(self, categorised, state):
+
+        if cat.DOOMSDAY_MACHINE in categorised:
+            return self.fail(
+                "While destroying the area is certainly within your"
+                " capabilities, and would cause wide-spread panic,"
+                " there seems little prospect of exploiting the"
+                " confusion usefully at this time. You decide to"
+                " shelve this plan for now.")
+
+        if cat.WEATHER_MACHINE in categorised:
+            self.use_equipment(
+                    {cat.WEATHER_MACHINE: categorised[cat.WEATHER_MACHINE]})
+            return self.succeed(
+                "You cunningly use your device to disrupt the nearby farmers."
+                " The ensuing panic buyng of supplies is easy to exploit for"
+                " profit.", money=randint(5000, 10000), rep=randint(5, 15))
+
+        if cat.AI in categorised:
+            self.use_equipment(
+                    {cat.AI: categorised[cat.AI]})
+            return self.succeed(
+                "You easily survert the local exchanges computer systems."
+                " It hardly seems fair to profit off such a trivial challenge"
+                " but there are always bills to pay",
+                money=randint(5000, 10000), rep=randint(2, 5))
+
+        if cat.BEAST in categorised:
+            self.use_equipment(
+                    {cat.BEAST: categorised[cat.BEAST]})
+            return self.succeed(
+                "Releasing the monster into the exchange certainly created"
+                " a stir, and the was much running and screaming, but, with"
+                " the exchange closing it's doors until the creature was"
+                " contained, there wasn't much opportunity to make a profit.",
+                money=0, rep=randint(2, 5))
--- a/gamelib/schematics.py	Sat May 12 17:53:14 2012 +0200
+++ b/gamelib/schematics.py	Sat May 12 17:53:51 2012 +0200
@@ -21,6 +21,7 @@
     'AI',
     'COUNTERMEASURE',
     'SPACE',
+    'WEATHER_MACHINE',
     )
 
 K = 1000
@@ -216,7 +217,7 @@
 class TornadoMachine(Schematic):
     NAME = "tornado machine"
     COST = 7 * K
-    CATEGORIES = (cat.VEHICLE,)
+    CATEGORIES = (cat.VEHICLE, cat.WEATHER_MACHINE)
     PREREQUISITES = (
         (research.Meteorology, 6),
         (research.Physics, 5),
@@ -365,7 +366,7 @@
 class WeatherControlStation(Schematic):
     NAME = "weather control station"
     COST = 15 * M
-    CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.SPACE)
+    CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.SPACE, cat.WEATHER_MACHINE)
     PREREQUISITES = (
         (SpySatellite, 3),
         (research.Lasers, 5),