LambdaHack-0.2.12: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Content.TileKind

Description

The type of kinds of terrain tiles.

Synopsis

Documentation

data TileKind Source

The type of kinds of terrain tiles. See Tile.hs for explanation of the absence of a corresponding type Tile that would hold particular concrete tiles in the dungeon.

Constructors

TileKind 

Fields

tsymbol :: !Char

map symbol

tname :: !Text

short description

tfreq :: !Freqs

frequency within groups

tcolor :: !Color

map color

tcolor2 :: !Color

map color when not in FOV

tfeature :: ![Feature]

properties

Instances

validateTileKind :: [TileKind] -> [TileKind]Source

Filter a list of kinds, passing through only the incorrect ones, if any.

If tiles look the same on the map, the description and the substantial features should be the same, too. Otherwise, the player has to inspect manually all the tiles of that kind, or even experiment with them, to see if any is special. This would be tedious. Note that iiles may freely differ wrt dungeon generation, AI preferences, etc.

actionFeatures :: Bool -> TileKind -> Set FeatureSource

Features of tiles that differentiate them substantially from one another. By tile contents validation condition, this means the player can tell such tile apart, and only looking at the map, not tile name. So if running uses this function, it won't stop at places that the player can't himself tell from other places, and so running does not confer any advantages, except UI convenience.