summaryrefslogtreecommitdiff
path: root/scripts/actors/actions/MeleeAction.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-17 20:49:03 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-17 20:49:03 -0300
commitbd8a14e5d22ee7e4e53a1b3c8bfe2b35328632e5 (patch)
treec91a87d683884e468a8c4e2079dbf0d80b81396c /scripts/actors/actions/MeleeAction.cs
parentbf74afcdd07e59b1a48dbfacdce9d52fad765865 (diff)
Attack
Diffstat (limited to 'scripts/actors/actions/MeleeAction.cs')
-rw-r--r--scripts/actors/actions/MeleeAction.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/actors/actions/MeleeAction.cs b/scripts/actors/actions/MeleeAction.cs
new file mode 100644
index 0000000..1a74c22
--- /dev/null
+++ b/scripts/actors/actions/MeleeAction.cs
@@ -0,0 +1,21 @@
+using Godot;
+using System;
+using System.Net.NetworkInformation;
+
+public partial class MeleeAction : DirectionalAction
+{
+ public MeleeAction(Vector2I offset) : base(offset)
+ {
+ }
+
+ public override void Perform(Game game, Actor actor)
+ {
+ Vector2I destination = actor.GridPosition + Offset;
+
+ Actor target = game.Map.GetBlockingActorAtPosition(destination);
+
+ if (target == null) return;
+
+ GD.Print($"Você tenta socar {target.ActorName}, mas como não sobra nada para o beta, você ainda não tem um método de ataque.");
+ }
+}