Example #1
0
def generate():
    world.objects = []
    world.map = [[ world.WORLD_NOTHING for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    for x in range(world.WORLD_X):
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][world.WORLD_Y - 1] = [display.WHITE, display.BLACK, '#', False]
    for y in range(world.WORLD_Y):
        world.map[0][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[world.WORLD_X - 1][y] = [display.WHITE, display.BLACK, '#', False]

    world.objects.append(lock_portal.lock_portal(49, 10, "stonedungeon.1", 2, 10))
    world.objects.append(portal.portal(0,10, "town", 25, 10))
    world.objects.append(enemy.stone_enemy(7, 7))
    world.objects.append(shoot_enemy.shoot_enemy(45, 10))
    world.objects.append(invis_dmg.lavatile(12, 15))
    world.objects.append(invis_dmg.lavatile(43, 5 ))
    world.objects.append(invis_dmg.lavatile(2 , 15))
    world.objects.append(invis_dmg.lavatile(12, 5 ))
    world.objects.append(invis_dmg.lavatile(6 , 18))
    world.objects.append(invis_dmg.lavatile(3 , 9 ))

    world.map[49][10] = world.WORLD_NOTHING # Let them walk on portal.
    world.map[0][10] =  world.WORLD_NOTHING
    world.map[12][15] =[display.RED, display.RED, '#', True]
    world.map[43][5] = [display.RED, display.RED, '#', True]
    world.map[2][15] = [display.RED, display.RED, '#', True]
    world.map[12][5] = [display.RED, display.RED, '#', True]
    world.map[6][18] = [display.RED, display.RED, '#', True]
    world.map[3][9] =  [display.RED, display.RED, '#', True]
Example #2
0
def generate():
    world.objects = []
    world.map = [[world.WORLD_NOTHING for y in range(world.WORLD_Y)]
                 for x in range(world.WORLD_X)]
    for x in range(world.WORLD_X):
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][world.WORLD_Y -
                     1] = [display.WHITE, display.BLACK, '#', False]
    for y in range(world.WORLD_Y):
        world.map[0][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[world.WORLD_X -
                  1][y] = [display.WHITE, display.BLACK, '#', False]

    world.objects.append(
        lock_portal.lock_portal(49, 10, "stonedungeon.1", 2, 10))
    world.objects.append(portal.portal(0, 10, "town", 25, 10))
    world.objects.append(enemy.stone_enemy(7, 7))
    world.objects.append(shoot_enemy.shoot_enemy(45, 10))
    world.objects.append(invis_dmg.lavatile(12, 15))
    world.objects.append(invis_dmg.lavatile(43, 5))
    world.objects.append(invis_dmg.lavatile(2, 15))
    world.objects.append(invis_dmg.lavatile(12, 5))
    world.objects.append(invis_dmg.lavatile(6, 18))
    world.objects.append(invis_dmg.lavatile(3, 9))

    world.map[49][10] = world.WORLD_NOTHING  # Let them walk on portal.
    world.map[0][10] = world.WORLD_NOTHING
    world.map[12][15] = [display.RED, display.RED, '#', True]
    world.map[43][5] = [display.RED, display.RED, '#', True]
    world.map[2][15] = [display.RED, display.RED, '#', True]
    world.map[12][5] = [display.RED, display.RED, '#', True]
    world.map[6][18] = [display.RED, display.RED, '#', True]
    world.map[3][9] = [display.RED, display.RED, '#', True]
Example #3
0
def generate():
    world.objects.clear()
    world.map = [[[display.WHITE, display.BLACK, '.', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(LavaDungeon.lava.lava())
    world.objects.append(LavaDungeon.enemy.generic_enemy(3, 16, 3, 7, 70))
    world.objects.append(LavaDungeon.enemy.generic_enemy(11, 16, 3, 7, 70))
    world.objects.append(LavaDungeon.enemy.generic_enemy(19, 16, 3, 7, 70))
    world.objects.append(LavaDungeon.enemy.generic_enemy(27, 16, 3, 7, 70))
    world.objects.append(LavaDungeon.enemy.generic_enemy(35, 16, 3, 7, 70))
    world.objects.append(LavaDungeon.enemy.generic_enemy(43, 16, 3, 7, 70))
    world.objects.append(portal.portal(16, 19, "lavadungeon.2", 16, 1))

    world.map[0][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[1][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[7][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[9][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[17][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[18][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[21][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[32][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[38][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[39][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[40][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[41][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[42][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[46][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[47][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[48][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][1] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][1] = [display.RED, display.BLACK, '.', True]
    world.map[14][1] = [display.RED, display.RED, '#', True]
    world.map[15][1] = [display.RED, display.RED, '#', True]
    world.map[16][1] = [display.RED, display.RED, '#', True]
    world.map[17][1] = [display.RED, display.RED, '#', True]
    world.map[18][1] = [display.RED, display.RED, '#', True]
    world.map[19][1] = [display.RED, display.BLACK, '.', True]
    world.map[49][1] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][2] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][2] = [display.RED, display.BLACK, '.', True]
    world.map[12][2] = [display.RED, display.BLACK, '.', True]
    world.map[14][2] = [display.RED, display.RED, '#', True]
    world.map[15][2] = [display.RED, display.RED, '#', True]
    world.map[16][2] = [display.RED, display.RED, '#', True]
    world.map[17][2] = [display.RED, display.RED, '#', True]
    world.map[18][2] = [display.RED, display.RED, '#', True]
    world.map[19][2] = [display.RED, display.BLACK, '.', True]
    world.map[20][2] = [display.RED, display.BLACK, '.', True]
    world.map[21][2] = [display.RED, display.BLACK, '.', True]
    world.map[22][2] = [display.RED, display.BLACK, '.', True]
    world.map[23][2] = [display.RED, display.BLACK, '.', True]
    world.map[24][2] = [display.RED, display.BLACK, '.', True]
    world.map[49][2] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][3] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][3] = [display.RED, display.BLACK, '.', True]
    world.map[12][3] = [display.RED, display.RED, '#', True]
    world.map[13][3] = [display.RED, display.RED, '#', True]
    world.map[14][3] = [display.RED, display.RED, '#', True]
    world.map[15][3] = [display.RED, display.RED, '#', True]
    world.map[16][3] = [display.RED, display.RED, '#', True]
    world.map[17][3] = [display.RED, display.BLACK, '.', True]
    world.map[18][3] = [display.RED, display.BLACK, '.', True]
    world.map[19][3] = [display.RED, display.BLACK, '.', True]
    world.map[20][3] = [display.RED, display.BLACK, '.', True]
    world.map[49][3] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][4] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][4] = [display.RED, display.BLACK, '.', True]
    world.map[12][4] = [display.RED, display.RED, '#', True]
    world.map[13][4] = [display.RED, display.RED, '#', True]
    world.map[14][4] = [display.RED, display.RED, '#', True]
    world.map[15][4] = [display.RED, display.RED, '#', True]
    world.map[16][4] = [display.RED, display.RED, '#', True]
    world.map[17][4] = [display.RED, display.BLACK, '.', True]
    world.map[49][4] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][5] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][5] = [display.RED, display.BLACK, '.', True]
    world.map[12][5] = [display.RED, display.RED, '#', True]
    world.map[13][5] = [display.RED, display.RED, '#', True]
    world.map[14][5] = [display.RED, display.RED, '#', True]
    world.map[15][5] = [display.RED, display.RED, '#', True]
    world.map[16][5] = [display.RED, display.RED, '#', True]
    world.map[17][5] = [display.RED, display.BLACK, '.', True]
    world.map[18][5] = [display.RED, display.BLACK, '.', True]
    world.map[19][5] = [display.RED, display.BLACK, '.', True]
    world.map[20][5] = [display.RED, display.BLACK, '.', True]
    world.map[21][5] = [display.RED, display.BLACK, '.', True]
    world.map[22][5] = [display.RED, display.BLACK, '.', True]
    world.map[23][5] = [display.RED, display.BLACK, '.', True]
    world.map[24][5] = [display.RED, display.BLACK, '.', True]
    world.map[25][5] = [display.RED, display.BLACK, '.', True]
    world.map[26][5] = [display.RED, display.BLACK, '.', True]
    world.map[27][5] = [display.RED, display.BLACK, '.', True]
    world.map[28][5] = [display.RED, display.BLACK, '.', True]
    world.map[49][5] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][6] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][6] = [display.RED, display.BLACK, '.', True]
    world.map[12][6] = [display.RED, display.BLACK, '.', True]
    world.map[13][6] = [display.RED, display.RED, '#', True]
    world.map[14][6] = [display.RED, display.RED, '#', True]
    world.map[15][6] = [display.RED, display.RED, '#', True]
    world.map[16][6] = [display.RED, display.RED, '#', True]
    world.map[17][6] = [display.RED, display.BLACK, '.', True]
    world.map[18][6] = [display.RED, display.BLACK, '.', True]
    world.map[19][6] = [display.RED, display.BLACK, '.', True]
    world.map[20][6] = [display.RED, display.BLACK, '.', True]
    world.map[21][6] = [display.RED, display.BLACK, '.', True]
    world.map[22][6] = [display.RED, display.BLACK, '.', True]
    world.map[23][6] = [display.RED, display.BLACK, '.', True]
    world.map[24][6] = [display.RED, display.BLACK, '.', True]
    world.map[25][6] = [display.RED, display.BLACK, '.', True]
    world.map[26][6] = [display.RED, display.BLACK, '.', True]
    world.map[27][6] = [display.RED, display.BLACK, '.', True]
    world.map[28][6] = [display.RED, display.BLACK, '.', True]
    world.map[29][6] = [display.RED, display.BLACK, '.', True]
    world.map[30][6] = [display.RED, display.BLACK, '.', True]
    world.map[49][6] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][7] = [display.RED, display.BLACK, '.', True]
    world.map[11][7] = [display.RED, display.BLACK, '.', True]
    world.map[12][7] = [display.RED, display.BLACK, '.', True]
    world.map[13][7] = [display.RED, display.RED, '#', True]
    world.map[14][7] = [display.RED, display.RED, '#', True]
    world.map[15][7] = [display.RED, display.RED, '#', True]
    world.map[16][7] = [display.RED, display.RED, '#', True]
    world.map[17][7] = [display.RED, display.BLACK, '.', True]
    world.map[18][7] = [display.RED, display.BLACK, '.', True]
    world.map[19][7] = [display.RED, display.BLACK, '.', True]
    world.map[20][7] = [display.RED, display.BLACK, '.', True]
    world.map[21][7] = [display.RED, display.BLACK, '.', True]
    world.map[22][7] = [display.RED, display.BLACK, '.', True]
    world.map[25][7] = [display.RED, display.BLACK, '.', True]
    world.map[26][7] = [display.RED, display.BLACK, '.', True]
    world.map[27][7] = [display.RED, display.BLACK, '.', True]
    world.map[28][7] = [display.RED, display.BLACK, '.', True]
    world.map[29][7] = [display.RED, display.BLACK, '.', True]
    world.map[30][7] = [display.RED, display.BLACK, '.', True]
    world.map[31][7] = [display.RED, display.BLACK, '.', True]
    world.map[32][7] = [display.RED, display.BLACK, '.', True]
    world.map[33][7] = [display.RED, display.BLACK, '.', True]
    world.map[34][7] = [display.RED, display.BLACK, '.', True]
    world.map[35][7] = [display.RED, display.BLACK, '.', True]
    world.map[49][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][8] = [display.RED, display.BLACK, '.', True]
    world.map[9][8] = [display.RED, display.BLACK, '.', True]
    world.map[10][8] = [display.RED, display.BLACK, '.', True]
    world.map[11][8] = [display.RED, display.BLACK, '.', True]
    world.map[12][8] = [display.RED, display.BLACK, '.', True]
    world.map[13][8] = [display.RED, display.RED, '#', True]
    world.map[14][8] = [display.RED, display.RED, '#', True]
    world.map[15][8] = [display.RED, display.RED, '#', True]
    world.map[16][8] = [display.RED, display.RED, '#', True]
    world.map[17][8] = [display.RED, display.BLACK, '.', True]
    world.map[18][8] = [display.RED, display.BLACK, '.', True]
    world.map[19][8] = [display.RED, display.BLACK, '.', True]
    world.map[20][8] = [display.RED, display.BLACK, '.', True]
    world.map[21][8] = [display.RED, display.BLACK, '.', True]
    world.map[26][8] = [display.RED, display.BLACK, '.', True]
    world.map[27][8] = [display.RED, display.BLACK, '.', True]
    world.map[28][8] = [display.RED, display.BLACK, '.', True]
    world.map[29][8] = [display.RED, display.BLACK, '.', True]
    world.map[30][8] = [display.RED, display.BLACK, '.', True]
    world.map[31][8] = [display.RED, display.BLACK, '.', True]
    world.map[32][8] = [display.RED, display.BLACK, '.', True]
    world.map[33][8] = [display.RED, display.BLACK, '.', True]
    world.map[34][8] = [display.RED, display.BLACK, '.', True]
    world.map[35][8] = [display.RED, display.BLACK, '.', True]
    world.map[36][8] = [display.RED, display.BLACK, '.', True]
    world.map[49][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][9] = [display.RED, display.BLACK, '.', True]
    world.map[9][9] = [display.RED, display.BLACK, '.', True]
    world.map[10][9] = [display.RED, display.BLACK, '.', True]
    world.map[11][9] = [display.RED, display.BLACK, '.', True]
    world.map[12][9] = [display.RED, display.RED, '#', True]
    world.map[13][9] = [display.RED, display.RED, '#', True]
    world.map[14][9] = [display.RED, display.RED, '#', True]
    world.map[15][9] = [display.RED, display.RED, '#', True]
    world.map[16][9] = [display.RED, display.BLACK, '.', True]
    world.map[17][9] = [display.RED, display.BLACK, '.', True]
    world.map[18][9] = [display.RED, display.BLACK, '.', True]
    world.map[19][9] = [display.RED, display.BLACK, '.', True]
    world.map[20][9] = [display.RED, display.BLACK, '.', True]
    world.map[27][9] = [display.RED, display.BLACK, '.', True]
    world.map[28][9] = [display.RED, display.BLACK, '.', True]
    world.map[30][9] = [display.RED, display.BLACK, '.', True]
    world.map[31][9] = [display.RED, display.BLACK, '.', True]
    world.map[32][9] = [display.RED, display.BLACK, '.', True]
    world.map[33][9] = [display.RED, display.BLACK, '.', True]
    world.map[34][9] = [display.RED, display.BLACK, '.', True]
    world.map[35][9] = [display.RED, display.BLACK, '.', True]
    world.map[49][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][10] = [display.RED, display.BLACK, '.', True]
    world.map[9][10] = [display.RED, display.BLACK, '.', True]
    world.map[10][10] = [display.RED, display.BLACK, '.', True]
    world.map[11][10] = [display.RED, display.BLACK, '.', True]
    world.map[12][10] = [display.RED, display.RED, '#', True]
    world.map[13][10] = [display.RED, display.RED, '#', True]
    world.map[14][10] = [display.RED, display.RED, '#', True]
    world.map[15][10] = [display.RED, display.RED, '#', True]
    world.map[16][10] = [display.RED, display.BLACK, '.', True]
    world.map[17][10] = [display.RED, display.BLACK, '.', True]
    world.map[18][10] = [display.RED, display.BLACK, '.', True]
    world.map[19][10] = [display.RED, display.BLACK, '.', True]
    world.map[28][10] = [display.RED, display.BLACK, '.', True]
    world.map[29][10] = [display.RED, display.BLACK, '.', True]
    world.map[30][10] = [display.RED, display.BLACK, '.', True]
    world.map[31][10] = [display.RED, display.BLACK, '.', True]
    world.map[32][10] = [display.RED, display.BLACK, '.', True]
    world.map[33][10] = [display.RED, display.BLACK, '.', True]
    world.map[34][10] = [display.RED, display.BLACK, '.', True]
    world.map[35][10] = [display.RED, display.BLACK, '.', True]
    world.map[36][10] = [display.RED, display.BLACK, '.', True]
    world.map[37][10] = [display.RED, display.BLACK, '.', True]
    world.map[38][10] = [display.RED, display.BLACK, '.', True]
    world.map[39][10] = [display.RED, display.BLACK, '.', True]
    world.map[49][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][11] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][11] = [display.RED, display.BLACK, '.', True]
    world.map[9][11] = [display.RED, display.BLACK, '.', True]
    world.map[10][11] = [display.RED, display.BLACK, '.', True]
    world.map[11][11] = [display.RED, display.BLACK, '.', True]
    world.map[12][11] = [display.RED, display.BLACK, '.', True]
    world.map[13][11] = [display.RED, display.RED, '#', True]
    world.map[14][11] = [display.RED, display.RED, '#', True]
    world.map[15][11] = [display.RED, display.RED, '#', True]
    world.map[16][11] = [display.RED, display.BLACK, '.', True]
    world.map[17][11] = [display.RED, display.BLACK, '.', True]
    world.map[18][11] = [display.RED, display.BLACK, '.', True]
    world.map[19][11] = [display.RED, display.BLACK, '.', True]
    world.map[20][11] = [display.RED, display.BLACK, '.', True]
    world.map[27][11] = [display.RED, display.BLACK, '.', True]
    world.map[28][11] = [display.RED, display.BLACK, '.', True]
    world.map[29][11] = [display.RED, display.BLACK, '.', True]
    world.map[30][11] = [display.RED, display.BLACK, '.', True]
    world.map[31][11] = [display.RED, display.BLACK, '.', True]
    world.map[32][11] = [display.RED, display.BLACK, '.', True]
    world.map[33][11] = [display.RED, display.BLACK, '.', True]
    world.map[34][11] = [display.RED, display.RED, '#', True]
    world.map[35][11] = [display.RED, display.RED, '#', True]
    world.map[36][11] = [display.RED, display.BLACK, '.', True]
    world.map[37][11] = [display.RED, display.BLACK, '.', True]
    world.map[38][11] = [display.RED, display.BLACK, '.', True]
    world.map[39][11] = [display.RED, display.BLACK, '.', True]
    world.map[40][11] = [display.RED, display.BLACK, '.', True]
    world.map[41][11] = [display.RED, display.BLACK, '.', True]
    world.map[49][11] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][12] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][12] = [display.RED, display.BLACK, '.', True]
    world.map[9][12] = [display.RED, display.BLACK, '.', True]
    world.map[10][12] = [display.RED, display.BLACK, '.', True]
    world.map[11][12] = [display.RED, display.BLACK, '.', True]
    world.map[12][12] = [display.RED, display.BLACK, '.', True]
    world.map[13][12] = [display.RED, display.RED, '#', True]
    world.map[14][12] = [display.RED, display.RED, '#', True]
    world.map[15][12] = [display.RED, display.RED, '#', True]
    world.map[16][12] = [display.RED, display.BLACK, '.', True]
    world.map[17][12] = [display.RED, display.BLACK, '.', True]
    world.map[18][12] = [display.RED, display.BLACK, '.', True]
    world.map[19][12] = [display.RED, display.BLACK, '.', True]
    world.map[20][12] = [display.RED, display.BLACK, '.', True]
    world.map[21][12] = [display.RED, display.BLACK, '.', True]
    world.map[26][12] = [display.RED, display.BLACK, '.', True]
    world.map[27][12] = [display.RED, display.BLACK, '.', True]
    world.map[28][12] = [display.RED, display.BLACK, '.', True]
    world.map[29][12] = [display.RED, display.BLACK, '.', True]
    world.map[30][12] = [display.RED, display.BLACK, '.', True]
    world.map[31][12] = [display.RED, display.BLACK, '.', True]
    world.map[32][12] = [display.RED, display.BLACK, '.', True]
    world.map[33][12] = [display.RED, display.RED, '#', True]
    world.map[34][12] = [display.RED, display.RED, '#', True]
    world.map[35][12] = [display.RED, display.RED, '#', True]
    world.map[36][12] = [display.RED, display.RED, '#', True]
    world.map[37][12] = [display.RED, display.BLACK, '.', True]
    world.map[38][12] = [display.RED, display.BLACK, '.', True]
    world.map[39][12] = [display.RED, display.BLACK, '.', True]
    world.map[40][12] = [display.RED, display.BLACK, '.', True]
    world.map[41][12] = [display.RED, display.BLACK, '.', True]
    world.map[42][12] = [display.RED, display.BLACK, '.', True]
    world.map[49][12] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[1][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[7][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[9][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][13] = [display.RED, display.RED, '#', True]
    world.map[16][13] = [display.RED, display.RED, '#', True]
    world.map[17][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[18][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[21][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[32][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][13] = [display.RED, display.RED, '#', True]
    world.map[34][13] = [display.RED, display.RED, '#', True]
    world.map[35][13] = [display.RED, display.RED, '#', True]
    world.map[36][13] = [display.RED, display.RED, '#', True]
    world.map[37][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[38][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[39][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[40][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[41][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[42][13] = [display.RED, display.BLACK, '.', True]
    world.map[43][13] = [display.RED, display.BLACK, '.', True]
    world.map[44][13] = [display.RED, display.BLACK, '.', True]
    world.map[45][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[46][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[47][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[48][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][14] = [display.RED, display.BLACK, '.', True]
    world.map[15][14] = [display.RED, display.RED, '#', True]
    world.map[16][14] = [display.RED, display.RED, '#', True]
    world.map[17][14] = [display.RED, display.BLACK, '.', True]
    world.map[18][14] = [display.RED, display.BLACK, '.', True]
    world.map[19][14] = [display.RED, display.BLACK, '.', True]
    world.map[20][14] = [display.RED, display.BLACK, '.', True]
    world.map[21][14] = [display.RED, display.BLACK, '.', True]
    world.map[22][14] = [display.RED, display.BLACK, '.', True]
    world.map[23][14] = [display.RED, display.BLACK, '.', True]
    world.map[24][14] = [display.RED, display.BLACK, '.', True]
    world.map[25][14] = [display.RED, display.BLACK, '.', True]
    world.map[26][14] = [display.RED, display.BLACK, '.', True]
    world.map[27][14] = [display.RED, display.BLACK, '.', True]
    world.map[28][14] = [display.RED, display.BLACK, '.', True]
    world.map[29][14] = [display.RED, display.BLACK, '.', True]
    world.map[30][14] = [display.RED, display.BLACK, '.', True]
    world.map[31][14] = [display.RED, display.BLACK, '.', True]
    world.map[32][14] = [display.RED, display.BLACK, '.', True]
    world.map[33][14] = [display.RED, display.BLACK, '.', True]
    world.map[34][14] = [display.RED, display.RED, '#', True]
    world.map[35][14] = [display.RED, display.BLACK, '.', True]
    world.map[36][14] = [display.RED, display.BLACK, '.', True]
    world.map[37][14] = [display.RED, display.BLACK, '.', True]
    world.map[38][14] = [display.RED, display.BLACK, '.', True]
    world.map[39][14] = [display.RED, display.BLACK, '.', True]
    world.map[40][14] = [display.RED, display.BLACK, '.', True]
    world.map[41][14] = [display.RED, display.BLACK, '.', True]
    world.map[42][14] = [display.RED, display.BLACK, '.', True]
    world.map[43][14] = [display.RED, display.BLACK, '.', True]
    world.map[44][14] = [display.RED, display.BLACK, '.', True]
    world.map[45][14] = [display.RED, display.BLACK, '.', True]
    world.map[49][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][15] = [display.RED, display.BLACK, '.', True]
    world.map[14][15] = [display.RED, display.BLACK, '.', True]
    world.map[15][15] = [display.RED, display.RED, '#', True]
    world.map[16][15] = [display.RED, display.RED, '#', True]
    world.map[17][15] = [display.RED, display.BLACK, '.', True]
    world.map[18][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][15] = [display.RED, display.BLACK, '.', True]
    world.map[23][15] = [display.RED, display.BLACK, '.', True]
    world.map[24][15] = [display.RED, display.BLACK, '.', True]
    world.map[25][15] = [display.RED, display.BLACK, '.', True]
    world.map[26][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][15] = [display.RED, display.BLACK, '.', True]
    world.map[30][15] = [display.RED, display.BLACK, '.', True]
    world.map[31][15] = [display.RED, display.BLACK, '.', True]
    world.map[32][15] = [display.RED, display.BLACK, '.', True]
    world.map[33][15] = [display.RED, display.BLACK, '.', True]
    world.map[34][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][15] = [display.RED, display.BLACK, '.', True]
    world.map[38][15] = [display.RED, display.BLACK, '.', True]
    world.map[39][15] = [display.RED, display.BLACK, '.', True]
    world.map[40][15] = [display.RED, display.BLACK, '.', True]
    world.map[41][15] = [display.RED, display.BLACK, '.', True]
    world.map[42][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][15] = [display.RED, display.BLACK, '.', True]
    world.map[46][15] = [display.RED, display.BLACK, '.', True]
    world.map[47][15] = [display.RED, display.BLACK, '.', True]
    world.map[48][15] = [display.RED, display.BLACK, '.', True]
    world.map[49][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][16] = [display.RED, display.BLACK, '.', True]
    world.map[14][16] = [display.RED, display.RED, '#', True]
    world.map[15][16] = [display.RED, display.RED, '#', True]
    world.map[16][16] = [display.RED, display.BLACK, '.', True]
    world.map[17][16] = [display.RED, display.BLACK, '.', True]
    world.map[18][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][16] = [display.RED, display.BLACK, '.', True]
    world.map[23][16] = [display.RED, display.BLACK, '.', True]
    world.map[24][16] = [display.RED, display.BLACK, '.', True]
    world.map[25][16] = [display.RED, display.BLACK, '.', True]
    world.map[26][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][16] = [display.RED, display.BLACK, '.', True]
    world.map[30][16] = [display.RED, display.BLACK, '.', True]
    world.map[31][16] = [display.RED, display.BLACK, '.', True]
    world.map[32][16] = [display.RED, display.BLACK, '.', True]
    world.map[33][16] = [display.RED, display.BLACK, '.', True]
    world.map[34][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][16] = [display.RED, display.BLACK, '.', True]
    world.map[38][16] = [display.RED, display.BLACK, '.', True]
    world.map[39][16] = [display.RED, display.BLACK, '.', True]
    world.map[40][16] = [display.RED, display.BLACK, '.', True]
    world.map[41][16] = [display.RED, display.BLACK, '.', True]
    world.map[42][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][16] = [display.RED, display.BLACK, '.', True]
    world.map[46][16] = [display.RED, display.BLACK, '.', True]
    world.map[47][16] = [display.RED, display.BLACK, '.', True]
    world.map[48][16] = [display.RED, display.BLACK, '.', True]
    world.map[49][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][17] = [display.RED, display.BLACK, '.', True]
    world.map[14][17] = [display.RED, display.RED, '#', True]
    world.map[15][17] = [display.RED, display.RED, '#', True]
    world.map[16][17] = [display.RED, display.BLACK, '.', True]
    world.map[18][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][17] = [display.RED, display.BLACK, '.', True]
    world.map[31][17] = [display.RED, display.BLACK, '.', True]
    world.map[32][17] = [display.RED, display.BLACK, '.', True]
    world.map[33][17] = [display.RED, display.BLACK, '.', True]
    world.map[34][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][17] = [display.RED, display.BLACK, '.', True]
    world.map[38][17] = [display.RED, display.BLACK, '.', True]
    world.map[42][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][17] = [display.RED, display.BLACK, '.', True]
    world.map[46][17] = [display.RED, display.BLACK, '.', True]
    world.map[47][17] = [display.RED, display.BLACK, '.', True]
    world.map[48][17] = [display.RED, display.BLACK, '.', True]
    world.map[49][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][18] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][18] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][18] = [display.RED, display.BLACK, '.', True]
    world.map[14][18] = [display.RED, display.BLACK, '.', True]
    world.map[15][18] = [display.RED, display.RED, '#', True]
    world.map[16][18] = [display.RED, display.BLACK, '.', True]
    world.map[31][18] = [display.RED, display.BLACK, '.', True]
    world.map[32][18] = [display.RED, display.BLACK, '.', True]
    world.map[33][18] = [display.RED, display.BLACK, '.', True]
    world.map[45][18] = [display.RED, display.BLACK, '.', True]
    world.map[46][18] = [display.RED, display.BLACK, '.', True]
    world.map[47][18] = [display.RED, display.BLACK, '.', True]
    world.map[48][18] = [display.RED, display.BLACK, '.', True]
    world.map[49][18] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[1][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[7][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[9][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[17][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[18][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[21][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[32][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[38][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[39][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[40][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[41][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[42][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[46][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[47][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[48][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][19] = [display.WHITE, display.BLACK, '#', False]
Example #4
0
def generate():
    world.objects.clear()
    world.map = [[ [display.WHITE, display.BLACK, '.', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]

    world.objects.append(LavaDungeon.lava.lava())
    world.objects.append(portal.portal(0, 10, "town", 25, 10))
    world.objects.append(portal.portal(25, 10, "lavadungeon.1", 25, 10))
    world.objects.append(LavaDungeon.enemy.generic_enemy(15, 7))
    world.objects.append(LavaDungeon.enemy.generic_enemy(43, 5))
    world.objects.append(LavaDungeon.enemy.generic_enemy(35, 15))
    npc_text = "Hello, adventurer.\nA warning before you enter\n the volcano:\nIt contains an\n ancient deadly beast.\nThere is no escape\n from the volcano before\n the beast is slain."
    npc_diag = npc.dialogue_tree()
    npc_diag.add_node("start", npc.node(npc_text, ("Oh no!", "exit")))
    npc_diag.add_exit("exit", 0)
    world.objects.append(npc.npc(23, 9, npc_diag))

    world.map[0][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[1][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[2][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[3][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[4][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[5][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[6][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[7][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[8][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[9][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[10][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[11][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[12][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[13][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[14][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[15][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[17][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[18][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[19][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[20][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[21][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[26][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[27][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[28][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[29][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[30][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[31][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[32][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[33][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[35][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[36][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[37][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[38][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[39][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[40][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[41][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[42][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[43][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[44][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[45][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[46][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[47][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[48][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][0] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][1] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][1] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][2] =  [display.WHITE, display.BLACK, '#', False]
    world.map[27][2] =  [display.RED, display.BLACK, '.', True]
    world.map[28][2] =  [display.RED, display.BLACK, '.', True]
    world.map[29][2] =  [display.RED, display.BLACK, '.', True]
    world.map[49][2] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][3] =  [display.WHITE, display.BLACK, '#', False]
    world.map[5][3] =  [display.RED, display.BLACK, '.', True]
    world.map[6][3] =  [display.RED, display.BLACK, '.', True]
    world.map[7][3] =  [display.RED, display.BLACK, '.', True]
    world.map[8][3] =  [display.RED, display.BLACK, '.', True]
    world.map[9][3] =  [display.RED, display.BLACK, '.', True]
    world.map[25][3] =  [display.RED, display.BLACK, '.', True]
    world.map[26][3] =  [display.RED, display.BLACK, '.', True]
    world.map[27][3] =  [display.RED, display.BLACK, '.', True]
    world.map[28][3] =  [display.RED, display.RED, '#', True]
    world.map[29][3] =  [display.RED, display.BLACK, '.', True]
    world.map[49][3] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][4] =  [display.WHITE, display.BLACK, '#', False]
    world.map[5][4] =  [display.RED, display.BLACK, '.', True]
    world.map[6][4] =  [display.RED, display.RED, '#', True]
    world.map[7][4] =  [display.RED, display.RED, '#', True]
    world.map[8][4] =  [display.RED, display.RED, '#', True]
    world.map[9][4] =  [display.RED, display.BLACK, '.', True]
    world.map[24][4] =  [display.RED, display.BLACK, '.', True]
    world.map[25][4] =  [display.RED, display.BLACK, '.', True]
    world.map[26][4] =  [display.RED, display.RED, '#', True]
    world.map[27][4] =  [display.RED, display.RED, '#', True]
    world.map[28][4] =  [display.RED, display.RED, '#', True]
    world.map[29][4] =  [display.RED, display.BLACK, '.', True]
    world.map[30][4] =  [display.RED, display.BLACK, '.', True]
    world.map[49][4] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[5][5] =  [display.RED, display.BLACK, '.', True]
    world.map[6][5] =  [display.RED, display.BLACK, '.', True]
    world.map[7][5] =  [display.RED, display.RED, '#', True]
    world.map[8][5] =  [display.RED, display.BLACK, '.', True]
    world.map[9][5] =  [display.RED, display.BLACK, '.', True]
    world.map[24][5] =  [display.RED, display.BLACK, '.', True]
    world.map[25][5] =  [display.RED, display.RED, '#', True]
    world.map[26][5] =  [display.RED, display.RED, '#', True]
    world.map[27][5] =  [display.RED, display.RED, '#', True]
    world.map[28][5] =  [display.RED, display.RED, '#', True]
    world.map[29][5] =  [display.RED, display.RED, '#', True]
    world.map[30][5] =  [display.RED, display.BLACK, '.', True]
    world.map[31][5] =  [display.RED, display.BLACK, '.', True]
    world.map[49][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][6] =  [display.WHITE, display.BLACK, '#', False]
    world.map[6][6] =  [display.RED, display.BLACK, '.', True]
    world.map[7][6] =  [display.RED, display.BLACK, '.', True]
    world.map[8][6] =  [display.RED, display.BLACK, '.', True]
    world.map[24][6] =  [display.RED, display.BLACK, '.', True]
    world.map[25][6] =  [display.RED, display.RED, '#', True]
    world.map[26][6] =  [display.RED, display.RED, '#', True]
    world.map[27][6] =  [display.RED, display.BLACK, '.', True]
    world.map[28][6] =  [display.RED, display.RED, '#', True]
    world.map[29][6] =  [display.RED, display.RED, '#', True]
    world.map[30][6] =  [display.RED, display.RED, '#', True]
    world.map[31][6] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][6] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][7] =  [display.RED, display.RED, '#', True]
    world.map[26][7] =  [display.RED, display.BLACK, '.', True]
    world.map[27][7] =  [display.RED, display.BLACK, '.', True]
    world.map[28][7] =  [display.RED, display.BLACK, '.', True]
    world.map[29][7] =  [display.RED, display.RED, '#', True]
    world.map[30][7] =  [display.RED, display.BLACK, '.', True]
    world.map[31][7] =  [display.RED, display.BLACK, '.', True]
    world.map[32][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[33][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][7] =  [display.RED, display.BLACK, '.', True]
    world.map[35][7] =  [display.RED, display.BLACK, '.', True]
    world.map[36][7] =  [display.RED, display.BLACK, '.', True]
    world.map[37][7] =  [display.RED, display.BLACK, '.', True]
    world.map[38][7] =  [display.RED, display.BLACK, '.', True]
    world.map[39][7] =  [display.RED, display.BLACK, '.', True]
    world.map[49][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][8] =  [display.RED, display.BLACK, '.', True]
    world.map[26][8] =  [display.RED, display.BLACK, '.', True]
    world.map[28][8] =  [display.RED, display.BLACK, '.', True]
    world.map[29][8] =  [display.RED, display.BLACK, '.', True]
    world.map[30][8] =  [display.RED, display.BLACK, '.', True]
    world.map[34][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[35][8] =  [display.RED, display.RED, '#', True]
    world.map[36][8] =  [display.RED, display.RED, '#', True]
    world.map[37][8] =  [display.RED, display.BLACK, '.', True]
    world.map[38][8] =  [display.RED, display.RED, '#', True]
    world.map[39][8] =  [display.RED, display.BLACK, '.', True]
    world.map[40][8] =  [display.RED, display.BLACK, '.', True]
    world.map[49][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][9] =  [display.RED, display.BLACK, '.', True]
    world.map[17][9] =  [display.RED, display.BLACK, '.', True]
    world.map[18][9] =  [display.RED, display.BLACK, '.', True]
    world.map[19][9] =  [display.RED, display.BLACK, '.', True]
    world.map[21][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][9] =  [display.RED, display.BLACK, '.', True]
    world.map[35][9] =  [display.RED, display.RED, '#', True]
    world.map[36][9] =  [display.RED, display.RED, '#', True]
    world.map[37][9] =  [display.RED, display.RED, '#', True]
    world.map[38][9] =  [display.RED, display.RED, '#', True]
    world.map[39][9] =  [display.RED, display.RED, '#', True]
    world.map[40][9] =  [display.RED, display.BLACK, '.', True]
    world.map[49][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][10] =  [display.WHITE, display.BLACK, '.', True]
    world.map[15][10] =  [display.RED, display.BLACK, '.', True]
    world.map[16][10] =  [display.RED, display.BLACK, '.', True]
    world.map[17][10] =  [display.RED, display.RED, '#', True]
    world.map[18][10] =  [display.RED, display.RED, '#', True]
    world.map[19][10] =  [display.RED, display.BLACK, '.', True]
    world.map[20][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[33][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[35][10] =  [display.RED, display.RED, '#', True]
    world.map[36][10] =  [display.RED, display.RED, '#', True]
    world.map[37][10] =  [display.RED, display.RED, '#', True]
    world.map[38][10] =  [display.RED, display.BLACK, '.', True]
    world.map[39][10] =  [display.RED, display.BLACK, '.', True]
    world.map[40][10] =  [display.RED, display.BLACK, '.', True]
    world.map[49][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][11] =  [display.WHITE, display.BLACK, '#', False]
    world.map[15][11] =  [display.RED, display.BLACK, '.', True]
    world.map[16][11] =  [display.RED, display.RED, '#', True]
    world.map[17][11] =  [display.RED, display.RED, '#', True]
    world.map[18][11] =  [display.RED, display.RED, '#', True]
    world.map[19][11] =  [display.RED, display.RED, '#', True]
    world.map[20][11] =  [display.RED, display.BLACK, '.', True]
    world.map[32][11] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][11] =  [display.RED, display.BLACK, '.', True]
    world.map[35][11] =  [display.RED, display.BLACK, '.', True]
    world.map[36][11] =  [display.RED, display.RED, '#', True]
    world.map[37][11] =  [display.RED, display.BLACK, '.', True]
    world.map[38][11] =  [display.RED, display.BLACK, '.', True]
    world.map[49][11] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][12] =  [display.WHITE, display.BLACK, '#', False]
    world.map[15][12] =  [display.RED, display.BLACK, '.', True]
    world.map[16][12] =  [display.RED, display.RED, '#', True]
    world.map[17][12] =  [display.RED, display.RED, '#', True]
    world.map[18][12] =  [display.RED, display.RED, '#', True]
    world.map[19][12] =  [display.RED, display.BLACK, '.', True]
    world.map[20][12] =  [display.RED, display.BLACK, '.', True]
    world.map[32][12] =  [display.WHITE, display.BLACK, '#', False]
    world.map[35][12] =  [display.RED, display.BLACK, '.', True]
    world.map[36][12] =  [display.RED, display.BLACK, '.', True]
    world.map[37][12] =  [display.RED, display.BLACK, '.', True]
    world.map[49][12] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][13] =  [display.WHITE, display.BLACK, '#', False]
    world.map[15][13] =  [display.RED, display.BLACK, '.', True]
    world.map[16][13] =  [display.RED, display.BLACK, '.', True]
    world.map[17][13] =  [display.RED, display.RED, '#', True]
    world.map[18][13] =  [display.RED, display.RED, '#', True]
    world.map[19][13] =  [display.RED, display.BLACK, '.', True]
    world.map[20][13] =  [display.RED, display.BLACK, '.', True]
    world.map[30][13] =  [display.WHITE, display.BLACK, '#', False]
    world.map[31][13] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][13] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][14] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][14] =  [display.RED, display.BLACK, '.', True]
    world.map[17][14] =  [display.RED, display.BLACK, '.', True]
    world.map[18][14] =  [display.RED, display.RED, '#', True]
    world.map[19][14] =  [display.RED, display.RED, '#', True]
    world.map[20][14] =  [display.RED, display.BLACK, '.', True]
    world.map[21][14] =  [display.RED, display.BLACK, '.', True]
    world.map[27][14] =  [display.RED, display.BLACK, '.', True]
    world.map[28][14] =  [display.RED, display.BLACK, '.', True]
    world.map[29][14] =  [display.RED, display.BLACK, '.', True]
    world.map[30][14] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][14] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][15] =  [display.WHITE, display.BLACK, '#', False]
    world.map[17][15] =  [display.RED, display.BLACK, '.', True]
    world.map[18][15] =  [display.RED, display.RED, '#', True]
    world.map[19][15] =  [display.RED, display.RED, '#', True]
    world.map[20][15] =  [display.RED, display.RED, '#', True]
    world.map[21][15] =  [display.RED, display.BLACK, '.', True]
    world.map[27][15] =  [display.RED, display.BLACK, '.', True]
    world.map[28][15] =  [display.RED, display.RED, '#', True]
    world.map[29][15] =  [display.RED, display.RED, '#', True]
    world.map[30][15] =  [display.RED, display.BLACK, '.', True]
    world.map[31][15] =  [display.RED, display.BLACK, '.', True]
    world.map[49][15] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][16] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][16] =  [display.RED, display.BLACK, '.', True]
    world.map[17][16] =  [display.RED, display.BLACK, '.', True]
    world.map[18][16] =  [display.RED, display.BLACK, '.', True]
    world.map[19][16] =  [display.RED, display.RED, '#', True]
    world.map[20][16] =  [display.RED, display.RED, '#', True]
    world.map[21][16] =  [display.RED, display.BLACK, '.', True]
    world.map[27][16] =  [display.RED, display.BLACK, '.', True]
    world.map[28][16] =  [display.RED, display.BLACK, '.', True]
    world.map[29][16] =  [display.RED, display.BLACK, '.', True]
    world.map[30][16] =  [display.RED, display.RED, '#', True]
    world.map[31][16] =  [display.RED, display.BLACK, '.', True]
    world.map[49][16] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][17] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][17] =  [display.RED, display.BLACK, '.', True]
    world.map[17][17] =  [display.RED, display.RED, '#', True]
    world.map[18][17] =  [display.RED, display.RED, '#', True]
    world.map[19][17] =  [display.RED, display.RED, '#', True]
    world.map[20][17] =  [display.RED, display.BLACK, '.', True]
    world.map[21][17] =  [display.RED, display.BLACK, '.', True]
    world.map[29][17] =  [display.RED, display.BLACK, '.', True]
    world.map[30][17] =  [display.RED, display.BLACK, '.', True]
    world.map[31][17] =  [display.RED, display.BLACK, '.', True]
    world.map[49][17] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][18] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][18] =  [display.RED, display.BLACK, '.', True]
    world.map[17][18] =  [display.RED, display.BLACK, '.', True]
    world.map[18][18] =  [display.RED, display.RED, '#', True]
    world.map[19][18] =  [display.RED, display.RED, '#', True]
    world.map[20][18] =  [display.RED, display.BLACK, '.', True]
    world.map[49][18] =  [display.WHITE, display.BLACK, '#', False]
    world.map[0][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[1][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[2][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[3][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[4][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[5][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[6][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[7][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[8][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[9][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[10][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[11][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[12][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[13][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[14][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[15][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[16][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[17][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[18][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[19][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[20][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[21][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[26][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[27][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[28][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[29][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[30][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[31][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[32][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[33][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[34][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[35][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[36][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[37][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[38][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[39][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[40][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[41][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[42][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[43][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[44][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[45][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[46][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[47][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[48][19] =  [display.WHITE, display.BLACK, '#', False]
    world.map[49][19] =  [display.WHITE, display.BLACK, '#', False]
Example #5
0
def generate():
    world.objects.clear()
    world.map = [[[display.GREEN, display.BLACK, ';', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(
        portal.portal(world.WORLD_X - 1, 10, "tutorial.boss", 0, 10))
    world.objects.append(Tutorial.lava.lava())

    world.map[5][0] = [0, 1, '^', True]
    world.map[26][0] = [0, 1, '^', True]
    world.map[34][0] = [0, 1, '^', True]
    world.map[2][1] = [0, 1, 'L', True]
    world.map[3][1] = [0, 1, 'e', True]
    world.map[4][1] = [0, 1, 'v', True]
    world.map[5][1] = [0, 1, 'e', True]
    world.map[6][1] = [0, 1, 'l', True]
    world.map[7][1] = [0, 1, ' ', True]
    world.map[8][1] = [0, 1, 'a', True]
    world.map[9][1] = [0, 1, 'n', True]
    world.map[10][1] = [0, 1, 'd', True]
    world.map[11][1] = [0, 1, ' ', True]
    world.map[12][1] = [0, 1, 'E', True]
    world.map[13][1] = [0, 1, 'X', True]
    world.map[14][1] = [0, 1, 'P', True]
    world.map[22][1] = [0, 1, 'C', True]
    world.map[23][1] = [0, 1, 'u', True]
    world.map[24][1] = [0, 1, 'r', True]
    world.map[25][1] = [0, 1, 'r', True]
    world.map[26][1] = [0, 1, 'e', True]
    world.map[27][1] = [0, 1, 'n', True]
    world.map[28][1] = [0, 1, 't', True]
    world.map[32][1] = [0, 1, 'C', True]
    world.map[33][1] = [0, 1, 'u', True]
    world.map[34][1] = [0, 1, 'r', True]
    world.map[35][1] = [0, 1, 'r', True]
    world.map[36][1] = [0, 1, 'e', True]
    world.map[37][1] = [0, 1, 'n', True]
    world.map[38][1] = [0, 1, 't', True]
    world.map[23][2] = [0, 1, 'S', True]
    world.map[24][2] = [0, 1, 'p', True]
    world.map[25][2] = [0, 1, 'e', True]
    world.map[26][2] = [0, 1, 'l', True]
    world.map[27][2] = [0, 1, 'l', True]
    world.map[33][2] = [0, 1, 'I', True]
    world.map[34][2] = [0, 1, 't', True]
    world.map[35][2] = [0, 1, 'e', True]
    world.map[36][2] = [0, 1, 'm', True]
    world.map[31][4] = [0, 1, 'C', True]
    world.map[32][4] = [0, 1, 'o', True]
    world.map[33][4] = [0, 1, 'n', True]
    world.map[34][4] = [0, 1, 'g', True]
    world.map[35][4] = [0, 1, 'r', True]
    world.map[36][4] = [0, 1, 'a', True]
    world.map[37][4] = [0, 1, 't', True]
    world.map[38][4] = [0, 1, 'u', True]
    world.map[39][4] = [0, 1, 'l', True]
    world.map[40][4] = [0, 1, 'a', True]
    world.map[41][4] = [0, 1, 't', True]
    world.map[42][4] = [0, 1, 'i', True]
    world.map[43][4] = [0, 1, 'o', True]
    world.map[44][4] = [0, 1, 'n', True]
    world.map[45][4] = [0, 1, 's', True]
    world.map[46][4] = [0, 1, '!', True]
    world.map[25][5] = [0, 1, 'Y', True]
    world.map[26][5] = [0, 1, 'o', True]
    world.map[27][5] = [0, 1, 'u', True]
    world.map[28][5] = [0, 1, ' ', True]
    world.map[29][5] = [0, 1, 'l', True]
    world.map[30][5] = [0, 1, 'e', True]
    world.map[31][5] = [0, 1, 'v', True]
    world.map[32][5] = [0, 1, 'e', True]
    world.map[33][5] = [0, 1, 'l', True]
    world.map[34][5] = [0, 1, 'l', True]
    world.map[35][5] = [0, 1, 'e', True]
    world.map[36][5] = [0, 1, 'd', True]
    world.map[37][5] = [0, 1, ' ', True]
    world.map[38][5] = [0, 1, 'u', True]
    world.map[39][5] = [0, 1, 'p', True]
    world.map[40][5] = [0, 1, ' ', True]
    world.map[41][5] = [0, 1, 'a', True]
    world.map[42][5] = [0, 1, 'n', True]
    world.map[43][5] = [0, 1, 'd', True]
    world.map[44][5] = [0, 1, ' ', True]
    world.map[45][5] = [0, 1, 'g', True]
    world.map[46][5] = [0, 1, 'o', True]
    world.map[47][5] = [0, 1, 't', True]
    world.map[26][6] = [0, 1, 'a', True]
    world.map[27][6] = [0, 1, ' ', True]
    world.map[28][6] = [0, 1, 'n', True]
    world.map[29][6] = [0, 1, 'e', True]
    world.map[30][6] = [0, 1, 'w', True]
    world.map[31][6] = [0, 1, ' ', True]
    world.map[32][6] = [0, 1, 's', True]
    world.map[33][6] = [0, 1, 'p', True]
    world.map[34][6] = [0, 1, 'e', True]
    world.map[35][6] = [0, 1, 'l', True]
    world.map[36][6] = [0, 1, 'l', True]
    world.map[37][6] = [0, 1, '!', True]
    world.map[38][6] = [0, 1, ' ', True]
    world.map[39][6] = [0, 1, 'P', True]
    world.map[40][6] = [0, 1, 'r', True]
    world.map[41][6] = [0, 1, 'e', True]
    world.map[42][6] = [0, 1, 's', True]
    world.map[43][6] = [0, 1, 's', True]
    world.map[44][6] = [0, 1, ' ', True]
    world.map[45][6] = [0, 1, 'E', True]
    world.map[46][6] = [0, 1, 'S', True]
    world.map[47][6] = [0, 1, 'C', True]
    world.map[2][7] = [0, 1, 'B', True]
    world.map[3][7] = [0, 1, 'e', True]
    world.map[4][7] = [0, 1, 'w', True]
    world.map[5][7] = [0, 1, 'a', True]
    world.map[6][7] = [0, 1, 'r', True]
    world.map[7][7] = [0, 1, 'e', True]
    world.map[8][7] = [0, 1, ' ', True]
    world.map[9][7] = [0, 1, 'o', True]
    world.map[10][7] = [0, 1, 'f', True]
    world.map[11][7] = [0, 1, ' ', True]
    world.map[12][7] = [0, 1, 'l', True]
    world.map[13][7] = [0, 1, 'a', True]
    world.map[14][7] = [0, 1, 'v', True]
    world.map[15][7] = [0, 1, 'a', True]
    world.map[16][7] = [0, 1, '!', True]
    world.map[31][7] = [0, 1, 't', True]
    world.map[32][7] = [0, 1, 'o', True]
    world.map[33][7] = [0, 1, ' ', True]
    world.map[34][7] = [0, 1, 'o', True]
    world.map[35][7] = [0, 1, 'p', True]
    world.map[36][7] = [0, 1, 'e', True]
    world.map[37][7] = [0, 1, 'n', True]
    world.map[38][7] = [0, 1, ' ', True]
    world.map[39][7] = [0, 1, 't', True]
    world.map[40][7] = [0, 1, 'h', True]
    world.map[41][7] = [0, 1, 'e', True]
    world.map[42][7] = [0, 1, ' ', True]
    world.map[43][7] = [0, 1, 'm', True]
    world.map[44][7] = [0, 1, 'e', True]
    world.map[45][7] = [0, 1, 'n', True]
    world.map[46][7] = [0, 1, 'u', True]
    world.map[47][7] = [0, 1, '.', True]
    world.map[2][8] = [0, 1, 'I', True]
    world.map[3][8] = [0, 1, 't', True]
    world.map[4][8] = [0, 1, ' ', True]
    world.map[5][8] = [0, 1, 'w', True]
    world.map[6][8] = [0, 1, 'i', True]
    world.map[7][8] = [0, 1, 'l', True]
    world.map[8][8] = [0, 1, 'l', True]
    world.map[9][8] = [0, 1, ' ', True]
    world.map[10][8] = [0, 1, 'k', True]
    world.map[11][8] = [0, 1, 'i', True]
    world.map[12][8] = [0, 1, 'l', True]
    world.map[13][8] = [0, 1, 'l', True]
    world.map[14][8] = [0, 1, ' ', True]
    world.map[15][8] = [0, 1, 'y', True]
    world.map[16][8] = [0, 1, 'o', True]
    world.map[17][8] = [0, 1, 'u', True]
    world.map[18][8] = [0, 1, '.', True]
    world.map[29][8] = [0, 1, 'I', True]
    world.map[30][8] = [0, 1, 'n', True]
    world.map[31][8] = [0, 1, ' ', True]
    world.map[32][8] = [0, 1, 't', True]
    world.map[33][8] = [0, 1, 'h', True]
    world.map[34][8] = [0, 1, 'e', True]
    world.map[35][8] = [0, 1, ' ', True]
    world.map[36][8] = [0, 1, 'm', True]
    world.map[37][8] = [0, 1, 'e', True]
    world.map[38][8] = [0, 1, 'n', True]
    world.map[39][8] = [0, 1, 'u', True]
    world.map[40][8] = [0, 1, ',', True]
    world.map[41][8] = [0, 1, ' ', True]
    world.map[42][8] = [0, 1, 'c', True]
    world.map[43][8] = [0, 1, 'h', True]
    world.map[44][8] = [0, 1, 'o', True]
    world.map[45][8] = [0, 1, 'o', True]
    world.map[46][8] = [0, 1, 's', True]
    world.map[47][8] = [0, 1, 'e', True]
    world.map[2][9] = [display.RED, display.RED, '#', True]
    world.map[3][9] = [0, 1, ' ', True]
    world.map[4][9] = [0, 1, 'i', True]
    world.map[5][9] = [0, 1, 's', True]
    world.map[6][9] = [0, 1, ' ', True]
    world.map[7][9] = [0, 1, 'l', True]
    world.map[8][9] = [0, 1, 'a', True]
    world.map[9][9] = [0, 1, 'v', True]
    world.map[10][9] = [0, 1, 'a', True]
    world.map[11][9] = [0, 1, '.', True]
    world.map[28][9] = [0, 1, '"', True]
    world.map[29][9] = [0, 1, 'S', True]
    world.map[30][9] = [0, 1, 'p', True]
    world.map[31][9] = [0, 1, 'e', True]
    world.map[32][9] = [0, 1, 'l', True]
    world.map[33][9] = [0, 1, 'l', True]
    world.map[34][9] = [0, 1, 's', True]
    world.map[35][9] = [0, 1, '"', True]
    world.map[36][9] = [0, 1, ' ', True]
    world.map[37][9] = [0, 1, 'a', True]
    world.map[38][9] = [0, 1, 'n', True]
    world.map[39][9] = [0, 1, 'd', True]
    world.map[40][9] = [0, 1, ' ', True]
    world.map[41][9] = [0, 1, 's', True]
    world.map[42][9] = [0, 1, 'e', True]
    world.map[43][9] = [0, 1, 't', True]
    world.map[44][9] = [0, 1, ' ', True]
    world.map[45][9] = [0, 1, 'i', True]
    world.map[46][9] = [0, 1, 't', True]
    world.map[47][9] = [0, 1, '!', True]
    world.map[49][10] = [0, 1, 'O', True]
    world.map[34][12] = [0, 1, 'P', True]
    world.map[35][12] = [0, 1, 'r', True]
    world.map[36][12] = [0, 1, 'e', True]
    world.map[37][12] = [0, 1, 's', True]
    world.map[38][12] = [0, 1, 's', True]
    world.map[39][12] = [0, 1, ' ', True]
    world.map[40][12] = [0, 1, 's', True]
    world.map[41][12] = [0, 1, 'p', True]
    world.map[42][12] = [0, 1, 'a', True]
    world.map[43][12] = [0, 1, 'c', True]
    world.map[44][12] = [0, 1, 'e', True]
    world.map[45][12] = [0, 1, ' ', True]
    world.map[46][12] = [0, 1, 't', True]
    world.map[47][12] = [0, 1, 'o', True]
    world.map[5][13] = [display.RED, display.RED, '#', True]
    world.map[6][13] = [display.RED, display.RED, '#', True]
    world.map[7][13] = [display.RED, display.RED, '#', True]
    world.map[30][13] = [display.RED, display.RED, '#', True]
    world.map[31][13] = [display.RED, display.RED, '#', True]
    world.map[32][13] = [display.RED, display.RED, '#', True]
    world.map[33][13] = [0, 1, 'c', True]
    world.map[34][13] = [0, 1, 'a', True]
    world.map[35][13] = [0, 1, 's', True]
    world.map[36][13] = [0, 1, 't', True]
    world.map[37][13] = [0, 1, ' ', True]
    world.map[38][13] = [0, 1, 'y', True]
    world.map[39][13] = [0, 1, 'o', True]
    world.map[40][13] = [0, 1, 'u', True]
    world.map[41][13] = [0, 1, 'r', True]
    world.map[42][13] = [0, 1, ' ', True]
    world.map[43][13] = [0, 1, 's', True]
    world.map[44][13] = [0, 1, 'p', True]
    world.map[45][13] = [0, 1, 'e', True]
    world.map[46][13] = [0, 1, 'l', True]
    world.map[47][13] = [0, 1, 'l', True]
    world.map[6][14] = [display.RED, display.RED, '#', True]
    world.map[7][14] = [display.RED, display.RED, '#', True]
    world.map[8][14] = [display.RED, display.RED, '#', True]
    world.map[31][14] = [display.RED, display.RED, '#', True]
    world.map[32][14] = [display.RED, display.RED, '#', True]
    world.map[33][14] = [0, 1, 'b', True]
    world.map[34][14] = [0, 1, 'u', True]
    world.map[35][14] = [0, 1, 't', True]
    world.map[36][14] = [0, 1, ' ', True]
    world.map[37][14] = [0, 1, 'k', True]
    world.map[38][14] = [0, 1, 'e', True]
    world.map[39][14] = [0, 1, 'e', True]
    world.map[40][14] = [0, 1, 'p', True]
    world.map[41][14] = [0, 1, ' ', True]
    world.map[42][14] = [0, 1, 'a', True]
    world.map[43][14] = [0, 1, 'n', True]
    world.map[44][14] = [0, 1, ' ', True]
    world.map[45][14] = [0, 1, 'e', True]
    world.map[46][14] = [0, 1, 'y', True]
    world.map[47][14] = [0, 1, 'e', True]
    world.map[7][15] = [display.RED, display.RED, '#', True]
    world.map[8][15] = [display.RED, display.RED, '#', True]
    world.map[9][15] = [display.RED, display.RED, '#', True]
    world.map[10][15] = [display.RED, display.RED, '#', True]
    world.map[11][15] = [display.RED, display.RED, '#', True]
    world.map[35][15] = [0, 1, 'o', True]
    world.map[36][15] = [0, 1, 'n', True]
    world.map[37][15] = [0, 1, ' ', True]
    world.map[38][15] = [0, 1, 'y', True]
    world.map[39][15] = [0, 1, 'o', True]
    world.map[40][15] = [0, 1, 'u', True]
    world.map[41][15] = [0, 1, 'r', True]
    world.map[42][15] = [0, 1, ' ', True]
    world.map[43][15] = [0, 1, 'm', True]
    world.map[44][15] = [0, 1, 'a', True]
    world.map[45][15] = [0, 1, 'n', True]
    world.map[46][15] = [0, 1, 'a', True]
    world.map[47][15] = [0, 1, '!', True]
    world.map[5][16] = [display.RED, display.RED, '#', True]
    world.map[6][16] = [display.RED, display.RED, '#', True]
    world.map[7][16] = [display.RED, display.RED, '#', True]
    world.map[8][16] = [display.RED, display.RED, '#', True]
    world.map[9][16] = [display.RED, display.RED, '#', True]
Example #6
0
def generate():
    world.objects.clear()
    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    
    world.objects.append(Tutorial.lava.lava())
    world.objects.append(portal.portal(49, 10, "tutorial.final", 25, 9))
    chest_items = [\
        bread.bread(5) \
      ]
    world.objects.append(chest.chest(24, 10, chest_items))
    world.objects.append(chest.chest(26, 10, chest_items))
    world.objects.append(chest.chest(25, 11, chest_items))
    world.objects.append(chest.chest(25, 9 , chest_items))

    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.map[2][2] =  [display.RED, display.RED, '#', True]
    world.map[3][2] =  [display.RED, display.RED, '#', True]
    world.map[46][2] =  [display.RED, display.RED, '#', True]
    world.map[47][2] =  [display.RED, display.RED, '#', True]
    world.map[2][3] =  [display.RED, display.RED, '#', True]
    world.map[3][3] =  [display.RED, display.RED, '#', True]
    world.map[18][3] = [0, 1, 'C', True]
    world.map[19][3] = [0, 1, 'o', True]
    world.map[20][3] = [0, 1, 'n', True]
    world.map[21][3] = [0, 1, 'g', True]
    world.map[22][3] = [0, 1, 'r', True]
    world.map[23][3] = [0, 1, 'a', True]
    world.map[24][3] = [0, 1, 't', True]
    world.map[25][3] = [0, 1, 'u', True]
    world.map[26][3] = [0, 1, 'l', True]
    world.map[27][3] = [0, 1, 'a', True]
    world.map[28][3] = [0, 1, 't', True]
    world.map[29][3] = [0, 1, 'i', True]
    world.map[30][3] = [0, 1, 'o', True]
    world.map[31][3] = [0, 1, 'n', True]
    world.map[32][3] = [0, 1, 's', True]
    world.map[33][3] = [0, 1, '!', True]
    world.map[46][3] =  [display.RED, display.RED, '#', True]
    world.map[47][3] =  [display.RED, display.RED, '#', True]
    world.map[6][4] =  [display.RED, display.RED, '#', True]
    world.map[16][4] = [0, 1, 'Y', True]
    world.map[17][4] = [0, 1, 'o', True]
    world.map[18][4] = [0, 1, 'u', True]
    world.map[19][4] = [0, 1, ' ', True]
    world.map[20][4] = [0, 1, 'k', True]
    world.map[21][4] = [0, 1, 'i', True]
    world.map[22][4] = [0, 1, 'l', True]
    world.map[23][4] = [0, 1, 'l', True]
    world.map[24][4] = [0, 1, 'e', True]
    world.map[25][4] = [0, 1, 'd', True]
    world.map[26][4] = [0, 1, ' ', True]
    world.map[27][4] = [0, 1, 't', True]
    world.map[28][4] = [0, 1, 'h', True]
    world.map[29][4] = [0, 1, 'e', True]
    world.map[30][4] = [0, 1, ' ', True]
    world.map[31][4] = [0, 1, 'b', True]
    world.map[32][4] = [0, 1, 'o', True]
    world.map[33][4] = [0, 1, 's', True]
    world.map[34][4] = [0, 1, 's', True]
    world.map[35][4] = [0, 1, '!', True]
    world.map[43][4] =  [display.RED, display.RED, '#', True]
    world.map[9][5] =  [display.RED, display.RED, '#', True]
    world.map[11][5] = [0, 1, 'P', True]
    world.map[12][5] = [0, 1, 'i', True]
    world.map[13][5] = [0, 1, 'c', True]
    world.map[14][5] = [0, 1, 'k', True]
    world.map[15][5] = [0, 1, ' ', True]
    world.map[16][5] = [0, 1, 'u', True]
    world.map[17][5] = [0, 1, 'p', True]
    world.map[18][5] = [0, 1, ' ', True]
    world.map[19][5] = [0, 1, 'i', True]
    world.map[20][5] = [0, 1, 't', True]
    world.map[21][5] = [0, 1, 'e', True]
    world.map[22][5] = [0, 1, 'm', True]
    world.map[23][5] = [0, 1, 's', True]
    world.map[24][5] = [0, 1, ' ', True]
    world.map[25][5] = [0, 1, 'f', True]
    world.map[26][5] = [0, 1, 'r', True]
    world.map[27][5] = [0, 1, 'o', True]
    world.map[28][5] = [0, 1, 'm', True]
    world.map[29][5] = [0, 1, ' ', True]
    world.map[30][5] = [0, 1, 't', True]
    world.map[31][5] = [0, 1, 'h', True]
    world.map[32][5] = [0, 1, 'e', True]
    world.map[33][5] = [0, 1, ' ', True]
    world.map[34][5] = [0, 1, 'c', True]
    world.map[35][5] = [0, 1, 'h', True]
    world.map[36][5] = [0, 1, 'e', True]
    world.map[37][5] = [0, 1, 's', True]
    world.map[38][5] = [0, 1, 't', True]
    world.map[40][5] =  [display.RED, display.RED, '#', True]
    world.map[13][6] =  [display.RED, display.RED, '#', True]
    world.map[14][6] = [0, 1, 'B', True]
    world.map[15][6] = [0, 1, 'y', True]
    world.map[16][6] = [0, 1, ' ', True]
    world.map[17][6] = [0, 1, 's', True]
    world.map[18][6] = [0, 1, 't', True]
    world.map[19][6] = [0, 1, 'a', True]
    world.map[20][6] = [0, 1, 'n', True]
    world.map[21][6] = [0, 1, 'd', True]
    world.map[22][6] = [0, 1, 'i', True]
    world.map[23][6] = [0, 1, 'n', True]
    world.map[24][6] = [0, 1, 'g', True]
    world.map[25][6] = [0, 1, ' ', True]
    world.map[26][6] = [0, 1, 'n', True]
    world.map[27][6] = [0, 1, 'e', True]
    world.map[28][6] = [0, 1, 'x', True]
    world.map[29][6] = [0, 1, 't', True]
    world.map[30][6] = [0, 1, ' ', True]
    world.map[31][6] = [0, 1, 't', True]
    world.map[32][6] = [0, 1, 'o', True]
    world.map[33][6] = [0, 1, ' ', True]
    world.map[34][6] = [0, 1, 'i', True]
    world.map[35][6] = [0, 1, 't', True]
    world.map[36][6] =  [display.RED, display.RED, '#', True]
    world.map[16][7] =  [display.RED, display.RED, '#', True]
    world.map[33][7] =  [display.RED, display.RED, '#', True]
    world.map[19][8] =  [display.RED, display.RED, '#', True]
    world.map[30][8] =  [display.RED, display.RED, '#', True]
    world.map[25][10] =  [display.YELLOW, display.YELLOW, '@', False]
    world.map[19][11] =  [display.RED, display.RED, '#', True]
    world.map[30][11] =  [display.RED, display.RED, '#', True]
    world.map[16][12] =  [display.RED, display.RED, '#', True]
    world.map[33][12] =  [display.RED, display.RED, '#', True]
    world.map[13][13] =  [display.RED, display.RED, '#', True]
    world.map[16][13] = [0, 1, 'T', True]
    world.map[17][13] = [0, 1, 'h', True]
    world.map[18][13] = [0, 1, 'e', True]
    world.map[19][13] = [0, 1, 'n', True]
    world.map[20][13] = [0, 1, ',', True]
    world.map[21][13] = [0, 1, ' ', True]
    world.map[22][13] = [0, 1, 'd', True]
    world.map[23][13] = [0, 1, 'e', True]
    world.map[24][13] = [0, 1, 'c', True]
    world.map[25][13] = [0, 1, 'i', True]
    world.map[26][13] = [0, 1, 'd', True]
    world.map[27][13] = [0, 1, 'e', True]
    world.map[28][13] = [0, 1, ' ', True]
    world.map[29][13] = [0, 1, 'w', True]
    world.map[30][13] = [0, 1, 'h', True]
    world.map[31][13] = [0, 1, 'a', True]
    world.map[32][13] = [0, 1, 't', True]
    world.map[36][13] =  [display.RED, display.RED, '#', True]
    world.map[9][14] =  [display.RED, display.RED, '#', True]
    world.map[10][14] = [0, 1, 'y', True]
    world.map[11][14] = [0, 1, 'o', True]
    world.map[12][14] = [0, 1, 'u', True]
    world.map[13][14] = [0, 1, ' ', True]
    world.map[14][14] = [0, 1, 'w', True]
    world.map[15][14] = [0, 1, 'a', True]
    world.map[16][14] = [0, 1, 'n', True]
    world.map[17][14] = [0, 1, 't', True]
    world.map[18][14] = [0, 1, ' ', True]
    world.map[19][14] = [0, 1, 't', True]
    world.map[20][14] = [0, 1, 'o', True]
    world.map[21][14] = [0, 1, ' ', True]
    world.map[22][14] = [0, 1, 't', True]
    world.map[23][14] = [0, 1, 'a', True]
    world.map[24][14] = [0, 1, 'k', True]
    world.map[25][14] = [0, 1, 'e', True]
    world.map[26][14] = [0, 1, ' ', True]
    world.map[27][14] = [0, 1, 'a', True]
    world.map[28][14] = [0, 1, 'n', True]
    world.map[29][14] = [0, 1, 'd', True]
    world.map[30][14] = [0, 1, ' ', True]
    world.map[31][14] = [0, 1, 'c', True]
    world.map[32][14] = [0, 1, 'h', True]
    world.map[33][14] = [0, 1, 'o', True]
    world.map[34][14] = [0, 1, 'o', True]
    world.map[35][14] = [0, 1, 's', True]
    world.map[36][14] = [0, 1, 'e', True]
    world.map[37][14] = [0, 1, ' ', True]
    world.map[38][14] = [0, 1, 'i', True]
    world.map[39][14] = [0, 1, 't', True]
    world.map[40][14] =  [display.RED, display.RED, '#', True]
    world.map[6][15] =  [display.RED, display.RED, '#', True]
    world.map[8][15] = [0, 1, 'C', True]
    world.map[9][15] = [0, 1, 'h', True]
    world.map[10][15] = [0, 1, 'o', True]
    world.map[11][15] = [0, 1, 'o', True]
    world.map[12][15] = [0, 1, 's', True]
    world.map[13][15] = [0, 1, 'e', True]
    world.map[14][15] = [0, 1, ' ', True]
    world.map[15][15] = [0, 1, 'w', True]
    world.map[16][15] = [0, 1, 'i', True]
    world.map[17][15] = [0, 1, 't', True]
    world.map[18][15] = [0, 1, 'h', True]
    world.map[19][15] = [0, 1, ' ', True]
    world.map[20][15] = [0, 1, 'U', True]
    world.map[21][15] = [0, 1, 'P', True]
    world.map[22][15] = [0, 1, ' ', True]
    world.map[23][15] = [0, 1, 'a', True]
    world.map[24][15] = [0, 1, 'n', True]
    world.map[25][15] = [0, 1, 'd', True]
    world.map[26][15] = [0, 1, ' ', True]
    world.map[27][15] = [0, 1, 'D', True]
    world.map[28][15] = [0, 1, 'O', True]
    world.map[29][15] = [0, 1, 'W', True]
    world.map[30][15] = [0, 1, 'N', True]
    world.map[31][15] = [0, 1, ' ', True]
    world.map[32][15] = [0, 1, 'o', True]
    world.map[33][15] = [0, 1, 'r', True]
    world.map[34][15] = [0, 1, ' ', True]
    world.map[35][15] = [0, 1, 'Q', True]
    world.map[36][15] = [0, 1, ' ', True]
    world.map[37][15] = [0, 1, 'a', True]
    world.map[38][15] = [0, 1, 'n', True]
    world.map[39][15] = [0, 1, 'd', True]
    world.map[40][15] = [0, 1, ' ', True]
    world.map[41][15] = [0, 1, 'E', True]
    world.map[43][15] =  [display.RED, display.RED, '#', True]
    world.map[2][16] =  [display.RED, display.RED, '#', True]
    world.map[3][16] =  [display.RED, display.RED, '#', True]
    world.map[10][16] = [0, 1, 'P', True]
    world.map[11][16] = [0, 1, 'r', True]
    world.map[12][16] = [0, 1, 'e', True]
    world.map[13][16] = [0, 1, 's', True]
    world.map[14][16] = [0, 1, 's', True]
    world.map[15][16] = [0, 1, ' ', True]
    world.map[16][16] = [0, 1, 'E', True]
    world.map[17][16] = [0, 1, 'N', True]
    world.map[18][16] = [0, 1, 'T', True]
    world.map[19][16] = [0, 1, 'E', True]
    world.map[20][16] = [0, 1, 'R', True]
    world.map[21][16] = [0, 1, ' ', True]
    world.map[22][16] = [0, 1, 't', True]
    world.map[23][16] = [0, 1, 'o', True]
    world.map[24][16] = [0, 1, ' ', True]
    world.map[25][16] = [0, 1, 't', True]
    world.map[26][16] = [0, 1, 'a', True]
    world.map[27][16] = [0, 1, 'k', True]
    world.map[28][16] = [0, 1, 'e', True]
    world.map[29][16] = [0, 1, ' ', True]
    world.map[30][16] = [0, 1, 'y', True]
    world.map[31][16] = [0, 1, 'o', True]
    world.map[32][16] = [0, 1, 'u', True]
    world.map[33][16] = [0, 1, 'r', True]
    world.map[34][16] = [0, 1, ' ', True]
    world.map[35][16] = [0, 1, 'c', True]
    world.map[36][16] = [0, 1, 'h', True]
    world.map[37][16] = [0, 1, 'o', True]
    world.map[38][16] = [0, 1, 'i', True]
    world.map[39][16] = [0, 1, 'c', True]
    world.map[40][16] = [0, 1, 'e', True]
    world.map[46][16] =  [display.RED, display.RED, '#', True]
    world.map[47][16] =  [display.RED, display.RED, '#', True]
    world.map[2][17] =  [display.RED, display.RED, '#', True]
    world.map[3][17] =  [display.RED, display.RED, '#', True]
    world.map[6][17] = [0, 1, 'T', True]
    world.map[7][17] = [0, 1, 'h', True]
    world.map[8][17] = [0, 1, 'e', True]
    world.map[9][17] = [0, 1, 'n', True]
    world.map[10][17] = [0, 1, ' ', True]
    world.map[11][17] = [0, 1, 's', True]
    world.map[12][17] = [0, 1, 'e', True]
    world.map[13][17] = [0, 1, 't', True]
    world.map[14][17] = [0, 1, ' ', True]
    world.map[15][17] = [0, 1, 'y', True]
    world.map[16][17] = [0, 1, 'o', True]
    world.map[17][17] = [0, 1, 'u', True]
    world.map[18][17] = [0, 1, 'r', True]
    world.map[19][17] = [0, 1, ' ', True]
    world.map[20][17] = [0, 1, 'c', True]
    world.map[21][17] = [0, 1, 'o', True]
    world.map[22][17] = [0, 1, 'n', True]
    world.map[23][17] = [0, 1, 's', True]
    world.map[24][17] = [0, 1, 'u', True]
    world.map[25][17] = [0, 1, 'm', True]
    world.map[26][17] = [0, 1, 'a', True]
    world.map[27][17] = [0, 1, 'b', True]
    world.map[28][17] = [0, 1, 'l', True]
    world.map[29][17] = [0, 1, 'e', True]
    world.map[30][17] = [0, 1, ' ', True]
    world.map[31][17] = [0, 1, 'a', True]
    world.map[32][17] = [0, 1, 't', True]
    world.map[33][17] = [0, 1, ' ', True]
    world.map[34][17] = [0, 1, 'I', True]
    world.map[35][17] = [0, 1, 'n', True]
    world.map[36][17] = [0, 1, 'v', True]
    world.map[37][17] = [0, 1, 'e', True]
    world.map[38][17] = [0, 1, 'n', True]
    world.map[39][17] = [0, 1, 't', True]
    world.map[40][17] = [0, 1, 'o', True]
    world.map[41][17] = [0, 1, 'r', True]
    world.map[42][17] = [0, 1, 'y', True]
    world.map[46][17] =  [display.RED, display.RED, '#', True]
    world.map[47][17] =  [display.RED, display.RED, '#', True]
    world.map[7][18] = [0, 1, 'P', True]
    world.map[8][18] = [0, 1, 'r', True]
    world.map[9][18] = [0, 1, 'e', True]
    world.map[10][18] = [0, 1, 's', True]
    world.map[11][18] = [0, 1, 's', True]
    world.map[12][18] = [0, 1, ' ', True]
    world.map[13][18] = [0, 1, 'L', True]
    world.map[14][18] = [0, 1, 'E', True]
    world.map[15][18] = [0, 1, 'F', True]
    world.map[16][18] = [0, 1, 'T', True]
    world.map[17][18] = [0, 1, ' ', True]
    world.map[18][18] = [0, 1, 'S', True]
    world.map[19][18] = [0, 1, 'H', True]
    world.map[20][18] = [0, 1, 'I', True]
    world.map[21][18] = [0, 1, 'F', True]
    world.map[22][18] = [0, 1, 'T', True]
    world.map[23][18] = [0, 1, ' ', True]
    world.map[24][18] = [0, 1, 't', True]
    world.map[25][18] = [0, 1, 'o', True]
    world.map[26][18] = [0, 1, ' ', True]
    world.map[27][18] = [0, 1, 'u', True]
    world.map[28][18] = [0, 1, 's', True]
    world.map[29][18] = [0, 1, 'e', True]
    world.map[30][18] = [0, 1, ' ', True]
    world.map[31][18] = [0, 1, 'y', True]
    world.map[32][18] = [0, 1, 'o', True]
    world.map[33][18] = [0, 1, 'u', True]
    world.map[34][18] = [0, 1, 'r', True]
    world.map[35][18] = [0, 1, ' ', True]
    world.map[36][18] = [0, 1, 'c', True]
    world.map[37][18] = [0, 1, 'u', True]
    world.map[38][18] = [0, 1, 'r', True]
    world.map[39][18] = [0, 1, 'r', True]
    world.map[40][18] = [0, 1, 'e', True]
    world.map[41][18] = [0, 1, 'n', True]
    world.map[42][18] = [0, 1, 't', True]
    world.map[5][19] = [0, 1, 'c', True]
    world.map[6][19] = [0, 1, 'o', True]
    world.map[7][19] = [0, 1, 'n', True]
    world.map[8][19] = [0, 1, 's', True]
    world.map[9][19] = [0, 1, 'u', True]
    world.map[10][19] = [0, 1, 'm', True]
    world.map[11][19] = [0, 1, 'a', True]
    world.map[12][19] = [0, 1, 'b', True]
    world.map[13][19] = [0, 1, 'l', True]
    world.map[14][19] = [0, 1, 'e', True]
    world.map[15][19] = [0, 1, '.', True]
    world.map[16][19] = [0, 1, ' ', True]
    world.map[17][19] = [0, 1, 'M', True]
    world.map[18][19] = [0, 1, 'a', True]
    world.map[19][19] = [0, 1, 'k', True]
    world.map[20][19] = [0, 1, 'e', True]
    world.map[21][19] = [0, 1, ' ', True]
    world.map[22][19] = [0, 1, 's', True]
    world.map[23][19] = [0, 1, 'u', True]
    world.map[24][19] = [0, 1, 'r', True]
    world.map[25][19] = [0, 1, 'e', True]
    world.map[26][19] = [0, 1, ' ', True]
    world.map[27][19] = [0, 1, 'y', True]
    world.map[28][19] = [0, 1, 'o', True]
    world.map[29][19] = [0, 1, 'u', True]
    world.map[30][19] = [0, 1, ' ', True]
    world.map[31][19] = [0, 1, 'd', True]
    world.map[32][19] = [0, 1, 'o', True]
    world.map[33][19] = [0, 1, 'n', True]
    world.map[34][19] = [0, 1, '\'', True]
    world.map[35][19] = [0, 1, 't', True]
    world.map[36][19] = [0, 1, ' ', True]
    world.map[37][19] = [0, 1, 'r', True]
    world.map[38][19] = [0, 1, 'u', True]
    world.map[39][19] = [0, 1, 'n', True]
    world.map[40][19] = [0, 1, ' ', True]
    world.map[41][19] = [0, 1, 'o', True]
    world.map[42][19] = [0, 1, 'u', True]
    world.map[43][19] = [0, 1, 't', True]
    world.map[44][19] = [0, 1, '!', True]
Example #7
0
def generate():
    world.objects = []
    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(49, 10, "stonedungeon.start", 2, 10))
    world.objects.append(General.level_portal.level_portal(25, 0, "lavadungeon.start", 2, 10, 5))
    dialogue_tree = General.npc.dialogue_tree()
    dialogue_tree.add_node("start", General.npc.node("Hello! Welcome to pyRPG!\nI would suggest entering the\n portal to the right.\nIt leads to the\n Forgotten Catacombs.", ("What's above?", "lavadungeon_info"), ("Bye", "exit")))
    dialogue_tree.add_node("lavadungeon_info", General.npc.node("That's the collapsed volcano.\n In it lives a great beast.\n It is quite dangerous, I \n would not recommend entering.", ("What's to the right?", "start"), ("Bye", "exit")))
    dialogue_tree.add_exit("exit", 0)
    world.objects.append(General.npc.npc(43, 4, dialogue_tree))

    # Upper left. This is the WARRIOR house
    for x in range(10,20): # Make walls
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][5] = [display.WHITE, display.BLACK, '#', False]
    for y in range(0,6):
        world.map[10][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[20][y] = [display.WHITE, display.BLACK, '#', False]
   
    for x in range(11,20): # Fill inside
        for y in range(1,5):
            world.map[x][y] = [display.WHITE, display.BLACK, ".", True]
    world.objects.append(bg_changer.bg_changer(15, 5, "warrior", [display.WHITE, display.BLACK, '.', True]))
    world.map[15][1] = [display.YELLOW, display.YELLOW, '@', False] # Chest in house
    war_chest_items = [\
        t1_warrior.t1_warrior_hat(),    \
        t1_warrior.t1_warrior_pants(),  \
        t1_warrior.t1_warrior_ring(),   \
        t1_warrior.t1_warrior_shirt(),  \
        t1_warrior.t1_warrior_weapon()  \
      ]

    world.objects.append(chest.chest(15, 2, war_chest_items)) # This chest contains stuff for warriors.
    world.objects.append(chest.chest(14, 1, war_chest_items)) # This chest contains stuff for warriors.
    world.objects.append(chest.chest(16, 1, war_chest_items)) # This chest contains stuff for warriors.


    # Lower left. This is the MAGE house
    for x in range(16,25):
        world.map[x][16] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][19] = [display.WHITE, display.BLACK, '#', False]
    for y in range(16,20):
        world.map[16][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[25][y] = [display.WHITE, display.BLACK, '#', False]
   
    for x in range(17,25):
        for y in range(17,19):
            world.map[x][y] = [display.WHITE, display.BLACK, ".", True]
    world.objects.append(bg_changer.bg_changer(20, 16, "mage", [display.WHITE, display.BLACK, '.', True]))
    world.map[24][18] = [display.YELLOW, display.YELLOW, '@', False] # Chest in house
    mage_chest_items = [\
        t1_mage.t1_mage_hat(),  \
        t1_mage.t1_mage_pants(),\
        t1_mage.t1_mage_ring(), \
        t1_mage.t1_mage_shirt(),\
        t1_mage.t1_mage_weapon()\
      ]
    world.objects.append(chest.chest(24, 17, mage_chest_items)) # This chest contains stuff for mages.
    world.objects.append(chest.chest(23, 18, mage_chest_items))


    # Top right house. This is the EVERYONE house
    for x in range(42,49): # Make walls
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][5] = [display.WHITE, display.BLACK, '#', False]
    for y in range(0,5):
        world.map[42][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[48][y] = [display.WHITE, display.BLACK, '#', False]
   
    for x in range(43,48): # Fill inside
        for y in range(1,5):
            world.map[x][y] = [0, 1, ".", True]
    world.map[45][5] = [0, 1, ".", True] # Doorway

    world.map[45][1] = [display.YELLOW, display.YELLOW, '@', False] # Chest in house
    all_chest_items = [\
        enemy_info.info_hat(),  \
        enemy_info.info_pants(),\
        enemy_info.info_ring()  \
      ]
    world.objects.append(chest.chest(45, 2, all_chest_items)) # This chest contains stuff for everyone.
    world.objects.append(chest.chest(44, 1, all_chest_items)) # And the interaction on the left...
    world.objects.append(chest.chest(46, 1, all_chest_items)) # And on the right

    # Lower right. This is the THIEF house
    for x in range(40,49):
        world.map[x][14] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][19] = [display.WHITE, display.BLACK, '#', False]
    for y in range(14,20):
        world.map[40][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[49][y] = [display.WHITE, display.BLACK, '#', False]
   
    for x in range(41,49):
        for y in range(15,19):
            world.map[x][y] = [0, 1, ".", True]
    world.objects.append(bg_changer.bg_changer(44, 14, "thief", [display.WHITE, display.BLACK, '.', True]))
    world.map[44][18] = [display.YELLOW, display.YELLOW, '@', False] # Chest in house
    thief_chest_items = [\
        t1_thief.t1_thief_hat(),    \
        t1_thief.t1_thief_pants(),  \
        t1_thief.t1_thief_ring(),   \
        t1_thief.t1_thief_shirt(),  \
        t1_thief.t1_thief_weapon()  \
      ]

    world.objects.append(chest.chest(43, 18, thief_chest_items)) # This chest contains stuff for thiefs.
    world.objects.append(chest.chest(45, 18, thief_chest_items)) 
    world.objects.append(chest.chest(44, 17, thief_chest_items)) 
Example #8
0
def generate():
    world.objects.clear()
    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(49, 9, "town", 25, 10))

    world.map[1][1] = [0, 1, 'F', True]
    world.map[2][1] = [0, 1, 'i', True]
    world.map[3][1] = [0, 1, 'n', True]
    world.map[4][1] = [0, 1, 'a', True]
    world.map[5][1] = [0, 1, 'l', True]
    world.map[6][1] = [0, 1, 'l', True]
    world.map[7][1] = [0, 1, 'y', True]
    world.map[8][1] = [0, 1, ',', True]
    world.map[9][1] = [0, 1, ' ', True]
    world.map[10][1] = [0, 1, 'b', True]
    world.map[11][1] = [0, 1, 'e', True]
    world.map[12][1] = [0, 1, 'f', True]
    world.map[13][1] = [0, 1, 'o', True]
    world.map[14][1] = [0, 1, 'r', True]
    world.map[15][1] = [0, 1, 'e', True]
    world.map[16][1] = [0, 1, ' ', True]
    world.map[17][1] = [0, 1, 'y', True]
    world.map[18][1] = [0, 1, 'o', True]
    world.map[19][1] = [0, 1, 'u', True]
    world.map[20][1] = [0, 1, ' ', True]
    world.map[21][1] = [0, 1, 'g', True]
    world.map[22][1] = [0, 1, 'o', True]
    world.map[23][1] = [0, 1, ',', True]
    world.map[24][1] = [0, 1, ' ', True]
    world.map[25][1] = [0, 1, 'a', True]
    world.map[26][1] = [0, 1, ' ', True]
    world.map[27][1] = [0, 1, 'f', True]
    world.map[28][1] = [0, 1, 'e', True]
    world.map[29][1] = [0, 1, 'w', True]
    world.map[30][1] = [0, 1, ' ', True]
    world.map[31][1] = [0, 1, 'm', True]
    world.map[32][1] = [0, 1, 'o', True]
    world.map[33][1] = [0, 1, 'r', True]
    world.map[34][1] = [0, 1, 'e', True]
    world.map[35][1] = [0, 1, ' ', True]
    world.map[36][1] = [0, 1, 'h', True]
    world.map[37][1] = [0, 1, 'e', True]
    world.map[38][1] = [0, 1, 'l', True]
    world.map[39][1] = [0, 1, 'p', True]
    world.map[40][1] = [0, 1, 'f', True]
    world.map[41][1] = [0, 1, 'u', True]
    world.map[42][1] = [0, 1, 'l', True]
    world.map[43][1] = [0, 1, ' ', True]
    world.map[44][1] = [0, 1, 't', True]
    world.map[45][1] = [0, 1, 'i', True]
    world.map[46][1] = [0, 1, 'p', True]
    world.map[47][1] = [0, 1, 's', True]
    world.map[48][1] = [0, 1, ':', True]
    world.map[1][2] = [0, 1, 'F', True]
    world.map[2][2] = [0, 1, 'i', True]
    world.map[3][2] = [0, 1, 'r', True]
    world.map[4][2] = [0, 1, 's', True]
    world.map[5][2] = [0, 1, 't', True]
    world.map[6][2] = [0, 1, ',', True]
    world.map[7][2] = [0, 1, ' ', True]
    world.map[8][2] = [0, 1, 's', True]
    world.map[9][2] = [0, 1, 'a', True]
    world.map[10][2] = [0, 1, 'v', True]
    world.map[11][2] = [0, 1, 'e', True]
    world.map[12][2] = [0, 1, ' ', True]
    world.map[13][2] = [0, 1, 'o', True]
    world.map[14][2] = [0, 1, 'f', True]
    world.map[15][2] = [0, 1, 't', True]
    world.map[16][2] = [0, 1, 'e', True]
    world.map[17][2] = [0, 1, 'n', True]
    world.map[18][2] = [0, 1, '.', True]
    world.map[19][2] = [0, 1, ' ', True]
    world.map[20][2] = [0, 1, 'Y', True]
    world.map[21][2] = [0, 1, 'o', True]
    world.map[22][2] = [0, 1, 'u', True]
    world.map[23][2] = [0, 1, ' ', True]
    world.map[24][2] = [0, 1, 'c', True]
    world.map[25][2] = [0, 1, 'a', True]
    world.map[26][2] = [0, 1, 'n', True]
    world.map[27][2] = [0, 1, ' ', True]
    world.map[28][2] = [0, 1, 's', True]
    world.map[29][2] = [0, 1, 'a', True]
    world.map[30][2] = [0, 1, 'v', True]
    world.map[31][2] = [0, 1, 'e', True]
    world.map[32][2] = [0, 1, ' ', True]
    world.map[33][2] = [0, 1, 'y', True]
    world.map[34][2] = [0, 1, 'o', True]
    world.map[35][2] = [0, 1, 'u', True]
    world.map[36][2] = [0, 1, 'r', True]
    world.map[37][2] = [0, 1, ' ', True]
    world.map[38][2] = [0, 1, 'g', True]
    world.map[39][2] = [0, 1, 'a', True]
    world.map[40][2] = [0, 1, 'm', True]
    world.map[41][2] = [0, 1, 'e', True]
    world.map[1][3] = [0, 1, 't', True]
    world.map[2][3] = [0, 1, 'h', True]
    world.map[3][3] = [0, 1, 'r', True]
    world.map[4][3] = [0, 1, 'o', True]
    world.map[5][3] = [0, 1, 'u', True]
    world.map[6][3] = [0, 1, 'g', True]
    world.map[7][3] = [0, 1, 'h', True]
    world.map[8][3] = [0, 1, ' ', True]
    world.map[9][3] = [0, 1, 't', True]
    world.map[10][3] = [0, 1, 'h', True]
    world.map[11][3] = [0, 1, 'e', True]
    world.map[12][3] = [0, 1, ' ', True]
    world.map[13][3] = [0, 1, 'm', True]
    world.map[14][3] = [0, 1, 'e', True]
    world.map[15][3] = [0, 1, 'n', True]
    world.map[16][3] = [0, 1, 'u', True]
    world.map[17][3] = [0, 1, ' ', True]
    world.map[18][3] = [0, 1, '(', True]
    world.map[19][3] = [0, 1, 'o', True]
    world.map[20][3] = [0, 1, 'p', True]
    world.map[21][3] = [0, 1, 'e', True]
    world.map[22][3] = [0, 1, 'n', True]
    world.map[23][3] = [0, 1, 'e', True]
    world.map[24][3] = [0, 1, 'd', True]
    world.map[25][3] = [0, 1, ' ', True]
    world.map[26][3] = [0, 1, 'w', True]
    world.map[27][3] = [0, 1, 'i', True]
    world.map[28][3] = [0, 1, 't', True]
    world.map[29][3] = [0, 1, 'h', True]
    world.map[30][3] = [0, 1, ' ', True]
    world.map[31][3] = [0, 1, 'E', True]
    world.map[32][3] = [0, 1, 'S', True]
    world.map[33][3] = [0, 1, 'C', True]
    world.map[34][3] = [0, 1, ')', True]
    world.map[1][4] = [0, 1, 'N', True]
    world.map[2][4] = [0, 1, 'o', True]
    world.map[3][4] = [0, 1, 't', True]
    world.map[4][4] = [0, 1, 'e', True]
    world.map[5][4] = [0, 1, ' ', True]
    world.map[6][4] = [0, 1, 't', True]
    world.map[7][4] = [0, 1, 'h', True]
    world.map[8][4] = [0, 1, 'a', True]
    world.map[9][4] = [0, 1, 't', True]
    world.map[10][4] = [0, 1, ' ', True]
    world.map[11][4] = [0, 1, 'E', True]
    world.map[12][4] = [0, 1, 'x', True]
    world.map[13][4] = [0, 1, 'i', True]
    world.map[14][4] = [0, 1, 't', True]
    world.map[15][4] = [0, 1, ' ', True]
    world.map[16][4] = [0, 1, 'd', True]
    world.map[17][4] = [0, 1, 'o', True]
    world.map[18][4] = [0, 1, 'e', True]
    world.map[19][4] = [0, 1, 's', True]
    world.map[20][4] = [0, 1, ' ', True]
    world.map[21][4] = [0, 1, 'N', True]
    world.map[22][4] = [0, 1, 'O', True]
    world.map[23][4] = [0, 1, 'T', True]
    world.map[24][4] = [0, 1, ' ', True]
    world.map[25][4] = [0, 1, 's', True]
    world.map[26][4] = [0, 1, 'a', True]
    world.map[27][4] = [0, 1, 'v', True]
    world.map[28][4] = [0, 1, 'e', True]
    world.map[29][4] = [0, 1, ' ', True]
    world.map[30][4] = [0, 1, 'o', True]
    world.map[31][4] = [0, 1, 'n', True]
    world.map[32][4] = [0, 1, ' ', True]
    world.map[33][4] = [0, 1, 'e', True]
    world.map[34][4] = [0, 1, 'x', True]
    world.map[35][4] = [0, 1, 'i', True]
    world.map[36][4] = [0, 1, 't', True]
    world.map[37][4] = [0, 1, '.', True]
    world.map[1][5] = [0, 1, 'I', True]
    world.map[2][5] = [0, 1, 'f', True]
    world.map[3][5] = [0, 1, ' ', True]
    world.map[4][5] = [0, 1, 'y', True]
    world.map[5][5] = [0, 1, 'o', True]
    world.map[6][5] = [0, 1, 'u', True]
    world.map[7][5] = [0, 1, ' ', True]
    world.map[8][5] = [0, 1, 'd', True]
    world.map[9][5] = [0, 1, 'i', True]
    world.map[10][5] = [0, 1, 'e', True]
    world.map[11][5] = [0, 1, ' ', True]
    world.map[12][5] = [0, 1, 'o', True]
    world.map[13][5] = [0, 1, 'r', True]
    world.map[14][5] = [0, 1, ' ', True]
    world.map[15][5] = [0, 1, 'y', True]
    world.map[16][5] = [0, 1, 'o', True]
    world.map[17][5] = [0, 1, 'u', True]
    world.map[18][5] = [0, 1, 'r', True]
    world.map[19][5] = [0, 1, ' ', True]
    world.map[20][5] = [0, 1, 'g', True]
    world.map[21][5] = [0, 1, 'a', True]
    world.map[22][5] = [0, 1, 'm', True]
    world.map[23][5] = [0, 1, 'e', True]
    world.map[24][5] = [0, 1, ' ', True]
    world.map[25][5] = [0, 1, 'e', True]
    world.map[26][5] = [0, 1, 'x', True]
    world.map[27][5] = [0, 1, 'i', True]
    world.map[28][5] = [0, 1, 't', True]
    world.map[29][5] = [0, 1, 's', True]
    world.map[30][5] = [0, 1, ',', True]
    world.map[31][5] = [0, 1, ' ', True]
    world.map[32][5] = [0, 1, 'y', True]
    world.map[33][5] = [0, 1, 'o', True]
    world.map[34][5] = [0, 1, 'u', True]
    world.map[35][5] = [0, 1, ' ', True]
    world.map[36][5] = [0, 1, 'g', True]
    world.map[37][5] = [0, 1, 'o', True]
    world.map[38][5] = [0, 1, ' ', True]
    world.map[39][5] = [0, 1, 'b', True]
    world.map[40][5] = [0, 1, 'a', True]
    world.map[41][5] = [0, 1, 'c', True]
    world.map[42][5] = [0, 1, 'k', True]
    world.map[43][5] = [0, 1, ' ', True]
    world.map[44][5] = [0, 1, 't', True]
    world.map[45][5] = [0, 1, 'o', True]
    world.map[46][5] = [0, 1, ' ', True]
    world.map[1][6] = [0, 1, 'y', True]
    world.map[2][6] = [0, 1, 'o', True]
    world.map[3][6] = [0, 1, 'u', True]
    world.map[4][6] = [0, 1, 'r', True]
    world.map[5][6] = [0, 1, ' ', True]
    world.map[6][6] = [0, 1, 'l', True]
    world.map[7][6] = [0, 1, 'a', True]
    world.map[8][6] = [0, 1, 's', True]
    world.map[9][6] = [0, 1, 't', True]
    world.map[10][6] = [0, 1, ' ', True]
    world.map[11][6] = [0, 1, 's', True]
    world.map[12][6] = [0, 1, 'a', True]
    world.map[13][6] = [0, 1, 'v', True]
    world.map[14][6] = [0, 1, 'e', True]
    world.map[15][6] = [0, 1, ',', True]
    world.map[16][6] = [0, 1, ' ', True]
    world.map[17][6] = [0, 1, 's', True]
    world.map[18][6] = [0, 1, 'o', True]
    world.map[19][6] = [0, 1, ' ', True]
    world.map[20][6] = [0, 1, 't', True]
    world.map[21][6] = [0, 1, 'h', True]
    world.map[22][6] = [0, 1, 'e', True]
    world.map[23][6] = [0, 1, ' ', True]
    world.map[24][6] = [0, 1, 'm', True]
    world.map[25][6] = [0, 1, 'o', True]
    world.map[26][6] = [0, 1, 'r', True]
    world.map[27][6] = [0, 1, 'e', True]
    world.map[28][6] = [0, 1, ' ', True]
    world.map[29][6] = [0, 1, 'y', True]
    world.map[30][6] = [0, 1, 'o', True]
    world.map[31][6] = [0, 1, 'u', True]
    world.map[32][6] = [0, 1, ' ', True]
    world.map[33][6] = [0, 1, 's', True]
    world.map[34][6] = [0, 1, 'a', True]
    world.map[35][6] = [0, 1, 'v', True]
    world.map[36][6] = [0, 1, 'e', True]
    world.map[37][6] = [0, 1, ' ', True]
    world.map[38][6] = [0, 1, 't', True]
    world.map[39][6] = [0, 1, 'h', True]
    world.map[40][6] = [0, 1, 'e', True]
    world.map[41][6] = [0, 1, ' ', True]
    world.map[42][6] = [0, 1, 'l', True]
    world.map[43][6] = [0, 1, 'e', True]
    world.map[44][6] = [0, 1, 's', True]
    world.map[45][6] = [0, 1, 's', True]
    world.map[1][7] = [0, 1, 'y', True]
    world.map[2][7] = [0, 1, 'o', True]
    world.map[3][7] = [0, 1, 'u', True]
    world.map[4][7] = [0, 1, ' ', True]
    world.map[5][7] = [0, 1, 's', True]
    world.map[6][7] = [0, 1, 't', True]
    world.map[7][7] = [0, 1, 'a', True]
    world.map[8][7] = [0, 1, 'n', True]
    world.map[9][7] = [0, 1, 'd', True]
    world.map[10][7] = [0, 1, ' ', True]
    world.map[11][7] = [0, 1, 't', True]
    world.map[12][7] = [0, 1, 'o', True]
    world.map[13][7] = [0, 1, ' ', True]
    world.map[14][7] = [0, 1, 'l', True]
    world.map[15][7] = [0, 1, 'o', True]
    world.map[16][7] = [0, 1, 's', True]
    world.map[17][7] = [0, 1, 'e', True]
    world.map[18][7] = [0, 1, ' ', True]
    world.map[19][7] = [0, 1, 'w', True]
    world.map[20][7] = [0, 1, 'h', True]
    world.map[21][7] = [0, 1, 'e', True]
    world.map[22][7] = [0, 1, 'n', True]
    world.map[23][7] = [0, 1, ' ', True]
    world.map[24][7] = [0, 1, 'y', True]
    world.map[25][7] = [0, 1, 'o', True]
    world.map[26][7] = [0, 1, 'u', True]
    world.map[27][7] = [0, 1, ' ', True]
    world.map[28][7] = [0, 1, 'd', True]
    world.map[29][7] = [0, 1, 'i', True]
    world.map[30][7] = [0, 1, 'e', True]
    world.map[31][7] = [0, 1, '!', True]
    world.map[1][11] = [0, 1, 'S', True]
    world.map[2][11] = [0, 1, 'e', True]
    world.map[3][11] = [0, 1, 'c', True]
    world.map[4][11] = [0, 1, 'o', True]
    world.map[5][11] = [0, 1, 'n', True]
    world.map[6][11] = [0, 1, 'd', True]
    world.map[7][11] = [0, 1, ',', True]
    world.map[8][11] = [0, 1, ' ', True]
    world.map[9][11] = [0, 1, 'i', True]
    world.map[10][11] = [0, 1, 'f', True]
    world.map[11][11] = [0, 1, ' ', True]
    world.map[12][11] = [0, 1, 'y', True]
    world.map[13][11] = [0, 1, 'o', True]
    world.map[14][11] = [0, 1, 'u', True]
    world.map[15][11] = [0, 1, ' ', True]
    world.map[16][11] = [0, 1, 'e', True]
    world.map[17][11] = [0, 1, 'v', True]
    world.map[18][11] = [0, 1, 'e', True]
    world.map[19][11] = [0, 1, 'r', True]
    world.map[20][11] = [0, 1, ' ', True]
    world.map[21][11] = [0, 1, 'f', True]
    world.map[22][11] = [0, 1, 'o', True]
    world.map[23][11] = [0, 1, 'r', True]
    world.map[24][11] = [0, 1, 'g', True]
    world.map[25][11] = [0, 1, 'e', True]
    world.map[26][11] = [0, 1, 't', True]
    world.map[27][11] = [0, 1, ' ', True]
    world.map[28][11] = [0, 1, 'c', True]
    world.map[29][11] = [0, 1, 'o', True]
    world.map[30][11] = [0, 1, 'n', True]
    world.map[31][11] = [0, 1, 't', True]
    world.map[32][11] = [0, 1, 'r', True]
    world.map[33][11] = [0, 1, 'o', True]
    world.map[34][11] = [0, 1, 'l', True]
    world.map[35][11] = [0, 1, 's', True]
    world.map[36][11] = [0, 1, ',', True]
    world.map[37][11] = [0, 1, ' ', True]
    world.map[38][11] = [0, 1, 'j', True]
    world.map[39][11] = [0, 1, 'u', True]
    world.map[40][11] = [0, 1, 's', True]
    world.map[41][11] = [0, 1, 't', True]
    world.map[42][11] = [0, 1, ' ', True]
    world.map[43][11] = [0, 1, 'g', True]
    world.map[44][11] = [0, 1, 'o', True]
    world.map[45][11] = [0, 1, ' ', True]
    world.map[46][11] = [0, 1, 't', True]
    world.map[47][11] = [0, 1, 'o', True]
    world.map[1][12] = [0, 1, 't', True]
    world.map[2][12] = [0, 1, 'h', True]
    world.map[3][12] = [0, 1, 'e', True]
    world.map[4][12] = [0, 1, ' ', True]
    world.map[5][12] = [0, 1, 'h', True]
    world.map[6][12] = [0, 1, 'e', True]
    world.map[7][12] = [0, 1, 'l', True]
    world.map[8][12] = [0, 1, 'p', True]
    world.map[9][12] = [0, 1, ' ', True]
    world.map[10][12] = [0, 1, 'm', True]
    world.map[11][12] = [0, 1, 'e', True]
    world.map[12][12] = [0, 1, 'n', True]
    world.map[13][12] = [0, 1, 'u', True]
    world.map[14][12] = [0, 1, ' ', True]
    world.map[15][12] = [0, 1, '(', True]
    world.map[16][12] = [0, 1, 'p', True]
    world.map[17][12] = [0, 1, 'r', True]
    world.map[18][12] = [0, 1, 'e', True]
    world.map[19][12] = [0, 1, 's', True]
    world.map[20][12] = [0, 1, 's', True]
    world.map[21][12] = [0, 1, ' ', True]
    world.map[22][12] = [0, 1, 'H', True]
    world.map[23][12] = [0, 1, ' ', True]
    world.map[24][12] = [0, 1, 'w', True]
    world.map[25][12] = [0, 1, 'h', True]
    world.map[26][12] = [0, 1, 'e', True]
    world.map[27][12] = [0, 1, 'n', True]
    world.map[28][12] = [0, 1, ' ', True]
    world.map[29][12] = [0, 1, 'y', True]
    world.map[30][12] = [0, 1, 'o', True]
    world.map[31][12] = [0, 1, 'u', True]
    world.map[32][12] = [0, 1, ' ', True]
    world.map[33][12] = [0, 1, 'f', True]
    world.map[34][12] = [0, 1, 'i', True]
    world.map[35][12] = [0, 1, 'r', True]
    world.map[36][12] = [0, 1, 's', True]
    world.map[37][12] = [0, 1, 't', True]
    world.map[38][12] = [0, 1, ' ', True]
    world.map[39][12] = [0, 1, 's', True]
    world.map[40][12] = [0, 1, 't', True]
    world.map[41][12] = [0, 1, 'a', True]
    world.map[42][12] = [0, 1, 'r', True]
    world.map[43][12] = [0, 1, 't', True]
    world.map[44][12] = [0, 1, ' ', True]
    world.map[45][12] = [0, 1, 't', True]
    world.map[46][12] = [0, 1, 'h', True]
    world.map[47][12] = [0, 1, 'e', True]
    world.map[1][13] = [0, 1, 'p', True]
    world.map[2][13] = [0, 1, 'r', True]
    world.map[3][13] = [0, 1, 'o', True]
    world.map[4][13] = [0, 1, 'g', True]
    world.map[5][13] = [0, 1, 'r', True]
    world.map[6][13] = [0, 1, 'a', True]
    world.map[7][13] = [0, 1, 'm', True]
    world.map[8][13] = [0, 1, '.', True]
    world.map[9][13] = [0, 1, ')', True]
    world.map[10][13] = [0, 1, ' ', True]
    world.map[11][13] = [0, 1, 'I', True]
    world.map[12][13] = [0, 1, 't', True]
    world.map[13][13] = [0, 1, ' ', True]
    world.map[14][13] = [0, 1, 'c', True]
    world.map[15][13] = [0, 1, 'o', True]
    world.map[16][13] = [0, 1, 'n', True]
    world.map[17][13] = [0, 1, 't', True]
    world.map[18][13] = [0, 1, 'a', True]
    world.map[19][13] = [0, 1, 'i', True]
    world.map[20][13] = [0, 1, 'n', True]
    world.map[21][13] = [0, 1, 's', True]
    world.map[22][13] = [0, 1, ' ', True]
    world.map[23][13] = [0, 1, 'i', True]
    world.map[24][13] = [0, 1, 'n', True]
    world.map[25][13] = [0, 1, 'f', True]
    world.map[26][13] = [0, 1, 'o', True]
    world.map[27][13] = [0, 1, 'r', True]
    world.map[28][13] = [0, 1, 'm', True]
    world.map[29][13] = [0, 1, 'a', True]
    world.map[30][13] = [0, 1, 't', True]
    world.map[31][13] = [0, 1, 'i', True]
    world.map[32][13] = [0, 1, 'o', True]
    world.map[33][13] = [0, 1, 'n', True]
    world.map[34][13] = [0, 1, ' ', True]
    world.map[35][13] = [0, 1, 'o', True]
    world.map[36][13] = [0, 1, 'n', True]
    world.map[37][13] = [0, 1, ' ', True]
    world.map[38][13] = [0, 1, 'a', True]
    world.map[39][13] = [0, 1, 'l', True]
    world.map[40][13] = [0, 1, 'l', True]
    world.map[41][13] = [0, 1, ' ', True]
    world.map[42][13] = [0, 1, 'c', True]
    world.map[43][13] = [0, 1, 'o', True]
    world.map[44][13] = [0, 1, 'n', True]
    world.map[45][13] = [0, 1, 't', True]
    world.map[46][13] = [0, 1, 'r', True]
    world.map[47][13] = [0, 1, 'o', True]
    world.map[48][13] = [0, 1, 'l', True]
    world.map[49][13] = [0, 1, 's', True]
    world.map[1][14] = [0, 1, 'a', True]
    world.map[2][14] = [0, 1, 'n', True]
    world.map[3][14] = [0, 1, 'd', True]
    world.map[4][14] = [0, 1, ' ', True]
    world.map[5][14] = [0, 1, 'a', True]
    world.map[6][14] = [0, 1, ' ', True]
    world.map[7][14] = [0, 1, 'g', True]
    world.map[8][14] = [0, 1, 'u', True]
    world.map[9][14] = [0, 1, 'i', True]
    world.map[10][14] = [0, 1, 'd', True]
    world.map[11][14] = [0, 1, 'e', True]
    world.map[12][14] = [0, 1, ' ', True]
    world.map[13][14] = [0, 1, 't', True]
    world.map[14][14] = [0, 1, 'o', True]
    world.map[15][14] = [0, 1, ' ', True]
    world.map[16][14] = [0, 1, 'w', True]
    world.map[17][14] = [0, 1, 'h', True]
    world.map[18][14] = [0, 1, 'a', True]
    world.map[19][14] = [0, 1, 't', True]
    world.map[20][14] = [0, 1, ' ', True]
    world.map[21][14] = [0, 1, 'c', True]
    world.map[22][14] = [0, 1, 'o', True]
    world.map[23][14] = [0, 1, 'l', True]
    world.map[24][14] = [0, 1, 'o', True]
    world.map[25][14] = [0, 1, 'r', True]
    world.map[26][14] = [0, 1, 's', True]
    world.map[27][14] = [0, 1, ' ', True]
    world.map[28][14] = [0, 1, 't', True]
    world.map[29][14] = [0, 1, 'e', True]
    world.map[30][14] = [0, 1, 'n', True]
    world.map[31][14] = [0, 1, 'd', True]
    world.map[32][14] = [0, 1, ' ', True]
    world.map[33][14] = [0, 1, 't', True]
    world.map[34][14] = [0, 1, 'o', True]
    world.map[35][14] = [0, 1, ' ', True]
    world.map[36][14] = [0, 1, 'm', True]
    world.map[37][14] = [0, 1, 'e', True]
    world.map[38][14] = [0, 1, 'a', True]
    world.map[39][14] = [0, 1, 'n', True]
    world.map[40][14] = [0, 1, '!', True]
    world.map[1][16] = [0, 1, 'T', True]
    world.map[2][16] = [0, 1, 'h', True]
    world.map[3][16] = [0, 1, 'i', True]
    world.map[4][16] = [0, 1, 'r', True]
    world.map[5][16] = [0, 1, 'd', True]
    world.map[6][16] = [0, 1, ',', True]
    world.map[7][16] = [0, 1, ' ', True]
    world.map[8][16] = [0, 1, 'i', True]
    world.map[9][16] = [0, 1, 'f', True]
    world.map[10][16] = [0, 1, ' ', True]
    world.map[11][16] = [0, 1, 'y', True]
    world.map[12][16] = [0, 1, 'o', True]
    world.map[13][16] = [0, 1, 'u', True]
    world.map[14][16] = [0, 1, ' ', True]
    world.map[15][16] = [0, 1, 'h', True]
    world.map[16][16] = [0, 1, 'a', True]
    world.map[17][16] = [0, 1, 'v', True]
    world.map[18][16] = [0, 1, 'e', True]
    world.map[19][16] = [0, 1, ' ', True]
    world.map[20][16] = [0, 1, 'q', True]
    world.map[21][16] = [0, 1, 'u', True]
    world.map[22][16] = [0, 1, 'e', True]
    world.map[23][16] = [0, 1, 's', True]
    world.map[24][16] = [0, 1, 't', True]
    world.map[25][16] = [0, 1, 'i', True]
    world.map[26][16] = [0, 1, 'o', True]
    world.map[27][16] = [0, 1, 'n', True]
    world.map[28][16] = [0, 1, 's', True]
    world.map[29][16] = [0, 1, ',', True]
    world.map[30][16] = [0, 1, ' ', True]
    world.map[31][16] = [0, 1, 'c', True]
    world.map[32][16] = [0, 1, 'o', True]
    world.map[33][16] = [0, 1, 'm', True]
    world.map[34][16] = [0, 1, 'm', True]
    world.map[35][16] = [0, 1, 'e', True]
    world.map[36][16] = [0, 1, 'n', True]
    world.map[37][16] = [0, 1, 't', True]
    world.map[38][16] = [0, 1, 's', True]
    world.map[39][16] = [0, 1, ',', True]
    world.map[40][16] = [0, 1, ' ', True]
    world.map[41][16] = [0, 1, 'o', True]
    world.map[42][16] = [0, 1, 'r', True]
    world.map[1][17] = [0, 1, 'c', True]
    world.map[2][17] = [0, 1, 'o', True]
    world.map[3][17] = [0, 1, 'n', True]
    world.map[4][17] = [0, 1, 'c', True]
    world.map[5][17] = [0, 1, 'e', True]
    world.map[6][17] = [0, 1, 'r', True]
    world.map[7][17] = [0, 1, 'n', True]
    world.map[8][17] = [0, 1, 's', True]
    world.map[9][17] = [0, 1, ' ', True]
    world.map[10][17] = [0, 1, 'p', True]
    world.map[11][17] = [0, 1, 'l', True]
    world.map[12][17] = [0, 1, 'e', True]
    world.map[13][17] = [0, 1, 'a', True]
    world.map[14][17] = [0, 1, 's', True]
    world.map[15][17] = [0, 1, 'e', True]
    world.map[16][17] = [0, 1, ' ', True]
    world.map[17][17] = [0, 1, 'c', True]
    world.map[18][17] = [0, 1, 'o', True]
    world.map[19][17] = [0, 1, 'n', True]
    world.map[20][17] = [0, 1, 't', True]
    world.map[21][17] = [0, 1, 'a', True]
    world.map[22][17] = [0, 1, 'c', True]
    world.map[23][17] = [0, 1, 't', True]
    world.map[24][17] = [0, 1, ' ', True]
    world.map[25][17] = [0, 1, 'f', True]
    world.map[26][17] = [0, 1, 'u', True]
    world.map[27][17] = [0, 1, 'z', True]
    world.map[28][17] = [0, 1, 'z', True]
    world.map[29][17] = [0, 1, 'y', True]
    world.map[30][17] = [0, 1, 't', True]
    world.map[31][17] = [0, 1, 'h', True]
    world.map[32][17] = [0, 1, 'i', True]
    world.map[33][17] = [0, 1, 'n', True]
    world.map[34][17] = [0, 1, 'g', True]
    world.map[35][17] = [0, 1, '4', True]
    world.map[36][17] = [0, 1, '4', True]
Example #9
0
def generate():
    world.objects = []
    world.map = [[ world.WORLD_NOTHING for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(33, 12, "town", 25, 10))
    world.map[5][4] = [display.YELLOW, display.BLACK, 'p', False]
    world.map[6][4] = [display.YELLOW, display.BLACK, 'y', False]
    world.map[7][4] = [display.RED, display.BLACK, 'R', False]
    world.map[8][4] = [display.GREEN, display.BLACK, 'P', False]
    world.map[9][4] = [display.BLUE, display.BLACK, 'G', False]
    world.map[11][4] = [display.WHITE, display.BLACK, 'W', False]
    world.map[12][4] = [display.WHITE, display.BLACK, 'a', False]
    world.map[13][4] = [display.WHITE, display.BLACK, 's', False]
    world.map[15][4] = [display.WHITE, display.BLACK, 'M', False]
    world.map[16][4] = [display.WHITE, display.BLACK, 'a', False]
    world.map[17][4] = [display.WHITE, display.BLACK, 'd', False]
    world.map[18][4] = [display.WHITE, display.BLACK, 'e', False]
    world.map[20][4] = [display.WHITE, display.BLACK, 'B', False]
    world.map[21][4] = [display.WHITE, display.BLACK, 'y', False]
    world.map[22][4] = [display.WHITE, display.BLACK, ':', False]

    world.map[11][6] = [display.WHITE, display.BLACK, 'T', False]
    world.map[12][6] = [display.WHITE, display.BLACK, 'a', False]
    world.map[13][6] = [display.WHITE, display.BLACK, 'n', False]
    world.map[14][6] = [display.WHITE, display.BLACK, 'n', False]
    world.map[15][6] = [display.WHITE, display.BLACK, 'e', False]
    world.map[16][6] = [display.WHITE, display.BLACK, 'r', False]
    world.map[18][6] = [display.WHITE, display.BLACK, 'M', False]
    world.map[19][6] = [display.WHITE, display.BLACK, '.', False]
                           
    world.map[11][7] = [display.WHITE, display.BLACK, 'M', False]
    world.map[12][7] = [display.WHITE, display.BLACK, 'a', False]
    world.map[13][7] = [display.WHITE, display.BLACK, 't', False]
    world.map[14][7] = [display.WHITE, display.BLACK, 't', False]
    world.map[15][7] = [display.WHITE, display.BLACK, 'h', False]
    world.map[16][7] = [display.WHITE, display.BLACK, 'e', False]
    world.map[17][7] = [display.WHITE, display.BLACK, 'w', False]
    world.map[19][7] = [display.WHITE, display.BLACK, 'K', False]
    world.map[20][7] = [display.WHITE, display.BLACK, '.', False]
                           
    world.map[11][8] = [display.WHITE, display.BLACK, 'A', False]
    world.map[12][8] = [display.WHITE, display.BLACK, 'l', False]
    world.map[13][8] = [display.WHITE, display.BLACK, 'e', False]
    world.map[14][8] = [display.WHITE, display.BLACK, 'x', False]
    world.map[16][8] = [display.WHITE, display.BLACK, 'P', False]
    world.map[17][8] = [display.WHITE, display.BLACK, '.', False]
                           
    world.map[11][9] = [display.WHITE, display.BLACK, 'C', False]
    world.map[12][9] = [display.WHITE, display.BLACK, 'o', False]
    world.map[13][9] = [display.WHITE, display.BLACK, 'r', False]
    world.map[14][9] = [display.WHITE, display.BLACK, 'y', False]
    world.map[16][9] = [display.WHITE, display.BLACK, 'R', False]
    world.map[17][9] = [display.WHITE, display.BLACK, '.', False]
    
    world.map[25][12] = [display.WHITE, display.BLACK, 'T', False]
    world.map[26][12] = [display.WHITE, display.BLACK, 'h', False]
    world.map[27][12] = [display.WHITE, display.BLACK, 'a', False]
    world.map[28][12] = [display.WHITE, display.BLACK, 'n', False]
    world.map[29][12] = [display.WHITE, display.BLACK, 'k', False]
    world.map[30][12] = [display.WHITE, display.BLACK, 's', False]
    world.map[32][12] = [display.WHITE, display.BLACK, 'F', False]
    
    world.map[34][12] = [display.WHITE, display.BLACK, 'r', False]
    world.map[36][12] = [display.WHITE, display.BLACK, 'P', False]
    world.map[37][12] = [display.WHITE, display.BLACK, 'l', False]
    world.map[38][12] = [display.WHITE, display.BLACK, 'a', False]
    world.map[39][12] = [display.WHITE, display.BLACK, 'y', False]
    world.map[40][12] = [display.WHITE, display.BLACK, 'i', False]
    world.map[41][12] = [display.WHITE, display.BLACK, 'n', False]
    world.map[42][12] = [display.WHITE, display.BLACK, 'g', False]
    world.map[43][12] = [display.WHITE, display.BLACK, '!', False]
    
Example #10
0
def generate():
    world.objects.clear()
    world.map = [[[display.GREEN, display.BLACK, ';', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]

    world.objects.append(Tutorial.lava.lava())
    world.objects.append(portal.portal(49, 10, "tutorial.final", 25, 9))
    chest_items = [\
        bread.bread(5) \
      ]
    world.objects.append(chest.chest(24, 10, chest_items))
    world.objects.append(chest.chest(26, 10, chest_items))
    world.objects.append(chest.chest(25, 11, chest_items))
    world.objects.append(chest.chest(25, 9, chest_items))

    world.map = [[[display.GREEN, display.BLACK, ';', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.map[2][2] = [display.RED, display.RED, '#', True]
    world.map[3][2] = [display.RED, display.RED, '#', True]
    world.map[46][2] = [display.RED, display.RED, '#', True]
    world.map[47][2] = [display.RED, display.RED, '#', True]
    world.map[2][3] = [display.RED, display.RED, '#', True]
    world.map[3][3] = [display.RED, display.RED, '#', True]
    world.map[18][3] = [0, 1, 'C', True]
    world.map[19][3] = [0, 1, 'o', True]
    world.map[20][3] = [0, 1, 'n', True]
    world.map[21][3] = [0, 1, 'g', True]
    world.map[22][3] = [0, 1, 'r', True]
    world.map[23][3] = [0, 1, 'a', True]
    world.map[24][3] = [0, 1, 't', True]
    world.map[25][3] = [0, 1, 'u', True]
    world.map[26][3] = [0, 1, 'l', True]
    world.map[27][3] = [0, 1, 'a', True]
    world.map[28][3] = [0, 1, 't', True]
    world.map[29][3] = [0, 1, 'i', True]
    world.map[30][3] = [0, 1, 'o', True]
    world.map[31][3] = [0, 1, 'n', True]
    world.map[32][3] = [0, 1, 's', True]
    world.map[33][3] = [0, 1, '!', True]
    world.map[46][3] = [display.RED, display.RED, '#', True]
    world.map[47][3] = [display.RED, display.RED, '#', True]
    world.map[6][4] = [display.RED, display.RED, '#', True]
    world.map[16][4] = [0, 1, 'Y', True]
    world.map[17][4] = [0, 1, 'o', True]
    world.map[18][4] = [0, 1, 'u', True]
    world.map[19][4] = [0, 1, ' ', True]
    world.map[20][4] = [0, 1, 'k', True]
    world.map[21][4] = [0, 1, 'i', True]
    world.map[22][4] = [0, 1, 'l', True]
    world.map[23][4] = [0, 1, 'l', True]
    world.map[24][4] = [0, 1, 'e', True]
    world.map[25][4] = [0, 1, 'd', True]
    world.map[26][4] = [0, 1, ' ', True]
    world.map[27][4] = [0, 1, 't', True]
    world.map[28][4] = [0, 1, 'h', True]
    world.map[29][4] = [0, 1, 'e', True]
    world.map[30][4] = [0, 1, ' ', True]
    world.map[31][4] = [0, 1, 'b', True]
    world.map[32][4] = [0, 1, 'o', True]
    world.map[33][4] = [0, 1, 's', True]
    world.map[34][4] = [0, 1, 's', True]
    world.map[35][4] = [0, 1, '!', True]
    world.map[43][4] = [display.RED, display.RED, '#', True]
    world.map[9][5] = [display.RED, display.RED, '#', True]
    world.map[11][5] = [0, 1, 'P', True]
    world.map[12][5] = [0, 1, 'i', True]
    world.map[13][5] = [0, 1, 'c', True]
    world.map[14][5] = [0, 1, 'k', True]
    world.map[15][5] = [0, 1, ' ', True]
    world.map[16][5] = [0, 1, 'u', True]
    world.map[17][5] = [0, 1, 'p', True]
    world.map[18][5] = [0, 1, ' ', True]
    world.map[19][5] = [0, 1, 'i', True]
    world.map[20][5] = [0, 1, 't', True]
    world.map[21][5] = [0, 1, 'e', True]
    world.map[22][5] = [0, 1, 'm', True]
    world.map[23][5] = [0, 1, 's', True]
    world.map[24][5] = [0, 1, ' ', True]
    world.map[25][5] = [0, 1, 'f', True]
    world.map[26][5] = [0, 1, 'r', True]
    world.map[27][5] = [0, 1, 'o', True]
    world.map[28][5] = [0, 1, 'm', True]
    world.map[29][5] = [0, 1, ' ', True]
    world.map[30][5] = [0, 1, 't', True]
    world.map[31][5] = [0, 1, 'h', True]
    world.map[32][5] = [0, 1, 'e', True]
    world.map[33][5] = [0, 1, ' ', True]
    world.map[34][5] = [0, 1, 'c', True]
    world.map[35][5] = [0, 1, 'h', True]
    world.map[36][5] = [0, 1, 'e', True]
    world.map[37][5] = [0, 1, 's', True]
    world.map[38][5] = [0, 1, 't', True]
    world.map[40][5] = [display.RED, display.RED, '#', True]
    world.map[13][6] = [display.RED, display.RED, '#', True]
    world.map[14][6] = [0, 1, 'B', True]
    world.map[15][6] = [0, 1, 'y', True]
    world.map[16][6] = [0, 1, ' ', True]
    world.map[17][6] = [0, 1, 's', True]
    world.map[18][6] = [0, 1, 't', True]
    world.map[19][6] = [0, 1, 'a', True]
    world.map[20][6] = [0, 1, 'n', True]
    world.map[21][6] = [0, 1, 'd', True]
    world.map[22][6] = [0, 1, 'i', True]
    world.map[23][6] = [0, 1, 'n', True]
    world.map[24][6] = [0, 1, 'g', True]
    world.map[25][6] = [0, 1, ' ', True]
    world.map[26][6] = [0, 1, 'n', True]
    world.map[27][6] = [0, 1, 'e', True]
    world.map[28][6] = [0, 1, 'x', True]
    world.map[29][6] = [0, 1, 't', True]
    world.map[30][6] = [0, 1, ' ', True]
    world.map[31][6] = [0, 1, 't', True]
    world.map[32][6] = [0, 1, 'o', True]
    world.map[33][6] = [0, 1, ' ', True]
    world.map[34][6] = [0, 1, 'i', True]
    world.map[35][6] = [0, 1, 't', True]
    world.map[36][6] = [display.RED, display.RED, '#', True]
    world.map[16][7] = [display.RED, display.RED, '#', True]
    world.map[33][7] = [display.RED, display.RED, '#', True]
    world.map[19][8] = [display.RED, display.RED, '#', True]
    world.map[30][8] = [display.RED, display.RED, '#', True]
    world.map[25][10] = [display.YELLOW, display.YELLOW, '@', False]
    world.map[19][11] = [display.RED, display.RED, '#', True]
    world.map[30][11] = [display.RED, display.RED, '#', True]
    world.map[16][12] = [display.RED, display.RED, '#', True]
    world.map[33][12] = [display.RED, display.RED, '#', True]
    world.map[13][13] = [display.RED, display.RED, '#', True]
    world.map[16][13] = [0, 1, 'T', True]
    world.map[17][13] = [0, 1, 'h', True]
    world.map[18][13] = [0, 1, 'e', True]
    world.map[19][13] = [0, 1, 'n', True]
    world.map[20][13] = [0, 1, ',', True]
    world.map[21][13] = [0, 1, ' ', True]
    world.map[22][13] = [0, 1, 'd', True]
    world.map[23][13] = [0, 1, 'e', True]
    world.map[24][13] = [0, 1, 'c', True]
    world.map[25][13] = [0, 1, 'i', True]
    world.map[26][13] = [0, 1, 'd', True]
    world.map[27][13] = [0, 1, 'e', True]
    world.map[28][13] = [0, 1, ' ', True]
    world.map[29][13] = [0, 1, 'w', True]
    world.map[30][13] = [0, 1, 'h', True]
    world.map[31][13] = [0, 1, 'a', True]
    world.map[32][13] = [0, 1, 't', True]
    world.map[36][13] = [display.RED, display.RED, '#', True]
    world.map[9][14] = [display.RED, display.RED, '#', True]
    world.map[10][14] = [0, 1, 'y', True]
    world.map[11][14] = [0, 1, 'o', True]
    world.map[12][14] = [0, 1, 'u', True]
    world.map[13][14] = [0, 1, ' ', True]
    world.map[14][14] = [0, 1, 'w', True]
    world.map[15][14] = [0, 1, 'a', True]
    world.map[16][14] = [0, 1, 'n', True]
    world.map[17][14] = [0, 1, 't', True]
    world.map[18][14] = [0, 1, ' ', True]
    world.map[19][14] = [0, 1, 't', True]
    world.map[20][14] = [0, 1, 'o', True]
    world.map[21][14] = [0, 1, ' ', True]
    world.map[22][14] = [0, 1, 't', True]
    world.map[23][14] = [0, 1, 'a', True]
    world.map[24][14] = [0, 1, 'k', True]
    world.map[25][14] = [0, 1, 'e', True]
    world.map[26][14] = [0, 1, ' ', True]
    world.map[27][14] = [0, 1, 'a', True]
    world.map[28][14] = [0, 1, 'n', True]
    world.map[29][14] = [0, 1, 'd', True]
    world.map[30][14] = [0, 1, ' ', True]
    world.map[31][14] = [0, 1, 'c', True]
    world.map[32][14] = [0, 1, 'h', True]
    world.map[33][14] = [0, 1, 'o', True]
    world.map[34][14] = [0, 1, 'o', True]
    world.map[35][14] = [0, 1, 's', True]
    world.map[36][14] = [0, 1, 'e', True]
    world.map[37][14] = [0, 1, ' ', True]
    world.map[38][14] = [0, 1, 'i', True]
    world.map[39][14] = [0, 1, 't', True]
    world.map[40][14] = [display.RED, display.RED, '#', True]
    world.map[6][15] = [display.RED, display.RED, '#', True]
    world.map[8][15] = [0, 1, 'C', True]
    world.map[9][15] = [0, 1, 'h', True]
    world.map[10][15] = [0, 1, 'o', True]
    world.map[11][15] = [0, 1, 'o', True]
    world.map[12][15] = [0, 1, 's', True]
    world.map[13][15] = [0, 1, 'e', True]
    world.map[14][15] = [0, 1, ' ', True]
    world.map[15][15] = [0, 1, 'w', True]
    world.map[16][15] = [0, 1, 'i', True]
    world.map[17][15] = [0, 1, 't', True]
    world.map[18][15] = [0, 1, 'h', True]
    world.map[19][15] = [0, 1, ' ', True]
    world.map[20][15] = [0, 1, 'U', True]
    world.map[21][15] = [0, 1, 'P', True]
    world.map[22][15] = [0, 1, ' ', True]
    world.map[23][15] = [0, 1, 'a', True]
    world.map[24][15] = [0, 1, 'n', True]
    world.map[25][15] = [0, 1, 'd', True]
    world.map[26][15] = [0, 1, ' ', True]
    world.map[27][15] = [0, 1, 'D', True]
    world.map[28][15] = [0, 1, 'O', True]
    world.map[29][15] = [0, 1, 'W', True]
    world.map[30][15] = [0, 1, 'N', True]
    world.map[31][15] = [0, 1, ' ', True]
    world.map[32][15] = [0, 1, 'o', True]
    world.map[33][15] = [0, 1, 'r', True]
    world.map[34][15] = [0, 1, ' ', True]
    world.map[35][15] = [0, 1, 'Q', True]
    world.map[36][15] = [0, 1, ' ', True]
    world.map[37][15] = [0, 1, 'a', True]
    world.map[38][15] = [0, 1, 'n', True]
    world.map[39][15] = [0, 1, 'd', True]
    world.map[40][15] = [0, 1, ' ', True]
    world.map[41][15] = [0, 1, 'E', True]
    world.map[43][15] = [display.RED, display.RED, '#', True]
    world.map[2][16] = [display.RED, display.RED, '#', True]
    world.map[3][16] = [display.RED, display.RED, '#', True]
    world.map[10][16] = [0, 1, 'P', True]
    world.map[11][16] = [0, 1, 'r', True]
    world.map[12][16] = [0, 1, 'e', True]
    world.map[13][16] = [0, 1, 's', True]
    world.map[14][16] = [0, 1, 's', True]
    world.map[15][16] = [0, 1, ' ', True]
    world.map[16][16] = [0, 1, 'E', True]
    world.map[17][16] = [0, 1, 'N', True]
    world.map[18][16] = [0, 1, 'T', True]
    world.map[19][16] = [0, 1, 'E', True]
    world.map[20][16] = [0, 1, 'R', True]
    world.map[21][16] = [0, 1, ' ', True]
    world.map[22][16] = [0, 1, 't', True]
    world.map[23][16] = [0, 1, 'o', True]
    world.map[24][16] = [0, 1, ' ', True]
    world.map[25][16] = [0, 1, 't', True]
    world.map[26][16] = [0, 1, 'a', True]
    world.map[27][16] = [0, 1, 'k', True]
    world.map[28][16] = [0, 1, 'e', True]
    world.map[29][16] = [0, 1, ' ', True]
    world.map[30][16] = [0, 1, 'y', True]
    world.map[31][16] = [0, 1, 'o', True]
    world.map[32][16] = [0, 1, 'u', True]
    world.map[33][16] = [0, 1, 'r', True]
    world.map[34][16] = [0, 1, ' ', True]
    world.map[35][16] = [0, 1, 'c', True]
    world.map[36][16] = [0, 1, 'h', True]
    world.map[37][16] = [0, 1, 'o', True]
    world.map[38][16] = [0, 1, 'i', True]
    world.map[39][16] = [0, 1, 'c', True]
    world.map[40][16] = [0, 1, 'e', True]
    world.map[46][16] = [display.RED, display.RED, '#', True]
    world.map[47][16] = [display.RED, display.RED, '#', True]
    world.map[2][17] = [display.RED, display.RED, '#', True]
    world.map[3][17] = [display.RED, display.RED, '#', True]
    world.map[6][17] = [0, 1, 'T', True]
    world.map[7][17] = [0, 1, 'h', True]
    world.map[8][17] = [0, 1, 'e', True]
    world.map[9][17] = [0, 1, 'n', True]
    world.map[10][17] = [0, 1, ' ', True]
    world.map[11][17] = [0, 1, 's', True]
    world.map[12][17] = [0, 1, 'e', True]
    world.map[13][17] = [0, 1, 't', True]
    world.map[14][17] = [0, 1, ' ', True]
    world.map[15][17] = [0, 1, 'y', True]
    world.map[16][17] = [0, 1, 'o', True]
    world.map[17][17] = [0, 1, 'u', True]
    world.map[18][17] = [0, 1, 'r', True]
    world.map[19][17] = [0, 1, ' ', True]
    world.map[20][17] = [0, 1, 'c', True]
    world.map[21][17] = [0, 1, 'o', True]
    world.map[22][17] = [0, 1, 'n', True]
    world.map[23][17] = [0, 1, 's', True]
    world.map[24][17] = [0, 1, 'u', True]
    world.map[25][17] = [0, 1, 'm', True]
    world.map[26][17] = [0, 1, 'a', True]
    world.map[27][17] = [0, 1, 'b', True]
    world.map[28][17] = [0, 1, 'l', True]
    world.map[29][17] = [0, 1, 'e', True]
    world.map[30][17] = [0, 1, ' ', True]
    world.map[31][17] = [0, 1, 'a', True]
    world.map[32][17] = [0, 1, 't', True]
    world.map[33][17] = [0, 1, ' ', True]
    world.map[34][17] = [0, 1, 'I', True]
    world.map[35][17] = [0, 1, 'n', True]
    world.map[36][17] = [0, 1, 'v', True]
    world.map[37][17] = [0, 1, 'e', True]
    world.map[38][17] = [0, 1, 'n', True]
    world.map[39][17] = [0, 1, 't', True]
    world.map[40][17] = [0, 1, 'o', True]
    world.map[41][17] = [0, 1, 'r', True]
    world.map[42][17] = [0, 1, 'y', True]
    world.map[46][17] = [display.RED, display.RED, '#', True]
    world.map[47][17] = [display.RED, display.RED, '#', True]
    world.map[7][18] = [0, 1, 'P', True]
    world.map[8][18] = [0, 1, 'r', True]
    world.map[9][18] = [0, 1, 'e', True]
    world.map[10][18] = [0, 1, 's', True]
    world.map[11][18] = [0, 1, 's', True]
    world.map[12][18] = [0, 1, ' ', True]
    world.map[13][18] = [0, 1, 'L', True]
    world.map[14][18] = [0, 1, 'E', True]
    world.map[15][18] = [0, 1, 'F', True]
    world.map[16][18] = [0, 1, 'T', True]
    world.map[17][18] = [0, 1, ' ', True]
    world.map[18][18] = [0, 1, 'S', True]
    world.map[19][18] = [0, 1, 'H', True]
    world.map[20][18] = [0, 1, 'I', True]
    world.map[21][18] = [0, 1, 'F', True]
    world.map[22][18] = [0, 1, 'T', True]
    world.map[23][18] = [0, 1, ' ', True]
    world.map[24][18] = [0, 1, 't', True]
    world.map[25][18] = [0, 1, 'o', True]
    world.map[26][18] = [0, 1, ' ', True]
    world.map[27][18] = [0, 1, 'u', True]
    world.map[28][18] = [0, 1, 's', True]
    world.map[29][18] = [0, 1, 'e', True]
    world.map[30][18] = [0, 1, ' ', True]
    world.map[31][18] = [0, 1, 'y', True]
    world.map[32][18] = [0, 1, 'o', True]
    world.map[33][18] = [0, 1, 'u', True]
    world.map[34][18] = [0, 1, 'r', True]
    world.map[35][18] = [0, 1, ' ', True]
    world.map[36][18] = [0, 1, 'c', True]
    world.map[37][18] = [0, 1, 'u', True]
    world.map[38][18] = [0, 1, 'r', True]
    world.map[39][18] = [0, 1, 'r', True]
    world.map[40][18] = [0, 1, 'e', True]
    world.map[41][18] = [0, 1, 'n', True]
    world.map[42][18] = [0, 1, 't', True]
    world.map[5][19] = [0, 1, 'c', True]
    world.map[6][19] = [0, 1, 'o', True]
    world.map[7][19] = [0, 1, 'n', True]
    world.map[8][19] = [0, 1, 's', True]
    world.map[9][19] = [0, 1, 'u', True]
    world.map[10][19] = [0, 1, 'm', True]
    world.map[11][19] = [0, 1, 'a', True]
    world.map[12][19] = [0, 1, 'b', True]
    world.map[13][19] = [0, 1, 'l', True]
    world.map[14][19] = [0, 1, 'e', True]
    world.map[15][19] = [0, 1, '.', True]
    world.map[16][19] = [0, 1, ' ', True]
    world.map[17][19] = [0, 1, 'M', True]
    world.map[18][19] = [0, 1, 'a', True]
    world.map[19][19] = [0, 1, 'k', True]
    world.map[20][19] = [0, 1, 'e', True]
    world.map[21][19] = [0, 1, ' ', True]
    world.map[22][19] = [0, 1, 's', True]
    world.map[23][19] = [0, 1, 'u', True]
    world.map[24][19] = [0, 1, 'r', True]
    world.map[25][19] = [0, 1, 'e', True]
    world.map[26][19] = [0, 1, ' ', True]
    world.map[27][19] = [0, 1, 'y', True]
    world.map[28][19] = [0, 1, 'o', True]
    world.map[29][19] = [0, 1, 'u', True]
    world.map[30][19] = [0, 1, ' ', True]
    world.map[31][19] = [0, 1, 'd', True]
    world.map[32][19] = [0, 1, 'o', True]
    world.map[33][19] = [0, 1, 'n', True]
    world.map[34][19] = [0, 1, '\'', True]
    world.map[35][19] = [0, 1, 't', True]
    world.map[36][19] = [0, 1, ' ', True]
    world.map[37][19] = [0, 1, 'r', True]
    world.map[38][19] = [0, 1, 'u', True]
    world.map[39][19] = [0, 1, 'n', True]
    world.map[40][19] = [0, 1, ' ', True]
    world.map[41][19] = [0, 1, 'o', True]
    world.map[42][19] = [0, 1, 'u', True]
    world.map[43][19] = [0, 1, 't', True]
    world.map[44][19] = [0, 1, '!', True]
Example #11
0
def generate():
    world.objects.clear()
    world.map = [[[display.WHITE, display.BLACK, '.', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]

    world.objects.append(LavaDungeon.lava.lava())
    world.objects.append(portal.portal(0, 10, "town", 25, 10))
    world.objects.append(portal.portal(25, 10, "lavadungeon.1", 25, 10))
    world.objects.append(LavaDungeon.enemy.generic_enemy(15, 7))
    world.objects.append(LavaDungeon.enemy.generic_enemy(43, 5))
    world.objects.append(LavaDungeon.enemy.generic_enemy(35, 15))
    npc_text = "Hello, adventurer.\nA warning before you enter\n the volcano:\nIt contains an\n ancient deadly beast.\nThere is no escape\n from the volcano before\n the beast is slain."
    npc_diag = npc.dialogue_tree()
    npc_diag.add_node("start", npc.node(npc_text, ("Oh no!", "exit")))
    npc_diag.add_exit("exit", 0)
    world.objects.append(npc.npc(23, 9, npc_diag))

    world.map[0][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[1][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[7][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[9][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[17][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[18][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[21][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[32][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[38][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[39][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[40][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[41][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[42][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[46][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[47][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[48][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][0] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][1] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][1] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][2] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][2] = [display.RED, display.BLACK, '.', True]
    world.map[28][2] = [display.RED, display.BLACK, '.', True]
    world.map[29][2] = [display.RED, display.BLACK, '.', True]
    world.map[49][2] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][3] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][3] = [display.RED, display.BLACK, '.', True]
    world.map[6][3] = [display.RED, display.BLACK, '.', True]
    world.map[7][3] = [display.RED, display.BLACK, '.', True]
    world.map[8][3] = [display.RED, display.BLACK, '.', True]
    world.map[9][3] = [display.RED, display.BLACK, '.', True]
    world.map[25][3] = [display.RED, display.BLACK, '.', True]
    world.map[26][3] = [display.RED, display.BLACK, '.', True]
    world.map[27][3] = [display.RED, display.BLACK, '.', True]
    world.map[28][3] = [display.RED, display.RED, '#', True]
    world.map[29][3] = [display.RED, display.BLACK, '.', True]
    world.map[49][3] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][4] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][4] = [display.RED, display.BLACK, '.', True]
    world.map[6][4] = [display.RED, display.RED, '#', True]
    world.map[7][4] = [display.RED, display.RED, '#', True]
    world.map[8][4] = [display.RED, display.RED, '#', True]
    world.map[9][4] = [display.RED, display.BLACK, '.', True]
    world.map[24][4] = [display.RED, display.BLACK, '.', True]
    world.map[25][4] = [display.RED, display.BLACK, '.', True]
    world.map[26][4] = [display.RED, display.RED, '#', True]
    world.map[27][4] = [display.RED, display.RED, '#', True]
    world.map[28][4] = [display.RED, display.RED, '#', True]
    world.map[29][4] = [display.RED, display.BLACK, '.', True]
    world.map[30][4] = [display.RED, display.BLACK, '.', True]
    world.map[49][4] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][5] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][5] = [display.RED, display.BLACK, '.', True]
    world.map[6][5] = [display.RED, display.BLACK, '.', True]
    world.map[7][5] = [display.RED, display.RED, '#', True]
    world.map[8][5] = [display.RED, display.BLACK, '.', True]
    world.map[9][5] = [display.RED, display.BLACK, '.', True]
    world.map[24][5] = [display.RED, display.BLACK, '.', True]
    world.map[25][5] = [display.RED, display.RED, '#', True]
    world.map[26][5] = [display.RED, display.RED, '#', True]
    world.map[27][5] = [display.RED, display.RED, '#', True]
    world.map[28][5] = [display.RED, display.RED, '#', True]
    world.map[29][5] = [display.RED, display.RED, '#', True]
    world.map[30][5] = [display.RED, display.BLACK, '.', True]
    world.map[31][5] = [display.RED, display.BLACK, '.', True]
    world.map[49][5] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][6] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][6] = [display.RED, display.BLACK, '.', True]
    world.map[7][6] = [display.RED, display.BLACK, '.', True]
    world.map[8][6] = [display.RED, display.BLACK, '.', True]
    world.map[24][6] = [display.RED, display.BLACK, '.', True]
    world.map[25][6] = [display.RED, display.RED, '#', True]
    world.map[26][6] = [display.RED, display.RED, '#', True]
    world.map[27][6] = [display.RED, display.BLACK, '.', True]
    world.map[28][6] = [display.RED, display.RED, '#', True]
    world.map[29][6] = [display.RED, display.RED, '#', True]
    world.map[30][6] = [display.RED, display.RED, '#', True]
    world.map[31][6] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][6] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][7] = [display.RED, display.RED, '#', True]
    world.map[26][7] = [display.RED, display.BLACK, '.', True]
    world.map[27][7] = [display.RED, display.BLACK, '.', True]
    world.map[28][7] = [display.RED, display.BLACK, '.', True]
    world.map[29][7] = [display.RED, display.RED, '#', True]
    world.map[30][7] = [display.RED, display.BLACK, '.', True]
    world.map[31][7] = [display.RED, display.BLACK, '.', True]
    world.map[32][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][7] = [display.RED, display.BLACK, '.', True]
    world.map[35][7] = [display.RED, display.BLACK, '.', True]
    world.map[36][7] = [display.RED, display.BLACK, '.', True]
    world.map[37][7] = [display.RED, display.BLACK, '.', True]
    world.map[38][7] = [display.RED, display.BLACK, '.', True]
    world.map[39][7] = [display.RED, display.BLACK, '.', True]
    world.map[49][7] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][8] = [display.RED, display.BLACK, '.', True]
    world.map[26][8] = [display.RED, display.BLACK, '.', True]
    world.map[28][8] = [display.RED, display.BLACK, '.', True]
    world.map[29][8] = [display.RED, display.BLACK, '.', True]
    world.map[30][8] = [display.RED, display.BLACK, '.', True]
    world.map[34][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][8] = [display.RED, display.RED, '#', True]
    world.map[36][8] = [display.RED, display.RED, '#', True]
    world.map[37][8] = [display.RED, display.BLACK, '.', True]
    world.map[38][8] = [display.RED, display.RED, '#', True]
    world.map[39][8] = [display.RED, display.BLACK, '.', True]
    world.map[40][8] = [display.RED, display.BLACK, '.', True]
    world.map[49][8] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][9] = [display.RED, display.BLACK, '.', True]
    world.map[17][9] = [display.RED, display.BLACK, '.', True]
    world.map[18][9] = [display.RED, display.BLACK, '.', True]
    world.map[19][9] = [display.RED, display.BLACK, '.', True]
    world.map[21][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][9] = [display.RED, display.BLACK, '.', True]
    world.map[35][9] = [display.RED, display.RED, '#', True]
    world.map[36][9] = [display.RED, display.RED, '#', True]
    world.map[37][9] = [display.RED, display.RED, '#', True]
    world.map[38][9] = [display.RED, display.RED, '#', True]
    world.map[39][9] = [display.RED, display.RED, '#', True]
    world.map[40][9] = [display.RED, display.BLACK, '.', True]
    world.map[49][9] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][10] = [display.WHITE, display.BLACK, '.', True]
    world.map[15][10] = [display.RED, display.BLACK, '.', True]
    world.map[16][10] = [display.RED, display.BLACK, '.', True]
    world.map[17][10] = [display.RED, display.RED, '#', True]
    world.map[18][10] = [display.RED, display.RED, '#', True]
    world.map[19][10] = [display.RED, display.BLACK, '.', True]
    world.map[20][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][10] = [display.RED, display.RED, '#', True]
    world.map[36][10] = [display.RED, display.RED, '#', True]
    world.map[37][10] = [display.RED, display.RED, '#', True]
    world.map[38][10] = [display.RED, display.BLACK, '.', True]
    world.map[39][10] = [display.RED, display.BLACK, '.', True]
    world.map[40][10] = [display.RED, display.BLACK, '.', True]
    world.map[49][10] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][11] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][11] = [display.RED, display.BLACK, '.', True]
    world.map[16][11] = [display.RED, display.RED, '#', True]
    world.map[17][11] = [display.RED, display.RED, '#', True]
    world.map[18][11] = [display.RED, display.RED, '#', True]
    world.map[19][11] = [display.RED, display.RED, '#', True]
    world.map[20][11] = [display.RED, display.BLACK, '.', True]
    world.map[32][11] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][11] = [display.RED, display.BLACK, '.', True]
    world.map[35][11] = [display.RED, display.BLACK, '.', True]
    world.map[36][11] = [display.RED, display.RED, '#', True]
    world.map[37][11] = [display.RED, display.BLACK, '.', True]
    world.map[38][11] = [display.RED, display.BLACK, '.', True]
    world.map[49][11] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][12] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][12] = [display.RED, display.BLACK, '.', True]
    world.map[16][12] = [display.RED, display.RED, '#', True]
    world.map[17][12] = [display.RED, display.RED, '#', True]
    world.map[18][12] = [display.RED, display.RED, '#', True]
    world.map[19][12] = [display.RED, display.BLACK, '.', True]
    world.map[20][12] = [display.RED, display.BLACK, '.', True]
    world.map[32][12] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][12] = [display.RED, display.BLACK, '.', True]
    world.map[36][12] = [display.RED, display.BLACK, '.', True]
    world.map[37][12] = [display.RED, display.BLACK, '.', True]
    world.map[49][12] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][13] = [display.RED, display.BLACK, '.', True]
    world.map[16][13] = [display.RED, display.BLACK, '.', True]
    world.map[17][13] = [display.RED, display.RED, '#', True]
    world.map[18][13] = [display.RED, display.RED, '#', True]
    world.map[19][13] = [display.RED, display.BLACK, '.', True]
    world.map[20][13] = [display.RED, display.BLACK, '.', True]
    world.map[30][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][13] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][14] = [display.RED, display.BLACK, '.', True]
    world.map[17][14] = [display.RED, display.BLACK, '.', True]
    world.map[18][14] = [display.RED, display.RED, '#', True]
    world.map[19][14] = [display.RED, display.RED, '#', True]
    world.map[20][14] = [display.RED, display.BLACK, '.', True]
    world.map[21][14] = [display.RED, display.BLACK, '.', True]
    world.map[27][14] = [display.RED, display.BLACK, '.', True]
    world.map[28][14] = [display.RED, display.BLACK, '.', True]
    world.map[29][14] = [display.RED, display.BLACK, '.', True]
    world.map[30][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][14] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[17][15] = [display.RED, display.BLACK, '.', True]
    world.map[18][15] = [display.RED, display.RED, '#', True]
    world.map[19][15] = [display.RED, display.RED, '#', True]
    world.map[20][15] = [display.RED, display.RED, '#', True]
    world.map[21][15] = [display.RED, display.BLACK, '.', True]
    world.map[27][15] = [display.RED, display.BLACK, '.', True]
    world.map[28][15] = [display.RED, display.RED, '#', True]
    world.map[29][15] = [display.RED, display.RED, '#', True]
    world.map[30][15] = [display.RED, display.BLACK, '.', True]
    world.map[31][15] = [display.RED, display.BLACK, '.', True]
    world.map[49][15] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][16] = [display.RED, display.BLACK, '.', True]
    world.map[17][16] = [display.RED, display.BLACK, '.', True]
    world.map[18][16] = [display.RED, display.BLACK, '.', True]
    world.map[19][16] = [display.RED, display.RED, '#', True]
    world.map[20][16] = [display.RED, display.RED, '#', True]
    world.map[21][16] = [display.RED, display.BLACK, '.', True]
    world.map[27][16] = [display.RED, display.BLACK, '.', True]
    world.map[28][16] = [display.RED, display.BLACK, '.', True]
    world.map[29][16] = [display.RED, display.BLACK, '.', True]
    world.map[30][16] = [display.RED, display.RED, '#', True]
    world.map[31][16] = [display.RED, display.BLACK, '.', True]
    world.map[49][16] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][17] = [display.RED, display.BLACK, '.', True]
    world.map[17][17] = [display.RED, display.RED, '#', True]
    world.map[18][17] = [display.RED, display.RED, '#', True]
    world.map[19][17] = [display.RED, display.RED, '#', True]
    world.map[20][17] = [display.RED, display.BLACK, '.', True]
    world.map[21][17] = [display.RED, display.BLACK, '.', True]
    world.map[29][17] = [display.RED, display.BLACK, '.', True]
    world.map[30][17] = [display.RED, display.BLACK, '.', True]
    world.map[31][17] = [display.RED, display.BLACK, '.', True]
    world.map[49][17] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][18] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][18] = [display.RED, display.BLACK, '.', True]
    world.map[17][18] = [display.RED, display.BLACK, '.', True]
    world.map[18][18] = [display.RED, display.RED, '#', True]
    world.map[19][18] = [display.RED, display.RED, '#', True]
    world.map[20][18] = [display.RED, display.BLACK, '.', True]
    world.map[49][18] = [display.WHITE, display.BLACK, '#', False]
    world.map[0][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[1][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[2][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[3][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[4][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[5][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[6][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[7][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[8][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[9][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[10][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[11][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[12][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[13][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[14][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[15][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[16][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[17][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[18][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[19][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[20][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[21][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[22][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[23][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[24][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[25][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[26][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[27][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[28][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[29][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[30][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[31][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[32][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[33][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[34][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[35][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[36][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[37][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[38][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[39][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[40][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[41][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[42][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[43][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[44][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[45][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[46][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[47][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[48][19] = [display.WHITE, display.BLACK, '#', False]
    world.map[49][19] = [display.WHITE, display.BLACK, '#', False]
Example #12
0
def generate():
    world.objects.clear()
    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(world.WORLD_X - 1, 10, "tutorial.boss", 0, 10))
    world.objects.append(Tutorial.lava.lava())

    world.map[5][0] = [0, 1, '^', True]
    world.map[26][0] = [0, 1, '^', True]
    world.map[34][0] = [0, 1, '^', True]
    world.map[2][1] = [0, 1, 'L', True]
    world.map[3][1] = [0, 1, 'e', True]
    world.map[4][1] = [0, 1, 'v', True]
    world.map[5][1] = [0, 1, 'e', True]
    world.map[6][1] = [0, 1, 'l', True]
    world.map[7][1] = [0, 1, ' ', True]
    world.map[8][1] = [0, 1, 'a', True]
    world.map[9][1] = [0, 1, 'n', True]
    world.map[10][1] = [0, 1, 'd', True]
    world.map[11][1] = [0, 1, ' ', True]
    world.map[12][1] = [0, 1, 'E', True]
    world.map[13][1] = [0, 1, 'X', True]
    world.map[14][1] = [0, 1, 'P', True]
    world.map[22][1] = [0, 1, 'C', True]
    world.map[23][1] = [0, 1, 'u', True]
    world.map[24][1] = [0, 1, 'r', True]
    world.map[25][1] = [0, 1, 'r', True]
    world.map[26][1] = [0, 1, 'e', True]
    world.map[27][1] = [0, 1, 'n', True]
    world.map[28][1] = [0, 1, 't', True]
    world.map[32][1] = [0, 1, 'C', True]
    world.map[33][1] = [0, 1, 'u', True]
    world.map[34][1] = [0, 1, 'r', True]
    world.map[35][1] = [0, 1, 'r', True]
    world.map[36][1] = [0, 1, 'e', True]
    world.map[37][1] = [0, 1, 'n', True]
    world.map[38][1] = [0, 1, 't', True]
    world.map[23][2] = [0, 1, 'S', True]
    world.map[24][2] = [0, 1, 'p', True]
    world.map[25][2] = [0, 1, 'e', True]
    world.map[26][2] = [0, 1, 'l', True]
    world.map[27][2] = [0, 1, 'l', True]
    world.map[33][2] = [0, 1, 'I', True]
    world.map[34][2] = [0, 1, 't', True]
    world.map[35][2] = [0, 1, 'e', True]
    world.map[36][2] = [0, 1, 'm', True]
    world.map[31][4] = [0, 1, 'C', True]
    world.map[32][4] = [0, 1, 'o', True]
    world.map[33][4] = [0, 1, 'n', True]
    world.map[34][4] = [0, 1, 'g', True]
    world.map[35][4] = [0, 1, 'r', True]
    world.map[36][4] = [0, 1, 'a', True]
    world.map[37][4] = [0, 1, 't', True]
    world.map[38][4] = [0, 1, 'u', True]
    world.map[39][4] = [0, 1, 'l', True]
    world.map[40][4] = [0, 1, 'a', True]
    world.map[41][4] = [0, 1, 't', True]
    world.map[42][4] = [0, 1, 'i', True]
    world.map[43][4] = [0, 1, 'o', True]
    world.map[44][4] = [0, 1, 'n', True]
    world.map[45][4] = [0, 1, 's', True]
    world.map[46][4] = [0, 1, '!', True]
    world.map[25][5] = [0, 1, 'Y', True]
    world.map[26][5] = [0, 1, 'o', True]
    world.map[27][5] = [0, 1, 'u', True]
    world.map[28][5] = [0, 1, ' ', True]
    world.map[29][5] = [0, 1, 'l', True]
    world.map[30][5] = [0, 1, 'e', True]
    world.map[31][5] = [0, 1, 'v', True]
    world.map[32][5] = [0, 1, 'e', True]
    world.map[33][5] = [0, 1, 'l', True]
    world.map[34][5] = [0, 1, 'l', True]
    world.map[35][5] = [0, 1, 'e', True]
    world.map[36][5] = [0, 1, 'd', True]
    world.map[37][5] = [0, 1, ' ', True]
    world.map[38][5] = [0, 1, 'u', True]
    world.map[39][5] = [0, 1, 'p', True]
    world.map[40][5] = [0, 1, ' ', True]
    world.map[41][5] = [0, 1, 'a', True]
    world.map[42][5] = [0, 1, 'n', True]
    world.map[43][5] = [0, 1, 'd', True]
    world.map[44][5] = [0, 1, ' ', True]
    world.map[45][5] = [0, 1, 'g', True]
    world.map[46][5] = [0, 1, 'o', True]
    world.map[47][5] = [0, 1, 't', True]
    world.map[26][6] = [0, 1, 'a', True]
    world.map[27][6] = [0, 1, ' ', True]
    world.map[28][6] = [0, 1, 'n', True]
    world.map[29][6] = [0, 1, 'e', True]
    world.map[30][6] = [0, 1, 'w', True]
    world.map[31][6] = [0, 1, ' ', True]
    world.map[32][6] = [0, 1, 's', True]
    world.map[33][6] = [0, 1, 'p', True]
    world.map[34][6] = [0, 1, 'e', True]
    world.map[35][6] = [0, 1, 'l', True]
    world.map[36][6] = [0, 1, 'l', True]
    world.map[37][6] = [0, 1, '!', True]
    world.map[38][6] = [0, 1, ' ', True]
    world.map[39][6] = [0, 1, 'P', True]
    world.map[40][6] = [0, 1, 'r', True]
    world.map[41][6] = [0, 1, 'e', True]
    world.map[42][6] = [0, 1, 's', True]
    world.map[43][6] = [0, 1, 's', True]
    world.map[44][6] = [0, 1, ' ', True]
    world.map[45][6] = [0, 1, 'E', True]
    world.map[46][6] = [0, 1, 'S', True]
    world.map[47][6] = [0, 1, 'C', True]
    world.map[2][7] = [0, 1, 'B', True]
    world.map[3][7] = [0, 1, 'e', True]
    world.map[4][7] = [0, 1, 'w', True]
    world.map[5][7] = [0, 1, 'a', True]
    world.map[6][7] = [0, 1, 'r', True]
    world.map[7][7] = [0, 1, 'e', True]
    world.map[8][7] = [0, 1, ' ', True]
    world.map[9][7] = [0, 1, 'o', True]
    world.map[10][7] = [0, 1, 'f', True]
    world.map[11][7] = [0, 1, ' ', True]
    world.map[12][7] = [0, 1, 'l', True]
    world.map[13][7] = [0, 1, 'a', True]
    world.map[14][7] = [0, 1, 'v', True]
    world.map[15][7] = [0, 1, 'a', True]
    world.map[16][7] = [0, 1, '!', True]
    world.map[31][7] = [0, 1, 't', True]
    world.map[32][7] = [0, 1, 'o', True]
    world.map[33][7] = [0, 1, ' ', True]
    world.map[34][7] = [0, 1, 'o', True]
    world.map[35][7] = [0, 1, 'p', True]
    world.map[36][7] = [0, 1, 'e', True]
    world.map[37][7] = [0, 1, 'n', True]
    world.map[38][7] = [0, 1, ' ', True]
    world.map[39][7] = [0, 1, 't', True]
    world.map[40][7] = [0, 1, 'h', True]
    world.map[41][7] = [0, 1, 'e', True]
    world.map[42][7] = [0, 1, ' ', True]
    world.map[43][7] = [0, 1, 'm', True]
    world.map[44][7] = [0, 1, 'e', True]
    world.map[45][7] = [0, 1, 'n', True]
    world.map[46][7] = [0, 1, 'u', True]
    world.map[47][7] = [0, 1, '.', True]
    world.map[2][8] = [0, 1, 'I', True]
    world.map[3][8] = [0, 1, 't', True]
    world.map[4][8] = [0, 1, ' ', True]
    world.map[5][8] = [0, 1, 'w', True]
    world.map[6][8] = [0, 1, 'i', True]
    world.map[7][8] = [0, 1, 'l', True]
    world.map[8][8] = [0, 1, 'l', True]
    world.map[9][8] = [0, 1, ' ', True]
    world.map[10][8] = [0, 1, 'k', True]
    world.map[11][8] = [0, 1, 'i', True]
    world.map[12][8] = [0, 1, 'l', True]
    world.map[13][8] = [0, 1, 'l', True]
    world.map[14][8] = [0, 1, ' ', True]
    world.map[15][8] = [0, 1, 'y', True]
    world.map[16][8] = [0, 1, 'o', True]
    world.map[17][8] = [0, 1, 'u', True]
    world.map[18][8] = [0, 1, '.', True]
    world.map[29][8] = [0, 1, 'I', True]
    world.map[30][8] = [0, 1, 'n', True]
    world.map[31][8] = [0, 1, ' ', True]
    world.map[32][8] = [0, 1, 't', True]
    world.map[33][8] = [0, 1, 'h', True]
    world.map[34][8] = [0, 1, 'e', True]
    world.map[35][8] = [0, 1, ' ', True]
    world.map[36][8] = [0, 1, 'm', True]
    world.map[37][8] = [0, 1, 'e', True]
    world.map[38][8] = [0, 1, 'n', True]
    world.map[39][8] = [0, 1, 'u', True]
    world.map[40][8] = [0, 1, ',', True]
    world.map[41][8] = [0, 1, ' ', True]
    world.map[42][8] = [0, 1, 'c', True]
    world.map[43][8] = [0, 1, 'h', True]
    world.map[44][8] = [0, 1, 'o', True]
    world.map[45][8] = [0, 1, 'o', True]
    world.map[46][8] = [0, 1, 's', True]
    world.map[47][8] = [0, 1, 'e', True]
    world.map[2][9] =  [display.RED, display.RED, '#', True]
    world.map[3][9] = [0, 1, ' ', True]
    world.map[4][9] = [0, 1, 'i', True]
    world.map[5][9] = [0, 1, 's', True]
    world.map[6][9] = [0, 1, ' ', True]
    world.map[7][9] = [0, 1, 'l', True]
    world.map[8][9] = [0, 1, 'a', True]
    world.map[9][9] = [0, 1, 'v', True]
    world.map[10][9] = [0, 1, 'a', True]
    world.map[11][9] = [0, 1, '.', True]
    world.map[28][9] = [0, 1, '"', True]
    world.map[29][9] = [0, 1, 'S', True]
    world.map[30][9] = [0, 1, 'p', True]
    world.map[31][9] = [0, 1, 'e', True]
    world.map[32][9] = [0, 1, 'l', True]
    world.map[33][9] = [0, 1, 'l', True]
    world.map[34][9] = [0, 1, 's', True]
    world.map[35][9] = [0, 1, '"', True]
    world.map[36][9] = [0, 1, ' ', True]
    world.map[37][9] = [0, 1, 'a', True]
    world.map[38][9] = [0, 1, 'n', True]
    world.map[39][9] = [0, 1, 'd', True]
    world.map[40][9] = [0, 1, ' ', True]
    world.map[41][9] = [0, 1, 's', True]
    world.map[42][9] = [0, 1, 'e', True]
    world.map[43][9] = [0, 1, 't', True]
    world.map[44][9] = [0, 1, ' ', True]
    world.map[45][9] = [0, 1, 'i', True]
    world.map[46][9] = [0, 1, 't', True]
    world.map[47][9] = [0, 1, '!', True]
    world.map[49][10] = [0, 1, 'O', True]
    world.map[34][12] = [0, 1, 'P', True]
    world.map[35][12] = [0, 1, 'r', True]
    world.map[36][12] = [0, 1, 'e', True]
    world.map[37][12] = [0, 1, 's', True]
    world.map[38][12] = [0, 1, 's', True]
    world.map[39][12] = [0, 1, ' ', True]
    world.map[40][12] = [0, 1, 's', True]
    world.map[41][12] = [0, 1, 'p', True]
    world.map[42][12] = [0, 1, 'a', True]
    world.map[43][12] = [0, 1, 'c', True]
    world.map[44][12] = [0, 1, 'e', True]
    world.map[45][12] = [0, 1, ' ', True]
    world.map[46][12] = [0, 1, 't', True]
    world.map[47][12] = [0, 1, 'o', True]
    world.map[5][13] =  [display.RED, display.RED, '#', True]
    world.map[6][13] =  [display.RED, display.RED, '#', True]
    world.map[7][13] =  [display.RED, display.RED, '#', True]
    world.map[30][13] =  [display.RED, display.RED, '#', True]
    world.map[31][13] =  [display.RED, display.RED, '#', True]
    world.map[32][13] =  [display.RED, display.RED, '#', True]
    world.map[33][13] = [0, 1, 'c', True]
    world.map[34][13] = [0, 1, 'a', True]
    world.map[35][13] = [0, 1, 's', True]
    world.map[36][13] = [0, 1, 't', True]
    world.map[37][13] = [0, 1, ' ', True]
    world.map[38][13] = [0, 1, 'y', True]
    world.map[39][13] = [0, 1, 'o', True]
    world.map[40][13] = [0, 1, 'u', True]
    world.map[41][13] = [0, 1, 'r', True]
    world.map[42][13] = [0, 1, ' ', True]
    world.map[43][13] = [0, 1, 's', True]
    world.map[44][13] = [0, 1, 'p', True]
    world.map[45][13] = [0, 1, 'e', True]
    world.map[46][13] = [0, 1, 'l', True]
    world.map[47][13] = [0, 1, 'l', True]
    world.map[6][14] =  [display.RED, display.RED, '#', True]
    world.map[7][14] =  [display.RED, display.RED, '#', True]
    world.map[8][14] =  [display.RED, display.RED, '#', True]
    world.map[31][14] =  [display.RED, display.RED, '#', True]
    world.map[32][14] =  [display.RED, display.RED, '#', True]
    world.map[33][14] = [0, 1, 'b', True]
    world.map[34][14] = [0, 1, 'u', True]
    world.map[35][14] = [0, 1, 't', True]
    world.map[36][14] = [0, 1, ' ', True]
    world.map[37][14] = [0, 1, 'k', True]
    world.map[38][14] = [0, 1, 'e', True]
    world.map[39][14] = [0, 1, 'e', True]
    world.map[40][14] = [0, 1, 'p', True]
    world.map[41][14] = [0, 1, ' ', True]
    world.map[42][14] = [0, 1, 'a', True]
    world.map[43][14] = [0, 1, 'n', True]
    world.map[44][14] = [0, 1, ' ', True]
    world.map[45][14] = [0, 1, 'e', True]
    world.map[46][14] = [0, 1, 'y', True]
    world.map[47][14] = [0, 1, 'e', True]
    world.map[7][15] =  [display.RED, display.RED, '#', True]
    world.map[8][15] =  [display.RED, display.RED, '#', True]
    world.map[9][15] =  [display.RED, display.RED, '#', True]
    world.map[10][15] =  [display.RED, display.RED, '#', True]
    world.map[11][15] =  [display.RED, display.RED, '#', True]
    world.map[35][15] = [0, 1, 'o', True]
    world.map[36][15] = [0, 1, 'n', True]
    world.map[37][15] = [0, 1, ' ', True]
    world.map[38][15] = [0, 1, 'y', True]
    world.map[39][15] = [0, 1, 'o', True]
    world.map[40][15] = [0, 1, 'u', True]
    world.map[41][15] = [0, 1, 'r', True]
    world.map[42][15] = [0, 1, ' ', True]
    world.map[43][15] = [0, 1, 'm', True]
    world.map[44][15] = [0, 1, 'a', True]
    world.map[45][15] = [0, 1, 'n', True]
    world.map[46][15] = [0, 1, 'a', True]
    world.map[47][15] = [0, 1, '!', True]
    world.map[5][16] =  [display.RED, display.RED, '#', True]
    world.map[6][16] =  [display.RED, display.RED, '#', True]
    world.map[7][16] =  [display.RED, display.RED, '#', True]
    world.map[8][16] =  [display.RED, display.RED, '#', True]
    world.map[9][16] =  [display.RED, display.RED, '#', True]
Example #13
0
def generate():
    world.objects.clear()
    world.map = [[ [display.GREEN, display.BLACK, ';', True] for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(25, 8, "tutorial.1", 0, 10))

    world.map[22][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[26][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[27][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[28][5] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][6] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][6] = [0, 1, '.', True]
    world.map[24][6] = [0, 1, '.', True]
    world.map[25][6] = [0, 1, '.', True]
    world.map[26][6] = [0, 1, '.', True]
    world.map[27][6] = [0, 1, '.', True]
    world.map[28][6] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][7] = [0, 1, '.', True]
    world.map[24][7] = [0, 1, '.', True]
    world.map[25][7] = [0, 1, '.', True]
    world.map[26][7] = [0, 1, '.', True]
    world.map[27][7] = [0, 1, '.', True]
    world.map[28][7] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][8] = [0, 1, '.', True]
    world.map[24][8] = [0, 1, '.', True]
    world.map[25][8] = [0, 1, '.', True]
    world.map[26][8] = [0, 1, '.', True]
    world.map[27][8] = [0, 1, '.', True]
    world.map[28][8] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][9] = [0, 1, '.', True]
    world.map[24][9] = [0, 1, '.', True]
    world.map[25][9] = [0, 1, '.', True]
    world.map[26][9] = [0, 1, '.', True]
    world.map[27][9] = [0, 1, '.', True]
    world.map[28][9] =  [display.WHITE, display.BLACK, '#', False]
    world.map[22][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[23][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[24][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][10] = [0, 1, '.', True]
    world.map[26][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[27][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[28][10] =  [display.WHITE, display.BLACK, '#', False]
    world.map[25][12] = [0, 1, 'W', True]
    world.map[24][13] = [0, 1, 'A', True]
    world.map[25][13] = [0, 1, 'S', True]
    world.map[26][13] = [0, 1, 'D', True]
    world.map[22][14] = [0, 1, 'T', True]
    world.map[23][14] = [0, 1, 'O', True]
    world.map[24][14] = [0, 1, ' ', True]
    world.map[25][14] = [0, 1, 'M', True]
    world.map[26][14] = [0, 1, 'O', True]
    world.map[27][14] = [0, 1, 'V', True]
    world.map[28][14] = [0, 1, 'E', True]
    world.map[22][16] =  [display.BLUE, display.BLACK, 'O', False]
    world.map[23][16] = [0, 1, '=', True]
    world.map[24][16] = [0, 1, 'P', True]
    world.map[25][16] = [0, 1, 'o', True]
    world.map[26][16] = [0, 1, 'r', True]
    world.map[27][16] = [0, 1, 't', True]
    world.map[28][16] = [0, 1, 'a', True]
    world.map[29][16] = [0, 1, 'l', True]
    world.map[19][17] = [0, 1, 'Y', True]
    world.map[20][17] = [0, 1, 'O', True]
    world.map[21][17] = [0, 1, 'U', True]
    world.map[23][17] = [0, 1, '>', True]
    world.map[27][17] = [0, 1, '<', True]
    world.map[29][17] = [0, 1, 'Y', True]
    world.map[30][17] = [0, 1, 'O', True]
    world.map[31][17] = [0, 1, 'U', True]
Example #14
0
def generate():
    world.objects = []
    world.map = [[[display.GREEN, display.BLACK, ';', True]
                  for y in range(world.WORLD_Y)] for x in range(world.WORLD_X)]
    world.objects.append(portal.portal(49, 10, "stonedungeon.start", 2, 10))
    world.objects.append(
        General.level_portal.level_portal(25, 0, "lavadungeon.start", 2, 10,
                                          5))
    dialogue_tree = General.npc.dialogue_tree()
    dialogue_tree.add_node(
        "start",
        General.npc.node(
            "Hello! Welcome to pyRPG!\nI would suggest entering the\n portal to the right.\nIt leads to the\n Forgotten Catacombs.",
            ("What's above?", "lavadungeon_info"), ("Bye", "exit")))
    dialogue_tree.add_node(
        "lavadungeon_info",
        General.npc.node(
            "That's the collapsed volcano.\n In it lives a great beast.\n It is quite dangerous, I \n would not recommend entering.",
            ("What's to the right?", "start"), ("Bye", "exit")))
    dialogue_tree.add_exit("exit", 0)
    world.objects.append(General.npc.npc(43, 4, dialogue_tree))

    # Upper left. This is the WARRIOR house
    for x in range(10, 20):  # Make walls
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][5] = [display.WHITE, display.BLACK, '#', False]
    for y in range(0, 6):
        world.map[10][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[20][y] = [display.WHITE, display.BLACK, '#', False]

    for x in range(11, 20):  # Fill inside
        for y in range(1, 5):
            world.map[x][y] = [display.WHITE, display.BLACK, ".", True]
    world.objects.append(
        bg_changer.bg_changer(15, 5, "warrior",
                              [display.WHITE, display.BLACK, '.', True]))
    world.map[15][1] = [display.YELLOW, display.YELLOW, '@',
                        False]  # Chest in house
    war_chest_items = [\
        t1_warrior.t1_warrior_hat(),    \
        t1_warrior.t1_warrior_pants(),  \
        t1_warrior.t1_warrior_ring(),   \
        t1_warrior.t1_warrior_shirt(),  \
        t1_warrior.t1_warrior_weapon()  \
      ]

    world.objects.append(chest.chest(
        15, 2, war_chest_items))  # This chest contains stuff for warriors.
    world.objects.append(chest.chest(
        14, 1, war_chest_items))  # This chest contains stuff for warriors.
    world.objects.append(chest.chest(
        16, 1, war_chest_items))  # This chest contains stuff for warriors.

    # Lower left. This is the MAGE house
    for x in range(16, 25):
        world.map[x][16] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][19] = [display.WHITE, display.BLACK, '#', False]
    for y in range(16, 20):
        world.map[16][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[25][y] = [display.WHITE, display.BLACK, '#', False]

    for x in range(17, 25):
        for y in range(17, 19):
            world.map[x][y] = [display.WHITE, display.BLACK, ".", True]
    world.objects.append(
        bg_changer.bg_changer(20, 16, "mage",
                              [display.WHITE, display.BLACK, '.', True]))
    world.map[24][18] = [display.YELLOW, display.YELLOW, '@',
                         False]  # Chest in house
    mage_chest_items = [\
        t1_mage.t1_mage_hat(),  \
        t1_mage.t1_mage_pants(),\
        t1_mage.t1_mage_ring(), \
        t1_mage.t1_mage_shirt(),\
        t1_mage.t1_mage_weapon()\
      ]
    world.objects.append(chest.chest(
        24, 17, mage_chest_items))  # This chest contains stuff for mages.
    world.objects.append(chest.chest(23, 18, mage_chest_items))

    # Top right house. This is the EVERYONE house
    for x in range(42, 49):  # Make walls
        world.map[x][0] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][5] = [display.WHITE, display.BLACK, '#', False]
    for y in range(0, 5):
        world.map[42][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[48][y] = [display.WHITE, display.BLACK, '#', False]

    for x in range(43, 48):  # Fill inside
        for y in range(1, 5):
            world.map[x][y] = [0, 1, ".", True]
    world.map[45][5] = [0, 1, ".", True]  # Doorway

    world.map[45][1] = [display.YELLOW, display.YELLOW, '@',
                        False]  # Chest in house
    all_chest_items = [\
        enemy_info.info_hat(),  \
        enemy_info.info_pants(),\
        enemy_info.info_ring()  \
      ]
    world.objects.append(chest.chest(
        45, 2, all_chest_items))  # This chest contains stuff for everyone.
    world.objects.append(chest.chest(
        44, 1, all_chest_items))  # And the interaction on the left...
    world.objects.append(chest.chest(46, 1,
                                     all_chest_items))  # And on the right

    # Lower right. This is the THIEF house
    for x in range(40, 49):
        world.map[x][14] = [display.WHITE, display.BLACK, '#', False]
        world.map[x][19] = [display.WHITE, display.BLACK, '#', False]
    for y in range(14, 20):
        world.map[40][y] = [display.WHITE, display.BLACK, '#', False]
        world.map[49][y] = [display.WHITE, display.BLACK, '#', False]

    for x in range(41, 49):
        for y in range(15, 19):
            world.map[x][y] = [0, 1, ".", True]
    world.objects.append(
        bg_changer.bg_changer(44, 14, "thief",
                              [display.WHITE, display.BLACK, '.', True]))
    world.map[44][18] = [display.YELLOW, display.YELLOW, '@',
                         False]  # Chest in house
    thief_chest_items = [\
        t1_thief.t1_thief_hat(),    \
        t1_thief.t1_thief_pants(),  \
        t1_thief.t1_thief_ring(),   \
        t1_thief.t1_thief_shirt(),  \
        t1_thief.t1_thief_weapon()  \
      ]

    world.objects.append(chest.chest(
        43, 18, thief_chest_items))  # This chest contains stuff for thiefs.
    world.objects.append(chest.chest(45, 18, thief_chest_items))
    world.objects.append(chest.chest(44, 17, thief_chest_items))