Put all jokers in the same atlas

This commit is contained in:
Emik 2026-02-10 20:29:36 +01:00
parent 74fc8e5811
commit 8a7905ea07
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
16 changed files with 65 additions and 78 deletions

View file

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
assets/1x/joker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

BIN
assets/2x/joker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -11,22 +11,25 @@ end
local back = (function() local back = (function()
local x = 0 local x = 0
return function(b) ---@param tbl SMODS.Back|{alt_apply?: fun(self: SMODS.Back|table, back: Back|table), alt_calculate?: fun(self: SMODS.Back|table, back: Back|table, context: CalcContext|table): table?, boolean?}
local key = b.key return function(tbl)
local apply = b.apply local key = tbl.key
local calculate = b.calculate local apply = tbl.apply
local calculate = tbl.calculate
function b:apply(...) function tbl:apply(...)
---@diagnostic disable-next-line: redundant-return-value
return apply and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and save(apply(self, ...)) return apply and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and save(apply(self, ...))
end end
function b:calculate(...) function tbl:calculate(...)
---@diagnostic disable-next-line: return-type-mismatch
return calculate and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and calculate(self, ...) return calculate and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and calculate(self, ...)
end end
b.pos = {x = x, y = 0} tbl.pos = {x = x, y = 0}
b.atlas = "back" tbl.atlas = "back"
SMODS.Back(b) SMODS.Back(tbl)
x = x + 1 x = x + 1
---@diagnostic disable-next-line: undefined-global ---@diagnostic disable-next-line: undefined-global
@ -37,19 +40,19 @@ local back = (function()
---@diagnostic disable-next-line: undefined-global ---@diagnostic disable-next-line: undefined-global
CardSleeves.Sleeve { CardSleeves.Sleeve {
key = key, key = key,
pos = b.pos, pos = tbl.pos,
atlas = "void", atlas = "void",
config = b.config and f(b.config):into() or nil, config = tbl.config and f(tbl.config):into() or nil,
loc_vars = function(self, ...) loc_vars = function(self, ...)
local ret = b.loc_vars and b.loc_vars(self, ...) or {} local ret = tbl.loc_vars and tbl.loc_vars(self, ...) or {}
ret.key = self:is_alt() and self.key .. "_alt" or self.key ret.key = self:is_alt() and self.key .. "_alt" or self.key
return ret return ret
end, end,
apply = function(self, ...) apply = function(self, ...)
return (b.alt_apply and self:is_alt() and b.alt_apply or apply)(self, ...) return (tbl.alt_apply and self:is_alt() and tbl.alt_apply or apply)(self, ...)
end, end,
calculate = function(self, ...) calculate = function(self, ...)
return (b.alt_calculate and self:is_alt() and b.alt_calculate or calculate)(self, ...) return (tbl.alt_calculate and self:is_alt() and tbl.alt_calculate or calculate)(self, ...)
end, end,
is_alt = function(self) is_alt = function(self)
return self.get_current_deck_key() == "b_Roland_" .. key return self.get_current_deck_key() == "b_Roland_" .. key

View file

@ -1,8 +1,8 @@
local _, q = unpack(... or require "src.functional") local _, q = unpack(... or require "src.functional")
SMODS.Atlas { SMODS.Atlas {
key = "iphone", key = "charm",
path = "iphone.png", path = "charm.png",
px = 68, px = 68,
py = 68, py = 68,
} }
@ -13,8 +13,9 @@ q(function()
local charm = Bakery_API.Charm { local charm = Bakery_API.Charm {
key = "iphone", key = "iphone",
atlas = "iphone", atlas = "charm",
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
alerted = true,
unlocked = true, unlocked = true,
discovered = true, discovered = true,
calculate = function(_, _, context) calculate = function(_, _, context)
@ -33,6 +34,6 @@ q(function()
charm:inject() charm:inject()
charm:process_loc_text() charm:process_loc_text()
-- charm._d, charm._u, charm._saved_d_u = true, true, true -- SMODS._save_d_u(charm) -- SMODS._save_d_u(charm)
SMODS.current_mod = current_mod SMODS.current_mod = current_mod
end) end)

View file

@ -1,5 +1,25 @@
local f, q, u = unpack(... or require "src.functional") local f, q, u = unpack(... or require "src.functional")
local joker = (function()
local z = 0
---@return {x: number, y: number}
local function inc()
local ret = {x = z % 6, y = math.floor(z / 6)}
z = z + 1
return ret
end
---@param tbl SMODS.Joker|{sinis?: boolean|{x: number, y: number}, soul_pos?: boolean|{x: number, y: number}}
return function(tbl)
tbl.pos = inc()
tbl.atlas = "joker"
tbl.soul_pos = tbl.soul_pos and inc() or nil
tbl.sinis = tbl.sinis and inc() or nil
SMODS.Joker(tbl)
end
end)()
local function destructible(card) local function destructible(card)
return not card.highlighted and not (card.ability or {}).eternal return not card.highlighted and not (card.ability or {}).eternal
end end
@ -8,11 +28,9 @@ local function is_carbon(card)
return card.edition and card.edition.key == "e_Bakery_Carbon" return card.edition and card.edition.key == "e_Bakery_Carbon"
end end
local function is_mergeable_with(it) local function is_mergeable_with(x)
return function(card) return function(y)
return it.rank ~= card.rank and return x.rank ~= y.rank and y.label == "j_Roland_escapey" and not (y.ability or {}).eternal
card.label == "j_Roland_escapey" and not
(card.ability or {}).eternal
end end
end end
@ -51,29 +69,20 @@ SMODS.Sound {
} }
SMODS.Atlas { SMODS.Atlas {
key = "joker",
path = "joker.png",
px = 71, px = 71,
py = 95, py = 95,
key = "escapey",
path = "escapey.png",
} }
SMODS.Atlas { joker {
px = 71,
py = 95,
key = "martingale",
path = "martingale.png",
}
SMODS.Joker {
key = "escapey", key = "escapey",
atlas = "escapey",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
sinis = {x = 2, y = 0},
soul_pos = {x = 1, y = 0},
config = {extra = {hands = 2}}, config = {extra = {hands = 2}},
cost = 6, cost = 4,
rarity = 2, rarity = 2,
sinis = true,
soul_pos = true,
eternal_compat = true, eternal_compat = true,
blueprint_compat = false, blueprint_compat = false,
perishable_compat = true, perishable_compat = true,
@ -214,11 +223,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "msjoker", -- Blue bow key = "msjoker", -- Blue bow
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
cost = 1, cost = 1,
rarity = 1, rarity = 1,
eternal_compat = true, eternal_compat = true,
@ -233,11 +240,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "mrsbones", key = "mrsbones",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {xmult = 4, requirement = 4}}, config = {extra = {xmult = 4, requirement = 4}},
cost = 4, cost = 4,
rarity = 2, rarity = 2,
@ -267,11 +272,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "estrogen", key = "estrogen",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {division = 4}}, config = {extra = {division = 4}},
cost = 8, cost = 8,
rarity = 3, rarity = 3,
@ -286,11 +289,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "hexagon", key = "hexagon",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {money = 6}}, config = {extra = {money = 6}},
cost = 6, cost = 6,
rarity = 1, rarity = 1,
@ -310,11 +311,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "hexagoner", key = "hexagoner",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {mult = 0}}, config = {extra = {mult = 0}},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
@ -337,11 +336,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "hexagonest", key = "hexagonest",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {mult = 0}}, config = {extra = {mult = 0}},
cost = 6, cost = 6,
rarity = 3, rarity = 3,
@ -370,11 +367,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "sunny", -- Cracked egg key = "sunny", -- Cracked egg
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
cost = 2, cost = 2,
rarity = 1, rarity = 1,
eternal_compat = false, eternal_compat = false,
@ -415,11 +410,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "yard", key = "yard",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {money = 2}}, config = {extra = {money = 2}},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
@ -435,11 +428,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "misfortune", key = "misfortune",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
eternal_compat = true, eternal_compat = true,
@ -447,11 +438,9 @@ SMODS.Joker {
perishable_compat = true, perishable_compat = true,
} }
SMODS.Joker { joker {
key = "temple", key = "temple",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
config = {extra = {xmult = 1.5}}, config = {extra = {xmult = 1.5}},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
@ -470,11 +459,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "bulldozer", key = "bulldozer",
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
eternal_compat = true, eternal_compat = true,
@ -491,11 +478,9 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "oops", -- Slot machine key = "oops", -- Slot machine
atlas = "void",
pronouns = "they_them", pronouns = "they_them",
pos = {x = 0, y = 0},
cost = 8, cost = 8,
rarity = 3, rarity = 3,
config = {extra = {probability = 1, delta = 1}}, config = {extra = {probability = 1, delta = 1}},
@ -524,12 +509,10 @@ SMODS.Joker {
end, end,
} }
SMODS.Joker { joker {
key = "martingale", key = "martingale",
atlas = "martingale",
pronouns = "he_him", pronouns = "he_him",
pos = {x = 0, y = 0}, config = {extra = {odds = 2, times = 0}},
config = {extra = {odds = 2, times = 0, martingale = true}},
cost = 7, cost = 7,
rarity = 3, rarity = 3,
eternal_compat = true, eternal_compat = true,