Skip to content

Commit 0985501

Browse files
authored
shiny tags
adds shiny tags and kitty printer
1 parent 2a416ba commit 0985501

File tree

17 files changed

+379
-35
lines changed

17 files changed

+379
-35
lines changed

assets/1x/atlasone.png

11.7 KB
Loading

assets/1x/shinyc.png

11.6 KB
Loading

assets/1x/shinyv.png

8.49 KB
Loading

assets/2x/atlasone.png

64.4 KB
Loading

assets/2x/shinyc.png

19.8 KB
Loading

assets/2x/shinyv.png

14.7 KB
Loading

items/code.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,6 +2844,7 @@ local rework = {
28442844
end
28452845
tag.ability.rework_key = jkr.config.center.key
28462846
tag.ability.rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
2847+
tag.ability.shiny = cry_rollshinybool()
28472848
add_tag(tag)
28482849
--SMODS.Tags.tag_cry_rework.apply(tag, {type = "store_joker_create"})
28492850
G.E_MANAGER:add_event(Event({

items/m.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,9 @@ local smallestm = {
10601060
if context.cardarea == G.jokers and context.before then
10611061
--This isn't retrigger joker compatible for some reason
10621062
if context.scoring_name == card.ability.extra.type then
1063-
add_tag(Tag("tag_cry_double_m"))
1063+
local tag = Tag("tag_cry_double_m")
1064+
tag.ability.shiny = cry_rollshinybool()
1065+
add_tag(tag)
10641066
play_sound("generic1", 0.9 + math.random() * 0.1, 0.8)
10651067
play_sound("holo1", 1.2 + math.random() * 0.1, 0.4)
10661068
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {

items/misc_joker.lua

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -638,19 +638,21 @@ local pickle = {
638638
calculate = function(self, card, context)
639639
if context.skip_blind then
640640
for i = 1, math.min(20, card.ability.extra.tags) do
641-
local tag = Tag(get_next_tag_key("cry_pickle"))
642-
if tag.name == "Orbital Tag" then
643-
local _poker_hands = {}
644-
for k, v in pairs(G.GAME.hands) do
645-
if v.visible then
646-
_poker_hands[#_poker_hands + 1] = k
647-
end
648-
end
649-
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
650-
end
651-
if tag.name == "Boss Tag" then
641+
local tag_key = get_next_tag_key("cry_pickle")
642+
if tag_key == "tag_boss" then
652643
i = i - 1 --skip these, as they can cause bugs with pack opening from other tags
653644
else
645+
local tag = Tag(tag_key)
646+
if tag.name == "Orbital Tag" then
647+
local _poker_hands = {}
648+
for k, v in pairs(G.GAME.hands) do
649+
if v.visible then
650+
_poker_hands[#_poker_hands + 1] = k
651+
end
652+
end
653+
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
654+
end
655+
tag.ability.shiny = cry_rollshinybool()
654656
add_tag(tag)
655657
end
656658
end
@@ -670,8 +672,8 @@ local pickle = {
670672
card_eval_status_text(card, "extra", nil, nil, nil, {
671673
message = localize({
672674
type = "variable",
673-
key = card.ability.extra.tags == 1 and "a_tag_minus" or "a_tags_minus",
674-
vars = { card.ability.extra.tags },
675+
key = card.ability.extra.tags_mod == 1 and "a_tag_minus" or "a_tags_minus",
676+
vars = { card.ability.extra.tags_mod },
675677
})[1],
676678
colour = G.C.FILTER,
677679
})
@@ -6644,6 +6646,38 @@ local astral_bottle = {
66446646
end
66456647
end,
66466648
}
6649+
local kittyprinter = {
6650+
dependencies = {
6651+
items = {
6652+
"tag_cry_cat",
6653+
},
6654+
},
6655+
object_type = "Joker",
6656+
name = "cry-kittyprinter",
6657+
key = "kittyprinter",
6658+
config = { extra = { Xmult = 2 } },
6659+
pos = { x = 3, y = 5 },
6660+
rarity = 2,
6661+
cost = 6,
6662+
atlas = "atlasone",
6663+
order = 133,
6664+
blueprint_compat = true,
6665+
loc_vars = function(self, info_queue, card)
6666+
return { vars = { card.ability.extra.Xmult } }
6667+
end,
6668+
calculate = function(self, card, context)
6669+
if context.joker_main then
6670+
return {
6671+
message = localize({
6672+
type = "variable",
6673+
key = "a_xmult",
6674+
vars = { card.ability.extra.Xmult },
6675+
}),
6676+
Xmult_mod = card.ability.extra.Xmult,
6677+
}
6678+
end
6679+
end,
6680+
}
66476681
local kidnap = {
66486682
object_type = "Joker",
66496683
dependencies = {
@@ -7280,10 +7314,13 @@ local pity_prize = {
72807314
end,
72817315
calculate = function(self, card, context)
72827316
if context.skipping_booster then
7283-
local tag
7317+
local tag_key
72847318
repeat
7285-
tag = Tag(get_next_tag_key("cry_pity_prize"))
7286-
until tag.name ~= "Boss Tag" and tag.name ~= "Gambler's Tag" and tag.name ~= "Empowered Tag"
7319+
tag_key = get_next_tag_key("cry_pity_prize")
7320+
until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
7321+
-- this is my first time seeing repeat... wtf
7322+
local tag = Tag(tag_key)
7323+
tag.ability.shiny = cry_rollshinybool()
72877324
if tag.name == "Orbital Tag" then
72887325
local _poker_hands = {}
72897326
for k, v in pairs(G.GAME.hands) do
@@ -7763,6 +7800,7 @@ local miscitems = {
77637800
savvy,
77647801
subtle,
77657802
discreet,
7803+
kittyprinter,
77667804
kidnap,
77677805
exposed,
77687806
mask,

items/tag.lua

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,26 +224,35 @@ local gambler = {
224224
order = 13,
225225
atlas = "tag_cry",
226226
pos = { x = 2, y = 0 },
227-
config = { type = "immediate", odds = 4 },
227+
config = { type = "new_blind_choice", odds = 4 },
228228
min_ante = 2,
229229
key = "gambler",
230230
loc_vars = function(self, info_queue)
231231
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_cry_empowered" }
232232
return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } }
233233
end,
234234
apply = function(self, tag, context)
235-
if context.type == "immediate" then
235+
if context.type == "new_blind_choice" then
236236
if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then
237237
local lock = tag.ID
238238
G.CONTROLLER.locks[lock] = true
239239
tag:yep("+", G.C.SECONDARY_SET.Spectral, function()
240-
local tag = Tag("tag_cry_empowered")
241-
add_tag(tag)
240+
local emp = Tag("tag_cry_empowered")
241+
if tag.ability.shiny then -- good fucking luck
242+
emp.ability.shiny = cry_rollshinybool()
243+
end
244+
add_tag(emp)
245+
emp:apply_to_run({ type = "new_blind_choice" })
242246
G.CONTROLLER.locks[lock] = nil
243247
return true
244248
end)
245249
else
246250
tag:nope()
251+
for i = 1, #G.GAME.tags do
252+
if G.GAME.tags[i]:apply_to_run({ type = "new_blind_choice" }) then
253+
break
254+
end
255+
end
247256
end
248257
tag.triggered = true
249258
return true
@@ -261,7 +270,7 @@ local bundle = {
261270
order = 16,
262271
atlas = "tag_cry",
263272
pos = { x = 0, y = 0 },
264-
config = { type = "immediate" },
273+
config = { type = "new_blind_choice" },
265274
key = "bundle",
266275
min_ante = 2,
267276
loc_vars = function(self, info_queue)
@@ -272,14 +281,19 @@ local bundle = {
272281
return { vars = {} }
273282
end,
274283
apply = function(self, tag, context)
275-
if context.type == "immediate" then
284+
if context.type == "new_blind_choice" then
276285
local lock = tag.ID
277286
G.CONTROLLER.locks[lock] = true
278287
tag:yep("+", G.C.ATTENTION, function()
279-
add_tag(Tag("tag_standard"))
280-
add_tag(Tag("tag_charm"))
281-
add_tag(Tag("tag_meteor"))
282-
add_tag(Tag("tag_buffoon"))
288+
local tags = { "standard", "charm", "meteor", "buffoon" }
289+
for i, v in ipairs(tags) do
290+
local _tag = Tag("tag_" .. v)
291+
_tag.ability.shiny = cry_rollshinybool()
292+
add_tag(_tag)
293+
if i == 1 then
294+
_tag:apply_to_run({ type = "new_blind_choice" })
295+
end
296+
end
283297
G.CONTROLLER.locks[lock] = nil
284298
return true
285299
end)
@@ -1059,7 +1073,7 @@ local booster = {
10591073
local lock = tag.ID
10601074
G.CONTROLLER.locks[lock] = true
10611075
tag:yep("+", G.C.BLUE, function()
1062-
G.GAME.boostertag = true
1076+
G.GAME.boostertag = (G.GAME.boostertag or 0) + 1
10631077
G.CONTROLLER.locks[lock] = nil
10641078
return true
10651079
end)

0 commit comments

Comments
 (0)