LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone



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



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

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