diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-13 11:06:46 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-13 11:06:46 -0300 |
| commit | 539fd4820f37aa54df8878091db9680d89ee027a (patch) | |
| tree | 41f9f5d6aa123058e3549c1baba4155fa5a85279 /scripts/Magic/DamageEffect.cs | |
| parent | b8962990ddb75b874a49c83d8eeaba7b7e45c196 (diff) | |
pergaminho
Diffstat (limited to 'scripts/Magic/DamageEffect.cs')
| -rw-r--r-- | scripts/Magic/DamageEffect.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/Magic/DamageEffect.cs b/scripts/Magic/DamageEffect.cs new file mode 100644 index 0000000..abd2cca --- /dev/null +++ b/scripts/Magic/DamageEffect.cs @@ -0,0 +1,18 @@ +using Godot; +using TheLegendOfGustav.Entities.Actors; + +namespace TheLegendOfGustav.Magic; + +[GlobalClass] +public partial class DamageEffect : SpellEffect +{ + [Export] + public int Damage { get; set; } + + public override void Apply(Actor caster, Actor target) + { + int damageDealt = Damage - target.Men; + + target.Hp -= damageDealt; + } +}
\ No newline at end of file |
