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

Safe HaskellNone



The type of game rule sets and assorted game data.



data RuleKind Source

The type of game rule sets and assorted game data.

For now the rules are immutable througout the game, so there is no type Rule to hold any changing parameters, just RuleKind for the fixed set. However, in the future, if the rules can get changed during gameplay based on data mining of player behaviour, we may add such a type and then RuleKind will become just a starting template, analogously as for the other content.

The raccessible field holds a predicate that tells whether one location is accessible from another. Precondition: the two locations are next to each other.




rsymbol :: Char

a symbol

rname :: String

short description

rfreq :: Freqs

frequency within groups

raccessible :: X -> Point -> TileKind -> Point -> TileKind -> Bool
rtitle :: String

the title of the game

rpathsDataFile :: FilePath -> IO FilePath

the path to data files

rpathsVersion :: Version

the version of the game

ritemMelee :: [Char]

symbols of melee weapons

ritemProject :: [Char]

symbols of items AI can project

rconfigDefault :: String

the default config file of the game

rmainMenuArt :: String

the ASCII art for the Main Menu


Show RuleKind

A dummy instance of the Show class, to satisfy general requirments about content. We won't have many rule sets and they contain functions, so defining a proper instance is not practical.

ruvalidate :: [RuleKind] -> [RuleKind]Source

Validates the ASCII art format (TODO).