effectAmount beta
Function of @v12-engine/engine
ts
export declare function effectAmount(context: EffectContext, effect: EffectDef, target?: Entity, power?: number): number;How much an effect of damage, heal or a shield (buff) comes to for one target as it lands: its amount (a number, one per level, or code), with what the caster's stats add (scaling), times power (the caster's heal and shield power, for those), the share a bouncing missile has left (EffectContext.share) and how full it was held (EffectContext.held, by HoldDef.scale); then for the target, what its formulas add: a part of what it lacks (byMissingHealth), of its max health (byMaxHealth), of its health now (byCurrentHealth), so much for each stack of a buff (byStacks), parts of its stats (targetScaling); and all of that times what the distance makes of it (byDistance). A game's own effect with an amount calls it too