From 488c7d2bafe7e6261f4bb98cca7b68037baf008a Mon Sep 17 00:00:00 2001 From: Jeremy Scheff Date: Fri, 11 Oct 2024 16:40:24 -0400 Subject: [PATCH] Fix for extra innings --- src/worker/core/GameSim.baseball/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/core/GameSim.baseball/index.ts b/src/worker/core/GameSim.baseball/index.ts index ba30affc5..d2b5ce62a 100644 --- a/src/worker/core/GameSim.baseball/index.ts +++ b/src/worker/core/GameSim.baseball/index.ts @@ -2437,7 +2437,7 @@ class GameSim extends GameSimBase { if (saveOutsNeeded !== undefined) { const outsLeft = - (this.numInnings - this.inning) * NUM_OUTS_PER_INNING + + Math.max(0, this.numInnings - this.inning) * NUM_OUTS_PER_INNING + (NUM_OUTS_PER_INNING - this.outs); if (saveOutsNeeded <= outsLeft) { // In the situation where this is only a valid save if it goes 3 innings (9 outs), then it could be a save or a blown save, but it can't be a hold https://tht.fangraphs.com/the-unofficial-rules-of-holds-and-blown-saves/