Fix crash when selling Sunny Side Up
This commit is contained in:
parent
0d72665d9e
commit
bb27a2cdb5
2 changed files with 8 additions and 6 deletions
|
|
@ -442,18 +442,20 @@ joker {
|
||||||
draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1])
|
draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1])
|
||||||
local current_round = G.GAME.current_round
|
local current_round = G.GAME.current_round
|
||||||
local facing_blind = G.GAME.facing_blind
|
local facing_blind = G.GAME.facing_blind
|
||||||
SMODS.calculate_context({drawing_cards = true, draw = {G.deck.cards}})
|
SMODS.calculate_context {drawing_cards = true, draw = {G.deck.cards}}
|
||||||
|
|
||||||
SMODS.calculate_context({
|
SMODS.calculate_context {
|
||||||
---@diagnostic disable-next-line: assign-type-mismatch
|
---@diagnostic disable-next-line: assign-type-mismatch
|
||||||
first_hand_drawn = not current_round.any_hand_drawn and facing_blind,
|
first_hand_drawn = not current_round.any_hand_drawn and facing_blind,
|
||||||
---@diagnostic disable-next-line: assign-type-mismatch
|
---@diagnostic disable-next-line: assign-type-mismatch
|
||||||
hand_drawn = facing_blind and {G.deck.cards[1]},
|
hand_drawn = facing_blind and {G.deck.cards[1]},
|
||||||
other_drawn = not facing_blind and {G.deck.cards[1]},
|
other_drawn = not facing_blind and {G.deck.cards[1]},
|
||||||
})
|
}
|
||||||
|
|
||||||
|
if facing_blind then
|
||||||
---@diagnostic disable-next-line: inject-field
|
---@diagnostic disable-next-line: inject-field
|
||||||
facing_blind.any_hand_drawn = facing_blind.any_hand_drawn or facing_blind
|
facing_blind.any_hand_drawn = facing_blind.any_hand_drawn or facing_blind
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ SMODS.Seal {
|
||||||
card:shatter()
|
card:shatter()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
|
SMODS.calculate_context {remove_playing_cards = true, removed = {card}}
|
||||||
proc()
|
proc()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue