Fix Frozen Turtle Bean edgecase

This commit is contained in:
Emik 2026-03-12 02:40:36 +01:00
parent 8533e4c146
commit 3f05ac6238
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 8 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"author": [
"Emik"
],
"version": "2.1.0",
"version": "2.1.1",
"badge_colour": "8BE9FD",
"main_file": "src/main.lua",
"badge_text_colour": "44475A",

View file

@ -123,9 +123,15 @@ local orig_calculate_joker = Card.calculate_joker
---@param self Card|{Roland_frozen_ability?: table}
function Card:calculate_joker(context, ...)
local is_frozen = self.edition and self.edition.Roland_frozen
if is_frozen and self.ability.name == "Turtle Bean" then
return
end
local ret = {orig_calculate_joker(self, context, ...)}
if not self.edition or not self.edition.Roland_frozen or not ret[1] then
if not is_frozen or not ret[1] then
return unpack(ret)
end