Beispiel #1
0
 def HOLO_BUMP(self, camp: gears.GearHeadCampaign):
     if not self.holo_unlocked:
         mypc = camp.do_skill_test(gears.stats.Knowledge, gears.stats.Biotechnology, self.rank, no_random=True)
         if mypc:
             if mypc == camp.pc:
                 pbge.alert("Your knowledge of PreZero technology allows you to recognize this machine as a PreZero computer interface. It shows this area as it existed before the Night of Fire, and traces Kerberos's route along what is now the highway.")
             else:
                 SimpleMonologueDisplay("I know what this is... it's an oldtype computer display. This hologram shows the megacity that used to exist around {METROSCENE}... Here you can see the path that Kerberos was supposed to take through the service tunnels.".format(**self.elements), mypc)(camp)
                 SimpleMonologueDisplay("Except, there are no service tunnels anymore. This area is the highway, now. Maybe we could use this computer to send Kerberos on a different path, one far away from human beings.", mypc)(camp, False)
             self.unlock_holo()
         else:
             mypc = camp.do_skill_test(gears.stats.Knowledge, gears.stats.Wildcraft, self.rank, no_random=True)
             if mypc:
                 if mypc == camp.pc:
                     pbge.alert("You quickly recognize the shifting geometric forms of this holographic display as the geological features of this area. The top layer must be the city as it existed before the Night of Fire, and the red path can only be Kerberos's route along what is now the highway.")
                 else:
                     SimpleMonologueDisplay("I don't know exactly what kind of machine this is, but I can tell you what it's showing- that's {METROSCENE}, or at least it's what {METROSCENE} was back when this was built.".format(**self.elements), mypc)(camp)
                     SimpleMonologueDisplay("I'd guess this line going through it is Kerberos's path. You see this valley? That's part of the highway now, and that's where we got attacked. Maybe we can use this to tell Kerberos where to go...", mypc)(camp, False)
                 self.unlock_holo()
             else:
                 mypc = camp.do_skill_test(gears.stats.Knowledge, gears.stats.Scouting, self.rank, difficulty=gears.stats.DIFFICULTY_HARD, no_random=True)
                 if mypc:
                     if mypc == camp.pc:
                         pbge.alert("It takes a minute before you realize that the holographic display is a map of the surrounding area. Of course, it's not the area as you know it today- this is how things were before the Night of Fire. Maybe you can use this to send Kerberos away.")
                     else:
                         SimpleMonologueDisplay("I can't believe it- this is a PreZero map of the area around {METROSCENE}! I've heard about holographic map projectors like this but this is my first time seeing one in the reals.".format(**self.elements), mypc)(camp)
                         SimpleMonologueDisplay("If I'm reading this right, this red line should be where Kerberos is going, and you can see how it intersects with where the highway passes through now. I wonder if we can use this to send Kerberos somewhere else?", mypc)(camp, False)
                     self.unlock_holo()
 def attempt_treatment(self, camp: gears.GearHeadCampaign,
                       npc: gears.base.Character):
     pbge.alert("You attempt to treat {} for {}...".format(
         npc, self.elements["DISEASE"]))
     if camp.do_skill_test(
             gears.stats.Knowledge,
             gears.stats.Medicine,
             self.rank,
             difficulty=gears.stats.DIFFICULTY_HARD,
     ):
         pbge.alert("{} is cured!".format(npc))
         camp.dole_xp(50)
         npc.relationship.history.append(
             gears.relationships.Memory(
                 "you cured me of {DISEASE}".format(**self.elements),
                 "I cured you of {DISEASE}".format(**self.elements),
                 reaction_mod=15,
                 memtags=(gears.relationships.MEM_AidedByPC, )))
         self._advance_challenge(camp)
     else:
         pbge.alert("You fail. {} goes home to rest.".format(npc))
         myvac = game.content.load_dynamic_plot(
             camp, "NPC_VACATION",
             PlotState().based_on(self, update_elements={"NPC": npc}))
         myvac.freeze_now(camp)
Beispiel #3
0
 def PATIENT_BED_menu(self, camp: gears.GearHeadCampaign, thingmenu):
     if not self.cured_patient:
         thingmenu.desc = "{PATIENT} lies unconscious in this bed, a victim of {DISEASE}. It is unknown how much time {PATIENT.gender.subject_pronoun} has left.".format(
             **self.elements)
         lm = camp.do_skill_test(gears.stats.Knowledge,
                                 gears.stats.Medicine,
                                 gears.stats.DIFFICULTY_LEGENDARY,
                                 no_random=True)
         if lm:
             self.party_doctor = lm
             if lm is camp.pc:
                 thingmenu.add_item(
                     "You believe {PATIENT} can be saved. Offer the doctors a second opinion."
                     .format(**self.elements), self._cure_disease)
             else:
                 thingmenu.items.append(
                     ghdialogue.ghdview.LancemateConvoItem(
                         "This is the wrong treatment for {DISEASE}... Let's talk to the doctors, I can save {PATIENT.gender.object_pronoun}."
                         .format(**self.elements),
                         self._cure_disease,
                         desc=None,
                         menu=thingmenu,
                         npc=lm))
         thingmenu.add_item(
             "Leave {PATIENT} in peace.".format(**self.elements), None)
     else:
         thingmenu.desc = "The bed is empty now. Maybe someone else will need it later."
def AddSkillBasedLancemateMenuItem(mymenu: pbge.rpgmenu.Menu,
                                   msg,
                                   value,
                                   camp: gears.GearHeadCampaign,
                                   stat_id,
                                   skill_id,
                                   rank,
                                   difficulty=gears.stats.DIFFICULTY_AVERAGE,
                                   pc_msg=None,
                                   no_random=False):
    # Add an item to this menu where a lancemate suggests something. Designed to be used with the above
    # SimpleMonologueMenu, but really it can be used with any menu.
    # Returns the lancemate who makes the suggestion, or None if there is no applicable lancemate.
    winner = camp.do_skill_test(stat_id,
                                skill_id,
                                rank,
                                difficulty,
                                include_pc=bool(pc_msg),
                                no_random=no_random)
    if winner:
        mylm = winner.get_pilot()
        if mylm is camp.pc and pc_msg:
            mymenu.add_item(pc_msg, value)
        else:
            mygrammar = pbge.dialogue.grammar.Grammar()
            pbge.dialogue.GRAMMAR_BUILDER(mygrammar, camp, mylm, camp.pc)
            true_msg = pbge.dialogue.grammar.convert_tokens(msg, mygrammar)
            mymenu.items.append(
                ghdialogue.ghdview.LancemateConvoItem(true_msg,
                                                      value,
                                                      desc=None,
                                                      menu=mymenu,
                                                      npc=mylm))
        return mylm
Beispiel #5
0
    def _choose_peace(self, camp: gears.GearHeadCampaign):
        self.peace_npc.relationship.reaction_mod += random.randint(1, 10)
        npc = self.elements["_commander"]
        if camp.do_skill_test(gears.stats.Ego, gears.stats.Negotiation,
                              npc.renown):
            ghcutscene.SimpleMonologueDisplay("[CHANGE_MIND_AND_RETREAT]", npc)

            pbge.alert("Your challengers flee the battlefield.")
            self.elements["_eteam"].retreat(camp)

            camp.check_trigger("ENDCOMBAT")
    def _computer_menu(self, camp: gears.GearHeadCampaign, thingmenu):
        if not self.fixed_computer:
            thingmenu.desc = "{} It is locked up in a magenta screen of death.".format(
                thingmenu.desc)
            pc1 = camp.do_skill_test(gears.stats.Craft,
                                     gears.stats.Computers,
                                     self.rank,
                                     gears.stats.DIFFICULTY_AVERAGE,
                                     untrained_ok=False,
                                     no_random=True)
            if pc1:
                if pc1 is camp.pc:
                    thingmenu.add_item("Reset the terminal.",
                                       self._fix_generator)
                else:
                    thingmenu.add_item(
                        "Ask {} to fix the problem.".format(pc1),
                        self._fix_generator)

            pc2 = camp.do_skill_test(gears.stats.Knowledge,
                                     gears.stats.Repair,
                                     self.rank,
                                     gears.stats.DIFFICULTY_HARD,
                                     untrained_ok=True,
                                     no_random=True)
            if pc2 and pc2 is not pc1:
                if pc2 is camp.pc:
                    thingmenu.add_item("Activate the autodiagnostic.",
                                       self._fix_generator)
                else:
                    thingmenu.add_item(
                        "Ask {} to fix the problem.".format(pc2),
                        self._fix_generator)

            if not (pc1 or pc2):
                thingmenu.add_item("Try to fix it.", self._fix_failed)
            thingmenu.add_item("Leave it alone.", None)
    def _generator_menu(self, camp: gears.GearHeadCampaign, thingmenu):
        if not self.fixed_generator:
            thingmenu.desc = "{} The screen is blank and none of the lights are on.".format(
                thingmenu.desc)
            pc1 = camp.do_skill_test(gears.stats.Craft,
                                     gears.stats.Repair,
                                     self.rank,
                                     gears.stats.DIFFICULTY_EASY,
                                     untrained_ok=False,
                                     no_random=True)
            if pc1:
                if pc1 is camp.pc:
                    thingmenu.add_item("Repair the terminal.",
                                       self._fix_generator)
                else:
                    thingmenu.add_item(
                        "Ask {} to repair the terminal.".format(pc1),
                        self._fix_generator)

            pc2 = camp.do_skill_test(gears.stats.Craft,
                                     gears.stats.Science,
                                     self.rank,
                                     gears.stats.DIFFICULTY_HARD,
                                     untrained_ok=True,
                                     no_random=True)
            if pc2 and pc2 is not pc1:
                if pc2 is camp.pc:
                    thingmenu.add_item("Jury rig a solution.",
                                       self._fix_generator)
                else:
                    thingmenu.add_item(
                        "Ask {} to jury rig a solution.".format(pc2),
                        self._fix_generator)

            if not (pc1 or pc2):
                thingmenu.add_item("Repair the terminal.", self._fix_failed)