mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Better fix for SPT-AKI/Issues#417 (!215)
[The wiki specifies](https://escapefromtarkov.fandom.com/wiki/Scavs#Scav_karma) that, between 6 and 8, Fence rep is reset to 6 before penalties are applied (i.e. killing someone at 7.5 rep leaves you at 5.9), but the current fix just subtracts a flat 1 reputation instead (i.e. a kill at 7.5 leaves you at 6.4) this should change that. Co-authored-by: Azrael <Azrael@noneofyourbusiness.com> Reviewed-on: SPT-AKI/Server#215 Co-authored-by: Azrael1123 <azrael1123@noreply.dev.sp-tarkov.com> Co-committed-by: Azrael1123 <azrael1123@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
ebbc3e2029
commit
7a4b27bbe1
@ -93,18 +93,24 @@ 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);
|
||||
|
||||
let additionalReduction = 0;
|
||||
|
||||
// Only subtract (up to) 2 reputation on penalties, not on rewards
|
||||
if (standingForKill < 0)
|
||||
{
|
||||
if (acc >= 6 && acc <= 8)
|
||||
{
|
||||
// Reset fence rep to 6 before subtracting penalty
|
||||
additionalReduction = acc - 6.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
additionalReduction = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (standingForKill)
|
||||
{
|
||||
return (acc + standingForKill) - additionalReduction;
|
||||
|
Loading…
x
Reference in New Issue
Block a user