From 1b5fdc46b475f7d00afb68f938640c227df87518 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Thu, 2 Sep 2021 22:42:56 +0300 Subject: [PATCH] Fix RP calculation logic --- hooks/useAbilityEffects/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/useAbilityEffects/index.ts b/hooks/useAbilityEffects/index.ts index 522888f65..e8ef4075c 100644 --- a/hooks/useAbilityEffects/index.ts +++ b/hooks/useAbilityEffects/index.ts @@ -601,8 +601,8 @@ export default function useAbilityEffects({ function calculateSS(amountBeforeRP: number) { const respawnPunishAPMultiplier = buildsAbilities.clothingAbilities[0] === "RP" ? 0.7 : 1; - const respawnPunishEffectMultiplier = - buildsAbilities.clothingAbilities[0] === "RP" ? 0.775 : 1; + const respawnPunishEffectSubtract = + buildsAbilities.clothingAbilities[0] === "RP" ? 0.225 : 0; const amount = Math.floor(amountBeforeRP * respawnPunishAPMultiplier); const SS = abilityJson["Special Saver"]; @@ -613,7 +613,7 @@ export default function useAbilityEffects({ const highMidLow = [high, mid, low]; const [specialLostBeforeRP, effectFromMax] = getEffect(highMidLow, amount); - const specialLost = specialLostBeforeRP * respawnPunishEffectMultiplier; + const specialLost = specialLostBeforeRP - respawnPunishEffectSubtract; const toReturn = []; @@ -637,7 +637,7 @@ export default function useAbilityEffects({ const highMidLow = [high, mid, low]; const [specialLostBeforeRP] = getEffect(highMidLow, amount); - const specialLost = specialLostBeforeRP * respawnPunishEffectMultiplier; + const specialLost = specialLostBeforeRP - respawnPunishEffectSubtract; const lost = specialLost > 1 ? 1 : specialLost; const effectAtZero = getEffect(highMidLow, 0);