diff --git a/assets/1x/tag.png b/assets/1x/tag.png new file mode 100644 index 0000000..26a6efa Binary files /dev/null and b/assets/1x/tag.png differ diff --git a/assets/2x/back.png b/assets/2x/back.png index a927c0b..d16bb97 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 c18e334..67de61c 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 5d72119..4998714 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 b835780..8494114 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 0e35d2b..2e45806 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 47e02c4..794c9fd 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 097ecec..0a0220d 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 new file mode 100644 index 0000000..ae2db7e Binary files /dev/null and b/assets/2x/tag.png differ diff --git a/localization/en-us.lua b/localization/en-us.lua index 95e85e5..d7bf53a 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -381,6 +381,12 @@ return { }, }, }, + Tag = { + tag_Roland_invisible = { + name = "Invisible Tag", + text = {"{C:attention}Duplicate {}a random Joker", "{C:inactive}(Must have room)"}, + }, + }, }, misc = { challenge_names = { diff --git a/manifest.json b/manifest.json index d6c7912..79de541 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.2.10", + "version": "2.2.11", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/main.lua b/src/main.lua index 342c32d..d425258 100644 --- a/src/main.lua +++ b/src/main.lua @@ -1,7 +1,7 @@ local qol = assert(SMODS.load_file "src/lib/shared.lua")() or require "lib.shared" local f, q = unpack(qol) -f {"challenge", "spectral", "edition", "tweaks", "blind", "charm", "joker", "back", "seal"}:each(function(v) +f {"challenge", "spectral", "edition", "tweaks", "blind", "charm", "joker", "back", "seal", "tag"}:each(function(v) assert(SMODS.load_file("src/" .. v .. ".lua"))(qol) end) diff --git a/src/tag.lua b/src/tag.lua new file mode 100644 index 0000000..11f7346 --- /dev/null +++ b/src/tag.lua @@ -0,0 +1,36 @@ +local _, q = unpack(... or require "lib.shared") + +SMODS.Atlas { + px = 34, + py = 34, + key = "tag", + path = "tag.png", +} + +SMODS.Tag { + key = "invisible", + atlas = "tag", + min_ante = 2, + pos = {x = 0, y = 0}, + apply = function(_, tag) + local modifiers = G.GAME.modifiers + + if tag.triggered or + not next(G.jokers.cards) or + #G.jokers.cards + (modifiers.Roland_invisible or 0) >= G.jokers.config.card_limit then + return + end + + tag.triggered = true + modifiers.Roland_invisible = (modifiers.Roland_invisible or 0) + 1 + + tag:yep(localize "k_duplicated_ex", G.C.GREY, function() + local copied = pseudorandom_element(G.jokers.cards, pseudoseed "Roland_invisible") + local copy = copy_card(copied) + G.jokers:emplace(copy) + copy:add_to_deck() + modifiers.Roland_invisible = (modifiers.Roland_invisible or 0) - 1 + return true + end) + end, +}