Skip to content

Commit 6f38a72

Browse files
committed
Fix Curate and Conveyor Deck
Conveyor Deck now doesn't let you move Jokers around Curate and Edition Decks cause Edition Tags to Nope!
1 parent 66d8594 commit 6f38a72

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

items/tag.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ local glitched_tag = {
519519
apply = function(self, tag, context)
520520
if context.type == "store_joker_modify" then
521521
local _applied = nil
522+
if cry_forced_edition() then tag:nope() end
522523
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
523524
local lock = tag.ID
524525
G.CONTROLLER.locks[lock] = true
@@ -571,6 +572,7 @@ local oversat_tag = {
571572
apply = function(self, tag, context)
572573
if context.type == "store_joker_modify" then
573574
local _applied = nil
575+
if cry_forced_edition() then tag:nope() end
574576
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
575577
local lock = tag.ID
576578
G.CONTROLLER.locks[lock] = true
@@ -623,6 +625,7 @@ local mosaic_tag = {
623625
apply = function(self, tag, context)
624626
if context.type == "store_joker_modify" then
625627
local _applied = nil
628+
if cry_forced_edition() then tag:nope() end
626629
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
627630
local lock = tag.ID
628631
G.CONTROLLER.locks[lock] = true
@@ -675,6 +678,7 @@ local gold_tag = {
675678
apply = function(self, tag, context)
676679
if context.type == "store_joker_modify" then
677680
local _applied = nil
681+
if cry_forced_edition() then tag:nope() end
678682
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
679683
local lock = tag.ID
680684
G.CONTROLLER.locks[lock] = true
@@ -727,6 +731,7 @@ local glass_tag = {
727731
apply = function(self, tag, context)
728732
if context.type == "store_joker_modify" then
729733
local _applied = nil
734+
if cry_forced_edition() then tag:nope() end
730735
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
731736
local lock = tag.ID
732737
G.CONTROLLER.locks[lock] = true
@@ -779,6 +784,7 @@ local blur_tag = {
779784
apply = function(self, tag, context)
780785
if context.type == "store_joker_modify" then
781786
local _applied = nil
787+
if cry_forced_edition() then tag:nope() end
782788
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
783789
local lock = tag.ID
784790
G.CONTROLLER.locks[lock] = true
@@ -832,6 +838,7 @@ local astral_tag = {
832838
apply = function(self, tag, context)
833839
if context.type == "store_joker_modify" then
834840
local _applied = nil
841+
if cry_forced_edition() then tag:nope() end
835842
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
836843
local lock = tag.ID
837844
G.CONTROLLER.locks[lock] = true
@@ -884,6 +891,7 @@ local m_tag = {
884891
apply = function(self, tag, context)
885892
if context.type == "store_joker_modify" then
886893
local _applied = nil
894+
if cry_forced_edition() then tag:nope() end
887895
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
888896
local lock = tag.ID
889897
G.CONTROLLER.locks[lock] = true

lib/misc.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,3 +708,9 @@ function reload_cryptid_localization()
708708
SMODS.handle_loc_file(Cryptid.path)
709709
return init_localization()
710710
end
711+
712+
-- Checks if all jokers in shop will have editions (via Curate, Edition Decks, etc.)
713+
-- Will cause edition tags to Nope!
714+
function cry_forced_edition()
715+
return G.GAME.modifiers.cry_force_edition or G.GAME.used_vouchers.v_cry_curate
716+
end

lovely/Voucher.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ self.shop_cry_bonusvoucher = cardTable.shop_cry_bonusvoucher
2929
'''
3030
match_indent = true
3131

32-
33-
34-
3532
# get rid of this dumb hackfix in :redeem()
3633
# also track vouchers redeemed
3734
[[patches]]

lovely/conveyor.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ version = "1.0.0"
33
dump_lua = true
44
priority = -1
55

6-
# Don't sort cards
6+
# Conveyor Deck - Don't sort cards
77
[[patches]]
88
[patches.pattern]
99
target = "cardarea.lua"
10-
pattern = "table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*(a.pinned and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*(b.pinned and b.sort_id or 0) end)"
10+
pattern = "table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*((a.pinned and not a.ignore_pinned) and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*((b.pinned and not b.ignore_pinned) and b.sort_id or 0) end)"
1111
position = "at"
12-
payload = "if not G.GAME.modifiers.cry_conveyor then table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*(a.pinned and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*(b.pinned and b.sort_id or 0) end) end"
12+
payload = "if not G.GAME.modifiers.cry_conveyor then table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*((a.pinned and not a.ignore_pinned) and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*((b.pinned and not b.ignore_pinned) and b.sort_id or 0) end) end"
1313
match_indent = true
1414

1515
# Start of round effects

lovely/misc.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,13 @@ payload = '''
482482
G.cry_edeck_select = nil
483483
'''
484484
match_indent = true
485+
# Make vanilla edition tags Nope! if all jokers in shop have editions
486+
[[patches]]
487+
[patches.pattern]
488+
target = "tag.lua"
489+
pattern = "local _applied = nil"
490+
position = "after"
491+
payload = '''
492+
if cry_forced_edition() then self:nope() end
493+
'''
494+
match_indent = true

lovely/stake.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,15 @@ position = "at"
165165
payload = "for i = 1, G.GAME.modifiers.cry_no_boosters and 0 or G.GAME.modifiers.cry_booster_packs or 2 do"
166166
match_indent = true
167167

168-
169168
# Quartz Stake - pinned effect applies in every type of slot
170169
[[patches]]
171170
[patches.pattern]
172171
target = "cardarea.lua"
173172
pattern = "table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 < b.T.x + b.T.w/2 end)"
174173
position = "at"
175-
payload = "table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*(a.pinned and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*(b.pinned and b.sort_id or 0) end)"
174+
payload = "table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*((a.pinned and not a.ignore_pinned) and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*((b.pinned and not b.ignore_pinned) and b.sort_id or 0) end)"
176175
match_indent = true
177176

178-
179177
# Quartz Stake - render pinned sticker
180178
[[patches]]
181179
[patches.pattern]

0 commit comments

Comments
 (0)