Put all jokers in the same atlas
|
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
BIN
assets/1x/joker.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
BIN
assets/2x/joker.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
31
src/back.lua
|
|
@ -11,22 +11,25 @@ end
|
|||
local back = (function()
|
||||
local x = 0
|
||||
|
||||
return function(b)
|
||||
local key = b.key
|
||||
local apply = b.apply
|
||||
local calculate = b.calculate
|
||||
---@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?}
|
||||
return function(tbl)
|
||||
local key = tbl.key
|
||||
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, ...))
|
||||
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, ...)
|
||||
end
|
||||
|
||||
b.pos = {x = x, y = 0}
|
||||
b.atlas = "back"
|
||||
SMODS.Back(b)
|
||||
tbl.pos = {x = x, y = 0}
|
||||
tbl.atlas = "back"
|
||||
SMODS.Back(tbl)
|
||||
x = x + 1
|
||||
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
|
|
@ -37,19 +40,19 @@ local back = (function()
|
|||
---@diagnostic disable-next-line: undefined-global
|
||||
CardSleeves.Sleeve {
|
||||
key = key,
|
||||
pos = b.pos,
|
||||
pos = tbl.pos,
|
||||
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, ...)
|
||||
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
|
||||
return ret
|
||||
end,
|
||||
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,
|
||||
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,
|
||||
is_alt = function(self)
|
||||
return self.get_current_deck_key() == "b_Roland_" .. key
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
local _, q = unpack(... or require "src.functional")
|
||||
|
||||
SMODS.Atlas {
|
||||
key = "iphone",
|
||||
path = "iphone.png",
|
||||
key = "charm",
|
||||
path = "charm.png",
|
||||
px = 68,
|
||||
py = 68,
|
||||
}
|
||||
|
|
@ -13,8 +13,9 @@ q(function()
|
|||
|
||||
local charm = Bakery_API.Charm {
|
||||
key = "iphone",
|
||||
atlas = "iphone",
|
||||
atlas = "charm",
|
||||
pos = {x = 0, y = 0},
|
||||
alerted = true,
|
||||
unlocked = true,
|
||||
discovered = true,
|
||||
calculate = function(_, _, context)
|
||||
|
|
@ -33,6 +34,6 @@ q(function()
|
|||
|
||||
charm:inject()
|
||||
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
|
||||
end)
|
||||
|
|
|
|||
103
src/joker.lua
|
|
@ -1,5 +1,25 @@
|
|||
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)
|
||||
return not card.highlighted and not (card.ability or {}).eternal
|
||||
end
|
||||
|
|
@ -8,11 +28,9 @@ local function is_carbon(card)
|
|||
return card.edition and card.edition.key == "e_Bakery_Carbon"
|
||||
end
|
||||
|
||||
local function is_mergeable_with(it)
|
||||
return function(card)
|
||||
return it.rank ~= card.rank and
|
||||
card.label == "j_Roland_escapey" and not
|
||||
(card.ability or {}).eternal
|
||||
local function is_mergeable_with(x)
|
||||
return function(y)
|
||||
return x.rank ~= y.rank and y.label == "j_Roland_escapey" and not (y.ability or {}).eternal
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -51,29 +69,20 @@ SMODS.Sound {
|
|||
}
|
||||
|
||||
SMODS.Atlas {
|
||||
key = "joker",
|
||||
path = "joker.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
key = "escapey",
|
||||
path = "escapey.png",
|
||||
}
|
||||
|
||||
SMODS.Atlas {
|
||||
px = 71,
|
||||
py = 95,
|
||||
key = "martingale",
|
||||
path = "martingale.png",
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "escapey",
|
||||
atlas = "escapey",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
sinis = {x = 2, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
config = {extra = {hands = 2}},
|
||||
cost = 6,
|
||||
cost = 4,
|
||||
rarity = 2,
|
||||
sinis = true,
|
||||
soul_pos = true,
|
||||
eternal_compat = true,
|
||||
blueprint_compat = false,
|
||||
perishable_compat = true,
|
||||
|
|
@ -214,11 +223,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "msjoker", -- Blue bow
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
cost = 1,
|
||||
rarity = 1,
|
||||
eternal_compat = true,
|
||||
|
|
@ -233,11 +240,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "mrsbones",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {xmult = 4, requirement = 4}},
|
||||
cost = 4,
|
||||
rarity = 2,
|
||||
|
|
@ -267,11 +272,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "estrogen",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {division = 4}},
|
||||
cost = 8,
|
||||
rarity = 3,
|
||||
|
|
@ -286,11 +289,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "hexagon",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {money = 6}},
|
||||
cost = 6,
|
||||
rarity = 1,
|
||||
|
|
@ -310,11 +311,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "hexagoner",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {mult = 0}},
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
|
|
@ -337,11 +336,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "hexagonest",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {mult = 0}},
|
||||
cost = 6,
|
||||
rarity = 3,
|
||||
|
|
@ -370,11 +367,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "sunny", -- Cracked egg
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
cost = 2,
|
||||
rarity = 1,
|
||||
eternal_compat = false,
|
||||
|
|
@ -415,11 +410,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "yard",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {money = 2}},
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
|
|
@ -435,11 +428,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "misfortune",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
eternal_compat = true,
|
||||
|
|
@ -447,11 +438,9 @@ SMODS.Joker {
|
|||
perishable_compat = true,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "temple",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {xmult = 1.5}},
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
|
|
@ -470,11 +459,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "bulldozer",
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
cost = 6,
|
||||
rarity = 2,
|
||||
eternal_compat = true,
|
||||
|
|
@ -491,11 +478,9 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "oops", -- Slot machine
|
||||
atlas = "void",
|
||||
pronouns = "they_them",
|
||||
pos = {x = 0, y = 0},
|
||||
cost = 8,
|
||||
rarity = 3,
|
||||
config = {extra = {probability = 1, delta = 1}},
|
||||
|
|
@ -524,12 +509,10 @@ SMODS.Joker {
|
|||
end,
|
||||
}
|
||||
|
||||
SMODS.Joker {
|
||||
joker {
|
||||
key = "martingale",
|
||||
atlas = "martingale",
|
||||
pronouns = "he_him",
|
||||
pos = {x = 0, y = 0},
|
||||
config = {extra = {odds = 2, times = 0, martingale = true}},
|
||||
config = {extra = {odds = 2, times = 0}},
|
||||
cost = 7,
|
||||
rarity = 3,
|
||||
eternal_compat = true,
|
||||
|
|
|
|||