mirror of
https://github.com/ershisan99/Fantoms-Preview.git
synced 2025-12-16 12:32:48 +00:00
fix seeing double crashing the game
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
"id": "FantomsPreview",
|
||||
"name": "Fantoms Preview",
|
||||
"display_name": "Fantoms Preview",
|
||||
"author": ["Fantom, Divvy"],
|
||||
"author": [
|
||||
"Fantom, Divvy"
|
||||
],
|
||||
"description": "A QoL mod for balatro allowing for a preview of score/money before submitting the hand.",
|
||||
"prefix": "fn",
|
||||
"main_file": "CorePreview.lua",
|
||||
"priority": 0,
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"dependencies": [],
|
||||
"conflicts": []
|
||||
}
|
||||
}
|
||||
@@ -805,10 +805,10 @@ FNSJ.simulate_seeing_double = function(joker_obj, context)
|
||||
-- Account for all 'real' suits:
|
||||
for _, card in ipairs(context.scoring_hand) do
|
||||
if card.ability.effect ~= "Wild Card" then
|
||||
if DV.SIM.is_suit(card, "Hearts") then inc_suit("Hearts") end
|
||||
if DV.SIM.is_suit(card, "Diamonds") then inc_suit("Diamonds") end
|
||||
if DV.SIM.is_suit(card, "Spades") then inc_suit("Spades") end
|
||||
if DV.SIM.is_suit(card, "Clubs") then inc_suit("Clubs") end
|
||||
if FN.SIM.is_suit(card, "Hearts") then inc_suit("Hearts") end
|
||||
if FN.SIM.is_suit(card, "Diamonds") then inc_suit("Diamonds") end
|
||||
if FN.SIM.is_suit(card, "Spades") then inc_suit("Spades") end
|
||||
if FN.SIM.is_suit(card, "Clubs") then inc_suit("Clubs") end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -816,16 +816,16 @@ FNSJ.simulate_seeing_double = function(joker_obj, context)
|
||||
for _, card in ipairs(context.scoring_hand) do
|
||||
if card.ability.effect == "Wild Card" then
|
||||
-- IMPORTANT: Clubs must come first here, because Clubs are required for xmult. This is in line with game's implementation.
|
||||
if DV.SIM.is_suit(card, "Clubs") and suit_count["Clubs"] == 0 then inc_suit("Clubs")
|
||||
elseif DV.SIM.is_suit(card, "Hearts") and suit_count["Hearts"] == 0 then inc_suit("Hearts")
|
||||
elseif DV.SIM.is_suit(card, "Diamonds") and suit_count["Diamonds"] == 0 then inc_suit("Diamonds")
|
||||
elseif DV.SIM.is_suit(card, "Spades") and suit_count["Spades"] == 0 then inc_suit("Spades")
|
||||
if FN.SIM.is_suit(card, "Clubs") and suit_count["Clubs"] == 0 then inc_suit("Clubs")
|
||||
elseif FN.SIM.is_suit(card, "Hearts") and suit_count["Hearts"] == 0 then inc_suit("Hearts")
|
||||
elseif FN.SIM.is_suit(card, "Diamonds") and suit_count["Diamonds"] == 0 then inc_suit("Diamonds")
|
||||
elseif FN.SIM.is_suit(card, "Spades") and suit_count["Spades"] == 0 then inc_suit("Spades")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if suit_count["Clubs"] > 0 and (suit_count["Hearts"] > 0 or suit_count["Diamonds"] > 0 or suit_count["Spades"] > 0) then
|
||||
DV.SIM.x_mult(joker_obj.ability.extra)
|
||||
FN.SIM.x_mult(joker_obj.ability.extra)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user