Skip to content

Commit f45b9c6

Browse files
committed
pity prize + kitty printer fix / get_next_tag api
1 parent 9e6c722 commit f45b9c6

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed

items/code.lua

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4202,8 +4202,9 @@ local alttab = {
42024202
ret = "???"
42034203
end
42044204
end
4205-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4206-
ret = localize({ type = "name_text", key = "tag_cry_cat", set = "Tag" })
4205+
local tag = Cryptid.get_next_tag()
4206+
if tag then
4207+
ret = localize({ type = "name_text", key = tag, set = "Tag" })
42074208
end
42084209
return { vars = { ret } }
42094210
end,
@@ -4220,8 +4221,9 @@ local alttab = {
42204221
play_sound("tarot1")
42214222
local tag = nil
42224223
local type = G.GAME.blind:get_type()
4223-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4224-
tag = Tag("tag_cry_cat")
4224+
local tag_key = Cryptid.get_next_tag()
4225+
if tag_Key then
4226+
tag = Tag(tag_key)
42254227
elseif type == "Boss" then
42264228
tag = Tag(get_next_tag_key())
42274229
else
@@ -4245,8 +4247,9 @@ local alttab = {
42454247
play_sound("tarot1")
42464248
local tag = nil
42474249
local type = G.GAME.blind:get_type()
4248-
if next(SMODS.find_card("j_cry_kittyprinter")) then
4249-
tag = Tag("tag_cry_cat")
4250+
local tag_key = Cryptid.get_next_tag()
4251+
if tag_key then
4252+
tag = Tag(tag_key)
42504253
elseif type == "Boss" then
42514254
tag = Tag(get_next_tag_key())
42524255
else

items/misc_joker.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9399,6 +9399,12 @@ local pity_prize = {
93999399
repeat
94009400
tag_key = get_next_tag_key("cry_pity_prize")
94019401
until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
9402+
9403+
local tag = Cryptid.get_next_tag()
9404+
if tag then
9405+
tag_key = tag
9406+
end
9407+
94029408
-- this is my first time seeing repeat... wtf
94039409
local tag = Tag(tag_key)
94049410
tag.ability.shiny = Cryptid.is_shiny()

lib/cross-mod.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ if (SMODS.Mods["AntePreview"] or {}).can_load then
117117
big = get_new_boss()
118118
end
119119
local predictions = predict_hook()
120-
if next(SMODS.find_card("j_cry_kittyprinter")) then
121-
predictions.Small.tag = "tag_cry_cat"
122-
predictions.Big.tag = "tag_cry_cat"
120+
local s = Cryptid.get_next_tag("Small")
121+
local b = Cryptid.get_next_tag("Big")
122+
if s or b then
123+
predictions.Small.tag = s or predictions.Small.tag
124+
predictions.Big.tag = b or predictions.Big.tag
123125
end
124126
if G.GAME.modifiers.cry_no_tags then
125127
for _, pred in pairs(predictions) do

lib/misc.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,3 +1451,9 @@ function Cryptid.declare_hand_ascended_counter(hand, declarehand)
14511451
end
14521452
return total
14531453
end
1454+
1455+
function Cryptid.get_next_tag(override)
1456+
if next(SMODS.find_card("j_cry_kittyprinter")) then
1457+
return "tag_cry_cat"
1458+
end
1459+
end

lovely/misc.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ target = "functions/button_callbacks.lua"
257257
pattern = '''add_tag(_tag.config.ref_table)'''
258258
position = "at"
259259
payload = '''
260-
add_tag( next(SMODS.find_card('j_cry_kittyprinter')) and Tag('tag_cry_cat') or _tag.config.ref_table, true)
260+
add_tag(Cryptid.get_next_tag or _tag.config.ref_table, true)
261261
'''
262262
match_indent = true
263263

@@ -436,8 +436,9 @@ target = "functions/UI_definitions.lua"
436436
pattern = "local _tag = Tag(G.GAME.round_resets.blind_tags[blind_choice], nil, blind_choice)"
437437
position = "after"
438438
payload = '''
439-
if next(SMODS.find_card('j_cry_kittyprinter')) then
440-
_tag = Tag('tag_cry_cat', nil, blind_choice)
439+
local tag = Cryptid.get_next_tag()
440+
if tag then
441+
_tag = Tag(tag, nil, blind_choice)
441442
end
442443
'''
443444
match_indent = true

0 commit comments

Comments
 (0)