feat(golemancy): Phase 1 - Component-based construction system data definitions
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Add new golem component types (Core, Frame, MindCircuit, Enchantment) - Create 4 Core tiers, 7 Frames, 4 Mind Circuits, 8 Enchantments - Rewrite golem utils for component-based stat computation - Update GolemancyState with new fields (golemDesigns, golemLoadout, activeGolems) - Update combat store, actions, and pipelines for new golem system - Rewrite GolemancyTab with component selection UI - Update fabricator discipline perks for new system - Add comprehensive tests for component registries and utilities - All files under 400 lines, all 743 tests passing
This commit is contained in:
@@ -7,6 +7,7 @@ import { getGuardianForFloor } from '../../data/guardian-encounters';
|
||||
import { hasSpecial, SPECIAL_EFFECTS } from '../../effects/special-effects';
|
||||
import type { ComputedEffects } from '../../effects/upgrade-effects.types';
|
||||
import type { EnemyState } from '../../types';
|
||||
import type { CombatStore } from '../combat-state.types';
|
||||
import { countdownGolemRoomDuration } from '../golem-combat-actions';
|
||||
|
||||
// ─── Enemy Defense Context ────────────────────────────────────────────────────
|
||||
@@ -37,7 +38,7 @@ interface BuildCombatCallbacksParams {
|
||||
effects: ComputedEffects;
|
||||
maxMana: number;
|
||||
addLog: (msg: string) => void;
|
||||
useCombatStore: { setState: (s: Record<string, unknown>) => void; getState: () => Record<string, unknown> };
|
||||
useCombatStore: { setState: (s: Partial<CombatStore>) => void; getState: () => CombatStore };
|
||||
usePrestigeStore: { getState: () => { addDefeatedGuardian: (floor: number) => void } };
|
||||
}
|
||||
|
||||
@@ -106,11 +107,12 @@ export function buildCombatCallbacks(params: BuildCombatCallbacksParams) {
|
||||
}
|
||||
useCombatStore.setState({ guardianShield: 0, guardianShieldMax: 0, guardianBarrier: 0, guardianBarrierMax: 0 });
|
||||
|
||||
// ── Golem room-duration countdown (spec §9.6) ──────────────────────
|
||||
// ── Golem room-duration countdown (spec §14) ──────────────────────
|
||||
const cs = useCombatStore.getState();
|
||||
const activeGolems = cs.golemancy?.activeGolems ?? [];
|
||||
const activeGolems = cs.golemancy.activeGolems;
|
||||
const golemDesigns = cs.golemancy.golemDesigns;
|
||||
if (activeGolems.length > 0) {
|
||||
const result = countdownGolemRoomDuration(activeGolems);
|
||||
const result = countdownGolemRoomDuration(activeGolems, golemDesigns);
|
||||
if (result.logMessages.length > 0) {
|
||||
result.logMessages.forEach((msg) => params.addLog(msg));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user