LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone




Game action monads and basic building blocks for human and computer player actions. Has no access to the the main action type. Does not export the liftIO operation nor a few other implementation details.


The server monad

Assorted primitives

dumpRngs :: MonadServer m => m () Source

Dumps RNG states from the start of the game to stderr.

restoreScore :: MonadServer m => COps -> m ScoreDict Source

Read the high scores dictionary. Return the empty table if no file.

registerScore :: MonadServer m => Status -> Maybe Actor -> FactionId -> m () Source

Generate a new score, register it and save.

speedupCOps :: Bool -> COps -> COps Source

Compute and insert auxiliary optimized components into game content, to be used in time-critical sections of the code.

rndToAction :: MonadServer m => Rnd a -> m a Source

Invoke pseudo-random computation with the generator kept in the state.

getSetGen :: MonadServer m => Maybe StdGen -> m StdGen Source

Gets a random generator from the arguments or, if not present, generates one.