LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone




Hacks that haven't found their home yet.


Game object identifiers

data FactionId Source

A unique identifier of a faction in a game.

data LevelId Source

Abstract level identifiers.

newtype AbsDepth Source

Absolute depth in the dungeon. When used for the maximum depth of the whole dungeon, this can be different than dungeon size, e.g., when the dungeon is branched, and it can even be different than the length of the longest branch, if levels at some depths are missing.


AbsDepth Int 

data ActorId Source

A unique identifier of an actor in the dungeon.

Item containers

data Container Source

Item container type.


CFloor !LevelId !Point 
CActor !ActorId !CStore 
CTrunk !FactionId !LevelId !Point

for bootstrapping actor bodies


normalLevelBound :: (Int, Int)Source

Level bounds. TODO: query terminal size instead and scroll view.

divUp :: Integral a => a -> a -> aSource

Integer division, rounding up.

type Freqs = [(GroupName, Int)]Source

For each group that the kind belongs to, denoted by a GroupName in the first component of a pair, the second component of a pair shows how common the kind is within the group.

breturn :: MonadPlus m => Bool -> a -> m aSource

breturn b a = [a | b]

type Rarity = [(Int, Int)]Source

Rarity on given depths.