From c36f65e18de160e65fc6aaac0f298bfa93f0e2c8 Mon Sep 17 00:00:00 2001 From: markb5 Date: Fri, 24 Jul 2026 12:30:21 -0400 Subject: [PATCH] Dragon spear spec: add a third knockback fallback tile Previously each direction tried only the leading diagonal then the straight tile; if both were blocked, the knockback was dropped. Fall back to the trailing diagonal as a third option before giving up (e.g. pushed east: north-east -> east -> south-east). Co-Authored-By: Claude Opus 4.8 --- .../player/specs/scripts/pvm_dragon_spear.rs2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/skill_combat/scripts/player/specs/scripts/pvm_dragon_spear.rs2 b/scripts/skill_combat/scripts/player/specs/scripts/pvm_dragon_spear.rs2 index 06a5298f86..fdaedbc132 100644 --- a/scripts/skill_combat/scripts/player/specs/scripts/pvm_dragon_spear.rs2 +++ b/scripts/skill_combat/scripts/player/specs/scripts/pvm_dragon_spear.rs2 @@ -36,21 +36,33 @@ switch_int ($dir) { $end_coord = movecoord($target_coord, -1, 0, -1); if (lineofwalk($target_coord, $end_coord) = false) { $end_coord = movecoord($target_coord, -1, 0, 0); + if (lineofwalk($target_coord, $end_coord) = false) { + $end_coord = movecoord($target_coord, -1, 0, 1); + } } case ^exact_east : $end_coord = movecoord($target_coord, 1, 0, 1); if (lineofwalk($target_coord, $end_coord) = false) { $end_coord = movecoord($target_coord, 1, 0, 0); + if (lineofwalk($target_coord, $end_coord) = false) { + $end_coord = movecoord($target_coord, 1, 0, -1); + } } case ^exact_north : $end_coord = movecoord($target_coord, -1, 0, 1); if (lineofwalk($target_coord, $end_coord) = false) { $end_coord = movecoord($target_coord, 0, 0, 1); + if (lineofwalk($target_coord, $end_coord) = false) { + $end_coord = movecoord($target_coord, 1, 0, 1); + } } case ^exact_south : $end_coord = movecoord($target_coord, 1, 0, -1); if (lineofwalk($target_coord, $end_coord) = false) { $end_coord = movecoord($target_coord, 0, 0, -1); + if (lineofwalk($target_coord, $end_coord) = false) { + $end_coord = movecoord($target_coord, -1, 0, -1); + } } } if (lineofwalk($target_coord, $end_coord) = true) {