@@ -3830,7 +3830,7 @@ local quantify = {
38303830 " ?" ,
38313831 },
38323832 code = {
3833- " Unimplemented (but will be Nova probably) " ,
3833+ " lord.ruby " ,
38343834 },
38353835 },
38363836 dependencies = {
@@ -3847,8 +3847,124 @@ local quantify = {
38473847 atlas = " atlasnotjokers" ,
38483848 order = 425 ,
38493849 can_use = function (self , card )
3850- return false
3850+ return true
3851+ end ,
3852+ use = function (self , card )
3853+ G .GAME .USING_CODE = true
3854+ G .GAME .cry_quantify = true
38513855 end ,
3856+ init = function ()
3857+
3858+ local love_mousepressedref = love .mousepressed
3859+ function love .mousepressed (x ,y ,button ,istouch )
3860+ love_mousepressedref (x ,y ,button ,istouch )
3861+ if G .GAME .cry_quantify and G .CONTROLLER .hovering .target .config then
3862+ if Cryptid .handle_quantify (G .CONTROLLER .hovering .target ) then
3863+ G .GAME .USING_CODE = nil
3864+ G .GAME .cry_quantify = nil
3865+ else
3866+ play_sound (" tarot1" )
3867+ attention_text ({
3868+ text = localize (" k_nope_ex" ),
3869+ backdrop_colour = G .C .SECONDARY_SET .Code ,
3870+ scale = 0.8 ,
3871+ hold = 2 ,
3872+ align = " cm" ,
3873+ offset = { x = 0 , y = 0 },
3874+ major = G .play
3875+ })
3876+ end
3877+ end
3878+ end
3879+
3880+ local calculate_ref = Card .calculate_joker
3881+ function Card :calculate_joker (context )
3882+ local ret , post = calculate_ref (self , context )
3883+ if not ret and not post then
3884+ if context .joker_main or context .forcetrigger then
3885+ if self .config .center .key == " c_base" or self .config .center .set == " Enhanced" then
3886+ local enhancement = eval_card (self , {cardarea = G .play , main_scoring = true , scoring_hand = {}})
3887+ local ret2 = {}
3888+ local ret3 = {}
3889+ if enhancement then
3890+ ret2 = enhancement
3891+ end
3892+ local hand_enhancement = eval_card (self , {cardarea = G .hand , main_scoring = true , scoring_hand = {}})
3893+ if hand_enhancement then
3894+ ret3 = hand_enhancement
3895+ end
3896+ for _ , tbl in pairs (ret2 ) do for i , v in pairs (tbl ) do
3897+ SMODS .calculate_individual_effect ({[i ]= v }, self , i , v , false )
3898+ end end
3899+ for _ , tbl in pairs (ret3 ) do for i , v in pairs (tbl ) do
3900+ SMODS .calculate_individual_effect ({[i ]= v }, self , i , v , false )
3901+ end end
3902+ end
3903+ if self .config .center .set == " Booster" then
3904+ local limit = self .ability .extra
3905+ local choose = self .ability .choose
3906+ local kind = self .config .center .kind
3907+ local kindmap = {
3908+ [" Standard" ] = " Enhanced" ,
3909+ [" Buffoon" ] = " Joker" ,
3910+ [" Arcana" ] = " Tarot"
3911+ }
3912+ kind = kindmap [kind ] or kind
3913+ if not G .P_CENTER_POOLS [kind ] then
3914+ kind = " Tarot"
3915+ end
3916+ for i = 1 , G .jokers .config .card_limit - # G .jokers .cards do
3917+ if to_big (self .ability .choose ) > to_big (0 ) then
3918+ self .ability .choose = self .ability .choose - 1
3919+ local card = self .config .center .create_card and self .config .center :create_card (self ) or
3920+ create_card (kind , G .Jokers , nil , nil , nil , nil , nil , " cry_quantify_booster" )
3921+ -- G.jokers:emplace(card)
3922+ if to_big (self .ability .choose ) <= to_big (0 ) then
3923+ self :start_dissolve ()
3924+ end
3925+ end
3926+ end
3927+ end
3928+ end
3929+ end
3930+ return ret , post
3931+ end
3932+ local debuff_handref = Blind .debuff_hand
3933+ function Blind :debuff_hand (cards , hand , handname , check )
3934+ local tbl = {}
3935+ for i , v in pairs (G .jokers .cards ) do
3936+ if v .base .nominal and v .base .suit then
3937+ tbl [# tbl + 1 ] = v
3938+ end
3939+ end
3940+ return debuff_handref (self , Cryptid .table_merge (cards , tbl ), hand , handname , check )
3941+ end
3942+ function Cryptid .handle_quantify (target )
3943+ if type (target ) == " table" and target .calculate_joker then
3944+ local highlighted = target
3945+ -- removing from jokers just to readd to jokers is pointless
3946+ if highlighted and highlighted .area ~= G .consumeables or not G .GAME .modifiers .cry_beta then
3947+ if highlighted .children .price then
3948+ if to_big (G .GAME .dollars - G .GAME .bankrupt_at ) < to_big (highlighted .cost ) then
3949+ return
3950+ end
3951+ ease_dollars (- highlighted .cost )
3952+ highlighted .children .price :remove ()
3953+ end
3954+ highlighted .area :remove_card (highlighted )
3955+ highlighted .children .price = nil
3956+ if highlighted .children .buy_button then highlighted .children .buy_button :remove () end
3957+ highlighted .children .buy_button = nil
3958+ remove_nils (highlighted .children )
3959+ G .E_MANAGER :add_event (Event {
3960+ func = function () highlighted :highlight (); return true end
3961+ })
3962+ G .jokers :emplace (highlighted )
3963+ return true
3964+ end
3965+ end
3966+ end
3967+ end
38523968 -- use = function(self, card, area, copier)
38533969
38543970 -- end,
@@ -5194,7 +5310,7 @@ local code_cards = {
51945310 global_sticker ,
51955311 variable ,
51965312 -- crylog, -- this and quantify will be implemented later on
5197- -- quantify,
5313+ quantify ,
51985314 divide ,
51995315 multiply ,
52005316 delete ,
0 commit comments