Code Examples


Getting the impact on Stats

If you want to get the impact on stats, you can use the GetEffectOn() method, which returns (float, float), for the value and proficiency effect. This is useful for displaying the full information about a GameItemObject, such as damage, or other stat effects.
// This ignores the proficiency value and only handles the "value" value.
var damage = itemObject.GetEffectOn(Properties.Stats.MainStats.DamageUid).Item1;
var attack = itemObject.GetEffectOn(Properties.Stats.MainStats.AttackUid).Item1;
// This uses both
var damageEffect = itemObject.GetEffectOn(Properties.Stats.MainStats.DamageUid);
Debug.Log($"Damage value is {damageEffect.Item1} and proficiency is {damageEffect.Item2}");