Add Invisible Tag

This commit is contained in:
Emik 2026-04-27 16:55:58 +02:00
parent f23dad31cc
commit 8bcd0e074d
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
13 changed files with 44 additions and 2 deletions

BIN
assets/1x/tag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
assets/2x/tag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

View file

@ -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 = {

View file

@ -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",

View file

@ -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)

36
src/tag.lua Normal file
View file

@ -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,
}