Let nukes fly over impassable terrain - #4850
Conversation
Removes the rule (from #4340) that nuke trajectories cannot cross impassable terrain, and with it the silo path-selection / curve-flip workaround from #4815, which this supersedes: - NukeExecution no longer aborts or flips the curve at launch - nukeSpawn picks the plain closest ready silo again (MIRV special case collapsed away) - Nation AI no longer skips silos/targets behind impassable walls - isParabolaBlocked / clearParabolaDirection helpers deleted Impassable terrain itself still can't be nuked: targeting is rejected in nukeSpawn and the blast radius still skips impassable tiles. Client preview: hovering impassable terrain with a nuke keeps the ghost hidden (void treatment) but now shows the trajectory arc with the red X marker pinned at the untargetable destination, reusing the SAM-intercept marker machinery (tSamIntercept clamped to 0.9999). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
WalkthroughNuke trajectories no longer treat impassable terrain as a launch or path blocker. Preview rendering still marks blocked destinations, while ghost validation remains separate. Silo selection, AI planning, execution, and tests now support terrain-crossing nukes. ChangesNuke terrain crossing behavior
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description:
Nukes (and MIRVs) now fly over impassable terrain instead of being blocked by it. This removes the trajectory restriction introduced with impassable terrain in #4340 and supersedes the silo path-selection workaround from #4815.
Core (sim):
NukeExecutionno longer aborts the launch or flips the curve direction when the parabola crosses impassable terrainPlayerImpl.nukeSpawnpicks the plain closest ready silo again; the MIRV special case collapsed away since nothing is blocked anymoreNationNukeBehavior) no longer skips silos/targets whose trajectory crosses impassable terrainisParabolaBlocked/clearParabolaDirectionhelpers fromPathFinder.Parabola.tsUnchanged — impassable terrain itself still can't be nuked:
nukeSpawnClient preview:
tSamInterceptto 0.9999 — the X tracks the live cursor per frameTests: trajectory tests rewritten to assert fly-over-and-detonate; curve-flip and blocked-silo-selection tests from #4815 removed;
NukeTrajectory.test.tstrimmed to the generic threshold math.🤖 Generated with Claude Code