9d4b3f3c69
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Fix summonGolemsForRoom to use golemLoadout instead of removed enabledGolems - Fix discBonus hardcoded to 0 in golem-combat.ts pipeline (now computed from discipline effects) - Remove deprecated types: SummonedGolem, ActiveGolem, GolemDef - Remove legacy GolemancyState fields: enabledGolems, summonedGolems, legacyActiveGolems - Remove orphaned store actions: toggleGolem, setEnabledGolems - Delete orphaned legacy data files: base-golems.ts, elemental-golems.ts, hybrid-golems.ts - Update GolemDebugSection to use new golemLoadout system - Update golemancy-spec.md §17 to reflect all features as complete - Update all test files to match new type shapes - All 958 tests passing
123 lines
3.0 KiB
TypeScript
123 lines
3.0 KiB
TypeScript
import { useGameStore } from '../stores/gameStore';
|
|
import { useManaStore, makeInitialElements } from '../stores/manaStore';
|
|
import { useCombatStore, makeInitialSpells } from '../stores/combatStore';
|
|
import { usePrestigeStore } from '../stores/prestigeStore';
|
|
import { useUIStore } from '../stores/uiStore';
|
|
import { useDisciplineStore } from '../stores/discipline-slice';
|
|
import { useAttunementStore } from '../stores/attunementStore';
|
|
import { useCraftingStore } from '../stores/craftingStore';
|
|
import { getFloorMaxHP } from '../utils';
|
|
|
|
export function resetAllStores() {
|
|
useUIStore.setState({
|
|
paused: false,
|
|
gameOver: false,
|
|
victory: false,
|
|
logs: [],
|
|
});
|
|
|
|
useGameStore.setState({
|
|
day: 1,
|
|
hour: 0,
|
|
incursionStrength: 0,
|
|
containmentWards: 0,
|
|
initialized: true,
|
|
});
|
|
|
|
useManaStore.setState({
|
|
rawMana: 100,
|
|
meditateTicks: 0,
|
|
totalManaGathered: 0,
|
|
elements: makeInitialElements(50, {}),
|
|
});
|
|
|
|
useCombatStore.setState({
|
|
currentFloor: 1,
|
|
floorHP: getFloorMaxHP(1),
|
|
floorMaxHP: getFloorMaxHP(1),
|
|
maxFloorReached: 1,
|
|
activeSpell: 'manaBolt',
|
|
currentAction: 'meditate',
|
|
castProgress: 0,
|
|
spireMode: false,
|
|
currentRoom: { roomType: 'combat', enemies: [] },
|
|
clearedFloors: {},
|
|
climbDirection: null,
|
|
isDescending: false,
|
|
startFloor: 1,
|
|
exitFloor: 1,
|
|
currentRoomIndex: 0,
|
|
roomsPerFloor: 5,
|
|
descentPeak: null,
|
|
roomResetState: {},
|
|
clearedRooms: {},
|
|
isDescentComplete: false,
|
|
golemancy: { activeGolems: [], lastSummonFloor: 0, golemDesigns: {}, golemLoadout: [] },
|
|
equipmentSpellStates: [],
|
|
comboHitCount: 0,
|
|
floorHitCount: 0,
|
|
spells: makeInitialSpells(),
|
|
activityLog: [],
|
|
achievements: { unlocked: [], progress: {} },
|
|
totalSpellsCast: 0,
|
|
totalDamageDealt: 0,
|
|
totalCraftsCompleted: 0,
|
|
});
|
|
|
|
usePrestigeStore.setState({
|
|
loopCount: 0,
|
|
insight: 0,
|
|
totalInsight: 0,
|
|
loopInsight: 0,
|
|
prestigeUpgrades: {},
|
|
pactSlots: 1,
|
|
defeatedGuardians: [],
|
|
signedPacts: [],
|
|
signedPactDetails: {},
|
|
pactRitualFloor: null,
|
|
pactRitualProgress: 0,
|
|
});
|
|
|
|
useDisciplineStore.setState({
|
|
disciplines: {},
|
|
activeIds: [],
|
|
concurrentLimit: 1,
|
|
totalXP: 0,
|
|
processedPerks: [],
|
|
});
|
|
|
|
useAttunementStore.setState({
|
|
attunements: {},
|
|
});
|
|
|
|
useCraftingStore.setState({
|
|
designProgress: null,
|
|
designProgress2: null,
|
|
preparationProgress: null,
|
|
applicationProgress: null,
|
|
equipmentCraftingProgress: null,
|
|
enchantmentDesigns: [],
|
|
unlockedEffects: [],
|
|
equippedInstances: {},
|
|
equipmentInstances: {},
|
|
lootInventory: {
|
|
materials: {},
|
|
blueprints: [],
|
|
},
|
|
enchantmentSelection: {
|
|
selectedEquipmentType: null,
|
|
selectedEffects: [],
|
|
designName: '',
|
|
selectedDesign: null,
|
|
selectedEquipmentInstance: null,
|
|
},
|
|
lastError: null,
|
|
});
|
|
}
|
|
|
|
export function tickN(n: number) {
|
|
for (let i = 0; i < n; i++) {
|
|
useGameStore.getState().tick();
|
|
}
|
|
}
|