Interface UpgradeModifier<T>
- Type Parameters:
T- the type of the skill parameter being modified
- All Known Implementing Classes:
UpgradeBooleanModifier,UpgradeEnumModifier,UpgradeIntegerModifier,UpgradeNumberModifier
public interface UpgradeModifier<T>
A typed modifier that transforms a skill parameter value when a skilltree upgrade is applied.
Skill parameters (damage, chance, range, etc.) are stored as simple values and modified
at each level-up according to the skilltree's configured upgrade rules. Each
UpgradeModifier encapsulates both the modifier's own value and the logic to
combine it with the current parameter value.
Implementations include:
UpgradeNumberModifier-- add/subtract aNumberUpgradeIntegerModifier-- add/subtract anInteger(avoids floating-point)UpgradeBooleanModifier-- replaces the value withtrueorfalseUpgradeEnumModifier-- replaces the value with a specific enum constant
-
Method Summary
-
Method Details
-
value
T value()Returns the raw modifier value carried by this instance.- Returns:
- the value this modifier applies
-
modify
Applies this modifier to the given current value, producing an updated result.- Parameters:
value- the current parameter value before modification- Returns:
- the modified parameter value
-