Mercurial > sypikslang
changeset 123:7cd716328a44
Take over the neighbourgood!
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Thu, 10 May 2012 02:37:02 +0200 |
parents | acf3af761bbc |
children | 685301e35f88 |
files | gamelib/constants.py gamelib/missions.py |
diffstat | 2 files changed, 39 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/constants.py Thu May 10 00:52:38 2012 +0200 +++ b/gamelib/constants.py Thu May 10 02:37:02 2012 +0200 @@ -13,7 +13,7 @@ # Result codes for UI hints (MAJOR_SETBACK, FAILURE, SUCCESS, MAJOR_SUCCESS, GAME_WIN, NEW_SCIENCE, - NEW_SCHEMATIC) = range(7) + NEW_SCHEMATIC, NEW_MILESTONE) = range(8) # Planning to take over the: MILESTONES = ("basement", "neighbourhood", "city", "world")
--- a/gamelib/missions.py Thu May 10 00:52:38 2012 +0200 +++ b/gamelib/missions.py Thu May 10 02:37:02 2012 +0200 @@ -3,7 +3,7 @@ from random import randint -from gamelib.constants import SUCCESS, FAILURE, GAME_WIN, M_VALS +from gamelib.constants import SUCCESS, FAILURE, GAME_WIN, NEW_MILESTONE, M_VALS from gamelib.schematics import cat @@ -337,6 +337,41 @@ def attempt_with(self, categorised, state): if cat.MIND_CONTROL not in categorised: return Result(FAILURE, 0, 5, "If you're going to take over the" - " first you must control key elements within the" - " populace.") + " world, first you must control key elements within" + " the populace.") return Result(GAME_WIN, 0, 100, "The world is yours!") + + +class TakeOverTheNeighbourhood(Mission): + + NAME = "Take over the neighbourhood!" + SHORT_DESCRIPTION = "First step toward greatness." + LONG_DESCRIPTION = ( + "A basement lab is a good starting point, but it's getting a bit" + " cramped in here. You need to expand, but don't quite have the" + " resources to take the whole world yet. Or even the city. But the" + " neighbourhood... that's quite feasible.") + + MINIMUM_REPUTATION = 20 + MINIMUM_MILESTONE = "basement" + + def attempt_no_equipment(self, state): + return Result(FAILURE, 0, 0, "The neighbourhood isn't very big, but" + " you're still not going to take it over bare-handed.") + + def attempt_with(self, categorised, state): + if all(c in categorised for c in (cat.MIND_CONTROL, cat.HAND_WEAPON)): + self.game['completed'] = True + return Result(NEW_MILESTONE, 1000, 5, "Guns and persuasion, that's" + " all you need. It's early days still, but you're" + " finally out of that pokey basement and have some" + " elbow room to work with. Next step: the city!") + if cat.HAND_WEAPON in categorised: + return Result(SUCCESS, 150, 0, "You'll need more than guns to" + " win the people over. But until then, you can take" + " their cash.") + if cat.MIND_CONTROL in categorised: + return Result(SUCCESS, 0, 7, "Propaganda and persuasion are good" + " tools, but you'll need something to back them up.") + return Result(FAILURE, 0, 0, "Well, that didn't work. Maybe a better" + " equipment selection is in order.")