def _interior_garden(w, h, wall_material, floor_material):
    M = Map(w, h, fill_cell=C.floor_flagged)
    garden_part = Map(w // 2, h, fill_cell=C.flora_grass)
    for y in range(0, h):
        garden_part[w // 2 - 1, y] = C.floor_flagged()
    for x in range(1, w // 2 - 1):
        for y in range(1, 4):
            garden_part[x, y] = C.floor_flagged()
    for x in range(2, w // 2):
        garden_part[x, 2].put(T.water_trough())
    for y in range(h - 3, h):
        garden_part[0, y] = C.flora_tree()
        garden_part[1, y].put(T.water_trough())
        garden_part[2, y] = C.flora_flower()
    garden_part[w // 2 - 2, 0] = C.flora_flower()
    garden_part[0, h - 5].put(T.furniture_sofa())
    garden_part[1, h - 5].put(T.furniture_table_round())
    garden_part[2, h - 6].put(T.urn())
    M.meld(garden_part, 0, 0)
    garden_part2 = deepcopy(garden_part)
    garden_part2.hmirror()
    M.meld(garden_part2, w // 2 + w % 2, 0)
    for x in range(0, w // 2 - 1):
        M[x, h - 4] = C.floor_flagged()
    M.scatter(0, 0, w - 1, h - 1, [A.animal_cat()])

    return M
Beispiel #2
0
def _room_rich_hall(w, h):
    """
    Construct luxury hall.
    """
    M = room_default(w,
                     h,
                     wall_type=C.wall_dungeon_smooth,
                     floor_type=C.floor_plank)

    # Place sofa, flowers, etc.
    M[1, 1] = C.flora_flower()
    M[w // 2, 1] = C.column_antique()
    M[w - 2, 1] = C.flora_flower()
    M[1, 2].put(T.furniture_sofa())
    M[w - 2, 2].put(T.furniture_sofa())
    M[w // 2 - 1, h - 2].put(T.furniture_chandelier())
    M[w // 2 + 1, h - 2].put(T.furniture_chandelier())
    M[2, 0] = C.door_closed()
    M[7, 0] = C.door_closed()
    M[w // 2, h - 1] = C.door_closed_wooden()
    return M
def _room_second_bedroom(w, h, wall_material, floor_material):
    M = room_default(w, h, wall_type=wall_material, floor_type=floor_material)
    M[1, 1] = C.flora_flower()
    M[w - 3, 1].put(T.furniture_table())
    M[w - 2, 1].put(T.furniture_chair())
    M[1, h // 2].put(T.furniture_closet())
    items = [
        T.furniture_cabinet(),
        T.furniture_bed_single(),
        T.furniture_chandelier()
    ]
    M.scatter(1, h - 2, w - 1, h - 1, items)
    M[w - 1, h - 5] = C.door_closed()

    return M
Beispiel #4
0
def _room_outdoor(w, h):
    M = Map(w, h, fill_cell=C.floor_rocks)
    for i in range(w*h//3):
        grass_x = random.randint(0, w-1)
        grass_y = random.randint(0, h-1)
        M[grass_x, grass_y] = random.choice([C.flora_grass, C.flora_tree, C.floor_grass])()
    for x in (1, 8):
        M[x, 0].put(T.furniture_table())
    for x in (0, 2, 7, 9):
        M[x, 0].put(T.furniture_stool())
    if w > 13:
        M[11, 0].put(T.furniture_table())
        M[10, 0].put(T.furniture_stool())
        M[12, 0].put(T.furniture_stool())
    for y in range(0, h):
        M[4, y] = C.floor_cobblestone()

    num_stables = (h - 5) // 2
    stables = Map(3, 2, fill_cell=C.void)
    for x in range(3):
        stables[x, 0] = C.wall_fence_thin()
    stables[2, 1] = C.wall_fence_thin()
    stables[0, 1] = C.door_close_fence()
    stables[1, 1].put(A.animal_horse())
    last_stable_y = h - 1
    for i in range(num_stables):
        stable_x = w - 3
        stable_y = 4 + (i * 2)
        M.meld(stables, stable_x, stable_y)
        last_stable_y = stable_y
    for x in range(w-3, w):
        M[x, last_stable_y + 2] = C.wall_fence_thin()
    M[2, h-1].put(T.sign_pointer())
    M[3, 0].put(T.light_torch())
    for y in (h//2-1, h//2):
        M[0, y].put(T.washtub())
    if w > 9:
        M[0, h//2+1].put(T.washtub())
    M[5, 0] = C.flora_flower()

    return M