示例#1
0
    def NPC_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()
        npc = self.elements["NPC"]
        self.hire_cost = (npc.renown * npc.renown *
                          (150 - npc.get_reaction_score(camp.pc, camp))) // 5

        if gears.relationships.RT_LANCEMATE not in npc.relationship.tags:
            if camp.can_add_lancemate():
                mylist.append(
                    Offer(
                        "I'll join your lance for a mere ${}. [DOYOUACCEPTMYOFFER]"
                        .format(self.hire_cost),
                        context=ContextTag((context.PROPOSAL, context.JOIN)),
                        data={"subject": "joining my lance"},
                        subject=self,
                        subject_start=True,
                    ))
                mylist.append(
                    Offer("[DENY_JOIN] [GOODBYE]",
                          context=ContextTag((context.DENY, context.JOIN)),
                          subject=self))
                if camp.credits >= self.hire_cost:
                    mylist.append(
                        Offer("[THANKS_FOR_CHOOSING_ME] [LETSGO]",
                              context=ContextTag(
                                  (context.ACCEPT, context.JOIN)),
                              subject=self,
                              effect=self._join_lance))

            mylist.append(plotutility.LMSkillsSelfIntro(npc))

        return mylist
示例#2
0
 def __call__(self, camp:gears.GearHeadCampaign):
     #print('Homing {} {}'.format(self.character,self.original_container))
     if not self.done:
         if self.character.is_not_destroyed() or not self.allow_death:
             #print("Checking...")
             self.character.restore_all()
             if self.character.scene is self.dest or not self.character.scene:
                 if hasattr(self.character, "container") and self.character.container:
                     self.character.container.remove(self.character)
                     #print("Removing")
                 if self.original_scene is not None:
                     self.original_scene.deploy_actor(self.character)
                 elif self.original_container is not None:
                     self.original_container.append(self.character)
                     #print("Appending")
                 else:
                     camp.freeze(self.character)
             if self.is_lancemate and camp.can_add_lancemate() and self.character.scene is camp.scene:
                 AutoJoiner(self.character)(camp)
             self.done = True
示例#3
0
    def NPC_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()
        npc = self.elements["NPC"]

        if camp.renown > npc.renown and self.shop_counter > 2 and npc.get_reaction_score(
                camp.pc, camp) > 20:
            mylist.append(
                Offer(
                    "[HELLO] You know, I think you have learned all that it is possible for me to teach. I wish I could leave this place and return to active duty.",
                    context=ContextTag((context.HELLO, )),
                    subject=self,
                    subject_start=True,
                ))

            if camp.can_add_lancemate():
                mylist.append(
                    Offer("I can't wait to be adventuring again. [LETSGO]",
                          context=ContextTag((context.CUSTOM, )),
                          subject=self,
                          effect=self._join_lance,
                          data={
                              "reply":
                              "It would be an honor to have you in my lance."
                          }))

            mylist.append(plotutility.LMSkillsSelfIntro(npc))

        mylist.append(
            Offer(
                "[HELLO] I have many years of experience as a cavalier... if you want, I could help you to improve your skills.",
                context=ContextTag((context.HELLO, )),
            ))

        mylist.append(
            Offer(
                "The secret to living a long life is to always be more prepared than your opponent.",
                context=ContextTag((context.OPEN_SCHOOL, )),
                effect=self._start_training))

        return mylist
示例#4
0
 def _get_generic_offers(self, npc: gears.base.Character,
                         camp: gears.GearHeadCampaign):
     """
     :type camp: gears.GearHeadCampaign
     :type npc: gears.base.Character
     """
     mylist = list()
     if npc.relationship and gears.relationships.RT_LANCEMATE in npc.relationship.tags:
         if camp.can_add_lancemate() and npc not in camp.party:
             # If the NPC has the lancemate tag, they might join the party.
             if npc.get_reaction_score(camp.pc, camp) < -20:
                 # A lancemate who is currently upset with the PC will not join the party.
                 mylist.append(
                     Offer("[JOIN_REFUSAL]",
                           is_generic=True,
                           context=ContextTag([context.JOIN])))
             elif npc.relationship.data.get("LANCEMATE_TIME_OFF",
                                            0) <= camp.day:
                 mylist.append(
                     Offer("[JOIN]",
                           is_generic=True,
                           context=ContextTag([context.JOIN]),
                           effect=game.content.plotutility.AutoJoiner(npc)))
             else:
                 # This NPC is taking some time off. Come back tomorrow.
                 mylist.append(
                     Offer("[COMEBACKTOMORROW_JOIN]",
                           is_generic=True,
                           context=ContextTag([context.JOIN])))
         elif npc in camp.party and gears.tags.SCENE_PUBLIC in camp.scene.attributes:
             mylist.append(
                 Offer("[LEAVEPARTY]",
                       is_generic=True,
                       context=ContextTag([context.LEAVEPARTY]),
                       effect=game.content.plotutility.AutoLeaver(npc)))
         mylist.append(LMSkillsSelfIntro(npc))
     return mylist
示例#5
0
    def NPC_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()
        npc: gears.base.Character = self.elements["NPC"]
        self.hire_cost = get_hire_cost(camp, npc)
        if gears.relationships.RT_LANCEMATE not in npc.relationship.tags:
            mylist.append(LMSkillsSelfIntro(npc))
            if not self._did_mecha_chat:
                mylist.append(Offer(
                    "[HELLO] I just checked cav-net and it says you are a cavalier?",
                    context=ContextTag((context.HELLO,)), subject=npc, subject_start=True
                ))

                pcmek: gears.base.Mecha = camp.get_pc_mecha(camp.pc)
                if pcmek:
                    engine, gyro = pcmek.get_engine_rating_and_gyro_status()
                    if engine > 1700:
                        opinion = "That makes it one of the most powerful mecha out there. When an engine that size blows up, it's really something."
                    elif engine > 1100:
                        opinion = "That makes it a powerful mecha. You could probably be an arena contender with something like that."
                    elif engine > 750:
                        opinion = "That makes it solidly above average. A good mecha, but maybe not a great one."
                    elif engine > 450:
                        opinion = "That is enough power to get by, I guess. If I were you I'd consider upgrading to a bigger engine."
                    elif engine > 0:
                        opinion = "That's a really tiny engine. Like, barely enough to move with. I'm not sure you could run a metro bus on that."
                    else:
                        opinion = "I don't know why you'd pilot a mecha without an engine in it, but I'll assume you have your reasons."
                    mylist.append(Offer(
                        "Did you know that the {} you pilot has a class {} engine? {}".format(pcmek.get_full_name(), engine, opinion),
                        context=ContextTag((context.CUSTOM,)), subject=npc,
                        data={"reply": "Yes, I am. Would you like to talk about mecha?"},
                        effect=self._complete_mecha_chat
                    ))

                else:
                    mylist.append(Offer(
                        "Well, it also says here that you are currently dispossessed, so I don't know what we would have to talk about. I have a {}.".format(npc.mecha_pref),
                        context=ContextTag((context.CUSTOM,)), subject=npc,
                        data={"reply": "Yes, I am. Would you like to talk about mecha?"},
                        effect=self._complete_mecha_chat
                    ))

                mylist.append(Offer(
                    "Mine is a {}. I'm hoping to get a better one someday but to do that I'd have to become a cavalier and go on missions.".format(npc.mecha_pref),
                    context=ContextTag((context.CUSTOMREPLY,)), subject=npc,
                    data={"subject": "your mecha", "reply": "[HELLO:INFO]"},
                    effect=self._complete_mecha_chat
                ))

            else:
                mylist.append(Offer(
                    "[HELLO] I have a {} and someday I will get the chance to use it.".format(npc.mecha_pref),
                    context=ContextTag((context.HELLO,))
                ))

                mylist.append(Offer(
                    "I would love to be a cavalier someday. First I'd need a lance to join. Trying to do that job by yourself is a quick path to an early grave. Or at least you could lose your mecha. I don't want to lose my mecha.",
                    context=ContextTag((context.INFO,context.PERSONAL)), subject=npc,
                    data={"subject": "cavaliers"}, no_repeats=True
                ))

                if camp.can_add_lancemate():
                    if camp.renown > npc.renown:
                        mylist.append(Offer("[IWOULDLOVETO] [THANKS_FOR_CHOOSING_ME]",
                                            context=ContextTag((context.PROPOSAL, context.JOIN)),
                                            data={"subject": "joining my lance"},
                                            effect=self._join_lance
                                            ))
                    else:
                        mylist.append(
                            Offer("I would love to join your lance but the standard rate for a pilot of my ranking is ${:,}. [DOYOUACCEPTMYOFFER]".format(self.hire_cost),
                                  context=ContextTag((context.PROPOSAL, context.JOIN)),
                                  data={"subject": "joining my lance"},
                                  subject=self, subject_start=True,
                                  ))
                        mylist.append(Offer("[DENY_JOIN] [GOODBYE]",
                                            context=ContextTag((context.DENY, context.JOIN)), subject=self
                                            ))
                        if camp.credits >= self.hire_cost:
                            mylist.append(Offer("[THANKS_FOR_CHOOSING_ME] [LETSGO]",
                                                context=ContextTag((context.ACCEPT, context.JOIN)), subject=self,
                                                effect=self._pay_to_join
                                                ))
        else:
            self.end_plot(camp)

        return mylist
示例#6
0
    def NPC_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()
        npc = self.elements["NPC"]
        self.hire_cost = get_hire_cost(camp, npc) * 2
        if gears.relationships.RT_LANCEMATE not in npc.relationship.tags:
            if self._rumor_memo_delivered:
                if camp.can_add_lancemate():
                    if npc.get_reaction_score(camp.pc, camp) > 60:
                        mylist.append(Offer("[IWOULDLOVETO] It's about time for me to get back in the saddle.",
                                            context=ContextTag((context.PROPOSAL, context.JOIN)),
                                            data={"subject": "joining my lance"},
                                            effect=self._join_lance
                                            ))
                    else:
                        mylist.append(
                            Offer("It'd take ${:,} to get me in the seat of a mech again. [DOYOUACCEPTMYOFFER]".format(
                                self.hire_cost),
                                  context=ContextTag((context.PROPOSAL, context.JOIN)),
                                  data={"subject": "joining my lance"},
                                  subject=self, subject_start=True,
                                  ))
                        mylist.append(Offer("[DENY_JOIN] [GOODBYE]",
                                            context=ContextTag((context.DENY, context.JOIN)), subject=self
                                            ))
                        if camp.credits >= self.hire_cost:
                            mylist.append(Offer("Huh, I really didn't expect you to pony up that much cash... [LETSGO]",
                                                context=ContextTag((context.ACCEPT, context.JOIN)), subject=self,
                                                effect=self._pay_to_join
                                                ))
            elif camp.pc.has_badge(gears.oldghloader.TYPHON_SLAYER.name):
                mylist.append(Offer(
                    "[HELLO] You're one of the cavaliers who defeated Typhon, aren't you?",
                    context=ContextTag([context.HELLO, ]), subject=npc, subject_start=True
                ))
                mylist.append(Offer(
                    "You probably don't remember me... I'm one of the pilots who also took part in the battle of Snake Lake, but just for a minute. Literally just a minute. Never even saw Typhon itself. Haven't piloted a mecha since.",
                    context=ContextTag([context.CUSTOM, ]), subject=npc,
                    data={"reply": "Yes, I am."}
                ))
                if npc.get_reaction_score(camp.pc, camp) > 20:
                    mylist.append(Offer("[IWOULDLOVETO] [LETSGO]",
                                        context=ContextTag((context.CUSTOMREPLY,)),
                                        data={"reply": "[INFO_PERSONAL:JOIN]"}, subject=npc,
                                        effect=self._join_lance
                                        ))
                else:
                    mylist.append(Offer("Nah, adventuring is a mug's game. I'm staying right here.",
                                        context=ContextTag((context.CUSTOMREPLY,)),
                                        data={"reply": "[INFO_PERSONAL:JOIN]"}, subject=npc,
                                        effect=self.end_plot
                                        ))
            mylist.append(LMSkillsSelfIntro(npc))

        else:
            mylist.append(Offer(
                "[HELLO] Be careful out there... all it takes is one little mistake to cost you everything.",
                context=ContextTag((context.HELLO,))
            ))
            self.end_plot(camp)

        return mylist