def ORIGIN_offers(self, explo): ol = list() npc = self.elements.get("TARGET") if self._interested and self._told_problem: r1 = dialogue.Reply( "{0} would like to go out with you.".format(npc), destination=dialogue.Offer( "Really? Great! Could you bring {0} my invitation?".format( npc.object_pronoun()), effect=self.ask_invitation)) ol.append( dialogue.Offer("Yes, what is it?", context=context.ContextTag( [context.BRINGMESSAGE, context.GOODNEWS]), replies=[ r1, ])) else: myoffer = dialogue.Offer( "I would like to ask someone to the festival dance, but I don't know anyone...", context=context.ContextTag([context.PROBLEM, context.PERSONAL]), effect=self.tell_problem) ol.append(myoffer) if self._interested: myoffer.replies.append( dialogue.Reply( "Why don't you ask {0}?".format(npc), destination=dialogue.Offer( "Would {0} be interested in going with me? I cannot leave here right now; could you deliver my invitation?" .format(npc.subject_pronoun()), effect=self.ask_invitation))) return ol
def _NPC_offers(self, explo): ol = list() if not self.quest_started: sk = self.elements["SHOPKEEPER"] myoffer = dialogue.Offer( msg= "{0} is always busy these days. We should get some help, but we're too busy to go looking!" .format(sk, sk.subject_pronoun()), context=context.ContextTag([context.HELLO]), replies=[ dialogue.Reply( "I could do that for you.", destination=dialogue.Offer( msg= "Really? We need three {0} folks to cover all this work. Let me know if you find anyone." .format(self.STAT_DESC[self.needed_stat]), context=context.ContextTag([context.PERSONAL]), effect=self.start_quest)) ]) ol.append(myoffer) else: myoffer = dialogue.Offer( msg="Have you found me three {0} folks yet?".format( self.STAT_DESC[self.needed_stat]), context=context.ContextTag([context.HELLO])) if len(self.employees) >= 5: myoffer.replies.append( dialogue.Reply( "I found everyone you need.", destination=dialogue.Offer( msg= "Great! With {0}, {1}, and {2} on staff things here will be much easier. Thank you so much." .format(self.employees[2], self.employees[3], self.employees[4]), context=context.ContextTag([context.PERSONAL]), effect=self.end_quest, replies=[ dialogue.Reply("You're welcome.", destination=dialogue.Cue( context.ContextTag( [context.REWARD]))) ]))) else: myoffer.replies.append( dialogue.Reply("I'm still working on it.", destination=dialogue.Cue( context.ContextTag([context.GOODLUCK ])))) ol.append( dialogue.Offer( msg= "Good luck with that. I'll be waiting right here... as if I had time to go anywhere else.", context=context.ContextTag([context.GOODLUCK]))) ol.append(myoffer) return ol
def get_generic_offers(self, npc, explo): # Return list of shopkeeper offers. ol = list() if self._still_looking and random.randint( 1, 4) == 1 and npc is not self.elements[ "BMKEEPER"] and explo.camp.current_root_scene( ) is self.elements["LOCALE"]: ol.append( dialogue.Offer( "If you are unhappy with the selection in my store, you can always try the black market. Good luck finding it, though.", context=context.ContextTag([context.HELLO, context.SHOP]), replies=[ dialogue.Reply( "I will just look at your wares, thanks.", destination=dialogue.Cue( context.ContextTag([context.SHOP]))), ])) return ol
def _MYNPC_offers(self, explo): ol = list() if self.invited: npc = self.elements["TARGET"] r1 = dialogue.Reply( "Would you like to go out with {0}?".format(npc), destination=dialogue.Offer( "{0}? Yes, you may tell {1} that I would like that very much!" .format(npc, npc.object_pronoun()), effect=self.accept_invitation)) ol.append( dialogue.Offer("Yes, what is it?", context=context.ContextTag( [context.BRINGMESSAGE, context.QUESTION]), replies=[ r1, ])) return ol
def get_generic_offers(self, npc, explo): ol = list() if self.quest_started and npc not in self.employees and npc.get_stat( self.needed_stat) > (12 + self.rank // 2) and len( self.employees) < 5: qgnpc = self.elements["_NPC"] myoffer = dialogue.Offer( msg="What is it?", context=context.ContextTag( [context.BRINGMESSAGE, context.QUESTION]), replies=[ dialogue.Reply( "{0} is looking for help.".format(qgnpc), destination=dialogue.Offer( msg=random.choice(self.ACCEPT_JOB_REPLIES).format( qgnpc.object_pronoun()), context=context.ContextTag([context.PERSONAL]), effect=self.add_this_npc)) ]) ol.append(myoffer) return ol
def BOSS_offers(self, explo): # Return list of boss offers. ol = list() if self.shop_open: # If you make friends with this boss, you can buy magic here. ol.append( dialogue.Offer("[SHOP_MAGIC]", context=context.ContextTag( [context.SHOP, context.GENERALSTORE]), effect=self.boss_shop)) else: # If you haven't yet made friends, things could be tricky... challenge1 = dialogue.Offer( "Who dares to disturb my eternal studies? Speak, mortals, and tell me what you expect to find!", context=context.ContextTag([ context.THREATEN, ])) challenge2 = dialogue.Offer( "Tell me, mortals... what is it that you seek in life?", context=context.ContextTag([ context.HELLO, ])) right_answer = dialogue.Offer("Then that is what you shall find!", effect=self.answer_correctly) wrong_answer = dialogue.Offer( "Fools! Your inevitable death shall be meaningless!", effect=self.answer_incorrectly) for t, goal in enumerate(self.GOALS): myreply = dialogue.Reply("We seek {}.".format(goal)) if goal is self.boss_goal: # Congratulations, you've figured it out. myreply.destination = right_answer else: # This is the wrong answer, by undead standards. myreply.destination = wrong_answer challenge1.replies.append(myreply) challenge2.replies.append(myreply) ol += [challenge1, challenge2] return ol
def SHOPKEEPER_offers(self, explo): ol = list() the_cousin = self.elements["TARGET"] if self.dated and self.subplots["next"].active: myoffer = dialogue.Offer( msg= "Thanks for getting {0} out of my hair; {1} still hangs around here too much but it's better than it used to be." .format(the_cousin, the_cousin.subject_pronoun()), context=context.ContextTag([context.HELLO, context.REWARD]), replies=[ dialogue.Reply("You're welcome.", destination=dialogue.Cue( context.ContextTag([context.REWARD]))) ]) ol.append(myoffer) elif not self.started: myoffer = dialogue.Offer( "It's my cousin {0}... {1} hangs out here all day bothering me." .format(the_cousin, the_cousin.subject_pronoun()), context=context.ContextTag([context.PROBLEM, context.PERSONAL]), effect=self.tell_problem) ol.append(myoffer) return ol