diff options
Diffstat (limited to 'scripts/Entities/Items/GrimoireItemActivation.cs')
| -rw-r--r-- | scripts/Entities/Items/GrimoireItemActivation.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/Entities/Items/GrimoireItemActivation.cs b/scripts/Entities/Items/GrimoireItemActivation.cs new file mode 100644 index 0000000..34c136f --- /dev/null +++ b/scripts/Entities/Items/GrimoireItemActivation.cs @@ -0,0 +1,19 @@ +using Godot; +using TheLegendOfGustav.Entities.Actors; +using TheLegendOfGustav.Magic; + +/// <summary> +/// Aplica um efeito de feitiço ao usuário. +/// </summary> +[GlobalClass] +public partial class GrimoireItemActivation : ItemActivation +{ + [Export] + SpellResource spell; + + public override bool OnActivation(Player consumer) + { + consumer.SpellBook.LearnSpell(spell); + return true; + } +}
\ No newline at end of file |
