Adjust calculateFenceStandingChangeFromKills() to take into account rep loss when fence rep between 6 and 8 or rep > 8

This commit is contained in:
Dev 2024-02-05 14:44:31 +00:00
parent bf5f3316b1
commit a04a05996d

View File

@ -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", {