示例#1
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
示例#2
0
 def CHUTE_menu(self, camp: gears.GearHeadCampaign, thingmenu):
     thingmenu.desc = "This boarding chute leads to\n your {}.".format(camp.get_pc_mecha(camp.pc).get_full_name())
     thingmenu.add_item("Board mecha",self._start_mission)
     if pbge.util.config.getboolean( "GENERAL", "dev_mode_on"):
         thingmenu.add_item("Don't panic and go to Wujung",self._skip_first_mission)