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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.AI.ConditionM

Description

Semantics of abilities in terms of actions and the AI procedure for picking the best action for an actor.

Synopsis

Documentation

condAimEnemyPresentM :: MonadClient m => ActorId -> m Bool Source #

Require that the target enemy is visible by the party.

condAimEnemyRememberedM :: MonadClient m => ActorId -> m Bool Source #

Require that the target enemy is remembered on the actor's level.

condTgtNonmovingM :: MonadClient m => ActorId -> m Bool Source #

Check if the target is nonmoving.

condAnyFoeAdjM :: MonadStateRead m => ActorId -> m Bool Source #

Require that any non-dying foe is adjacent, except projectiles that (possibly) explode upon contact.

condAdjTriggerableM :: MonadStateRead m => ActorId -> m Bool Source #

Require the actor stands adjacent to a triggerable tile (e.g., stairs).

condBlocksFriendsM :: MonadClient m => ActorId -> m Bool Source #

Require the actor blocks the paths of any of his party members.

condFloorWeaponM :: MonadClient m => ActorId -> m Bool Source #

Require the actor stands over a weapon that would be auto-equipped.

condNoEqpWeaponM :: MonadClient m => ActorId -> m Bool Source #

Check whether the actor has no weapon in equipment.

condCanProjectM :: MonadClient m => Int -> ActorId -> m Bool Source #

Require that the actor can project any items.

condDesirableFloorItemM :: MonadClient m => ActorId -> m Bool Source #

Require that the actor stands over a desirable item.

benAvailableItems :: MonadClient m => ActorId -> [CStore] -> m [(Maybe Benefit, CStore, ItemId, ItemFull)] Source #

Produce the list of items with a given property available to the actor and the items' values.

benGroundItems :: MonadClient m => ActorId -> m [(Maybe Benefit, CStore, ItemId, ItemFull)] Source #

Produce the list of items on the ground beneath the actor that are worth picking up.

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

Produce the chess-distance-sorted list of non-low-HP, melee-cabable foes on the level. We don't consider path-distance, because we are interested in how soon the foe can close in to hit us, which can diverge greately from path distance for short distances, e.g., when terrain gets revealed. We don't consider non-moving actors, because they can't chase us and also because they can't be aggresive so to resolve the stalemate, the opposing AI has to be aggresive by ignoring them and then when melee is started, it's usually too late to retreat.

condShineWouldBetrayM :: MonadClient m => ActorId -> m Bool Source #

Require that the actor stands in the dark and so would be betrayed by his own equipped light,

fleeList :: MonadClient m => ActorId -> m ([(Int, Point)], [(Int, Point)]) Source #

Produce a list of acceptable adjacent points to flee to.