Skip to content

Commit 055f603

Browse files
committed
add clone, lens, and palette cleanser tags
1 parent db434f8 commit 055f603

File tree

9 files changed

+299
-2
lines changed

9 files changed

+299
-2
lines changed

assets/1x/atlasnotjokers.png

90 Bytes
Loading

assets/1x/shinyc.png

-995 Bytes
Loading

assets/1x/tag_cry.png

1.21 KB
Loading

assets/2x/shinyc.png

-4.1 KB
Loading

assets/2x/tag_cry.png

3.28 KB
Loading

items/epic.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,7 @@ local demicolon = {
23852385
cost = 14,
23862386
order = 299,
23872387
blueprint_compat = false,
2388-
demicoloncompat = false,
2388+
demicoloncompat = true,
23892389
atlas = "atlasepic",
23902390
pos = { x = 3, y = 5 },
23912391
config = { check = nil },
@@ -2455,7 +2455,7 @@ local demicolon = {
24552455
end
24562456
end,
24572457
calculate = function(self, card, context)
2458-
if context.joker_main and not context.blueprint and not context.forcetrigger then
2458+
if context.joker_main and not context.blueprint then
24592459
for i = 1, #G.jokers.cards do
24602460
if G.jokers.cards[i] == card then
24612461
if Cryptid.demicolonGetTriggerable(G.jokers.cards[i + 1])[1] then

items/tag.lua

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,252 @@ local booster = {
14161416
end
14171417
end,
14181418
}
1419+
1420+
local clone = {
1421+
cry_credits = {
1422+
idea = {
1423+
"Squiddy",
1424+
},
1425+
art = {
1426+
"lord.ruby",
1427+
},
1428+
code = {
1429+
"lord.ruby",
1430+
},
1431+
},
1432+
object_type = "Tag",
1433+
dependencies = {
1434+
items = {
1435+
"set_cry_tag",
1436+
},
1437+
},
1438+
name = "cry-Clone Tag",
1439+
order = 29,
1440+
atlas = "tag_cry",
1441+
pos = { x = 6, y = 3 },
1442+
config = { type = "item_bought", cost_fac = 1.5 },
1443+
key = "clone",
1444+
loc_vars = function(self, info_queue)
1445+
return { vars = {self.config.cost_fac} }
1446+
end,
1447+
min_ante = 4,
1448+
apply = function(self, tag, context)
1449+
if context.type == "item_bought" then
1450+
local lock = tag.ID
1451+
G.CONTROLLER.locks[lock] = true
1452+
tag:yep("+", G.C.BLUE, function()
1453+
local copy = copy_card(context.card)
1454+
if context.card.area then
1455+
context.card.area:emplace(copy)
1456+
else
1457+
G.consumeables:emplace(copy)
1458+
end
1459+
G.E_MANAGER:add_event(Event({
1460+
func = function()
1461+
for i, v in pairs(G.I.CARD) do
1462+
if v.set_cost then
1463+
v:set_cost()
1464+
end
1465+
end
1466+
return true
1467+
end
1468+
}))
1469+
G.CONTROLLER.locks[lock] = nil
1470+
return true
1471+
end)
1472+
tag.triggered = true
1473+
return true
1474+
end
1475+
end,
1476+
init = function()
1477+
local buy_ref = G.FUNCS.buy_from_shop
1478+
G.FUNCS.buy_from_shop = function(e)
1479+
local r = buy_ref(e)
1480+
if r ~= false then
1481+
for i = 1, #G.GAME.tags do
1482+
G.GAME.tags[i]:apply_to_run({type = 'item_bought', card = e.config.ref_table})
1483+
end
1484+
end
1485+
return r
1486+
end
1487+
local set_costref = Card.set_cost
1488+
function Card:set_cost(...)
1489+
local c = set_costref(self, ...)
1490+
local has
1491+
for i = 1, #G.GAME.tags do
1492+
if G.GAME.tags[i].key == "tag_cry_clone" then has = true; break end
1493+
end
1494+
if has then
1495+
self.cost = self.cost * 1.5
1496+
end
1497+
end
1498+
end
1499+
}
1500+
1501+
local lens = {
1502+
cry_credits = {
1503+
idea = {
1504+
"Squiddy",
1505+
},
1506+
art = {
1507+
"lord.ruby",
1508+
},
1509+
code = {
1510+
"lord.ruby",
1511+
},
1512+
},
1513+
object_type = "Tag",
1514+
dependencies = {
1515+
items = {
1516+
"set_cry_tag",
1517+
},
1518+
},
1519+
name = "cry-Lens Tag",
1520+
order = 30,
1521+
atlas = "tag_cry",
1522+
pos = { x = 7, y = 3 },
1523+
config = { type = "immediate", negatives = 2 },
1524+
key = "lens",
1525+
loc_vars = function(self, info_queue)
1526+
info_queue[#info_queue+1] = G.P_CENTERS.e_negative
1527+
return { vars = {self.config.negatives} }
1528+
end,
1529+
min_ante = 4,
1530+
apply = function(self, tag, context)
1531+
if context.type == "immediate" then
1532+
local c = {}
1533+
for i, v in pairs(G.consumeables.cards) do
1534+
if not v.edition or not v.edition.negative then
1535+
if not v.will_be_editioned then
1536+
c[#c+1] = v
1537+
end
1538+
end
1539+
end
1540+
if #c > 0 then
1541+
local lock = tag.ID
1542+
G.CONTROLLER.locks[lock] = true
1543+
local card = pseudorandom_element(c, pseudoseed("cry_lens_tag"))
1544+
card.will_be_editioned = true
1545+
local card2 = pseudorandom_element(c, pseudoseed("cry_lens_tag"))
1546+
if card2 then
1547+
card2.will_be_editioned = true
1548+
end
1549+
tag:yep("+", G.C.BLUE, function()
1550+
card:set_edition("e_negative")
1551+
G.CONTROLLER.locks[lock] = nil
1552+
card.will_be_editioned = nil
1553+
if card2 then
1554+
card2:set_edition("e_negative")
1555+
card2.will_be_editioned = nil
1556+
end
1557+
return true
1558+
end)
1559+
else
1560+
tag:nope()
1561+
end
1562+
tag.triggered = true
1563+
return true
1564+
end
1565+
end,
1566+
}
1567+
1568+
local palette_cleanser = {
1569+
cry_credits = {
1570+
idea = {
1571+
"Squiddy",
1572+
},
1573+
art = {
1574+
"lord.ruby",
1575+
},
1576+
code = {
1577+
"lord.ruby",
1578+
},
1579+
},
1580+
object_type = "Tag",
1581+
dependencies = {
1582+
items = {
1583+
"set_cry_tag",
1584+
},
1585+
},
1586+
name = "cry-Palette Cleanser Tag",
1587+
order = 30,
1588+
atlas = "tag_cry",
1589+
pos = { x = 0, y = 4 },
1590+
config = { type = "immediate"},
1591+
key = "palette_cleanser",
1592+
loc_vars = function(self, info_queue)
1593+
return { vars = {} }
1594+
end,
1595+
min_ante = 4,
1596+
apply = function(self, tag, context)
1597+
if context.type == "immediate" then
1598+
local c = {}
1599+
for i, v in pairs(G.jokers.cards) do
1600+
if v:has_stickers() then
1601+
if not v.will_be_cleansed then
1602+
c[#c+1] = v
1603+
end
1604+
end
1605+
end
1606+
for i, v in pairs(G.deck.cards) do
1607+
if v:has_stickers() then
1608+
if not v.will_be_cleansed then
1609+
c[#c+1] = v
1610+
end
1611+
end
1612+
end
1613+
for i, v in pairs(G.hand.cards) do
1614+
if v:has_stickers() then
1615+
if not v.will_be_cleansed then
1616+
c[#c+1] = v
1617+
end
1618+
end
1619+
end
1620+
if #c > 0 then
1621+
local lock = tag.ID
1622+
G.CONTROLLER.locks[lock] = true
1623+
local card = pseudorandom_element(c, pseudoseed("cry_palette_cleanser_tag"))
1624+
card.will_be_cleansed = true
1625+
tag:yep("+", G.C.BLUE, function()
1626+
card:remove_random_sticker("cry_palette_cleanser_sticker")
1627+
G.CONTROLLER.locks[lock] = nil
1628+
card.will_be_cleansed = nil
1629+
return true
1630+
end)
1631+
else
1632+
tag:nope()
1633+
end
1634+
tag.triggered = true
1635+
return true
1636+
end
1637+
end,
1638+
in_pool = function()
1639+
local c = {}
1640+
for i, v in pairs(G.jokers.cards) do
1641+
if not v:has_stickers() then
1642+
if not v.will_be_cleansed then
1643+
c[#c+1] = v
1644+
end
1645+
end
1646+
end
1647+
for i, v in pairs(G.deck.cards) do
1648+
if not v:has_stickers() then
1649+
if not v.will_be_cleansed then
1650+
c[#c+1] = v
1651+
end
1652+
end
1653+
end
1654+
for i, v in pairs(G.hand.cards) do
1655+
if not v:has_stickers() then
1656+
if not v.will_be_cleansed then
1657+
c[#c+1] = v
1658+
end
1659+
end
1660+
end
1661+
return #c > 0
1662+
end
1663+
}
1664+
14191665
local tagitems = {
14201666
cat,
14211667
empoweredPack,
@@ -1439,6 +1685,9 @@ local tagitems = {
14391685
blur_tag,
14401686
astral_tag,
14411687
loss,
1688+
clone,
1689+
lens,
1690+
palette_cleanser,
14421691
m_tag,
14431692
double_m_tag,
14441693
}

lib/misc.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,3 +1060,27 @@ function Cryptid.get_paved_joker()
10601060
total = math.min(stones, total)
10611061
return total
10621062
end
1063+
1064+
1065+
function Card:has_stickers()
1066+
for i, v in pairs(SMODS.Sticker.obj_table) do
1067+
if self.ability[i] then
1068+
return true
1069+
end
1070+
end
1071+
end
1072+
function Card:remove_random_sticker(seed)
1073+
local s = {}
1074+
for i, v in pairs(SMODS.Sticker.obj_table) do
1075+
if not v.hidden and i ~= "cry_absolute" and self.ability[i] then
1076+
s[#s+1] = i
1077+
end
1078+
end
1079+
if #s > 0 then
1080+
local sticker = pseudorandom_element(s, pseudoseed(seed))
1081+
self.ability[sticker] = nil
1082+
if sticker == "perishable" then
1083+
self.ability.perish_tally = nil
1084+
end
1085+
end
1086+
end

localization/en-us.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3959,6 +3959,30 @@ return {
39593959
"{s:0.8,C:inactive}Copying Tags excluded",
39603960
},
39613961
},
3962+
tag_cry_clone = {
3963+
name = "Clone Tag",
3964+
text = {
3965+
"Shop Items cost {C:attention}X#1#{}",
3966+
"as much, Obtain a {C:attention}Copy{}",
3967+
"of the next bought card"
3968+
},
3969+
},
3970+
tag_cry_lens = {
3971+
name = "Lens Tag",
3972+
text = {
3973+
"Apply {C:dark_edition}Negative{}",
3974+
"to {C:attention}#1#{} Random",
3975+
"consumable#<s>1#"
3976+
},
3977+
},
3978+
tag_cry_palette_cleanser = {
3979+
name = "Palette Cleanser Tag",
3980+
text = {
3981+
"Remove a {C:attention}random{}",
3982+
"sticker from a {C:attention}random{}",
3983+
"Joker or Playing card"
3984+
},
3985+
},
39623986
},
39633987
Tarot = {
39643988
c_cry_automaton = {

0 commit comments

Comments
 (0)