LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Server.DungeonGen

Contents

- Internal operations

Description

The dungeon generation routine. It creates empty dungeons, without actors and without items, either lying on the floor or embedded inside tiles.

Synopsis

- data FreshDungeon = FreshDungeon {
  - freshDungeon :: Dungeon
  - freshTotalDepth :: AbsDepth
  }
- dungeonGen :: COps -> ServerOptions -> Caves -> Rnd FreshDungeon
- convertTileMaps :: COps -> Bool -> Rnd (ContentId TileKind) -> Maybe (Rnd (ContentId TileKind)) -> Area -> TileMapEM -> Rnd TileMap
- buildTileMap :: COps -> Cave -> Rnd TileMap
- anchorDown :: Y
- buildLevel :: COps -> ServerOptions -> LevelId -> ContentId CaveKind -> CaveKind -> Int -> Int -> AbsDepth -> [(Point, Text)] -> Rnd (Level, [(Point, Text)])
- snapToStairList :: Int -> [Point] -> Point -> Either Point Point
- placeDownStairs :: Text -> Bool -> ServerOptions -> LevelId -> CaveKind -> Area -> [Point] -> [Point] -> Rnd (Maybe Point)
- levelFromCave :: COps -> Cave -> AbsDepth -> TileMap -> ([Point], [Point]) -> [Point] -> Level

# Documentation

data FreshDungeon Source #

Freshly generated and not yet populated dungeon.

Constructors

FreshDungeon |

Fields

- freshDungeon :: Dungeon

  maps for all levels

- freshTotalDepth :: AbsDepth

  absolute dungeon depth

dungeonGen :: COps -> ServerOptions -> Caves -> Rnd FreshDungeon Source #

Generate the dungeon for a new game.

# Internal operations

convertTileMaps :: COps -> Bool -> Rnd (ContentId TileKind) -> Maybe (Rnd (ContentId TileKind)) -> Area -> TileMapEM -> Rnd TileMap Source #

buildTileMap :: COps -> Cave -> Rnd TileMap Source #

anchorDown :: Y Source #

buildLevel :: COps -> ServerOptions -> LevelId -> ContentId CaveKind -> CaveKind -> Int -> Int -> AbsDepth -> [(Point, Text)] -> Rnd (Level, [(Point, Text)]) Source #

snapToStairList :: Int -> [Point] -> Point -> Either Point Point Source #

placeDownStairs :: Text -> Bool -> ServerOptions -> LevelId -> CaveKind -> Area -> [Point] -> [Point] -> Rnd (Maybe Point) Source #

levelFromCave :: COps -> Cave -> AbsDepth -> TileMap -> ([Point], [Point]) -> [Point] -> Level Source #