Skip to content

Commit 3e354b3

Browse files
committed
bugfixes galore
- Queen's Gambit now destroys the scored queen - Necromancer now no longer crashes and cannot create consumables - Tags collection no longer crashes - Oversaturated is now properly handled on duped cards - Negative Code Cards can now be pulled with full consumable slots
1 parent ea43625 commit 3e354b3

File tree

5 files changed

+31
-21
lines changed

5 files changed

+31
-21
lines changed

items/code.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5190,7 +5190,8 @@ return {
51905190
end
51915191
--Code from Betmma's Vouchers
51925192
G.FUNCS.can_reserve_card = function(e)
5193-
if #G.consumeables.cards < G.consumeables.config.card_limit then
5193+
local c1 = e.config.ref_table
5194+
if #G.consumeables.cards < G.consumeables.config.card_limit + (Cryptid.safe_get(c1, "edition", "negative") and 1 or 0) then
51945195
e.config.colour = G.C.GREEN
51955196
e.config.button = "reserve_card"
51965197
else

items/misc.lua

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,32 @@ local oversat = {
288288
get_weight = function(self)
289289
return G.GAME.edition_rate * self.weight
290290
end,
291+
-- Note: Duping playing cards resets the base chips for some reason
291292
on_apply = function(card)
292-
Cryptid.with_deck_effects(card, function(card)
293-
Cryptid.misprintize(card, {
294-
min = 2,
295-
max = 2,
296-
}, nil, true)
297-
end)
298-
if card.config.center.apply_oversat then
299-
card.config.center:apply_oversat(card, function(val)
300-
return Cryptid.misprintize_val(val, {
293+
if not card.ability.cry_oversat then
294+
Cryptid.with_deck_effects(card, function(card)
295+
Cryptid.misprintize(card, {
301296
min = 2,
302297
max = 2,
303-
}, Cryptid.is_card_big(card))
298+
}, nil, true)
304299
end)
300+
if card.config.center.apply_oversat then
301+
card.config.center:apply_oversat(card, function(val)
302+
return Cryptid.misprintize_val(val, {
303+
min = 2 * (G.GAME.modifiers.cry_misprint_min or 1),
304+
max = 2 * (G.GAME.modifiers.cry_misprint_max or 1),
305+
}, Cryptid.is_card_big(card))
306+
end)
307+
end
305308
end
309+
card.ability.cry_oversat = true
306310
end,
307311
on_remove = function(card)
308312
Cryptid.with_deck_effects(card, function(card)
309-
Cryptid.misprintize(card, { min = 0.5, max = 0.5 }, nil, true)
313+
Cryptid.misprintize(card, { min = 1, max = 1 }, true)
314+
Cryptid.misprintize(card) -- Correct me if i'm wrong but this is for misprint deck. or atleast it is after this patch
310315
end)
316+
card.ability.cry_oversat = nil
311317
end,
312318
init = function(self)
313319
AurinkoAddons.cry_oversat = function(card, hand, instant, amount)

items/misc_joker.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ local queensgambit = {
324324
return true
325325
end,
326326
}))
327-
return nil, true
327+
return {remove = true}
328328
end
329329
end
330330
end,
@@ -7092,6 +7092,7 @@ local necromancer = {
70927092
and context.card.sell_cost > 0
70937093
and context.card.config.center.set == "Joker"
70947094
and G.GAME.jokers_sold
7095+
and #G.GAME.jokers_sold > 0
70957096
then
70967097
local card = create_card(
70977098
"Joker",

lib/modifiers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ G.FUNCS.openModUI_Cryptid = function(e)
767767
G.cry_current_tagpage = nil
768768
end
769769

770-
function cry_shinytag_tally()
770+
function Cryptid.shinytag_tally()
771771
local ret = 0
772772
for k, v in pairs(Cryptid.shinytagdata) do
773773
if Cryptid.shinytagdata[k] then

lovely/misc_joker.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ target = "card.lua"
2727
pattern = 'local eval, post = eval_card(self, {selling_self = true})'
2828
position = "before"
2929
payload = '''
30-
if G.GAME.jokers_sold then
31-
local contained = false
32-
for i = 1, #G.GAME.jokers_sold do
33-
if self.config.center.key == G.GAME.jokers_sold[i] then contained = true end
30+
if self.config.center.set == "Joker" and self.config.center.key ~= "j_cry_necromancer" then
31+
if G.GAME.jokers_sold then
32+
local contained = false
33+
for i = 1, #G.GAME.jokers_sold do
34+
if self.config.center.key == G.GAME.jokers_sold[i] then contained = true end
35+
end
36+
if not contained then table.insert(G.GAME.jokers_sold, self.config.center.key) end
37+
else
38+
G.GAME.jokers_sold = {self.config.center.key}
3439
end
35-
if not contained then table.insert(G.GAME.jokers_sold, self.config.center.key) end
36-
elseif self.config.center.set == "Joker" then
37-
G.GAME.jokers_sold = {self.config.center.key}
3840
end
3941
'''
4042
match_indent = true

0 commit comments

Comments
 (0)