fix: issues #221 #217 #225 #227 #224 #226 - crafting refunds, mana tracking, cancel slot, multi-element guardians, spell kill advance
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m59s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m59s
This commit is contained in:
@@ -182,8 +182,12 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
||||
const effectiveRegen = Math.max(0, baseRegen * (1 - incursionStrength) * meditationMultiplier - totalConversionPerTick);
|
||||
|
||||
const rawAfterConversion = ctx.mana.rawMana + rawManaDelta;
|
||||
const regenFromMeditation = Math.max(0, effectiveRegen * HOURS_PER_TICK);
|
||||
const roomLeft = Math.max(0, maxMana - Math.max(0, rawAfterConversion));
|
||||
// Only count regen that actually fits below the cap (fix #224)
|
||||
const actualRegenAdded = Math.floor(Math.min(regenFromMeditation, roomLeft) * 1000) / 1000;
|
||||
let rawMana = Math.max(0, Math.min(rawAfterConversion + effectiveRegen * HOURS_PER_TICK, maxMana));
|
||||
let totalManaGathered = ctx.mana.totalManaGathered;
|
||||
let totalManaGathered = ctx.mana.totalManaGathered + Math.max(0, actualRegenAdded);
|
||||
|
||||
if (ctx.combat.currentAction === 'convert') {
|
||||
const convertResult = useManaStore.getState().processConvertAction(rawMana);
|
||||
|
||||
Reference in New Issue
Block a user