Add Invisible Tag
BIN
assets/1x/tag.png
Normal file
|
After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
BIN
assets/2x/tag.png
Normal file
|
After Width: | Height: | Size: 611 B |
|
|
@ -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 = {
|
misc = {
|
||||||
challenge_names = {
|
challenge_names = {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "2.2.10",
|
"version": "2.2.11",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local qol = assert(SMODS.load_file "src/lib/shared.lua")() or require "lib.shared"
|
local qol = assert(SMODS.load_file "src/lib/shared.lua")() or require "lib.shared"
|
||||||
local f, q = unpack(qol)
|
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)
|
assert(SMODS.load_file("src/" .. v .. ".lua"))(qol)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
36
src/tag.lua
Normal 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,
|
||||||
|
}
|
||||||