def activate(self): output.proclaim("-- " + self.name + " --") if self.autoGive: self.given = True if not self.given: output.proclaim(self.openerText) while True: choice = input.inputFromOptions("quest", ["decline", "accept"]) if choice == "accept": self.given = True break elif choice == "decline": output.say("Are you sure you want to decline the quest?") if input.yesNo(): break return player = globals.get_player() if self.completionCheck(player): output.proclaim(self.completeText) output.exclaim("You have completed the quest " + self.name + "!") self.rewards.activate() self.condition = lambda player: False player.completedQuests[self.name] = True else: output.proclaim(self.incompleteText)
import interactions.fight as fight import interactions.loot as loot import interactions.shop as shop import interactions.shrine as shrine import creatures.monster as monster import creatures.gear as gear import items.potions as potions import npcs.npc as npc import npcs.quest as quest import location import actions import ability import effect import item player = globals.get_player() ''' Morning Fields is the starting zone. It has three locations: Trainee Valley, The Silent Forest, and Fort Morning. The connections are as follows. TRAINEE VALLEY ---> THE SILENT FOREST, FORT MORNING THE SILENT FOREST ---> TRAINEE VALLEY FORT MORNING ---> TRAINEE VALLEY ''' # START OF TRAINEE VALLEY class Wolf(monster.Monster): def __init__(self): monster.Monster.__init__( self, "wolf",
def instant_input(): return globals.get_player().settings["instant input"]
def getQuests(self): return [ quest for quest in self.quests if quest.condition(globals.get_player()) ]
def __init__(self): self.player = globals.get_player()