fix: resolve critical bugs - disciplines, debug reset, floating point, spire loop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Fixes:
- Issue 193: Remove unnecessary useEffect that set activeTab when spireMode is true, and redundant setAction('climb') in SpireCombatPage
- Issue 194: Fix signed_pact prerequisite check in checkDisciplinePrerequisites by accepting signedPacts param; add 'At Limit' feedback on discipline button when concurrent limit reached
- Issue 195: Add resetDisciplines(), resetAttunements(), resetCrafting() calls to createResetGame; add resetCrafting action to crafting store
- Issue 196: Fix floating point display in ElementStatsSection (mana pools) and GameStateDebug (time); fix duplicate 'Base Regen' label in ManaStatsSection
All 917 tests pass. Files stay under 400-line limit.
This commit is contained in:
@@ -117,6 +117,7 @@ export function checkDisciplinePrerequisites(
|
||||
allDisciplines: Record<string, DisciplineState>,
|
||||
allDefinitions: DisciplineDefinition[],
|
||||
elements?: Record<string, { unlocked: boolean }>,
|
||||
signedPacts?: number[],
|
||||
): { canProceed: boolean; missingPrereqs: string[] } {
|
||||
if (!discipline.requires || discipline.requires.length === 0) {
|
||||
return { canProceed: true, missingPrereqs: [] };
|
||||
@@ -127,7 +128,9 @@ export function checkDisciplinePrerequisites(
|
||||
for (const reqId of discipline.requires) {
|
||||
// Special case: 'signed_pact' requires at least one guardian pact
|
||||
if (reqId === 'signed_pact') {
|
||||
missingPrereqs.push('Signed guardian pact');
|
||||
if (!signedPacts || signedPacts.length === 0) {
|
||||
missingPrereqs.push('Signed guardian pact');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user