Spaces:
Paused
Paused
Commit History
-
Tier 2a: collapse the cross-module duplicates, pin the tie-breaks
Claude +1: Claude Opus 5Unverified signatureradiusOf existed THREE times in engine/ and bomb.js's comment asserted the copies were "the same". They were not: only bomb.js's handled a building, by reading the instance radius state.js stamps at construction; movement.js and formation.js returned the magic constant 9 for any building — while movement.js is a // @ts-check'ed file whose JSDoc advertises @param {Unit|Building}. The type layer was actively telling callers a Building was supported on a path that silently under-sized it, which is the exact class of bug MAX_UNIT_RADIUS exists to prevent and which no determinism test can see, being wrong-but-stable on every seed. One shared helper now lives in colliders.js, which already reasoned about def.radius and b.radius. Consolidating it surfaced a real subtlety the plan didn't predict: keying on `kind` alone broke formation.js, whose callers are frequently unit-shaped literals carrying no `kind` field at all. The helper resolves by TYPE first, with a comment recording why. clamp a…e847942
-
P8 Combat Depth: uphill concealment (real LOS), veterancy ranks, tiered-kill event fields
Claude +1: Claude Sonnet 5Unverified signatureThree combat.js-anchored proposals from Phase 8 of the improvement roadmap, landed as one coherent pass through engine/fog.js and engine/combat.js since a later team's fog-render-perf work depends on this cell/fog-grid contract: 1. Real LOS pass (docs/improvement-proposals.md lines 831-839): fog.js's reveal() now takes the source's own terrain (one sampleTerrain call per source) and caps how far a NON-high-ground source reveals a high-ground CELL at UPHILL_FRAC (0.55) of its normal sight radius — a mesa is a stat pad AND a genuine blind spot for anyone still in the lowland. combat.js's nearestEnemy/spreadEnemy apply the identical rule to acquisition via a shared highGroundCap helper, so a unit can't shell a held ridge blind just because its raw aggro happens to reach that far. Both fog grids (state.fog, state.fogAI) inherit this through the same updateFog/reveal path — no AI-side code needed, verified with a dedicated symmetry test. 2. Veterancy ranks (line…8f89fac -
Measure the Helium Bomb blast to the target's rim, not its center
Claude +1: Claude Sonnet 5Unverified signatureengine/bomb.js's own header claims the peak blast "one-shots even the toughest building in the game (the Antimatter Gate, 1200hp)", but detonateBomb and checkBombProximity measured raw center-to-center distance while BOMB_CORE_RADIUS is only 15 — a Gate (radius 28) or Command Center (radius 26) at physical wall contact sat 36-38 units from the bomb's center, well outside the peak-damage band, so the documented one-shot was geometrically unreachable for exactly the buildings the doomsday device exists to threaten. Fix: measure to each victim's RIM instead (a new local rimDistance/ radiusOf pair in bomb.js), in both detonateBomb's caught-set loop and checkBombProximity's fuse check. bombDamageAt's curve itself is untouched — only the distance measurement changes. Also fix aiSuperweapon.js's own offensive walk-in: it armed/triggered at a flat ARRIVE_RADIUS of 70 from the target regardless of size, where bombDamageAt(70) is only ~138hp — replaced with a per-target threshold (target's own…d69e919
-
Implement Phase 1 of battle wreckage: kills leave minable wreck sites
ClaudeUnverified signatureEvery unit, worker, or building destroyed in combat (engine/combat.js) or by a Helium Bomb blast (engine/bomb.js) now deposits ~80% of its own construction cost into a nearby wreck site (engine/wreckage.js), which matures into real ResourceNodes after a delay -- one node per commodity, reusing the crater's pending-timer -> mature-into-node pipeline. Nearby deaths consolidate into a single site instead of scattering tiny deposits. This replaces the old instant, combat-unit-only 25% salvage refund (grantSalvage/SALVAGE_FRAC), which gave workers and buildings nothing. Wreckage is neutral, like every other resource node -- no ownership gate. See docs/battle-wreckage-design.md for the full design and remaining phases.3620efb
-
Add a fuse delay to the Helium Bomb and slow the shockwave further (#12)
Unverified signatureProximity and the player's own "Detonate Now" command now light a 4-second fuse (BOMB_FUSE_DELAY) instead of detonating on the spot; the actual blast follows once the timer comes due, via a new updateBombFuse tick check. Being attacked stays an instant, unrelated trigger. Disarming a bomb also cuts a lit fuse. The proximity trigger distance (BOMB_DETECT_RANGE) is now tied to BOMB_CORE_RADIUS (1.5x the bomb unit's own radius) instead of a distance past the blast radius, so only a point-blank enemy sets it off. Adds a pulsing amber warning ring + a distinct beep cue while the fuse burns, and slows the shockwave ring's travel by a further 20% for more dramatic pacing. Updates the HUD panel text and persistence (fuseUntil survives save/load, sanitized like armed) accordingly. Co-authored-by: Claude <noreply@anthropic.com>c1ba8ce -
Give the Helium Bomb distance-based damage falloff and a slow shockwave (#11)
Unverified signatureReplace the flat "erase everything within blast radius" kill with a distance-squared decay of HP loss: entities within BOMB_CORE_RADIUS (1.5x the bomb's own radius) still take a guaranteed-kill hit, but damage tapers off with the square of distance beyond that, reaching zero at BOMB_BLAST_RADIUS. Blast-killed entities still grant no salvage, same as before. Also slows and reworks the detonation VFX into a dramatic, decelerating shockwave ring that crawls out to the true blast radius and cools from a hot core color to ash-grey at the tapering edge, echoing the new damage curve. Updates the HUD panel text and test suite to match. Co-authored-by: Claude <noreply@anthropic.com>33fe16b
-
Helium Bomb: a detonation also terraforms - the crater matures into ore
Claude +1: Claude Sonnet 5Unverified signatureA detonation now schedules a crater (state.craters) at the blast center in addition to erasing everything in range. CRATER_SPAWN_DELAY (60s of sim time) later, engine/sim.js's per-tick updateCraters call turns it into a real ResourceNode - deterministically picked (hashStr off the crater's own id, no engine randomness) from every Raw-tier commodity, not just what this planet's own deposit table naturally rolled. It's a plain node once it exists: gather.js, fog/discovery, and rendering need zero special-casing, since node type is already derived purely from COM[com].extract. The one real complication is persistence. A normal map-generated node is regenerated fresh from the seed on load and only needs its `amount` saved - but a crater node doesn't exist in that regeneration at all. serPlanet now saves a crater node's whole shape (tagged `crater: true`) instead of just {id, amount}, and rehydratePlanet re-adds it to the regenerated map after the fact, sanitized the same way a tampered en…5330c74 -
Add the Helium Bomb: a mobile, arm-then-detonate doomsday unit
Claude +1: Claude Sonnet 5Unverified signatureA new Odyssey unit (engine/entities.js UNITS.heliumbomb), built at the Star Dock alongside the Leviathan, costed entirely in the three named materials: gas (Helium-3), antimatter, and plasmatorp (Plasma Torpedoes) - all three already-real commodities, no new economy pieces needed. Lifecycle: built UNARMED (safe to move anywhere, no different from any other unit) - the player ARMS it via a HUD toggle (hudSelection.js, same direct-mutation pattern as the Mender's auto-repair switch) - once armed, it detonates the instant any of three triggers fires: - it's attacked at all (combat.js's performAttack calls engine/bomb.js's detonateIfAttacked before applying normal damage - any hit sets it off instead of chipping its hp) - a live enemy unit or building comes within BOMB_DETECT_RANGE (checked once per tick from sim.js for every role:"bomb" unit) - the player clicks "Detonate Now" (calls detonateBomb directly) All three funnel through the one detonateBomb() function in the …53d4247