diff --git a/assets/1x/joker.png b/assets/1x/joker.png index 2bb31c0..84252a2 100644 Binary files a/assets/1x/joker.png and b/assets/1x/joker.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index bffee26..36c1165 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 9a5263c..f184097 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 6862232..76d5b25 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 27c224a..9efb323 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 d58910d..3f504a4 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 3701940..5c9facd 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 bd59c9a..916e354 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 83725a0..59e726b 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 16fc738..5363154 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 2d87847..e0738d0 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 d986b30..ecce61d 100644 Binary files a/assets/2x/unicon.png and b/assets/2x/unicon.png differ diff --git a/localization/en-us.lua b/localization/en-us.lua index 66f60a5..1755766 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -165,6 +165,14 @@ return { "if it is {C:dark_edition}Frozen", }, }, + j_Roland_cerulean = { + name = "Cerulean Bell", + text = { + "{X:mult,C:white}X#1#{} Mult", + "All other {C:attention}Jokers {}cannot", + "be selected or dragged", + }, + }, j_Roland_crimson = { name = "Crimson Heart", text = { diff --git a/manifest.json b/manifest.json index 551a984..198d724 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.8.35", + "version": "2.8.36", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/joker.lua b/src/joker.lua index a6e9441..f3c7364 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -1,13 +1,23 @@ local f, q = unpack(... or require "lib.shared") +local atlas = SMODS.Atlas { + key = "joker", + path = "joker.png", + px = 71, + py = 95, +} + local negative = {key = "e_negative_consumable", set = "Edition", config = {extra = 1}} local joker = (function() + atlas:inject() local z = 0 + local row ---@return {x: number, y: number} local function inc() - local ret = {x = z % 6, y = math.floor(z / 6)} + row = row or atlas.image_data:getWidth() / atlas.px / G.SETTINGS.GRAPHICS.texture_scaling + local ret = {x = z % row, y = math.floor(z / row)} z = z + 1 return ret end @@ -97,13 +107,6 @@ local function ranksuitnq(value) end end -SMODS.Atlas { - key = "joker", - path = "joker.png", - px = 71, - py = 95, -} - SMODS.Sound { key = "nilly", path = "nilly.ogg", @@ -425,7 +428,7 @@ joker { joker { key = "snowsquall", pronouns = "he_they", - config = {extra = {mult_gain = 1, mult = 0}}, + config = {extra = {mult_gain = 3, mult = 0}}, attributes = {"mult", "scaling", "hand_type"}, cost = 6, rarity = 2, @@ -721,6 +724,39 @@ joker { end, } +joker { + key = "cerulean", + pronouns = "she_her", + config = {extra = {xmult = 3}}, + pixel_size = {w = 68, h = 68}, + attributes = {"xmult"}, + cost = 6, + rarity = 2, + eternal_compat = true, + blueprint_compat = true, + perishable_compat = true, + loc_vars = function(_, _, card) + return {vars = {card.ability.extra.xmult}} + end, + remove_from_deck = function(self) + self:cerulean(true) + end, + calculate = function(_, card, context) + return (context.joker_main or context.forcetrigger) and + {card = card, xmult = card.ability.extra.xmult} or nil + end, + update = function(self, card) + local _ = card.area == G.jokers and self:cerulean(false) + end, + cerulean = function(_, value) + f(G.jokers.cards):each(function(v) + f {"click", "drag", "focus", "hover"}:map(f.index_into(v.states)):each(function(s) + s.can = value or v.config.center.key == "j_Roland_cerulean" + end) + end) + end, +} + joker { key = "crimson", pronouns = "she_her", diff --git a/src/lib/shared.lua b/src/lib/shared.lua index 72c5e7f..c08d7a4 100644 --- a/src/lib/shared.lua +++ b/src/lib/shared.lua @@ -46,6 +46,9 @@ if false then ---@type Card[] CardArea.cards = CardArea.cards + ---@type userdata|{getWidth: fun(self: self): number} + SMODS.Atlas.image_data = SMODS.Atlas.image_data + --- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) } _G["Big"] = _G["Big"]