From 9ad4def87d199542a88eddab09c6ac3046b1f287 Mon Sep 17 00:00:00 2001 From: ThorsGirdle Date: Sat, 16 May 2026 03:07:22 -0500 Subject: [PATCH 1/3] Add Deerling line --- pokemon/pokejokers_20.lua | 204 +++++++++++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) diff --git a/pokemon/pokejokers_20.lua b/pokemon/pokejokers_20.lua index f0fb2138..8c78b54e 100644 --- a/pokemon/pokejokers_20.lua +++ b/pokemon/pokejokers_20.lua @@ -394,7 +394,209 @@ local vanilluxe={ attributes = {"chips", "scaling", "food", "tag", "generation"}, } -- Deerling 585 +local deerling = { + name = "deerling", + pos = {x = 4, y = 1}, + config = {extra = {mult_mod = 1, mult = 0, check = true, form = "Summer", targets = {{suit = "Spades"}}}, evo_rqmt = 12}, + loc_vars = function(self, info_queue, card) + type_tooltip(self, info_queue, card) + if pokermon_config.detailed_tooltips then + info_queue[#info_queue+1] = {set = 'Other', key = 'nature', vars = {"suit"}} + end + --local card_vars = {card.ability.extra.mult_mod, card.ability.extra.mult, self.config.evo_rqmt, card.ability.extra.targets.suit, colours = {G.C.SUITS["Spades"]}} + local abbr = card.ability.extra + return {vars = {abbr.mult_mod, abbr.mult, self.config.evo_rqmt, abbr.targets[1].suit, colours = {G.C.SUITS[abbr.targets[1].suit or "Spades"]}}} + end, + rarity = 1, --Common + cost = 6, + stage = "Basic", + ptype = "Grass", + gen = 5, + designer = "Thor's Girdle", + atlas = "AtlasJokersBasicGen05", + perishable_compat = false, + blueprint_compat = true, + eternal_compat = true, + + calculate = function(self, card, context) + if context.before and not context.blueprint then + local wrongSuit = false + for _, playing_card in ipairs(context.scoring_hand) do + if not playing_card:is_suit(card.ability.extra.targets[1].suit) then + wrongSuit = true + break + end + end + if wrongSuit then + local last_mult = card.ability.extra.mult + card.ability.extra.mult = 0 + if last_mult > 0 then + return { + message = localize('k_reset') + } + end + else + card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod + end + end + + if context.joker_main then + return { + mult = card.ability.extra.mult + } + end + + --this is literally just so it works with spawning from DebugPlus + if card.ability.extra.check then + self:set_sprites(card) + card.ability.extra.check = false + end + + return scaling_evo(self, card, context, "j_poke_sawsbuck", card.ability.extra.mult, self.config.evo_rqmt) + end, + + set_ability = function(self, card, initial, delay_sprites) + if initial then + self:set_nature(card) + end + end, + + set_nature = function(self, card) + if card.ability and card.ability.extra and card.ability.extra.targets and card.ability.extra.targets[1] and card.ability.extra.targets[1].suit then + card.ability.extra.targets = get_poke_target_card_suit("deerling", true, 'Spades') + if card.ability.extra.targets[1].suit == "Hearts" then + card.ability.extra.form = "Spring" + elseif card.ability.extra.targets[1].suit == "Spades" then + card.ability.extra.form = "Summer" + elseif card.ability.extra.targets[1].suit == "Diamonds" then + card.ability.extra.form = "Autumn" + elseif card.ability.extra.targets[1].suit == "Clubs" then + card.ability.extra.form = "Winter" + else + card.ability.extra.form = "Summer" + end + self:set_sprites(card) + end + end, + + set_sprites = function(self, card, front) + if card.ability and card.ability.extra and card.ability.extra.form then + if card.ability.extra.form == "Spring" then + card.children.center:set_sprite_pos({x = 2, y = 1}) + elseif card.ability.extra.form == "Summer" then + card.children.center:set_sprite_pos({x = 4, y = 1}) + elseif card.ability.extra.form == "Autumn" then + card.children.center:set_sprite_pos({x = 6, y = 1}) + elseif card.ability.extra.form == "Winter" then + card.children.center:set_sprite_pos({x = 8, y = 1}) + end + else + self:set_nature(card) + end + + end, + +} -- Sawsbuck 586 +local sawsbuck = { + name = "sawsbuck", + pos = {x = 0, y = 2}, + config = {extra = {mult_mod = 2, mult = 0, check = true, form = "Summer", targets = {{suit = "Spades"}}}}, + loc_vars = function(self, info_queue, card) + type_tooltip(self, info_queue, card) + if pokermon_config.detailed_tooltips then + info_queue[#info_queue+1] = {set = 'Other', key = 'nature', vars = {"suit"}} + end + --local card_vars = {card.ability.extra.mult_mod, card.ability.extra.mult, card.ability.extra.targets.suit} + local abbr = card.ability.extra + return {vars = {abbr.mult_mod, abbr.mult, abbr.targets[1].suit, colours = {G.C.SUITS[abbr.targets[1].suit or "Spades"]}}} + end, + rarity = "poke_safari", + cost = 7, + stage = "One", + ptype = "Grass", + gen = 5, + designer = "Thor's Girdle", + atlas = "AtlasJokersBasicGen05", + perishable_compat = false, + blueprint_compat = true, + eternal_compat = true, + + calculate = function(self, card, context) + if context.before and not context.blueprint then + local wrongSuit = false + for _, playing_card in ipairs(context.scoring_hand) do + if not playing_card:is_suit(card.ability.extra.targets[1].suit) then + wrongSuit = true + break + end + end + if wrongSuit then + local last_mult = card.ability.extra.mult + card.ability.extra.mult = 0 + if last_mult > 0 then + return { + message = localize('k_reset') + } + end + else + card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod + end + end + + if context.joker_main then + return { + mult = card.ability.extra.mult + } + end + + if card.ability.extra.check then + self:set_sprites(card) + card.ability.extra.check = false + end + end, + + set_ability = function(self, card, initial, delay_sprites) + if initial then + self:set_nature(card) + end + end, + + set_nature = function(self, card) + if card.ability and card.ability.extra and card.ability.extra.targets and card.ability.extra.targets[1] and card.ability.extra.targets[1].suit then + card.ability.extra.targets = get_poke_target_card_suit("sawsbuck", true, 'Spades') + if card.ability.extra.targets[1].suit == "Hearts" then + card.ability.extra.form = "Spring" + elseif card.ability.extra.targets[1].suit == "Spades" then + card.ability.extra.form = "Summer" + elseif card.ability.extra.targets[1].suit == "Diamonds" then + card.ability.extra.form = "Autumn" + elseif card.ability.extra.targets[1].suit == "Clubs" then + card.ability.extra.form = "Winter" + else + card.ability.extra.form = "Summer" + end + self:set_sprites(card) + end + end, + + set_sprites = function(self, card, front) + if card.ability and card.ability.extra and card.ability.extra.form then + if card.ability.extra.form == "Spring" then + card.children.center:set_sprite_pos({x = 10, y = 1}) + elseif card.ability.extra.form == "Summer" then + card.children.center:set_sprite_pos({x = 0, y = 2}) + elseif card.ability.extra.form == "Autumn" then + card.children.center:set_sprite_pos({x = 2, y = 2}) + elseif card.ability.extra.form == "Winter" then + card.children.center:set_sprite_pos({x = 4, y = 2}) + end + else + self:set_nature(card) + end + + end, +} -- Emolga 587 -- Karrablast 588 -- Escavalier 589 @@ -581,5 +783,5 @@ local ferrothorn={ -- Klink 599 -- Klang 600 return {name = "Pokemon Jokers 570-600", - list = {zoroark, gothita, gothorita, gothitelle, vanillite, vanillish, vanilluxe, frillish, jellicent, ferroseed, ferrothorn}, + list = {zoroark, gothita, gothorita, gothitelle, vanillite, vanillish, vanilluxe, deerling, sawsbuck, frillish, jellicent, ferroseed, ferrothorn}, } From ca159177a705e3b487d1709f625278322d7a375e Mon Sep 17 00:00:00 2001 From: ThorsGirdle Date: Sat, 16 May 2026 03:08:06 -0500 Subject: [PATCH 2/3] Add files via upload --- localization/en-us.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/localization/en-us.lua b/localization/en-us.lua index aeb8b93b..df3ad01a 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -4928,6 +4928,25 @@ return { "create {C:attention}#3# Double Tags{} " } }, + j_poke_deerling = { + name = 'Deerling', + text = { + "{C:attention}Nature:{} {C:inactive}({V:1}#4#{C:inactive})", + "Gain {C:mult}+#1#{} Mult per {C:attention}consecutive{} played", + "hand with only scoring {C:attention}Nature{} cards", + "{C:inactive}(Currently {C:mult}+#2#{C:inactive} Mult)", + "{C:inactive,s:0.8}(Evolves at {C:mult,s:0.8}+#3#{C:inactive,s:0.8} Mult)", + } + }, + j_poke_sawsbuck = { + name = 'Sawsbuck', + text = { + "{C:attention}Nature:{} {C:inactive}({V:1}#3#{C:inactive})", + "Gain {C:mult}+#1#{} Mult per {C:attention}consecutive{} played", + "hand with only scoring {C:attention}Nature{} cards", + "{C:inactive}(Currently {C:mult}+#2#{C:inactive} Mult)", + } + }, j_poke_frillish = { name = "Frillish", text = { From 19b824e86c689fb77ecde7e1a0bad8540bad335b Mon Sep 17 00:00:00 2001 From: ThorsGirdle Date: Wed, 3 Jun 2026 00:55:01 -0500 Subject: [PATCH 3/3] Fix for the Ankh bug I mentioned --- pokemon/pokejokers_20.lua | 146 +++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 82 deletions(-) diff --git a/pokemon/pokejokers_20.lua b/pokemon/pokejokers_20.lua index 8c78b54e..815a685f 100644 --- a/pokemon/pokejokers_20.lua +++ b/pokemon/pokejokers_20.lua @@ -4,6 +4,16 @@ local zoroark = { pos = { x = 7, y = 5 }, soul_pos = { x = 99, y = 99 }, config = {extra = {hidden_key = nil}}, + loc_vars = function(self, info_queue, card) + local main_end + + if card.area and card.area == G.jokers then + local other_joker = G.jokers.cards[#G.jokers.cards] + main_end = poke_blueprint_compat_ui(card ~= other_joker and other_joker) + end + + return {main_end = main_end} + end, rarity = "poke_safari", cost = 12, stage = "One", @@ -11,6 +21,13 @@ local zoroark = { atlas = "Pokedex5", gen = 5, blueprint_compat = true, + get_illusion = function(self, card) + if card.ability and card.ability.extra + and card.area ~= G.jokers + and not poke_is_in_collection(card) then + return G.P_CENTERS[card.ability.extra.hidden_key] + end + end, calculate = function(self, card, context) local other_joker = G.jokers.cards[#G.jokers.cards] if other_joker and other_joker ~= card then @@ -20,101 +37,51 @@ local zoroark = { end end, set_card_type_badge = function(self, card, badges) - local card_type = SMODS.Rarity:get_rarity_badge(card.config.center.rarity) - local card_type_colour = get_type_colour(card.config.center or card.config, card) - if card.area ~= G.jokers and not poke_is_in_collection(card) then - local _o = G.P_CENTERS[card.ability.extra.hidden_key] - card_type = SMODS.Rarity:get_rarity_badge(_o.rarity) - card_type_colour = get_type_colour(_o, card) - end - badges[#badges + 1] = create_badge(card_type, card_type_colour, nil, 1.2) + poke_set_card_type_badge(card, badges, self:get_illusion(card)) end, set_sprites = function(self, card, front) - if card.ability and card.ability.extra and card.ability.extra.hidden_key then - self:set_ability(card) + local center = self:get_illusion(card) + if center then + card:set_sprites(center) end end, set_ability = function(self, card, initial, delay_sprites) - if not type_sticker_applied(card) and not poke_is_in_collection(card) and not G.SETTINGS.paused then - apply_type_sticker(card, "Dark") + if card.area ~= G.jokers and not poke_is_in_collection(card) then + -- Initialize the Illusion + if not type_sticker_applied(card) then apply_type_sticker(card, "Dark") end + if not card.ability.extra.hidden_key then + card.ability.extra.hidden_key = get_random_poke_key_options { + key_append = 'zoroark', + rarity = 'poke_safari', + exclude_types = 'Dark', + } + end + + self:set_sprites(card) end - G.E_MANAGER:add_event(Event({ - func = function() - if card.area ~= G.jokers and not G.SETTINGS.paused then - card.ability.extra.hidden_key = card.ability.extra.hidden_key or get_random_poke_key('zoroark', nil, 'poke_safari', nil, nil, {j_poke_zoroark = true}) - local _o = G.P_CENTERS[card.ability.extra.hidden_key] - card.children.center.atlas = SMODS.get_atlas(_o.atlas) - card.children.center:set_sprite_pos(_o.pos) - else - card.children.center.atlas = SMODS.get_atlas(self.atlas) - card.children.center:set_sprite_pos(self.pos) - end - return true - end })) + end, + add_to_deck = function(self, card, from_debuff) + card.ability.extra.hidden_key = nil + poke_reset_sprite(card) end, generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) - local _c = card and card.config.center or card - card.ability.extra.hidden_key = card.ability.extra.hidden_key or get_random_poke_key('zoroark', nil, 'poke_safari', nil, nil, {j_poke_zoroark = true}) - local _o = G.P_CENTERS[card.ability.extra.hidden_key] - if card.area ~= G.jokers and not poke_is_in_collection(card) then - local temp_ability = card.ability - card.ability = _o.config - _o:generate_ui(info_queue, card, desc_nodes, specific_vars, full_UI_table) - card.ability = temp_ability - if full_UI_table.name[1].nodes[1] then - local textDyna = full_UI_table.name[1].nodes[1].nodes[1].config.object - textDyna.string = textDyna.string .. localize("poke_illusion") - textDyna.config.string = {textDyna.string} - textDyna.strings = {} - textDyna:update_text(true) - end - card.children.center.atlas = SMODS.get_atlas(_o.atlas) - card.children.center:set_sprite_pos(_o.pos) - local poketype_list = {Grass = true, Fire = true, Water = true, Lightning = true, Psychic = true, Fighting = true, Colorless = true, Dark = true, Metal = true, Fairy = true, Dragon = true, Earth = true} - for i = #info_queue, 1, -1 do - if info_queue[i].set == "Other" and info_queue[i].key and poketype_list[info_queue[i].key] then - table.remove(info_queue, i) - end - end - else - if not full_UI_table.name then - full_UI_table.name = localize({ type = "name", set = _c.set, key = _c.key, nodes = full_UI_table.name }) - end - card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or '' - card.ability.blueprint_compat_check = nil - local main_end = (card.area and card.area == G.jokers) and { - {n=G.UIT.C, config={align = "bm", minh = 0.4}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "m", colour = G.C.JOKER_GREY, r = 0.05, padding = 0.06, func = 'blueprint_compat'}, nodes={ - {n=G.UIT.T, config={ref_table = card.ability, ref_value = 'blueprint_compat_ui',colour = G.C.UI.TEXT_LIGHT, scale = 0.32*0.8}}, - }} - }} - } or nil - localize{type = 'descriptions', key = _c.key, set = _c.set, nodes = desc_nodes, vars = {}} - desc_nodes[#desc_nodes+1] = main_end + local center = self:get_illusion(card) + if center then + return poke_generate_illusion_ui(center, info_queue, card, desc_nodes, specific_vars, full_UI_table) end + return SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) end, update = function(self, card, dt) - if G.STAGE == G.STAGES.RUN and card.area == G.jokers then + if G.STAGE == G.STAGES.RUN and card.area and card.area == G.jokers then local other_joker = G.jokers.cards[#G.jokers.cards] - card.ability.blueprint_compat = ( other_joker and other_joker ~= card and not other_joker.debuff and other_joker.config.center.blueprint_compat and 'compatible') or 'incompatible' - if card.ability.blueprint_compat == 'compatible' and not card.debuff and other_joker.children.center.atlas.px == 71 then - card.children.center.atlas = other_joker.children.center.atlas - card.children.center:set_sprite_pos(other_joker.children.center.sprite_pos) - if other_joker.children.floating_sprite then - card.children.floating_sprite.atlas = other_joker.children.floating_sprite.atlas - card.children.floating_sprite:set_sprite_pos(other_joker.children.floating_sprite.sprite_pos) - else - card.children.floating_sprite.atlas = SMODS.get_atlas(self.atlas) - card.children.floating_sprite:set_sprite_pos(self.soul_pos) - end + if not card.debuff + and other_joker.children.center.atlas.px == 71 -- Disables Unown Swarm drawing, because I just couldn't be bothered today. + and other_joker and other_joker ~= card + and other_joker.config.center.blueprint_compat then + poke_copy_joker_sprites(card, other_joker) else - card.children.center.atlas = SMODS.get_atlas(card.edition and card.edition.poke_shiny and "poke_AtlasJokersBasicNatdexShiny" or "poke_AtlasJokersBasicNatdex") - card.children.center:set_sprite_pos(self.pos) - card.children.floating_sprite.atlas = SMODS.get_atlas(card.edition and card.edition.poke_shiny and "poke_AtlasJokersBasicNatdexShiny" or "poke_AtlasJokersBasicNatdex") - card.children.floating_sprite:set_sprite_pos(self.soul_pos) + poke_reset_sprite(card) end - elseif poke_is_in_collection(card) and card.children.center.sprite_pos ~= self.pos and card.children.center.atlas.name ~= self.atlas then - self:set_ability(card) end end, attributes = {"copying"}, @@ -452,13 +419,20 @@ local deerling = { card.ability.extra.check = false end - return scaling_evo(self, card, context, "j_poke_sawsbuck", card.ability.extra.mult, self.config.evo_rqmt) + return scaling_evo(self, card, context, "j_stall_sawsbuck", card.ability.extra.mult, self.config.evo_rqmt) end, set_ability = function(self, card, initial, delay_sprites) if initial then self:set_nature(card) end + G.E_MANAGER:add_event(Event({ + blockable = false, + func = function() + self:set_sprites(card) + return true + end + })) end, set_nature = function(self, card) @@ -475,6 +449,7 @@ local deerling = { else card.ability.extra.form = "Summer" end + self:set_sprites(card) end end, @@ -560,6 +535,13 @@ local sawsbuck = { if initial then self:set_nature(card) end + G.E_MANAGER:add_event(Event({ + blockable = false, + func = function() + self:set_sprites(card) + return true + end + })) end, set_nature = function(self, card)