feat: implement non-combat room gameplay (Library, Recovery, Treasure, Puzzle)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s

This commit is contained in:
2026-06-04 19:28:25 +02:00
parent 40a50d34f4
commit ee24227d62
12 changed files with 539 additions and 124 deletions
+20
View File
@@ -262,6 +262,26 @@ export const useGameStore = create<GameCoordinatorStore>()(
writes.combat = { ...(writes.combat || {}), currentFloor: cr.currentFloor, floorHP: cr.floorHP, floorMaxHP: cr.floorMaxHP, maxFloorReached: cr.maxFloorReached, castProgress: cr.castProgress, equipmentSpellStates: cr.equipmentSpellStates, golemancy: { ...(writes.combat?.golemancy || ctx.combat.golemancy), activeGolems: cr.activeGolems }, meleeSwordProgress: cr.meleeSwordProgress, currentRoom: cr.currentRoom };
}
// Non-combat room tick (library, recovery, treasure, puzzle)
if (ctx.combat.currentAction === 'climb') {
const roomType = ctx.combat.currentRoom?.roomType;
if (roomType === 'library' || roomType === 'recovery' || roomType === 'treasure' || roomType === 'puzzle') {
if (roomType === 'recovery') {
const boostedRegen = baseRegen * 10;
const netBoostedRegen = Math.max(0, boostedRegen * (1 - incursionStrength) * meditationMultiplier - conversionResult.totalRawDrain);
rawMana = Math.min(rawMana + netBoostedRegen * HOURS_PER_TICK, maxMana);
for (const [elem, entry] of Object.entries(conversionResult.rates)) {
if (entry.paused || entry.finalRate <= 0 || !elements[elem]) continue;
if (!elements[elem].unlocked) elements[elem] = { ...elements[elem], unlocked: true };
elements[elem] = { ...elements[elem], current: Math.min(elements[elem].max, elements[elem].current + entry.finalRate * 10 * HOURS_PER_TICK) };
}
}
useCombatStore.getState().tickNonCombatRoom(HOURS_PER_TICK);
const updatedRoom = useCombatStore.getState().currentRoom;
writes.combat = { ...(writes.combat || {}), currentRoom: updatedRoom };
}
}
if (ctx.combat.currentAction === 'craft') {
const craftingResult = useCraftingStore.getState().processEquipmentCraftingTick();
if (craftingResult.logMessage) {