Beispiel #1
0
class SingleHorizontalTunnel(MapPiece):
    name = "Horizontal Tunnel"
    tiles = [
        "######",
        "#....#",
        "######"
    ]

    symbolic_links = {
        ".": floors.DungeonFloor,
        "#": walls.DungeonWall,
    }

    connectors = {
        # Direction.North: (
        #     connectors.DungeonFloorConnectorA((3, 0)),
        #     connectors.DungeonDoorConnectorA((3, 0)),
        # ),
        # Direction.South: (
        #     connectors.DungeonFloorConnectorA((3, 2)),
        #     connectors.DungeonDoorConnectorA((3, 2))
        # ),
        Direction.East: (
            connectors.DungeonSingleFloor((5, 1)),
            connectors.DungeonSingleDoor((5, 1)),
        ),
        Direction.West: (
            connectors.DungeonSingleFloor((0, 1)),
            connectors.DungeonSingleDoor((0, 1))
        ),
    }
Beispiel #2
0
class SingleFourPointTunnel(MapPiece):
    name = "Single FourPoint Tunnel"
    tiles = [
        "#######",
        "###.###",
        "#.....#",
        "###.###",
        "#######"
    ]

    symbolic_links = {
        ".": floors.DungeonFloor,
        "#": walls.DungeonWall,
    }

    connectors = {
        Direction.North: (
            connectors.DungeonSingleFloor((3, 0)),
            connectors.DungeonSingleDoor((3, 0)),
        ),
        Direction.South: (
            connectors.DungeonSingleFloor((3, 4)),
            connectors.DungeonSingleDoor((3, 4)),
        ),
        Direction.East: (
            connectors.DungeonSingleFloor((6, 2)),
            connectors.DungeonSingleDoor((6, 2)),
        ),
        Direction.West: (
            connectors.DungeonSingleFloor((0, 2)),
            connectors.DungeonSingleDoor((0, 2)),
        ),
    }
Beispiel #3
0
class LargeCellArea(MapPiece):
    name = "Large Cell Area"
    tiles = [
        "#########", "#.#.#.#.#", "#+#+#+#+#", "#.......#", "#.......#",
        "#+#+#+#+#", "#.#.#.#.#", "#########"
    ]
    symbolic_links = {
        ".": floors.DungeonFloor,
        "+": doors.DungeonDoor,
        "#": walls.DungeonWall,
    }
    spawners = [
        spawns.OnceSpawner(
            spawns.SpawnSet(100, monsters.Skeleton, spawns.SpawnPoint(4, 4)), )
    ]
    connectors = {
        Direction.West: (
            connectors.DungeonDoubleDoor((0, 3), (0, 4)),
            connectors.DungeonSingleDoor((0, 3)),
        ),
        Direction.East: (
            connectors.DungeonDoubleDoor((8, 3), (8, 4)),
            connectors.DungeonSingleDoor((8, 3)),
        ),
    }
Beispiel #4
0
def get_base_connectors(tiles):
    """
    Places basic connectors for rooms,
    single door or double door, using the middle
    :param tiles: The tiles to evaluate
    :return: The Connector Dict
    """
    height = len(tiles) - 1
    width = max((len(row) for row in tiles)) - 1
    center_width = int(width / 2)
    center_height = int(height / 2)
    return {
        Direction.North: (
            connectors.DungeonSingleDoor((center_width, 0)),
            connectors.DungeonDoubleDoor((center_width, 0),
                                         (center_width + 1, 0)),
        ),
        Direction.South: (
            connectors.DungeonSingleDoor((center_width, height)),
            connectors.DungeonDoubleDoor((center_width, height),
                                         (center_width + 1, height)),
        ),
        Direction.East: (
            connectors.DungeonSingleDoor((width, center_height)),
            connectors.DungeonDoubleDoor(
                (width, center_height),
                (width + 1, center_height),
            ),
        ),
        Direction.West: (
            connectors.DungeonSingleDoor((0, center_height)),
            connectors.DungeonDoubleDoor(
                (0, center_height),
                (0, center_height),
            ),
        )
    }
Beispiel #5
0
class SingleVerticalTunnel(MapPiece):
    name = "Single Vertical Tunnel"
    tiles = [
        "###",
        "#.#",
        "#.#",
        "#.#",
        "###"
    ]

    symbolic_links = {
        ".": floors.DungeonFloor,
        "#": walls.DungeonWall,
    }
    connectors = {
        Direction.North: (
            connectors.DungeonSingleFloor((1, 0)),
            connectors.DungeonSingleDoor((1, 0)),
        ),
        Direction.South: (
            connectors.DungeonSingleFloor((1, 4)),
            connectors.DungeonSingleDoor((1, 4)),
        ),
    }