@@ -13,22 +13,13 @@ local e_deck = {
1313 order = 17 ,
1414 pos = { x = 5 , y = 2 },
1515 loc_vars = function (self , info_queue , center )
16- local aaa
17- -- Won't update to the correct value if it's switched while in a game and then viewing the new value while in that same game
18- -- Oh well
19- if G .GAME .modifiers .cry_force_edition and not G .GAME .viewed_back then
20- aaa = G .GAME .modifiers .cry_force_edition
21- elseif self .config .cry_force_edition then
22- aaa = self .config .cry_force_edition
23- else
24- aaa = cry_get_enchanced_deck_info ()
25- end
16+ local aaa = cry_get_enchanced_deck_info (self )
2617 return { vars = { localize {type = " name_text" , set = " Edition" , key = " e_" .. aaa } } }
2718 end ,
2819 edeck_type = " edition" ,
2920 config = {},
3021 apply = function (self )
31- local aaa = cry_get_enchanced_deck_info ()
22+ local aaa = cry_get_enchanced_deck_info (self )
3223 G .GAME .modifiers .cry_force_edition = aaa
3324 -- Ban Edition tags (They will never redeem)
3425 for k , v in pairs (G .P_TAGS ) do
@@ -46,6 +37,7 @@ local e_deck = {
4637 }))
4738 end
4839}
40+ -- I set up some WIP tables for sprites here, will finish later
4941local et_deck = {
5042 object_type = " Back" ,
5143 name = " cry-Enhancement Deck" ,
@@ -54,19 +46,15 @@ local et_deck = {
5446 pos = { x = 5 , y = 2 },
5547 edeck_type = " enhancement" ,
5648 config = {},
49+ sprites = {
50+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
51+ },
5752 loc_vars = function (self , info_queue , center )
58- local aaa ,bbb
59- if G .GAME .modifiers .cry_force_enhancement and not G .GAME .viewed_back then
60- bbb = G .GAME .modifiers .cry_force_enhancement
61- elseif self .config .cry_force_enhancement then
62- bbb = self .config .cry_force_enhancement
63- else
64- aaa ,bbb = cry_get_enchanced_deck_info ()
65- end
53+ local _ , bbb = cry_get_enchanced_deck_info (self )
6654 return { vars = { localize {type = " name_text" , set = " Enhanced" , key = bbb } } }
6755 end ,
6856 apply = function (self )
69- local aaa ,bbb = cry_get_enchanced_deck_info ()
57+ local aaa ,bbb = cry_get_enchanced_deck_info (self )
7058 G .GAME .modifiers .cry_force_enhancement = bbb
7159 G .E_MANAGER :add_event (Event ({
7260 func = function ()
@@ -77,6 +65,10 @@ local et_deck = {
7765 end ,
7866 }))
7967 end ,
68+ draw = function (self , card )
69+ -- Ensure atlas is up to date
70+
71+ end
8072}
8173local sk_deck = {
8274 object_type = " Back" ,
@@ -87,19 +79,12 @@ local sk_deck = {
8779 edeck_type = " sticker" ,
8880 config = {},
8981 loc_vars = function (self , info_queue , center )
90- local aaa ,bbb ,ccc
91- if G .GAME .modifiers .cry_force_sticker and not G .GAME .viewed_back then
92- ccc = G .GAME .modifiers .cry_force_sticker
93- elseif self .config .cry_force_sticker then
94- ccc = self .config .cry_force_sticker
95- else
96- aaa ,bbb ,ccc = cry_get_enchanced_deck_info ()
97- end
82+ local _ , _ , ccc = cry_get_enchanced_deck_info (self )
9883 if ccc == " pinned" then ccc = " pinned_left" end
9984 return { vars = { localize {type = " name_text" , set = " Other" , key = ccc } } }
10085 end ,
10186 apply = function (self )
102- local aaa ,bbb ,ccc = cry_get_enchanced_deck_info ()
87+ local aaa ,bbb ,ccc = cry_get_enchanced_deck_info (self )
10388 G .GAME .modifiers .cry_force_sticker = ccc
10489 G .E_MANAGER :add_event (Event ({
10590 func = function ()
@@ -129,18 +114,11 @@ local st_deck = {
129114 pos = { x = 5 , y = 2 },
130115 edeck_type = " suit" ,
131116 loc_vars = function (self , info_queue , center )
132- local aaa ,bbb ,ccc ,ddd
133- if G .GAME .modifiers .cry_force_suit and not G .GAME .viewed_back then
134- ddd = G .GAME .modifiers .cry_force_suit
135- elseif self .config .cry_force_suit then
136- ddd = self .config .cry_force_suit
137- else
138- aaa ,bbb ,ccc ,ddd = cry_get_enchanced_deck_info ()
139- end
117+ local _ , _ , _ , ddd = cry_get_enchanced_deck_info (self )
140118 return { vars = { localize (ddd , ' suits_plural' ) } }
141119 end ,
142120 apply = function (self )
143- local aaa ,bbb ,ccc ,ddd = cry_get_enchanced_deck_info ()
121+ local aaa ,bbb ,ccc ,ddd = cry_get_enchanced_deck_info (self )
144122 if ddd == " Spades" then
145123 G .GAME .bosses_used [" bl_goad" ] = 1e308
146124 elseif ddd == " Hearts" then
@@ -170,18 +148,11 @@ local sl_deck = {
170148 config = {},
171149 edeck_type = " seal" ,
172150 loc_vars = function (self , info_queue , center )
173- local aaa ,bbb ,ccc ,ddd ,eee
174- if G .GAME .modifiers .cry_force_seal and not G .GAME .viewed_back then
175- eee = G .GAME .modifiers .cry_force_seal
176- elseif self .config .cry_force_seal then
177- eee = self .config .cry_force_seal
178- else
179- aaa ,bbb ,ccc ,ddd ,eee = cry_get_enchanced_deck_info ()
180- end
151+ local _ , _ , _ , _ , eee = cry_get_enchanced_deck_info (self )
181152 return { vars = { localize {type = " name_text" , set = " Other" , key = eee :lower ().. " _seal" } } }
182153 end ,
183154 apply = function (self )
184- local aaa ,bbb ,ccc ,ddd ,eee = cry_get_enchanced_deck_info ()
155+ local aaa ,bbb ,ccc ,ddd ,eee = cry_get_enchanced_deck_info (self )
185156 G .GAME .modifiers .cry_force_seal = eee
186157 G .E_MANAGER :add_event (Event ({
187158 func = function ()
0 commit comments