fix: three bug fixes - library XP scaling, prep time floor, dual design slot logic
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

Fixes #297: Library room XP now uses 25× rate without undocumented floor multiplier
Fixes #305: Prep time mana-per-tick now applies Math.floor(capacity/50) per spec
Fixes #304: Dual design slot correctly returns false when first slot is empty
This commit is contained in:
2026-06-08 15:03:08 +02:00
parent 9c1b2fb6cb
commit c61a9f88bf
5 changed files with 5 additions and 6 deletions
@@ -127,7 +127,7 @@ function tickLibraryRoom(get: GetFn, set: SetFn, hours: number, advance: Advance
const required = room.libraryRequired || 1;
const BASE_LIBRARY_XP_PER_HOUR = 50;
const xpGrant = Math.floor(BASE_LIBRARY_XP_PER_HOUR * (1 + s.currentFloor / 10) * 25 * hours);
const xpGrant = Math.floor(BASE_LIBRARY_XP_PER_HOUR * 25 * hours);
if (xpGrant > 0) {
const disciplineStore = useDisciplineStore.getState();
@@ -84,7 +84,7 @@ export function processEnchantingTicks(
writes.combat = { ...(writes.combat || {}), currentAction: 'meditate' };
addLog('Preparation failed: equipment not found.');
} else {
const manaPerTick = (instance.totalCapacity * 10) / (2 + instance.totalCapacity / 50) * HOURS_PER_TICK;
const manaPerTick = (instance.totalCapacity * 10) / (2 + Math.floor(instance.totalCapacity / 50)) * HOURS_PER_TICK;
const prepResult = calculatePreparationTick(
prepProgress.progress,
prepProgress.required,