Phase 4: Mana Flow effects

This commit is contained in:
Refactoring Agent
2026-04-24 15:52:14 +02:00
parent 7d1bfbe4dc
commit 6e3b867e7d
9 changed files with 201 additions and 31 deletions
+23 -1
View File
@@ -150,8 +150,15 @@ interface GameContextValue {
// Effective regen calculations
effectiveRegenWithSpecials: number;
manaCascadeBonus: number;
manaWaterfallBonus: number;
effectiveRegen: number;
// Has special flags
hasManaWaterfall: boolean;
hasFlowSurge: boolean;
hasManaOverflow: boolean;
hasEternalFlow: boolean;
// DPS calculation
dps: number;
@@ -330,7 +337,17 @@ export function GameProvider({ children }: { children: ReactNode }) {
? Math.floor(maxMana / 100) * 0.1
: 0;
const effectiveRegen = (effectiveRegenWithSpecials + manaCascadeBonus) * meditationMultiplier;
const manaWaterfallBonus = hasSpecial(upgradeEffects, SPECIAL_EFFECTS.MANA_WATERFALL)
? Math.floor(maxMana / 100) * 0.25
: 0;
const effectiveRegen = (effectiveRegenWithSpecials + manaCascadeBonus + manaWaterfallBonus) * meditationMultiplier;
// Has special flags for UI
const hasManaWaterfall = hasSpecial(upgradeEffects, SPECIAL_EFFECTS.MANA_WATERFALL);
const hasFlowSurge = hasSpecial(upgradeEffects, SPECIAL_EFFECTS.FLOW_SURGE);
const hasManaOverflow = hasSpecial(upgradeEffects, SPECIAL_EFFECTS.MANA_OVERFLOW);
const hasEternalFlow = hasSpecial(upgradeEffects, SPECIAL_EFFECTS.ETERNAL_FLOW);
// Active boons
const activeBoons = useMemo(
@@ -381,7 +398,12 @@ export function GameProvider({ children }: { children: ReactNode }) {
studyCostMult,
effectiveRegenWithSpecials,
manaCascadeBonus,
manaWaterfallBonus,
effectiveRegen,
hasManaWaterfall,
hasFlowSurge,
hasManaOverflow,
hasEternalFlow,
dps,
activeBoons,
canCastSpell,