fix: split multi-type golem core upkeep across all mana types (issue #315)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s

This commit is contained in:
2026-06-08 13:29:30 +02:00
parent 0894ee8c55
commit b4b499c1b1
9 changed files with 294 additions and 26 deletions
@@ -83,10 +83,14 @@ describe('computeGolemStats', () => {
// Total summon cost includes all components + enchantments
expect(stats.totalSummonCost.length).toBeGreaterThan(0);
// Upkeep = core.manaRegen * 2 per hour
expect(stats.upkeepCostPerHour.length).toBe(1);
expect(stats.upkeepCostPerHour[0].amount).toBe(6.0); // 3.0 * 2
// Upkeep = core.manaRegen * 2 per hour, split across selected mana types
expect(stats.upkeepCostPerHour.length).toBe(3); // crystal, metal, fire
expect(stats.upkeepCostPerHour[0].amount).toBe(2.0); // 6.0 / 3
expect(stats.upkeepCostPerHour[0].element).toBe('crystal');
expect(stats.upkeepCostPerHour[1].amount).toBe(2.0);
expect(stats.upkeepCostPerHour[1].element).toBe('metal');
expect(stats.upkeepCostPerHour[2].amount).toBe(2.0);
expect(stats.upkeepCostPerHour[2].element).toBe('fire');
});
it('computes total summon cost from all components', async () => {