diff --git a/assets/1x/atlasdeck.png b/assets/1x/atlasdeck.png index 6719fedf0..0496223a6 100644 Binary files a/assets/1x/atlasdeck.png and b/assets/1x/atlasdeck.png differ diff --git a/assets/2x/atlasdeck.png b/assets/2x/atlasdeck.png index 733a085df..b6cbc649c 100644 Binary files a/assets/2x/atlasdeck.png and b/assets/2x/atlasdeck.png differ diff --git a/items/deck.lua b/items/deck.lua index 9b63d5c77..3ce0bcd3e 100644 --- a/items/deck.lua +++ b/items/deck.lua @@ -628,7 +628,7 @@ local beige = { name = "cry-Beige", key = "beige", pos = { x = 1, y = 6 }, - order = 15, + order = 17, atlas = "atlasdeck", apply = function(self) G.GAME.modifiers.cry_common_value_quad = true @@ -648,6 +648,136 @@ local beige = { end end, } +local magenta = { + object_type = "Back", + dependencies = { + items = { + "set_cry_deck", + }, + }, + name = "cry-Magenta", + key = "magenta", + pos = { x = 4, y = 6 }, + order = 18, + atlas = "atlasdeck", + calculate = function(self, back, context) + if context.selling_card and context.card.config.center.set == "Joker" and context.card.sell_cost > 0 then + G.E_MANAGER:add_event(Event({ + func = function() + if G.jokers then + local card = create_card("Joker", G.jokers, nil, 0.95, nil, nil, nil, "cry_magenta") + card.sell_cost = context.card.sell_cost - 1 + card:add_to_deck() + card:start_materialize() + G.jokers:emplace(card) + return true + end + end, + })) + end + end, + unlocked = false, + check_for_unlock = function(self, args) + if args.type == "discover_amount" then + if args.amount >= 250 then + unlock_card(self) + end + end + if args.type == "cry_lock_all" then + lock_card(self) + end + if args.type == "cry_unlock_all" then + unlock_card(self) + end + end, +} +local cyan = { + object_type = "Back", + dependencies = { + items = { + "set_cry_deck", + }, + }, + name = "cry-Cyan", + key = "cyan", + pos = { x = 5, y = 6 }, + order = 19, + atlas = "atlasdeck", + apply = function(self) + G.GAME.modifiers.cry_rare_blueprints = true + end, + unlocked = false, + check_for_unlock = function(self, args) + if args.type == "discover_amount" then + if args.amount >= 300 then + unlock_card(self) + end + end + if args.type == "cry_lock_all" then + lock_card(self) + end + if args.type == "cry_unlock_all" then + unlock_card(self) + end + end, +} +local herculean = { + object_type = "Back", + dependencies = { + items = { + "set_cry_deck", + }, + }, + name = "cry-Herculean", + key = "herculean", + pos = { x = 4, y = 2 }, + order = 15, + atlas = "placeholders", + calculate = function(self, back, context) + if + context.context == "eval" + and G.GAME.last_blind + and G.GAME.last_blind.boss + and G.GAME.current_round.discards_used == 0 + and G.GAME.current_round.discards_left > 0 + then + G.E_MANAGER:add_event(Event({ + func = function() + add_tag(Tag("tag_cry_epic")) + play_sound("generic1", 0.9 + math.random() * 0.1, 0.8) + play_sound("holo1", 1.2 + math.random() * 0.1, 0.4) + return true + end, + })) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 1, + func = function() + add_tag(Tag("tag_cry_epic")) + play_sound("generic1", 0.9 + math.random() * 0.1, 0.8) + play_sound("holo1", 1.2 + math.random() * 0.1, 0.4) + return true + end, + })) + end + end, + unlocked = false, + check_for_unlock = function(self, args) + if Cryptid.safe_get(G, "jokers") then + for i = 1, #G.jokers.cards do + if G.jokers.cards[i].config.center.rarity == "cry_epic" then + unlock_card(self) + end + end + end + if args.type == "cry_lock_all" then + lock_card(self) + end + if args.type == "cry_unlock_all" then + unlock_card(self) + end + end, +} local blank = { object_type = "Back", dependencies = { @@ -970,9 +1100,40 @@ local antimatter = { then G.GAME.modifiers.cry_common_value_quad = true end + --Cyan Deck + if + (Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_cyan", "wins", 8) or 0) ~= 0 + or skip + then + G.GAME.modifiers.cry_rare_blueprints = true + end end function Cryptid.antimatter_trigger_final_scoring(self, context, skip) + --Magenta Deck + if context.selling_card and context.card.config.center.set == "Joker" and context.card.sell_cost > 0 then + if + ( + Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_magenta", "wins", 8) + or 0 + ) + ~= 0 + or skip + then + G.E_MANAGER:add_event(Event({ + func = function() + if G.jokers then + local card = create_card("Joker", G.jokers, nil, 0.95, nil, nil, nil, "cry_magenta") + card.sell_cost = context.card.sell_cost - 1 + card:add_to_deck() + card:start_materialize() + G.jokers:emplace(card) + return true + end + end, + })) + end + end if context.context == "final_scoring_step" then local crit_poll = pseudorandom(pseudoseed("cry_critical")) crit_poll = crit_poll / (G.GAME.probabilities.normal or 1) @@ -1128,6 +1289,42 @@ local antimatter = { end end end + --Herculean Deck + if + ( + Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_herculean", "wins", 8) + or 0 + ) + ~= 0 + or skip + then + if + context.context == "eval" + and G.GAME.last_blind + and G.GAME.last_blind.boss + and G.GAME.current_round.discards_used == 0 + and G.GAME.current_round.discards_left > 0 + then + G.E_MANAGER:add_event(Event({ + func = function() + add_tag(Tag("tag_cry_epic")) + play_sound("generic1", 0.9 + math.random() * 0.1, 0.8) + play_sound("holo1", 1.2 + math.random() * 0.1, 0.4) + return true + end, + })) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 1, + func = function() + add_tag(Tag("tag_cry_epic")) + play_sound("generic1", 0.9 + math.random() * 0.1, 0.8) + play_sound("holo1", 1.2 + math.random() * 0.1, 0.4) + return true + end, + })) + end + end --Anaglyph Deck if (Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_anaglyph", "wins", 8) or 0) @@ -1250,6 +1447,9 @@ return { beta, bountiful, beige, + magenta, + cyan, + herculean, blank, antimatter, e_deck, diff --git a/items/enhanced.lua b/items/enhanced.lua index cde615127..3916ac68c 100644 --- a/items/enhanced.lua +++ b/items/enhanced.lua @@ -91,7 +91,7 @@ local e_deck = { }, name = "cry-Edition Deck", key = "e_deck", - order = 17, + order = 20, pos = { x = 5, y = 2 }, loc_vars = function(self, info_queue, center) local aaa = Cryptid.enhanced_deck_info(G.cry_edeck_center and self or {}) @@ -141,7 +141,7 @@ local et_deck = { }, name = "cry-Enhancement Deck", key = "et_deck", - order = 18, + order = 21, pos = { x = 5, y = 2 }, edeck_type = "enhancement", config = {}, @@ -184,7 +184,7 @@ local sk_deck = { }, name = "cry-Sticker Deck", key = "sk_deck", - order = 19, + order = 22, pos = { x = 5, y = 2 }, edeck_type = "sticker", config = {}, @@ -236,7 +236,7 @@ local st_deck = { name = "cry-Suit Deck", key = "st_deck", config = {}, - order = 20, + order = 23, pos = { x = 5, y = 2 }, edeck_type = "suit", loc_vars = function(self, info_queue, center) @@ -286,7 +286,7 @@ local sl_deck = { }, name = "cry-Seal Deck", key = "sl_deck", - order = 21, + order = 24, pos = { x = 5, y = 2 }, config = {}, edeck_type = "seal", diff --git a/lib/calculate.lua b/lib/calculate.lua index c4921df28..347356288 100644 --- a/lib/calculate.lua +++ b/lib/calculate.lua @@ -15,7 +15,14 @@ function eval_card(card, context) return {}, {} end -- Store old probability for later reference + local ggpn = G.GAME.probabilities.normal + if card.ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local ret, post = ec(card, context) + if card.ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end return ret, post end @@ -361,6 +368,10 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling) -- found one! if obj.cry_scale_mod and type(obj.cry_scale_mod) == "function" then -- rig the probabilities in case that matters for the joker's scaling function + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end -- 'o' will be the new factor that the joker should scale by next time local o = obj:cry_scale_mod( @@ -372,6 +383,11 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling) new_scale_base ) + -- return probabilities to normal + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end + -- the function returned a value, do the scale setting with it if o then -- set the scale factor field to 'o' @@ -405,11 +421,18 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling) -- now, let's check for repetitions on the scale-affecting jokers local reps = {} for j = 1, #G.jokers.cards do + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[j].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end -- check if another joker is retriggering our scale-affecting joker local check = cj( G.jokers.cards[j], { retrigger_joker_check = true, other_card = G.jokers.cards[i] } ) + if G.jokers.cards[j].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end -- keep track of which joker retriggers the scale-joker if type(check) == "table" then reps[j] = check and check.repetitions and check or 0 @@ -438,6 +461,10 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling) for r = 1, rep.repetitions do card_eval_status_text(rep.card, "jokers", nil, nil, nil, rep) -- now, same thing as before, apply the scale-joker + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local o = obj:cry_scale_mod( G.jokers.cards[i], self, @@ -446,6 +473,9 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling) orig_scale_base, new_scale_base ) + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end if o then if #dbl_info.scaler[info_i] == 2 then @@ -568,9 +598,13 @@ function Card:calculate_joker(context) if not active_side or active_side.will_shatter then return end + local ggpn = G.GAME.probabilities.normal if not G.GAME.cry_double_scale then G.GAME.cry_double_scale = { double_scale = true } --doesn't really matter what's in here as long as there's something end + if active_side.ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local orig_ability = copy_table(active_side.ability) local in_context_scaling = false local callback = context.callback @@ -587,6 +621,7 @@ function Card:calculate_joker(context) context.callback = nil end local ret, trig = cj(active_side, context) + --Possesed if active_side.ability.cry_possessed and ret then if ret.mult_mod then ret.mult_mod = ret.mult_mod * -1 @@ -648,9 +683,27 @@ function Card:calculate_joker(context) in_context_scaling = true end end + if active_side.ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end if next(find_joker("cry-Scalae")) or next(find_joker("cry-Double Scale")) then active_side:cry_double_scale_calc(orig_ability, in_context_scaling) end + if + self.ability + and self.ability.set == "Joker" + and self.config.center.rarity == 3 + and G.GAME.modifiers.cry_rare_blueprints + then + local other_joker = nil + for i = 1, #G.jokers.cards do + if G.jokers.cards[i] == self then + other_joker = G.jokers.cards[i + 1] + end + end + local other_joker_ret = SMODS.blueprint_effect(self, other_joker, context) + return SMODS.merge_effects({ ret or {}, other_joker_ret or {} }), trig + end return ret, trig end @@ -691,6 +744,10 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca for i = 1, #G.jokers.cards do local obj = G.jokers.cards[i].config.center if obj.cry_scale_mod and type(obj.cry_scale_mod) == "function" then + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local o = obj:cry_scale_mod( G.jokers.cards[i], jkr, @@ -699,6 +756,9 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca orig_scale_base, new_scale_base ) + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end if o then if #dbl_info.scaler[info_i] == 2 then if @@ -728,8 +788,15 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca local reps = {} for j = 1, #G.jokers.cards do + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[j].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local check = cj(G.jokers.cards[j], { retrigger_joker_check = true, other_card = G.jokers.cards[i] }) + if G.jokers.cards[j].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end if type(check) == "table" then reps[j] = check and check.repetitions and check or 0 else @@ -752,6 +819,10 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca if (type(rep) == "table") and rep.repetitions and (rep.repetitions > 0) then for r = 1, rep.repetitions do card_eval_status_text(rep.card, "jokers", nil, nil, nil, rep) + local ggpn = G.GAME.probabilities.normal + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = 1e9 + end local o = obj:cry_scale_mod( G.jokers.cards[i], jkr, @@ -760,6 +831,9 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca orig_scale_base, new_scale_base ) + if G.jokers.cards[i].ability.cry_rigged then + G.GAME.probabilities.normal = ggpn + end if o then if #dbl_info.scaler[info_i] == 2 then diff --git a/localization/en-us.lua b/localization/en-us.lua index e44b35330..2f6199ebd 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -96,6 +96,18 @@ return { "Obtain a {C:attention}Rigged Joker", }, }, + b_cry_cyan = { + name = "Cyan Deck", + text = { + "All {C:red}Rare{} Jokers additionally", + "have the effect of {C:blue}Blueprint", + }, + unlock = { + "Discover at least", + "{C:attention}300{} items from", + "your collection", + }, + }, b_cry_e_deck = { name = "Edition Deck", text = { @@ -144,6 +156,17 @@ return { "Use {C:spectral}Vacuum", }, }, + b_cry_herculean = { + name = "Herculean Deck", + text = { + "When defeating a {C:attention}Boss Blind", + "{C:red} without using discards,", + "create {C:attention}2{} Epic Tags", + }, + unlock = { + "Obtain an {C:cry_epic}Epic{C:attention} Joker", + }, + }, b_cry_glowing = { name = "Glowing Deck", text = { @@ -169,6 +192,20 @@ return { "{C:attention}6{} or more cards", }, }, + b_cry_magenta = { + name = "Magenta Deck", + text = { + "When selling a Joker with", + "a sell value {C:attention}greater than {C:money}$0", + "create an {C:green}Uncommon{} Joker", + "with {C:money}$1{} less sell value", + }, + unlock = { + "Discover at least", + "{C:attention}250{} items from", + "your collection", + }, + }, b_cry_misprint = { name = "Misprint Deck", text = {