def _fix_generator(self, camp: gears.GearHeadCampaign): pbge.alert( "You repair the terminal. Soon the generator coils beneath your feet begin to hum with energy once more." ) self.fixed_generator = True camp.dole_xp(100, gears.stats.Repair) camp.dole_xp(100, gears.stats.Science)
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)
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 _fix_generator(self, camp: gears.GearHeadCampaign): pbge.alert( "You identify and solve the system error. The computer reboots without a hitch." ) self.fixed_computer = True camp.dole_xp(100, gears.stats.Repair) camp.dole_xp(100, gears.stats.Computers)
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)
def t_ENDCOMBAT(self, camp: gears.GearHeadCampaign): myteam = self.elements["_eteam"] if len(myteam.get_members_in_play(camp)) < 1: self.obj.win(camp, 100) target = self.elements["_commander"].get_root() if not target.is_operational(): if self.chose_glory: for sk in gears.stats.COMBATANT_SKILLS: camp.dole_xp(50, sk) if self.bounty_primed: bounty_amount = gears.selector.calc_threat_points( self.elements["_commander"].renown, 200) // 5 pbge.alert( "You earn a bounty of ${:,} for defeating {}.".format( bounty_amount, self.elements["_commander"])) camp.credits += bounty_amount
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)
def _win_mission(self, camp: gears.GearHeadCampaign): camp.party.append(self.reward) camp.dole_xp(100) self.end_plot(camp)
def _win_mission(self, camp: gears.GearHeadCampaign): camp.dole_xp(100) self.end_plot(camp)
def _win_challenge(self, camp: gears.GearHeadCampaign): camp.check_trigger("WIN", self) camp.dole_xp(200) self.end_plot(camp)
def _win_challenge(self, camp: gears.GearHeadCampaign): camp.check_trigger("WIN", self) camp.dole_xp(100) camp.freeze(self.elements["CULPRIT"]) camp.credits += gears.selector.calc_mission_reward(self.rank, 150) self.end_plot(camp)
def _steal_card(self, camp: gears.GearHeadCampaign): camp.dole_xp(200, gears.stats.Stealth) self.elements["BOUNCER"].relationship.reaction_mod -= 10 self.win_missiom(camp)