LambdaHack- A game engine library for roguelike dungeon crawlers

Safe HaskellNone



Actor preferences for targets and actions based on actor attributes.



totalUsefulness :: COps -> Actor -> [ItemFull] -> Faction -> ItemFull -> Maybe (Int, (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 -> IntSource

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.