LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone




Ways for the client to use AI to produce server requests, based on the client's view of the game state.



queryAI :: MonadClient m => ActorId -> m RequestAI Source #

Handle the move of an actor under AI control (regardless if the whole faction is under human or computer control).

Internal operations

pickActorAndAction :: MonadClient m => Maybe (ActorId, RequestAnyAbility) -> ActorId -> m (ActorId, RequestAnyAbility) Source #

Pick an actor to move and an action for him to perform, given an optional previous candidate actor and action and the server-proposed actor.

udpdateCondInMelee :: MonadClient m => ActorId -> m () Source #

Check if any non-dying foe (projectile or not) is adjacent to any of our normal actors (whether they can melee or just need to flee, in which case alert is needed so that they are not slowed down by others) and record this per-level. This is needed only by AI and computed as lazily as possible before each round of AI deliberations.