LambdaHack-0.2.14: A roguelike game engine in early development

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.PeriodicServer

Description

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

Synopsis

Documentation

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).