feat: Complete Golemancy System Redesign - Component-Based Construction
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
- Fix Crystal-Steel Hybrid Frame unlock to require Fabricator 5 + Enchanter 5 (dual attunement) - Fix golem slot calculation: pass fabricator level to summon logic, cap at 7 (base 5 + discipline bonus) - Integrate discipline golemCapacity bonus into slot calculation in combat-descent-actions and golem-combat pipeline - Update GolemancyTab UI to show discipline slot bonus in header - Add comprehensive test suite: golemancy-data.test.ts (344 lines) and golemancy-combat.test.ts (313 lines) - All 1009 tests pass across 52 test files
This commit is contained in:
@@ -6,6 +6,7 @@ import { useCombatStore } from '@/lib/game/stores/combatStore';
|
||||
import { useAttunementStore } from '@/lib/game/stores/attunementStore';
|
||||
import { useManaStore } from '@/lib/game/stores/manaStore';
|
||||
import { usePrestigeStore } from '@/lib/game/stores/prestigeStore';
|
||||
import { computeDisciplineEffects } from '@/lib/game/effects/discipline-effects';
|
||||
import {
|
||||
CORES, FRAMES, MIND_CIRCUITS, GOLEM_ENCHANTMENTS,
|
||||
ALL_CORES, ALL_FRAMES, ALL_MIND_CIRCUITS, ALL_GOLEM_ENCHANTMENTS,
|
||||
@@ -66,7 +67,10 @@ export const GolemancyTab: React.FC = () => {
|
||||
);
|
||||
|
||||
const fabricatorLevel = attunements.fabricator?.level ?? 0;
|
||||
const golemSlots = getGolemSlots(fabricatorLevel);
|
||||
const baseGolemSlots = getGolemSlots(fabricatorLevel);
|
||||
const discEffects = computeDisciplineEffects();
|
||||
const discSlotBonus = Math.floor(discEffects.bonuses.golemCapacity || 0);
|
||||
const golemSlots = Math.min(7, baseGolemSlots + discSlotBonus);
|
||||
const enabledCount = golemancy.golemLoadout.filter(e => e.enabled).length;
|
||||
|
||||
// Unlock checks
|
||||
@@ -170,7 +174,7 @@ export const GolemancyTab: React.FC = () => {
|
||||
summoned when entering the spire if you can afford the cost.
|
||||
</p>
|
||||
<div className="flex gap-4 text-xs">
|
||||
<span>Slots: {enabledCount}/{golemSlots}</span>
|
||||
<span>Slots: {enabledCount}/{golemSlots}{discSlotBonus > 0 ? <span className="text-green-400"> (+{discSlotBonus} discipline)</span> : null}</span>
|
||||
<span>Active: {golemancy.activeGolems.length}</span>
|
||||
<span>Designs: {Object.keys(golemancy.golemDesigns).length}</span>
|
||||
</div>
|
||||
|
||||
@@ -21,11 +21,19 @@ describe('getGolemSlots', () => {
|
||||
expect(getGolemSlots(10)).toBe(5);
|
||||
});
|
||||
|
||||
it('caps at 5 slots for level 10+', () => {
|
||||
it('returns base slots from fabricator level (cap applied at summon level)', () => {
|
||||
expect(getGolemSlots(10)).toBe(5);
|
||||
expect(getGolemSlots(11)).toBe(5);
|
||||
// getGolemSlots returns base slots only; total cap of 7 is applied in summon logic
|
||||
expect(getGolemSlots(20)).toBe(10);
|
||||
});
|
||||
|
||||
it('base slots scale as floor(level/2)', () => {
|
||||
expect(getGolemSlots(0)).toBe(0);
|
||||
expect(getGolemSlots(1)).toBe(0);
|
||||
expect(getGolemSlots(2)).toBe(1);
|
||||
expect(getGolemSlots(10)).toBe(5);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Test: isComponentUnlocked ────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user