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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.Preferences

Contents

Description

Actor preferences for targets and actions based on actor attributes.

Synopsis

Documentation

Internal operations

effectToBenefit :: COps -> Faction -> Effect -> (Int, Int) Source #

How much AI benefits from applying the effect. The first component is benefit when applied to self, the second is benefit (preferably negative) when applied to enemy. This represents benefit from using the effect every avgItemDelay turns, so if the item is not durable, the value is adjusted down elsewhere. The benefit includes the drawback of having to use the actor's turn, except when there is battle and item is a weapon and so there is usually nothing better to do than to melee, or when the actor is stuck or idle or laying in wait or luring an enemy from a safe distance. So there is less than averageTurnValue included in each benefit, so in case when turn is not spent, e.g, periodic or temporary effects, the difference in value is only slight.