def reflecting_pools(): """ Create and return Reflecting Pools. """ room = Room() room.name = "Reflecting" """ Set up the game and initialize the variables. """ # Sprite lists room.wall_list = arcade.SpriteList() # -- Set up the walls # Create bottom and top row of mirrors # This y loops a list of two, the coordinate 0, and just under the top of window for y in (0, SCREEN_HEIGHT - SPRITE_SIZE): # Loop for each mirror going across for x in range(0, SCREEN_WIDTH, SPRITE_SIZE): wall = arcade.Sprite( "images/nature_tileset_without_gaps/_water/water2_transp.png", WALL_SPRITE_SCALING) wall.left = x wall.bottom = y wall.tag = "mirror" wall.code = 0 room.wall_list.append(wall) # Create left and right column of mirrors for x in (0, SCREEN_WIDTH - SPRITE_SIZE): # Loop for each mirror going across for y in range(SPRITE_SIZE, SCREEN_HEIGHT - SPRITE_SIZE, SPRITE_SIZE): # Skip making a block 4 and 5 blocks up if (y != SPRITE_SIZE * 4 and y != SPRITE_SIZE * 5) or x != 0: wall = arcade.Sprite( "images/nature_tileset_without_gaps/_water/water1_transp.png", SPRITE_SCALING) wall.left = x wall.bottom = y wall.tag = "mirror" wall.code = 0 room.wall_list.append(wall) wall = arcade.Sprite( "images/nature_tileset_without_gaps/_water/water_full_1.png", SPRITE_SCALING) wall.left = 5 * SPRITE_SIZE wall.bottom = 10 * SPRITE_SIZE room.wall_list.append(wall) room.background = arcade.load_texture( "images/glacial/glacial_mountains_fullcolor_preview.png") return room
def volcano_pit(): """ Create and return Volcano Pit. """ room = Room() room.name = "Volcano" """ Set up the game and initialize the variables. """ # Sprite lists room.wall_list = arcade.SpriteList() # -- Set up the walls # Create bottom and top row of boxes # This y loops a list of two, the coordinate 0, and just under the top of window for y in (0, SCREEN_HEIGHT - SPRITE_SIZE): # Loop for each box going across for x in range(0, SCREEN_WIDTH, SPRITE_SIZE): wall = arcade.Sprite( "images/nature_tileset_without_gaps/_lava/lava1.png", SPRITE_SCALING) wall.left = x wall.bottom = y wall.tag = "firewall" room.wall_list.append(wall) # Create left and right column of boxes for x in (0, SCREEN_WIDTH - SPRITE_SIZE): # Loop for each box going across for y in range(SPRITE_SIZE, SCREEN_HEIGHT - SPRITE_SIZE, SPRITE_SIZE): # Skip making a block 4 and 5 blocks up on the right side if (y != SPRITE_SIZE * 4 and y != SPRITE_SIZE * 5) or x == 0: wall = arcade.Sprite( "images/nature_tileset_without_gaps/_lava/lava1.png", SPRITE_SCALING) wall.left = x wall.bottom = y room.wall_list.append(wall) wall = arcade.Sprite("images/nature_tileset_without_gaps/_lava/lava1.png", SPRITE_SCALING) wall.left = 5 * SPRITE_SIZE wall.bottom = 10 * SPRITE_SIZE room.wall_list.append(wall) # Load the background image for this level. room.background = arcade.load_texture( "images/bgs/PNG/Full/Miscellaneous/volcanoes.png") return room
def intro(): """ Create and return instructions area. """ room = Room() room.name = "Intro" """ Set up the game and initialize the variables. """ if room.is_answered is True: room.key = arcade.Sprite("images/16x16/Item__69.png", WALL_SPRITE_SCALING) room.key.center_x = random.randrange(SCREEN_WIDTH) room.key.center_y = random.randrange(SCREEN_HEIGHT) room.key.draw() # Load the background image for this level. room.background = arcade.load_texture("images/classic1.png") room.wall_list = arcade.SpriteList() return room
''' Room pt 1 Attributes ''' # attic attic = Room("attic", False, False, False) desc = ( "- The roof is cracked. To your left you see a circular gable vent tilted open at a precarious angle. " "Dense but gentle snowflakes are wafting in through the broken roof. To your right is a gray, weathered door. " "It doesn't look like there is any loot for you here. You feel safe but terribly alone." ) attic.set_description(desc) attic.lootable = False # hallway hallway = Room("hallway", "", False, False) hallway.name = "hallway" hallway.set_description( "- It doesn't look like there's any loot in the hallway, " "but there are three doors along its length which might contain something." " You're certain there's something or someone at the end of the hallway." ) # hallway2 hallway2 = Room("hallway", "", False, False) hallway2.name = "hallway" hallway2.set_description( "- There is very little here besides the crate you are now kneeling behind. " "There is something up ahead. You're going to run into it if you want to keep moving." ) # bedroom 2
def battle_room(): """ Create and return Battle Room!!! """ room = Room() room.name = "Battle" """ Set up the game and initialize the variables. """ # Sprite lists room.wall_list = arcade.SpriteList() room.enemy_list = arcade.SpriteList() # -- Set up the walls # Create bottom and top row of boxes # This y loops a list of two, the coordinate 0, and just under the top of window for y in (0, SCREEN_HEIGHT - SPRITE_SIZE): # Loop for each box going across for x in range(0, SCREEN_WIDTH, SPRITE_SIZE): wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky02.png", SPRITE_SCALING) wall.left = x wall.bottom = y wall.tag = "spike" room.wall_list.append(wall) # Create left and right column of boxes for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE): # Loop for each box going across for y in range(SPRITE_SIZE, SCREEN_HEIGHT - SPRITE_SIZE, SPRITE_SIZE): # Skip making a block 3 and 5 blocks up on the right side if (y != SPRITE_SIZE * 3 and y != SPRITE_SIZE * 5) or x == 0: wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING) wall.left = y wall.bottom = x wall.tag = "spike" room.wall_list.append(wall) wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING) wall.left = 3 * SPRITE_SIZE wall.bottom = 2 * SPRITE_SIZE room.wall_list.append(wall) wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING) wall.left = 9 * SPRITE_SIZE wall.bottom = 9 * SPRITE_SIZE room.wall_list.append(wall) wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING) wall.left = 5 * SPRITE_SIZE wall.bottom = 4 * SPRITE_SIZE room.wall_list.append(wall) wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING) wall.left = 6 * SPRITE_SIZE wall.bottom = 6 * SPRITE_SIZE room.wall_list.append(wall) room.problem = "Attack with [spacebar]!" if room.is_answered is True: room.key.draw() # Load the background image for this level. room.background = arcade.load_texture("images/bgs/PNG/Full/Horror/horror1.png") return room