From 2023ac3fa6477142299115b056b4ad380a9a9f7a Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 1 Sep 2025 19:41:25 -0300 Subject: Implementado sistema de ações gratuitas. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/actors/actions/MeleeAction.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/actors/actions/MeleeAction.cs') diff --git a/scripts/actors/actions/MeleeAction.cs b/scripts/actors/actions/MeleeAction.cs index ae94eff..b20430a 100644 --- a/scripts/actors/actions/MeleeAction.cs +++ b/scripts/actors/actions/MeleeAction.cs @@ -14,11 +14,11 @@ public partial class MeleeAction : DirectionalAction /// public override void Perform() { - actor.Energy -= cost; // Eu te disse que este método seria útil. Actor target = GetTargetActor(); // Se não houver um ator na direção, não podemos continuar. + // Isto é uma ação gratuita. if (target == null) return; // não podemos ter dano negativo. @@ -34,5 +34,6 @@ public partial class MeleeAction : DirectionalAction } MessageLogData.Instance.AddMessage(attackDesc); + actor.Energy -= cost; } } -- cgit v1.2.3