LambdaHack-0.4.99.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone

Game.LambdaHack.Server.MonadServer

Contents

Description

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.

Synopsis

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 ScoreTableSource

Read the high scores table. 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 -> COpsSource

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 aSource

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

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

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