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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.AI.Preferences

Description

Actor preferences for targets and actions based on actor attributes.

Synopsis

Documentation

totalUsefulness :: COps -> Actor -> [ItemFull] -> Faction -> ItemFull -> Maybe (Int, Int) Source

Determine the total benefit from having an item in eqp or inv, according to item type, and also the benefit confered by equipping the item and from meleeing with it or applying it or throwing it.

effectToBenefit :: COps -> Actor -> [ItemFull] -> Faction -> Effect -> Int Source

How much AI benefits from applying the effect. Multipllied by item p. Negative means harm to the enemy when thrown at him. Effects with zero benefit won't ever be used, neither actively nor passively.