コード例 #1
0
    def custom_init(self, nart):
        myscene = self.elements["LOCALE"]
        myfac = self.elements.get("ENEMY_FACTION")
        roomtype = self.elements["ARCHITECTURE"].get_a_room()
        enemy_room = self.register_element("ROOM",
                                           roomtype(15, 15),
                                           dident="LOCALE")

        team2 = self.register_element(
            "_eteam",
            teams.Team(enemies=(myscene.player_team, )),
            dident="ROOM")
        myunit = gears.selector.RandomMechaUnit(self.rank,
                                                100,
                                                myfac,
                                                myscene.environment,
                                                add_commander=True)
        team2.contents += myunit.mecha_list

        self.obj = adventureseed.MissionObjective(
            "Investigate refugee camp", adventureseed.MAIN_OBJECTIVE_VALUE)
        self.adv.objectives.append(self.obj)
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())

        self.intro_ready = True
        return True
コード例 #2
0
    def custom_init( self, nart ):
        team1 = teams.Team(name="Player Team")
        myscene = gears.GearHeadScene(50,50,"Combat Zone",player_team=team1,scale=gears.scale.MechaScale)
        myscenegen = pbge.randmaps.SceneGenerator(myscene, game.content.gharchitecture.MechaScaleDeadzone())
        self.register_scene( nart, myscene, myscenegen, ident="LOCALE", temporary=True, dident=self.elements["MISSION_RETURN"][0])

        player_a,enemy_a = random.choice(pbge.randmaps.anchors.OPPOSING_PAIRS)

        if not self.elements.get("FACTION"):
            self.register_element("FACTION",gears.factions.Circle())

        self.register_element("_EROOM",pbge.randmaps.rooms.OpenRoom(5,5,anchor=player_a),dident="LOCALE")
        destination,entrance = self.elements["MISSION_RETURN"]
        myent = self.register_element( "ENTRANCE", game.content.ghwaypoints.Exit(dest_scene=destination,dest_entrance=entrance,anchor=pbge.randmaps.anchors.middle), dident="_EROOM")

        enemy_room = self.register_element("ENEMY_ROOM",pbge.randmaps.rooms.FuzzyRoom(10,10,anchor=enemy_a),dident="LOCALE")
        team2 = self.register_element("_eteam",teams.Team(enemies=(myscene.player_team,)),dident="ENEMY_ROOM")
        myunit = gears.selector.RandomMechaUnit(level=self.rank,strength=150,fac=self.elements["FACTION"],env=myscene.environment)
        team2.contents += myunit.mecha_list
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())

        for t in range(random.randint(1,3)):
            self.add_sub_plot(nart,"MECHA_ENCOUNTER",necessary=False)

        self.mission_entrance = (myscene,myent)
        self.witness_ready = True

        return True
コード例 #3
0
    def custom_init( self, nart ):
        """An empty map that will add subplots for the mission's objectives."""
        team1 = teams.Team(name="Player Team")
        myscene = gears.GearHeadScene(
            40,40,"Combat Zone",player_team=team1,scale=gears.scale.MechaScale,
            exploration_music='A wintertale.ogg', combat_music='Chronos.ogg',
        )
        myscenegen = pbge.randmaps.SceneGenerator(myscene, game.content.gharchitecture.MechaScaleSemiDeadzone())
        self.register_scene( nart, myscene, myscenegen, ident="LOCALE", temporary=True)

        player_a,enemy_a = random.choice(pbge.randmaps.anchors.OPPOSING_PAIRS)

        self.register_element("_EROOM",pbge.randmaps.rooms.OpenRoom(5,5,anchor=player_a),dident="LOCALE")
        myent = self.register_element( "ENTRANCE", game.content.ghwaypoints.Waypoint(anchor=pbge.randmaps.anchors.middle), dident="_EROOM")

        enemy_room = self.register_element("ENEMY_ROOM",game.content.ghrooms.MSRuinsRoom(15,15,anchor=enemy_a),dident="LOCALE")
        team2 = self.register_element("_eteam",teams.Team(enemies=(myscene.player_team,)),dident="ENEMY_ROOM")
        myunit = gears.selector.RandomMechaUnit(level=10,strength=50,fac=self.elements.get("ENEMY_FACTION", None),env=myscene.environment)
        team2.contents += myunit.mecha_list
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())
        enemy_room.contents.append(ghwaypoints.SmokingWreckage())
        enemy_room.contents.append(ghterrain.DZDConcreteBuilding)

        self.mission_entrance = (myscene,myent)
        self.started_the_intro = False

        self.tiles_moved = 0
        self.move_tutorial_done = False
        self.threat_tutorial_done = False
        self.combat_tutorial_done = False

        return True