# HG changeset patch # User Neil Muller # Date 1336839473 -7200 # Node ID 4159e34d7310ac9cdb6e0cd340e8f6c806adde84 # Parent eb506f431979efdf5d66f74918586c3b9e9a57aa Replace the mayor diff -r eb506f431979 -r 4159e34d7310 gamelib/missions.py --- a/gamelib/missions.py Sat May 12 17:56:49 2012 +0200 +++ b/gamelib/missions.py Sat May 12 18:17:53 2012 +0200 @@ -972,7 +972,7 @@ if cat.WEATHER_MACHINE in categorised: self.use_equipment( {cat.WEATHER_MACHINE: categorised[cat.WEATHER_MACHINE]}) - return self.succeed( + 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)) @@ -980,7 +980,7 @@ if cat.AI in categorised: self.use_equipment( {cat.AI: categorised[cat.AI]}) - return self.succeed( + self.succeed( "You easily survert the local exchange's computer systems." " It hardly seems fair to profit off such a trivial challenge" " but there are always bills to pay", @@ -989,9 +989,47 @@ if cat.BEAST in categorised: self.use_equipment( {cat.BEAST: categorised[cat.BEAST]}) - return self.succeed( + self.succeed( "Releasing the monster into the exchange certainly created" " a stir, and there 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)) + + +class ControlMayor(Mission): + NAME = "Control the Mayor" + SHORT_DESCRIPTION = "Minions in high places." + LONG_DESCRIPTION = ( + "While the mayor powers are limited, it's a step towards controlling" + " the entire city") + MINIMUM_MILESTONE = "neighbourhood" + + def attempt_with(self, categorised, state): + if cat.CLONE in categorised: + self.use_equipment( + {cat.CLONE: categorised[cat.CLONE]}) + self.data['completed'] = True + self.succeed( + "Replacing the mayor with a copy under your control. Such" + " a genius scheme could only come from a brain as brillant" + " as yours.", rep=randint(10, 15)) + if cat.MIND_CONTROL in categorised: + self.use_equipment( + {cat.MIND_CONTROL: categorised[cat.CLONE]}) + self.data['completed'] = True + self.succeed( + "Mind control. It's hardly a novel approach to the problem" + " but who can argue with the results.", rep=randint(7, 15)) + + if cat.HAND_WEAPONS in categorised: + self.fail( + "Brute force. It seems such a crude approach. You decide" + " this is unworthy of you and abandon the plan.") + + if cat.BEAST in categorised: + self.fail( + "In retrospect, unleashing a monster into the downtown streets" + " 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") diff -r eb506f431979 -r 4159e34d7310 gamelib/schematics.py --- a/gamelib/schematics.py Sat May 12 17:56:49 2012 +0200 +++ b/gamelib/schematics.py Sat May 12 18:17:53 2012 +0200 @@ -22,6 +22,7 @@ 'COUNTERMEASURE', 'SPACE', 'WEATHER_MACHINE', + 'CLONE', ) K = 1000 @@ -376,3 +377,23 @@ BASE_POWER = 2200 POWER_INCREMENT = 150 + + +class Android(Schematic): + NAME = "Lifelike Android" + COST = 50 * K + CATEGORIS = (cat.INTELLIGENCE, cat.AI, cat.CLONE) + PREREQUISITES = ( + (research.ArtificialIntelligence, 5), + (research.Robotics, 5), + ) + + BASE_POWER = 10 + POWER_INCREMENT = 1 + + PRODUCTION_RELIABILITY = 0.6 + + FAILURE_TEXT = ( + "The sudden stuttering speech and sparks from the joints are the first" + " signs that things have gone horribly wrong. The ensuing explosion" + " of the android is merely the inevitable conclusion of the diaster.")