summaryrefslogtreecommitdiff
path: root/scripts/actors/actions/MovementAction.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 18:23:02 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 18:23:02 -0300
commit29e378ff070ae525a666ffa6a286caab898abbc7 (patch)
treeb89848e913e2593e0c8abab24c26268ad42acb80 /scripts/actors/actions/MovementAction.cs
parent2ed63124ef044a223fc9c7b660100c91af6f39b0 (diff)
Correção no sistema
Diffstat (limited to 'scripts/actors/actions/MovementAction.cs')
-rw-r--r--scripts/actors/actions/MovementAction.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs
index 6cec875..7d0c93b 100644
--- a/scripts/actors/actions/MovementAction.cs
+++ b/scripts/actors/actions/MovementAction.cs
@@ -11,6 +11,7 @@ public partial class MovementAction : DirectionalAction
public override void Perform()
{
+ actor.Energy -= cost;
// Não anda se o destino for um tile sólido.
if (!Map_Data.IsTileWalkable(Destination)) return;
@@ -18,7 +19,6 @@ public partial class MovementAction : DirectionalAction
// Na maioria dos casos, essa condição nunca é verdadeira.
if (GetTargetActor() != null) return;
- actor.Energy -= cost;
actor.Walk(Offset);
}
}