diff --git a/assets/1x/joker.png b/assets/1x/joker.png index 2c1148a..02982e2 100644 Binary files a/assets/1x/joker.png and b/assets/1x/joker.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index d16bb97..645cbc4 100644 Binary files a/assets/2x/back.png and b/assets/2x/back.png differ diff --git a/assets/2x/blind.png b/assets/2x/blind.png index 67de61c..99495d1 100644 Binary files a/assets/2x/blind.png and b/assets/2x/blind.png differ diff --git a/assets/2x/charm.png b/assets/2x/charm.png index 4998714..e875133 100644 Binary files a/assets/2x/charm.png and b/assets/2x/charm.png differ diff --git a/assets/2x/icon.png b/assets/2x/icon.png index 8494114..3717c95 100644 Binary files a/assets/2x/icon.png and b/assets/2x/icon.png differ diff --git a/assets/2x/joker.png b/assets/2x/joker.png index 2e45806..86406e5 100644 Binary files a/assets/2x/joker.png and b/assets/2x/joker.png differ diff --git a/assets/2x/seal.png b/assets/2x/seal.png index 794c9fd..1fdc640 100644 Binary files a/assets/2x/seal.png and b/assets/2x/seal.png differ diff --git a/assets/2x/spectral.png b/assets/2x/spectral.png index 0a0220d..d489ad6 100644 Binary files a/assets/2x/spectral.png and b/assets/2x/spectral.png differ diff --git a/assets/2x/tag.png b/assets/2x/tag.png index ae2db7e..ee1d461 100644 Binary files a/assets/2x/tag.png and b/assets/2x/tag.png differ diff --git a/config.lua b/config.lua index 11eb6d1..0f457b0 100644 --- a/config.lua +++ b/config.lua @@ -3,7 +3,6 @@ return { harsh_ante_scaling = true, illusion_seal = true, import_funky = false, - no_highlight_limit = true, no_wild_debuff = true, scribable_basket = false, } diff --git a/localization/en-us.lua b/localization/en-us.lua index 82acfc2..6059911 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -120,7 +120,7 @@ return { Joker = { j_Roland_arctic = { name = "Arctic Circle", - text = {"Retrigger all", "{C:dark_edition}Frozen {}cards"}, + text = {"Retrigger {C:dark_edition}Frozen {}cards", "Retrigger playing cards"}, }, j_Roland_basket = { name = "Basket", @@ -147,16 +147,6 @@ return { "{C:inactive}(Currently {C:red}+#3#{C:inactive} Mult)", }, }, - j_Roland_escapey = { - name = "Escapey", - text = { - "Use to sell {C:attention}tags", - "for {X:money,C:white}$#1#X{} each", - "{s:0.75}If any {C:attention,s:0.75}consumables", - "{s:0.75}are unselected, sell", - "{s:0.75}those for {C:money,s:0.75}$#2# {s:0.75}instead", - }, - }, j_Roland_hardboiled = { name = "Hard-Boiled", text = { @@ -390,16 +380,13 @@ return { b_Roland_disabled = "Disabled", b_Roland_enabled = "Enabled", b_Roland_comma = ", ", - b_Roland_debuffed = "DEBUFFED", b_Roland_entering_shop = "Entering shop!", - b_Roland_escape = "ESCAPE", b_Roland_equinox_assist = "Assist: Only hide text (Equinox)", b_Roland_scribable_basket = "Scribable Basket (overpowered)", b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)", b_Roland_illusion_seal = "Allow seals from Illusion voucher", b_Roland_import_funky = "Debug: Import funky.lua", b_Roland_most_common_card = "(Rank)", - b_Roland_no_highlight_limit = "No consumable highlight limit", b_Roland_no_wild_debuff = "No wild card debuffs", b_Roland_na = "N/A", b_Roland_of = " of ", diff --git a/manifest.json b/manifest.json index f34ccbf..1b3790f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.3.1", + "version": "2.4.0", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/joker.lua b/src/joker.lua index e07390c..8647c04 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -1,4 +1,4 @@ -local f, q, u = unpack(... or require "lib.shared") +local f, q = unpack(... or require "lib.shared") local negative = {key = "e_negative_consumable", set = "Edition", config = {extra = 1}} @@ -33,10 +33,6 @@ local joker = (function() end end)() -local function destructible(card) - return not card.highlighted and not (card.ability or {}).eternal -end - ---@param card Card local function is_frozen(card) return card.edition and card.edition.key == "e_Roland_frozen" @@ -55,82 +51,7 @@ SMODS.Sound { } joker { - key = "escapey", - pronouns = "they_them", - config = {extra = {money = 2, xmoney = 1.5}}, - attributes = {"destroy_card", "economy", "tag"}, - cost = 4, - rarity = 2, - sinis = true, - soul_pos = true, - eternal_compat = true, - blueprint_compat = false, - perishable_compat = true, - loc_vars = function(_, _, card) - return {vars = {card.ability.extra.xmoney, card.ability.extra.money}} - end, - Bakery_can_use = function(_, card) - return u() and - not card.debuff and - not G.GAME.modifiers.Roland_debuff_escapey and - (next(G.GAME.tags) or f(G.consumeables.cards):any(destructible)) - end, - Bakery_use_button_text = function(_, card) - return localize { - type = "variable", - key = (card.debuff or G.GAME.modifiers.Roland_debuff_escapey) and "b_Roland_debuffed" or "b_Roland_escape" - } - end, - Bakery_use_joker = function(self, card) - if card.debuff then - return - end - - local times, xtimes = 0, 0 - local extra = card.ability.extra - - f(G.consumeables.cards):where(destructible):each(function(v) - v:start_dissolve({HEX "57ecabff"}, nil, 1.6) - times = times + 1 - end) - - if times == 0 then - local delay = #G.GAME.tags >= self.tag_threshold and 0 or 1 / #G.GAME.tags - local trigger = delay == 0 and "immediate" or "before" - - f(G.GAME.tags):each(function(v) - q { - blocking = delay ~= 0, - delay = delay, - trigger = trigger, - func = function() - attention_text { - scale = 0.7, - align = "cm", - text = "ESC", - cover = v.HUD_tag, - colour = G.C.WHITE, - cover_colour = G.C.BLACK, - hold = 0.3 / G.SETTINGS.GAMESPEED, - } - - play_sound("cancel", 1.66, 0.5) - v.HUD_tag.states.visible = false - v:remove() - end, - } - - xtimes = xtimes + 1 - end) - end - - ease_dollars(math.ceil(times * extra.money + G.GAME.dollars * (math.pow(extra.xmoney, xtimes) - 1))) - end, - tag_threshold = 30, -} - -joker { - key = "msjoker", -- Blue bow + key = "msjoker", pronouns = "she_her", cost = 1, rarity = 1, @@ -735,7 +656,7 @@ joker { config = {extra = {flipped = false}}, attributes = {"xmult"}, cost = 0, - rarity = 3, + rarity = 2, eternal_compat = true, blueprint_compat = true, perishable_compat = true, @@ -779,7 +700,7 @@ joker { pronouns = "it_its", cost = 10, rarity = 3, - config = {extra = {repetitions = 1}}, + config = {extra = {[false] = 1, [true] = 2}}, attributes = {"retrigger", "editions"}, eternal_compat = true, blueprint_compat = true, @@ -788,15 +709,19 @@ joker { table.insert(info_queue, G.P_CENTERS.e_Roland_frozen) end, calculate = function(_, card, context) - return (context.repetition and is_frozen(context.other_card)) and {repetitions = 1} or SMODS.merge_effects( - f(G.jokers.cards):where(is_frozen):map(function(v) - return SMODS.blueprint_effect(card, v, context) or true - end):where(function(v) - return type(v) == "table" - end):map(function(v) - v.colour = G.C.BLACK - return v - end):table() - ) + return context.repetition and {repetitions = card.ability.extra[is_frozen(context.other_card)]} or + SMODS.merge_effects( + f(G.jokers.cards):where(is_frozen):map(function(v) + return SMODS.blueprint_effect(card, v, context) or true + end):where(function(v) + return type(v) == "table" + end):map(function(v) + v.colour = G.C.DARK_EDITION + return v + end):values():table() + ) + end, + in_pool = function() + return not not f(G.playing_cards):concat(G.jokers.cards):any(is_frozen) end, } diff --git a/src/main.lua b/src/main.lua index 4302b25..e40381d 100644 --- a/src/main.lua +++ b/src/main.lua @@ -48,6 +48,8 @@ SMODS.Atlas { path = "icon.png", } +SMODS.current_mod.qol = qol + function SMODS.current_mod.config_tab() return { n = G.UIT.ROOT, @@ -58,7 +60,6 @@ function SMODS.current_mod.config_tab() nodes = { toggle "illusion_seal", toggle "no_wild_debuff", - toggle "no_highlight_limit", _G["Talisman"] and toggle "harsh_ante_scaling", G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket", toggle "equinox_assist", diff --git a/src/tweaks.lua b/src/tweaks.lua index 4fbef92..4548115 100644 --- a/src/tweaks.lua +++ b/src/tweaks.lua @@ -1,21 +1,9 @@ local f, q = unpack(... or require "lib.shared") SMODS.Joker:take_ownership("joker", {cost = 1}, true) -local orig_can_highlight = CardArea.can_highlight local orig_set_debuff = Card.set_debuff -local orig_highlight = Card.highlight local orig_copy_card = copy_card -function CardArea:can_highlight(...) - if self ~= G.consumeables or not SMODS.Mods.Roland.config.no_highlight_limit then - return orig_can_highlight(self, ...) - end - - --- Allows more flexibility when using the Escapey joker to delete specific consumables. - self.config.highlighted_limit = 1 / 0 - return true -end - function Card:set_debuff(...) if SMODS.get_enhancements(self).m_wild and SMODS.Mods.Roland.config.no_wild_debuff then self.debuff = false @@ -24,14 +12,6 @@ function Card:set_debuff(...) end end -function Card:highlight(is_highlighted, ...) - self.highlighted = is_highlighted - - if not G.CONTROLLER.HID.controller or not SMODS.Mods.Roland.config.no_highlight_limit then - return orig_highlight(self, is_highlighted, ...) - end -end - local orig_use_consumeable = Card.use_consumeable function Card:use_consumeable(area, copier, ...)