fix(#165,#166,#167,#168,#169,#171,#172): resolve 7 open bug issues
#172 - Grimoire tab: removed dead 'loaded' state guard that permanently showed loading #169 - Transference Mana Flow: added elements param to checkDisciplinePrerequisites so mana type unlocks are verified #168 - Perk descriptions: wired 4 broken perks (enchant-2, channel-1, golem-2, efficiency-1) with actual bonus effects; fixed enchant-1 interval (5→50); fixed study-mana-enchantments stat (maxMana→maxManaBonus) #171 - Shields: removed all shield equipment (4 types), recipes, category, slot mappings; added 'shields' to AGENTS.md banned list #166 - regenMultiplier: merged disciplineEffects.multipliers.regenMultiplier into computeAllEffects() #165 - Meditation cap: added meditationCap display to ManaStatsSection UI; updated perk description #167 - XP accumulation: added Meditative Mastery base discipline with disciplineXpBonus stat; wired into tick pipeline
This commit is contained in:
@@ -116,6 +116,7 @@ export function checkDisciplinePrerequisites(
|
||||
discipline: DisciplineDefinition,
|
||||
allDisciplines: Record<string, DisciplineState>,
|
||||
allDefinitions: DisciplineDefinition[],
|
||||
elements?: Record<string, { unlocked: boolean }>,
|
||||
): { canProceed: boolean; missingPrereqs: string[] } {
|
||||
if (!discipline.requires || discipline.requires.length === 0) {
|
||||
return { canProceed: true, missingPrereqs: [] };
|
||||
@@ -138,10 +139,13 @@ export function checkDisciplinePrerequisites(
|
||||
missingPrereqs.push(reqDef?.name ?? reqId);
|
||||
}
|
||||
} else {
|
||||
// Treat as mana type requirement — display as "<name> mana"
|
||||
// Treat as mana type requirement — verify against player's unlocked elements
|
||||
const typeName = MANA_TYPE_NAMES[reqId];
|
||||
if (typeName) {
|
||||
missingPrereqs.push(`${typeName} mana`);
|
||||
const elementState = elements?.[reqId];
|
||||
if (!elementState || !elementState.unlocked) {
|
||||
missingPrereqs.push(`${typeName} mana`);
|
||||
}
|
||||
} else {
|
||||
missingPrereqs.push(reqId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user