@@ -5,6 +5,82 @@ local atlasenhanced = {
55 px = 71 ,
66 py = 95 ,
77}
8+ local atlasedition = {
9+ object_type = " Atlas" ,
10+ key = " atlaseditiondeck" ,
11+ path = " atlaseditiondeck.png" ,
12+ px = 71 ,
13+ py = 95 ,
14+ }
15+
16+ Cryptid .edeck_sprites = {
17+ edition = {
18+ order = 1 ,
19+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
20+ foil = { atlas = " cry_atlaseditiondeck" , pos = { x = 0 , y = 0 } },
21+ holo = { atlas = " cry_atlaseditiondeck" , pos = { x = 1 , y = 0 } },
22+ polychrome = { atlas = " cry_atlaseditiondeck" , pos = { x = 2 , y = 0 } },
23+ negative = { atlas = " cry_atlaseditiondeck" , pos = { x = 3 , y = 0 } },
24+ cry_mosaic = { atlas = " cry_atlaseditiondeck" , pos = { x = 0 , y = 1 } },
25+ cry_oversat = { atlas = " cry_atlaseditiondeck" , pos = { x = 1 , y = 1 } },
26+ cry_glass = { atlas = " cry_atlaseditiondeck" , pos = { x = 2 , y = 1 } },
27+ cry_gold = { atlas = " cry_atlaseditiondeck" , pos = { x = 3 , y = 1 } },
28+ cry_blur = { atlas = " cry_atlaseditiondeck" , pos = { x = 0 , y = 2 } },
29+ cry_noisy = { atlas = " cry_atlaseditiondeck" , pos = { x = 1 , y = 2 } },
30+ cry_astral = { atlas = " cry_atlaseditiondeck" , pos = { x = 2 , y = 2 } },
31+ cry_m = { atlas = " cry_atlaseditiondeck" , pos = { x = 3 , y = 2 } },
32+ },
33+ enhancement = {
34+ order = 2 ,
35+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
36+ m_bonus = { atlas = " cry_atlasenhanced" , pos = { x = 3 , y = 3 }},
37+ m_mult = { atlas = " cry_atlasenhanced" , pos = { x = 2 , y = 3 }},
38+ m_wild = { atlas = " cry_atlasenhanced" , pos = { x = 5 , y = 3 }},
39+ m_glass = { atlas = " cry_atlasenhanced" , pos = { x = 4 , y = 3 }},
40+ m_steel = { atlas = " centers" , pos = { x = 6 , y = 1 }},
41+ m_stone = { atlas = " centers" , pos = { x = 5 , y = 0 }},
42+ m_gold = { atlas = " centers" , pos = { x = 6 , y = 0 }},
43+ m_lucky = { atlas = " centers" , pos = { x = 4 , y = 1 }},
44+ m_cry_echo = { atlas = " cry_atlasenhanced" , pos = { x = 1 , y = 5 }},
45+ m_cry_light = { atlas = " cry_misc" , pos = { x = 0 , y = 3 }},
46+ },
47+ sticker = {
48+ order = 3 ,
49+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
50+ eternal = { atlas = " cry_atlasenhanced" , pos = { x = 5 , y = 2 } },
51+ perishable = { atlas = " cry_atlasenhanced" , pos = { x = 0 , y = 3 } },
52+ rental = { atlas = " cry_atlasenhanced" , pos = { x = 1 , y = 3 } },
53+ pinned = { atlas = " cry_atlasenhanced" , pos = { x = 0 , y = 5 } },
54+ banana = { atlas = " cry_atlasenhanced" , pos = { x = 5 , y = 4 } },
55+ },
56+ suit = {
57+ order = 4 ,
58+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
59+ Diamonds = { atlas = " cry_atlasenhanced" , pos = { x = 2 , y = 1 } },
60+ Hearts = { atlas = " cry_atlasenhanced" , pos = { x = 3 , y = 1 } },
61+ Spades = { atlas = " cry_atlasenhanced" , pos = { x = 4 , y = 1 } },
62+ Clubs = { atlas = " cry_atlasenhanced" , pos = { x = 5 , y = 1 } },
63+ },
64+ seal = {
65+ order = 5 ,
66+ default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
67+ Gold = { atlas = " centers" , pos = { x = 1 , y = 2 } },
68+ Red = { atlas = " centers" , pos = { x = 0 , y = 0 } },
69+ Blue = { atlas = " cry_atlasenhanced" , pos = { x = 2 , y = 2 } },
70+ Purple = { atlas = " cry_atlasenhanced" , pos = { x = 1 , y = 2 } },
71+ cry_azure = { atlas = " centers" , pos = { x = 0 , y = 2 } },
72+ cry_green = { atlas = " cry_atlasenhanced" , pos = { x = 3 , y = 5 } },
73+ },
74+ }
75+
76+ cry_edeck_atlas_update = function (self )
77+ local sprite = Cryptid .edeck_sprites [self .edeck_type ]
78+ if not sprite then error (self .edeck_type ) end
79+ local enh_info = {cry_get_enchanced_deck_info (self )}
80+ sprite = sprite [enh_info [sprite .order ]] or sprite .default
81+ self .atlas , self .pos = sprite .atlas , sprite .pos
82+ return sprite
83+ end
884
985local e_deck = {
1086 object_type = " Back" ,
@@ -37,7 +113,6 @@ local e_deck = {
37113 }))
38114 end
39115}
40- -- I set up some WIP tables for sprites here, will finish later
41116local et_deck = {
42117 object_type = " Back" ,
43118 name = " cry-Enhancement Deck" ,
@@ -46,9 +121,6 @@ local et_deck = {
46121 pos = { x = 5 , y = 2 },
47122 edeck_type = " enhancement" ,
48123 config = {},
49- sprites = {
50- default = { atlas = " centers" , pos = { x = 5 , y = 2 } },
51- },
52124 loc_vars = function (self , info_queue , center )
53125 local _ , bbb = cry_get_enchanced_deck_info (self )
54126 return { vars = { localize {type = " name_text" , set = " Enhanced" , key = bbb } } }
@@ -65,10 +137,7 @@ local et_deck = {
65137 end ,
66138 }))
67139 end ,
68- draw = function (self , card )
69- -- Ensure atlas is up to date
70-
71- end
140+ draw = cry_edeck_draw
72141}
73142local sk_deck = {
74143 object_type = " Back" ,
@@ -291,14 +360,15 @@ return {
291360 }
292361 local editions = {}
293362 for _ , v in pairs (pool_table [center .edeck_type ]) do
294- if not v .no_edeck then
363+ if v . key ~= " e_base " and not v .no_edeck then
295364 editions [# editions + 1 ] = (center .edeck_type == " edition" and v .key :sub (3 )) or v .key
296365 end
297366 end
298367
299368 for i = 1 , # editions do
300369 local _center = cry_deep_copy (center )
301370 _center .config [" cry_force_" .. center .edeck_type ] = editions [i ]
371+ cry_edeck_atlas_update (_center )
302372 local card = create_generic_card (_center )
303373 card .edeck_select = editions [i ]
304374 G .your_collection [1 ]:emplace (card )
@@ -324,5 +394,5 @@ return {
324394 end
325395 end ,
326396 order = 1000000 ,
327- items = {e_deck , et_deck , sk_deck , st_deck , sl_deck , atlasenhanced },
397+ items = {e_deck , et_deck , sk_deck , st_deck , sl_deck , atlasenhanced , atlasedition },
328398}
0 commit comments