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.PickActionM

Contents

- Internal operations

Description

AI procedure for picking the best action for an actor.

Synopsis

- pickAction :: MonadClient m => [(ActorId, Actor)] -> [(ActorId, Actor)] -> ActorId -> Bool -> m RequestTimed
- actionStrategy :: MonadClient m => [(ActorId, Actor)] -> [(ActorId, Actor)] -> LevelId -> ActorId -> Bool -> m (Strategy RequestTimed)
- waitBlockNow :: MonadClientRead m => m (Strategy RequestTimed)
- yellNow :: MonadClientRead m => m (Strategy RequestTimed)
- pickup :: MonadClientRead m => ActorId -> Bool -> m (Strategy RequestTimed)
- equipItems :: MonadClientRead m => ActorId -> m (Strategy RequestTimed)
- yieldUnneeded :: MonadClientRead m => ActorId -> m (Strategy RequestTimed)
- unEquipItems :: MonadClientRead m => ActorId -> m (Strategy RequestTimed)
- groupByEqpSlot :: [(ItemId, ItemFullKit)] -> EnumMap EqpSlot [(ItemId, ItemFullKit)]
- bestByEqpSlot :: DiscoveryBenefit -> [(ItemId, ItemFullKit)] -> [(ItemId, ItemFullKit)] -> [([(Int, (ItemId, ItemFullKit))], [(Int, (ItemId, ItemFullKit))])]
- harmful :: DiscoveryBenefit -> ItemId -> Bool
- meleeBlocker :: MonadClient m => Skills -> ActorId -> m (Strategy RequestTimed)
- meleeAny :: MonadClient m => ActorId -> m (Strategy RequestTimed)
- trigger :: MonadClientRead m => ActorId -> FleeViaStairsOrEscape -> m (Strategy RequestTimed)
- projectItem :: MonadClientRead m => Skills -> ActorId -> m (Strategy RequestTimed)
- data ApplyItemGroup
- applyItem :: MonadClientRead m => Skills -> ActorId -> ApplyItemGroup -> m (Strategy RequestTimed)
- flee :: MonadClient m => Skills -> ActorId -> Bool -> [(Int, Point)] -> m (Strategy RequestTimed)
- displaceFoe :: MonadClientRead m => ActorId -> m (Strategy RequestTimed)
- displaceBlocker :: MonadClientRead m => ActorId -> Bool -> m (Strategy RequestTimed)
- displaceTgt :: MonadClientRead m => ActorId -> Point -> Bool -> m (Strategy RequestTimed)
- chase :: MonadClientRead m => Skills -> ActorId -> Bool -> Bool -> m (Strategy RequestTimed)
- moveTowards :: MonadClientRead m => Skills -> ActorId -> Bool -> Point -> Point -> Bool -> m (Strategy Vector)
- moveOrRunAid :: MonadClientRead m => Skills -> ActorId -> Vector -> m (Maybe RequestTimed)

# Documentation

pickAction :: MonadClient m => [(ActorId, Actor)] -> [(ActorId, Actor)] -> ActorId -> Bool -> m RequestTimed Source #

Pick the most desirable AI ation for the actor.

# Internal operations

actionStrategy :: MonadClient m => [(ActorId, Actor)] -> [(ActorId, Actor)] -> LevelId -> ActorId -> Bool -> m (Strategy RequestTimed) Source #

waitBlockNow :: MonadClientRead m => m (Strategy RequestTimed) Source #

yellNow :: MonadClientRead m => m (Strategy RequestTimed) Source #

pickup :: MonadClientRead m => ActorId -> Bool -> m (Strategy RequestTimed) Source #

equipItems :: MonadClientRead m => ActorId -> m (Strategy RequestTimed) Source #

yieldUnneeded :: MonadClientRead m => ActorId -> m (Strategy RequestTimed) Source #

unEquipItems :: MonadClientRead m => ActorId -> m (Strategy RequestTimed) Source #

groupByEqpSlot :: [(ItemId, ItemFullKit)] -> EnumMap EqpSlot [(ItemId, ItemFullKit)] Source #

bestByEqpSlot :: DiscoveryBenefit -> [(ItemId, ItemFullKit)] -> [(ItemId, ItemFullKit)] -> [([(Int, (ItemId, ItemFullKit))], [(Int, (ItemId, ItemFullKit))])] Source #

harmful :: DiscoveryBenefit -> ItemId -> Bool Source #

meleeBlocker :: MonadClient m => Skills -> ActorId -> m (Strategy RequestTimed) Source #

meleeAny :: MonadClient m => ActorId -> m (Strategy RequestTimed) Source #

trigger :: MonadClientRead m => ActorId -> FleeViaStairsOrEscape -> m (Strategy RequestTimed) Source #

projectItem :: MonadClientRead m => Skills -> ActorId -> m (Strategy RequestTimed) Source #

data ApplyItemGroup Source #

#### Instances

Instances details

Eq ApplyItemGroup Source # |
Instance details Defined in Game.LambdaHack.Client.AI.PickActionM Methods (==) :: ApplyItemGroup -> ApplyItemGroup -> Bool Source # (/=) :: ApplyItemGroup -> ApplyItemGroup -> Bool Source #

applyItem :: MonadClientRead m => Skills -> ActorId -> ApplyItemGroup -> m (Strategy RequestTimed) Source #

flee :: MonadClient m => Skills -> ActorId -> Bool -> [(Int, Point)] -> m (Strategy RequestTimed) Source #

displaceFoe :: MonadClientRead m => ActorId -> m (Strategy RequestTimed) Source #

displaceBlocker :: MonadClientRead m => ActorId -> Bool -> m (Strategy RequestTimed) Source #

displaceTgt :: MonadClientRead m => ActorId -> Point -> Bool -> m (Strategy RequestTimed) Source #

chase :: MonadClientRead m => Skills -> ActorId -> Bool -> Bool -> m (Strategy RequestTimed) Source #

moveTowards :: MonadClientRead m => Skills -> ActorId -> Bool -> Point -> Point -> Bool -> m (Strategy Vector) Source #

moveOrRunAid :: MonadClientRead m => Skills -> ActorId -> Vector -> m (Maybe RequestTimed) Source #