LambdaHack-0.2.14: A roguelike game engine in early development

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Server.HandleEffectServer

Description

Handle effects (most often caused by requests sent by clients).

Synopsis

Documentation

itemEffect :: (MonadAtomic m, MonadServer m) => ActorId -> ActorId -> ItemId -> ItemFull -> Bool -> Bool -> m Bool Source

The source actor affects the target actor, with a given item. If any of the effect effect fires up, the item gets identified. This function is mutually recursive with effect and so it's a part of Effect semantics.

dropEqpItem :: (MonadAtomic m, MonadServer m) => ActorId -> Actor -> Bool -> ItemId -> Int -> m () Source

Drop a single actor's item. Note that if there multiple copies, at most one explodes to avoid excessive carnage and UI clutter (let's say, the multiple explosions interfere with each other or perhaps larger quantities of explosives tend to be packaged more safely).