verify that getMoveRightPatches works as intended through manual testing and platform placement adjustments

This commit is contained in:
2025-01-25 09:53:54 +00:00
parent 4cf1afb8cd
commit 616d97e6fd
2 changed files with 17 additions and 9 deletions

View File

@@ -300,10 +300,10 @@ struct
if yDiff > xDiff then
let
val acc =
case eyAxis of
ON_GROUND => EnemyPatch.W_Y_AXIS (JUMPING 0) :: acc
| FALLING => EnemyPatch.W_Y_AXIS (JUMPING 0) :: acc
| _ => acc
if standingOnArea (enemy, platformTree) then
EnemyPatch.W_Y_AXIS (JUMPING 0) :: acc
else
acc
in
EnemyPatch.W_X_AXIS MOVE_RIGHT :: acc
end
@@ -331,12 +331,19 @@ struct
JUMPING amt => amt
| _ => 0
val apexY = ey - (Constants.jumpLimit - jumpAmt)
val yDiff = apexY - platY
val yDiff = platY - apexY
in
if yDiff >= xDiff then
(* can reach if we jump and move right *)
EnemyPatch.W_Y_AXIS (JUMPING 0) :: EnemyPatch.W_X_AXIS
MOVE_RIGHT :: acc
let
val acc =
if standingOnArea (enemy, platformTree) then
EnemyPatch.W_Y_AXIS (JUMPING 0) :: acc
else
acc
in
EnemyPatch.W_X_AXIS MOVE_RIGHT :: acc
end
else
(* cannot reach yet so move right until we can *)
EnemyPatch.W_X_AXIS MOVE_RIGHT :: acc