Example #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
Example #2
0
 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)
Example #3
0
 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)
Example #5
0
 def HOLO_BUMP(self, camp: gears.GearHeadCampaign):
     if not self.holo_unlocked:
         mypc = camp.make_skill_roll(gears.stats.Knowledge, gears.stats.Biotechnology, self.rank, no_random=True)
         if mypc:
             if mypc == camp.pc:
                 pbge.alert("Your knowledge of PreZero technology allows you to recognize this machine as a PreZero computer interface. It shows this area as it existed before the Night of Fire, and traces Kerberos's route along what is now the highway.")
             else:
                 SimpleMonologueDisplay("I know what this is... it's an oldtype computer display. This hologram shows the megacity that used to exist around {METROSCENE}... Here you can see the path that Kerberos was supposed to take through the service tunnels.".format(**self.elements), mypc)(camp)
                 SimpleMonologueDisplay("Except, there are no service tunnels anymore. This area is the highway, now. Maybe we could use this computer to send Kerberos on a different path, one far away from human beings.", mypc)(camp, False)
             self.unlock_holo()
         else:
             mypc = camp.make_skill_roll(gears.stats.Knowledge, gears.stats.Wildcraft, self.rank, no_random=True)
             if mypc:
                 if mypc == camp.pc:
                     pbge.alert("You quickly recognize the shifting geometric forms of this holographic display as the geological features of this area. The top layer must be the city as it existed before the Night of Fire, and the red path can only be Kerberos's route along what is now the highway.")
                 else:
                     SimpleMonologueDisplay("I don't know exactly what kind of machine this is, but I can tell you what it's showing- that's {METROSCENE}, or at least it's what {METROSCENE} was back when this was built.".format(**self.elements), mypc)(camp)
                     SimpleMonologueDisplay("I'd guess this line going through it is Kerberos's path. You see this valley? That's part of the highway now, and that's where we got attacked. Maybe we can use this to tell Kerberos where to go...", mypc)(camp, False)
                 self.unlock_holo()
             else:
                 mypc = camp.make_skill_roll(gears.stats.Knowledge, gears.stats.Scouting, self.rank, difficulty=gears.stats.DIFFICULTY_HARD, no_random=True)
                 if mypc:
                     if mypc == camp.pc:
                         pbge.alert("It takes a minute before you realize that the holographic display is a map of the surrounding area. Of course, it's not the area as you know it today- this is how things were before the Night of Fire. Maybe you can use this to send Kerberos away.")
                     else:
                         SimpleMonologueDisplay("I can't believe it- this is a PreZero map of the area around {METROSCENE}! I've heard about holographic map projectors like this but this is my first time seeing one in the reals.".format(**self.elements), mypc)(camp)
                         SimpleMonologueDisplay("If I'm reading this right, this red line should be where Kerberos is going, and you can see how it intersects with where the highway passes through now. I wonder if we can use this to send Kerberos somewhere else?", mypc)(camp, False)
                     self.unlock_holo()
Example #6
0
 def find_the_base(self, camp: gears.GearHeadCampaign, win_mission=False):
     self.elements["FIND_BASE_FUN"](camp)
     camp.go(self.elements["ADVENTURE_RETURN"])
     if win_mission:
         self.adv.end_adventure(camp)
     else:
         self.adv.cancel_adventure(camp)
    def t_START(self, camp: gears.GearHeadCampaign):
        pbge.alert("With time running out, the Terran Defense Force launches an all-out attack using the Voice of Iijima. Saturation bombing is used in an attempt to kill Cetus before it can jet away.")
        pbge.alert("{} is utterly destroyed in the crossfire. Following the battle the Defense Force claims that Cetus has been eliminated, though no remains are ever recovered.".format(camp.campdata[DZDCVAR_CETUS_TOWN]))
        pbge.alert("Relations between the greenzone cities and the towns of the deadzone become more strained than they were before. For better or worse, your role in these events is mostly forgotten.")

        camp.pc.add_badge(DISASTER_MAGNET)

        camp.eject()
Example #8
0
 def apply(self, camp: gears.GearHeadCampaign):
     camp.year = self.date[0]
     # Compatibility code for v0.600 and previous: past_adventures used to be a list, but we wanna make sure
     # it's a set.
     if not isinstance(camp.egg.past_adventures, set):
         camp.egg.past_adventures = set()
     camp.egg.past_adventures.add(self.name)
     if self.convoborder:
         camp.convoborder = self.convoborder
 def BIOMACHINE_menu(self, camp: gears.GearHeadCampaign, thingmenu):
     if camp.party_has_skill(
             gears.stats.Biotechnology) or camp.party_has_skill(
                 gears.stats.Science):
         thingmenu.desc = "{} It seems to be a detoxification processor; perhaps Kerberos has been removing contaminants from the soil it consumes.".format(
             thingmenu.desc)
     else:
         thingmenu.desc = "{} It seems to be digesting something.".format(
             thingmenu.desc)
 def _smash(self, camp: gears.GearHeadCampaign):
     pbge.alert(
         "You smash the computer until the lights stop blinking. Then you smash it a bit more just to be safe. If that doesn't take care of the zombie mecha problem, you're not sure what will.")
     self.zombots_active = False
     self.subplots["OUTENCOUNTER"].end_plot(camp)
     camp.check_trigger("WIN", self)
     BiotechDiscovery(camp, "I found an old zombot-infested biotech laboratory.",
                      "[THATS_INTERESTING] I'll get one of our hazmat recovery teams to check it out. Here is the {cash} you've earned.",
                      self.rank//2)
Example #11
0
    def __init__(self, camp: gears.GearHeadCampaign):
        pbge.please_stand_by()
        self.camp = camp
        self.scene = camp.scene
        self.view = scenes.viewer.SceneView(camp.scene)
        self.mapcursor = pbge.image.Image('sys_mapcursor.png', 64, 64)
        self.time = 0

        self.threat_tiles = set()
        self.threat_viewer = pbge.scenes.areaindicator.AreaIndicator(
            "sys_threatarea.png")

        self.record_count = 0

        # Preload some portraits and sprites.
        self.preloads = list()
        for pc in self.scene.contents:
            if hasattr(pc, 'get_portrait'):
                self.preloads.append(pc.get_portrait())
                if hasattr(pc, 'get_pilot'):
                    pcp = pc.get_pilot()
                    if pcp and pcp is not pc and hasattr(pcp, 'get_portrait'):
                        self.preloads.append(pcp.get_portrait())
            if hasattr(pc, 'get_sprite'):
                self.preloads.append(pc.get_sprite())

        # Preload the music as well.
        if pbge.util.config.getboolean("GENERAL", "music_on"):
            if hasattr(self.scene, 'exploration_music'):
                pbge.my_state.locate_music(self.scene.exploration_music)
            if hasattr(self.scene, 'combat_music'):
                pbge.my_state.locate_music(self.scene.combat_music)

        # Update the view of all party members.
        first_pc = None
        for pc in camp.get_active_party():
            if pc.pos and pc.is_operational():
                x, y = pc.pos
                scenes.pfov.PCPointOfView(
                    camp.scene, x, y, pc.get_sensor_range(self.scene.scale))
                if not first_pc:
                    first_pc = pc

        # Focus on the first PC.
        if first_pc:
            x, y = first_pc.pos
            self.view.focus(x, y)

        # Make sure all graphics are updated.
        for thing in self.scene.contents:
            if hasattr(thing, 'update_graphics'):
                thing.update_graphics()

        # Save the game, if the config says to.
        if pbge.util.config.getboolean("GENERAL", "auto_save"):
            camp.save()
Example #12
0
 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)
Example #13
0
 def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
     if self.intro_ready:
         self.intro_ready = False
         candidates = list()
         if camp.party_has_skill(gears.stats.Scouting):
             candidates.append(self.attempt_scouting)
         if camp.party_has_skill(gears.stats.Stealth):
             candidates.append(self.attempt_stealth)
         if candidates:
             random.choice(candidates)(camp)
Example #14
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()
 def _shutdown(self, camp: gears.GearHeadCampaign):
     pbge.alert(
         "You activate the emergency shutdown. For the first time in nearly two hundred years, the computer powers off and comes to a rest.")
     self.zombots_active = False
     self.safe_shutdown = True
     if self.beta_full:
         self.set_collector = True
     self.subplots["OUTENCOUNTER"].end_plot(camp)
     camp.check_trigger("WIN", self)
     BiotechDiscovery(camp, "I found a PreZero lab where they were developing self-repair technology",
                      "[THATS_INTERESTING] This could be a very important discovery; I'd say it's easily worth {cash}.", self.rank+15)
    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")
 def t_START(self, camp: gears.GearHeadCampaign):
     pbge.alert("The bombardment from the Voice of Iijima leaves a crater a kilometer across. No remains of Cetus are ever found, and the biomonster is presumed eliminated.")
     pbge.alert("The meagre farmland around {} is polluted by the fallout. Though the Terran Federation provides food aid to the community, the trust between them has been lost.".format(camp.campdata[DZDCVAR_CETUS_TOWN]))
     pbge.alert("You are welcomed as a hero in the greenzone, though a part of you continues to wonder if this is truly over...")
     total_qol = get_current_qol_total(camp, self.elements["DZ_ROADMAP"])
     if total_qol < camp.campdata["INITIAL_QOL"]:
         camp.pc.add_badge(DISASTER_MAGNET)
     camp.pc.add_badge(gears.meritbadges.TagReactionBadge(
         "GreenZone Hero", "You helped the Terran Defense Force to defeat Cetus before it could reach the green zone.",
         {gears.personality.DeadZone: -10, gears.personality.GreenZone: 10}
     ))
     camp.eject()
 def t_START(self, camp: gears.GearHeadCampaign):
     pbge.alert("The communities of the dead zone celebrate your victory over Cetus. Many of the local leaders enter talks to expand trade and mutual defense pacts between their isolated settlements.")
     pbge.alert("Within the green zone the Terran Defense Force claims this outcome was a result of their deterrence strategy, though some of the commanders resent you for letting Cetus get away.")
     pbge.alert("Cetus does not return to trouble this part of the world again.")
     total_qol = get_current_qol_total(camp, self.elements["DZ_ROADMAP"])
     if total_qol < camp.campdata["INITIAL_QOL"]:
         camp.pc.add_badge(DISASTER_MAGNET)
     else:
         camp.pc.add_badge(gears.meritbadges.TagReactionBadge(
             "DeadZone Hero", "You united the deadzone to fight Cetus.",
             {gears.personality.DeadZone: 10, gears.factions.TerranDefenseForce: -10}
         ))
     camp.eject()
Example #19
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
Example #20
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)
Example #21
0
    def t_ENDCOMBAT(self, camp: gears.GearHeadCampaign):
        mycompy: gears.base.Prop = self.elements["_core"]
        serv1: gears.base.Monster = self.elements["_serv1"]
        serv2: gears.base.Monster = self.elements["_serv2"]

        if mycompy.is_destroyed() and serv1.is_destroyed() and serv2.is_destroyed():
            pbge.alert("As the biocomputer dies, the chamber is shaken by a powerful rumble. The tremors last for a short time before fading into silence. Whatever just happened, you assume that Kerberos will no longer trouble travelers on the highway.")
            camp.check_trigger("WIN", self)
            BiotechDiscovery(
                camp, "There is a huge subterranean biotech complex near {}.".format(self.elements["METROSCENE"]),
                "[THATS_INTERESTING] I'll get one of our hazmat recovery teams to check it out. Here is the {cash} you've earned.",
                self.rank
            )
            camp.campdata[KERBEROS_DEFEATED] = True
            self.end_plot(camp)
Example #22
0
 def PATIENT_BED_menu(self, camp: gears.GearHeadCampaign, thingmenu):
     if not self.cured_patient:
         thingmenu.desc = "{PATIENT} lies unconscious in this bed, a victim of {DISEASE}. It is unknown how much time {PATIENT.gender.subject_pronoun} has left.".format(
             **self.elements)
         lm = camp.do_skill_test(gears.stats.Knowledge,
                                 gears.stats.Medicine,
                                 gears.stats.DIFFICULTY_LEGENDARY,
                                 no_random=True)
         if lm:
             self.party_doctor = lm
             if lm is camp.pc:
                 thingmenu.add_item(
                     "You believe {PATIENT} can be saved. Offer the doctors a second opinion."
                     .format(**self.elements), self._cure_disease)
             else:
                 thingmenu.items.append(
                     ghdialogue.ghdview.LancemateConvoItem(
                         "This is the wrong treatment for {DISEASE}... Let's talk to the doctors, I can save {PATIENT.gender.object_pronoun}."
                         .format(**self.elements),
                         self._cure_disease,
                         desc=None,
                         menu=thingmenu,
                         npc=lm))
         thingmenu.add_item(
             "Leave {PATIENT} in peace.".format(**self.elements), None)
     else:
         thingmenu.desc = "The bed is empty now. Maybe someone else will need it later."
 def unlocked_use( self, camp: gears.GearHeadCampaign ):
     # Perform this waypoint's special action.
     fieldhq.backpack.ItemExchangeWidget.create_and_invoke(camp, camp.first_active_pc(), self.contents)
     if self.OPEN_TERRAIN:
         scene = self.scene
         if scene and scene.on_the_map(*self.pos):
             scene.set_decor(self.pos[0], self.pos[1], self.OPEN_TERRAIN)
 def _conversation_win(self, camp: gears.GearHeadCampaign):
     if camp.party_has_personality(
             self.elements["CHALLENGE"].data["violated_virtue"]):
         npc: gears.base.Character = self.elements["NPC"]
         npc.relationship.reaction_mod += 10
     self.elements["CHALLENGE"].advance(camp, 4)
     self.end_plot(camp)
Example #25
0
def AddSkillBasedLancemateMenuItem(mymenu: pbge.rpgmenu.Menu,
                                   msg,
                                   value,
                                   camp: gears.GearHeadCampaign,
                                   stat_id,
                                   skill_id,
                                   rank,
                                   difficulty=gears.stats.DIFFICULTY_AVERAGE,
                                   pc_msg=None,
                                   no_random=False):
    # Add an item to this menu where a lancemate suggests something. Designed to be used with the above
    # SimpleMonologueMenu, but really it can be used with any menu.
    # Returns the lancemate who makes the suggestion, or None if there is no applicable lancemate.
    winner = camp.make_skill_roll(stat_id,
                                  skill_id,
                                  rank,
                                  difficulty,
                                  include_pc=bool(pc_msg),
                                  no_random=no_random)
    if winner:
        mylm = winner.get_pilot()
        if mylm is camp.pc and pc_msg:
            mymenu.add_item(pc_msg, value)
        else:
            mygrammar = pbge.dialogue.grammar.Grammar()
            pbge.dialogue.GRAMMAR_BUILDER(mygrammar, camp, mylm, camp.pc)
            true_msg = pbge.dialogue.grammar.convert_tokens(msg, mygrammar)
            mymenu.items.append(
                ghdialogue.ghdview.LancemateConvoItem(true_msg,
                                                      value,
                                                      desc=None,
                                                      menu=mymenu,
                                                      npc=mylm))
        return mylm
Example #26
0
    def NPC_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()
        npc = self.elements["NPC"]
        self.hire_cost = (npc.renown * npc.renown *
                          (150 - npc.get_reaction_score(camp.pc, camp))) // 5

        if gears.relationships.RT_LANCEMATE not in npc.relationship.tags:
            if camp.can_add_lancemate():
                mylist.append(
                    Offer(
                        "I'll join your lance for a mere ${}. [DOYOUACCEPTMYOFFER]"
                        .format(self.hire_cost),
                        context=ContextTag((context.PROPOSAL, context.JOIN)),
                        data={"subject": "joining my lance"},
                        subject=self,
                        subject_start=True,
                    ))
                mylist.append(
                    Offer("[DENY_JOIN] [GOODBYE]",
                          context=ContextTag((context.DENY, context.JOIN)),
                          subject=self))
                if camp.credits >= self.hire_cost:
                    mylist.append(
                        Offer("[THANKS_FOR_CHOOSING_ME] [LETSGO]",
                              context=ContextTag(
                                  (context.ACCEPT, context.JOIN)),
                              subject=self,
                              effect=self._join_lance))

            mylist.append(plotutility.LMSkillsSelfIntro(npc))

        return mylist
    def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
        if self.choice_ready:
            self.choice_ready = False
            # Allow the PC to decide whether or not to respond to the distress call.
            npc = self.elements["PILOT"]
            pbge.alert(
                "While traveling, you receive a distress call from {}.".format(
                    npc))

            mymenu = game.content.ghcutscene.SimpleMonologueMenu(
                "[DISTRESS_CALL]", self.elements["SURVIVOR"], camp)

            if npc.faction and camp.is_unfavorable_to_pc(npc.faction):
                game.content.ghcutscene.AddTagBasedLancemateMenuItem(
                    mymenu, "We have no duty to aid an enemy combatant.",
                    self.cancel_the_adventure, camp,
                    (gears.personality.Duty, ))

            self.glory_npc = game.content.ghcutscene.AddTagBasedLancemateMenuItem(
                mymenu,
                "You realize there'll probably be a cash reward for helping out.",
                self.go_for_glory, camp, (gears.personality.Glory, ))

            self.fellowship_npc = game.content.ghcutscene.AddTagBasedLancemateMenuItem(
                mymenu, "Helping {} is the right thing to do.".format(npc),
                self.go_for_fellowship, camp, (gears.personality.Fellowship, ))

            mymenu.add_item("Go help {}".format(npc), None)
            mymenu.add_item("Ignore distress call", self.abandon_distress_call)

            choice = mymenu.query()
            if choice:
                choice(camp)
 def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
     if self.intro_ready and not camp.campdata.get(DDBAMO_ENCOUNTER_ZOMBOTS,
                                                   False):
         self.intro_ready = False
         camp.campdata[DDBAMO_ENCOUNTER_ZOMBOTS] = True
         pbge.alert(
             "The road ahead is blocked by hostile mecha. Ominously, your sensors cannot detect any energy readings from them, though they are clearly moving."
         )
    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
Example #30
0
    def SHOPKEEPER_offers(self, camp: gears.GearHeadCampaign):
        mylist = list()

        if self.shop_unlocked:
            mylist.append(
                Offer(
                    "[OPENSHOP]",
                    context=ContextTag([context.OPEN_SHOP]),
                    effect=self.shop,
                    data={
                        "shop_name": self.shopname,
                        "wares": "stuff"
                    },
                ))
        elif not self.shop_forever_locked:
            if camp.party_has_tag(gears.tags.Criminal):
                mylist.append(
                    Offer(
                        "[HELLO] You look like the type who might be interested in some under-the-counter goods, if you catch my meaning.",
                        context=ContextTag([context.HELLO]),
                        subject=self,
                        subject_start=True,
                        allow_generics=False))
            elif self.elements["SHOPKEEPER"].get_reaction_score(camp.pc,
                                                                camp) > 40:
                mylist.append(
                    Offer(
                        "[HELLO] I have come into the possession of a number of valuable items, and since I like you I'd be willing to let you buy them for a steal.",
                        context=ContextTag([context.HELLO]),
                        subject=self,
                        subject_start=True,
                        allow_generics=False))

            mylist.append(
                Offer("That would be my pleasure.",
                      context=ContextTag([context.CUSTOM]),
                      subject=self,
                      effect=self._unlock_shop,
                      data={"reply": "Show me what you've got."}))

            mylist.append(
                Offer("Come back anytime. I'm always getting new items in.",
                      context=ContextTag([context.CUSTOM]),
                      subject=self,
                      data={"reply": "Not right now, thanks."}))

            mylist.append(
                Offer(
                    "That's a shame. Well, I won't bother you about it again.",
                    context=ContextTag([context.CUSTOM]),
                    subject=self,
                    effect=self._lock_shop,
                    data={
                        "reply": "I want no part of your criminal dealings."
                    }))

        return mylist