fixed smods issue and implemented multi jokers

This commit is contained in:
davidmolgard
2025-03-23 23:52:54 -06:00
parent 990aab628e
commit 883464a074
8 changed files with 529 additions and 261 deletions

View File

@@ -1,13 +0,0 @@
--
-- SMODS compatibility:
--
local orig_get_X_same = get_X_same
function get_X_same(num, hand)
return orig_get_X_same(num, clean_hand(hand))
end
local orig_get_highest = get_highest
function get_highest(hand)
return orig_get_highest(clean_hand(hand))
end

View File

@@ -5,23 +5,19 @@
function DV.PRE.simulate()
-- Guard against simulating in redundant places:
if
not (G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.DRAW_TO_HAND or G.STATE == G.STATES.PLAY_TAROT)
then
return { score = { min = 0, exact = 0, max = 0 }, dollars = { min = 0, exact = 0, max = 0 } }
if not (G.STATE == G.STATES.SELECTING_HAND or
G.STATE == G.STATES.DRAW_TO_HAND or
G.STATE == G.STATES.PLAY_TAROT)
then return {score = {min = 0, exact = 0, max = 0}, dollars = {min = 0, exact = 0, max = 0}}
end
if G.SETTINGS.DV.hide_face_down then
for _, card in ipairs(G.hand.highlighted) do
if card.facing == "back" then
return nil
if card.facing == "back" then return nil end
end
end
if #G.hand.highlighted ~= 0 then
if #(G.hand.highlighted) ~= 0 then
for _, joker in ipairs(G.jokers.cards) do
if joker.facing == "back" then
return nil
end
if joker.facing == "back" then return nil end
end
end
end
@@ -61,7 +57,7 @@ end
local orig_card_remove = Card.remove_from_area
function Card:remove_from_area()
orig_card_remove(self)
if self.config.type == "joker" then
if self.config.type == 'joker' then
DV.PRE.add_update_event("immediate")
end
end
@@ -74,23 +70,18 @@ function CardArea:update(dt)
end
function DV.PRE.update_on_card_order_change(cardarea)
if
#cardarea.cards == 0
or not (
G.STATE == G.STATES.SELECTING_HAND
or G.STATE == G.STATES.DRAW_TO_HAND
or G.STATE == G.STATES.PLAY_TAROT
)
then
return
end
if #cardarea.cards == 0 or
not (G.STATE == G.STATES.SELECTING_HAND or
G.STATE == G.STATES.DRAW_TO_HAND or
G.STATE == G.STATES.PLAY_TAROT)
then return end
-- Important not to update on G.STATES.HAND_PLAYED, because it would reset the preview text!
local prev_order = nil
if cardarea.config.type == "joker" and cardarea.cards[1].ability.set == "Joker" then
if cardarea.config.type == 'joker' and cardarea.cards[1].ability.set == 'Joker' then
-- Note that the consumables cardarea also has type 'joker' so must verify by checking first card.
prev_order = DV.PRE.joker_order
elseif cardarea.config.type == "hand" then
elseif cardarea.config.type == 'hand' then
prev_order = DV.PRE.hand_order
else
return
@@ -110,9 +101,9 @@ function DV.PRE.update_on_card_order_change(cardarea)
end
if should_update then
if cardarea.config.type == "joker" or cardarea.cards[1].ability.set == "Joker" then
if cardarea.config.type == 'joker' or cardarea.cards[1].ability.set == 'Joker' then
DV.PRE.joker_order = prev_order
elseif cardarea.config.type == "hand" then
elseif cardarea.config.type == 'hand' then
DV.PRE.hand_order = prev_order
end
@@ -161,14 +152,10 @@ function G.FUNCS.dv_pre_score_UI_set(e)
-- Format as 'X - Y' :
if e.config.id == "dv_pre_l" then
new_preview_text = DV.PRE.format_number(DV.PRE.data.score.min) .. " - "
if DV.PRE.is_enough_to_win(DV.PRE.data.score.min) then
should_juice = true
end
if DV.PRE.is_enough_to_win(DV.PRE.data.score.min) then should_juice = true end
elseif e.config.id == "dv_pre_r" then
new_preview_text = DV.PRE.format_number(DV.PRE.data.score.max)
if DV.PRE.is_enough_to_win(DV.PRE.data.score.max) then
should_juice = true
end
if DV.PRE.is_enough_to_win(DV.PRE.data.score.max) then should_juice = true end
end
else
-- Format as single number:
@@ -177,14 +164,10 @@ function G.FUNCS.dv_pre_score_UI_set(e)
-- Spaces around number necessary to distinguish Min/Max text from Exact text,
-- which is itself necessary to force a HUD update when switching between Min/Max and Exact.
new_preview_text = " " .. DV.PRE.format_number(DV.PRE.data.score.min) .. " "
if DV.PRE.is_enough_to_win(DV.PRE.data.score.min) then
should_juice = true
end
if DV.PRE.is_enough_to_win(DV.PRE.data.score.min) then should_juice = true end
else
new_preview_text = number_format(DV.PRE.data.score.exact)
if DV.PRE.is_enough_to_win(DV.PRE.data.score.exact) then
should_juice = true
end
if DV.PRE.is_enough_to_win(DV.PRE.data.score.exact) then should_juice = true end
end
else
new_preview_text = ""
@@ -193,10 +176,8 @@ function G.FUNCS.dv_pre_score_UI_set(e)
else
-- Spaces around number necessary to distinguish Min/Max text from Exact text, same as above ^
if e.config.id == "dv_pre_l" then
if G.SETTINGS.DV.show_min_max then
new_preview_text = " ?????? "
else
new_preview_text = "??????"
if G.SETTINGS.DV.show_min_max then new_preview_text = " ?????? "
else new_preview_text = "??????"
end
else
new_preview_text = ""
@@ -208,7 +189,8 @@ function G.FUNCS.dv_pre_score_UI_set(e)
e.config.object:update_text()
-- Wobble:
if not G.TAROT_INTERRUPT_PULSE then
if should_juice then
if should_juice
then
G.FUNCS.text_super_juice(e, 5)
e.config.object.colours = {G.C.MONEY}
else
@@ -233,7 +215,7 @@ function G.FUNCS.dv_pre_dollars_UI_set(e)
end
else
if e.config.id == "dv_pre_dollars_top" then
local _data = G.SETTINGS.DV.show_min_max and DV.PRE.data.dollars.min or DV.PRE.data.dollars.exact
local _data = (G.SETTINGS.DV.show_min_max) and DV.PRE.data.dollars.min or DV.PRE.data.dollars.exact
new_preview_text = " " .. DV.PRE.get_sign_str(_data) .. _data
new_colour = DV.PRE.get_dollar_colour(_data)
@@ -247,12 +229,10 @@ function G.FUNCS.dv_pre_dollars_UI_set(e)
new_colour = DV.PRE.get_dollar_colour(0)
end
if not DV.PRE.text.dollars[e.config.id:sub(-3)] or new_preview_text ~= DV.PRE.text.dollars[e.config.id:sub(-3)] then
if (not DV.PRE.text.dollars[e.config.id:sub(-3)]) or new_preview_text ~= DV.PRE.text.dollars[e.config.id:sub(-3)] then
DV.PRE.text.dollars[e.config.id:sub(-3)] = new_preview_text
e.config.object.colours = {new_colour}
e.config.object:update_text()
if not G.TAROT_INTERRUPT_PULSE then
e.config.object:pulse(0.25)
end
if not G.TAROT_INTERRUPT_PULSE then e.config.object:pulse(0.25) end
end
end

View File

@@ -2,30 +2,26 @@
--
-- Global values that must be present for the rest of this mod to work.
if not DV then
DV = {}
end
if not DV then DV = {} end
DV.PRE = {
data = {
score = {min = 0, exact = 0, max = 0},
dollars = { min = 0, exact = 0, max = 0 },
dollars = {min = 0, exact = 0, max = 0}
},
text = {
score = {l = "", r = ""},
dollars = { top = "", bot = "" },
dollars = {top = "", bot = ""}
},
joker_order = {},
hand_order = {},
hand_order = {}
}
DV.PRE._start_up = Game.start_up
function Game:start_up()
DV.PRE._start_up(self)
if not G.SETTINGS.DV then
G.SETTINGS.DV = {}
end
if not G.SETTINGS.DV then G.SETTINGS.DV = {} end
if not G.SETTINGS.DV.PRE then
G.SETTINGS.DV.PRE = true
@@ -34,4 +30,5 @@ function Game:start_up()
G.SETTINGS.DV.hide_face_down = true
G.SETTINGS.DV.show_min_max = true
end
end

View File

@@ -39,13 +39,3 @@ end
function DV.PRE.enabled()
return G.SETTINGS.DV.preview_score or G.SETTINGS.DV.preview_dollars
end
function clean_hand(hand)
local clean_hand = {}
for _, v in pairs(hand) do
if v.get_id then -- Should work for all functions even if they don't use get_id because get_id is a meta function and the broken cards don't have meta values
table.insert(clean_hand, v)
end
end
return clean_hand
end

View File

@@ -0,0 +1,48 @@
local DVSJ = DV.SIM.JOKERS
DVSJ.simulate_doublerainbow = function(j, context)
if context.cardarea == G.play and context.repetition then
if context.other_card.ability.name == "Lucky Card" then
DV.SIM.add_reps(1)
end
end
-- TODO: The source also has G.hand cardarea predicated on context.card_effects.
-- I'm unsure of what it does, and currently not mirroring here.
end
DVSJ.simulate_starfruit = function(j, context)
-- TODO: Verify
if context.cardarea == G.jokers and context.before then
if G.GAME.current_round.hands_played == 0 then
local hand_data = G.GAME.hands[DV.SIM.env.scoring_name]
local rand = pseudorandom("star") -- Must reuse same pseudorandom value:
local exact_chips, min_chips, max_chips = DV.SIM.get_probabilistic_extremes(rand, j.ability.extra, hand_data.l_chips, 0)
local exact_mult, min_mult, max_mult = DV.SIM.get_probabilistic_extremes(rand, j.ability.extra, hand_data.l_mult, 0)
DV.SIM.add_chips(exact_chips, min_chips, max_chips)
DV.SIM.add_mult(exact_mult, min_mult, max_mult)
end
end
end
local function level_diff()
local num_hands = 0
local num_levels = 0
for _, hand in ipairs(G.GAME.hands) do
num_hands = num_hands + 1
num_levels = num_levels + hand.level
end
return (num_levels - num_hands)
end
DVSJ.simulate_eclipse = function(j, context)
-- TODO: Verify
if context.cardarea == G.jokers and context.global then
local lvl_diff = level_diff()
if lvl_diff > 0 then
DV.SIM.add_chips(lvl_diff)
end
end
end
DVSJ.simulate_rubberducky = function(j, context)
end

View File

@@ -0,0 +1,261 @@
local DVSJ = DV.SIM.JOKERS
DVSJ.simulate_badlegaldefence = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_basepaul_card = function(j, context)
if context.cardarea == G.jokers and context.gloabl then
DV.SIM.x_mult(j.ability.extra.x_mult)
if string.find(string.lower(G.PROFILES[G.SETTINGS.profile].name), "paul") then
DV.SIM.x_mult(10)
end
end
end
DVSJ.simulate_bladedance = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_blasphemy = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.extra.xmult)
end
end
DVSJ.simulate_bloodpact = function(j, context)
if context.cardarea == G.jokers and context.global then
local any_heart = false
for _, card in ipairs(context.full_hand) do
if DV.SIM.is_suit(card, "Hearts") then
any_heart = true
break
end
end
if not any_heart then
DV.SIM.x_mult(j.ability.extra)
end
end
end
DVSJ.simulate_bowlingball = function(j, context)
if context.cardarea == G.play and context.individual then
if DV.SIM.is_rank(context.other_card, 3) then
DV.SIM.add_chips(j.ability.extra.chips)
DV.SIM.add_mult(j.ability.extra.mult)
end
end
end
DVSJ.simulate_cba = function(j, context)
-- TODO: Unsure how the mod's implementation works?
end
DVSJ.simulate_clipart = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_clownfish = function(j, context)
if context.cardarea == G.play and context.individual then
if context.other_card.ability.name ~= "Default Base" then
DV.SIM.add_chips(j.ability.extra.chips)
DV.SIM.add_mult(j.ability.extra.mult)
end
end
end
DVSJ.simulate_colorem = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_coupon_catalogue = function(j, context)
if context.cardarea == G.jokers and context.global then
local redeemed = 0
for _, v in pairs(G.GAME.used_vouchers) do
if v then redeemed = redeemed + 1 end
end
DV.SIM.add_mult(j.ability.extra.mult * redeemed)
end
end
DVSJ.simulate_css = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_dramaticentrance = function(j, context)
if context.cardarea == G.jokers and context.global then
if G.GAME.current_round.hands_played == 0 then
DV.SIM.add_chips(j.ability.extra.chips)
end
end
end
DVSJ.simulate_dropkick = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_expansion_pack = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_fleshpanopticon = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_fleshprison = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_globe = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_goldencarrot = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_hallofmirrors = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_hollow = function(j, context)
if context.cardarea == G.jokers and context.global then
if G.hand.config.card_limit < j.ability.extra.thresh then
local diff = j.ability.extra.thresh - G.hand.config.card_limit
DV.SIM.add_mult(j.ability.extra.mult_per * diff)
end
end
end
DVSJ.simulate_hugejoker = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
DVSJ.simulate_hyperbeam = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.extra)
end
end
DVSJ.simulate_impostor = function(j, context)
if context.cardarea == G.jokers and context.global then
local num_reds = 0
for _, card in ipairs(context.full_hand) do
if DV.SIM.is_suit(card, "Hearts") or DV.SIM.is_suit(card, "Diamonds") then
num_reds = num_reds + 1
end
end
if num_reds == 1 then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
end
DVSJ.simulate_jankman = function(j, context)
if context.cardarea == G.jokers and context.other_joker then
local is_vanilla = false
for _, j in ipairs(MF_VANILLA_JOKERS) do
if j == context.other_joker.config.center.key then
is_vanilla = true
break
end
end
if not is_vanilla then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
end
DVSJ.simulate_jester = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.add_chips(j.ability.extra.chips)
end
end
DVSJ.simulate_loadeddisk = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_lollipop = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.x_mult)
end
end
DVSJ.simulate_luckycharm = function(j, context)
if context.cardarea == G.jokers and context.global then
local exact_mult, min_mult, max_mult = DV.SIM.get_probabilistic_extremes(pseudorandom("lucky_charm_mult"), j.ability.extra.mult_chance, j.ability.extra.mult, 0)
DV.SIM.add_mult(exact_mult, min_mult, max_mult)
end
end
DVSJ.simulate_mashupalbum = function(j, context)
if context.cardarea == G.jokers and context.before then
if next(context.poker_hands["Flush"]) then
local card1 = context.scoring_hand[1]
if DV.SIM.is_suit(card1, "Hearts") or DV.SIM.is_suit(card1, "Diamonds") then
j.ability.extra.mult = j.ability.extra.mult + 4
else
j.ability.extra.chips = j.ability.extra.chips + 15
end
end
end
if context.cardarea == G.jokers and context.global then
DV.SIM.add_chips(j.ability.extra.chips)
DV.SIM.add_mult(j.ability.extra.mult)
end
end
DVSJ.simulate_monochrome = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.add_mult(j.ability.extra.mult)
end
end
DVSJ.simulate_mspaint = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_philosophical = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_pixeljoker = function(j, context)
if context.cardarea == G.play and context.individual then
if DV.SIM.is_rank(context.other_card, {4, 9, 14}) then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
end
DVSJ.simulate_rainbow = function(j, context)
-- TODO: Unsure how to implement currently
end
DVSJ.simulate_recycling = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_rosetinted = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_simplified = function(j, context)
if context.cardarea == G.jokers and context.other_joker then
if context.other_joker.rarity == 1 then
DV.SIM.add_mult(j.ability.extra.mult)
end
end
end
DVSJ.simulate_spiral = function(j, context)
if context.cardarea == G.jokers and context.global then
local jdata = j.ability.extra
local jmult = jdata.mult + math.floor(jdata.coeff * math.cos(math.pi/jdata.dilation * G.GAME.dollars or 0) + 0.5)
DV.SIM.add_mult(jmult)
end
end
DVSJ.simulate_stylemeter = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_teacup = function(j, context)
if context.cardarea == G.jokers and context.before then
local hand_data = G.GAME.hands[DV.SIM.env.scoring_name]
DV.SIM.add_chips(hand_data.l_chips)
DV.SIM.add_mult(hand_data.l_mult)
end
end
DVSJ.simulate_the_solo = function(j, context)
if context.cardarea == G.jokers and context.before then
if #context.full_hand == 1 then
j.ability.extra.x_mult = j.ability.extra.x_mult + j.ability.extra.x_mult_gain
end
elseif context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
DVSJ.simulate_tonersoup = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_treasuremap = function(j, context)
-- Effect not relevant
end
DVSJ.simulate_triangle = function(j, context)
if context.cardarea == G.play and context.individual then
-- vs. next(context.poker_hands["Three of a Kind"]) ?
if context.scoring_name == "Three of a Kind" then
DV.SIM.x_mult(j.ability.extra.x_mult)
end
end
end
DVSJ.simulate_virtual = function(j, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(j.ability.extra)
end
end
local MF_VANILLA_JOKERS = {"j_joker", "j_greedy_joker", "j_lusty_joker", "j_wrathful_joker", "j_gluttenous_joker", "j_zany", "j_mad", "j_crazy", "j_droll", "j_sly", "j_wily", "j_clever", "j_devious", "j_crafty", "j_half", "j_stencil", "j_four_fingers", "j_mime", "j_credit_card", "j_ceremonial", "j_banner", "j_mystic_summit", "j_marble", "j_loyalty_card", "j_8_ball", "j_misprint", "j_dusk", "j_raised_fist", "j_chaos", "j_fibonacci", "j_steel_joker", "j_scary_face", "j_abstract", "j_delayed_grat", "j_hack", "j_pareidolia", "j_gros_michel", "j_even_steven", "j_odd_todd", "j_scholar", "j_business", "j_supernova", "j_ride_the_bus", "j_space", "j_egg", "j_burglar", "j_blackboard", "j_runner", "j_ice_cream", "j_dna", "j_splash", "j_blue_joker", "j_sixth_sense", "j_constellation", "j_hiker", "j_faceless", "j_green_joker", "j_superposition", "j_todo_list", "j_cavendish", "j_card_sharp", "j_red_card", "j_madness", "j_square", "j_seance", "j_riff_raff", "j_vampire", "j_shortcut", "j_hologram", "j_vagabond", "j_baron", "j_cloud_9", "j_rocket", "j_obelisk", "j_midas_mask", "j_luchador", "j_photograph", "j_gift", "j_turtle_bean", "j_erosion", "j_reserved_parking", "j_mail", "j_to_the_moon", "j_hallucination", "j_fortune_teller", "j_juggler", "j_drunkard", "j_stone", "j_golden", "j_lucky_cat", "j_baseball", "j_bull", "j_diet_cola", "j_trading", "j_flash", "j_popcorn", "j_trousers", "j_ancient", "j_ramen", "j_walkie_talkie", "j_selzer", "j_castle", "j_smiley", "j_campfire", "j_ticket", "j_mr_bones", "j_acrobat", "j_sock_and_buskin", "j_swashbuckler", "j_troubadour", "j_certificate", "j_smeared", "j_throwback", "j_hanging_chad", "j_rough_gem", "j_bloodstone", "j_arrowhead", "j_onyx_agate", "j_glass", "j_ring_master", "j_flower_pot", "j_blueprint", "j_wee", "j_merry_andy", "j_oops", "j_idol", "j_seeing_double", "j_matador", "j_hit_the_road", "j_duo", "j_trio", "j_family", "j_order", "j_tribe", "j_stuntman", "j_invisible", "j_brainstorm", "j_satellite", "j_shoot_the_moon", "j_drivers_license", "j_cartomancer", "j_astronomer", "j_burnt", "j_bootstraps", "j_caino", "j_triboulet", "j_yorick", "j_chicot", "j_perkeo"}

View File

@@ -1,28 +1,28 @@
DVSJ.simulate_j_mp_defensive_joker= function(joker_obj, context)
DVSJ.simulate_mp_defensive_joker= function(joker_obj, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.add_chips(joker_obj.ability.extra.chips)
DV.SIM.add_chips(joker_obj.ability.t_chips)
end
end
DVSJ.simulate_j_mp_taxes = function(joker_obj, context)
DVSJ.simulate_mp_taxes = function(joker_obj, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.add_mult(joker_obj.ability.mult)
DV.SIM.add_mult(joker_obj.ability.extra.mult)
end
end
DVSJ.simulate_j_mp_pacifist = function(joker_obj, context)
DVSJ.simulate_mp_pacifist = function(joker_obj, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(joker_obj.ability.extra.Xmult)
DV.SIM.x_mult(joker_obj.ability.extra.x_mult)
end
end
DVSJ.simulate_j_mp_conjoined_joker = function(joker_obj, context)
DVSJ.simulate_mp_conjoined_joker = function(joker_obj, context)
if context.cardarea == G.jokers and context.global then
DV.SIM.x_mult(joker_obj.ability.extra.Xmult)
DV.SIM.x_mult(joker_obj.ability.extra.x_mult)
end
end
DVSJ.simulate_j_mp_hanging_chad = function(joker_obj, context)
DVSJ.simulate_mp_hanging_chad = function(joker_obj, context)
if context.cardarea == G.play and context.repetition then
if context.other_card == context.scoring_hand[1] and not context.other_card.debuff then
DV.SIM.add_reps(joker_obj.ability.extra)
@@ -33,14 +33,14 @@ DVSJ.simulate_j_mp_hanging_chad = function(joker_obj, context)
end
end
DVSJ.simulate_j_mp_lets_go_gambling = function(joker_obj, context)
if context.cardarea == G.jokers and context.before then
DVSJ.simulate_mp_lets_go_gambling = function(joker_obj, context)
if context.cardarea == G.jokers and context.global then
local rand = pseudorandom("gambling") -- Must reuse same pseudorandom value:
local exact_xmult, min_xmult, max_xmult = DV.SIM.get_probabilistic_extremes(rand, .25, 4, 1)
local exact_money, min_money, max_money = DV.SIM.get_probabilistic_extremes(rand, .25, 10, 0)
local exact_xmult, min_xmult, max_xmult = DV.SIM.get_probabilistic_extremes(rand, 4, 4, 1)
local exact_money, min_money, max_money = DV.SIM.get_probabilistic_extremes(rand, 4, 10, 0)
DV.SIM.add_dollars(exact_money, min_money, max_money)
DV.SIM.add_xmult(exact_xmult, min_xmult, max_xmult)
DV.SIM.x_mult(exact_xmult, min_xmult, max_xmult)
end
end

View File

@@ -5,31 +5,36 @@ priority = 0
# This manifest assumes the following release structure:
#
# DVSimulate/
# ├─ Engine.lua
# ├─ Init.lua
# ├─ Utils.lua
# ├─ Jokers/
# │ ├─ _Vanilla.lua
# │ ├─ etc.
# Fantoms-Preview/
# ├─ FNPreview
# ├─ FNSimulate
[[patches]]
[patches.copy]
target = "globals.lua"
position = "append"
sources = ["FNSimulate/Init.lua", "FNPreview/Init.lua", "FNPreview/Card.lua"]
sources = [
"FNSimulate/Init.lua",
"FNPreview/Init.lua"
]
[[patches]]
[patches.copy]
target = "main.lua"
position = "append"
sources = ["FNPreview/Core.lua", "FNPreview/Utils.lua"]
sources = [
"FNPreview/Core.lua",
"FNPreview/Utils.lua"
]
[[patches]]
[patches.copy]
target = "functions/common_events.lua"
position = "append"
sources = ["FNSimulate/Engine.lua", "FNSimulate/Utils.lua"]
sources = [
"FNSimulate/Engine.lua",
"FNSimulate/Utils.lua"
]
[[patches]]
[patches.copy]
@@ -37,7 +42,7 @@ target = "card.lua"
position = "append"
sources = [
"FNSimulate/Jokers/_Vanilla.lua",
"FNSimulate/Jokers/Multiplayer.lua",
"FNSimulate/Jokers/Multiplayer.lua"
]
[[patches]]
@@ -49,9 +54,9 @@ sources = ["FNPreview/Interface.lua"]
[[patches]]
[patches.pattern]
target = '''=[SMODS _ "src/overrides.lua"]'''
pattern = "function get_straight(hand, min_length, skip, wrap)"
pattern = "function Blind:debuff_hand(cards, hand, handname, check)"
position = 'after'
payload = '''
hand = clean_hand(hand)
do return debuff_hand(self, cards, hand, handname, check) end
'''
match_indent = true