diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 17:20:48 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 17:20:48 -0300 |
| commit | 147bb12b5d48c5432aa1bd1cbe60b8435294445b (patch) | |
| tree | ef76e9404d7125b370a4c370603e242e4fd0d6b7 /scripts/entities/actions/MovementAction.cs | |
| parent | 396c0788cea3bc68022c4bc5a96c82e058bc9b93 (diff) | |
Ações gratuitas são mais explícitas
Diffstat (limited to 'scripts/entities/actions/MovementAction.cs')
| -rw-r--r-- | scripts/entities/actions/MovementAction.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/entities/actions/MovementAction.cs b/scripts/entities/actions/MovementAction.cs index 2c394fc..403ec0a 100644 --- a/scripts/entities/actions/MovementAction.cs +++ b/scripts/entities/actions/MovementAction.cs @@ -9,16 +9,18 @@ public partial class MovementAction : DirectionalAction { } - public override void Perform() + public override bool Perform() { // Não anda se o destino for um tile sólido. - if (!Map_Data.GetTile(Destination).IsWalkable) return; + if (!Map_Data.GetTile(Destination).IsWalkable) return true; // Não anda se o destino for oculpado por um ator. // Na maioria dos casos, essa condição nunca é verdadeira. - if (GetTarget() != null) return; + if (GetTarget() != null) return true; actor.Walk(Offset); actor.Energy -= cost; + + return true; } } |
