diff --git a/assets/1x/joker.png b/assets/1x/joker.png index 8b9ed9f..6cb6528 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 61542e7..75e23a8 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 216a66a..87552eb 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 657bf5f..ea062d1 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 a5bcaf2..8245524 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 6637929..0dc47ff 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 d64c206..6fb994f 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 ddccc57..bd0114b 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 196c9e0..113e17d 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 d0f5b85..9e7290e 100644 Binary files a/assets/2x/tarot.png and b/assets/2x/tarot.png differ diff --git a/assets/repack.sh b/assets/repack.sh index 66cefa6..fe7158a 100755 --- a/assets/repack.sh +++ b/assets/repack.sh @@ -2,7 +2,7 @@ directory=$(dirname $(readlink -f "$0")) mkdir -p "$directory/1x/jokers" -for i in $(seq 0 $(find *.png | tail -n +2 | wc -l)); do +for i in $(seq 0 $(cd "$directory/1x/jokers/" && find *.png | tail -n +2 | wc -l)); do files="$files $directory/1x/jokers/$i.png"; done diff --git a/manifest.json b/manifest.json index cc9bddc..e263521 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.5.4", + "version": "2.5.5", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/joker.lua b/src/joker.lua index 8209268..6e9af4d 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -724,6 +724,72 @@ joker { end, } +joker { + key = "idle", + pronouns = "they_them", + rarity = 2, + Roland_idle_capacity = 6, + cost = G.P_CENTERS.j_idol.cost, + config = {extra = {cards = {}, xmult = 2}}, + attributes = {"rank", "suit", "xmult"}, + eternal_compat = true, + blueprint_compat = true, + perishable_compat = true, + loc_vars = function(self, _, card) + local extra = card.ability.extra + local col = {} + + ---@type { [number]: string|table|nil }|{colours: {[number]: {[1]: number, [2]: number, [3]: number, [4]: number}}} + local vars = f(self.Roland_idle_capacity):flatmap(function(v) + local l = localize_card(extra.cards[v], "b_Roland_unassigned").vars + + f(l.colours):each(function(c) + col[#col + 1] = c + end) + + l.colours = nil + return l + end):values():table() + + table.insert(vars, extra.xmult) + vars.colours = col + return {vars = vars} + end, + calculate = function(_, card, context) + return context.forcetrigger or + context.individual and + context.cardarea == G.play and + f(card.ability.extra.cards or {}):map(function(v) + return f(context.scoring_hand):any(function(x) + return x:is_suit(v.suit) and x.base.value == v.value + end) or {} + end):any(f().eq(context.other_card)) and {xmult = card.ability.extra.xmult} or nil + end, + Bakery_can_use = function(self, card) + return not card.debuff and + next(G.hand.highlighted) and + self.Roland_idle_capacity - #card.ability.extra.cards - #G.hand.highlighted >= 0 and + f(G.hand.highlighted):all(function(v) + return not SMODS.has_no_rank(v) and + not SMODS.has_no_suit(v) and + f(card.ability.extra.cards or {}):all(function(o) + return v.base.suit ~= o.suit or v.base.value ~= o.value + end) + end) + end, + Bakery_use_button_text = function(self, card) + local key = card.debuff and "b_Roland_debuffed" or + (self.Roland_idle_capacity - #card.ability.extra.cards > 0 and "b_Roland_add" or "b_Roland_full") + + return localize {type = "variable", key = key} + end, + Bakery_use_joker = function(_, card) + f(G.hand.highlighted):each(function(v) + table.insert(card.ability.extra.cards, {suit = v.base.suit, value = v.base.value}) + end) + end, +} + joker { key = "suitable", pronouns = "she_they", @@ -867,69 +933,3 @@ joker { end end, } - -joker { - key = "idle", - pronouns = "they_them", - rarity = 2, - Roland_idle_capacity = 6, - cost = G.P_CENTERS.j_idol.cost, - config = {extra = {cards = {}, xmult = 2}}, - attributes = {"rank", "suit", "xmult"}, - eternal_compat = true, - blueprint_compat = true, - perishable_compat = true, - loc_vars = function(self, _, card) - local extra = card.ability.extra - local col = {} - - ---@type { [number]: string|table|nil }|{colours: {[number]: {[1]: number, [2]: number, [3]: number, [4]: number}}} - local vars = f(self.Roland_idle_capacity):flatmap(function(v) - local l = localize_card(extra.cards[v], "b_Roland_unassigned").vars - - f(l.colours):each(function(c) - col[#col + 1] = c - end) - - l.colours = nil - return l - end):values():table() - - table.insert(vars, extra.xmult) - vars.colours = col - return {vars = vars} - end, - calculate = function(_, card, context) - return context.forcetrigger or - context.individual and - context.cardarea == G.play and - f(card.ability.extra.cards or {}):map(function(v) - return f(context.scoring_hand):any(function(x) - return x:is_suit(v.suit) and x.base.value == v.value - end) or {} - end):any(f().eq(context.other_card)) and {xmult = card.ability.extra.xmult} or nil - end, - Bakery_can_use = function(self, card) - return not card.debuff and - next(G.hand.highlighted) and - self.Roland_idle_capacity - #card.ability.extra.cards - #G.hand.highlighted >= 0 and - f(G.hand.highlighted):all(function(v) - return not SMODS.has_no_rank(v) and - not SMODS.has_no_suit(v) and - f(card.ability.extra.cards or {}):all(function(o) - return v.base.suit ~= o.suit or v.base.value ~= o.value - end) - end) - end, - Bakery_use_button_text = function(self, card) - local key = card.debuff and "b_Roland_debuffed" or - (self.Roland_idle_capacity - #card.ability.extra.cards > 0 and "b_Roland_add" or "b_Roland_full") - - return localize {type = "variable", key = key} - end, - Bakery_use_joker = function(_, card) - f(G.hand.highlighted):each(function(v) - table.insert(card.ability.extra.cards, {suit = v.base.suit, value = v.base.value}) - end) - end, -}