fix: cap pact interference penalty at 1.0 to prevent negative multipliers with 4+ pacts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s

This commit is contained in:
2026-06-11 09:02:47 +02:00
parent aa5d2abd68
commit e22c6cef65
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ export function computePactMultiplier(state: {
const numAdditionalPacts = signedPacts.length - 1;
const basePenalty = 0.5 * numAdditionalPacts;
const mitigationReduction = Math.min(pactInterferenceMitigation, 5) * 0.1;
const effectivePenalty = Math.max(0, basePenalty - mitigationReduction);
const effectivePenalty = Math.min(1.0, Math.max(0, basePenalty - mitigationReduction));
if (pactInterferenceMitigation >= 5) {
const synergyBonus = (pactInterferenceMitigation - 5) * 0.1;
@@ -53,7 +53,7 @@ export function computePactInsightMultiplier(state: {
const numAdditionalPacts = signedPacts.length - 1;
const basePenalty = 0.5 * numAdditionalPacts;
const mitigationReduction = Math.min(pactInterferenceMitigation, 5) * 0.1;
const effectivePenalty = Math.max(0, basePenalty - mitigationReduction);
const effectivePenalty = Math.min(1.0, Math.max(0, basePenalty - mitigationReduction));
if (pactInterferenceMitigation >= 5) {
const synergyBonus = (pactInterferenceMitigation - 5) * 0.1;