From bd8a14e5d22ee7e4e53a1b3c8bfe2b35328632e5 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 17 Aug 2025 20:49:03 -0300 Subject: Attack --- scripts/actors/actions/MeleeAction.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/actors/actions/MeleeAction.cs (limited to 'scripts/actors/actions/MeleeAction.cs') 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."); + } +} -- cgit v1.2.3