Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/1x/atlasone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/shinyc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/shinyv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/atlasone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/shinyc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/shinyv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions items/code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,7 @@ local rework = {
end
tag.ability.rework_key = jkr.config.center.key
tag.ability.rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
tag.ability.shiny = cry_rollshinybool()
add_tag(tag)
--SMODS.Tags.tag_cry_rework.apply(tag, {type = "store_joker_create"})
G.E_MANAGER:add_event(Event({
Expand Down
4 changes: 3 additions & 1 deletion items/m.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,9 @@ local smallestm = {
if context.cardarea == G.jokers and context.before then
--This isn't retrigger joker compatible for some reason
if context.scoring_name == card.ability.extra.type then
add_tag(Tag("tag_cry_double_m"))
local tag = Tag("tag_cry_double_m")
tag.ability.shiny = cry_rollshinybool()
add_tag(tag)
play_sound("generic1", 0.9 + math.random() * 0.1, 0.8)
play_sound("holo1", 1.2 + math.random() * 0.1, 0.4)
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
Expand Down
70 changes: 54 additions & 16 deletions items/misc_joker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -638,19 +638,21 @@ local pickle = {
calculate = function(self, card, context)
if context.skip_blind then
for i = 1, math.min(20, card.ability.extra.tags) do
local tag = Tag(get_next_tag_key("cry_pickle"))
if tag.name == "Orbital Tag" then
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible then
_poker_hands[#_poker_hands + 1] = k
end
end
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
end
if tag.name == "Boss Tag" then
local tag_key = get_next_tag_key("cry_pickle")
if tag_key == "tag_boss" then
i = i - 1 --skip these, as they can cause bugs with pack opening from other tags
else
local tag = Tag(tag_key)
if tag.name == "Orbital Tag" then
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible then
_poker_hands[#_poker_hands + 1] = k
end
end
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
end
tag.ability.shiny = cry_rollshinybool()
add_tag(tag)
end
end
Expand All @@ -670,8 +672,8 @@ local pickle = {
card_eval_status_text(card, "extra", nil, nil, nil, {
message = localize({
type = "variable",
key = card.ability.extra.tags == 1 and "a_tag_minus" or "a_tags_minus",
vars = { card.ability.extra.tags },
key = card.ability.extra.tags_mod == 1 and "a_tag_minus" or "a_tags_minus",
vars = { card.ability.extra.tags_mod },
})[1],
colour = G.C.FILTER,
})
Expand Down Expand Up @@ -6644,6 +6646,38 @@ local astral_bottle = {
end
end,
}
local kittyprinter = {
dependencies = {
items = {
"tag_cry_cat",
},
},
object_type = "Joker",
name = "cry-kittyprinter",
key = "kittyprinter",
config = { extra = { Xmult = 2 } },
pos = { x = 3, y = 5 },
rarity = 2,
cost = 6,
atlas = "atlasone",
order = 133,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
message = localize({
type = "variable",
key = "a_xmult",
vars = { card.ability.extra.Xmult },
}),
Xmult_mod = card.ability.extra.Xmult,
}
end
end,
}
local kidnap = {
object_type = "Joker",
dependencies = {
Expand Down Expand Up @@ -7280,10 +7314,13 @@ local pity_prize = {
end,
calculate = function(self, card, context)
if context.skipping_booster then
local tag
local tag_key
repeat
tag = Tag(get_next_tag_key("cry_pity_prize"))
until tag.name ~= "Boss Tag" and tag.name ~= "Gambler's Tag" and tag.name ~= "Empowered Tag"
tag_key = get_next_tag_key("cry_pity_prize")
until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
-- this is my first time seeing repeat... wtf
local tag = Tag(tag_key)
tag.ability.shiny = cry_rollshinybool()
if tag.name == "Orbital Tag" then
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
Expand Down Expand Up @@ -7763,6 +7800,7 @@ local miscitems = {
savvy,
subtle,
discreet,
kittyprinter,
kidnap,
exposed,
mask,
Expand Down
36 changes: 25 additions & 11 deletions items/tag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,26 +224,35 @@ local gambler = {
order = 13,
atlas = "tag_cry",
pos = { x = 2, y = 0 },
config = { type = "immediate", odds = 4 },
config = { type = "new_blind_choice", odds = 4 },
min_ante = 2,
key = "gambler",
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_cry_empowered" }
return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } }
end,
apply = function(self, tag, context)
if context.type == "immediate" then
if context.type == "new_blind_choice" then
if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.SECONDARY_SET.Spectral, function()
local tag = Tag("tag_cry_empowered")
add_tag(tag)
local emp = Tag("tag_cry_empowered")
if tag.ability.shiny then -- good fucking luck
emp.ability.shiny = cry_rollshinybool()
end
add_tag(emp)
emp:apply_to_run({ type = "new_blind_choice" })
G.CONTROLLER.locks[lock] = nil
return true
end)
else
tag:nope()
for i = 1, #G.GAME.tags do
if G.GAME.tags[i]:apply_to_run({ type = "new_blind_choice" }) then
break
end
end
end
tag.triggered = true
return true
Expand All @@ -261,7 +270,7 @@ local bundle = {
order = 16,
atlas = "tag_cry",
pos = { x = 0, y = 0 },
config = { type = "immediate" },
config = { type = "new_blind_choice" },
key = "bundle",
min_ante = 2,
loc_vars = function(self, info_queue)
Expand All @@ -272,14 +281,19 @@ local bundle = {
return { vars = {} }
end,
apply = function(self, tag, context)
if context.type == "immediate" then
if context.type == "new_blind_choice" then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.ATTENTION, function()
add_tag(Tag("tag_standard"))
add_tag(Tag("tag_charm"))
add_tag(Tag("tag_meteor"))
add_tag(Tag("tag_buffoon"))
local tags = { "standard", "charm", "meteor", "buffoon" }
for i, v in ipairs(tags) do
local _tag = Tag("tag_" .. v)
_tag.ability.shiny = cry_rollshinybool()
add_tag(_tag)
if i == 1 then
_tag:apply_to_run({ type = "new_blind_choice" })
end
end
G.CONTROLLER.locks[lock] = nil
return true
end)
Expand Down Expand Up @@ -1059,7 +1073,7 @@ local booster = {
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.BLUE, function()
G.GAME.boostertag = true
G.GAME.boostertag = (G.GAME.boostertag or 0) + 1
G.CONTROLLER.locks[lock] = nil
return true
end)
Expand Down
15 changes: 15 additions & 0 deletions lib/content.lua
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,21 @@ SMODS.Atlas({
px = 34,
py = 34,
})

-- shiny tags
SMODS.Atlas({
key = "shinyv",
path = "shinyv.png",
px = 34,
py = 34,
})
SMODS.Atlas({
key = "shinyc",
path = "shinyc.png",
px = 34,
py = 34,
})

SMODS.Atlas({
key = "atlasdeck",
path = "atlasdeck.png",
Expand Down
21 changes: 21 additions & 0 deletions lib/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,27 @@ function cry_bonusvouchermod(mod)
end
end

function save_cryptid()
local data = {
shinytags = {},
}
data.shinytags = copy_table(Cryptid.shinytagdata)
compress_and_save(G.SETTINGS.profile .. "/" .. "cryptidsave.jkr", STR_PACK(data))
end

local sppref = set_profile_progress
function set_profile_progress()
sppref()
if not Cryptid.shinytagdata.init then
for k, v in pairs(G.P_TAGS) do
if Cryptid.shinytagdata[k] == nil then
Cryptid.shinytagdata.init = true
Cryptid.shinytagdata[k] = false
end
end
end
end

Cryptid.big_num_whitelist = {
j_ride_the_bus = true,
j_egg = true,
Expand Down
39 changes: 39 additions & 0 deletions lib/modifiers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,45 @@ SMODS.Sticker({
end
end,
})

-- shiny tag hooks

local tagability = Tag.set_ability
function Tag:set_ability()
tagability(self)
if self.ability.blind_type then
G.GAME.cry_shiny_choices = G.GAME.cry_shiny_choices or {}
G.GAME.cry_shiny_choices[G.GAME.round_resets.ante] = G.GAME.cry_shiny_choices[G.GAME.round_resets.ante] or {}

if not G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] then
G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] = cry_rollshiny()
end
self.ability.shiny = G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] == "shiny"
and true
end
end

local ycollecref = G.FUNCS.your_collection
G.FUNCS.your_collection = function(e)
ycollecref(e)
G.cry_current_tagpage = nil
end
local omuicryref = G.FUNCS.openModUI_Cryptid
G.FUNCS.openModUI_Cryptid = function(e)
omuicryref(e)
G.cry_current_tagpage = nil
end

function cry_shinytag_tally()
local ret = 0
for k, v in pairs(Cryptid.shinytagdata) do
if Cryptid.shinytagdata[k] then
ret = ret + 1
end
end
return ret
end

-- temp crappy overwrite for voucher ui until smods does stuff

function G.UIDEF.used_vouchers()
Expand Down
13 changes: 13 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,14 @@ return {
"{C:attention}Type Chips{} Joker is sold",
},
},
j_cry_kittyprinter = {
name = "Kitty Printer",
text = {
"{X:mult,C:white} X#1# {} Mult",
"All {C:attention}skip{} tags",
"become {C:attention}Cat Tags{}",
},
},
j_cry_kooky = {
name = "Kooky Joker",
text = {
Expand Down Expand Up @@ -4295,6 +4303,7 @@ return {
b_pull = "PULL",
cry_hooked_ex = "Hooked!",
k_end_blind = "End Blind",
k_cry_shiny = "Shiny",

cry_code_rank = "ENTER RANK",
cry_code_enh = "ENTER ENHANCEMENT",
Expand All @@ -4312,6 +4321,10 @@ return {
b_flip = "FLIP",
b_merge = "MERGE",

cry_hand_bulwark = "Bulwark",
cry_hand_clusterfuck = "Clusterfuck",
cry_hand_ultpair = "Ultimate Pair",

cry_asc_hands = "Asc. Hands",
cry_p_star = "Star",

Expand Down
Loading