예제 #1
0
    def t_STARTCOMBAT(self,camp):
        if camp.scene is self.elements["LOCALE"] and self.tutorial_on and not self.combat_tutorial_done:
            mycutscene = SimpleMonologueDisplay(
                "Combat has started. Each round you get to take two actions; you can move and attack, or attack twice, or anything else you want to do.",
                self.elements["SHERIFF"])
            mycutscene(camp)
            mycutscene.text = "There on the upper left you'll see the icons for the different types of action you can take: movement, attack, skills, and ending your turn. On the upper right is the interface for your currently selected action."
            mycutscene(camp)
            mycutscene.text = "To move, make sure your movement action is selected and just click where you want to go. To attack, you can either click on the attack icon or click on the enemy mecha. You can scroll through weapons and special attacks with the mouse wheel or the arrow keys."
            mycutscene(camp)

            self.combat_tutorial_done = True
예제 #2
0
    def t_START(self, camp):
        if camp.scene is self.elements["LOCALE"] and not self.started_the_intro:
            mycutscene = SimpleMonologueDisplay(
                "We're going to have to search this area to find the attacker. Hopefully we aren't too late.",
                self.elements["SHERIFF"])
            mycutscene(camp)
            if self.tutorial_on:
                mycutscene = SimpleMonologueDisplay(
                    "Your mecha is controlled using the M.O.U.S.E. system- don't ask me what that stands for. Just click where you want to go and the navigation computer does the rest. I'll follow along right behind you.",
                    self.elements["SHERIFF"])
                mycutscene(camp)

            self.started_the_intro = True
예제 #3
0
 def t_PCMOVE(self,camp):
     if camp.scene is self.elements["LOCALE"]:
         self.tiles_moved += 1
         if self.tutorial_on and self.tiles_moved > 10 and not self.move_tutorial_done and not self.threat_tutorial_done:
             mycutscene = SimpleMonologueDisplay("Good, you've got the basics of movement mastered. Keep going and let's see if we can find the raiders.",
                                                 self.elements["SHERIFF"])
             mycutscene(camp)
             self.move_tutorial_done = True
         if self.tutorial_on and not self.threat_tutorial_done and game.exploration.current_explo and camp.scene.in_sight.intersection(game.exploration.current_explo.threat_tiles):
             mycutscene = SimpleMonologueDisplay("I've identified the enemy's sensor range using my Target Analysis system; you should see it projected on your map as a red line. This region is called the Threat Area. Combat will begin as soon as we move into it.",
                                                 self.elements["SHERIFF"])
             mycutscene(camp)
             self.threat_tutorial_done = True
예제 #4
0
    def t_ENDCOMBAT(self,camp):
        if camp.scene is self.elements["LOCALE"]:
            # If the player team gets wiped out, end the mission.
            myteam = self.elements["_eteam"]
            if len(myteam.get_members_in_play(camp)) < 1:
                pbge.alert("As combat ends, you receive a comm signal from an unknown transmitter.")
                pbge.alert('"Kettel Industries reserves the right to defend itself from criminal activity. Those who harbor criminals will be considered accomplaices."', font=pbge.ALTTEXTFONT)
                pbge.alert('"Thank you for listening, and please consider Kettel Industries for your upcoming reconstruction work."', font=pbge.ALTTEXTFONT)

                pbge.my_state.view.play_anims(gears.geffects.Missile3(start_pos=self.elements["ENTRANCE"].pos, end_pos=self.elements["FUEL_TANKS"].pos))

                my_invo = pbge.effects.Invocation(
                    fx=gears.geffects.DoDamage(10, 8, anim=gears.geffects.SuperBoom,
                                               scale=gears.scale.MechaScale,
                                               is_brutal=True),
                    area=pbge.scenes.targetarea.SelfCentered(radius=5, delay_from=-1))
                my_invo.invoke(camp, None, [self.elements["FUEL_TANKS"].pos, ], pbge.my_state.view.anim_list)
                pbge.my_state.view.handle_anim_sequence()

                mycutscene = SimpleMonologueDisplay(
                    "I admit, I was not expecting that. Let's head back to base...",
                    self.elements["SHERIFF"])
                mycutscene(camp)

                self.end_the_mission(camp)
                camp.check_trigger("WIN",self)
            elif not camp.first_active_pc():
                self.end_the_mission(camp)
                camp.check_trigger("LOSE",self)
예제 #5
0
 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)
예제 #6
0
 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)
예제 #7
0
 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)
예제 #8
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()
예제 #9
0
 def t_ENDCOMBAT(self, camp):
     if camp.scene is self.elements["LOCALE"]:
         # If the player team gets wiped out, end the mission.
         myteam = self.elements["_eteam"]
         if len(myteam.get_active_members(camp)) < 1:
             mycutscene = SimpleMonologueDisplay(
                 "We won! Let's head back to base and discuss our next move...",
                 self.elements["SHERIFF"])
             mycutscene(camp)
             self.end_the_mission(camp)
             camp.check_trigger("WIN", self)
         elif not camp.first_active_pc():
             self.end_the_mission(camp)
             camp.check_trigger("LOSE", self)
    def t_COMBATLOOP(self, camp: gears.GearHeadCampaign):
        myteam = self.elements["_eteam"]
        if self.cetus.current_health < (self.cetus.max_health //
                                        2) or not self.cetus.is_operational():
            self.regen_count += 1
            self.cetus.restore_all()
            pbge.my_state.view.play_anims(
                gears.geffects.BiotechnologyAnim(pos=self.cetus.pos))
            my_invo = pbge.effects.Invocation(
                fx=gears.geffects.DoDamage(3,
                                           6,
                                           anim=gears.geffects.DeathWaveAnim,
                                           scale=gears.scale.MechaScale,
                                           is_brutal=True),
                area=pbge.scenes.targetarea.SelfCentered(radius=4 -
                                                         self.regen_count,
                                                         delay_from=-1,
                                                         exclude_middle=True))
            pbge.my_state.view.anim_list.append(
                gears.geffects.InvokeDeathWaveAnim(pos=self.cetus.pos))
            my_invo.invoke(camp, self.cetus, [
                self.cetus.pos,
            ], pbge.my_state.view.anim_list)
            pbge.my_state.view.handle_anim_sequence()

            if self.regen_count > 1 and not self._has_an_advantage(camp):
                pbge.alert(
                    "Once again, Cetus rockets into the air and quickly disappears from sight."
                )
                pbge.my_state.view.play_anims(
                    gears.geffects.SmokePoof(pos=self.cetus.pos),
                    pbge.scenes.animobs.BlastOffAnim(model=self.cetus))
                camp.scene.contents.remove(self.cetus)
            elif self.regen_count > 2:
                if camp.campdata[
                        "DZDCVAR_NUM_ALLIANCES"] >= self.ALLIANCES_NEEDED:
                    pbge.alert(
                        "As Cetus regenerates again, your allies from across the dead zone arrive at the battlefield."
                    )
                    pc = camp.pc.get_root()
                    camp.scene.deploy_team(self.allied_mecha,
                                           self.elements["_ateam"])
                    pbge.my_state.view.play_anims(*[
                        gears.geffects.SmokePoof(pos=h.pos)
                        for h in self.allied_mecha
                    ])
                    SimpleMonologueDisplay(
                        "You can't win, Cetus. There are many of us, and only one of you. This is our home. Go back to the deep wasteland and find your own home.",
                        pc)(camp)
                    pbge.alert(
                        "The biomonster appears to consider your words. Its titanic eye scans all of the mecha in attendance."
                    )
                    pbge.alert(
                        "Cetus rockets into the sky and flies to the northwest, away from {METROSCENE}."
                        .format(**self.elements))
                    pbge.my_state.view.play_anims(
                        gears.geffects.SmokePoof(pos=self.cetus.pos),
                        pbge.scenes.animobs.BlastOffAnim(model=self.cetus))
                    camp.scene.contents.remove(self.cetus)
                    camp.scene.player_team.retreat(camp)
                else:
                    pbge.alert(
                        "This last regeneration seems to have left Cetus dazed. You contact The Voice of Iijima with your current coordinates."
                    )
                    pbge.alert(
                        "Your lance makes a hasty withdrawl as hypervelocity missiles streak overhead."
                    )
                    camp.scene.player_team.retreat(camp)
                    my_invo = pbge.effects.Invocation(
                        fx=gears.geffects.DoDamage(
                            20,
                            8,
                            anim=gears.geffects.SuperBoom,
                            scale=gears.scale.MechaScale,
                            is_brutal=True),
                        area=pbge.scenes.targetarea.SelfCentered(
                            radius=9, delay_from=-1))
                    my_invo.invoke(camp, self.cetus, [
                        self.cetus.pos,
                    ], pbge.my_state.view.anim_list)
                    pbge.my_state.view.handle_anim_sequence()
                    camp.scene.contents.remove(self.cetus)
예제 #11
0
 def _assistant_monologue(self, camp):
     SimpleMonologueDisplay("[NO_PROBLEM_FOR_TWO_OF_US]",
                            self.elements["_assistant"])(camp)