From 96dc0d97ca9fae159eae9b7758a74fb77c7096bd Mon Sep 17 00:00:00 2001 From: Shawn Pacarar Date: Tue, 3 Mar 2026 15:19:30 -0700 Subject: [PATCH] fix: archeology deck crash in newer smods versions --- src/essay.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/essay.lua b/src/essay.lua index ffc8b76..a073906 100644 --- a/src/essay.lua +++ b/src/essay.lua @@ -2975,11 +2975,20 @@ SMODS.Back{ --Archeology Deck pos = { x = 1, y = 0 }, atlas = "ECother", apply = function(self, back) - ease_ante(-1) - G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante - G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante - 1 + -- applying starting hand size before deck is created is okay G.GAME.starting_params.hand_size = G.GAME.starting_params.hand_size - 1 - end + + -- then wait till the game starts and immediately move back 1 blind (prevents crash) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = function() + ease_ante(-1) + G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante + G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante - 1 + return true + end + })) +end } SMODS.Back{ --Echo Deck