diff --git a/assets/1x/charm.png b/assets/1x/charm.png index 18fbc6e..4aa0f29 100644 Binary files a/assets/1x/charm.png and b/assets/1x/charm.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index bd18098..adeb4eb 100644 Binary files a/assets/2x/back.png and b/assets/2x/back.png differ diff --git a/assets/2x/blind.png b/assets/2x/blind.png index be06cd0..63f3a21 100644 Binary files a/assets/2x/blind.png and b/assets/2x/blind.png differ diff --git a/assets/2x/charm.png b/assets/2x/charm.png index acaad3a..292885c 100644 Binary files a/assets/2x/charm.png and b/assets/2x/charm.png differ diff --git a/assets/2x/icon.png b/assets/2x/icon.png index 0afc438..93abf7a 100644 Binary files a/assets/2x/icon.png and b/assets/2x/icon.png differ diff --git a/assets/2x/joker.png b/assets/2x/joker.png index 840e539..5bce9e7 100644 Binary files a/assets/2x/joker.png and b/assets/2x/joker.png differ diff --git a/assets/2x/seal.png b/assets/2x/seal.png index 6bdf2a4..0440663 100644 Binary files a/assets/2x/seal.png and b/assets/2x/seal.png differ diff --git a/assets/2x/spectral.png b/assets/2x/spectral.png index de66ba9..72a4515 100644 Binary files a/assets/2x/spectral.png and b/assets/2x/spectral.png differ diff --git a/localization/en-us.lua b/localization/en-us.lua index 067a155..a11a2f7 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -30,10 +30,6 @@ return { 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 = { @@ -46,6 +42,10 @@ return { name = "flexi ble phone", 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 = { name = "wii phone", text = { diff --git a/src/charm.lua b/src/charm.lua index fe5b3a3..85ec12f 100644 --- a/src/charm.lua +++ b/src/charm.lua @@ -1,4 +1,4 @@ -local _, q = unpack(... or require "src.functional") +local f, q = unpack(... or require "src.functional") local mod = SMODS.current_mod SMODS.Atlas { @@ -22,34 +22,53 @@ local charm = (function() tbl.unlocked = true tbl.discovered = true tbl.pos = {x = x, y = 0} - tbl.atlas = "charm" x = x + 1 + tbl.atlas = "charm" local charm = Bakery_API.Charm(tbl) charm:inject() charm:process_loc_text() SMODS.current_mod = current_mod - end) + end, true) end end)() charm { - key = "hand", - pronouns = "he_him", + 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, } charm { - key = "cocacola", - pronouns = "he_they", + key = "flexible", + pronouns = "any_all", } -local orig_debuff_card = SMODS.debuff_card +local orig_showman = SMODS.showman ---@diagnostic disable-next-line: duplicate-set-field -function SMODS.debuff_card(...) - if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_cocacola" then - return orig_debuff_card(...) - end +function SMODS.showman(...) + return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...) end charm { @@ -98,39 +117,39 @@ function Card:init(X, Y, W, H, card, center, params, ...) end charm { - key = "flexible", - pronouns = "any_all", + key = "cocacola", + pronouns = "he_they", } -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 = "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) + key = "hand", + pronouns = "he_him", + config = {extra = {hands = 1, hand_size = 5}}, + loc_vars = function(_, _, card) + local extra = card.ability.extra + return {vars = {extra.hand_size, extra.hands}} + end, + equip = function(_, card) + local extra = card.ability.extra + G.hand:change_size(extra.hand_size) + card.Roland_hands = G.GAME.round_resets.hands - card.ability.extra.hands + G.GAME.round_resets.hands = card.ability.extra.hands + ease_hands_played(-card.Roland_hands) + end, + unequip = function(_, card) + local extra = card.ability.extra + G.hand:change_size(-extra.hand_size) + G.GAME.round_resets.hands = G.GAME.round_resets.hands + (card.Roland_hands or 0) + ease_hands_played(card.Roland_hands or 0) + card.Roland_hands = nil end, }