コード例 #1
0
    def METROSCENE_ENTER(self,camp: gears.GearHeadCampaign):
        if not self.started_convo:
            npc: gears.base.Character = self.elements["NPC"]
            pbge.alert("As you enter {METROSCENE}, {NPC} pulls you aside for a private talk.".format(**self.elements))
            if npc.get_reaction_score(camp.pc, camp) > 20:
                ghcutscene.SimpleMonologueDisplay(
                    "When we started, I was suspicious of you. I didn't know what kind of person you were. But now, after all we've been through, I do know. I want you to know that I believe in you and I'm glad to be your lancemate.",
                    npc
                )(camp)
                npc.relationship.role = relationships.R_COLLEAGUE
                npc.relationship.attitude = relationships.A_FRIENDLY
                camp.dole_xp(200)
                self.proper_end_plot(camp)
            else:
                ghcutscene.SimpleMonologueDisplay(
                    "When we started, I was suspicious of you. I didn't know what kind of person you were. But now, I do know, and I no longer want anything to do with you. If we ever meet again, it will be on opposite sides of the battlefield.",
                    npc
                )(camp)
                npc.relationship.role = relationships.R_ADVERSARY
                npc.relationship.attitude = relationships.A_RESENT
                if relationships.RT_LANCEMATE in npc.relationship.tags:
                    npc.relationship.tags.remove(relationships.RT_LANCEMATE)
                plotutility.AutoLeaver(npc)(camp)
                camp.freeze(npc)
                npc.relationship.history.append(gears.relationships.Memory(
                    "I quit your lance", "you quit my lance", -10,
                    (gears.relationships.MEM_Ideological,)
                ))
                self.proper_end_plot(camp)

            self.started_convo = True
コード例 #2
0
 def ANGELEGG_BUMP(self, camp: gears.GearHeadCampaign):
     if not self.found_egg:
         pbge.alert(
             "You find a large crystal dome that seems to have been uncovered by a construction project. Movement is visible on the inside. A thick violet fluid leaks from a crack near the bottom."
         )
         if len(camp.get_active_lancemates()) >= 2:
             mypcs = random.sample(camp.get_active_lancemates(), 2)
             ghcutscene.SimpleMonologueDisplay(
                 "[WE_ARE_IN_DANGER] Do any of you know what this thing is? It looks like an egg... a giant one."
                 .format(**self.elements), mypcs[0])(camp, False)
             ghcutscene.SimpleMonologueDisplay(
                 "[I_DONT_KNOW] Whatever it is, I'm guessing it's not a coincidence that the entire town just got destroyed."
                 .format(**self.elements), mypcs[1])(camp, False)
         self.found_egg = True
コード例 #3
0
 def _end_the_party(self, camp):
     ghcutscene.SimpleMonologueDisplay(
         "[THIS_IS_AN_EMERGENCY] I just got a distress call from {DOOMED_VILLAGE}- right before the comm signal cut out entirely. Could you go there and make sure everything is alright?".format(**self.elements),
         self.elements["DZ_CONTACT"]
     )(camp, True)
     camp.check_trigger("WIN", self)
     self.end_plot(camp)
コード例 #4
0
 def NPC_WIN(self, camp):
     # Check this trigger if PC wins combat.
     ghcutscene.SimpleMonologueDisplay(
         "[THANKS_FOR_MECHA_COMBAT_HELP] I'll see you around, [audience].",
         self.elements["NPC"])(camp)
     npc: gears.base.Character = self.elements["NPC"]
     while npc.get_reaction_score(camp.pc, camp) < 1:
         npc.relationship.reaction_mod += random.randint(1, 20)
コード例 #5
0
 def t_START(self, camp):
     npc = self.elements["NPC"]
     if not self.accepted_duel:
         super().t_START(camp)
     elif npc.is_destroyed():
         self.end_plot(camp)
     if self.duel.is_completed():
         if self.duel.is_won():
             npc.relationship.attitude = gears.relationships.A_JUNIOR
             ghcutscene.SimpleMonologueDisplay(
                 "Your skills are incredible. It seems I have a lot to learn from you.",
                 npc)(camp)
         else:
             npc.relationship.attitude = gears.relationships.A_SENIOR
             ghcutscene.SimpleMonologueDisplay(
                 "You show great potential, but you aren't quite there yet. Maybe someday we can have a rematch.",
                 npc)(camp)
         self.proper_end_plot(camp)
コード例 #6
0
 def NPC_WIN(self, camp):
     # Check this trigger if PC wins combat.
     ghcutscene.SimpleMonologueDisplay(
         "[THANKS_FOR_MECHA_COMBAT_HELP] I better get back to base.",
         self.elements["NPC"])(camp)
     self.elements["NPC"].relationship.history.append(
         Memory("you fought at my side",
                "I helped you in battle",
                5,
                memtags=(relationships.MEM_AidedByPC, )))
コード例 #7
0
    def _choose_peace(self, camp: gears.GearHeadCampaign):
        self.peace_npc.relationship.reaction_mod += random.randint(1, 10)
        npc = self.elements["_commander"]
        if camp.make_skill_roll(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")
コード例 #8
0
    def NPC_WIN(self, camp: gears.GearHeadCampaign):
        # Check this trigger if PC wins combat.
        npc: gears.base.Character = self.elements["NPC"]

        if npc.get_reaction_score(
                camp.pc, camp) > random.randint(40, 80) - camp.get_party_skill(
                    gears.stats.Charm, gears.stats.Negotiation):
            ghcutscene.SimpleMonologueDisplay(
                "[THANKS_FOR_MECHA_COMBAT_HELP] Let me know if you ever need me to return the favor.",
                self.elements["NPC"])(camp)
            npc.relationship.tags.add(gears.relationships.RT_LANCEMATE)
            npc.relationship.history.append(
                Memory("I promised to help you if you ever needed help",
                       "you promised to help me when I needed you",
                       15,
                       memtags=(relationships.MEM_AidedByPC, )))
        else:
            ghcutscene.SimpleMonologueDisplay("[THANKS_FOR_MECHA_COMBAT_HELP]",
                                              self.elements["NPC"])(camp)
            npc.relationship.reaction_mod += random.randint(1, 10)
コード例 #9
0
    def _give_speech(self, camp):
        pbge.alert(
            "At this suggestion, everyone in the bar turns to you and applauds. It seems you won't be getting out of here tonight without saying a few words."
        )

        mymenu = pbge.rpgmenu.AlertMenu(
            "How do you want to begin your speech?")
        mymenu.add_item("Start on a joke.", "[DZDC_VICTORY_PARTY:TRY_FUNNY]")
        mymenu.add_item("Introduce yourself.",
                        "[DZDC_VICTORY_PARTY:TRY_INTRODUCTION]")

        answer = mymenu.query()
        if answer:
            ghcutscene.SimpleMonologueDisplay(answer, camp.pc)(camp, False)
        else:
            ghcutscene.SimpleMonologueDisplay("...", camp.pc)(camp, False)
            pbge.alert("The rest of the party watches you with anticipation.")

        mymenu = pbge.rpgmenu.AlertMenu("What will you say next?")
        mymenu.add_item("Tell then about securing the highway.",
                        "[DZDC_VICTORY_PARTY:TELL_HIGHWAY]")
        mymenu.add_item("Tell them about the adventures you've had.",
                        "[DZDC_VICTORY_PARTY:TELL_ADVENTURES]")

        answer = mymenu.query()
        if answer:
            ghcutscene.SimpleMonologueDisplay(answer, camp.pc)(camp, False)
        else:
            ghcutscene.SimpleMonologueDisplay("um...", camp.pc)(camp, False)
            pbge.alert("Everybody stares at you expectantly.")

        mymenu = pbge.rpgmenu.AlertMenu("How will you conclude?")
        mymenu.add_item(
            "Make a toast to {}.".format(self.elements["METROSCENE"]),
            "[DZDC_VICTORY_PARTY:TOAST_TOWN]")
        mymenu.add_item(
            "Thank {} for {} help.".format(
                self.elements["DZ_CONTACT"],
                self.elements["DZ_CONTACT"].gender.possessive_determiner),
            "[DZDC_VICTORY_PARTY:TOAST_SHERIFF]")

        answer = mymenu.query()
        if answer:
            ghcutscene.SimpleMonologueDisplay(answer, camp.pc)(camp, False)
            pbge.alert(
                "The people in the bar give you a round of thunderous applause."
            )
        else:
            ghcutscene.SimpleMonologueDisplay(
                "...and that's all I have to say about that.", camp.pc)(camp,
                                                                        False)
            pbge.alert(
                "The people in the bar nod in polite silence and then get back to whatever they were doing before."
            )

        pbge.alert(
            "As you finish your speech, {} rushes over and pulls you aside.".
            format(self.elements["DZ_CONTACT"]))
        self._end_the_party(camp)
コード例 #10
0
 def attempt_computers(self, camp):
     pc = camp.make_skill_roll(gears.stats.Perception,
                               gears.stats.Computers, self.rank)
     if pc:
         if pc.get_pilot() is camp.pc:
             pbge.alert(
                 "After the battle, you hack into one of the enemy's navcomps and learn the location of {}."
                 .format(self.elements["ENEMY_BASE_NAME"]))
         else:
             ghcutscene.SimpleMonologueDisplay(
                 "[LOOK_AT_THIS] I managed to hack into their navcomp and found out where {} is."
                 .format(self.elements["ENEMY_BASE_NAME"]), pc)(camp)
         self.find_the_base(camp, True)
コード例 #11
0
 def attempt_wildcraft(self, camp):
     pc = camp.make_skill_roll(gears.stats.Perception,
                               gears.stats.Wildcraft, self.rank)
     if pc:
         if pc.get_pilot() is camp.pc:
             pbge.alert(
                 "After the battle, you find tracks leading directly back to {}."
                 .format(self.elements["ENEMY_BASE_NAME"]))
         else:
             ghcutscene.SimpleMonologueDisplay(
                 "Take a look at these tracks... I think we can trace them back to {}."
                 .format(self.elements["ENEMY_BASE_NAME"]), pc)(camp)
         self.find_the_base(camp, True)
コード例 #12
0
 def _pay_respects(self, camp: gears.GearHeadCampaign):
     self.paid_respects = True
     candidates = list()
     for pc in camp.get_active_party():
         if pc is not camp.pc and isinstance(pc, gears.base.Character) and pc.get_tags().intersection(
                 {gears.tags.Faithworker, gears.personality.Fellowship}):
             candidates.append(pc)
             pc.relationship.reaction_mod += random.randint(3, 8)
     if candidates:
         speaker = random.choice(candidates)
     else:
         speaker = camp.pc
     ghcutscene.SimpleMonologueDisplay("[EULOGY]", speaker)(camp)
     camp.dole_xp(100)
コード例 #13
0
 def _eteam_ACTIVATETEAM(self, camp):
     if self.intro_ready:
         self.eteam_activated = True
         if not self.pilot_fled:
             if self.intimidation_primed:
                 pbge.alert(
                     "The hostile mecha freeze at the sight of {} striding confidently into battle."
                     .format(self.intimidating_npc))
                 ghcutscene.SimpleMonologueDisplay(
                     "[THREATEN]", self.intimidating_npc)(camp)
                 pbge.alert("The hostile mecha flee the battlefield.")
                 self.elements["_eteam"].retreat(camp)
             else:
                 npc = self.elements["PILOT"]
                 camp.check_trigger("START", npc)
                 camp.fight.active.append(self.elements["SURVIVOR"])
         self.intro_ready = False
コード例 #14
0
 def _cure_disease(self, camp: gears.GearHeadCampaign):
     nurse = self.elements["NURSE"]
     if nurse in camp.scene.contents:
         ghcutscene.SimpleMonologueDisplay(
             "We have tried all we can here. If you know of another treatment, then please do what you can.",
             nurse)(camp)
     if self.party_doctor is camp.pc:
         pbge.alert(
             "You attempt emergency treatment for {PATIENT}'s {DISEASE}.".
             format(**self.elements))
     else:
         pbge.alert(
             "{LM} attempts emergency treatment for {PATIENT}'s {DISEASE}.".
             format(LM=self.party_doctor, **self.elements))
     pbge.alert("The treatment is successful!")
     self.cured_patient = True
     mybed = self.elements["PATIENT_BED"]
     mybed.get_out_of_bed()
     camp.scene.place_gears_near_spot(*mybed.pos, camp.scene.civilian_team,
                                      self.elements["PATIENT"])
     camp.dole_xp(200)
コード例 #15
0
 def NPC_START(self, camp):
     # Check this trigger when combat is started.
     ghcutscene.SimpleMonologueDisplay(self.START_COMBAT_MESSAGE,
                                       self.elements["NPC"])(camp)
コード例 #16
0
 def NPC_WIN(self, camp):
     # Check this trigger if PC wins combat.
     ghcutscene.SimpleMonologueDisplay(
         "[THANKS_FOR_MECHA_COMBAT_HELP] I better get back to base.",
         self.elements["NPC"])(camp)