diff --git a/assets/1x/crossmod/crossmod_consumables.png b/assets/1x/crossmod/crossmod_consumables.png index 195d1197..4e413706 100644 Binary files a/assets/1x/crossmod/crossmod_consumables.png and b/assets/1x/crossmod/crossmod_consumables.png differ diff --git a/assets/2x/crossmod/crossmod_consumables.png b/assets/2x/crossmod/crossmod_consumables.png index 3c566771..f97c9a5e 100644 Binary files a/assets/2x/crossmod/crossmod_consumables.png and b/assets/2x/crossmod/crossmod_consumables.png differ diff --git a/compat/compat_loader.lua b/compat/compat_loader.lua index 92f961fb..bbf4b399 100644 --- a/compat/compat_loader.lua +++ b/compat/compat_loader.lua @@ -9,7 +9,8 @@ local i = { "compat/revosvault", "compat/aikoshen", "compat/tspectrals", - "compat/grabbag" + "compat/grabbag", + "compat/hotpotato" } Entropy.load_files(i) diff --git a/compat/hotpotato.lua b/compat/hotpotato.lua new file mode 100644 index 00000000..073b7bc9 --- /dev/null +++ b/compat/hotpotato.lua @@ -0,0 +1,413 @@ +-- Hotpotato crossmod stuff +-- MTX cards are the inverse of Aura cards + +if (SMODS.Mods["HotPotato"] or {}).can_load then + SMODS.ConsumableType({ + key = "mtx", + collection_rows = { 4, 4 }, + primary_colour = G.C.GREEN, + secondary_colour = G.C.GREEN, + shop_rate = nil, + }) + -- Inverse justice aura, aka "Extra Joker" + SMODS.Consumable({ + key = "extrajoker", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_justice", + atlas = "crossmod_consumables", + pos = { + x = 5, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + slots = 1, + credits = 700 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.slots, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + if G.jokers then + G.jokers.config.card_limit = G.jokers.config.card_limit + card.ability.extra.slots + end + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "unstick", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_fear", + atlas = "crossmod_consumables", + pos = { + x = 6, + y = 5 + }, + set_badges = function(self, card, badges) + SMODS.create_mod_badges({ mod = SMODS.find_mod("HotPotato")[1] }, badges) + end, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + credits = 300 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + for k, v in ipairs(G.jokers.cards) do + G.E_MANAGER:add_event(Event({ + func = function() + for _, sticker in pairs(SMODS.Stickers) do + sticker:apply(v, false) + end + v:juice_up() + play_sound('card1') + return true + end, + })) + end + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "extrahands", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_perception", + atlas = "crossmod_consumables", + pos = { + x = 7, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + hands = 1, + credits = 500 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.hands, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + G.GAME.round_resets.hands = G.GAME.round_resets.hands + card.ability.extra.hands + ease_hands_played(card.ability.extra.hands) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "moneybundle", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_greatness", + atlas = "crossmod_consumables", + pos = { + x = 8, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + dollars = 50, + credits = 500 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.dollars, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + ease_dollars(card.ability.extra.dollars) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "biggerpockets", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_clairvoyance", + atlas = "crossmod_consumables", + pos = { + x = 5, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + slots = 1, + credits = 600 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.slots, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + G.consumeables.config.card_limit = G.consumeables.config.card_limit + card.ability.extra.slots + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "deckfix", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_tenacity", + atlas = "crossmod_consumables", + pos = { + x = 6, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + max_highlighted = 5, + credits = 200 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.max_highlighted, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.hand and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.extra.max_highlighted then + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + SMODS.destroy_cards(G.hand.highlighted) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "generousdonation", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_lunacy", + atlas = "crossmod_consumables", + pos = { + x = 7, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + credits = 1 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = {card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) +end diff --git a/localization/en-us.lua b/localization/en-us.lua index 8acd43ed..fdebe4ca 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -5180,6 +5180,58 @@ local decs = { } }, }, + mtx = { + c_entr_extrajoker = { + name = "Extra Jokers", + text = { + "{C:attention}+#1# Joker Slot{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_unstick = { + name = "Unstick", + text = { + "Remove ALL {C:attention}stickers{}", + "from your {C:attention}Jokers{}", + "{C:purple}-c.#1#{}" + } + }, + c_entr_extrahands = { + name = "Extra Hands", + text = { + "{C:blue}+#1# Hand{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_moneybundle = { + name = "Bundle of Dollars", + text = { + "{C:money}+$#1#{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_biggerpockets = { + name = "Bigger Pockets", + text = { + "{C:attention}+#1# Consumable Slot{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_deckfix = { + name = "Deckfix", + text = { + "Destroy up to {C:attention}#1#{}", + "selected cards", + "{C:purple}-c.#2#{}" + } + }, + c_entr_generousdonation = { + name = "Generous Donation", + text = { + "{C:purple}-c.#1#{}" + } + }, + }, Other = { antipattern_pair = { name = "Poker hand Pair", @@ -5836,6 +5888,9 @@ local decs = { k_transient = "Transient", b_transient_cards = "Transient Cards", + k_mtx = "MTX", + b_mtx_cards = "MTX Cards", + k_inverted = "Inverted", k_inverted_pack = "Twisted Pack", k_voucher_pack = "Voucher Pack",