Interface IScalingFormula
- Namespace
- ElectricDrill.AstraRpgFramework.Scaling
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Defines the contract for evaluating a scaling formula against one or two entities.
Implementations include:
- ScalingFormula – a shared
ScriptableObjectasset with no per-entity state. - ScalingFormulaInstance – a per-entity runtime wrapper that supports temporary scaling components without affecting other entities that reference the same ScalingFormula.
public interface IScalingFormula
Methods
CalculateValue(EntityCore)
Calculates the final value using only the "self" entity. Assumes the formula has no target-scaling components and uses a fixed base value.
long CalculateValue(EntityCore self)
Parameters
selfEntityCore
Returns
- long
CalculateValue(EntityCore, EntityCore)
Calculates the final value using both "self" and "target" entities. Assumes the formula uses a fixed base value.
long CalculateValue(EntityCore self, EntityCore target)
Parameters
selfEntityCoretargetEntityCore
Returns
- long
CalculateValue(EntityCore, EntityCore, int)
Calculates the final value using both "self" and "target" entities and a specific level for the base value. Assumes the formula uses a growth-based base value.
long CalculateValue(EntityCore self, EntityCore target, int level)
Parameters
selfEntityCoretargetEntityCorelevelint
Returns
- long
CalculateValue(EntityCore, int)
Calculates the final value using only the "self" entity and a specific level for the base value. Assumes the formula has no target-scaling components and uses a growth-based base value.
long CalculateValue(EntityCore self, int level)
Parameters
selfEntityCorelevelint
Returns
- long