Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of cave kinds. Every level in the game is an instantiated cave kind.
Synopsis
- pattern DEFAULT_RANDOM :: GroupName CaveKind
- data CaveKind = CaveKind {
- csymbol :: Char
- cname :: Text
- cfreq :: Freqs CaveKind
- cXminSize :: X
- cYminSize :: Y
- ccellSize :: DiceXY
- cminPlaceSize :: DiceXY
- cmaxPlaceSize :: DiceXY
- cdarkOdds :: Dice
- cnightOdds :: Dice
- cauxConnects :: Rational
- cmaxVoid :: Rational
- cdoorChance :: Chance
- copenChance :: Chance
- chidden :: Int
- cactorCoeff :: Int
- cactorFreq :: Freqs ItemKind
- citemNum :: Dice
- citemFreq :: Freqs ItemKind
- cplaceFreq :: Freqs PlaceKind
- cpassable :: Bool
- labyrinth :: Bool
- cdefTile :: GroupName TileKind
- cdarkCorTile :: GroupName TileKind
- clitCorTile :: GroupName TileKind
- cwallTile :: GroupName TileKind
- ccornerTile :: GroupName TileKind
- cfenceTileN :: GroupName TileKind
- cfenceTileE :: GroupName TileKind
- cfenceTileS :: GroupName TileKind
- cfenceTileW :: GroupName TileKind
- cfenceApart :: Bool
- cminStairDist :: Int
- cmaxStairsNum :: Dice
- cescapeFreq :: Freqs PlaceKind
- cstairFreq :: Freqs PlaceKind
- cstairAllowed :: Freqs PlaceKind
- cskip :: [Int]
- cdesc :: Text
- makeData :: [CaveKind] -> [GroupName CaveKind] -> [GroupName CaveKind] -> ContentData CaveKind
- validateSingle :: CaveKind -> [Text]
- validateAll :: [CaveKind] -> ContentData CaveKind -> [Text]
- mandatoryGroups :: [GroupName CaveKind]
Documentation
pattern DEFAULT_RANDOM :: GroupName CaveKind Source #
Parameters for the generation of dungeon levels. Warning: for efficiency, avoid embedded items in any of the common tiles.
CaveKind | |
|
makeData :: [CaveKind] -> [GroupName CaveKind] -> [GroupName CaveKind] -> ContentData CaveKind Source #
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 :: [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.