Add new charm, again
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 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 |
|
|
@ -26,10 +26,18 @@ return {
|
|||
},
|
||||
},
|
||||
BakeryCharm = {
|
||||
BakeryCharm_Roland_cocacola = {
|
||||
name = "coca cola phone",
|
||||
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 = {
|
||||
name = "fat i phone",
|
||||
text = {
|
||||
"{C:attention}+#1# Booster Pack {}slots",
|
||||
-- "{C:attention}+#1# Booster Pack {}slots",
|
||||
"All {C:attention}Booster Packs {}are {C:attention}Mega",
|
||||
"{C:inactive}(Whenever applicable)",
|
||||
},
|
||||
|
|
|
|||
109
src/charm.lua
|
|
@ -34,58 +34,39 @@ local charm = (function()
|
|||
end)()
|
||||
|
||||
charm {
|
||||
key = "fat",
|
||||
key = "hand",
|
||||
pronouns = "he_him",
|
||||
}
|
||||
|
||||
charm {
|
||||
key = "cocacola",
|
||||
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)
|
||||
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,
|
||||
}
|
||||
|
||||
local orig_showman = SMODS.showman
|
||||
local orig_debuff_card = SMODS.debuff_card
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function SMODS.showman(...)
|
||||
return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...)
|
||||
function SMODS.debuff_card(...)
|
||||
if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_cocacola" then
|
||||
return orig_debuff_card(...)
|
||||
end
|
||||
end
|
||||
|
||||
charm {
|
||||
key = "fat",
|
||||
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,
|
||||
}
|
||||
|
||||
local orig_init = Card.init
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
|
|
@ -115,3 +96,41 @@ function Card:init(X, Y, W, H, card, center, params, ...)
|
|||
self.Roland_no_mega = true
|
||||
return orig_init(self, X, Y, W, H, card, center, params, ...)
|
||||
end
|
||||
|
||||
charm {
|
||||
key = "flexible",
|
||||
pronouns = "any_all",
|
||||
}
|
||||
|
||||
local orig_showman = SMODS.showman
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function SMODS.showman(...)
|
||||
return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...)
|
||||
end
|
||||
|
||||
charm {
|
||||
key = "wii",
|
||||
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,
|
||||
}
|
||||
|
|
|
|||