LambdaHack-0.8.1.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.PeriodicM

Contents

Description

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

Synopsis

Documentation

spawnMonster :: MonadServerAtomic m => m () Source #

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

advanceTime :: MonadServerAtomic m => ActorId -> Int -> Bool -> m () Source #

Advance the move time for the given actor.

overheadActorTime :: MonadServerAtomic m => FactionId -> LevelId -> m () Source #

Add communication overhead time delta to all non-projectile, non-dying faction's actors, except the leader. Effectively, this limits moves of a faction on a level to 10, regardless of the number of actors and their speeds. To avoid animals suddenly acting extremely sluggish whenever monster's leader visits a distant arena that has a crowd of animals, overhead applies only to actors on the same level. Since the number of active levels is limited, this bounds the total moves per turn of each faction as well.

Leader is immune from overhead and so he is faster than other faction members and of equal speed to leaders of other factions (of equal base speed) regardless how numerous the faction is. Thanks to this, there is no problem with leader of a numerous faction having very long UI turns, introducing UI lag.

swapTime :: MonadServerAtomic m => ActorId -> ActorId -> m () Source #

Swap the relative move times of two actors (e.g., when switching a UI leader).

Internal operations