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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.CaveKind

Contents

Description

The type of cave kinds.

Synopsis

Documentation

data CaveKind Source #

Parameters for the generation of dungeon levels. Warning: for efficiency, avoid embedded items in any of the common tiles.

Constructors

CaveKind 

Fields

Instances

Show CaveKind Source # 
Generic CaveKind Source # 

Associated Types

type Rep CaveKind :: * -> * #

Methods

from :: CaveKind -> Rep CaveKind x #

to :: Rep CaveKind x -> CaveKind #

NFData CaveKind Source # 

Methods

rnf :: CaveKind -> () #

type Rep CaveKind Source # 
type Rep CaveKind = D1 * (MetaData "CaveKind" "Game.LambdaHack.Content.CaveKind" "LambdaHack-0.8.3.0-jMQ6qf62p5KPR73OiDMqQ" False) (C1 * (MetaCons "CaveKind" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "csymbol") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Char)) (S1 * (MetaSel (Just Symbol "cname") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "cfreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Freqs CaveKind))) (S1 * (MetaSel (Just Symbol "cxsize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * X)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cysize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Y)) (S1 * (MetaSel (Just Symbol "cgrid") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * DiceXY))) ((:*:) * (S1 * (MetaSel (Just Symbol "cminPlaceSize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * DiceXY)) (S1 * (MetaSel (Just Symbol "cmaxPlaceSize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * DiceXY))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cdarkChance") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Dice)) (S1 * (MetaSel (Just Symbol "cnightChance") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Dice))) ((:*:) * (S1 * (MetaSel (Just Symbol "cauxConnects") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Rational)) (S1 * (MetaSel (Just Symbol "cmaxVoid") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Rational)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cminStairDist") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "cextraStairs") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Dice))) ((:*:) * (S1 * (MetaSel (Just Symbol "cdoorChance") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Chance)) (S1 * (MetaSel (Just Symbol "copenChance") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Chance)))))) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "chidden") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "cactorCoeff") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int))) ((:*:) * (S1 * (MetaSel (Just Symbol "cactorFreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Freqs ItemKind))) (S1 * (MetaSel (Just Symbol "citemNum") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Dice)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "citemFreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Freqs ItemKind))) (S1 * (MetaSel (Just Symbol "cplaceFreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Freqs PlaceKind)))) ((:*:) * (S1 * (MetaSel (Just Symbol "cpassable") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "cdefTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind)))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "cdarkCorTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind))) (S1 * (MetaSel (Just Symbol "clitCorTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind)))) ((:*:) * (S1 * (MetaSel (Just Symbol "cfillerTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind))) (S1 * (MetaSel (Just Symbol "couterFenceTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "clegendDarkTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind))) (S1 * (MetaSel (Just Symbol "clegendLitTile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (GroupName TileKind)))) ((:*:) * (S1 * (MetaSel (Just Symbol "cescapeGroup") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Maybe (GroupName PlaceKind)))) ((:*:) * (S1 * (MetaSel (Just Symbol "cstairFreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Freqs PlaceKind))) (S1 * (MetaSel (Just Symbol "cdesc") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Text)))))))))

Internal operations

validateSingle :: CaveKind -> [Text] Source #

Catch caves with not enough space for all the places. Check the size of the cave descriptions to make sure they fit on screen. Etc.

validateAll :: ContentData ItemKind -> ContentData PlaceKind -> ContentData TileKind -> [CaveKind] -> ContentData CaveKind -> [Text] Source #

Validate all cave kinds. Note that names don't have to be unique: we can have several variants of a cave with a given name.