def __init__(self,camp,metroscene,metro): creds = camp.totally_restore_party() self.did_recovery = False if creds > 0: pbge.alert("Repair/Reload: ${}".format(creds)) camp.credits -= creds camp.day += 1 if camp.incapacitated_party or camp.dead_party or any([pc for pc in camp.get_lancemates() if not camp.get_pc_mecha(pc)]): # Go through the injured/dead lists and see who needs help. if camp.pc not in camp.party: # This is serious. init = pbge.plots.PlotState(elements={"METRO":metro,"METROSCENE":metroscene}) nart = GHNarrativeRequest(camp,init,adv_type="RECOVER_PC",plot_list=PLOT_LIST) if nart.story: nart.build() nart.story.start_recovery(camp) self.did_recovery = True else: print(nart.errors) else: init = pbge.plots.PlotState(elements={"METRO":metro,"METROSCENE":metroscene}) nart = GHNarrativeRequest(camp,init,adv_type="RECOVER_LANCE",plot_list=PLOT_LIST) if nart.story: nart.build() nart.story.start_recovery(camp) self.did_recovery = True
def METROSCENE_ENTER(self, camp): # 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 etlr.did_recovery: # We can maybe load a lancemate scene here. Yay! nart = GHNarrativeRequest(camp, pbge.plots.PlotState().based_on(self), adv_type="DZD_LANCEDEV", plot_list=PLOT_LIST) if nart.story: nart.build()
def __call__(self, camp): """ :type camp: gears.GearHeadCampaign """ if self.auto_set_rank: self.pstate.rank = camp.pc.renown nart = GHNarrativeRequest(camp, self.pstate, self.adv_type, PLOT_LIST) if nart.story: nart.build() self.started = True camp.check_trigger("UPDATE") else: for e in nart.errors: print e
def __init__(self, camp, metroscene, metro): # Go through the injured/dead lists and see who needs help. myreports = list() if camp.pc not in camp.party: # This is serious. init = pbge.plots.PlotState(elements={ "METRO": metro, "METROSCENE": metroscene }) nart = GHNarrativeRequest(camp, init, adv_type="RECOVER_PC", plot_list=PLOT_LIST) if nart.story: nart.build() nart.story.start_recovery(camp) else: pass
def __call__(self, camp): """ :type camp: gears.GearHeadCampaign """ if not self.started: if self.auto_set_rank: self.pstate.rank = camp.pc.renown nart = GHNarrativeRequest(camp, self.pstate, self.adv_type, PLOT_LIST) if nart.story: self.root_plot = nart.story nart.build() self.started = True camp.check_trigger("UPDATE") else: for e in nart.errors: print(e) self.root_plot.start_mission(camp)
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()