diff --git a/assets/1x/back.png b/assets/1x/back.png index 82fbdaa..1285c51 100644 Binary files a/assets/1x/back.png and b/assets/1x/back.png differ diff --git a/assets/1x/sleeve.png b/assets/1x/sleeve.png index 8722ffe..be0f3db 100644 Binary files a/assets/1x/sleeve.png and b/assets/1x/sleeve.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index 27bd5a9..9bf5e5e 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 ab9470b..7ff5bf9 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 1ac9f07..5b6e464 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 69f3629..96110c6 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 dc9bc88..588acdc 100644 Binary files a/assets/2x/joker.png and b/assets/2x/joker.png differ diff --git a/assets/2x/phorm.png b/assets/2x/phorm.png index 104265f..ea65803 100644 Binary files a/assets/2x/phorm.png and b/assets/2x/phorm.png differ diff --git a/assets/2x/seal.png b/assets/2x/seal.png index a78f056..96a21e1 100644 Binary files a/assets/2x/seal.png and b/assets/2x/seal.png differ diff --git a/assets/2x/sleeve.png b/assets/2x/sleeve.png index db699d3..cb93a15 100644 Binary files a/assets/2x/sleeve.png and b/assets/2x/sleeve.png differ diff --git a/assets/2x/spectral.png b/assets/2x/spectral.png index b90f08f..cef82e3 100644 Binary files a/assets/2x/spectral.png and b/assets/2x/spectral.png differ diff --git a/assets/2x/tag.png b/assets/2x/tag.png index 13d7ab7..f6208c6 100644 Binary files a/assets/2x/tag.png and b/assets/2x/tag.png differ diff --git a/assets/2x/tarot.png b/assets/2x/tarot.png index 9bedff8..69c3822 100644 Binary files a/assets/2x/tarot.png and b/assets/2x/tarot.png differ diff --git a/assets/2x/unicon.png b/assets/2x/unicon.png index 96a7104..6956881 100644 Binary files a/assets/2x/unicon.png and b/assets/2x/unicon.png differ diff --git a/assets/2x/voucher.png b/assets/2x/voucher.png index 5293959..f0f3249 100644 Binary files a/assets/2x/voucher.png and b/assets/2x/voucher.png differ diff --git a/localization/en-us.lua b/localization/en-us.lua index 73dcc50..1d1dc68 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -20,6 +20,17 @@ return { "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", }, }, + b_Roland_wish = { + name = "Wish Deck", + text = { + "Redeem a random {C:attention}Voucher", + "after {C:attention}Small {}and {C:attention}Big Blinds", + "{C:attention}Vouchers {}no longer", + "appear in the shop", + --"", + --"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + }, }, BakeryCharm = { BakeryCharm_Roland_cocacola = { @@ -442,6 +453,27 @@ return { "{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", }, }, + sleeve_Roland_wish = { + name = "Wish Sleeve", + text = { + "A random {C:attention}voucher{} is", + "{C:attention}redeemed {}at the end", + "of {C:attention}Small {}and {C:attention}Big Blinds", + "{C:attention}Vouchers {}no longer", + "appear in the shop", + --"", + --"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + }, + sleeve_Roland_wish_alt = { + name = "Miracle Sleeve", + text = { + "All {C:attention}vouchers", + "start {C:attention}redeemed", + --"", + --"{C:Bakery_credit_fg_Roland_bakersdozenbagels,s:0.75}Art: BakersDozenBagels", + }, + }, }, Spectral = { c_Roland_afterimage = { diff --git a/manifest.json b/manifest.json index ab170ff..f3c2d47 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.9.34", + "version": "2.9.35", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/back.lua b/src/back.lua index 8610185..b1bed72 100644 --- a/src/back.lua +++ b/src/back.lua @@ -8,7 +8,7 @@ end local back = (function() local x = 0 - ---@param tbl SMODS.Back|{is_alt: (fun(self: self): boolean), 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?} + ---@param tbl SMODS.Back|{attributes?: Attributes[], is_alt: (fun(self: self): boolean), 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 @@ -71,7 +71,7 @@ back { key = "blossom", pronouns = "any_all", config = {extra = {alt_times = 4, times = 2}}, - attributes = {"boss_blind"}, + attributes = {"passive", "boss_blind"}, loc_vars = function(self, _, _) return {vars = {self.config.extra.alt_times}} end, @@ -79,13 +79,15 @@ back { G.GAME.modifiers.Roland_blossom_deck = true end, calculate = function(self, card, context) - if not context.setting_blind then + if not context.forcetrigger and not context.setting_blind then return end local blinds = G.GAME.round_resets.blind_states - if blinds.Small ~= "Current" and blinds.Big ~= "Current" then + if not context.forcetrigger and + blinds.Small ~= "Current" and + blinds.Big ~= "Current" then return end @@ -112,7 +114,7 @@ back { back { key = "swapper", pronouns = "he_him", - attributes = {"spectral", "tarot"}, + attributes = {"passive", "spectral", "tarot"}, apply = function(self) local modifiers = G.GAME.modifiers modifiers.Roland_swapper_deck = true @@ -140,3 +142,66 @@ function create_card(_type, ...) local has_type = SMODS.ConsumableTypes[_type] return orig_create_card(has_type and pseudorandom_element(type, pseudoseed "Roland_alt_swapper_deck") or _type, ...) end + +local function redeem(key, fast) + if fast then + G.GAME.used_vouchers[key] = true + end + + q { + delay = 1, + func = function() + local voucher = SMODS.create_card {key = key, set = "Voucher"} + voucher.T.y = (fast and pseudorandom(pseudoseed "Roland_wish_deck") + 0.5 or 1) * 4.25 + voucher.T.x = (fast and pseudorandom(pseudoseed "Roland_wish_deck") + 0.5 or 1) * 9 + voucher.cost = 0 + voucher:start_materialize() + + q { + delay = 1, + front = true, + func = function() + if fast then + play_sound "card1" + voucher:apply_to_run() + voucher:juice_up(0.3, 0.5) + else + voucher:redeem() + end + + q { + delay = 1, + func = function() + voucher:start_dissolve() + end, + } + end, + } + end, + } +end + +back { + key = "wish", + pronouns = "he_him", + attributes = {"passive", "generation"}, + apply = function(self) + G.GAME.modifiers.Roland_no_voucher = true + local _ = self:is_alt() and f(G.P_CENTER_POOLS.Voucher):map "key":each(redeem) + end, + calculate = function(_, _, context) + local _ = (context.forcetrigger or + context.blind_defeated and + not context.repetition and + not G.GAME.blind.boss) and + redeem(get_next_voucher_key()) + end, +} + +local orig_add_voucher_to_shop = SMODS.add_voucher_to_shop + +function SMODS.add_voucher_to_shop(...) + if not G.GAME.modifiers.Roland_no_voucher then + return orig_add_voucher_to_shop(...) + end +end diff --git a/src/challenge.lua b/src/challenge.lua index 3144d94..db3242d 100644 --- a/src/challenge.lua +++ b/src/challenge.lua @@ -116,6 +116,9 @@ SMODS.Challenge { jokers = {{id = "j_Roland_amber"}}, restrictions = amber, pronouns = "they_them", + unlocked = function() + return G.P_CENTERS.j_Roland_amber and G.P_CENTERS.j_Roland_amber.check_for_unlock() + end, calculate = function(_, context) local function slide(pitch) q(function() @@ -155,6 +158,9 @@ SMODS.Challenge { jokers = {{id = "j_Roland_cerulean"}}, restrictions = cerulean, pronouns = "she_her", + unlocked = function() + return G.P_CENTERS.j_Roland_cerulean and G.P_CENTERS.j_Roland_cerulean.check_for_unlock() + end, calculate = function(_, context) if not context.hand_drawn then return @@ -182,6 +188,9 @@ SMODS.Challenge { jokers = {{id = "j_Roland_crimson"}}, restrictions = crimson, pronouns = "she_her", + unlocked = function() + return G.P_CENTERS.j_Roland_crimson and G.P_CENTERS.j_Roland_crimson.check_for_unlock() + end, calculate = function(_, context) local _ = context.blind_defeated and f(G.jokers.cards):each(function(v) v.ability.Roland_crimson_heart_chosen = nil @@ -242,6 +251,9 @@ SMODS.Challenge { jokers = {{id = "j_Roland_verdant"}}, restrictions = verdant, pronouns = "she_her", + unlocked = function() + return G.P_CENTERS.j_Roland_verdant and G.P_CENTERS.j_Roland_verdant.check_for_unlock() + end, calculate = function(_, context) if context.setting_blind then G.GAME.modifiers.Roland_Eternally_Verdant = true @@ -265,6 +277,9 @@ SMODS.Challenge { jokers = {{id = "j_joker"}, {id = "j_Roland_violet"}}, restrictions = violet, pronouns = "she_they", + unlocked = function() + return G.P_CENTERS.j_Roland_violet and G.P_CENTERS.j_Roland_violet.check_for_unlock() + end, calculate = function(_, context) if not context.setting_blind then return diff --git a/src/joker.lua b/src/joker.lua index 891a8f9..ee0afab 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -1202,11 +1202,6 @@ joker { eternal_compat = true, blueprint_compat = false, perishable_compat = true, - check_for_unlock = function(_, args) - return args.type == "modify_deck" and f(G.playing_cards):all(function(v) - return SMODS.has_enhancement(v, "m_stone") - end) - end, loc_vars = function(_, info_queue, card) local extra = card.ability.extra local _ = card.fake_card or table.insert(info_queue, G.P_CENTERS.m_stone)