Mercurial > sypikslang
changeset 183:eda2f399b90e
yet another mission
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 13:24:01 +0200 |
parents | 0cb67bf20f89 |
children | 3571a03761e5 |
files | gamelib/missions.py |
diffstat | 1 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/missions.py Sat May 12 12:51:19 2012 +0200 +++ b/gamelib/missions.py Sat May 12 13:24:01 2012 +0200 @@ -673,3 +673,59 @@ "The lab is surprisingly well defended for an operation" " run by a total fool. You vow to return with a better" " prepared force.") + + +class TerroriseCity(Mission): + NAME = "Invade nearby city" + SHORT_DESCRIPTION = "Need more resources" + LONG_DESCRIPTION = ( + "Sometimes it's nessecary to remind people of what you can do." + " And why not do so close to home?") + + MINIMUM_MILESTONE = "city" + + NO_EQUIP_FAILURE = ( + "Attacking a city with your bare hands. Perhaps not the best" + " thought out scheme in the world. Fortunately, only your" + " pride was hurt by this failure.") + GENERIC_FAILURE = ( + "You fail to accomplish your goal. A different approach seems" + " called for.") + + 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.succeed( + "Destroying the city is a simple exercies with the right" + " tools. People will tremble at the mention of your name", + rep=randint(15, 25)) + + if cat.AI in categorised: + self.succeed("Your AI easily takes control of the central" + " network. It's not that scary, but it is profitable", + money=randint(3000, 10000)) + + if cat.BEAST in categorised: + self.succeed("Your creature's rampage terrifies the city's" + " inhabitants. The city council are all to eager to" + " pay you to rein it in. A most statisfying outcome", + money=randint(2000, 5000), rep=randint(5, 15)) + + if cat.VEHICLE in categorised: + if self.combat_power(categorised) > randint(50, 70): + self.succeed("Your overwhelming display of force cowers" + " the city. Fear of you spreads.", rep=randint(10, 20)) + else: + self.fail( + "Your forces prove unable to overcome the city's" + " defenses. This is an annoying setback, but you" + " vow to return.", rep=-randint(3, 7)) + + 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.")