Add new charm

This commit is contained in:
Emik 2026-02-18 00:56:07 +01:00
parent 7912e44e20
commit 12a852574e
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
10 changed files with 61 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 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: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 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

@ -29,15 +29,23 @@ return {
BakeryCharm_Roland_fat = { BakeryCharm_Roland_fat = {
name = "fat i phone", name = "fat i phone",
text = { text = {
"Enter the shop", "{C:attention}+#1# Booster Pack {}slots",
"when any {C:attention}Blind", "All {C:attention}Booster Packs {}are {C:attention}Mega",
"is {C:attention}skipped", "{C:inactive}(Whenever applicable)",
}, },
}, },
BakeryCharm_Roland_flexible = { BakeryCharm_Roland_flexible = {
name = "flexi ble phone", name = "flexi ble phone",
text = {unpack(G.localization.descriptions.Joker.j_ring_master.text)}, text = {unpack(G.localization.descriptions.Joker.j_ring_master.text)},
}, },
BakeryCharm_Roland_wii = {
name = "wii phone",
text = {
"Enter the shop",
"when any {C:attention}Blind",
"is {C:attention}skipped",
},
},
}, },
Blind = { Blind = {
bl_Roland_divide = { bl_Roland_divide = {

View file

@ -36,6 +36,26 @@ end)()
charm { charm {
key = "fat", key = "fat",
pronouns = "he_they", pronouns = "he_they",
config = {extra = {mod = 1}},
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.mod}}
end,
equip = function(_, card)
SMODS.change_booster_limit(card.ability.extra.mod)
end,
unequip = function(card)
SMODS.change_booster_limit(-card.ability.extra.mod)
end,
}
charm {
key = "flexible",
pronouns = "any_all",
}
charm {
key = "wii",
pronouns = "they_them",
calculate = function(_, card, context) calculate = function(_, card, context)
if not context.skip_blind then if not context.skip_blind then
return return
@ -59,15 +79,39 @@ charm {
end, end,
} }
charm {
key = "flexible",
pronouns = "any_all",
cost = 10,
}
local orig_showman = SMODS.showman local orig_showman = SMODS.showman
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
function SMODS.showman(...) function SMODS.showman(...)
return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...) return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...)
end end
local orig_init = Card.init
---@diagnostic disable-next-line: duplicate-set-field
function Card:init(X, Y, W, H, card, center, params, ...)
if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_fat" or center.set ~= "Booster" then
return orig_init(self, X, Y, W, H, card, center, params, ...)
end
local key = center.key:gsub("normal", "mega"):gsub("jumbo", "mega"):gsub("mini", "mega")
if G.P_CENTERS[key] then
return orig_init(self, X, Y, W, H, card, G.P_CENTERS[key], params, ...)
end
key = key:gsub("_?%d+$", "_1")
if G.P_CENTERS[key] then
return orig_init(self, X, Y, W, H, card, G.P_CENTERS[key], params, ...)
end
key = key:gsub("_?%d+$", "")
if G.P_CENTERS[key] then
return orig_init(self, X, Y, W, H, card, G.P_CENTERS[key], params, ...)
end
self.Roland_no_mega = true
return orig_init(self, X, Y, W, H, card, center, params, ...)
end