@@ -3587,8 +3587,136 @@ local variable = {
35873587 G .ROOM .jiggle = G .ROOM .jiggle + 1
35883588 G .CHOOSE_RANK :align_to_major ()
35893589 end ,
3590- init = function (self )
3591- function create_UIBox_variable (card )
3590+ init = function ()
3591+ local get_voucherref = SMODS .get_next_vouchers
3592+ function SMODS .get_next_vouchers (vouchers )
3593+ if G .GAME .LOG_VOUCHER then
3594+ local v = copy_table (G .GAME .LOG_VOUCHER )
3595+ if not G .GAME .USING_LOG then
3596+ G .GAME .LOG_VOUCHER = nil
3597+ end
3598+ return v
3599+ else
3600+ return get_voucherref (vouchers )
3601+ end
3602+ end
3603+ local get_bossref = get_new_boss
3604+ function get_new_boss (...)
3605+ if G .GAME .LOG_BOSS then
3606+ local v = " " .. G .GAME .LOG_BOSS
3607+ if not G .GAME .USING_LOG then
3608+ G .GAME .LOG_BOSS = nil
3609+ end
3610+ return v
3611+ end
3612+ return get_bossref (... )
3613+ end
3614+ function Cryptid .predict_joker (seed )
3615+ local _pool , _pool_key = get_current_pool (" Joker" , nil , nil , seed )
3616+ center = pseudorandom_element (_pool , pseudoseed (_pool_key ))
3617+ local it = 1
3618+ while center == " UNAVAILABLE" do
3619+ it = it + 1
3620+ center = pseudorandom_element (_pool , pseudoseed (_pool_key .. (" _resample" .. it )))
3621+ end
3622+
3623+ return center
3624+ end
3625+ function G .FUNCS .log_antevoucher ()
3626+ G .FUNCS .log_cancel ()
3627+ local pseudorandom = copy_table (G .GAME .pseudorandom )
3628+ local bl = get_new_boss ()
3629+ G .GAME .LOG_BOSS = bl
3630+ local voucher = SMODS .get_next_vouchers ()
3631+ G .GAME .LOG_VOUCHER = voucher
3632+ G .GAME .pseudorandom = copy_table (pseudorandom )
3633+ if bl then
3634+ G .GAME .bosses_used [bl ] = (G .GAME .bosses_used [bl ] or 1 ) - 1
3635+ end
3636+ G .GAME .USING_CODE = true
3637+ G .CHOOSE_CARD = UIBox ({
3638+ definition = create_UIBox_log ({
3639+ bl and G .localization .descriptions .Blind [bl ].name or " None" ,
3640+ voucher
3641+ and G .P_CENTERS [voucher [1 ]]
3642+ and localize ({ type = " name_text" , set = G .P_CENTERS [voucher [1 ]].set , key = voucher [1 ] })
3643+ or " None" ,
3644+ }, localize (" cry_code_antevoucher" )),
3645+ config = {
3646+ align = " cm" ,
3647+ offset = { x = 0 , y = 10 },
3648+ major = G .ROOM_ATTACH ,
3649+ bond = " Weak" ,
3650+ instance_type = " POPUP" ,
3651+ },
3652+ })
3653+ G .CHOOSE_CARD .alignment .offset .y = 0
3654+ G .ROOM .jiggle = G .ROOM .jiggle + 1
3655+ G .CHOOSE_CARD :align_to_major ()
3656+ G .GAME .USING_LOG = nil
3657+ end
3658+ function G .FUNCS .log_nextjokers ()
3659+ G .FUNCS .log_cancel ()
3660+ local pseudorandom = copy_table (G .GAME .pseudorandom )
3661+ local j = {}
3662+ for i = 1 , 5 do
3663+ local key = Cryptid .predict_joker (" sho" )
3664+ local next_joker = G .P_CENTERS [key ]
3665+ and localize ({ type = " name_text" , set = G .P_CENTERS [key ].set , key = key })
3666+ or " ERROR"
3667+ if next_joker == " ERROR" then
3668+ local try = (G .localization .descriptions [G .P_CENTERS [key ].set ] or {})[key ]
3669+ try = try and try .name or " [ERROR]"
3670+ if type (try or " a" ) == " table" then
3671+ try = try [1 ]
3672+ end
3673+ next_joker = try
3674+ end
3675+ j [# j + 1 ] = next_joker
3676+ end
3677+ G .GAME .pseudorandom = copy_table (pseudorandom )
3678+ G .GAME .USING_CODE = true
3679+ G .CHOOSE_CARD = UIBox ({
3680+ definition = create_UIBox_log (j , localize (" cry_code_nextjokers" )),
3681+ config = {
3682+ align = " cm" ,
3683+ offset = { x = 0 , y = 10 },
3684+ major = G .ROOM_ATTACH ,
3685+ bond = " Weak" ,
3686+ instance_type = " POPUP" ,
3687+ },
3688+ })
3689+ G .CHOOSE_CARD .alignment .offset .y = 0
3690+ G .ROOM .jiggle = G .ROOM .jiggle + 1
3691+ G .CHOOSE_CARD :align_to_major ()
3692+ G .GAME .USING_LOG = nil
3693+ end
3694+ function G .FUNCS .log_nextcards ()
3695+ G .FUNCS .log_cancel ()
3696+ local j = {}
3697+ for i = 1 , 10 do
3698+ local card = G .deck .cards [# G .deck .cards + 1 - i ]
3699+ if card then
3700+ j [# j + 1 ] = localize (card .base .value , " ranks" ) .. " of " .. localize (card .base .suit , " suits_plural" )
3701+ end
3702+ end
3703+ G .GAME .USING_CODE = true
3704+ G .CHOOSE_CARD = UIBox ({
3705+ definition = create_UIBox_log (j , localize (" cry_code_nextcards" )),
3706+ config = {
3707+ align = " cm" ,
3708+ offset = { x = 0 , y = 10 },
3709+ major = G .ROOM_ATTACH ,
3710+ bond = " Weak" ,
3711+ instance_type = " POPUP" ,
3712+ },
3713+ })
3714+ G .CHOOSE_CARD .alignment .offset .y = 0
3715+ G .ROOM .jiggle = G .ROOM .jiggle + 1
3716+ G .CHOOSE_CARD :align_to_major ()
3717+ G .GAME .USING_LOG = nil
3718+ end
3719+ function create_UIBox_log_opts ()
35923720 G .E_MANAGER :add_event (Event ({
35933721 blockable = false ,
35943722 func = function ()
@@ -3630,7 +3758,7 @@ local variable = {
36303758 }),
36313759 },
36323760 },
3633- {
3761+ G . GAME . blind and G . GAME . blind . in_blind and G . deck and # ( G . deck . cards or {}) > 0 and {
36343762 n = G .UIT .R ,
36353763 nodes = {
36363764 UIBox_button ({
0 commit comments