示例#1
0
 def METROSCENE_ENTER(self, camp: gears.GearHeadCampaign):
     # Upon entering this scene, deal with any dead or incapacitated party members.
     # Also, deal with party members who have lost their mecha. This may include the PC.
     camp.home_base = (self.elements["METROSCENE"],self.elements["MISSION_GATE"])
     etlr = plotutility.EnterTownLanceRecovery(camp, self.elements["METROSCENE"], self.elements["METRO"])
     if not etlr.did_recovery:
         # We can maybe load a lancemate scene here. Yay!
         if not any(p for p in camp.all_plots() if hasattr(p, "LANCEDEV_PLOT") and p.LANCEDEV_PLOT):
             nart = content.GHNarrativeRequest(camp, pbge.plots.PlotState().based_on(self), adv_type="DZD_LANCEDEV", plot_list=content.PLOT_LIST)
             if nart.story:
                 nart.build()
示例#2
0
    def METROSCENE_ENTER(self, camp: gears.GearHeadCampaign):
        # Upon entering this scene, deal with any dead or incapacitated party members.
        # Also, deal with party members who have lost their mecha. This may include the PC.
        etlr = plotutility.EnterTownLanceRecovery(camp,
                                                  self.elements["METROSCENE"],
                                                  self.elements["METRO"])
        if not camp.is_unfavorable_to_pc(self.elements["METROSCENE"]):
            camp.home_base = self.elements["MISSION_GATE"]

            if camp.campdata.get(LANCEDEV_ENABLED, False) and random.randint(
                    1, 3) == 2 and not etlr.did_recovery:
                # We can maybe load a lancemate scene here. Yay!
                if camp.campdata[LANCEDEV_ENABLED](camp):
                    nart = GHNarrativeRequest(
                        camp,
                        pbge.plots.PlotState().based_on(self),
                        adv_type="LANCEDEV",
                        plot_list=PLOT_LIST)
                    if nart.story:
                        nart.build()