Legacy elemental-system remnants + code-quality audit (2026-07-23)
Legacy elemental-system remnants + code-quality audit (2026-07-23)
Section titled “Legacy elemental-system remnants + code-quality audit (2026-07-23)”Trigger: Chris asked for a one-off full adversarial workflow to find (a) general code-quality improvements and (b) leftover references to the old elemental/reactions system that no longer does anything but still appears in the game.
Method: 4 parallel finder agents (legacy-elemental remnants, broader archived-system leaks, a general code-quality sweep, and an architecture-rule-consistency check), each finding put through a 3-skeptic adversarial verify pass (survives only if fewer than 2 of 3 skeptics refute it). 22 agents, ~2.1M tokens, ~6 minutes. 6 findings, all 6 confirmed, 0 refuted.
Headline: yes — the Codex is actively lying to players about “elemental reactions”
Section titled “Headline: yes — the Codex is actively lying to players about “elemental reactions””Two enemies’ in-game counter tips (shown automatically the first time you meet them, and browsable any time from the Enemies carousel) describe a mechanic that was archived on 2026-07-09 and hasn’t fired in live gameplay since:
- Tank (
data/bestiary.json:9): “Shoot the missiles down (they’re killable) or juke them, then chip the armor with elemental reactions.” - Brute (
data/bestiary.json:27): “Kite it or focus it with your strongest weapon. Reactions bypass armor — lean on them.” — Brute is specifically the enemy this advice matters most for (heavy armor, deep HP pool per its own description), making this the single most load-bearing piece of wrong advice in the whole bestiary.
Verified against the real live code, not just the doc’s prose: sim/elemental_system.gd’s
apply_element() — the only reachable call site from live gameplay — does nothing but set a
cosmetic aura tint on the enemy (its own comment says so). The real reaction-computing code,
sim/elemental.gd’s Elemental.apply() (reads bible.json’s named reactions like
Superconduct/Plasma and computes a burst), is called only from tests, never from any live sim
path. And nothing element-related ever bypasses armor — the only two sources of pierce_armor in
damage_enemy() are the Bomber drone’s signature attack and the Scythe weapon’s crit hits,
neither an “elemental reaction.” A player following either tip (stacking elements to bypass Tank/
Brute armor) gets no benefit at all.
Root cause: these two bestiary entries were written for reactions-mode (archived 2026-07-09,
_archive/reactions-mode/) and never updated when Survival became the sole live ruleset.
Smaller, related finding (not player-visible today, but a landmine)
Section titled “Smaller, related finding (not player-visible today, but a landmine)”data/bible.json:782— thecatalystmod (+50% reaction damage) is still authored"live": true, even thoughsim/upgrade_system.gd’smod_eligible()correctly filters it out of every level-up offer inRULESET_SURVIVALviaCRYSTALS_DEAD_EFFECTS. Not currently player-facing (the code gate does its job), but the content file itself is misleading, and if that gate is ever refactored without someone re-checking this, a dead effect could become offerable again. Low priority.
Two unrelated code-quality findings, also confirmed
Section titled “Two unrelated code-quality findings, also confirmed”- Nearest-enemy targeting duplicated across 6 weapon files —
sim/weapon_blaster.gd,weapon_pulse.gd,weapon_scatter.gd,weapon_beam.gd,weapon_momentum_core.gd, andweapon_wildfire.gdeach carry a near-identical copy-pasted “find nearest enemy” scan (even inconsistently named — publicnearest_enemy_indexvs private_nearest_enemy_indexfor identical logic). The codebase already has a precedent for this exact kind of shared helper (sim/melee_targeting.gd), just not applied here.bh-add-contentwill keep propagating the copy-paste to future weapons until this is extracted. - 3 weapon fx_events fire into the void —
chalice_cast,chronowell_deploy, andmomentum_charged_fireare emitted intosim.fx_eventsbut have zero consumers anywhere (fx/fx_manager.gdhas no match arm,audio/audio_manager.gdhas no SFX entry) — exactly the “invisible entity” trapdocs/architecture/enemies-bosses-survival.mdalready documents. The actual gameplay effects work fine (rendered viaZoneRenderer/ a real projectile), it’s just the one-shot cast/deploy flourish that’s silently swallowed.
Fixed (2026-07-23, same session, Chris approved)
Section titled “Fixed (2026-07-23, same session, Chris approved)”All 6 findings actioned, each verified against the full test suite (+ determinism baseline for
sim/ changes) before commit:
- Tank + Catalyst/Brute codex text rewritten to drop the false “elemental reactions”/“bypass
armor” claims (
1c00fa9), along with the 3bible.jsonmods’ stale"live": trueflags flipped tofalse(that field isn’t read by any code — zero behavior change). - Nearest-enemy targeting extracted from 6 weapon files into
sim/targeting.gd(7e76342) — pure code relocation, determinism baseline unchanged. chalice_cast/chronowell_deploy/momentum_charged_firevisuals wired intofx/fx_manager.gd(45fcac1). Audio deliberately left alone — all 3 are already tracked as"silent"inaudio/sound_map.json’s curated backlog (15 similar entries), not an oversight this audit should override.