LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone



Server operations performed periodically in the game loop and related operations.



spawnMonster :: (MonadAtomic m, MonadServer m) => LevelId -> m ()Source

Sapwn, possibly, a monster according to the level's actor groups. We assume heroes are never spawned.

advanceTime :: (MonadAtomic m, MonadServer m) => ActorId -> m ()Source

Advance the move time for the given actor, check if he's dominated and update his calm. We don't update calm once per game turn (even though it would make fast actors less overpowered), beucase the effects of close enemies would sometimes manifest only after a couple of player turns (or perhaps never at all, if the player and enemy move away before that moment). A side effect is that under peaceful circumstances, non-max calm cases a consistent regeneration UI indicator to be displayed each turn (not every few turns).