LambdaHack-0.6.1.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.CommonM

Description

Common client monad operations.

Synopsis

Documentation

getPerFid :: MonadClient m => LevelId -> m Perception Source #

Get the current perception of a client.

aidTgtToPos :: MonadClient m => ActorId -> LevelId -> Target -> m (Maybe Point) Source #

Calculate the position of an actor's target.

makeLine :: MonadClient m => Bool -> Actor -> Point -> Int -> m (Maybe Int) Source #

Counts the number of steps until the projectile would hit an actor or obstacle. Starts searching with the given eps and returns the first found eps for which the number reaches the distance between actor and target position, or Nothing if none can be found.