Mercurial > sypikslang
changeset 185:59bd6f2e0ec2
YAM
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 13:55:07 +0200 |
parents | 3571a03761e5 |
children | b94a38129da8 |
files | gamelib/missions.py |
diffstat | 1 files changed, 62 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/missions.py Sat May 12 13:40:11 2012 +0200 +++ b/gamelib/missions.py Sat May 12 13:55:07 2012 +0200 @@ -735,3 +735,65 @@ if cat.HAND_WEAPONS in categorised: self.fail("A sprinkling of small arms can't overcome the city's" " defenses. Something more impressive is required.") + + +class SecureLair(Mission): + NAME = "Secure island base" + SHORT_DESCRIPTION = "A nice safe base of operations" + LONG_DESCRIPTION = ( + "It's a cliche, but there's a lot to be said for an isolated" + " and secure base of operations. You can still control your" + " 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_REPUTATION = 50 + + NO_EQUIP_FAILURE = ( + "While the local defenses are weak, even they can deal with" + " a few unarmed men. Something more suitable is required") + GENERIC_FAILURE = ( + "Your chosen tools aren't up to the task of securing the" + " island. Perhaps you need to rethink your approach") + + def attempt_no_equipment(self, state): + self.fail(self.NO_EQUIP_FAILURE, rep=-randint(10, 15)) + + def attempt_with(self, categorised, state): + + self.use_equipment(categorised) + + if cat.DOOMSDAY_DEVICE in categorised: + self.fail( + "You want to use the island afterward, and the local" + " population can provide basic labour. Something less" + " destructive is required.") + + if cat.AI in categorised: + self.fail( + "Your AI complains about the limited bandwidth and" + " inadequate computing resources of the target, then" + " goes off to sulk. A more physical approach may" + " be required.") + + msg = ( + " Afraid of the repurcusions, the people quickly build a base" + " to your specifications") + if (cat.BEAST in categorised and + self.combat_power(categorised) > randint(20, 30)): + self.data['completed'] = True + self.succeed( + "Your creature's terrifying rampage destroys all" + " resistance, and you quickly conquer the island. %s" % msg, + rep=randint(10, 15)) + + if cat.VEHICLE in categorised: + if self.combat_power(categorised) > randint(20, 30): + self.data['completed'] = True + self.succeed("Your overwhelming display of force cowers" + " the local population. The island is yours. %s" % msg, + rep=randint(10, 15)) + else: + self.fail( + "Your forces prove unable to overcome the local" + " defenses.")