@@ -1455,19 +1455,27 @@ end
14551455
14561456function Cryptid .is_in_shop (key , consumable )
14571457 local center = G .P_CENTERS [key ]
1458- if center .hidden or center .no_doe or center .no_collection then return
1459- elseif G .GAME .banned_keys [key ] or not center .unlocked then return
1458+ if center .hidden or center .no_doe or center .no_collection then
1459+ return
1460+ elseif G .GAME .banned_keys [key ] or not center .unlocked then
1461+ return
14601462 elseif center .set == " Joker" then
14611463 if type (center .rarity ) == " number" and center .rarity <= 3 then
14621464 return center .unlocked or nil
14631465 end
14641466 else
14651467 if consumable then
1466- if center .set == " Tarot" then return G .GAME .tarot_rate * (G .GAME .cry_percrate .tarot / 100 ) > 0 or nil end
1467- if center .set == " Planet" then return G .GAME .planet_rate * (G .GAME .cry_percrate .planet / 100 ) > 0 or nil end
1468- if center .set == " Spectral" then return G .GAME .spectral_rate > 0 or nil end
1468+ if center .set == " Tarot" then
1469+ return G .GAME .tarot_rate * (G .GAME .cry_percrate .tarot / 100 ) > 0 or nil
1470+ end
1471+ if center .set == " Planet" then
1472+ return G .GAME .planet_rate * (G .GAME .cry_percrate .planet / 100 ) > 0 or nil
1473+ end
1474+ if center .set == " Spectral" then
1475+ return G .GAME .spectral_rate > 0 or nil
1476+ end
14691477 local num = G .GAME .cry_percrate and G .GAME .cry_percrate [center .set :lower ()] or 100
1470- local val = G .GAME [center .set :lower ().. ' _rate' ] * ((num or 100 ) / 100 )
1478+ local val = G .GAME [center .set :lower () .. " _rate" ] * ((num or 100 ) / 100 )
14711479 return val > 0
14721480 end
14731481 end
@@ -1478,17 +1486,19 @@ end
14781486
14791487function Cryptid .get_equilibrium_pool ()
14801488 local P_CRY_ITEMS = {}
1481- local valid_pools = { " Joker" , " Consumeables" , " Booster" }
1489+ local valid_pools = { " Joker" , " Consumeables" , " Booster" }
14821490 for _ , id in ipairs (valid_pools ) do
14831491 for k , v in pairs (G .P_CENTER_POOLS [id ]) do
14841492 if not Cryptid .no (v , " doe" , k ) and Cryptid .is_in_shop (v .key , id == " Consumeables" ) then
14851493 P_CRY_ITEMS [# P_CRY_ITEMS + 1 ] = v .key
14861494 end
14871495 end
14881496 end
1489- local _pool , _pool_key = get_current_pool (' Voucher' , nil , nil , nil , true )
1497+ local _pool , _pool_key = get_current_pool (" Voucher" , nil , nil , nil , true )
14901498 for i , v in pairs (_pool ) do
1491- if v ~= " UNAVAILABLE" then P_CRY_ITEMS [# P_CRY_ITEMS + 1 ] = v end
1499+ if v ~= " UNAVAILABLE" then
1500+ P_CRY_ITEMS [# P_CRY_ITEMS + 1 ] = v
1501+ end
14921502 end
14931503 for k , v in pairs (G .P_CARDS ) do
14941504 if not Cryptid .no (v , " doe" , k ) then
@@ -1503,20 +1513,20 @@ function Cryptid.upgrade_rarity(card, seed)
15031513 " Common" ,
15041514 " Uncommon" ,
15051515 " Rare" ,
1506- " Legendary"
1516+ " Legendary" ,
15071517 })[card .config .center .rarity ] or card .config .center .rarity
15081518 if rarity ~= " cry_exotic" then
15091519 local next_rarity = rarity
15101520 for i , v in pairs (Cryptid .rarity_table ) do
15111521 if v == rarity then
1512- next_rarity = Cryptid .rarity_table [i + 1 ] or next_rarity
1522+ next_rarity = Cryptid .rarity_table [i + 1 ] or next_rarity
15131523 end
15141524 end
15151525 local next_rarity = ({
15161526 Common = 1 ,
15171527 Uncommon = 2 ,
15181528 Rare = 3 ,
1519- Legendary = 4
1529+ Legendary = 4 ,
15201530 })[next_rarity ] or next_rarity
15211531 local center = pseudorandom_element (G .P_JOKER_RARITY_POOLS [next_rarity ], pseudoseed (seed ))
15221532 card :flip ()
@@ -1527,4 +1537,4 @@ function Cryptid.upgrade_rarity(card, seed)
15271537 delay (1 )
15281538 card :juice_up ()
15291539 end
1530- end
1540+ end
0 commit comments