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

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.AI.ConditionM

Description

Assorted conditions used later on in AI logic.

Synopsis

- condAimEnemyTargetedM :: MonadClientRead m => ActorId -> m Bool
- condAimEnemyOrStashM :: MonadClientRead m => ActorId -> m Bool
- condAimEnemyOrRememberedM :: MonadClientRead m => ActorId -> m Bool
- condAimNonEnemyPresentM :: MonadClientRead m => ActorId -> m Bool
- condAimCrucialM :: MonadClientRead m => ActorId -> m Bool
- condTgtNonmovingEnemyM :: MonadClientRead m => ActorId -> m Bool
- condAdjTriggerableM :: MonadStateRead m => Skills -> ActorId -> m Bool
- meleeThreatDistList :: [(ActorId, Actor)] -> ActorId -> State -> [(Int, (ActorId, Actor))]
- condBlocksFriendsM :: MonadClientRead m => ActorId -> m Bool
- condFloorWeaponM :: MonadStateRead m => ActorId -> m Bool
- condNoEqpWeaponM :: MonadStateRead m => ActorId -> m Bool
- condCanProjectM :: MonadClientRead m => Int -> ActorId -> m Bool
- condProjectListM :: MonadClientRead m => Int -> ActorId -> m [(Double, CStore, ItemId, ItemFull, ItemQuant)]
- benAvailableItems :: DiscoveryBenefit -> ActorId -> [CStore] -> State -> [(Benefit, CStore, ItemId, ItemFull, ItemQuant)]
- hinders :: Bool -> Bool -> Skills -> ItemFull -> Bool
- condDesirableFloorItemM :: MonadClientRead m => ActorId -> m Bool
- benGroundItems :: MonadClientRead m => ActorId -> m [(Benefit, CStore, ItemId, ItemFull, ItemQuant)]
- desirableItem :: COps -> Bool -> Double -> AspectRecord -> ItemKind -> Int -> Bool
- condSupport :: MonadClientRead m => [(ActorId, Actor)] -> Int -> ActorId -> m Bool
- condAloneM :: MonadStateRead m => [(ActorId, Actor)] -> ActorId -> m Bool
- condShineWouldBetrayM :: MonadStateRead m => ActorId -> m Bool
- fleeList :: MonadClientRead m => [(ActorId, Actor)] -> ActorId -> m ([(Int, Point)], [(Int, Point)])

# Documentation

condAimEnemyTargetedM :: MonadClientRead m => ActorId -> m Bool Source #

Require that a target enemy is visible by the party.

condAimEnemyOrStashM :: MonadClientRead m => ActorId -> m Bool Source #

Require that a target enemy or enemy stash is visible by the party.

condAimEnemyOrRememberedM :: MonadClientRead m => ActorId -> m Bool Source #

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

condAimNonEnemyPresentM :: MonadClientRead m => ActorId -> m Bool Source #

Require that a target non-enemy is visible by the party.

condAimCrucialM :: MonadClientRead m => ActorId -> m Bool Source #

Require that the target is crucial to success, e.g., an item, or that it's not too far away and so the changes to get it are high.

condTgtNonmovingEnemyM :: MonadClientRead m => ActorId -> m Bool Source #

Check if the target is a nonmoving enemy.

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

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

meleeThreatDistList :: [(ActorId, Actor)] -> ActorId -> State -> [(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 closing in to melee distance.

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

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

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

Require the actor stands over a weapon that would be auto-equipped, if only it was a desirable item (checked elsewhere).

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

Check whether the actor has no weapon in equipment.

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

Require that the actor can project any items.

condProjectListM :: MonadClientRead m => Int -> ActorId -> m [(Double, CStore, ItemId, ItemFull, ItemQuant)] Source #

benAvailableItems :: DiscoveryBenefit -> ActorId -> [CStore] -> State -> [(Benefit, CStore, ItemId, ItemFull, ItemQuant)] Source #

Produce the list of items from the given stores available to the actor and the items' values.

hinders :: Bool -> Bool -> Skills -> ItemFull -> Bool Source #

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

Require that the actor stands over a desirable item.

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

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

desirableItem :: COps -> Bool -> Double -> AspectRecord -> ItemKind -> Int -> Bool Source #

condSupport :: MonadClientRead m => [(ActorId, Actor)] -> Int -> ActorId -> m Bool Source #

condAloneM :: MonadStateRead m => [(ActorId, Actor)] -> ActorId -> m Bool Source #

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

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

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

Produce a list of acceptable adjacent points to flee to.