added friendly and neutral peg, added disposition

This commit is contained in:
2026-06-29 18:11:28 -04:00
parent ebdff1b200
commit 982c3e6786
16 changed files with 171 additions and 25 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ public partial class BasicMovement : PegAction
public override void _Ready()
{
base._Ready();
_priority = 0;
_healthChange = 0;
_cost = 1;
_range = 2^32;
@@ -24,11 +25,12 @@ public partial class BasicMovement : PegAction
return null;
}
Vector2I cell = path[0];
map.SetCellPeg(cell, PEG);
PEG._path.Add(cell);
Tween subtween = CreateTween();
subtween.TweenProperty(this, "global_position", map.GetCellPositionFromAddress(cell), 0.25f);
subtween.TweenProperty(PEG, "global_position", map.GetCellPositionFromAddress(cell), 0.25f);
return subtween;
}
+1
View File
@@ -7,6 +7,7 @@ public partial class Shortbow : PegAction
public override void _Ready()
{
base._Ready();
_priority = 1;
_healthChange = -1;
_cost = 2;
_range = 1;
+3 -1
View File
@@ -7,6 +7,7 @@ public partial class Shortsword : PegAction
public override void _Ready()
{
base._Ready();
_priority = 1;
_healthChange = -2;
_cost = 2;
_range = 0;
@@ -16,7 +17,8 @@ public partial class Shortsword : PegAction
public override Tween CreateAnimation(Peg PEG)
{
Vector2 target = Vector2.Up * PEG._pegController._playArea._map._cellSize;
Vector2 target = PEG._disposition * Vector2.Up * PEG._pegController._playArea._map._cellSize;
GD.Print(target);
Tween subtween = CreateTween();
subtween.TweenProperty(_image, "visible", true, 0.0f);
subtween.TweenProperty(_image, "position", target, 0.5f);