[priority: highest] fix: Guardian pact signing does not unlock mana types (unlocksMana field is dead code) #138
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?
Problem
Every guardian definition in
guardian-data.tshas anunlocksMana: string[]field listing which mana types are granted when the pact is signed (e.g. Ignis Prime at floor 10 grants['fire', 'lightning']). However, neither the tick pipeline ingameStore.tsnor thecompletePactRitualaction inprestigeStore.tsever reads this field or callsunlockElement().A search for
unlocksManaacross all store files returns zero results. The field is pure data with no runtime consumer.As a result, signing a pact with any guardian does NOT grant the player access to the corresponding mana type. Fire mana, for instance, can only be obtained through debug panels.
What Needs to Change
In
src/lib/game/stores/gameStore.tstick pipeline, after signing a pact:guardian.unlocksManafromguardian-data.tsuseManaStore.getState().unlockElement(manaType)for each mana typeIn
src/lib/game/stores/prestigeStore.tscompletePactRitual():guardian.unlocksManaand callunlockElement()for eachGuardian → Mana Mapping (from data)
['fire', 'lightning']['water', 'sand']['air']['earth', 'metal']['light', 'crystal']['dark', 'void']['death']['transference']Files
src/lib/game/stores/gameStore.ts— tick pipeline pact signing (~line 223-240)src/lib/game/stores/prestigeStore.ts—completePactRitual()(~line 147-160)src/lib/game/stores/manaStore.ts—unlockElement()(already exists, only used by debug)Test References
src/lib/game/__tests__/cross-module-prestige-discipline.test.ts— pact signing tests exist but don't verify mana unlocksfix: Guardian pact signing does not unlock mana types (unlocksMana field is dead code)to [priority: highest] fix: Guardian pact signing does not unlock mana types (unlocksMana field is dead code)Starting fix for guardian pact signing not unlocking mana types. Will modify gameStore.ts tick pipeline and prestigeStore.ts completePactRitual to call unlockElement() for each mana type in guardian.unlocksMana.
Fixed. Guardian pact signing now calls
unlockElement(manaType, 0)for each mana type inguardian.unlocksManain both:gameStore.tstick pipeline (pact ritual completion path)prestigeStore.tscompletePactRitual()(UI-triggered path)Committed as
ae30c47. All 885 tests pass.