class Map(object): scenes = { 'the_beginning': S.TheBeginning(), 'fire_room': S.FireRoom(), 'lit_hole': S.LitHole(), 'locked_door': S.LockedDoor(), 'two_paths': S.TwoPaths(), 'two_choices': S.TwoChoices(), 'doors_room': S.DoorsRoom(), 'tunnel': S.Tunnel(), 'dark_hole': S.DarkHole(), 'hallway_end': S.HallwayEnd(), 'death': Death(), # raise ValueError ('todo') #Add more scenes } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return self.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'Room': S.Room(), 'Elevator': S.Elevator(), #this connects names to scenes 'Extra_lock': S.Extra_lock(), 'text': S.text(), 'Friend_solo': S.Friend_solo(), 'Reentry_solo': S.Reentry_solo(), 'Reentry_friend_good_txt': S.Reentry_friend_good_txt(), 'Reentry_friend_bad_txt': S.Reentry_friend_bad_txt(), 'death': Death() # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene #self is the variabel # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(): #translates the strings we receive as returns to which function to call next scenes = { 'birth': Birth(), 'grove': Grove(), 'metropolis': Metropolis(), 'death': Death(), 'doorway': Doorway(), 'forest': Forest(), 'plains': Plains(), 'elfkingdom': ElfKingdom() } #we provide a place to start def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): val = Map.scenes.get(scene_name) return val #plays the first scene in the game def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'wake_up': S.WakeUp(), 'door_one': S.DoorOne(), 'door_two': S.DoorTwo(), 'bridge_door_one': S.BridgeDoorOne(), 'cyclops_room': S.CyclopsRoom(), 'collapsing_tunnel': S.CollapsingTunnel(), 'cliff': S.Cliff(), 'bridge_door_two': S.BridgeDoorTwo(), 'death': Death(), # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
def __init__(self, more): self.names = more self.death = Death( "Looks like the lock died, You curl up in a ball and await death.") self.first_two = "[%r:%r: ]" % (random.randint( 1, 10), random.randint(1, 10)) self.sums = Sums(self.names)
def postInit(self): # # initialize game content # # camera base.camLens.setNearFar(1.0, 10000) base.camLens.setFov(75) a = 33 base.camera.setPos(0, -a, a + 3) #80) # collision base.cTrav = CollisionTraverser("base collision traverser") base.cHandler = CollisionHandlerEvent() base.cPusher = CollisionHandlerPusher() base.cQueue = CollisionHandlerQueue() base.globalClock = ClockObject.getGlobalClock() base.cHandler.addInPattern('%fn-into-%in') base.cHandler.addOutPattern('%fn-out-%in') base.cHandler.addAgainPattern('%fn-again-%in') # ai init base.AIworld = AIWorld(render) # 3d manager base.audio3d = Audio3DManager(base.sfxManagerList[0], camera) # manager self.archiveManager = ArchiveManager() self.mapManager = MapManager() self.initHeroInfo = None # Lock self.lock = threading.Lock() self.gameThread = None self.filters = CommonFilters(base.win, base.cam) # UI self.menu = Menu() self.option = Option() self.archive = Archive() self.death = Death() # self.oobe() #self.Archive_status = 0 # self.menuMusic = loader.loadMusic("assets/audio/menuMusic.ogg") # self.menuMusic.setLoop(True) # self.fightMusic = loader.loadMusic("assets/audio/fightMusic.ogg") # self.fightMusic.setLoop(True) # base.audio3d = Audio3DManager(base.sfxManagerList[0], camera) self.titleVideo, self.titleCard = loadVideo('title.mp4') self.isInited = False self.isSkip = False self.isRenew = False # # Event handling # self.accept("escape", self.__escape) # # Start with the menu # self.request("Menu")
def move_on(self, next_room, story_tag, action_tag): "moves the game to the next scene, the waste center" if next_room == 'waste_center': wc = WasteCenter() wc.enter(story_tag, action_tag) else: dt = Death() dt.enter(story_tag, action_tag)
def move_on(self, next_room, story_tag, action_tag): "moves the game into the next scene" if next_room == 'victory': vt = Victory() vt.enter(story_tag, action_tag) else: dt = Death() dt.enter(story_tag, action_tag)
def move_on(self, next_room, story_tag, action_tag): "moves the game into the next scene" if next_room == 'cortex_vault': cv = CortexVault() cv.enter(story_tag, action_tag) else: dt = Death() dt.enter(story_tag, action_tag)
def move_on(self, next_room, story_tag, action_tag): "moves the game into the next scene" if next_room == 'consciousness_link': cl = ConsciousnessLink() cl.enter(story_tag, action_tag) else: dt = Death() dt.enter(story_tag, action_tag)
def move_on(self, next_room, story_tag, action_tag): "moves the game into the next scene" if next_room == 'power_center': pc = PowerCenter() pc.enter(story_tag, action_tag) else: dt = Death() dt.enter(story_tag, action_tag)
def __init__(self, more): # This sets the HP and attacks for you and who you are fighting in this class also takes the name from the start.py file and adds it in here self.HP = 100 self.names = more self.death = Death("So he kicked you're ass then.") self.pikachuhp = 20 self.mewhp = 30 self.mewtwohp = 40 self.hitback = random.randint(5, 20)
def create_deaths(wof_settings,screen,deaths,levelMap): """ Create a set of deaths """ death_width = wof_settings.element_width death_height = wof_settings.element_height # Create deaths for death_position in levelMap['death']: death = Death(wof_settings,screen) death.x = death_position[1] * death_width death.y = death_position[0] * death_height death.rect.x = death.x death.rect.y = death.y deaths.add(death)
class Map(object): #key is strings, value is function scenes = { 'central_corridor': S.CentralCorridor( ), # class names bc they're capitalized. calling class name __init__. String keys are assigned to the scene object. They're scene objects because () calling the constructorn function inside class 'laser_weapon_armory': S.LaserWeaponArmory(), 'guards': S.Guards(), 'foot_steps': S.Foot_Steps(), # Hallway Path 'hallway': S.Hallway(), 'infirmary': S.Infirmary(), 'storage': S.Storage(), 'box': S.Box(), 'escape': S.Escape(), 'ask': S.Ask(), 'boarding': S.Boarding(), 'incoming': S.Incoming(), # Others Path 'others': S.Others(), 'pub_Entrance': S.Pub(), 'poker': S.Poker(), 'winnah': S.Winnah(), # Exit 'exit': S.Exit(), # Death 'death': Death() # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, start_scene): # this is the constructor self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): # sending in scene_name, self.start_scene is assigned as scene_name SAME VALUE THO return self.scenes.get(scene_name) # self.scenes in this line gets # gets the first scene of the map from the dictionary list def opening_scene(self): # Dominos calling Papa Johns, start_scene is order return self.next_scene(self.start_scene)
class Map(object): scenes = { 'last_day_on_earth': LastDayOnEarth(), 'death': Death(), 'exploring': Exploring(), 'escape': Escape(), 'deactivation': Deactivation() } def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): return Map.scenes.get(scene_name) def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = {'center_alley' : S.CenterAlley(), 'center_street' : S.CenterStreet(), 'the_center' : S.TheCenter(), 'death' : Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'central_corridor': CentralCorridor(), 'death': Death(), 'finished': Planet(), 'armory': Armory(), 'bridge': Bridge(), 'pod': EscapePod() } def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): val = Map.scenes.get(scene_name) return val def opening_scene(self): return self.next_scene(self.start_scene)
def enter(): global guy, bg, wall, map, death, portal, clear, deathcount deathcount = 0 guy = Guy() portal = Portal() map = create_map() bg = Background() death = Death() clear = Clear() guy.set_bg(bg) bg.set_guy(guy) death.set_bg(bg) death.set_guy(guy) clear.set_bg(bg) clear.set_guy(guy) portal.set_bg(bg) for wall in map: wall.set_bg(bg)
class Map(object): scenes = { 'round_1': S.FatalFistFred(), 'round_2': S.SwordSwingingSteve(), 'round_3': S.PennyPuncherPerry(), 'round_4': S.MathIsHard(), 'death': Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'RiddleTown': S.RiddleTown(), 'highschool': S.Highschool(), 'fakefriends': S.Fakefriends(), 'rockpaperscissors': S.Rockpaperscissors(), 'death': Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return self.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Engine(object): Rooms = { 'start': Start(), 'death': Death(), 'finished': Finished() } def __init__(self, current_room_name): self.current_room = self.Rooms.get(current_room_name) def play_game(self): next_room_name = 'None' while next_room_name == 'None': self.current_room.enter_room() next_room_name = self.current_room.exit_room() self.current_room = self.Rooms.get(next_room_name) next_room_name = self.current_room.info.get('next_room')
class Map(object): scenes = { 'central_corridor': CentralCorridor(), 'laser_weapon_armory': LaserWeaponArmory(), 'the_bridge': TheBridge(), 'escape_pod': EscapePod(), 'death': Death(), 'finished': Finished(), } def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): val = Map.scenes.get(scene_name) return val def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'cementery': Cementery(), 'corridor': Corridor(), 'death': Death(), 'maze': Maze(), 'tomb': Tomb(), 'finished': Finished(), } def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): val = Map.scenes.get(scene_name) return val def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'central_corridor': S.CentralCorridor(), 'laser_weapon_armory': S.LaserWeaponArmory(), 'the_bridge': S.TheBridge(), 'escape_pod': S.EscapePod(), 'death': Death() # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'treehouse_jungle': S.TreehouseJungle(), 'crazy_beach': S.CrazyBeach(), 'park_bench': S.ParkBench(), 'bluff_lake': S.BluffLake(), 'death': Death() # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, treehouse_jungle): self.start_scene = treehouse_jungle # gets the specified scene from the scenes dictionary list. def next_scene(self, crazy_beach): return Map.scenes.get(crazy_beach) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { "round_one": S.RoundOne(), 'round_five': S.RoundFive(), 'double_octos': S.DoubleOctos(), 'semis': S.Semis(), 'finals': S.Finals(), 'death': Death() # raise ValueError ('todo') } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'difficulty': S.Difficulty(), 'downtown_chicago': S.DowntownChicago(), 'red_line': S.RedLine(), 'train_car': S.TrainCar(), 'cross_walk': S.CrossWalk(), 'broke_bus': S.BrokeBus(), 'death': Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class PlotMaps(object): # contains all plots of adventure game Plots = { 'cave_mouth': CaveMouth(), 'the_woods': TheWoods(), 'river_crossing': RiverCrossing(), 'kings_hideout': KingsHideout(), 'princess_blood': PrincessBlood(), 'secret_weapon': SecretWeapon(), 'final_chapter': FinalChapter(), 'death': Death() } def __init__(self, start_plot): self.start_plot = start_plot def next_plot(self, plot_name): # get next plot val = PlotMaps.Plots.get(plot_name) return val def beginning(self): # display current plot return self.next_plot(self.start_plot)
class Map(object): scenes = { 'central_corridor': S.CentralCorridor(), 'laser_weapon_armory': S.LaserWeaponArmory(), 'the_temple': S.Temple(), 'the_spaceship': S.SpaceShip(), 'the_lab': S.Lab(), 'the_exit': S.Exit(), 'death': Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)
class Map(object): scenes = { 'lobby': S.lobby(), 'The_Corridor': S.TheCorridor(), 'The_Corridor2': S.TheCorridor2(), 'The_Vent': S.TheVent(), 'The_Staircase': S.TheStaircase(), 'The_Infirmary': S.TheInfirmary(), 'Exit_Den': S.ExitDen(), 'death': Death() } # initializes to a starting scene def __init__(self, start_scene): self.start_scene = start_scene # gets the specified scene from the scenes dictionary list. def next_scene(self, scene_name): return Map.scenes.get(scene_name) # gets the first scene of the map from the dictionary list def opening_scene(self): return self.next_scene(self.start_scene)