Skip to content

Commit c856a01

Browse files
authored
make all shinies obtainable
1 parent 2265585 commit c856a01

File tree

7 files changed

+47
-35
lines changed

7 files changed

+47
-35
lines changed

items/code.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ local rework = {
12751275
end
12761276
tag.ability.rework_key = jkr.config.center.key
12771277
tag.ability.rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
1278+
tag.ability.shiny = cry_rollshinybool()
12781279
add_tag(tag)
12791280
--SMODS.Tags.tag_cry_rework.apply(tag, {type = "store_joker_create"})
12801281
G.E_MANAGER:add_event(Event({

items/m.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,9 @@ local smallestm = {
10241024
if context.cardarea == G.jokers and context.before then
10251025
--This isn't retrigger joker compatible for some reason
10261026
if context.scoring_name == card.ability.extra.type then
1027-
add_tag(Tag("tag_cry_double_m"))
1027+
local tag = Tag("tag_cry_double_m")
1028+
tag.ability.shiny = cry_rollshinybool()
1029+
add_tag(tag)
10281030
play_sound('generic1', 0.9 + math.random()*0.1, 0.8)
10291031
play_sound('holo1', 1.2 + math.random()*0.1, 0.4)
10301032
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {

items/misc_joker.lua

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -541,19 +541,21 @@ local pickle = {
541541
calculate = function(self, card, context)
542542
if context.skip_blind then
543543
for i = 1, math.min(20, card.ability.extra.tags) do
544-
local tag = Tag(get_next_tag_key("cry_pickle"))
545-
if tag.name == "Orbital Tag" then
546-
local _poker_hands = {}
547-
for k, v in pairs(G.GAME.hands) do
548-
if v.visible then
549-
_poker_hands[#_poker_hands + 1] = k
550-
end
551-
end
552-
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
553-
end
554-
if tag.name == "Boss Tag" then
544+
local tag_key = get_next_tag_key("cry_pickle")
545+
if tag_key == "tag_boss" then
555546
i = i - 1 --skip these, as they can cause bugs with pack opening from other tags
556547
else
548+
local tag = Tag(tag_key)
549+
if tag.name == "Orbital Tag" then
550+
local _poker_hands = {}
551+
for k, v in pairs(G.GAME.hands) do
552+
if v.visible then
553+
_poker_hands[#_poker_hands + 1] = k
554+
end
555+
end
556+
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
557+
end
558+
tag.ability.shiny = cry_rollshinybool()
557559
add_tag(tag)
558560
end
559561
end
@@ -580,7 +582,7 @@ local pickle = {
580582
nil,
581583
nil,
582584
{
583-
message = "-"..localize({ type = "variable", key = "a_tag" .. (card.ability.extra.tags > 1 and "s" or ""), vars = { card.ability.extra.tags } })[1],
585+
message = "-"..localize({ type = "variable", key = "a_tag" .. (card.ability.extra.tags_mod > 1 and "s" or ""), vars = { card.ability.extra.tags_mod } })[1],
584586
colour = G.C.FILTER,
585587
}
586588
)
@@ -6560,10 +6562,13 @@ local pity_prize = {
65606562
end,
65616563
calculate = function(self, card, context)
65626564
if context.skipping_booster then
6563-
local tag
6565+
local tag_key
65646566
repeat
6565-
tag = Tag(get_next_tag_key("cry_pity_prize"))
6566-
until tag.name ~= "Boss Tag" and tag.name ~= "Gambler's Tag" and tag.name ~= "Empowered Tag" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
6567+
tag_key = get_next_tag_key("cry_pity_prize")
6568+
until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
6569+
-- this is my first time seeing repeat... wtf
6570+
local tag = Tag(tag_key)
6571+
tag.ability.shiny = cry_rollshinybool()
65676572
if tag.name == "Orbital Tag" then
65686573
local _poker_hands = {}
65696574
for k, v in pairs(G.GAME.hands) do

items/tag.lua

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,35 @@ local gambler = {
193193
order = 13,
194194
atlas = "tag_cry",
195195
pos = { x = 2, y = 0 },
196-
config = { type = "immediate", odds = 4 },
196+
config = { type = "new_blind_choice", odds = 4 },
197197
min_ante = 2,
198198
key = "gambler",
199199
loc_vars = function(self, info_queue)
200200
info_queue[#info_queue + 1] = G.P_CENTERS.tag_cry_empowered
201201
return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } }
202202
end,
203203
apply = function(self, tag, context)
204-
if context.type == "immediate" then
204+
if context.type == "new_blind_choice" then
205205
if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then
206206
local lock = tag.ID
207207
G.CONTROLLER.locks[lock] = true
208208
tag:yep('+', G.C.SECONDARY_SET.Spectral,function()
209-
local tag = Tag("tag_cry_empowered")
210-
add_tag(tag)
209+
local emp = Tag("tag_cry_empowered")
210+
if tag.ability.shiny then -- good fucking luck
211+
emp.ability.shiny = cry_rollshinybool()
212+
end
213+
add_tag(emp)
214+
emp:apply_to_run({type = 'new_blind_choice'})
211215
G.CONTROLLER.locks[lock] = nil
212216
return true
213217
end)
214218
else
215219
tag:nope()
220+
for i = 1, #G.GAME.tags do
221+
if G.GAME.tags[i]:apply_to_run({type = 'new_blind_choice'}) then break end
222+
end
216223
end
224+
217225
tag.triggered = true
218226
return true
219227
end
@@ -225,7 +233,7 @@ local bundle = {
225233
order = 16,
226234
atlas = "tag_cry",
227235
pos = { x = 0, y = 0 },
228-
config = { type = "immediate" },
236+
config = { type = "new_blind_choice" },
229237
key = "bundle",
230238
min_ante = 2,
231239
loc_vars = function(self, info_queue)
@@ -236,14 +244,19 @@ local bundle = {
236244
return { vars = {} }
237245
end,
238246
apply = function(self, tag, context)
239-
if context.type == "immediate" then
247+
if context.type == "new_blind_choice" then
240248
local lock = tag.ID
241249
G.CONTROLLER.locks[lock] = true
242250
tag:yep("+", G.C.ATTENTION, function()
243-
add_tag(Tag("tag_standard"))
244-
add_tag(Tag("tag_charm"))
245-
add_tag(Tag("tag_meteor"))
246-
add_tag(Tag("tag_buffoon"))
251+
local tags = {'standard', 'charm', 'meteor', 'buffoon'}
252+
for i, v in ipairs(tags) do
253+
local _tag = Tag("tag_"..v)
254+
_tag.ability.shiny = cry_rollshinybool()
255+
add_tag(_tag)
256+
if i == 1 then
257+
_tag:apply_to_run({type = 'new_blind_choice'})
258+
end
259+
end
247260
G.CONTROLLER.locks[lock] = nil
248261
return true
249262
end)

lib/misc.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ function set_profile_progress()
399399
if Cryptid.shinytagdata[k] == nil then
400400
Cryptid.shinytagdata.init = true
401401
Cryptid.shinytagdata[k] = false
402-
print(k)
403402
end
404403
end
405404
end

lib/modifiers.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,6 @@ function Tag:set_ability()
686686
G.GAME.cry_shiny_choices[G.GAME.round_resets.ante] = G.GAME.cry_shiny_choices[G.GAME.round_resets.ante] or {}
687687

688688
if not G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] then
689-
print("rolling")
690689
G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] = cry_rollshiny()
691690
end
692691
self.ability.shiny = G.GAME.cry_shiny_choices[G.GAME.round_resets.ante][self.ability.blind_type] == 'shiny' and true
@@ -711,7 +710,6 @@ function cry_shinytag_tally()
711710
ret = ret + 1
712711
end
713712
end
714-
print(ret)
715713
return ret
716714
end
717715

lovely/cat.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ function cry_rollshiny()
216216
local prob = 1
217217
if next(SMODS.find_card('j_lucky_cat')) then prob = 3 end
218218
if pseudorandom("cry_shiny") < prob / 4096 then
219-
print("true")
220219
return 'shiny'
221220
end
222221
return 'normal'
@@ -334,11 +333,6 @@ position = "after"
334333
payload = '''
335334
local cryptidsave = STR_UNPACK(get_compressed(G.SETTINGS.profile..'/'..'cryptidsave.jkr') or 'return {}')
336335
337-
for k, v in pairs(cryptidsave) do
338-
print('loaded CRYPTIDSAVE')
339-
print(k)
340-
end
341-
342336
if cryptidsave and cryptidsave.shinytags then
343337
Cryptid.shinytagdata = copy_table(cryptidsave.shinytags)
344338
else

0 commit comments

Comments
 (0)