Skip to content

Commit 093a563

Browse files
authored
fix cat tag and voucher/booster slots
1 parent 86ace49 commit 093a563

File tree

4 files changed

+35
-45
lines changed

4 files changed

+35
-45
lines changed

items/epic.lua

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,8 @@ local error_joker = {
391391
eternal_compat = false,
392392
atlas = "atlasepic",
393393
loc_vars = function(self, info_queue, center)
394-
local ok, ret = pcall(predict_card_for_shop)
395-
if safe_get(G.GAME, "pseudorandom") and G.STAGE == G.STAGES.RUN and ok then
396-
cry_error_msgs[#cry_error_msgs].string = "%%" .. ret
394+
if safe_get(G.GAME, "pseudorandom") and G.STAGE == G.STAGES.RUN then
395+
cry_error_msgs[#cry_error_msgs].string = "%%" .. (pcall(predict_card_for_shop) or "J6")
397396
else
398397
cry_error_msgs[#cry_error_msgs].string = "%%J6"
399398
end
@@ -1633,36 +1632,33 @@ local soccer = {
16331632
"set_cry_epic",
16341633
},
16351634
},
1636-
immutable = true,
1635+
immutable = true, -- i swear i changed this... whatever
16371636
rarity = "cry_epic",
16381637
order = 58,
16391638
cost = 20,
16401639
atlas = "atlasepic",
16411640
loc_vars = function(self, info_queue, center)
16421641
return { vars = { center.ability.extra.holygrail } }
16431642
end,
1644-
add_to_deck = function(self, card, from_debuff) --TODO: Card in booster packs, Voucher slots
1643+
add_to_deck = function(self, card, from_debuff)
16451644
card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail)
1645+
local mod = card.ability.extra.holygrail
16461646
G.jokers.config.card_limit = G.jokers.config.card_limit
1647-
+ ((Card.get_gameset(card) == "modest") and 0 or card.ability.extra.holygrail)
1648-
G.consumeables.config.card_limit = G.consumeables.config.card_limit + card.ability.extra.holygrail
1649-
G.hand:change_size(card.ability.extra.holygrail)
1650-
if not G.GAME.modifiers.cry_booster_packs then
1651-
G.GAME.modifiers.cry_booster_packs = 2
1652-
end
1653-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs + card.ability.extra.holygrail
1654-
change_shop_size(card.ability.extra.holygrail)
1647+
+ ((Card.get_gameset(card) == "modest") and 0 or mod)
1648+
G.consumeables.config.card_limit = G.consumeables.config.card_limit + mod
1649+
G.hand:change_size(mod)
1650+
SMODS.change_booster_limit(mod)
1651+
SMODS.change_voucher_limit(mod)
16551652
end,
16561653
remove_from_deck = function(self, card, from_debuff)
1654+
card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail)
1655+
local mod = card.ability.extra.holygrail
16571656
G.jokers.config.card_limit = G.jokers.config.card_limit
1658-
- ((Card.get_gameset(card) == "modest") and 0 or card.ability.extra.holygrail)
1659-
G.consumeables.config.card_limit = G.consumeables.config.card_limit - card.ability.extra.holygrail
1660-
G.hand:change_size(-card.ability.extra.holygrail)
1661-
if not G.GAME.modifiers.cry_booster_packs then
1662-
G.GAME.modifiers.cry_booster_packs = 2
1663-
end
1664-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs - card.ability.extra.holygrail
1665-
change_shop_size(card.ability.extra.holygrail * -1)
1657+
+ ((Card.get_gameset(card) == "modest") and 0 or -mod)
1658+
G.consumeables.config.card_limit = G.consumeables.config.card_limit - mod
1659+
G.hand:change_size(-mod)
1660+
SMODS.change_booster_limit(-mod)
1661+
SMODS.change_voucher_limit(-mod)
16661662
end,
16671663
cry_credits = {
16681664
idea = {

items/misc_joker.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -842,18 +842,12 @@ local booster = {
842842
return { vars = { math.min(25, center.ability.extra.booster_slots) } }
843843
end,
844844
add_to_deck = function(self, card, from_debuff)
845-
if not G.GAME.modifiers.cry_booster_packs then
846-
G.GAME.modifiers.cry_booster_packs = 2
847-
end
848-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
849-
+ math.min(25, card.ability.extra.booster_slots)
845+
local mod = math.min(25, card.ability.extra.booster_slots)
846+
SMODS.change_booster_limit(mod)
850847
end,
851848
remove_from_deck = function(self, card, from_debuff)
852-
if not G.GAME.modifiers.cry_booster_packs then
853-
G.GAME.modifiers.cry_booster_packs = 2
854-
end
855-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
856-
- math.min(25, card.ability.extra.booster_slots)
849+
local mod = math.min(25, card.ability.extra.booster_slots)
850+
SMODS.change_booster_limit(-mod)
857851
end,
858852
cry_credits = {
859853
idea = {

items/tag.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ local cat = {
77
},
88
atlas = "tag_cry",
99
pos = { x = 0, y = 2 },
10+
config = { level = 1 },
1011
key = "cat",
1112
name = "cry-Cat Tag",
1213
order = 12,
14+
loc_vars = function(self, info_queue, tag)
15+
return { vars = { tag.ability.level } }
16+
end,
1317
}
1418
local epic_tag = {
1519
object_type = "Tag",

items/voucher.lua

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,32 +329,28 @@ local overstock_multi = { --+1 card slot[s], +1 booster pack slot[s] and +1 vouc
329329
return { vars = { (card and card.ability.extra or self.config.extra) } }
330330
end,
331331
redeem = function(self, card)
332-
if not G.GAME.modifiers.cry_booster_packs then
333-
G.GAME.modifiers.cry_booster_packs = 2
334-
end
335-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
336-
+ math.floor(card and card.ability.extra or self.config.extra) --Booster slots
332+
local mod = math.floor(card and card.ability.extra or self.config.extra)
333+
SMODS.change_booster_limit(mod)
337334
G.E_MANAGER:add_event(Event({
338335
func = function() --card slot
339-
change_shop_size(math.floor(card and card.ability.extra or self.config.extra))
336+
-- why is this in an event?
337+
change_shop_size(mod)
340338
return true
341339
end,
342340
}))
343-
cry_bonusvouchermod(math.floor(card and card.ability.extra or self.config.extra))
341+
SMODS.change_voucher_limit(mod)
344342
end,
345343
unredeem = function(self, card)
346-
if not G.GAME.modifiers.cry_booster_packs then
347-
G.GAME.modifiers.cry_booster_packs = 2
348-
end
349-
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
350-
- math.floor(card and card.ability.extra or self.config.extra) --Booster slots
344+
local mod = math.floor(card and card.ability.extra or self.config.extra)
345+
SMODS.change_booster_limit(-mod)
351346
G.E_MANAGER:add_event(Event({
352347
func = function() --card slot
353-
change_shop_size(-1 * math.floor(card and card.ability.extra or self.config.extra))
348+
-- why is this in an event?
349+
change_shop_size(-mod)
354350
return true
355351
end,
356352
}))
357-
cry_bonusvouchermod(-1 * math.floor(card and card.ability.extra or self.config.extra))
353+
SMODS.change_voucher_limit(-mod)
358354
end,
359355
}
360356
local massproduct = { --All cards and packs in the shop cost $1

0 commit comments

Comments
 (0)