@@ -1227,14 +1227,14 @@ G.FUNCS.update_suit_colours = function(suit, skin, palette_num)
12271227 G .C .SUITS [suit ] = new_colour_proto
12281228end
12291229
1230- SMODS .smart_level_up_hand = function (card , hand , instant , amount )
1230+ SMODS .smart_level_up_hand = function (card , hand , instant , amount , statustext )
12311231 -- Cases:
12321232 -- Level ups in context.before on the played hand
12331233 -- -> direct level_up_hand(), keep displaying
12341234 -- Level ups in context.before on another hand AND any level up during scoring
12351235 -- -> restore the current chips/mult
12361236 -- Level ups outside anything -> always update to empty chips/mult
1237- level_up_hand (card , hand , instant , (type (amount ) == ' number' or type (amount ) == ' table' ) and amount or 1 )
1237+ level_up_hand (card , hand , instant , (type (amount ) == ' number' or type (amount ) == ' table' ) and amount or 1 , statustext )
12381238end
12391239
12401240-- This function handles the calculation of each effect returned to evaluate play.
@@ -3295,6 +3295,7 @@ function SMODS.upgrade_poker_hands(args)
32953295 -- args.level_up
32963296 -- args.instant
32973297 -- args.from
3298+ -- args.StatusText
32983299
32993300 local function get_keys (t )
33003301 local keys = {}
@@ -3311,7 +3312,7 @@ function SMODS.upgrade_poker_hands(args)
33113312
33123313 if not args .func then
33133314 for _ , hand in ipairs (args .hands ) do
3314- level_up_hand (args .from , hand , instant , args .level_up or 1 )
3315+ level_up_hand (args .from , hand , instant , args .level_up or 1 , args . StatusText )
33153316 end
33163317 return
33173318 end
@@ -3343,12 +3344,21 @@ function SMODS.upgrade_poker_hands(args)
33433344 if G .GAME .hands [hand ][parameter ] then
33443345 G .GAME .hands [hand ][parameter ] = args .func (G .GAME .hands [hand ][parameter ], hand , parameter )
33453346 if not instant then
3347+ local StatusText = true
3348+ if args .StatusText ~= nil then
3349+ if type (args .StatusText ) == ' function' then
3350+ local NewStatusText = args .StatusText (hand , parameter )
3351+ if NewStatusText ~= nil then StatusText = NewStatusText end
3352+ else
3353+ StatusText = args .StatusText
3354+ end
3355+ end
33463356 G .E_MANAGER :add_event (Event ({trigger = ' after' , delay = i == 1 and 0.2 or 0.9 , func = function ()
33473357 play_sound (' tarot1' )
33483358 if args .from then args .from :juice_up (0.8 , 0.5 ) end
33493359 G .TAROT_INTERRUPT_PULSE = true
33503360 return true end }))
3351- update_hand_text ({delay = 0 }, {[parameter ] = G .GAME .hands [hand ][parameter ], StatusText = true })
3361+ update_hand_text ({delay = 0 }, {[parameter ] = G .GAME .hands [hand ][parameter ], StatusText = StatusText })
33523362 end
33533363 end
33543364 end
0 commit comments