Add new charm, again, again

This commit is contained in:
Emik 2026-02-18 02:42:16 +01:00
parent ac0ec14efa
commit 23e96b70cc
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
10 changed files with 62 additions and 43 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 26 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: 27 KiB

After

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

@ -30,10 +30,6 @@ return {
name = "coca cola phone", name = "coca cola phone",
text = {"Cards cannot", "be {C:attention}debuffed"}, text = {"Cards cannot", "be {C:attention}debuffed"},
}, },
BakeryCharm_Roland_hand = {
name = "hand phone",
text = {"{C:attention}Charms {}can", "be {C:attention}debuffed"},
},
BakeryCharm_Roland_fat = { BakeryCharm_Roland_fat = {
name = "fat i phone", name = "fat i phone",
text = { text = {
@ -46,6 +42,10 @@ return {
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_hand = {
name = "hand phone",
text = {"{C:attention}+#1# {}hand size", "Set hands to {C:blue}#2#"},
},
BakeryCharm_Roland_wii = { BakeryCharm_Roland_wii = {
name = "wii phone", name = "wii phone",
text = { text = {

View file

@ -1,4 +1,4 @@
local _, q = unpack(... or require "src.functional") local f, q = unpack(... or require "src.functional")
local mod = SMODS.current_mod local mod = SMODS.current_mod
SMODS.Atlas { SMODS.Atlas {
@ -22,34 +22,53 @@ local charm = (function()
tbl.unlocked = true tbl.unlocked = true
tbl.discovered = true tbl.discovered = true
tbl.pos = {x = x, y = 0} tbl.pos = {x = x, y = 0}
tbl.atlas = "charm"
x = x + 1 x = x + 1
tbl.atlas = "charm"
local charm = Bakery_API.Charm(tbl) local charm = Bakery_API.Charm(tbl)
charm:inject() charm:inject()
charm:process_loc_text() charm:process_loc_text()
SMODS.current_mod = current_mod SMODS.current_mod = current_mod
end) end, true)
end end
end)() end)()
charm { charm {
key = "hand", key = "wii",
pronouns = "he_him", pronouns = "they_them",
calculate = function(_, card, context)
if not context.skip_blind then
return
end
local message = localize {type = "variable", key = "b_Roland_entering_shop"}
SMODS.calculate_effect({card = card, message = message, sound = "whoosh1"}, card)
q(function()
G.blind_prompt_box = G.blind_prompt_box and G.blind_prompt_box:remove()
G.blind_select = G.blind_select and G.blind_select:remove()
G.round_eval = G.round_eval and G.round_eval:remove()
G.GAME.current_round.jokers_purchased = 0
G.STATE = G.STATES.SHOP
G.GAME.shop_free = nil
G.GAME.shop_d6ed = nil
G.STATE_COMPLETE = false
play_sound("whoosh1", 1.33333, 0.8)
play_sound("whoosh1", 0.66666, 0.8)
end)
end,
} }
charm { charm {
key = "cocacola", key = "flexible",
pronouns = "he_they", pronouns = "any_all",
} }
local orig_debuff_card = SMODS.debuff_card local orig_showman = SMODS.showman
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
function SMODS.debuff_card(...) function SMODS.showman(...)
if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_cocacola" then return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...)
return orig_debuff_card(...)
end
end end
charm { charm {
@ -98,39 +117,39 @@ function Card:init(X, Y, W, H, card, center, params, ...)
end end
charm { charm {
key = "flexible", key = "cocacola",
pronouns = "any_all", pronouns = "he_they",
} }
local orig_showman = SMODS.showman local orig_debuff_card = SMODS.debuff_card
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
function SMODS.showman(...) function SMODS.debuff_card(...)
return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...) if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_cocacola" then
return orig_debuff_card(...)
end
end end
charm { charm {
key = "wii", key = "hand",
pronouns = "they_them", pronouns = "he_him",
calculate = function(_, card, context) config = {extra = {hands = 1, hand_size = 5}},
if not context.skip_blind then loc_vars = function(_, _, card)
return local extra = card.ability.extra
end return {vars = {extra.hand_size, extra.hands}}
end,
local message = localize {type = "variable", key = "b_Roland_entering_shop"} equip = function(_, card)
SMODS.calculate_effect({card = card, message = message, sound = "whoosh1"}, card) local extra = card.ability.extra
G.hand:change_size(extra.hand_size)
q(function() card.Roland_hands = G.GAME.round_resets.hands - card.ability.extra.hands
G.blind_prompt_box = G.blind_prompt_box and G.blind_prompt_box:remove() G.GAME.round_resets.hands = card.ability.extra.hands
G.blind_select = G.blind_select and G.blind_select:remove() ease_hands_played(-card.Roland_hands)
G.round_eval = G.round_eval and G.round_eval:remove() end,
G.GAME.current_round.jokers_purchased = 0 unequip = function(_, card)
G.STATE = G.STATES.SHOP local extra = card.ability.extra
G.GAME.shop_free = nil G.hand:change_size(-extra.hand_size)
G.GAME.shop_d6ed = nil G.GAME.round_resets.hands = G.GAME.round_resets.hands + (card.Roland_hands or 0)
G.STATE_COMPLETE = false ease_hands_played(card.Roland_hands or 0)
play_sound("whoosh1", 1.33333, 0.8) card.Roland_hands = nil
play_sound("whoosh1", 0.66666, 0.8)
end)
end, end,
} }