LambdaHack-0.10.2.0: A game engine library for tactical squad ASCII roguelike dungeon crawlers
Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.CommonM

Description

Server operations common to many modules.

Synopsis

Documentation

generalMoveItem :: MonadStateRead m => Bool -> ItemId -> Int -> Container -> Container -> m [UpdAtomic] Source #

Generate the atomic updates that jointly perform a given item move.

writeSaveAll :: MonadServerAtomic m => Bool -> Bool -> m () Source #

Save game on server and all clients.

projectFail Source #

Arguments

:: MonadServerAtomic m 
=> ActorId

actor causing the projection

-> ActorId

actor projecting the item (is on current level)

-> Point

starting position of the projectile; usually, but not always, position of origin

-> Point

target position of the projectile

-> Int

digital line parameter

-> Bool

whether to start at the origin's position

-> ItemId

the item to be projected

-> CStore

which store the items comes from

-> Bool

whether the item is a blast

-> m (Maybe ReqFailure) 

Internal operations

keepArenaFact :: Faction -> Bool Source #

Tell whether a faction that we know is still in game, keeps arena. Keeping arena means, if the faction is still in game, it always has a leader in the dungeon somewhere. So, leaderless factions and spawner factions do not keep an arena, even though the latter usually has a leader for most of the game.

projectBla Source #

Arguments

:: MonadServerAtomic m 
=> ActorId

actor causing the projection

-> ActorId

actor projecting the item (is on current lvl)

-> Point

starting point of the projectile

-> [Point]

rest of the trajectory of the projectile

-> ItemId

the item to be projected

-> CStore

which store the items comes from

-> Bool

whether the item is a blast

-> m ()