From 27fd47f8d9b21aa782915f68dcf14060e725dcb2 Mon Sep 17 00:00:00 2001 From: Jonas Simoen Date: Sat, 15 Jun 2024 15:27:05 +0200 Subject: [PATCH] fix: pass accuracy if more than 10 passes --- src/utils/PointsCalculator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/PointsCalculator.ts b/src/utils/PointsCalculator.ts index 9201c74..a721ed8 100644 --- a/src/utils/PointsCalculator.ts +++ b/src/utils/PointsCalculator.ts @@ -162,7 +162,7 @@ export const calculatePoints = (playerStat: Statistic, positionId: number | null //// PASSING // Passing accuracy above 85% - tempPoints += playerStat.totalPasses !== 0 && (playerStat.accuratePasses / playerStat.totalPasses > 0.85) ? PPS.PASS_ACCURACY_MORE_85[positionId] : 0; + tempPoints += playerStat.totalPasses > 10 && (playerStat.accuratePasses / playerStat.totalPasses > 0.85) ? PPS.PASS_ACCURACY_MORE_85[positionId] : 0; // Key passes (per 2) tempPoints += (Math.floor(playerStat.keyPasses / 2) || 0) * PPS.KEY_PASSES_PER_2[positionId]; // Accurate crosses (per 2)