Files
benilla-octo/crates
Sam SungandClaude Opus 5.5 3a0728cde2 ground-targeting cursor: the range verdict takes GetMinMaxRange's bounds, so a range talent (op 5) and the caster's reaches reach it (0x6e6810, 0x6e3480) (#658)
The ground-targeting cursor's range verdict compared the caster-to-point distance against the `SpellRange` row's raw min and max. A range talent therefore never reached it: with Arctic Reach, Blizzard read out of range past its base 30 yd.

**In the reference**, `CheckGroundPointInRange 0x6e6810` takes its bounds from `GetMinMaxRange` (`0x6e68b0`, null target at `0x6e6879`). That applies spell-mod op 5 to the max (`0x6e3744`) and, on a melee row, sums the caster's reach with the auto-attack target's. The compare (`0x6e68b5`-`0x6e68d3`) is inclusive at both bounds and fails on an unordered result. The GameObject leg of `SpellCanTargetUnit 0x6e6460` runs the same compare (`0x6e67d6`-`0x6e6802`) with the object as target, which reads as none.

**Changes:**
- `ground_point_in_range` takes its `(min, max)` from `SpellModifiers::min_max_range`, with no explicit target and with the caster's and the auto-attack target's reach. It compares `min² <= d² <= max²`.
- The terrain arm and the GameObject leg share one `RangeCall`, built once per frame.
- `BindChecks` gains the caster's reach and the auto-attack target's reach.
- Some ground spells do use the melee row (Earthshaker, Kadrak's Flag and a few quest spells), so the reaches are passed, not defaulted.

**Tests** (in `cursor.rs`):
- `a_range_talent_moves_the_ground_verdict`: Arctic Reach's cells on Blizzard's family bits put 33 yd in and 37 yd out, with the boundaries at 35.9 and 36.1. A family mismatch does not apply.
- `the_melee_row_reads_the_casters_reaches`.
- `the_terrain_verdict_reads_the_range_talent_and_the_casters_reaches` and `the_object_leg_reads_the_range_talent`, both through `drive_targeting_cursor`.
- The mirror test gains inclusive-bound and NaN cases.

Fixes #653

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 04:31:13 +07:00
..