diff --git a/assets/1x/joker.png b/assets/1x/joker.png index 941ca33..d8ee471 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 34c5e0e..f1474e5 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 762d48b..4874321 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 876fd04..ab3cfb3 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 16d33fa..9d87d6c 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 e814093..9cd777f 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 4f82e4d..3062e58 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 9aff582..a71b150 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 2f321b3..d2df605 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 6e71af5..9a353d5 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 8532f69..b97a308 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 327c45f..5c2c4a0 100644 Binary files a/assets/2x/unicon.png and b/assets/2x/unicon.png differ diff --git a/assets/sounds/excalibur.ogg b/assets/sounds/excalibur.ogg new file mode 100644 index 0000000..e9c431a Binary files /dev/null and b/assets/sounds/excalibur.ogg differ diff --git a/localization/en-us.lua b/localization/en-us.lua index 74e56da..605b93b 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -182,6 +182,22 @@ return { "{C:inactive}(Currently {C:red}+#3#{C:inactive} Mult)", }, }, + j_Roland_excalibur = { + name = "Excalibur", + text = { + "Score {C:attention}#1# {C:enhanced}Stone Cards", + "to {C:attention}pull {}this {C:attention}Joker", + "{C:inactive}(Currently {C:attention}#2#{C:inactive})", + }, + }, + j_Roland_excalibur_Back = { + name = "Excalibur", + text = { + "Scored and held in", + "hand {C:enhanced}Stone Cards", + "each give {X:mult,C:white}X#3#{} Mult", + }, + }, j_Roland_hardboiled = { name = "Hard-Boiled", text = { diff --git a/manifest.json b/manifest.json index 2b5af56..df581ec 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.8.32", + "version": "2.8.33", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/joker.lua b/src/joker.lua index b7b60ee..be16d21 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -109,6 +109,11 @@ SMODS.Sound { path = "nilly.ogg", } +SMODS.Sound { + key = "excalibur", + path = "excalibur.ogg", +} + joker { key = "msjoker", pronouns = "she_her", @@ -974,9 +979,10 @@ joker { calculate = function(_, card, context) local extra = card.ability.extra - if context.blueprint or - not context.using_consumeable or - context.consumeable.config.center.key ~= extra.sequence[extra.progress + 1] then + if not context.forcetrigger and + (context.blueprint or + not context.using_consumeable or + context.consumeable.config.center.key ~= extra.sequence[extra.progress + 1]) then return end @@ -1002,6 +1008,70 @@ joker { end, } +joker { + key = "excalibur", + pronouns = "he_him", + cost = 8, + rarity = 3, + config = {extra = { + scored = 0, + xmult = 1.5, + required = 15, + flipped = false, + }}, + attributes = {"xmult", "enhancements", "bakery_double_sided"}, + eternal_compat = true, + blueprint_compat = false, + perishable_compat = true, + 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) + return {vars = {extra.required, extra.scored, extra.xmult}} + end, + generate_ui = function(self, info_queue, card, ...) + Bakery_API.werewolf_ui "j_Roland_excalibur_Back" (self, info_queue, card, ...) + + if not card or not card.ability.extra.flipped then + return + end + + f(info_queue):keys():each(function(v) + info_queue[v] = nil + end) + + table.insert(info_queue, G.P_CENTERS.m_stone) + end, + calculate = function(_, card, context) + local extra = card.ability.extra + + if not context.forcetrigger and + (context.end_of_round or + not context.individual or + (context.cardarea ~= G.play and context.cardarea ~= G.hand) or + not SMODS.has_enhancement(context.other_card, "m_stone")) then + return + end + + local delta = (context.cardarea == G.play and not card.blueprint) and 1 or 0 + extra.scored = extra.scored + delta + + if not extra.flipped and extra.scored == extra.required then + Bakery_API.flip_double_sided(card) + + q(function() + play_sound "Roland_excalibur" + end) + end + + return extra.scored > extra.required and {card = card, xmult = card.ability.extra.xmult} or + (delta > 0 and { + message = extra.scored .. "/" .. extra.required, + colour = G.C.JOKER_GREY, + message_card = card, + } or nil) + end, +} + joker { key = "oops", pronouns = "she_they",