@@ -2454,6 +2454,111 @@ local demicolon = {
24542454 code = { " Nova" },
24552455 },
24562456}
2457+
2458+ local starfruit = {
2459+ object_type = " Joker" ,
2460+ dependencies = {
2461+ items = {
2462+ " set_cry_epic" ,
2463+ },
2464+ },
2465+ name = " cry-starfruit" ,
2466+ key = " starfruit" ,
2467+ rarity = " cry_epic" ,
2468+ cost = 14 ,
2469+ order = 300 ,
2470+ blueprint_compat = false ,
2471+ demicoloncompat = false ,
2472+ atlas = " atlasepic" ,
2473+ pos = { x = 4 , y = 5 },
2474+ config = { emult = 2 , emult_mod = 0.2 },
2475+ immutable = true ,
2476+ pools = { [" Food" ] = true },
2477+ calculate = function (self , card , context )
2478+ if context .joker_main then
2479+ return {
2480+ Emult = card .ability .emult
2481+ }
2482+ end
2483+ if context .reroll_shop then
2484+ card .ability .emult = card .ability .emult - card .ability .emult_mod
2485+ -- floating point precision can kiss my ass istg
2486+ if card .ability .emult <= 1.00000001 then
2487+ G .E_MANAGER :add_event (Event ({
2488+ func = function ()
2489+ play_sound (" tarot1" )
2490+ card .T .r = - 0.2
2491+ card :juice_up (0.3 , 0.4 )
2492+ card .states .drag .is = true
2493+ card .children .center .pinch .x = true
2494+ G .E_MANAGER :add_event (Event ({
2495+ trigger = " after" ,
2496+ delay = 0.3 ,
2497+ blockable = false ,
2498+ func = function ()
2499+ G .jokers :remove_card (card )
2500+ card :remove ()
2501+ card = nil
2502+ return true
2503+ end ,
2504+ }))
2505+ return true
2506+ end ,
2507+ }))
2508+ return {
2509+ message = localize (" k_eaten_ex" ),
2510+ colour = G .C .RARITY .cry_epic ,
2511+ }
2512+ else
2513+ return {
2514+ message = " -^" .. number_format (card .ability .emult_mod ).. " Mult" ,
2515+ colour = G .C .RARITY .cry_epic ,
2516+ }
2517+ end
2518+ end
2519+ end ,
2520+ loc_vars = function (self , queue , card )
2521+ return {
2522+ vars = {
2523+ number_format (card .ability .emult ),
2524+ number_format (card .ability .emult_mod )
2525+ }
2526+ }
2527+ end ,
2528+ cry_credits = {
2529+ art = {" lord.ruby" },
2530+ code = {" lord.ruby" },
2531+ idea = {" NinjaBanana" }
2532+ },
2533+ check_for_unlock = function (self , args )
2534+ if args .type == " foods_destroyed" and to_big (args .destroyed ) >= 2 then
2535+ unlock_card (self )
2536+ end
2537+ if args .type == " cry_lock_all" then
2538+ lock_card (self )
2539+ end
2540+ if args .type == " cry_unlock_all" then
2541+ unlock_card (self )
2542+ end
2543+ end ,
2544+ init = function ()
2545+ local card_remove_ref = Card .remove
2546+ function Card :remove (...)
2547+ if self :is_food () and self .area == G .jokers and not G .SETTINGS .paused then
2548+ G .cry_foods_eaten = (G .cry_foods_eaten or 0 ) + 1
2549+ check_for_unlock ({type = " foods_destroyed" , destroyed = G .cry_foods_eaten })
2550+ G .E_MANAGER :add_event (Event ({
2551+ func = function ()
2552+ G .cry_foods_eaten = nil
2553+ return true
2554+ end
2555+ }))
2556+ end
2557+ return card_remove_ref (self , ... )
2558+ end
2559+ end
2560+ }
2561+
24572562return {
24582563 name = " Epic Jokers" ,
24592564 items = {
@@ -2483,5 +2588,6 @@ return {
24832588 jtron ,
24842589 clockwork ,
24852590 demicolon ,
2591+ starfruit
24862592 },
24872593}
0 commit comments