def custom_init(self, nart): myscene = self.elements["LOCALE"] self.register_element("ROOM", pbge.randmaps.rooms.FuzzyRoom( 15, 15, anchor=pbge.randmaps.anchors.middle), dident="LOCALE") team2 = self.register_element( "_eteam", teams.Team(enemies=(myscene.player_team, )), dident="ROOM") mynpc = self.elements["LMNPC"] self.locked_elements.add("LMNPC") self.party_member = mynpc in nart.camp.party if self.party_member: plotutility.AutoLeaver(mynpc)(nart.camp) plotutility.CharacterMover(nart.camp, self, mynpc, myscene, team2, allow_death=False) self.obj = adventureseed.MissionObjective( "Defeat {}".format(mynpc), missionbuilder.MAIN_OBJECTIVE_VALUE * 2) self.adv.objectives.append(self.obj) self.intro_ready = True return True
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
def start_recovery(self, camp): npc = self.elements["NPC"] garage = self.elements["GARAGE"] SimpleMonologueDisplay( "My mecha was destroyed... I'm going to go to {} and get a new one." .format(garage), npc)(camp) plotutility.AutoLeaver(npc)(camp) npc.place(garage)
def _quit_lance(self, camp): self.elements["NPC"].relationship.role = gears.relationships.R_ADVERSARY self.elements["NPC"].dole_experience(200) self.elements["NPC"].relationship.history.append(gears.relationships.Memory( "I found out about your criminal past", "You went snooping around in my business", -25, (gears.relationships.MEM_Ideological,) )) plotutility.AutoLeaver(self.elements["NPC"])(camp) self.proper_end_plot(camp,False)
def _get_grabbed_by_kerberos(self, camp: gears.GearHeadCampaign, pc): camp.scene.contents.remove(pc) pilot = pc.get_pilot() if pilot is camp.pc: camp.destination, camp.entrance = self.elements["DUNGEON_ENTRANCE"], self.elements["KIDNAP_ROOM_WP"] camp.campdata["KERBEROS_DUNGEON_OPEN"] = True else: plotutility.AutoLeaver(pilot)(camp) self.elements["DUNGEON_ENTRANCE"].deploy_team([pilot,],self.elements["KIDNAP_TEAM"]) self.kidnapped_pilots.append(pilot)
def start_recovery(self, camp): npc = self.elements["NPC"] garage = self.elements["GARAGE"] SimpleMonologueDisplay( "My mecha was destroyed... I'm going to go to {} and get a new one." .format(garage), npc)(camp) if random.randint(1, 10) == 1: # Random chance that instead of getting the same mecha, they'll look for a new kind. npc.mecha_pref = None plotutility.AutoLeaver(npc)(camp) npc.place(garage)
def start_recovery(self, camp): npc = self.elements["NPC"] garage = self.elements["GARAGE"] SimpleMonologueDisplay( "[TIME_TO_UPGRADE_MECHA] I'm going to {} to see what they have.". format(garage), npc)(camp) npc.relationship.development_plots += 1 npc.relationship.data["mecha_level_bonus"] = npc.relationship.data.get( "mecha_level_bonus", 0) + 10 npc.mecha_pref = None plotutility.AutoLeaver(npc)(camp) npc.place(garage)
def start_recovery(self, camp): npc = self.elements["NPC"] hospital = self.elements["HOSPITAL"] pbge.alert("{} is rushed to {}.".format(npc, hospital)) plotutility.AutoLeaver(npc)(camp) npc.place(hospital)