@@ -3904,10 +3904,10 @@ local quantify = {
39043904 " HexaCryonic" ,
39053905 },
39063906 art = {
3907- " ? " ,
3907+ " gemstonez " ,
39083908 },
39093909 code = {
3910- " Unimplemented (but will be Nova probably) " ,
3910+ " lord.ruby " ,
39113911 },
39123912 },
39133913 dependencies = {
@@ -3923,16 +3923,142 @@ local quantify = {
39233923 cost = 4 ,
39243924 atlas = " atlasnotjokers" ,
39253925 order = 425 ,
3926+ config = { extra = 1 },
3927+ loc_vars = function (self , queue , card )
3928+ return {
3929+ vars = {
3930+ card .ability .extra ,
3931+ },
3932+ }
3933+ end ,
39263934 can_use = function (self , card )
3927- return false
3935+ local h , t = Cryptid .get_quantify (card )
3936+ for i , highlighted in pairs (h ) do
3937+ if highlighted .children .price then
3938+ if to_big (G .GAME .dollars - G .GAME .bankrupt_at ) < to_big (highlighted .cost ) then
3939+ return
3940+ end
3941+ end
3942+ end
3943+ return t > 0 and t <= card .ability .extra
39283944 end ,
3929- -- use = function(self, card, area, copier)
3930-
3931- -- end,
3932- -- bulk_use = function(self, card, area, copier, number)
3933-
3934- -- end,
3935- } -- MISSING ART!!! -- UNIMPLEMENTED
3945+ use = function (self , card )
3946+ for i , v in pairs (Cryptid .get_quantify (card )) do
3947+ Cryptid .handle_quantify (v )
3948+ end
3949+ end ,
3950+ init = function ()
3951+ local calculate_ref = Card .calculate_joker
3952+ function Card :calculate_joker (context )
3953+ local ret , post = calculate_ref (self , context )
3954+ if not ret and not post then
3955+ if context .joker_main or context .forcetrigger then
3956+ if self .config .center .key == " c_base" or self .config .center .set == " Enhanced" then
3957+ local enhancement =
3958+ eval_card (self , { cardarea = G .play , main_scoring = true , scoring_hand = {} })
3959+ local ret2 = {}
3960+ local ret3 = {}
3961+ if enhancement then
3962+ ret2 = enhancement
3963+ end
3964+ local hand_enhancement =
3965+ eval_card (self , { cardarea = G .hand , main_scoring = true , scoring_hand = {} })
3966+ if hand_enhancement then
3967+ ret3 = hand_enhancement
3968+ end
3969+ for _ , tbl in pairs (ret2 ) do
3970+ for i , v in pairs (tbl ) do
3971+ SMODS .calculate_individual_effect ({ [i ] = v }, self , i , v , false )
3972+ end
3973+ end
3974+ for _ , tbl in pairs (ret3 ) do
3975+ for i , v in pairs (tbl ) do
3976+ SMODS .calculate_individual_effect ({ [i ] = v }, self , i , v , false )
3977+ end
3978+ end
3979+ end
3980+ if self .config .center .set == " Booster" then
3981+ local limit = self .ability .extra
3982+ local choose = self .ability .choose
3983+ local kind = self .config .center .kind
3984+ local kindmap = {
3985+ [" Standard" ] = " Enhanced" ,
3986+ [" Buffoon" ] = " Joker" ,
3987+ [" Arcana" ] = " Tarot" ,
3988+ }
3989+ kind = kindmap [kind ] or kind
3990+ if not G .P_CENTER_POOLS [kind ] then
3991+ kind = " Tarot"
3992+ end
3993+ for i = 1 , G .jokers .config .card_limit - # G .jokers .cards do
3994+ if to_big (self .ability .choose ) > to_big (0 ) then
3995+ self .ability .choose = self .ability .choose - 1
3996+ local tbl = self .config .center .create_card and self .config .center :create_card (self ) or {}
3997+ local card = create_card (kind or tbl .set , G .jokers , tbl .legendary , tbl .rarity , tbl .skip_materialize , tbl .soulable , tbl .forced_key , " cry_quantify_booster" )
3998+ G .jokers :emplace (card )
3999+ if to_big (self .ability .choose ) <= to_big (0 ) then
4000+ self :start_dissolve ()
4001+ end
4002+ end
4003+ end
4004+ end
4005+ end
4006+ end
4007+ return ret , post
4008+ end
4009+ local debuff_handref = Blind .debuff_hand
4010+ function Blind :debuff_hand (cards , hand , handname , check )
4011+ local tbl = {}
4012+ for i , v in pairs (G .jokers .cards ) do
4013+ if v .base .nominal and v .base .suit then
4014+ tbl [# tbl + 1 ] = v
4015+ end
4016+ end
4017+ return debuff_handref (self , Cryptid .table_merge (cards , tbl ), hand , handname , check )
4018+ end
4019+ function Cryptid .get_quantify (card )
4020+ local highlighted = {}
4021+ local total = 0
4022+ for i , v in pairs (G .I .CARD ) do
4023+ if v .highlighted and v ~= card then
4024+ highlighted [# highlighted + 1 ] = v
4025+ total = total + 1
4026+ end
4027+ end
4028+ return highlighted , total
4029+ end
4030+ function Cryptid .handle_quantify (target )
4031+ if type (target ) == " table" and target .calculate_joker then
4032+ local highlighted = target
4033+ -- removing from jokers just to readd to jokers is pointless
4034+ if highlighted and highlighted .area ~= G .consumeables or not G .GAME .modifiers .cry_beta then
4035+ if highlighted .children .price then
4036+ if to_big (G .GAME .dollars - G .GAME .bankrupt_at ) < to_big (highlighted .cost ) then
4037+ return
4038+ end
4039+ ease_dollars (- highlighted .cost )
4040+ highlighted .children .price :remove ()
4041+ end
4042+ highlighted .area :remove_card (highlighted )
4043+ highlighted .children .price = nil
4044+ if highlighted .children .buy_button then
4045+ highlighted .children .buy_button :remove ()
4046+ end
4047+ highlighted .children .buy_button = nil
4048+ remove_nils (highlighted .children )
4049+ G .E_MANAGER :add_event (Event ({
4050+ func = function ()
4051+ highlighted :highlight ()
4052+ return true
4053+ end ,
4054+ }))
4055+ G .jokers :emplace (highlighted )
4056+ return true
4057+ end
4058+ end
4059+ end
4060+ end ,
4061+ }
39364062-- ://Divide,
39374063-- Halves item costs in shop
39384064local divide = {
@@ -5285,8 +5411,8 @@ local code_cards = {
52855411 global ,
52865412 global_sticker ,
52875413 variable ,
5288- -- crylog, -- this and quantify will be implemented later on
5289- -- quantify,
5414+ -- crylog, -- this will be implemented later on
5415+ quantify ,
52905416 divide ,
52915417 multiply ,
52925418 delete ,
0 commit comments