summaryrefslogtreecommitdiff
path: root/scripts/Magic/DamageEffect.cs
blob: abd2cca865c38a99628acfd4cb755bd9701a1246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
	}
}