[Medium] [Bug] Invoker attunement: no guardian-defeat-gated unlock logic — only debug bypass exists #330
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Spec:
docs/specs/attunements/invoker/invoker-spec.mdDiscrepancy found:
DISCREPANCY #1 [MEDIUM] — Missing guardian-defeat-gated unlock logic
attunementStore.ts): Only hasdebugUnlockAttunement(unconditional bypass). No conditional unlock action that checks for a guardian defeat.unlockConditionstring exists on the data definition but is never evaluated by the store. Players can unlock the Invoker without defeating a guardian.unlockAttunementaction that validates the unlock condition (checksdefeatedGuardiansor similar state) before allowing activationAll other fields verified as 100% match:
pact-attunement,guardians-boon) with all fields ✅requires: ['signed_pact']on both disciplines ✅Fix implemented for Discrepancy #1 — Missing guardian-defeat-gated unlock logic
Changes made:
src/lib/game/stores/attunementStore.ts— AddedunlockAttunement(attunementId, defeatedGuardians)action:invoker: checks if floor 10 is indefeatedGuardiansbefore allowing unlockfabricator: returns false (no specific gating condition implemented)trueon success,falseif conditions not met or already unlockedsrc/lib/game/stores/pipelines/combat-tick.ts— Wired auto-unlock intoonFloorCleared:unlockAttunement('invoker', defeatedGuardians)src/components/game/tabs/AttunementsTab.tsx— Added manual unlock UI:isUnlockConditionMet()helper that checks if defeated guardians include floor 10unlockAttunementwith currentdefeatedGuardiansfrom prestige storeThe
debugUnlockAttunementaction is preserved for debug/testing use.Fix complete. All 1090 tests pass. See previous comment for detailed changes summary.