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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.CommonM

Contents

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.

projectFail Source #

Arguments

:: MonadServerAtomic m 
=> ActorId

actor projecting the item (is on current lvl)

-> Point

target position of the projectile

-> Int

digital line parameter

-> Bool

whether to start at the source position

-> ItemId

the item to be projected

-> CStore

whether the items comes from floor or inventory

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

whether the items comes from floor or inventory

-> Bool

whether the item is a blast

-> m ()