fix: resolve issues #188, #189, #190, #191 - EffectSelector gating, discipline tab completeness, and stat bonus integration
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
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-05-28T16:38:33.627Z
|
||||
Generated: 2026-05-28T17:49:52.546Z
|
||||
|
||||
No circular dependencies found. ✅
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-05-28T16:38:31.819Z",
|
||||
"generated": "2026-05-28T17:49:50.766Z",
|
||||
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
|
||||
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
|
||||
},
|
||||
@@ -579,9 +579,11 @@
|
||||
"stores/gameLoopActions.ts",
|
||||
"stores/gameStore.types.ts",
|
||||
"stores/manaStore.ts",
|
||||
"stores/pipelines/pact-ritual.ts",
|
||||
"stores/prestigeStore.ts",
|
||||
"stores/tick-pipeline.ts",
|
||||
"stores/uiStore.ts",
|
||||
"utils/element-cap-bonus.ts",
|
||||
"utils/index.ts",
|
||||
"utils/safe-persist.ts"
|
||||
],
|
||||
@@ -608,6 +610,11 @@
|
||||
"utils/result.ts",
|
||||
"utils/safe-persist.ts"
|
||||
],
|
||||
"stores/pipelines/pact-ritual.ts": [
|
||||
"constants.ts",
|
||||
"data/guardian-encounters.ts",
|
||||
"stores/manaStore.ts"
|
||||
],
|
||||
"stores/prestigeStore.ts": [
|
||||
"constants.ts",
|
||||
"data/guardian-encounters.ts",
|
||||
@@ -675,6 +682,7 @@
|
||||
"utils/discipline-math.ts": [
|
||||
"types/disciplines.ts"
|
||||
],
|
||||
"utils/element-cap-bonus.ts": [],
|
||||
"utils/enemy-generator.ts": [
|
||||
"types.ts",
|
||||
"utils/enemy-utils.ts",
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
addEffectToDesign,
|
||||
removeEffectFromDesign,
|
||||
} from './EnchantmentDesigner/utils';
|
||||
import { useCraftingStore } from '@/lib/game/stores';
|
||||
import { useCraftingStore, useAttunementStore } from '@/lib/game/stores';
|
||||
import { DebugName } from '@/components/game/debug/debug-context';
|
||||
|
||||
export function EnchantmentDesigner({
|
||||
@@ -32,6 +32,9 @@ export function EnchantmentDesigner({
|
||||
selectedDesign,
|
||||
setSelectedDesign,
|
||||
}: EnchantmentDesignerProps) {
|
||||
// Attunement store — get Enchanter level for effect selector gating
|
||||
const enchanterLevel = useAttunementStore((s) => s.attunements?.enchanter?.level ?? 0);
|
||||
|
||||
// Crafting store selectors
|
||||
const enchantmentDesigns = useCraftingStore((s) => s.enchantmentDesigns);
|
||||
const designProgress = useCraftingStore((s) => s.designProgress);
|
||||
@@ -108,7 +111,7 @@ export function EnchantmentDesigner({
|
||||
setSelectedEffects={setSelectedEffects}
|
||||
availableEffects={availableEffects}
|
||||
incompatibleEffects={incompatibleEffects}
|
||||
enchantingLevel={0}
|
||||
enchantingLevel={enchanterLevel}
|
||||
efficiencyBonus={0}
|
||||
designProgress={designProgress}
|
||||
addEffect={addEffect}
|
||||
|
||||
@@ -8,6 +8,9 @@ import { elementalAttunementDisciplines } from '@/lib/game/data/disciplines/elem
|
||||
import { elementalRegenDisciplines } from '@/lib/game/data/disciplines/elemental-regen';
|
||||
import { elementalRegenAdvancedDisciplines } from '@/lib/game/data/disciplines/elemental-regen-advanced';
|
||||
import { enchanterDisciplines } from '@/lib/game/data/disciplines/enchanter';
|
||||
import { enchanterUtilityDisciplines } from '@/lib/game/data/disciplines/enchanter-utility';
|
||||
import { enchanterSpellDisciplines } from '@/lib/game/data/disciplines/enchanter-spells';
|
||||
import { enchanterSpecialDisciplines } from '@/lib/game/data/disciplines/enchanter-special';
|
||||
import { fabricatorDisciplines } from '@/lib/game/data/disciplines/fabricator';
|
||||
import { invokerDisciplines } from '@/lib/game/data/disciplines/invoker';
|
||||
import { calculateStatBonus, calculateManaDrain, checkDisciplinePrerequisites } from '@/lib/game/utils/discipline-math';
|
||||
@@ -30,7 +33,7 @@ interface AttunementTab {
|
||||
const ATTUNEMENT_TABS: AttunementTab[] = [
|
||||
{ key: 'base', label: 'Base', items: baseDisciplines },
|
||||
{ key: 'elemental', label: 'Elemental', items: [...elementalAttunementDisciplines, ...elementalRegenDisciplines, ...elementalRegenAdvancedDisciplines] },
|
||||
{ key: 'enchanter', label: 'Enchanter', items: enchanterDisciplines },
|
||||
{ key: 'enchanter', label: 'Enchanter', items: [...enchanterDisciplines, ...enchanterUtilityDisciplines, ...enchanterSpellDisciplines, ...enchanterSpecialDisciplines] },
|
||||
{ key: 'fabricator', label: 'Fabricator', items: fabricatorDisciplines },
|
||||
{ key: 'invoker', label: 'Invoker', items: invokerDisciplines },
|
||||
];
|
||||
|
||||
@@ -124,7 +124,7 @@ export function computeAllEffects(
|
||||
perElementRegenBonus,
|
||||
maxManaMultiplier: upgradeEffects.maxManaMultiplier * (equipmentEffects.multipliers.maxMana || 1),
|
||||
regenMultiplier: upgradeEffects.regenMultiplier * (equipmentEffects.multipliers.regen || 1) * (1 + (disciplineEffects.multipliers.regenMultiplier || 0)),
|
||||
clickManaMultiplier: upgradeEffects.clickManaMultiplier * (equipmentEffects.multipliers.clickMana || 1),
|
||||
clickManaMultiplier: (upgradeEffects.clickManaMultiplier * (equipmentEffects.multipliers.clickMana || 1)) * (1 + (disciplineEffects.bonuses.clickManaMultiplier || 0)),
|
||||
baseDamageMultiplier: upgradeEffects.baseDamageMultiplier * (equipmentEffects.multipliers.baseDamage || 1),
|
||||
attackSpeedMultiplier: upgradeEffects.attackSpeedMultiplier * (equipmentEffects.multipliers.attackSpeed || 1),
|
||||
elementCapMultiplier: upgradeEffects.elementCapMultiplier * (equipmentEffects.multipliers.elementCap || 1),
|
||||
@@ -148,6 +148,9 @@ export function computeAllEffects(
|
||||
if (equipmentEffects.bonuses.studySpeed) {
|
||||
merged.studySpeedMultiplier *= (equipmentEffects.multipliers.studySpeed || 1);
|
||||
}
|
||||
if (disciplineEffects.bonuses.studySpeed) {
|
||||
merged.studySpeedMultiplier *= (1 + disciplineEffects.bonuses.studySpeed);
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ const KNOWN_BONUS_STATS = new Set([
|
||||
'golemCapacity',
|
||||
'craftingCostReduction',
|
||||
'disciplineXpBonus',
|
||||
'clickManaMultiplier',
|
||||
'studySpeed',
|
||||
]);
|
||||
|
||||
export interface DisciplineEffectsResult {
|
||||
|
||||
Reference in New Issue
Block a user