summaryrefslogtreecommitdiff
path: root/scripts/actors/actions/MeleeAction.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/actors/actions/MeleeAction.cs')
-rw-r--r--scripts/actors/actions/MeleeAction.cs3
1 files changed, 2 insertions, 1 deletions
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
/// </summary>
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;
}
}