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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.AI.HandleAbilityM

Contents

Description

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

Synopsis

Documentation

actionStrategy :: forall m. MonadClient m => ActorId -> Bool -> m (Strategy RequestAnyAbility) Source #

AI strategy based on actor's sight, smell, etc. Never empty.

Internal operations

waitBlockNow :: MonadClient m => m (Strategy (RequestTimed AbWait)) Source #

A strategy to always just wait.

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

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. We don't verify any embedded item is targeted by the actor, but at least the actor doesn't target a visible enemy at this point.

moveOrRunAid :: MonadClient m => ActorId -> Vector -> m (Maybe RequestAnyAbility) Source #

Actor moves or searches or alters or attacks. This function is very general, even though it's often used in contexts when only one or two of the many cases can possibly occur.