| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Client.AI.ConditionM
Description
Assorted conditions used later on in AI logic.
Synopsis
- condAimEnemyPresentM :: MonadClient m => ActorId -> m Bool
- condAimEnemyRememberedM :: MonadClient m => ActorId -> m Bool
- condTgtNonmovingM :: MonadClient m => ActorId -> m Bool
- condAnyFoeAdjM :: MonadStateRead m => ActorId -> m Bool
- condAdjTriggerableM :: MonadStateRead m => ActorId -> m Bool
- meleeThreatDistList :: ActorId -> State -> [(Int, (ActorId, Actor))]
- condBlocksFriendsM :: MonadClient m => ActorId -> m Bool
- condFloorWeaponM :: MonadStateRead m => ActorId -> m Bool
- condNoEqpWeaponM :: MonadStateRead m => ActorId -> m Bool
- condCanProjectM :: MonadClient m => Int -> ActorId -> m Bool
- condProjectListM :: MonadClient m => Int -> ActorId -> m [(Benefit, CStore, ItemId, ItemFull, ItemQuant)]
- benAvailableItems :: DiscoveryBenefit -> ActorId -> [CStore] -> State -> [(Benefit, CStore, ItemId, ItemFull, ItemQuant)]
- hinders :: Bool -> Bool -> Bool -> Bool -> AspectRecord -> ItemFull -> Bool
- condDesirableFloorItemM :: MonadClient m => ActorId -> m Bool
- benGroundItems :: MonadClient m => ActorId -> m [(Benefit, CStore, ItemId, ItemFull, ItemQuant)]
- desirableItem :: Bool -> Double -> ItemKind -> Bool
- condSupport :: MonadClient m => Int -> ActorId -> m Bool
- condSoloM :: MonadClient m => ActorId -> m Bool
- condShineWouldBetrayM :: MonadStateRead m => ActorId -> m Bool
- fleeList :: MonadClient m => ActorId -> m ([(Int, Point)], [(Int, Point)])
Documentation
condAimEnemyPresentM :: MonadClient m => ActorId -> m Bool #
Require that the target enemy is visible by the party.
condAimEnemyRememberedM :: MonadClient m => ActorId -> m Bool #
Require that the target enemy is remembered on the actor's level.
condTgtNonmovingM :: MonadClient m => ActorId -> m Bool #
Check if the target is nonmoving.
condAnyFoeAdjM :: MonadStateRead m => ActorId -> m Bool #
Require that any non-dying foe is adjacent, except projectiles that (possibly) explode upon contact.
condAdjTriggerableM :: MonadStateRead m => ActorId -> m Bool #
Require the actor stands adjacent to a triggerable tile (e.g., stairs).
meleeThreatDistList :: ActorId -> State -> [(Int, (ActorId, Actor))] #
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 :: MonadClient m => ActorId -> m Bool #
Require the actor blocks the paths of any of his party members.
condFloorWeaponM :: MonadStateRead m => ActorId -> m Bool #
Require the actor stands over a weapon that would be auto-equipped.
condNoEqpWeaponM :: MonadStateRead m => ActorId -> m Bool #
Check whether the actor has no weapon in equipment.
condCanProjectM :: MonadClient m => Int -> ActorId -> m Bool #
Require that the actor can project any items.
condProjectListM :: MonadClient m => Int -> ActorId -> m [(Benefit, CStore, ItemId, ItemFull, ItemQuant)] #
benAvailableItems :: DiscoveryBenefit -> ActorId -> [CStore] -> State -> [(Benefit, CStore, ItemId, ItemFull, ItemQuant)] #
Produce the list of items with a given property available to the actor and the items' values.
condDesirableFloorItemM :: MonadClient m => ActorId -> m Bool #
Require that the actor stands over a desirable item.
benGroundItems :: MonadClient m => ActorId -> m [(Benefit, CStore, ItemId, ItemFull, ItemQuant)] #
Produce the list of items on the ground beneath the actor that are worth picking up.
condSupport :: MonadClient m => Int -> ActorId -> m Bool #
condSoloM :: MonadClient m => ActorId -> m Bool #
condShineWouldBetrayM :: MonadStateRead m => ActorId -> m Bool #
Require that the actor stands in the dark and so would be betrayed by his own equipped light,