@@ -1206,17 +1206,37 @@ local rework = {
12061206 order = 406 ,
12071207 pos = { x = 10 , y = 3 },
12081208 cost = 4 ,
1209- loc_vars = function (self , info_queue )
1210- info_queue [# info_queue + 1 ] =
1211- { set = " Tag" , key = " tag_cry_rework" , specific_vars = { " [edition]" , " [joker]" , " n" } }
1212- return { vars = {} }
1209+ loc_vars = function (self , info_queue , card )
1210+ local cards = Cryptid .get_highlighted_cards ({ G .jokers }, card , 1 , 1 , function (card )
1211+ return card .ability .set == " Joker"
1212+ end )
1213+ local jkr = cards [1 ]
1214+ if not jkr then return {
1215+ vars = {
1216+ " None"
1217+ }
1218+ } end
1219+ local found_index = 1
1220+ if jkr .edition then
1221+ for i , v in ipairs (G .P_CENTER_POOLS .Edition ) do
1222+ if v .key == jkr .edition .key then
1223+ found_index = i
1224+ break
1225+ end
1226+ end
1227+ end
1228+ found_index = found_index + 1
1229+ if found_index > # G .P_CENTER_POOLS .Edition then
1230+ found_index = found_index - # G .P_CENTER_POOLS .Edition
1231+ end
1232+ local rework_edition = G .P_CENTER_POOLS .Edition [found_index ].key
1233+ return { vars = {(G .localization .descriptions .Edition [rework_edition ] or {}).name or " ERROR" } }
12131234 end ,
12141235 can_use = function (self , card )
12151236 local cards = Cryptid .get_highlighted_cards ({ G .jokers }, card , 1 , 1 , function (card )
12161237 return card .ability .set == " Joker"
12171238 end )
12181239 return # cards == 1
1219- and not cards [1 ].ability .eternal
12201240 and cards [1 ].ability .name
12211241 ~= (" cry-meteor" or " cry-exoplanet" or " cry-stardust" or " cry_cursed" or " Diet Cola" )
12221242 end ,
@@ -1225,6 +1245,7 @@ local rework = {
12251245 return card .ability .set == " Joker"
12261246 end )
12271247 local jkr = cards [1 ]
1248+ if not jkr then return end
12281249 local found_index = 1
12291250 if jkr .edition then
12301251 for i , v in ipairs (G .P_CENTER_POOLS .Edition ) do
@@ -1238,22 +1259,13 @@ local rework = {
12381259 if found_index > # G .P_CENTER_POOLS .Edition then
12391260 found_index = found_index - # G .P_CENTER_POOLS .Edition
12401261 end
1241- local tag = Tag (" tag_cry_rework" )
1242- if not tag .ability then
1243- tag .ability = {}
1244- end
1245- if jkr .config .center .key == " c_base" then
1246- jkr .config .center .key = " j_scholar"
1247- end
1248- tag .ability .rework_key = jkr .config .center .key
1249- tag .ability .rework_edition = G .P_CENTER_POOLS .Edition [found_index ].key
1250- add_tag (tag )
1262+ local rework_edition = G .P_CENTER_POOLS .Edition [found_index ].key
12511263 -- SMODS.Tags.tag_cry_rework.apply(tag, {type = "store_joker_create"})
12521264 G .E_MANAGER :add_event (Event ({
12531265 trigger = " before" ,
12541266 delay = 0.75 ,
12551267 func = function ()
1256- jkr :start_dissolve ( )
1268+ jkr :set_edition ( rework_edition )
12571269 return true
12581270 end ,
12591271 }))
@@ -1263,84 +1275,6 @@ local rework = {
12631275 self :use (card , area )
12641276 end ,
12651277}
1266- -- Rework Tag
1267- -- Upgraded edition refers to the next edition along in the collection; base -> foil -> holo -> poly -> negative -> etc
1268- local rework_tag = {
1269- cry_credits = {
1270- idea = {
1271- " HexaCryonic" ,
1272- },
1273- art = {
1274- " HexaCryonic" ,
1275- },
1276- code = {
1277- " Math" ,
1278- },
1279- },
1280- dependencies = {
1281- items = {
1282- " c_cry_rework" ,
1283- },
1284- },
1285- object_type = " Tag" ,
1286- atlas = " tag_cry" ,
1287- name = " cry-Rework Tag" ,
1288- order = 610 ,
1289- pos = { x = 0 , y = 3 },
1290- config = { type = " store_joker_create" },
1291- key = " rework" ,
1292- ability = { rework_edition = nil , rework_key = nil },
1293- loc_vars = function (self , info_queue , tag )
1294- local function p (w )
1295- r = " "
1296- local vowels = { " a" , " e" , " i" , " o" , " u" }
1297- for i , v in ipairs (vowels ) do
1298- if string.sub (string.lower (w ), 1 , 1 ) == v then
1299- r = " n"
1300- break
1301- end
1302- end
1303- return r
1304- end
1305- local ed = Cryptid .safe_get (tag , " ability" , " rework_edition" )
1306- and localize ({ type = " name_text" , set = " Edition" , key = tag .ability .rework_edition })
1307- or " [" .. string.lower (localize (" k_edition" )) .. " ]"
1308- return {
1309- vars = {
1310- ed ,
1311- Cryptid .safe_get (tag , " ability" , " rework_key" )
1312- and localize ({ type = " name_text" , set = " Joker" , key = tag .ability .rework_key })
1313- or " [" .. string.lower (localize (" k_joker" )) .. " ]" ,
1314- string.sub (ed , 1 , 1 ) ~= " [" and p (ed ) or " n" ,
1315- },
1316- }
1317- end ,
1318- apply = function (self , tag , context )
1319- if context .type == " store_joker_create" then
1320- local card = create_card (" Joker" , context .area , nil , nil , nil , nil , (tag .ability .rework_key or " j_scholar" ))
1321- create_shop_card_ui (card , " Joker" , context .area )
1322- card :set_edition ((tag .ability .rework_edition or " e_foil" ), true , nil , true )
1323- card .states .visible = false
1324- tag :yep (" +" , G .C .FILTER , function ()
1325- card :start_materialize ()
1326- return true
1327- end )
1328- tag .triggered = true
1329- G .E_MANAGER :add_event (Event ({
1330- trigger = " after" ,
1331- delay = 0.5 ,
1332- func = function ()
1333- save_run () -- fixes savescum bugs hopefully?
1334- return true
1335- end ,
1336- }))
1337- return card
1338- end
1339- end ,
1340- in_pool = function ()
1341- return false
1342- end ,
1343- }
13441278-- ://Merge
13451279-- Merges a selected consumable and playing card, destroying the consumable and turning the playing card into a CCD of that consumable
13461280local merge = {
@@ -4234,7 +4168,7 @@ local ctrl_v = {
42344168 end ,
42354169 can_use = function (self , card )
42364170 local cards = Cryptid .get_highlighted_cards ({ G .hand , G .consumeables , G .pack_cards }, card , 1 , 1 , function (card )
4237- return card .area ~= G .pack_Cards or card .ability .set == " Default" or card .ability .set == " Enhanced"
4171+ return ( card .area ~= G .pack_Cards or card .ability .set == " Default" or card .ability .set == " Enhanced" ) and not card . config . center . hidden
42384172 end )
42394173 return # cards == 1
42404174 end ,
@@ -5178,7 +5112,6 @@ local code_cards = {
51785112 malware ,
51795113 crynperror ,
51805114 rework ,
5181- rework_tag ,
51825115 merge ,
51835116 commit ,
51845117 machinecode ,
0 commit comments