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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.TileKind

Contents

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. Note that tile names (and any other content names) should not be plural (that would lead to "a stairs"), so "road with cobblestones" is fine, but "granite cobblestones" is wrong.

Tile kind for unknown space has the minimal ContentId index. The talter for unknown space is 1 and no other tile kind has that value.

Constructors

TileKind 

Fields

Instances
Show TileKind Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

data Feature Source #

All possible terrain tile features.

Constructors

Embed (GroupName ItemKind)

initially an item of this group is embedded; we assume the item has effects and is supposed to be triggered

OpenTo (GroupName TileKind)

goes from a closed to (randomly closed or) open tile when altered

CloseTo (GroupName TileKind)

goes from an open to (randomly opened or) closed tile when altered

ChangeTo (GroupName TileKind)

alters tile, but does not change walkability

HideAs (GroupName TileKind)

when hidden, looks as the unique tile of the group

BuildAs (GroupName TileKind)

when generating, may be transformed to the unique tile of the group

RevealAs (GroupName TileKind)

when generating in opening, can be revealed to belong to the group

ObscureAs (GroupName TileKind)

when generating in solid wall, can be revealed to belong to the group

Walkable

actors can walk through

Clear

actors can see through

Dark

is not lit with an ambient light

OftenItem

initial items often generated there

VeryOftenItem

initial items very often generated there

OftenActor

initial actors often generated there

NoItem

no items ever generated there

NoActor

no actors ever generated there

ConsideredByAI

even if otherwise uninteresting, taken into account for triggering by AI

Trail

used for visible trails throughout the level

Spice

in place normal legend and in override, don't roll a tile kind only once per place, but roll for each position; one non-spicy (according to frequencies of non-spicy) and at most one spicy (according to their frequencies) is rolled per place and then, once for each position, one of the two is semi-randomly chosen (according to their individual frequencies only)

Instances
Eq Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Methods

(==) :: Feature -> Feature -> Bool #

(/=) :: Feature -> Feature -> Bool #

Ord Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Show Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Generic Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Associated Types

type Rep Feature :: Type -> Type #

Methods

from :: Feature -> Rep Feature x #

to :: Rep Feature x -> Feature #

Binary Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Methods

put :: Feature -> Put #

get :: Get Feature #

putList :: [Feature] -> Put #

NFData Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Methods

rnf :: Feature -> () #

Hashable Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

Methods

hashWithSalt :: Int -> Feature -> Int #

hash :: Feature -> Int #

type Rep Feature Source # 
Instance details

Defined in Game.LambdaHack.Content.TileKind

type Rep Feature = D1 (MetaData "Feature" "Game.LambdaHack.Content.TileKind" "LambdaHack-0.9.5.0-inplace" False) ((((C1 (MetaCons "Embed" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName ItemKind))) :+: C1 (MetaCons "OpenTo" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind)))) :+: (C1 (MetaCons "CloseTo" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind))) :+: C1 (MetaCons "ChangeTo" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind))))) :+: ((C1 (MetaCons "HideAs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind))) :+: C1 (MetaCons "BuildAs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind)))) :+: (C1 (MetaCons "RevealAs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind))) :+: (C1 (MetaCons "ObscureAs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (GroupName TileKind))) :+: C1 (MetaCons "Walkable" PrefixI False) (U1 :: Type -> Type))))) :+: (((C1 (MetaCons "Clear" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Dark" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "OftenItem" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "VeryOftenItem" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "OftenActor" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "NoItem" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NoActor" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ConsideredByAI" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Trail" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Spice" PrefixI False) (U1 :: Type -> Type))))))

Internal operations

validateSingle :: TileKind -> [Text] Source #

Validate a single tile kind.

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

Validate all tile kinds.

We don't check it any more, but if tiles look the same on the map (symbol and color), their substantial features should be the same, too, unless there is a good reason they shouldn't. Otherwise the player has to inspect manually all the tiles with this look to see if any is special. This tends to be tedious. Note that tiles may freely differ wrt text blurb, dungeon generation rules, AI preferences, etc., whithout causing the tedium.