diff --git a/assets/1x/blind.png b/assets/1x/blind.png index 3cd1305..c5edd78 100644 Binary files a/assets/1x/blind.png and b/assets/1x/blind.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index f6213a9..bb50e53 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 e631481..4a2cace 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 f73a6ab..5792768 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 ec219e2..d0938a5 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 61df6af..e6a62df 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 d75b591..c67f4a0 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 2c5f7c8..9321b53 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 f6af09f..55d9219 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -33,10 +33,6 @@ return { }, }, Blind = { - bl_Roland_bottom = { - name = "The Bottom", - text = {"Infinite discards", "Lose if any card was", "not played or discarded"}, - }, bl_Roland_divide = { name = "The Great Divide", text = {"Half of the deck", "is discarded"}, @@ -65,6 +61,33 @@ return { name = "The Tranquilizer", text = {"#1#s are debuffed", "Changes based on", "most common rank"}, }, + bl_Roland_venerable_visage = { + name = "Venerable Visage", + text = {"Infinite discards", "Lose if any card was", "not played or discarded"}, + fail = { + "Blasphemy.", + "Blunder.", + "Crisis.", + "Death.", + "Denied.", + "Failure.", + "Fall.", + "Feeble.", + "Foolish.", + "Ignorant.", + "Illiterate.", + "Judgement.", + "Misery.", + "Mistake.", + "Mockery.", + "Perish.", + "Pity.", + "Terror.", + "Tyranny.", + "Unfortunate.", + "Weak.", + }, + }, }, Enhanced = { m_wild = { diff --git a/src/blind.lua b/src/blind.lua index 5cfa638..975c15b 100644 --- a/src/blind.lua +++ b/src/blind.lua @@ -71,6 +71,34 @@ local function has_enhancement(card) return not not (e and next(e)) end +local function hsv_to_rgb(h, s, v) + s, v = s or 1, v or 1 + + if s <= 0 then + return v, v, v + end + + local c = v * s + local r, g, b = 0, 0, 0 + local x, m = (1 - math.abs((h * 6 % 2) - 1)) * c, v - c + + if h < 1 / 6 then + r, g, b = c, x, 0 + elseif h < 2 / 6 then + r, g, b = x, c, 0 + elseif h < 3 / 6 then + r, g, b = 0, c, x + elseif h < 4 / 6 then + r, g, b = 0, x, c + elseif h < 5 / 6 then + r, g, b = x, 0, c + else + r, g, b = c, 0, x + end + + return r + m, g + m, b + m +end + local function is_locked() return G.STATE ~= G.STATES.SELECTING_HAND or G.CONTROLLER.locked or (G.GAME.STOP_USE and G.GAME.STOP_USE > 0) @@ -79,7 +107,7 @@ end blind { key = "nimble", boss = {min = 1}, - boss_colour = HEX "0291fb", + boss_colour = HEX "0291fbff", pronouns = "she_her", config = {draw = 5}, defeat = function() @@ -115,7 +143,7 @@ blind { blind { key = "falseshuffle", boss = {min = 3}, - boss_colour = HEX "ff7f3d", + boss_colour = HEX "ff7f3dff", pronouns = "any_all", disable = function() q(function() @@ -150,7 +178,7 @@ blind { blind { key = "divide", boss = {min = 1}, - boss_colour = HEX "b18480", + boss_colour = HEX "b18480ff", pronouns = "he_they", disable = function() -- Ensures that this runs after 'set_blind' since it also gets added to queue. @@ -191,7 +219,7 @@ blind { blind { key = "mitotic", boss = {min = 3}, - boss_colour = HEX "80b48e", + boss_colour = HEX "80b48eff", pronouns = "it_its", calculate = function(_, b, context) if b.disabled or not context.pre_discard then @@ -219,7 +247,7 @@ blind { blind { key = "tranquilizer", boss = {min = 6}, - boss_colour = HEX "bdaecc", + boss_colour = HEX "bdaeccff", pronouns = "they_them", collection_loc_vars = function(_) return { @@ -272,33 +300,10 @@ blind { end, } -blind { - key = "bottom", - boss = {min = 2}, - boss_colour = HEX "817536", - pronouns = "they_them", - calculate = function(_, b, context) - if b.disabled then - return - end - - if context.pre_discard and next(G.hand.highlighted) then - b:wiggle() - ease_discard(1) - end - - if context.end_of_round and (next(G.deck.cards) or next(G.hand.cards)) then - b:wiggle() - G.STATE = G.STATES.GAME_OVER - G.STATE_COMPLETE = false - end - end, -} - blind { key = "improbable", boss = {min = 4}, - boss_colour = HEX "009966", + boss_colour = HEX "009966ff", pronouns = "it_its", mult = 2, dollars = 5, @@ -323,8 +328,14 @@ local orig_update = Game.update ---@diagnostic disable-next-line: duplicate-set-field function Game.update(...) orig_update(...) - local orig = G.GAME.probabilities - local improbable = G.GAME.modifiers.Roland_improbable + + local boss_colour = (G.P_BLINDS.bl_Roland_venerable_visage or {}).boss_colour + + if boss_colour then + boss_colour[1], boss_colour[2], boss_colour[3] = hsv_to_rgb(os.clock() / 6 % 1) + end + + local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities -- Normally unreachable since we set it to nil ourselves, -- but other mods may want to use this modifier. @@ -357,7 +368,7 @@ end blind { key = "equinox", boss = {min = 6}, - boss_colour = HEX "000000", + boss_colour = HEX "000000ff", pronouns = "any_all", defeat = function() G.GAME.modifiers.Roland_equinox = nil @@ -404,3 +415,94 @@ function UIElement:draw_self(...) return orig_draw_self(self, ...) end end + +blind { + key = "venerable_visage", + boss = {showdown = true}, + boss_colour = HEX "f6f6f2ff", + pronouns = "any_all", + calculate = function(self, b, context) + if b.disabled then + return + end + + if context.pre_discard and next(G.hand.highlighted) then + q(function() + b:wiggle() + ease_discard(1) + end) + end + + if b.Roland_oh_no or not context.end_of_round or not next(G.deck.cards) or not next(G.hand.cards) then + return + end + + b.Roland_oh_no = true + b:wiggle() + self.vitriol(b) + + q { + trigger = "before", + func = function() + G.STATE = G.STATES.GAME_OVER + G.STATE_COMPLETE = false + end, + } + end, + vitriol = function(b) + local fail = G.localization.descriptions.Blind.bl_Roland_venerable_visage.fail + local speed = 0.1 + + SMODS.draw_cards(#G.deck.cards) + play_sound("gong", 0.6) + + attention_text { + text = pseudorandom_element(fail, pseudoseed "Roland_venerable_visage"), + offset = {x = 0, y = -3.6}, + major = G.play, + scale = 3, + hold = 2, + } + + delay(1) + + f(G.playing_cards):foreach(function(v) + q { + trigger = "before", + delay = speed, + func = function() + v:start_dissolve() + v:shatter() + end, + } + end) + + delay(1) + + f(G.P_CARDS):foreach(function(v) + q { + delay = speed, + func = function() + G.playing_card = (G.playing_card and G.playing_card + 1) or 1 + + local card = Card( + b and b.T.x or 0, + b and b.T.y or 0, + G.CARD_W, + G.CARD_H, + v, + G.P_CENTERS.m_Bakery_Curse or G.P_CENTERS.c_base, + {playing_card = G.playing_card} + ) + + table.insert(G.playing_cards, card) + G.deck:emplace(card) + play_sound("card1") + card:add_to_deck() + end, + } + end) + + delay(1) + end, +} diff --git a/src/joker.lua b/src/joker.lua index a56c20e..fae06ae 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -25,8 +25,8 @@ local joker = (function() local _ = tbl.artist and q(function() Bakery_API.contributors.Roland_char = Bakery_API.contributors.Roland_char or { name = "char (@irregulester)", - fg = HEX "f8f8f2", - bg = HEX "ff79c6", + fg = HEX "f8f8f2ff", + bg = HEX "ff79c6ff", } tbl.artist = "Roland_" .. tbl.artist @@ -159,7 +159,7 @@ joker { any_carbon = any_carbon or is_carbon(v) level_sum = level_sum + v.ability.extra.hands * (v.getEvalQty and v:getEvalQty() or 1) sell_sum = sell_sum + v.sell_cost * (v.getEvalQty and v:getEvalQty() or 1) - v:start_dissolve({HEX "57ecab"}, nil, 1.6) + v:start_dissolve({HEX "57ecabff"}, nil, 1.6) end) if not any_carbon then @@ -206,7 +206,7 @@ joker { end) else f(consumables):foreach(function(v) - v:start_dissolve({HEX "57ecab"}, nil, 1.6) + v:start_dissolve({HEX "57ecabff"}, nil, 1.6) destroyed = destroyed + 1 end) end @@ -435,7 +435,25 @@ joker { } end, calculate = function(_, _, context) - local _ = context.selling_self and draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1]) + if not context.forcetrigger and not context.selling_self then + return + end + + draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1]) + local current_round = G.GAME.current_round + local facing_blind = G.GAME.facing_blind + SMODS.calculate_context({drawing_cards = true, draw = {G.deck.cards}}) + + SMODS.calculate_context({ + ---@diagnostic disable-next-line: assign-type-mismatch + first_hand_drawn = not current_round.any_hand_drawn and facing_blind, + ---@diagnostic disable-next-line: assign-type-mismatch + hand_drawn = facing_blind and {G.deck.cards[1]}, + other_drawn = not facing_blind and {G.deck.cards[1]}, + }) + + ---@diagnostic disable-next-line: inject-field + facing_blind.any_hand_drawn = facing_blind.any_hand_drawn or facing_blind end, } @@ -496,6 +514,11 @@ joker { return {xmult = card.ability.extra.xmult} end end, + in_pool = function() + return f(G.playing_cards):any(function(v) + return SMODS.has_enhancement(v, "m_wild") + end) + end, } joker { diff --git a/src/seal.lua b/src/seal.lua index 897859f..eca82c9 100644 --- a/src/seal.lua +++ b/src/seal.lua @@ -11,7 +11,7 @@ SMODS.Seal { key = "glass", atlas = "seal", pos = {x = 0, y = 0}, - badge_colour = HEX "a6a6a6", + badge_colour = HEX "a6a6a6ff", pronouns = "he_him", calculate = function(_, card, context) local function eq(v)