LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone




Server types and operations for items that don't involve server state nor our custom monads.



type ItemRev = HashMap ItemKnown ItemId Source

Reverse item map, for item creation, to keep items and item identifiers in bijection.

buildItem :: FlavourMap -> DiscoveryKindRev -> Id ItemKind -> ItemKind -> LevelId -> Item Source

Build an item with the given stats.

Item discovery types

type DiscoveryKindRev = EnumMap (Id ItemKind) ItemKindIx Source

The reverse map to DiscoveryKind, needed for item creation.

type ItemSeedDict = EnumMap ItemId ItemSeed Source

The map of item ids to item seeds, needed for item creation.

The FlavourMap type

data FlavourMap Source

Flavours assigned by the server to item kinds, in this particular game.

dungeonFlavourMap :: COps -> Rnd FlavourMap Source

Randomly chooses flavour for all item kinds for this game.