diff --git a/assets/1x/crossmod/crossmod_consumables.png b/assets/1x/crossmod/crossmod_consumables.png index 195d1197..6678ef76 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..e7fa1cbd 100644 Binary files a/assets/2x/crossmod/crossmod_consumables.png and b/assets/2x/crossmod/crossmod_consumables.png differ diff --git a/compat/bunco.lua b/compat/bunco.lua new file mode 100644 index 00000000..8b8cca57 --- /dev/null +++ b/compat/bunco.lua @@ -0,0 +1,348 @@ +if (SMODS.Mods["Bunco"] or {}).can_load then + + --TODO: commented out because banishing playing cards is a fuck. Somebody else's problem. + --[[ + local disturbance = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 34, + key = "disturbance", + set = "Fraud", + + inversion = "c_bunc_adjustment", + + atlas = "crossmod_consumables", + config = { + select = 3 + }, + pos = {x=8,y=0}, + use = function(self, card2) + local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + for i, v in pairs(cards) do + local card = cards[i] + G.E_MANAGER:add_event(Event({ + func = function() + G.GAME.banned_keys[card.config.center.key] = true + return true + end + })) + end + + end, + can_use = function(self, card) + local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + return num > 0 and num <= card.ability.select + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.select + } + } + end, + entr_credits = { + idea = {"Athebyne"} + }, + + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + ]]-- + + + --TODO: commented out because boosters that come from a consumable are a fuck, especially with multiple at once. Somebody else's problem. + --[[ + local avarice = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 35, + key = "avarice", + set = "Fraud", + + inversion = "c_bunc_lust", + + atlas = "crossmod_consumables", + config = { + boosters = 3 + }, + pos = {x=10,y=0}, + use = function(self, card) + for i = 1, math.min(card.ability.boosters, 20) do + G.E_MANAGER:add_event(Event({ + trigger = "before", + blocking = false, + func = function() + if ((G.STATE == G.STATES.SMODS_BOOSTER_OPENED) or G.pack_cards) then return false end + local key = "p_standard_normal_1" + local booster = Card( + G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2, + G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2, + G.CARD_W * 1.27, + G.CARD_H * 1.27, + G.P_CARDS.empty, + G.P_CENTERS[key], + { bypass_discovery_center = true, bypass_discovery_ui = true } + ) + booster.cost = 0 + booster.from_tag = true + G.FUNCS.use_card({ config = { ref_table = booster } }) + booster:start_materialize() + return true + end, + })) + end + end, + can_use = function(self, card) + return not (G.STATE == G.STATES.SMODS_BOOSTER_OPENED) + end, + loc_vars = function(self, q, card) return {vars = {math.min(card.ability.boosters, 20)}} end, + entr_credits = { + idea = {"Athebyne"} + }, + + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + ]]-- + + local muse = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 36, + key = "muse", + set = "Fraud", + + inversion = "c_bunc_art", + + atlas = "crossmod_consumables", + config = { + min_highlighted = 2, + max_highlighted = 2 + }, + pos = {x=9,y=0}, + use = function(self, card) + link_cards(G.hand.highlighted, self.key) + card:juice_up(0.3, 0.5) + end, + can_use = function(self, card) + if G.hand then + local cards = G.hand.highlighted + -- Group check: + for i = 1, #cards do + if cards[i].ability.group then return false end + end + if #cards > 1 and #cards <= card.ability.max_highlighted then + return true + end + end + return false + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.min_highlighted + } + } + end, + entr_credits = { + idea = {"Athebyne"} + }, + + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + + local garden = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 37, + key = "garden", + set = "Fraud", + + inversion = "c_bunc_universe", + + atlas = "crossmod_consumables", + config = { + min_highlighted = 3, + max_highlighted = 3 + }, + pos = {x=11,y=0}, + use = function(self, card) + local new_suit = pseudorandom_element(SMODS.Suits, pseudoseed('microcosm')).key + local new_rank = pseudorandom_element(SMODS.Ranks, pseudoseed('microcosm')).key + for _, playing_card in ipairs(G.hand.cards) do + if playing_card.highlighted then + G.E_MANAGER:add_event(Event({delay = 0.2, trigger = 'before', func = function() + i = i and (i + 1) or 1 + play_sound('card1', 0.85 + (i * 0.05)) + playing_card:juice_up(0.7) + SMODS.change_base(playing_card, new_suit, new_rank) + return true end})) + end + end + end, + can_use = function(self, card) + if G.hand and #G.hand.highlighted <= card.ability.max_highlighted and #G.hand.highlighted >= card.ability.min_highlighted then + return true + end + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.max_highlighted + } + } + end, + entr_credits = { + idea = {"Athebyne"} + }, + + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + + local desert = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 38, + key = "desert", + set = "Fraud", + + inversion = "c_bunc_sky", + + atlas = "crossmod_consumables", + config = { + -- consistent with bunco's exotic suits, buffs to them are stronger than buffs to the standard four. + per_level = 15 + }, + pos = {x=8,y=1}, + use = function(self, card2) + Entropy.LevelSuit("bunc_Fleurons", card2, 1, card2.ability.per_level) + end, + bulk_use = function(self, card2, _, _, amount) + Entropy.LevelSuit("bunc_Fleurons", card2, amount, card2.ability.per_level) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + if not G.GAME.SuitBuffs then G.GAME.SuitBuffs = {} end + if not G.GAME.SuitBuffs["bunc_Fleurons"] then G.GAME.SuitBuffs["bunc_Fleurons"] = {} end + return { + vars = { + G.GAME.SuitBuffs["bunc_Fleurons"].level or 1, + "", + localize("bunc_Fleurons",'suits_plural'), + card.ability.per_level, + colours = { + to_big(G.GAME.SuitBuffs["bunc_Fleurons"].level or 1) < to_big(2) and G.C.BLACK or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.SuitBuffs["bunc_Fleurons"].level or 1))] + } + } + } + end, + in_pool = function(self) + return BUNCOMOD.funcs.exotic_in_pool() + end, + entr_credits = { + idea = {"Athebyne"} + }, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + + local wastes = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = -900 + 39, + key = "wastes", + set = "Fraud", + + inversion = "c_bunc_abyss", + + atlas = "crossmod_consumables", + config = { + -- consistent with bunco's exotic suits, buffs to them are stronger than buffs to the standard four. + per_level = 15 + }, + pos = {x=9,y=1}, + use = function(self, card2) + Entropy.LevelSuit("bunc_Halberds", card2, 1, card2.ability.per_level) + end, + bulk_use = function(self, card2, _, _, amount) + Entropy.LevelSuit("bunc_Halberds", card2, amount, card2.ability.per_level) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + if not G.GAME.SuitBuffs then G.GAME.SuitBuffs = {} end + if not G.GAME.SuitBuffs["bunc_Halberds"] then G.GAME.SuitBuffs["bunc_Halberds"] = {} end + return { + vars = { + G.GAME.SuitBuffs["bunc_Halberds"].level or 1, + "", + localize("bunc_Halberds",'suits_plural'), + card.ability.per_level, + colours = { + to_big(G.GAME.SuitBuffs["bunc_Halberds"].level or 1) < to_big(2) and G.C.BLACK or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.SuitBuffs["bunc_Halberds"].level or 1))] + } + } + } + end, + in_pool = function(self) + return BUNCOMOD.funcs.exotic_in_pool() + end, + entr_credits = { + idea = {"Athebyne"} + }, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + + return { + items = { + --disturbance, + --avarice, + muse, + garden, + desert, + wastes + } + } +end \ No newline at end of file diff --git a/compat/compat_loader.lua b/compat/compat_loader.lua index 92f961fb..bb745745 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/bunco" } Entropy.load_files(i) diff --git a/localization/en-us.lua b/localization/en-us.lua index 40236a54..92c74859 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2048,6 +2048,50 @@ local decs = { "and {C:attention}distribute{} their modifications", "between {C:attention}other{} cards held in hand" } + }, + c_entr_disturbance = { + name = "The Disturbance", + text = { + "Banish {C:attention}#1#{} selected card#1#", + "Without {C:attention}destroying{} them" + } + }, + c_entr_avarice = { + name = "Avarice", + text = { + "Immediately open {C:attention}#1#{} Standard Packs" + } + }, + c_entr_muse = { + name = "The Muse", + text = { + "{C:attention}Link together{} any", + "#1# selected cards" + } + }, + --Description feels awkwardly worded. + c_entr_garden = { + name = "The Garden", + text = { + "{C:attention} Randomize{} the rank and suit of {C:attention}#1#{} cards", + "all into the same rank and suit" + } + }, + c_entr_desert = { + name = "The Desert", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}Fleurons", + "{C:blue}+#4#{} Chips" + } + }, + c_entr_wastes = { + name = "The Wastes", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}Halberds", + "{C:blue}+#4#{} Chips" + } } }, Planet = {