think i finally solved movement going into enemy territory

This commit is contained in:
2026-07-05 02:51:09 -04:00
parent dbafefd660
commit bfcd48e657
9 changed files with 14 additions and 38 deletions
+3 -1
View File
@@ -48,7 +48,9 @@ public partial class BasicMovement : PegAction
public override bool MeetsCriteria(Peg PEG)
{
List<MapCell> bestPath = PEG.GetBestPath(true);
return base.MeetsCriteria(PEG) && bestPath.Count > 0;
return base.MeetsCriteria(PEG)
&& bestPath.Count > 0
&& PEG._map.GetCellDisposition(bestPath[0]._address) != -(int)PEG._disposition;
}