From a04a05996d7ce8433cb291ab112290c665f7b1e8 Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 5 Feb 2024 14:44:31 +0000 Subject: [PATCH] Adjust `calculateFenceStandingChangeFromKills()` to take into account rep loss when fence rep between 6 and 8 or rep > 8 --- project/src/helpers/InRaidHelper.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index 759d61a6..a9a1ec76 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -93,10 +93,21 @@ export class InRaidHelper // Run callback on every victim, adding up the standings gained/lossed, starting value is existing fence standing const newFenceStanding = victims.reduce((acc, victim) => { + let additionalReduction = 0; + if (existingFenceStanding >= 6 && existingFenceStanding <= 8) + { + additionalReduction = 1; + } + + if (existingFenceStanding > 8) + { + additionalReduction = 2; + } + const standingForKill = this.getFenceStandingChangeForKillAsScav(victim); if (standingForKill) { - return acc + standingForKill; + return (acc + standingForKill) - additionalReduction; } this.logger.warning( this.localisationService.getText("inraid-missing_standing_for_kill", {