> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/items/code-examples.md).

# 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.

<pre><code><strong>// This ignores the proficiency value and only handles the "value" value.
</strong><strong>var damage = itemObject.GetEffectOn(Properties.Stats.MainStats.DamageUid).Item1;
</strong>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}");
</code></pre>
