@@ -357,6 +357,9 @@ local legendary = {
357357 pos = { x = 0 , y = 6 },
358358 atlas = " atlasdeck" ,
359359 order = 15 ,
360+ loc_vars = function (self , info_queue , center )
361+ return { vars = { SMODS .get_probability_vars (self , 1 , self .config .cry_legendary_rate , " Legendary Deck" ) } }
362+ end ,
360363 calculate = function (self , back , context )
361364 if context .context == " eval" and Cryptid .safe_get (G .GAME , " last_blind" , " boss" ) then
362365 SMODS .Events [" ev_cry_choco10" ]:finish ()
@@ -394,18 +397,21 @@ local critical = {
394397 name = " cry-Critical" ,
395398 key = " critical" ,
396399 order = 10 ,
397- config = { cry_crit_rate = 0.25 , cry_crit_miss_rate = 0.125 },
400+ config = { cry_crit_rate = 4 , cry_crit_miss_rate = 8 },
398401 pos = { x = 4 , y = 5 },
399402 atlas = " atlasdeck" ,
400403 loc_vars = function (self , info_queue , center )
401- return { vars = { G .GAME .probabilities .normal or 1 } }
404+ local _ , aaa = SMODS .get_probability_vars (self , 1 , self .config .cry_crit_miss_rate , " Critical Deck" )
405+ return { vars = { SMODS .get_probability_vars (self , 1 , self .config .cry_crit_rate , " Critical Deck" ), aaa } }
402406 end ,
403407 calculate = function (self , card , context )
404408 if context .final_scoring_step then
409+ local aaa =
410+ SMODS .pseudorandom_probability (self , " cry_critical" , 1 , self .config .cry_crit_rate , " Critical Deck" )
411+ local bbb =
412+ SMODS .pseudorandom_probability (self , " cry_critical" , 1 , self .config .cry_crit_miss_rate , " Critical Deck" )
405413 local check
406- local crit_poll = pseudorandom (pseudoseed (" cry_critical" ))
407- crit_poll = crit_poll / (G .GAME .probabilities .normal or 1 )
408- if crit_poll < self .config .cry_crit_rate then
414+ if aaa then
409415 check = 2
410416 G .E_MANAGER :add_event (Event ({
411417 func = function ()
@@ -421,7 +427,7 @@ local critical = {
421427 return true
422428 end ,
423429 }))
424- elseif crit_poll < self . config . cry_crit_rate + self . config . cry_crit_miss_rate then
430+ elseif bbb then
425431 check = 0.5
426432 G .E_MANAGER :add_event (Event ({
427433 func = function ()
@@ -880,8 +886,6 @@ local antimatter = {
880886
881887 function Cryptid .antimatter_trigger_final_scoring (self , context , skip )
882888 if context .context == " final_scoring_step" then
883- local crit_poll = pseudorandom (pseudoseed (" cry_critical" ))
884- crit_poll = crit_poll / (G .GAME .probabilities .normal or 1 )
885889 -- Critical Deck
886890 if
887891 (
@@ -891,7 +895,15 @@ local antimatter = {
891895 ~= 0
892896 or skip
893897 then
894- if crit_poll < self .config .cry_crit_rate then
898+ if
899+ SMODS .pseudorandom_probability (
900+ self ,
901+ " cry_critical" ,
902+ 1 ,
903+ self .config .cry_crit_rate ,
904+ " Antimatter Deck"
905+ )
906+ then
895907 context .mult = context .mult ^ 2
896908 update_hand_text ({ delay = 0 }, { mult = context .mult , chips = context .chips })
897909 G .E_MANAGER :add_event (Event ({
@@ -1004,9 +1016,15 @@ local antimatter = {
10041016 or skip
10051017 then
10061018 if # G .jokers .cards < G .jokers .config .card_limit then
1007- local legendary_poll = pseudorandom (pseudoseed (" cry_legendary" ))
1008- legendary_poll = legendary_poll / (G .GAME .probabilities .normal or 1 )
1009- if legendary_poll < self .config .cry_legendary_rate then
1019+ if
1020+ SMODS .pseudorandom_probability (
1021+ self ,
1022+ " cry_legendary" ,
1023+ 1 ,
1024+ self .config .cry_legendary_rate ,
1025+ " Antimatter Deck"
1026+ )
1027+ then
10101028 local card = create_card (" Joker" , G .jokers , true , 4 , nil , nil , nil , " " )
10111029 card :add_to_deck ()
10121030 card :start_materialize ()
0 commit comments