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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.BfsClient

Description

Breadth first search and realted algorithms using the client monad.

Synopsis

Documentation

getCacheBfsAndPath :: forall m. MonadClient m => ActorId -> Point -> m (Array BfsDistance, Maybe [Point]) Source

Get cached BFS data and path or, if not stored, generate, store and return. Due to laziness, they are not calculated until needed.

closestUnknown :: MonadClient m => ActorId -> m (Maybe Point) Source

Closest reachable unknown tile position, if any.

closestSuspect :: MonadClient m => ActorId -> m [Point] Source

Closest (wrt paths) suspect tile.

closestSmell :: MonadClient m => ActorId -> m [(Int, (Point, SmellTime))] Source

Finds smells closest to the actor, except under the actor.

furthestKnown :: MonadClient m => ActorId -> m Point Source

Furthest (wrt paths) known position.

closestTriggers :: MonadClient m => Maybe Bool -> ActorId -> m (Frequency Point) Source

Closest (wrt paths) triggerable open tiles. The level the actor is on is either explored or the actor already has a weapon equipped, so no need to explore further, he tries to find enemies on other levels.

closestItems :: MonadClient m => ActorId -> m [(Int, (Point, Maybe ItemBag))] Source

Closest (wrt paths) items and changeable tiles (e.g., item caches).

closestFoes :: MonadClient m => [(ActorId, Actor)] -> ActorId -> m [(Int, (ActorId, Actor))] Source

Closest (wrt paths) enemy actors.