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

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.CommonM

Description

Common client monad operations.

Synopsis

- getPerFid :: MonadClientRead m => LevelId -> m Perception
- aidTgtToPos :: Maybe ActorId -> LevelId -> Maybe Target -> State -> Maybe Point
- makeLine :: Bool -> Actor -> Point -> Int -> COps -> Level -> Maybe Int
- currentSkillsClient :: MonadClientRead m => ActorId -> m Skills
- pickWeaponClient :: MonadClient m => ActorId -> ActorId -> m (Maybe RequestTimed)
- updateSalter :: MonadClient m => LevelId -> [(Point, ContentId TileKind)] -> m ()
- createSalter :: State -> AlterLid

# Documentation

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

Get the current perception of a client.

aidTgtToPos :: Maybe ActorId -> LevelId -> Maybe Target -> State -> Maybe Point Source #

Calculate the position of an actor's target. This matches `pathGoal`, but sometimes path is not defined.

makeLine :: Bool -> Actor -> Point -> Int -> COps -> Level -> Maybe Int Source #

Counts the number of steps until the projectile would hit a non-projectile 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. Treats unknown tiles as walkable, but prefers known.

currentSkillsClient :: MonadClientRead m => ActorId -> m Skills Source #

pickWeaponClient :: MonadClient m => ActorId -> ActorId -> m (Maybe RequestTimed) Source #

updateSalter :: MonadClient m => LevelId -> [(Point, ContentId TileKind)] -> m () Source #

createSalter :: State -> AlterLid Source #