# HG changeset patch # User Simon Cross # Date 1336591590 -7200 # Node ID 0f437e0584f7fb13ef04e2d156bbb08927db557f # Parent 245ef50de84d52e69c5f16bb27506bc5d1c605bf Add mission for taking over the world. diff -r 245ef50de84d -r 0f437e0584f7 gamelib/missions.py --- a/gamelib/missions.py Wed May 09 21:22:10 2012 +0200 +++ b/gamelib/missions.py Wed May 09 21:26:30 2012 +0200 @@ -3,7 +3,7 @@ from random import randint -from gamelib.constants import SUCCESS, FAILURE +from gamelib.constants import SUCCESS, FAILURE, GAME_WIN from gamelib.schematics import cat @@ -302,3 +302,29 @@ return Result(SUCCESS, 0, rep, self.SUCCESS_MESSAGE % (result,)) else: return self.attempt_no_equipment(state) + + +class TakeOverTheWorld(Mission): + + NAME = "Take over the world!" + SHORT_DESCRIPTION = "It's for their own good." + LONG_DESCRIPTION = ( + "Someone has to rule the world and if it's not you it'd just be" + " someone less well qualified -- and that would be worse for" + " everyone.") + MINIMUM_REPUTATION = 200 + + SUCCESS_MESSAGE = ( + "A small army of urchins delivers thousands of cheaply printed" + " pamphlets. %s") + + def attempt_no_equipment(self, state): + return Result(FAILURE, 0, 0, "It's going to take more than your bare" + " hands to take over the world!") + + 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.") + return Result(GAME_WIN, 0, 100, "The world is yours!")