Co-op stat scoping, AttributionWindow registry, poison window gate (#260/#250/#252) #268
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!268
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/coop-registry-poison"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the three requested changes. Stacks on #267 (the consolidated audit branch). Designed against the decompiled game via a 4-agent verification fan-out, applied in dependency order (poison → registry → scoping), each phase build+test-green and hot-reloaded into a live game (final reload:
Patch install: 86 classes patched, 0 failed/skipped,TrackedPlayer resolved: net_id=1, run resumed clean). 259/259 tests pass.#260 — Co-op: track YOUR OWN stats (not a kill-switch)
Resolve the local player from the game's
LocalContext.NetId(verified set byRunManager.LaunchbeforeRunStarted) with a sole-player fallback, at run start and every adopt/resume. Fail-open:_trackedNetId==null→ every guard allows, so single-player is byte-identical and a detection miss can't disable tracking. Gate the player-keyed ingresses on ownership (card play → cascades to energy/draw/power; deck entry; enemy-damage-taken; block; energy dispatch; Red Mask / Bag of Marbles / The Abacus relic patches). Ownership viaLocalContext.IsMesemantics (IsMutable-guarded).#250 — AttributionWindow registry
New
AttributionWindowRegistry(per-combat, FIFO, exclusive-consumption, lives onPendingCombatsonew PendingCombat()IS the reset). Multiple windows per kind, FIFO at consume — Orichalcum + Cloak Clasp each fire a distinct block gain in one turn and each claims its own window. Ported the four confirmed-buggy families via single dispatchers replacing the un-arbitrated fan-out: block (Orichalcum/Anchor/Abacus/BoneFlute/CloakClasp), energy (HappyFlower/BoomingConch/GremlinHorn + card fallback), draw (GremlinHorn owner-keyed). Fixes: Gremlin Horn energy+draw double-credit; Cloak Clasp per-card overcount + Orichalcum overlap; Happy Flower disarm-before-arm; Bone Flute stale-flag race. Arbitration core pinned by 9AttributionWindowRegistryTests. Deferred (non-buggy): Akabeko, Pendulum, Parrying Shield, Horn Cleat.#252 — Poison / Noxious Fumes window gate
Bind
participantsinto theAfterSideTurnStartprefixes and arm only when the poisoned owner is a participant (mirrorsPoisonPower.cs:57/NoxiousFumesPower.cs:28). RequireDealer==nullbefore consuming a tick, and replace the vacuous history guard with a bounded freshness window.Verification honesty
Verified: 259 unit tests (incl. the registry arbitration core), decompile-fidelity, and live hot-reload (clean bind + correct tracked-player resolution + run resume). NOT yet verified: the in-combat behavioral scenarios (the 4 relic double-attribution setups; a live co-op run) — they need specific relics / a co-op session. The registry leaves the old per-relic Record methods as dead code (never armed) pending a cleanup pass.
🤖 Generated with Claude Code