LambdaHack-0.4.100.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.PlaceKind

Description

The type of kinds of rooms, halls and passages.

Synopsis

Documentation

data PlaceKind Source

Parameters for the generation of small areas within a dungeon level.

Constructors

PlaceKind 

Fields

psymbol :: !Char

a symbol

pname :: !T.Text

short description

pfreq :: !(Freqs PlaceKind)

frequency within groups

prarity :: !Rarity

rarity on given depths

pcover :: !Cover

how to fill whole place based on the corner

pfence :: !Fence

whether to fence place with solid border

ptopLeft :: ![T.Text]

plan of the top-left corner of the place

poverride :: ![(Char, GroupName TileKind)]

legend override

Instances

data Cover Source

A method of filling the whole area (except for CVerbatim, which is just placed in the middle of the area) by transforming a given corner.

Constructors

CAlternate

reflect every other corner, overlapping 1 row and column

CStretch

fill symmetrically 4 corners and stretch their borders

CReflect

tile separately and symmetrically quarters of the place

CVerbatim

just build the given interior, without filling the area

Instances

data Fence Source

The choice of a fence type for the place.

Constructors

FWall

put a solid wall fence around the place

FFloor

leave an empty space, like the rooms floor

FGround

leave an empty space, like the caves ground

FNone

skip the fence and fill all with the place proper

Instances

validateSinglePlaceKind :: PlaceKind -> [T.Text] Source

Catch invalid place kind definitions. In particular, verify that the top-left corner map is rectangular and not empty.

validateAllPlaceKind :: [PlaceKind] -> [T.Text] Source

Validate all place kinds. Currently always valid.