diff --git a/play/deckbuilder.html b/play/deckbuilder.html index b2ade15..cd13423 100644 --- a/play/deckbuilder.html +++ b/play/deckbuilder.html @@ -356,9 +356,11 @@ var ff = [gettum('fFA').checked, gettum('fFN').checked, gettum('fFT').checked, gettum('fFU').checked]; var rf = [gettum('fRC').checked, gettum('fRR').checked, gettum('fRH').checked, gettum('fRL').checked]; var tf = [gettum('fTC').checked, gettum('fTS').checked]; + var sf = [gettum('fS1').checked, gettum('fS2').checked, gettum('fS3').checked, gettum('fS4').checked]; var checkF = ff.includes(false); var checkR = rf.includes(false); var checkT = tf.includes(false); + var checkS = sf.includes(false); var table = gettum('cardtable'); Array.from(table.rows).forEach(row => { @@ -382,6 +384,12 @@ bShow = tf[idx]; } + // set + if (checkS && bShow) { + var idx = parseInt(rdata.s) - 1; + bShow = sf[idx]; + } + if (bShow) { row.classList.remove('hide'); } else { @@ -402,7 +410,7 @@

Dirty Deckbuilder

> with card data.
Copy in Google or export to a spreadsheet, then sort search and filter to your heart's content. - + @@ -410,7 +418,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -418,7 +434,7 @@

Dirty Deckbuilder

- + @@ -426,7 +442,7 @@

Dirty Deckbuilder

- + @@ -434,7 +450,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -442,7 +466,7 @@

Dirty Deckbuilder

- + @@ -450,7 +474,7 @@

Dirty Deckbuilder

- + @@ -458,7 +482,7 @@

Dirty Deckbuilder

- + @@ -466,7 +490,7 @@

Dirty Deckbuilder

- + @@ -474,7 +498,7 @@

Dirty Deckbuilder

- + @@ -482,7 +506,7 @@

Dirty Deckbuilder

- + @@ -490,7 +514,7 @@

Dirty Deckbuilder

- + @@ -498,7 +522,7 @@

Dirty Deckbuilder

- + @@ -506,7 +530,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -514,7 +554,7 @@

Dirty Deckbuilder

- + @@ -522,7 +562,7 @@

Dirty Deckbuilder

- + @@ -530,7 +570,7 @@

Dirty Deckbuilder

- + @@ -538,7 +578,7 @@

Dirty Deckbuilder

- + @@ -546,7 +586,7 @@

Dirty Deckbuilder

- + @@ -554,7 +594,7 @@

Dirty Deckbuilder

- + @@ -562,7 +602,7 @@

Dirty Deckbuilder

- + @@ -570,7 +610,7 @@

Dirty Deckbuilder

- + @@ -578,7 +618,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -586,7 +634,7 @@

Dirty Deckbuilder

- + @@ -594,7 +642,7 @@

Dirty Deckbuilder

- + @@ -602,7 +650,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -610,7 +666,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -618,7 +682,7 @@

Dirty Deckbuilder

- + @@ -626,7 +690,7 @@

Dirty Deckbuilder

- + @@ -634,7 +698,7 @@

Dirty Deckbuilder

- + @@ -642,7 +706,7 @@

Dirty Deckbuilder

- + @@ -650,7 +714,7 @@

Dirty Deckbuilder

- + @@ -658,7 +722,7 @@

Dirty Deckbuilder

- + @@ -666,7 +730,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -674,7 +746,7 @@

Dirty Deckbuilder

- + @@ -682,7 +754,7 @@

Dirty Deckbuilder

- + @@ -690,7 +762,7 @@

Dirty Deckbuilder

- + @@ -698,7 +770,7 @@

Dirty Deckbuilder

- + @@ -706,7 +778,7 @@

Dirty Deckbuilder

- + @@ -714,7 +786,7 @@

Dirty Deckbuilder

- + @@ -722,7 +794,7 @@

Dirty Deckbuilder

- + @@ -730,7 +802,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -738,7 +826,7 @@

Dirty Deckbuilder

- + @@ -746,7 +834,7 @@

Dirty Deckbuilder

- + @@ -754,7 +842,7 @@

Dirty Deckbuilder

- + @@ -762,7 +850,7 @@

Dirty Deckbuilder

- + @@ -770,7 +858,7 @@

Dirty Deckbuilder

- + @@ -778,7 +866,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -786,7 +882,7 @@

Dirty Deckbuilder

- + @@ -794,7 +890,7 @@

Dirty Deckbuilder

- + @@ -802,7 +898,7 @@

Dirty Deckbuilder

- + @@ -810,7 +906,7 @@

Dirty Deckbuilder

- + @@ -818,7 +914,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -826,7 +930,7 @@

Dirty Deckbuilder

- + @@ -834,7 +938,7 @@

Dirty Deckbuilder

- + @@ -842,7 +946,7 @@

Dirty Deckbuilder

- + @@ -850,7 +954,7 @@

Dirty Deckbuilder

- + @@ -858,7 +962,7 @@

Dirty Deckbuilder

- + @@ -866,7 +970,7 @@

Dirty Deckbuilder

- + @@ -874,7 +978,7 @@

Dirty Deckbuilder

- + @@ -882,7 +986,7 @@

Dirty Deckbuilder

- + @@ -890,7 +994,7 @@

Dirty Deckbuilder

- + @@ -898,7 +1002,7 @@

Dirty Deckbuilder

- + @@ -906,7 +1010,7 @@

Dirty Deckbuilder

- + @@ -914,7 +1018,7 @@

Dirty Deckbuilder

- + @@ -922,7 +1026,7 @@

Dirty Deckbuilder

- + @@ -930,7 +1034,7 @@

Dirty Deckbuilder

- + @@ -938,7 +1042,7 @@

Dirty Deckbuilder

- + @@ -946,7 +1050,7 @@

Dirty Deckbuilder

- + @@ -954,7 +1058,7 @@

Dirty Deckbuilder

- + @@ -962,7 +1066,7 @@

Dirty Deckbuilder

- + @@ -970,7 +1074,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -978,7 +1090,7 @@

Dirty Deckbuilder

- + @@ -986,7 +1098,7 @@

Dirty Deckbuilder

- + @@ -994,7 +1106,7 @@

Dirty Deckbuilder

- + @@ -1002,7 +1114,7 @@

Dirty Deckbuilder

- + @@ -1010,7 +1122,7 @@

Dirty Deckbuilder

- + @@ -1018,7 +1130,7 @@

Dirty Deckbuilder

- + @@ -1026,7 +1138,7 @@

Dirty Deckbuilder

- + @@ -1034,7 +1146,7 @@

Dirty Deckbuilder

- + @@ -1042,7 +1154,7 @@

Dirty Deckbuilder

- + @@ -1050,7 +1162,7 @@

Dirty Deckbuilder

- + @@ -1058,7 +1170,7 @@

Dirty Deckbuilder

- + @@ -1066,7 +1178,7 @@

Dirty Deckbuilder

- + @@ -1074,7 +1186,7 @@

Dirty Deckbuilder

- + @@ -1082,7 +1194,7 @@

Dirty Deckbuilder

- + @@ -1090,7 +1202,7 @@

Dirty Deckbuilder

- + @@ -1098,7 +1210,7 @@

Dirty Deckbuilder

- + @@ -1106,7 +1218,7 @@

Dirty Deckbuilder

- + @@ -1114,7 +1226,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -1122,7 +1250,7 @@

Dirty Deckbuilder

- + @@ -1130,7 +1258,7 @@

Dirty Deckbuilder

- + @@ -1138,7 +1266,7 @@

Dirty Deckbuilder

- + @@ -1146,7 +1274,7 @@

Dirty Deckbuilder

- + @@ -1154,7 +1282,7 @@

Dirty Deckbuilder

- + @@ -1162,7 +1290,7 @@

Dirty Deckbuilder

- + @@ -1170,7 +1298,7 @@

Dirty Deckbuilder

- + @@ -1178,7 +1306,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1186,7 +1322,7 @@

Dirty Deckbuilder

- + @@ -1194,7 +1330,7 @@

Dirty Deckbuilder

- + @@ -1202,7 +1338,7 @@

Dirty Deckbuilder

- + @@ -1210,7 +1346,7 @@

Dirty Deckbuilder

- + @@ -1218,7 +1354,7 @@

Dirty Deckbuilder

- + @@ -1226,7 +1362,7 @@

Dirty Deckbuilder

- + @@ -1234,7 +1370,7 @@

Dirty Deckbuilder

- + @@ -1242,7 +1378,7 @@

Dirty Deckbuilder

- + @@ -1250,7 +1386,7 @@

Dirty Deckbuilder

- + @@ -1258,7 +1394,7 @@

Dirty Deckbuilder

- + @@ -1266,7 +1402,7 @@

Dirty Deckbuilder

- + @@ -1274,7 +1410,7 @@

Dirty Deckbuilder

- + @@ -1282,7 +1418,7 @@

Dirty Deckbuilder

- + @@ -1290,7 +1426,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -1298,7 +1450,7 @@

Dirty Deckbuilder

- + @@ -1306,7 +1458,7 @@

Dirty Deckbuilder

- + @@ -1314,7 +1466,7 @@

Dirty Deckbuilder

- + @@ -1322,7 +1474,7 @@

Dirty Deckbuilder

- + @@ -1330,7 +1482,7 @@

Dirty Deckbuilder

- + @@ -1338,7 +1490,7 @@

Dirty Deckbuilder

- + @@ -1346,7 +1498,7 @@

Dirty Deckbuilder

- + @@ -1354,7 +1506,7 @@

Dirty Deckbuilder

- + @@ -1362,7 +1514,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -1370,7 +1538,7 @@

Dirty Deckbuilder

- + @@ -1378,7 +1546,7 @@

Dirty Deckbuilder

- + @@ -1386,7 +1554,7 @@

Dirty Deckbuilder

- + @@ -1394,7 +1562,7 @@

Dirty Deckbuilder

- + @@ -1402,7 +1570,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1410,7 +1586,7 @@

Dirty Deckbuilder

- + @@ -1418,7 +1594,7 @@

Dirty Deckbuilder

- + @@ -1426,7 +1602,7 @@

Dirty Deckbuilder

- + @@ -1434,7 +1610,7 @@

Dirty Deckbuilder

- + @@ -1442,7 +1618,7 @@

Dirty Deckbuilder

- + @@ -1450,7 +1626,7 @@

Dirty Deckbuilder

- + @@ -1458,7 +1634,7 @@

Dirty Deckbuilder

- + @@ -1466,7 +1642,7 @@

Dirty Deckbuilder

- + @@ -1474,7 +1650,7 @@

Dirty Deckbuilder

- + @@ -1482,7 +1658,7 @@

Dirty Deckbuilder

- + @@ -1490,7 +1666,7 @@

Dirty Deckbuilder

- + @@ -1498,7 +1674,7 @@

Dirty Deckbuilder

- + @@ -1506,7 +1682,7 @@

Dirty Deckbuilder

- + @@ -1514,7 +1690,7 @@

Dirty Deckbuilder

- + @@ -1522,7 +1698,7 @@

Dirty Deckbuilder

- + @@ -1530,7 +1706,7 @@

Dirty Deckbuilder

- + @@ -1538,7 +1714,7 @@

Dirty Deckbuilder

- + @@ -1546,7 +1722,7 @@

Dirty Deckbuilder

- + @@ -1554,7 +1730,7 @@

Dirty Deckbuilder

- + @@ -1562,7 +1738,7 @@

Dirty Deckbuilder

- + @@ -1570,7 +1746,7 @@

Dirty Deckbuilder

- + @@ -1578,7 +1754,7 @@

Dirty Deckbuilder

- + @@ -1586,7 +1762,7 @@

Dirty Deckbuilder

- + @@ -1594,7 +1770,7 @@

Dirty Deckbuilder

- + @@ -1602,7 +1778,7 @@

Dirty Deckbuilder

- + @@ -1610,7 +1786,7 @@

Dirty Deckbuilder

- + @@ -1618,7 +1794,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1626,7 +1810,7 @@

Dirty Deckbuilder

- + @@ -1634,7 +1818,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1642,7 +1834,7 @@

Dirty Deckbuilder

- + @@ -1650,7 +1842,7 @@

Dirty Deckbuilder

- + @@ -1658,7 +1850,7 @@

Dirty Deckbuilder

- + @@ -1666,7 +1858,7 @@

Dirty Deckbuilder

- + @@ -1674,7 +1866,7 @@

Dirty Deckbuilder

- + @@ -1682,7 +1874,7 @@

Dirty Deckbuilder

- + @@ -1690,7 +1882,7 @@

Dirty Deckbuilder

- + @@ -1698,7 +1890,7 @@

Dirty Deckbuilder

- + @@ -1706,7 +1898,7 @@

Dirty Deckbuilder

- + @@ -1714,7 +1906,7 @@

Dirty Deckbuilder

- + @@ -1722,7 +1914,7 @@

Dirty Deckbuilder

- + @@ -1730,7 +1922,7 @@

Dirty Deckbuilder

- + @@ -1738,7 +1930,7 @@

Dirty Deckbuilder

- + @@ -1746,7 +1938,7 @@

Dirty Deckbuilder

- + @@ -1754,7 +1946,7 @@

Dirty Deckbuilder

- + @@ -1762,7 +1954,7 @@

Dirty Deckbuilder

- + @@ -1770,7 +1962,7 @@

Dirty Deckbuilder

- + @@ -1778,7 +1970,7 @@

Dirty Deckbuilder

- + @@ -1786,7 +1978,7 @@

Dirty Deckbuilder

- + @@ -1794,7 +1986,7 @@

Dirty Deckbuilder

- + @@ -1802,7 +1994,7 @@

Dirty Deckbuilder

- + @@ -1810,7 +2002,7 @@

Dirty Deckbuilder

- + @@ -1818,7 +2010,7 @@

Dirty Deckbuilder

- + @@ -1826,7 +2018,7 @@

Dirty Deckbuilder

- + @@ -1834,7 +2026,7 @@

Dirty Deckbuilder

- + @@ -1842,7 +2034,7 @@

Dirty Deckbuilder

- + @@ -1850,7 +2042,7 @@

Dirty Deckbuilder

- + @@ -1858,7 +2050,7 @@

Dirty Deckbuilder

- + @@ -1866,7 +2058,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1874,7 +2074,7 @@

Dirty Deckbuilder

- + @@ -1882,7 +2082,7 @@

Dirty Deckbuilder

- + @@ -1890,7 +2090,7 @@

Dirty Deckbuilder

- + @@ -1898,7 +2098,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1906,7 +2114,7 @@

Dirty Deckbuilder

- + @@ -1914,7 +2122,7 @@

Dirty Deckbuilder

- + @@ -1922,7 +2130,7 @@

Dirty Deckbuilder

- + @@ -1930,7 +2138,7 @@

Dirty Deckbuilder

- + @@ -1938,7 +2146,7 @@

Dirty Deckbuilder

- + @@ -1946,7 +2154,7 @@

Dirty Deckbuilder

- + @@ -1954,7 +2162,7 @@

Dirty Deckbuilder

- + @@ -1962,7 +2170,7 @@

Dirty Deckbuilder

- + @@ -1970,7 +2178,7 @@

Dirty Deckbuilder

- + @@ -1978,7 +2186,7 @@

Dirty Deckbuilder

- + @@ -1986,7 +2194,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -1994,7 +2210,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -2002,7 +2234,7 @@

Dirty Deckbuilder

- + @@ -2010,7 +2242,7 @@

Dirty Deckbuilder

- + @@ -2018,7 +2250,7 @@

Dirty Deckbuilder

- + @@ -2026,7 +2258,7 @@

Dirty Deckbuilder

- + @@ -2034,7 +2266,7 @@

Dirty Deckbuilder

- + @@ -2042,7 +2274,7 @@

Dirty Deckbuilder

- + @@ -2050,7 +2282,7 @@

Dirty Deckbuilder

- + @@ -2058,7 +2290,7 @@

Dirty Deckbuilder

- + @@ -2066,7 +2298,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2074,7 +2314,7 @@

Dirty Deckbuilder

- + @@ -2082,7 +2322,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2090,7 +2338,7 @@

Dirty Deckbuilder

- + @@ -2098,7 +2346,7 @@

Dirty Deckbuilder

- + @@ -2106,7 +2354,7 @@

Dirty Deckbuilder

- + @@ -2114,7 +2362,7 @@

Dirty Deckbuilder

- + @@ -2122,7 +2370,7 @@

Dirty Deckbuilder

- + @@ -2130,7 +2378,7 @@

Dirty Deckbuilder

- + @@ -2138,7 +2386,7 @@

Dirty Deckbuilder

- + @@ -2146,7 +2394,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2154,7 +2410,7 @@

Dirty Deckbuilder

- + @@ -2162,7 +2418,7 @@

Dirty Deckbuilder

- + @@ -2170,7 +2426,7 @@

Dirty Deckbuilder

- + @@ -2178,7 +2434,7 @@

Dirty Deckbuilder

- + @@ -2186,7 +2442,7 @@

Dirty Deckbuilder

- + @@ -2194,7 +2450,7 @@

Dirty Deckbuilder

- + @@ -2202,7 +2458,7 @@

Dirty Deckbuilder

- + @@ -2210,7 +2466,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2218,7 +2482,7 @@

Dirty Deckbuilder

- + @@ -2226,7 +2490,7 @@

Dirty Deckbuilder

- + @@ -2234,7 +2498,7 @@

Dirty Deckbuilder

- + @@ -2242,7 +2506,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2250,7 +2522,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2258,7 +2538,7 @@

Dirty Deckbuilder

- + @@ -2266,7 +2546,7 @@

Dirty Deckbuilder

- + @@ -2274,7 +2554,7 @@

Dirty Deckbuilder

- + @@ -2282,7 +2562,7 @@

Dirty Deckbuilder

- + @@ -2290,7 +2570,7 @@

Dirty Deckbuilder

- + @@ -2298,7 +2578,7 @@

Dirty Deckbuilder

- + @@ -2306,7 +2586,7 @@

Dirty Deckbuilder

- + @@ -2314,7 +2594,7 @@

Dirty Deckbuilder

- + @@ -2322,7 +2602,7 @@

Dirty Deckbuilder

- + @@ -2330,7 +2610,7 @@

Dirty Deckbuilder

- + @@ -2338,7 +2618,7 @@

Dirty Deckbuilder

- + @@ -2346,7 +2626,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2354,7 +2642,7 @@

Dirty Deckbuilder

- + @@ -2362,7 +2650,7 @@

Dirty Deckbuilder

- + @@ -2370,7 +2658,7 @@

Dirty Deckbuilder

- + @@ -2378,7 +2666,7 @@

Dirty Deckbuilder

- + @@ -2386,7 +2674,7 @@

Dirty Deckbuilder

- + @@ -2394,7 +2682,7 @@

Dirty Deckbuilder

- + @@ -2402,7 +2690,7 @@

Dirty Deckbuilder

- + @@ -2410,7 +2698,7 @@

Dirty Deckbuilder

- + @@ -2418,7 +2706,7 @@

Dirty Deckbuilder

- + @@ -2426,7 +2714,7 @@

Dirty Deckbuilder

- + @@ -2434,7 +2722,7 @@

Dirty Deckbuilder

- + @@ -2442,7 +2730,7 @@

Dirty Deckbuilder

- + @@ -2450,7 +2738,7 @@

Dirty Deckbuilder

- + @@ -2458,7 +2746,7 @@

Dirty Deckbuilder

- + @@ -2466,7 +2754,7 @@

Dirty Deckbuilder

- + @@ -2474,7 +2762,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2482,7 +2778,7 @@

Dirty Deckbuilder

- + @@ -2490,7 +2786,7 @@

Dirty Deckbuilder

- + @@ -2498,7 +2794,7 @@

Dirty Deckbuilder

- + @@ -2506,7 +2802,7 @@

Dirty Deckbuilder

- + @@ -2514,7 +2810,7 @@

Dirty Deckbuilder

- + @@ -2522,7 +2818,7 @@

Dirty Deckbuilder

- + @@ -2530,7 +2826,7 @@

Dirty Deckbuilder

- + @@ -2538,7 +2834,7 @@

Dirty Deckbuilder

- + @@ -2546,7 +2842,7 @@

Dirty Deckbuilder

- + @@ -2554,7 +2850,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -2562,7 +2874,7 @@

Dirty Deckbuilder

- + @@ -2570,7 +2882,7 @@

Dirty Deckbuilder

- + @@ -2578,7 +2890,7 @@

Dirty Deckbuilder

- + @@ -2586,7 +2898,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2594,7 +2914,7 @@

Dirty Deckbuilder

- + @@ -2602,7 +2922,7 @@

Dirty Deckbuilder

- + @@ -2610,7 +2930,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2618,7 +2946,7 @@

Dirty Deckbuilder

- + @@ -2626,7 +2954,7 @@

Dirty Deckbuilder

- + @@ -2634,7 +2962,7 @@

Dirty Deckbuilder

- + @@ -2642,7 +2970,7 @@

Dirty Deckbuilder

- + @@ -2650,7 +2978,7 @@

Dirty Deckbuilder

- + @@ -2658,7 +2986,7 @@

Dirty Deckbuilder

- + @@ -2666,7 +2994,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2674,7 +3010,7 @@

Dirty Deckbuilder

- + @@ -2682,7 +3018,7 @@

Dirty Deckbuilder

- + @@ -2690,7 +3026,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2698,7 +3042,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2706,7 +3058,7 @@

Dirty Deckbuilder

- + @@ -2714,7 +3066,7 @@

Dirty Deckbuilder

- + @@ -2722,7 +3074,7 @@

Dirty Deckbuilder

- + @@ -2730,7 +3082,7 @@

Dirty Deckbuilder

- + @@ -2738,7 +3090,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2746,7 +3106,7 @@

Dirty Deckbuilder

- + @@ -2754,7 +3114,7 @@

Dirty Deckbuilder

- + @@ -2762,7 +3122,7 @@

Dirty Deckbuilder

- + @@ -2770,7 +3130,7 @@

Dirty Deckbuilder

- + @@ -2778,7 +3138,7 @@

Dirty Deckbuilder

- + @@ -2786,7 +3146,7 @@

Dirty Deckbuilder

- + @@ -2794,7 +3154,7 @@

Dirty Deckbuilder

- + @@ -2802,7 +3162,7 @@

Dirty Deckbuilder

- + @@ -2810,7 +3170,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2818,7 +3186,7 @@

Dirty Deckbuilder

- + @@ -2826,7 +3194,7 @@

Dirty Deckbuilder

- + @@ -2834,7 +3202,7 @@

Dirty Deckbuilder

- + @@ -2842,7 +3210,7 @@

Dirty Deckbuilder

- + @@ -2850,7 +3218,7 @@

Dirty Deckbuilder

- + @@ -2858,7 +3226,7 @@

Dirty Deckbuilder

- + @@ -2866,7 +3234,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -2874,7 +3250,7 @@

Dirty Deckbuilder

- + @@ -2882,7 +3258,7 @@

Dirty Deckbuilder

- + @@ -2890,7 +3266,7 @@

Dirty Deckbuilder

- + @@ -2898,7 +3274,7 @@

Dirty Deckbuilder

- + @@ -2906,7 +3282,7 @@

Dirty Deckbuilder

- + @@ -2914,7 +3290,7 @@

Dirty Deckbuilder

- + @@ -2922,7 +3298,7 @@

Dirty Deckbuilder

- + @@ -2930,7 +3306,7 @@

Dirty Deckbuilder

- + @@ -2938,7 +3314,7 @@

Dirty Deckbuilder

- + @@ -2946,7 +3322,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -2954,7 +3346,7 @@

Dirty Deckbuilder

- + @@ -2962,7 +3354,7 @@

Dirty Deckbuilder

- + @@ -2970,7 +3362,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -2978,7 +3386,7 @@

Dirty Deckbuilder

- + @@ -2986,7 +3394,7 @@

Dirty Deckbuilder

- + @@ -2994,7 +3402,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -3002,7 +3426,7 @@

Dirty Deckbuilder

- + @@ -3010,7 +3434,7 @@

Dirty Deckbuilder

- + @@ -3018,7 +3442,7 @@

Dirty Deckbuilder

- + @@ -3026,7 +3450,7 @@

Dirty Deckbuilder

- + @@ -3034,7 +3458,7 @@

Dirty Deckbuilder

- + @@ -3042,7 +3466,7 @@

Dirty Deckbuilder

- + @@ -3050,7 +3474,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -3058,7 +3498,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3066,7 +3514,7 @@

Dirty Deckbuilder

- + @@ -3074,7 +3522,7 @@

Dirty Deckbuilder

- + @@ -3082,7 +3530,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -3090,7 +3554,7 @@

Dirty Deckbuilder

- + @@ -3098,7 +3562,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3106,7 +3578,7 @@

Dirty Deckbuilder

- + @@ -3114,7 +3586,7 @@

Dirty Deckbuilder

- + @@ -3122,7 +3594,7 @@

Dirty Deckbuilder

- + @@ -3130,7 +3602,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3138,7 +3618,7 @@

Dirty Deckbuilder

- + @@ -3146,7 +3626,7 @@

Dirty Deckbuilder

- + @@ -3154,7 +3634,7 @@

Dirty Deckbuilder

- + @@ -3162,7 +3642,7 @@

Dirty Deckbuilder

- + @@ -3170,7 +3650,7 @@

Dirty Deckbuilder

- + @@ -3178,7 +3658,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3186,7 +3674,7 @@

Dirty Deckbuilder

- + @@ -3194,7 +3682,7 @@

Dirty Deckbuilder

- + @@ -3202,7 +3690,7 @@

Dirty Deckbuilder

- + @@ -3210,7 +3698,7 @@

Dirty Deckbuilder

- + @@ -3218,7 +3706,7 @@

Dirty Deckbuilder

- + @@ -3226,7 +3714,7 @@

Dirty Deckbuilder

- + @@ -3234,7 +3722,7 @@

Dirty Deckbuilder

- + @@ -3242,7 +3730,7 @@

Dirty Deckbuilder

- + @@ -3250,7 +3738,7 @@

Dirty Deckbuilder

- + @@ -3258,7 +3746,7 @@

Dirty Deckbuilder

- + @@ -3266,7 +3754,7 @@

Dirty Deckbuilder

- + @@ -3274,7 +3762,7 @@

Dirty Deckbuilder

- + @@ -3282,7 +3770,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -3290,7 +3794,7 @@

Dirty Deckbuilder

- + @@ -3298,7 +3802,7 @@

Dirty Deckbuilder

- + @@ -3306,7 +3810,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3314,7 +3826,7 @@

Dirty Deckbuilder

- + @@ -3322,7 +3834,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3330,7 +3850,7 @@

Dirty Deckbuilder

- + @@ -3338,7 +3858,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3346,7 +3874,7 @@

Dirty Deckbuilder

- + @@ -3354,7 +3882,7 @@

Dirty Deckbuilder

- + @@ -3362,7 +3890,7 @@

Dirty Deckbuilder

- + @@ -3370,7 +3898,7 @@

Dirty Deckbuilder

- + @@ -3378,7 +3906,7 @@

Dirty Deckbuilder

- + @@ -3386,7 +3914,7 @@

Dirty Deckbuilder

- + @@ -3394,7 +3922,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3402,7 +3938,7 @@

Dirty Deckbuilder

- + @@ -3410,7 +3946,7 @@

Dirty Deckbuilder

- + @@ -3418,7 +3954,7 @@

Dirty Deckbuilder

- + @@ -3426,7 +3962,7 @@

Dirty Deckbuilder

- + @@ -3434,7 +3970,7 @@

Dirty Deckbuilder

- + @@ -3442,7 +3978,7 @@

Dirty Deckbuilder

- + @@ -3450,7 +3986,7 @@

Dirty Deckbuilder

- + @@ -3458,7 +3994,7 @@

Dirty Deckbuilder

- + @@ -3466,7 +4002,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3474,7 +4018,7 @@

Dirty Deckbuilder

- + @@ -3482,7 +4026,7 @@

Dirty Deckbuilder

- + @@ -3490,7 +4034,7 @@

Dirty Deckbuilder

- + @@ -3498,7 +4042,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3506,7 +4058,7 @@

Dirty Deckbuilder

- + @@ -3514,7 +4066,7 @@

Dirty Deckbuilder

- + @@ -3522,7 +4074,7 @@

Dirty Deckbuilder

- + @@ -3530,7 +4082,7 @@

Dirty Deckbuilder

- + @@ -3538,7 +4090,7 @@

Dirty Deckbuilder

- + @@ -3546,7 +4098,7 @@

Dirty Deckbuilder

- + @@ -3554,7 +4106,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3562,7 +4122,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3570,7 +4138,7 @@

Dirty Deckbuilder

- + @@ -3578,7 +4146,23 @@

Dirty Deckbuilder

- + + + + + + + + + + + + + + + + + @@ -3586,7 +4170,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3594,7 +4186,7 @@

Dirty Deckbuilder

- + @@ -3602,7 +4194,7 @@

Dirty Deckbuilder

- + @@ -3610,7 +4202,7 @@

Dirty Deckbuilder

- + @@ -3618,7 +4210,7 @@

Dirty Deckbuilder

- + @@ -3626,7 +4218,7 @@

Dirty Deckbuilder

- + @@ -3634,7 +4226,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3642,7 +4242,7 @@

Dirty Deckbuilder

- + @@ -3650,7 +4250,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3658,7 +4266,7 @@

Dirty Deckbuilder

- + @@ -3666,7 +4274,15 @@

Dirty Deckbuilder

- + + + + + + + + + @@ -3674,7 +4290,7 @@

Dirty Deckbuilder

- + @@ -3682,7 +4298,7 @@

Dirty Deckbuilder

- + @@ -3690,7 +4306,7 @@

Dirty Deckbuilder

- + @@ -3698,7 +4314,7 @@

Dirty Deckbuilder

- + @@ -3706,7 +4322,7 @@

Dirty Deckbuilder

- + @@ -3714,7 +4330,7 @@

Dirty Deckbuilder

- + @@ -3722,7 +4338,7 @@

Dirty Deckbuilder

- + @@ -3730,7 +4346,7 @@

Dirty Deckbuilder

- + @@ -3738,7 +4354,7 @@

Dirty Deckbuilder

- + @@ -3746,7 +4362,7 @@

Dirty Deckbuilder

- + @@ -3754,7 +4370,7 @@

Dirty Deckbuilder

- + @@ -3762,7 +4378,7 @@

Dirty Deckbuilder

- + @@ -3770,7 +4386,7 @@

Dirty Deckbuilder

- + @@ -3778,7 +4394,7 @@

Dirty Deckbuilder

- + @@ -3786,7 +4402,7 @@

Dirty Deckbuilder

- + @@ -3794,7 +4410,7 @@

Dirty Deckbuilder

- + @@ -3802,7 +4418,7 @@

Dirty Deckbuilder

- + @@ -3810,7 +4426,7 @@

Dirty Deckbuilder

- + @@ -3818,7 +4434,7 @@

Dirty Deckbuilder

- + @@ -3826,7 +4442,7 @@

Dirty Deckbuilder

- + @@ -3834,7 +4450,7 @@

Dirty Deckbuilder

- + @@ -3842,7 +4458,7 @@

Dirty Deckbuilder

- + @@ -3901,6 +4517,26 @@

Dirty Deckbuilder

+
+

diff --git a/play/dist/solforge.js b/play/dist/solforge.js index 6498b05..5a47d53 100644 --- a/play/dist/solforge.js +++ b/play/dist/solforge.js @@ -1 +1 @@ -(function(){"use strict";const ye=["A","N","T","U"];const re=["C","R","H","L"];const Ft=[{crd:"AAK",fct:"T",rty:"L",set:1,typ:"C"},{crd:"AGC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"AGK",fct:"A",rty:"L",set:2.1,typ:"C"},{crd:"AGP",fct:"A",rty:"C",set:1.1,typ:"S"},{crd:"ASG",fct:"T",rty:"R",set:1,typ:"S"},{crd:"AFO",fct:"A",rty:"C",set:2.1,typ:"C"},{crd:"ATG",fct:"A",rty:"C",set:2,typ:"C"},{crd:"ART",fct:"U",rty:"H",set:2.1,typ:"C"},{crd:"ATP",fct:"U",rty:"H",set:3,typ:"C"},{crd:"AGM",fct:"T",rty:"L",set:2.2,typ:"C"},{crd:"ALG",fct:"A",rty:"R",set:1,typ:"C"},{crd:"AHL",fct:"A",rty:"H",set:1,typ:"C"},{crd:"ALS",fct:"A",rty:"H",set:2,typ:"C"},{crd:"AEN",fct:"A",rty:"C",set:2,typ:"C"},{crd:"APM",fct:"A",rty:"H",set:2,typ:"C"},{crd:"AQE",fct:"T",rty:"C",set:1,typ:"S"},{crd:"AGD",fct:"U",rty:"L",set:1,typ:"C"},{crd:"AFS",fct:"A",rty:"L",set:1,typ:"C"},{crd:"ABR",fct:"T",rty:"C",set:2,typ:"C"},{crd:"AFR",fct:"T",rty:"H",set:3.1,typ:"C"},{crd:"AMY",fct:"T",rty:"C",set:1,typ:"C"},{crd:"ABL",fct:"T",rty:"R",set:1,typ:"S"},{crd:"AGU",fct:"T",rty:"R",set:2.1,typ:"C"},{crd:"AIV",fct:"T",rty:"H",set:1,typ:"C"},{crd:"BTH",fct:"U",rty:"R",set:3,typ:"C"},{crd:"BTN",fct:"A",rty:"H",set:1,typ:"C"},{crd:"BLH",fct:"T",rty:"L",set:2,typ:"C"},{crd:"BSP",fct:"N",rty:"C",set:2.2,typ:"C"},{crd:"BWK",fct:"N",rty:"R",set:1,typ:"C"},{crd:"BLW",fct:"N",rty:"R",set:3,typ:"C"},{crd:"BSR",fct:"N",rty:"R",set:1,typ:"C"},{crd:"BMY",fct:"T",rty:"H",set:2.1,typ:"C"},{crd:"BSW",fct:"T",rty:"C",set:3,typ:"C"},{crd:"BTM",fct:"U",rty:"H",set:1,typ:"S"},{crd:"BAW",fct:"U",rty:"R",set:2,typ:"C"},{crd:"BWG",fct:"U",rty:"C",set:1,typ:"C"},{crd:"BTR",fct:"U",rty:"H",set:3.1,typ:"C"},{crd:"BWD",fct:"U",rty:"C",set:2,typ:"C"},{crd:"BSG",fct:"A",rty:"L",set:1,typ:"C"},{crd:"BSS",fct:"A",rty:"L",set:1,typ:"C"},{crd:"BTS",fct:"U",rty:"C",set:1.1,typ:"C"},{crd:"BWH",fct:"A",rty:"R",set:1,typ:"S"},{crd:"BRN",fct:"T",rty:"R",set:3,typ:"S"},{crd:"BZD",fct:"N",rty:"R",set:2,typ:"C"},{crd:"BFM",fct:"N",rty:"H",set:2.3,typ:"C"},{crd:"BSM",fct:"T",rty:"H",set:2,typ:"C"},{crd:"CDT",fct:"U",rty:"R",set:1,typ:"C"},{crd:"CTL",fct:"T",rty:"L",set:1,typ:"S"},{crd:"CCS",fct:"N",rty:"C",set:3,typ:"C"},{crd:"CHY",fct:"U",rty:"C",set:1,typ:"C"},{crd:"CHV",fct:"N",rty:"L",set:2,typ:"C"},{crd:"CRS",fct:"A",rty:"R",set:3,typ:"C"},{crd:"CTI",fct:"N",rty:"C",set:1.1,typ:"C"},{crd:"CHA",fct:"U",rty:"R",set:2.1,typ:"C"},{crd:"CHH",fct:"U",rty:"C",set:2,typ:"C"},{crd:"CHR",fct:"U",rty:"L",set:1,typ:"C"},{crd:"CBB",fct:"T",rty:"C",set:3,typ:"C"},{crd:"CDC",fct:"T",rty:"C",set:2,typ:"C"},{crd:"CFB",fct:"T",rty:"H",set:1,typ:"C"},{crd:"CNM",fct:"T",rty:"C",set:2,typ:"C"},{crd:"CSW",fct:"T",rty:"L",set:2.3,typ:"C"},{crd:"CTG",fct:"A",rty:"C",set:3,typ:"C"},{crd:"CCT",fct:"T",rty:"R",set:2,typ:"C"},{crd:"CFG",fct:"T",rty:"C",set:2,typ:"S"},{crd:"CGL",fct:"N",rty:"H",set:3,typ:"C"},{crd:"CSU",fct:"N",rty:"R",set:1,typ:"S"},{crd:"CCR",fct:"N",rty:"C",set:1,typ:"C"},{crd:"CSB",fct:"N",rty:"C",set:2,typ:"C"},{crd:"CWK",fct:"T",rty:"C",set:3,typ:"C"},{crd:"CRC",fct:"A",rty:"R",set:2,typ:"C"},{crd:"CYC",fct:"N",rty:"H",set:2,typ:"C"},{crd:"CTW",fct:"N",rty:"C",set:1,typ:"S"},{crd:"CTV",fct:"U",rty:"H",set:1,typ:"S"},{crd:"CAG",fct:"A",rty:"R",set:1,typ:"S"},{crd:"CBS",fct:"A",rty:"C",set:2.1,typ:"S"},{crd:"CIN",fct:"A",rty:"R",set:1.1,typ:"C"},{crd:"CSH",fct:"A",rty:"C",set:3,typ:"C"},{crd:"CSG",fct:"A",rty:"C",set:2,typ:"S"},{crd:"DFR",fct:"N",rty:"H",set:2,typ:"C"},{crd:"DHW",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DSS",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DCR",fct:"N",rty:"R",set:2,typ:"S"},{crd:"DSK",fct:"N",rty:"C",set:1,typ:"C"},{crd:"DBA",fct:"U",rty:"H",set:1,typ:"C"},{crd:"DBP",fct:"U",rty:"C",set:1,typ:"C"},{crd:"DMR",fct:"U",rty:"C",set:2,typ:"C"},{crd:"DBR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"DCS",fct:"A",rty:"L",set:2,typ:"C"},{crd:"DGZ",fct:"A",rty:"R",set:2,typ:"S"},{crd:"DIS",fct:"T",rty:"R",set:1,typ:"S"},{crd:"DSV",fct:"U",rty:"R",set:2,typ:"S"},{crd:"DDD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"DZD",fct:"U",rty:"L",set:3,typ:"C"},{crd:"DBT",fct:"N",rty:"H",set:1,typ:"S"},{crd:"DFB",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DMW",fct:"A",rty:"L",set:1.1,typ:"C"},{crd:"DCH",fct:"U",rty:"C",set:1,typ:"S"},{crd:"DSZ",fct:"N",rty:"C",set:2,typ:"C"},{crd:"DYB",fct:"U",rty:"R",set:2,typ:"S"},{crd:"DBQ",fct:"N",rty:"H",set:3,typ:"C"},{crd:"DYS",fct:"N",rty:"R",set:3,typ:"S"},{crd:"DYL",fct:"U",rty:"L",set:3,typ:"C"},{crd:"EBW",fct:"N",rty:"C",set:3,typ:"C"},{crd:"ESK",fct:"N",rty:"H",set:2,typ:"C"},{crd:"EHW",fct:"U",rty:"L",set:1,typ:"C"},{crd:"ETN",fct:"A",rty:"C",set:1,typ:"S"},{crd:"EWE",fct:"T",rty:"H",set:2,typ:"C"},{crd:"ENP",fct:"A",rty:"H",set:1,typ:"S"},{crd:"ESU",fct:"A",rty:"R",set:1,typ:"S"},{crd:"ENR",fct:"U",rty:"C",set:1,typ:"S"},{crd:"EPD",fct:"N",rty:"H",set:1,typ:"S"},{crd:"ESC",fct:"A",rty:"H",set:2,typ:"C"},{crd:"ESP",fct:"U",rty:"H",set:2.3,typ:"C"},{crd:"EWT",fct:"U",rty:"R",set:2,typ:"C"},{crd:"EHN",fct:"U",rty:"C",set:1,typ:"C"},{crd:"EFM",fct:"T",rty:"L",set:2.1,typ:"C"},{crd:"EFP",fct:"T",rty:"L",set:1,typ:"C"},{crd:"EXD",fct:"N",rty:"H",set:1,typ:"S"},{crd:"FWB",fct:"U",rty:"C",set:2.3,typ:"C"},{crd:"FWR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"FWK",fct:"N",rty:"C",set:1,typ:"C"},{crd:"FIN",fct:"U",rty:"C",set:1,typ:"S"},{crd:"FRR",fct:"U",rty:"H",set:1,typ:"S"},{crd:"FVA",fct:"T",rty:"H",set:1,typ:"S"},{crd:"FFU",fct:"T",rty:"H",set:1,typ:"C"},{crd:"FMS",fct:"T",rty:"C",set:2,typ:"C"},{crd:"FSM",fct:"T",rty:"H",set:1,typ:"S"},{crd:"FBC",fct:"T",rty:"L",set:1,typ:"C"},{crd:"FBI",fct:"T",rty:"H",set:2.2,typ:"C"},{crd:"FFS",fct:"T",rty:"R",set:2,typ:"C"},{crd:"FLN",fct:"T",rty:"R",set:2,typ:"S"},{crd:"FRI",fct:"T",rty:"C",set:3,typ:"C"},{crd:"FSS",fct:"T",rty:"R",set:1,typ:"C"},{crd:"FLS",fct:"T",rty:"C",set:1,typ:"C"},{crd:"FSH",fct:"T",rty:"R",set:1,typ:"C"},{crd:"FFD",fct:"N",rty:"H",set:1,typ:"C"},{crd:"FRV",fct:"N",rty:"H",set:3,typ:"C"},{crd:"FSP",fct:"A",rty:"L",set:1,typ:"C"},{crd:"FPR",fct:"T",rty:"C",set:2.1,typ:"C"},{crd:"FFL",fct:"A",rty:"C",set:1,typ:"S"},{crd:"FGA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"FGB",fct:"A",rty:"R",set:1,typ:"C"},{crd:"FGD",fct:"A",rty:"H",set:3,typ:"C"},{crd:"FGG",fct:"A",rty:"H",set:1,typ:"C"},{crd:"FOL",fct:"A",rty:"H",set:3.1,typ:"C"},{crd:"FPM",fct:"A",rty:"R",set:3,typ:"C"},{crd:"FPS",fct:"A",rty:"C",set:1,typ:"C"},{crd:"FFM",fct:"T",rty:"H",set:3,typ:"C"},{crd:"FMD",fct:"T",rty:"L",set:3,typ:"C"},{crd:"FSK",fct:"T",rty:"C",set:2.3,typ:"S"},{crd:"FWT",fct:"U",rty:"H",set:1,typ:"C"},{crd:"FZS",fct:"T",rty:"R",set:1,typ:"S"},{crd:"GHS",fct:"U",rty:"C",set:2.2,typ:"C"},{crd:"GHB",fct:"U",rty:"R",set:1,typ:"C"},{crd:"GRN",fct:"N",rty:"C",set:2,typ:"S"},{crd:"GTH",fct:"N",rty:"C",set:1,typ:"S"},{crd:"GSC",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GMP",fct:"A",rty:"L",set:1,typ:"C"},{crd:"GTT",fct:"T",rty:"L",set:2,typ:"C"},{crd:"GCL",fct:"T",rty:"C",set:1,typ:"C"},{crd:"GCR",fct:"T",rty:"C",set:2,typ:"S"},{crd:"GLF",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GRW",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GSW",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GVS",fct:"U",rty:"C",set:2,typ:"C"},{crd:"GSS",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GBG",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GGE",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GGH",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GRP",fct:"N",rty:"R",set:1,typ:"S"},{crd:"GGD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"GGR",fct:"N",rty:"L",set:3,typ:"C"},{crd:"GGP",fct:"N",rty:"H",set:1,typ:"C"},{crd:"GGS",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GRM",fct:"N",rty:"R",set:2,typ:"S"},{crd:"GHT",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GMR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"HMF",fct:"T",rty:"H",set:3,typ:"C"},{crd:"HTR",fct:"U",rty:"L",set:1,typ:"C"},{crd:"HAR",fct:"A",rty:"C",set:1,typ:"C"},{crd:"HFA",fct:"N",rty:"H",set:1,typ:"C"},{crd:"HOD",fct:"T",rty:"R",set:3,typ:"C"},{crd:"HWM",fct:"A",rty:"L",set:1,typ:"C"},{crd:"HGS",fct:"N",rty:"R",set:1,typ:"C"},{crd:"HTP",fct:"U",rty:"C",set:1,typ:"C"},{crd:"IBF",fct:"T",rty:"R",set:1,typ:"S"},{crd:"ITO",fct:"T",rty:"R",set:2,typ:"S"},{crd:"IWC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"IHA",fct:"A",rty:"L",set:2,typ:"C"},{crd:"IBR",fct:"A",rty:"C",set:3,typ:"C"},{crd:"IMD",fct:"A",rty:"L",set:3,typ:"C"},{crd:"IMA",fct:"A",rty:"L",set:2.3,typ:"C"},{crd:"IZK",fct:"T",rty:"L",set:3,typ:"C"},{crd:"JPK",fct:"A",rty:"C",set:1,typ:"S"},{crd:"KDC",fct:"T",rty:"C",set:3,typ:"C"},{crd:"KAW",fct:"T",rty:"L",set:1.1,typ:"C"},{crd:"KOD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"KIW",fct:"A",rty:"L",set:3,typ:"C"},{crd:"KKK",fct:"T",rty:"L",set:2,typ:"C"},{crd:"LKP",fct:"U",rty:"L",set:1,typ:"C"},{crd:"LGT",fct:"N",rty:"R",set:2.3,typ:"C"},{crd:"LBD",fct:"U",rty:"H",set:1,typ:"C"},{crd:"LSS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"LBL",fct:"U",rty:"R",set:1,typ:"C"},{crd:"LBR",fct:"T",rty:"C",set:1,typ:"S"},{crd:"LSK",fct:"T",rty:"C",set:1,typ:"S"},{crd:"LWY",fct:"T",rty:"C",set:1,typ:"C"},{crd:"LSP",fct:"A",rty:"C",set:1,typ:"C"},{crd:"LMV",fct:"N",rty:"L",set:1,typ:"C"},{crd:"LHY",fct:"U",rty:"C",set:2,typ:"C"},{crd:"LYS",fct:"U",rty:"R",set:3,typ:"S"},{crd:"MMH",fct:"T",rty:"C",set:1,typ:"C"},{crd:"MRF",fct:"N",rty:"C",set:1,typ:"C"},{crd:"MOE",fct:"T",rty:"H",set:1,typ:"C"},{crd:"MXW",fct:"A",rty:"C",set:1,typ:"C"},{crd:"MSP",fct:"U",rty:"R",set:2,typ:"S"},{crd:"MMA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"MMX",fct:"A",rty:"C",set:2,typ:"C"},{crd:"MMO",fct:"A",rty:"C",set:2,typ:"C"},{crd:"MMV",fct:"A",rty:"C",set:2.2,typ:"C"},{crd:"MPH",fct:"U",rty:"H",set:3,typ:"S"},{crd:"MSC",fct:"A",rty:"H",set:1,typ:"S"},{crd:"MTS",fct:"A",rty:"C",set:1.1,typ:"S"},{crd:"MTT",fct:"A",rty:"C",set:2,typ:"S"},{crd:"MML",fct:"U",rty:"H",set:2,typ:"C"},{crd:"MMW",fct:"U",rty:"L",set:2.2,typ:"C"},{crd:"MBP",fct:"U",rty:"H",set:1,typ:"C"},{crd:"MND",fct:"A",rty:"R",set:1,typ:"C"},{crd:"NNS",fct:"A",rty:"R",set:3,typ:"S"},{crd:"NGB",fct:"T",rty:"C",set:1,typ:"C"},{crd:"NSL",fct:"U",rty:"R",set:1,typ:"S"},{crd:"NCS",fct:"N",rty:"R",set:1,typ:"C"},{crd:"NCW",fct:"N",rty:"C",set:1,typ:"C"},{crd:"NCV",fct:"N",rty:"C",set:1,typ:"S"},{crd:"NEM",fct:"N",rty:"C",set:1,typ:"S"},{crd:"NSW",fct:"N",rty:"L",set:3,typ:"C"},{crd:"NSH",fct:"N",rty:"L",set:2.3,typ:"S"},{crd:"NXA",fct:"A",rty:"L",set:3.1,typ:"C"},{crd:"NXC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"NXG",fct:"A",rty:"H",set:3,typ:"C"},{crd:"NXP",fct:"A",rty:"C",set:1,typ:"C"},{crd:"NXT",fct:"A",rty:"H",set:2,typ:"C"},{crd:"NGT",fct:"N",rty:"R",set:2,typ:"C"},{crd:"NCL",fct:"U",rty:"R",set:1.1,typ:"S"},{crd:"NFF",fct:"U",rty:"L",set:2,typ:"C"},{crd:"NAM",fct:"N",rty:"C",set:3,typ:"C"},{crd:"NOZ",fct:"N",rty:"R",set:2,typ:"C"},{crd:"NSY",fct:"N",rty:"C",set:2.1,typ:"C"},{crd:"ONN",fct:"N",rty:"H",set:1.1,typ:"S"},{crd:"OXA",fct:"A",rty:"H",set:2.3,typ:"C"},{crd:"OXM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"OXP",fct:"N",rty:"H",set:2,typ:"C"},{crd:"OBB",fct:"T",rty:"R",set:3,typ:"S"},{crd:"OEX",fct:"A",rty:"H",set:3,typ:"S"},{crd:"OWH",fct:"T",rty:"H",set:3,typ:"C"},{crd:"OBD",fct:"A",rty:"H",set:1,typ:"C"},{crd:"OFM",fct:"A",rty:"R",set:2.1,typ:"C"},{crd:"OJC",fct:"A",rty:"H",set:1.1,typ:"C"},{crd:"OPK",fct:"A",rty:"R",set:2,typ:"C"},{crd:"OWW",fct:"A",rty:"L",set:1,typ:"C"},{crd:"OHV",fct:"N",rty:"R",set:2,typ:"C"},{crd:"ODC",fct:"U",rty:"L",set:2,typ:"C"},{crd:"OSP",fct:"N",rty:"R",set:2,typ:"C"},{crd:"OSL",fct:"U",rty:"C",set:3,typ:"C"},{crd:"OWF",fct:"A",rty:"H",set:2,typ:"S"},{crd:"OXS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"PHM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"PPM",fct:"A",rty:"R",set:1,typ:"C"},{crd:"PSM",fct:"A",rty:"L",set:2.2,typ:"C"},{crd:"PRI",fct:"A",rty:"R",set:3,typ:"S"},{crd:"PHS",fct:"A",rty:"R",set:2.2,typ:"C"},{crd:"PTB",fct:"U",rty:"H",set:1,typ:"S"},{crd:"PSC",fct:"U",rty:"R",set:2,typ:"C"},{crd:"PTR",fct:"A",rty:"R",set:2,typ:"S"},{crd:"PSG",fct:"U",rty:"R",set:1,typ:"S"},{crd:"PMS",fct:"T",rty:"C",set:1,typ:"S"},{crd:"PYG",fct:"T",rty:"H",set:1,typ:"C"},{crd:"PYS",fct:"T",rty:"C",set:1.1,typ:"S"},{crd:"RBH",fct:"T",rty:"L",set:1,typ:"C"},{crd:"ROK",fct:"T",rty:"L",set:3.1,typ:"S"},{crd:"RHY",fct:"U",rty:"C",set:3,typ:"C"},{crd:"RTS",fct:"T",rty:"C",set:2.2,typ:"C"},{crd:"RLW",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RFL",fct:"T",rty:"R",set:1,typ:"C"},{crd:"RHC",fct:"T",rty:"C",set:1,typ:"C"},{crd:"ROG",fct:"N",rty:"H",set:1,typ:"S"},{crd:"RFA",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RBG",fct:"U",rty:"H",set:2,typ:"C"},{crd:"RGG",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RSZ",fct:"N",rty:"R",set:1.1,typ:"C"},{crd:"RSP",fct:"T",rty:"R",set:3,typ:"C"},{crd:"RHW",fct:"N",rty:"C",set:3,typ:"C"},{crd:"SAP",fct:"A",rty:"C",set:2,typ:"S"},{crd:"SVO",fct:"U",rty:"C",set:2.1,typ:"S"},{crd:"SSE",fct:"U",rty:"L",set:2.1,typ:"C"},{crd:"STS",fct:"U",rty:"C",set:3,typ:"S"},{crd:"SCS",fct:"N",rty:"C",set:1,typ:"C"},{crd:"SMD",fct:"T",rty:"L",set:1,typ:"C"},{crd:"SFS",fct:"N",rty:"L",set:1,typ:"C"},{crd:"SCD",fct:"A",rty:"H",set:1,typ:"C"},{crd:"SFT",fct:"A",rty:"H",set:1,typ:"C"},{crd:"SOA",fct:"A",rty:"C",set:3,typ:"S"},{crd:"SOD",fct:"U",rty:"C",set:3,typ:"S"},{crd:"SOK",fct:"T",rty:"C",set:3,typ:"S"},{crd:"SOT",fct:"N",rty:"C",set:3,typ:"S"},{crd:"SAD",fct:"T",rty:"H",set:1,typ:"C"},{crd:"SHG",fct:"N",rty:"L",set:2,typ:"S"},{crd:"SBI",fct:"U",rty:"C",set:3,typ:"C"},{crd:"SPD",fct:"U",rty:"R",set:1,typ:"C"},{crd:"SPM",fct:"U",rty:"L",set:1,typ:"C"},{crd:"STD",fct:"A",rty:"H",set:2.2,typ:"C"},{crd:"SHS",fct:"U",rty:"R",set:2.2,typ:"C"},{crd:"SGF",fct:"N",rty:"H",set:2.2,typ:"C"},{crd:"SKG",fct:"A",rty:"C",set:2,typ:"C"},{crd:"SSR",fct:"U",rty:"L",set:2,typ:"C"},{crd:"SNB",fct:"A",rty:"C",set:2.3,typ:"S"},{crd:"SNP",fct:"A",rty:"H",set:1,typ:"S"},{crd:"SRD",fct:"U",rty:"C",set:1,typ:"S"},{crd:"SRH",fct:"N",rty:"C",set:2.3,typ:"C"},{crd:"SDN",fct:"N",rty:"L",set:1,typ:"C"},{crd:"SHV",fct:"N",rty:"H",set:1,typ:"S"},{crd:"SBA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"SKB",fct:"A",rty:"C",set:1,typ:"C"},{crd:"SBR",fct:"T",rty:"C",set:2,typ:"C"},{crd:"SBD",fct:"U",rty:"C",set:2.1,typ:"C"},{crd:"SCV",fct:"N",rty:"R",set:3,typ:"S"},{crd:"SFM",fct:"T",rty:"H",set:1,typ:"C"},{crd:"SSN",fct:"A",rty:"C",set:2.2,typ:"C"},{crd:"SSM",fct:"T",rty:"C",set:2.2,typ:"C"},{crd:"SLH",fct:"N",rty:"C",set:2,typ:"S"},{crd:"SRV",fct:"N",rty:"R",set:2.2,typ:"C"},{crd:"STR",fct:"N",rty:"R",set:2,typ:"S"},{crd:"SSA",fct:"N",rty:"H",set:2.1,typ:"C"},{crd:"STO",fct:"U",rty:"R",set:2,typ:"S"},{crd:"SDR",fct:"U",rty:"R",set:1,typ:"C"},{crd:"SHK",fct:"T",rty:"H",set:1,typ:"S"},{crd:"SWR",fct:"A",rty:"R",set:1,typ:"C"},{crd:"SFA",fct:"A",rty:"H",set:1,typ:"C"},{crd:"STG",fct:"A",rty:"L",set:2,typ:"C"},{crd:"SSS",fct:"A",rty:"R",set:1,typ:"C"},{crd:"SSK",fct:"A",rty:"C",set:3,typ:"C"},{crd:"SWM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"STN",fct:"T",rty:"R",set:2,typ:"S"},{crd:"SGI",fct:"T",rty:"C",set:1,typ:"C"},{crd:"SBG",fct:"T",rty:"L",set:1,typ:"C"},{crd:"SCL",fct:"T",rty:"C",set:1,typ:"C"},{crd:"SGA",fct:"T",rty:"H",set:1,typ:"C"},{crd:"SSG",fct:"U",rty:"C",set:2,typ:"C"},{crd:"SVH",fct:"U",rty:"C",set:2.3,typ:"C"},{crd:"SIN",fct:"U",rty:"C",set:1.1,typ:"S"},{crd:"SYL",fct:"U",rty:"H",set:2.2,typ:"C"},{crd:"SEV",fct:"N",rty:"L",set:3.1,typ:"C"},{crd:"SML",fct:"U",rty:"C",set:1,typ:"C"},{crd:"SYO",fct:"A",rty:"L",set:1,typ:"C"},{crd:"TST",fct:"T",rty:"C",set:2,typ:"S"},{crd:"TBA",fct:"U",rty:"L",set:1,typ:"C"},{crd:"TGL",fct:"U",rty:"R",set:3,typ:"S"},{crd:"TGS",fct:"U",rty:"C",set:2,typ:"C"},{crd:"TPT",fct:"N",rty:"C",set:2.1,typ:"S"},{crd:"TDW",fct:"N",rty:"R",set:1.1,typ:"C"},{crd:"TGN",fct:"A",rty:"C",set:2,typ:"C"},{crd:"TSM",fct:"A",rty:"C",set:1,typ:"C"},{crd:"TUP",fct:"A",rty:"R",set:1,typ:"S"},{crd:"TGI",fct:"T",rty:"R",set:2,typ:"C"},{crd:"TDS",fct:"U",rty:"L",set:1.1,typ:"C"},{crd:"TPG",fct:"N",rty:"H",set:3.1,typ:"C"},{crd:"TMG",fct:"U",rty:"R",set:3,typ:"C"},{crd:"TOB",fct:"N",rty:"R",set:1,typ:"S"},{crd:"TWS",fct:"A",rty:"C",set:2,typ:"C"},{crd:"TVG",fct:"A",rty:"R",set:1.1,typ:"C"},{crd:"TXS",fct:"U",rty:"C",set:1,typ:"S"},{crd:"TCG",fct:"T",rty:"C",set:2.1,typ:"S"},{crd:"TWT",fct:"A",rty:"C",set:3,typ:"C"},{crd:"TRN",fct:"T",rty:"H",set:2,typ:"S"},{crd:"TSL",fct:"U",rty:"H",set:3,typ:"C"},{crd:"TWG",fct:"U",rty:"C",set:2,typ:"S"},{crd:"UGM",fct:"U",rty:"C",set:2.2,typ:"C"},{crd:"UGL",fct:"T",rty:"R",set:2,typ:"C"},{crd:"UIC",fct:"T",rty:"H",set:2.3,typ:"C"},{crd:"ULR",fct:"U",rty:"H",set:2,typ:"C"},{crd:"URD",fct:"N",rty:"H",set:1,typ:"C"},{crd:"UBL",fct:"T",rty:"R",set:1,typ:"S"},{crd:"UCM",fct:"T",rty:"R",set:1,typ:"C"},{crd:"UHS",fct:"T",rty:"H",set:2,typ:"C"},{crd:"UIM",fct:"T",rty:"C",set:2,typ:"C"},{crd:"UWL",fct:"T",rty:"H",set:2,typ:"C"},{crd:"UWS",fct:"T",rty:"R",set:2.3,typ:"C"},{crd:"UTM",fct:"U",rty:"C",set:2,typ:"C"},{crd:"UTR",fct:"U",rty:"H",set:2,typ:"C"},{crd:"URB",fct:"U",rty:"L",set:2.3,typ:"C"},{crd:"UPM",fct:"U",rty:"L",set:1,typ:"C"},{crd:"VRP",fct:"N",rty:"L",set:2,typ:"S"},{crd:"VBK",fct:"A",rty:"R",set:2,typ:"C"},{crd:"VTC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"VGN",fct:"N",rty:"C",set:1,typ:"C"},{crd:"VNF",fct:"U",rty:"R",set:1.1,typ:"C"},{crd:"VNS",fct:"U",rty:"H",set:2,typ:"C"},{crd:"VGR",fct:"U",rty:"C",set:2,typ:"S"},{crd:"VCG",fct:"T",rty:"C",set:1,typ:"C"},{crd:"VES",fct:"N",rty:"L",set:2.1,typ:"C"},{crd:"VYE",fct:"N",rty:"C",set:2,typ:"S"},{crd:"WBY",fct:"T",rty:"R",set:2,typ:"C"},{crd:"WBU",fct:"T",rty:"C",set:1.1,typ:"C"},{crd:"WMR",fct:"A",rty:"H",set:2.1,typ:"C"},{crd:"WMM",fct:"A",rty:"H",set:1,typ:"C"},{crd:"WTW",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WWP",fct:"U",rty:"H",set:1.1,typ:"C"},{crd:"WWR",fct:"U",rty:"C",set:3,typ:"C"},{crd:"WFM",fct:"T",rty:"H",set:1.1,typ:"C"},{crd:"WWS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"WBH",fct:"T",rty:"R",set:1.1,typ:"C"},{crd:"WCS",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WPD",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WFB",fct:"N",rty:"C",set:1.1,typ:"C"},{crd:"WFS",fct:"N",rty:"H",set:1,typ:"C"},{crd:"WBG",fct:"N",rty:"L",set:1.1,typ:"C"},{crd:"XCR",fct:"N",rty:"C",set:2,typ:"C"},{crd:"XDH",fct:"N",rty:"R",set:3,typ:"C"},{crd:"XHS",fct:"N",rty:"C",set:2.2,typ:"C"},{crd:"XHU",fct:"N",rty:"C",set:1,typ:"C"},{crd:"XRF",fct:"N",rty:"C",set:2,typ:"C"},{crd:"XSH",fct:"N",rty:"L",set:1,typ:"C"},{crd:"XDV",fct:"N",rty:"H",set:1,typ:"C"},{crd:"XRW",fct:"N",rty:"H",set:2,typ:"S"},{crd:"YWC",fct:"T",rty:"C",set:2,typ:"C"},{crd:"YNS",fct:"N",rty:"L",set:2.2,typ:"C"},{crd:"ZPM",fct:"T",rty:"R",set:1.1,typ:"C"},{crd:"ZTU",fct:"N",rty:"L",set:1,typ:"C"},{crd:"ZIN",fct:"N",rty:"C",set:1,typ:"C"},{crd:"ZMT",fct:"N",rty:"C",set:3,typ:"C"},{crd:"ZSH",fct:"T",rty:"L",set:1,typ:"C"}],be=[["ASQ",["SLG","SLG"]],["CGL",["CGF"]],["DHC",["DYF"]],["DTD",["TOT"]],["FGD",["FGA","FGB","FGG"]],["IBA",["AVB"]],["IZK",["IFL","IFR"]],["RHU",["RSC"]],["SLS",["MMY"]],["TSL",["FUN"]],["WHR",["WHC"]]],c=(n,t)=>({card:n,num:t}),Ne={name:"Official",id:"SBE",decks:[{name:"Alloyin Starter",factions:["A"],cards:[c("SYO",1),c("BSS",1),c("SFT",2),c("SNP",2),c("TSM",2),c("SSS",2),c("ALG",2),c("MXW",3),c("TUP",3),c("FPS",3),c("MND",3),c("IWC",3),c("SKB",3)]},{name:"Nekrium Starter",factions:["N"],cards:[c("SFS",1),c("GGD",1),c("FFD",3),c("EPD",2),c("CCR",2),c("HGS",2),c("DSS",2),c("BWK",2),c("GBG",3),c("DSK",3),c("GRP",3),c("VGN",3),c("XHU",3)]},{name:"Tempys Starter",factions:["T"],cards:[c("FBC",1),c("RBH",1),c("CFB",3),c("FSM",2),c("FSH",2),c("FSS",2),c("PMS",2),c("RFL",2),c("UBL",3),c("WPD",3),c("SGI",3),c("AMY",3),c("WCS",3)]},{name:"Uterra Starter",factions:["U"],cards:[c("UPM",1),c("EHW",1),c("FRR",3),c("SPD",2),c("HTP",2),c("LSS",2),c("SDR",2),c("SRD",2),c("FWR",3),c("DBP",3),c("GHT",3),c("GSS",3),c("TXS",3)]},{name:"Cruel Corrosion",factions:["A","N"],cards:[c("IHA",1),c("WBG",1),c("OXP",1),c("DFR",1),c("APM",1),c("SNP",1),c("GRM",2),c("ETN",2),c("DHW",2),c("OXM",2),c("AEN",2),c("ATG",2),c("CTI",2),c("CTW",2),c("FPS",2),c("GRW",2),c("MTT",2),c("SAP",2)]},{name:"Death March",factions:["N","T"],cards:[c("ZTU",1),c("VRP",1),c("GGP",1),c("EPD",1),c("DBT",1),c("BSM",1),c("TDW",2),c("NGT",2),c("UBL",2),c("FWK",2),c("BZD",2),c("CSB",2),c("SLH",2),c("MMH",2),c("LSK",2),c("GBG",2),c("CFG",2),c("DSK",2)]},{name:"Dinosaurs!",factions:["T","U"],cards:[c("TDS",1),c("SSR",1),c("FRR",1),c("ULR",1),c("UTR",1),c("BTM",1),c("UGL",2),c("EHN",2),c("SPD",2),c("GHB",2),c("FLN",2),c("SML",2),c("RFL",2),c("OXS",2),c("UTM",2),c("TWG",2),c("ENR",2),c("DBP",2)]},{name:"Wyvern's Wrath",factions:["T","U"],cards:[c("CSW",1),c("SMD",1),c("FRR",1),c("UIC",1),c("CFB",1),c("UGL",2),c("FSH",2),c("FLN",2),c("WPD",1),c("TWG",2),c("TCG",2),c("TGS",2),c("SML",2),c("SVH",1),c("SCL",2),c("RTS",1),c("FWB",2),c("ENR",2),c("ABR",2)]},{name:"Ironmind Intuition",factions:["A","N"],cards:[c("IMA",1),c("GMP",1),c("OXA",1),c("EPD",1),c("OJC",1),c("ESU",2),c("OXM",2),c("MMA",2),c("SAP",1),c("AFO",2),c("GBG",2),c("CTW",2),c("SRH",1),c("TSM",2),c("SLH",1),c("MTT",1),c("DCR",1),c("DFB",1),c("BSR",1),c("LGT",1),c("XRF",2),c("MMX",1)]},{name:"Nethershriek Negation",factions:["N","T"],cards:[c("SBG",1),c("NSH",1),c("FFU",1),c("EWE",1),c("BFM",1),c("WBH",1),c("UWS",1),c("TGI",2),c("RFL",2),c("GRM",1),c("ASG",1),c("YWC",2),c("XRF",2),c("WPD",2),c("WCS",2),c("WBU",2),c("TCG",1),c("FSK",1),c("SLH",2),c("CFG",1),c("RTS",2)]},{name:"Ridgeback's Rage",factions:["A","U"],cards:[c("URB",1),c("AGK",1),c("ESP",1),c("FRR",1),c("NXT",1),c("ALG",1),c("FGB",1),c("PHS",2),c("TUP",1),c("EWT",2),c("PTR",1),c("VBK",1),c("AGC",1),c("AEN",2),c("ETN",1),c("FPS",2),c("MXW",2),c("GHT",1),c("TWG",2),c("SNB",1),c("SML",1),c("JPK",1),c("ENR",1),c("IWC",1)]},{name:"Spare Parts",factions:["N"],cards:[c("SEV",1),c("SHG",1),c("TPG",1),c("CGL",1),c("FRV",1),c("HFA",2),c("XDH",1),c("GRM",1),c("SCV",1),c("DFB",2),c("EBW",2),c("GBG",2),c("GLF",2),c("XHS",2),c("SOT",1),c("XRF",2),c("SCS",1),c("ZMT",1),c("SLH",1),c("VYE",1),c("XCR",2),c("XHU",1)]},{name:"Future Forged",factions:["A"],cards:[c("NXA",1),c("IMD",1),c("FOL",1),c("SFA",2),c("SFT",1),c("SCD",1),c("CAG",1),c("ESU",1),c("NNS",1),c("FPM",1),c("PRI",1),c("SSS",1),c("CTG",1),c("TSM",2),c("IWC",1),c("MMA",2),c("TGN",2),c("MTT",1),c("SKG",1),c("AFO",1),c("MMV",1),c("TWS",1),c("SBA",2),c("SSK",1),c("JPK",1)]},{name:"Burning Rage",factions:["T"],cards:[c("ROK",1),c("KKK",1),c("MOE",1),c("AFR",1),c("FBI",1),c("FSS",2),c("FLN",2),c("CCT",2),c("BRN",2),c("WPD",2),c("SSM",2),c("SOK",1),c("RTS",2),c("FSK",2),c("CWK",2),c("CFG",2),c("BSW",2),c("FMS",2)]},{name:"Awakened Fury",factions:["U"],cards:[c("DZD",1),c("SSE",1),c("BTR",1),c("TSL",1),c("MPH",1),c("CDT",1),c("DYB",1),c("BTH",2),c("TMG",2),c("BWD",2),c("RHY",2),c("SBD",2),c("GMR",2),c("STS",1),c("OSL",2),c("SBI",2),c("LYS",2),c("TGS",2),c("SOD",2)]}]},He={name:"Set 1 & 2 Tournies",id:"T1309",decks:[{name:"Axel: Lifegain",factions:["T","U"],cards:[c("AGD",3),c("EHW",3),c("FRR",3),c("FIN",1),c("UPM",1),c("LKP",2),c("BTM",2),c("LBL",3),c("GSS",3),c("RFA",3),c("GHB",3),c("EFP",3)]},{name:"Derk: Metaminds",factions:["A"],cards:[c("OJC",3),c("DMW",3),c("MMV",3),c("JPK",3),c("MMO",3),c("GMP",3),c("ALS",3),c("MMA",3),c("SFA",3),c("BTN",3)]},{name:"Foxhull: Grow Wide",factions:["U"],cards:[c("DBP",3),c("EHW",2),c("FRR",3),c("FWT",3),c("UPM",3),c("LKP",2),c("BTM",3),c("HTR",2),c("LBD",2),c("RFA",3),c("GHB",2),c("SDR",2)]},{name:"Hectares: Dino Attack",factions:["A","U"],cards:[c("ALS",3),c("TDS",3),c("FRR",3),c("WWP",3),c("SML",2),c("BSG",3),c("JPK",2),c("ODC",3),c("NXT",2),c("WMM",3),c("GHB",3)]},{name:"Klaven: Mono-N",factions:["N"],cards:[c("SCS",3),c("ROG",1),c("GGP",1),c("GGD",3),c("WFS",1),c("DSS",3),c("ZTU",1),c("GBG",3),c("HFA",3),c("EXD",1),c("EPD",1),c("BSR",1),c("MRF",2),c("HGS",3),c("GTH",3)]},{name:"Phoenyx: Free Spell Dmg",factions:["T","U"],cards:[c("SHK",3),c("MOE",3),c("FRR",3),c("LSK",3),c("FFU",3),c("UBL",3),c("WWS",3),c("FSS",3),c("ENR",3),c("MMH",3)]},{name:"Technogeek5000: Grow Wide",factions:["N","U"],cards:[c("DBP",2),c("EHW",2),c("FRR",3),c("HTP",2),c("UPM",3),c("LKP",2),c("GHT",3),c("GGP",2),c("LBD",1),c("EPD",2),c("DBT",2),c("SPD",3),c("SDR",3)]},{name:"Thematik: Level Up",factions:["A","T"],cards:[c("IWC",3),c("FSS",3),c("ETN",1),c("WPD",2),c("FSM",1),c("AHL",1),c("UBL",3),c("SMD",2),c("BTN",3),c("LSK",1),c("MMH",3),c("FFU",1),c("TSM",3),c("ALG",3)]},{name:"TinyGrimes: NT Shapers",factions:["N","T"],cards:[c("DSS",3),c("FSS",3),c("EPD",2),c("GTH",3),c("FSM",1),c("MOE",1),c("UBL",3),c("GGP",3),c("GBG",1),c("LSK",3),c("HGS",1),c("CTW",1),c("SHK",3),c("GGD",1),c("DBT",1)]}]},Me={name:"The Forge",id:"TG10",decks:[{name:"DarkSoulSP: Grim Debuff",factions:["N","U"],cards:[c("BWK",3),c("TDS",2),c("FRR",3),c("WWP",3),c("GGP",3),c("GGD",3),c("DBT",1),c("WFS",3),c("CTW",3),c("EPD",3),c("GHB",3)]},{name:"ErrorAsh: Burn",factions:["N","T"],cards:[c("UBL",2),c("EFM",2),c("FBI",3),c("ESK",3),c("FLN",3),c("EFP",3),c("MOE",3),c("FSS",3),c("SHK",3),c("EPD",3),c("CHV",2)]},{name:"ErrorAsh: Farmer Tarsus",factions:["N","U"],cards:[c("WWS",3),c("DYB",3),c("FRR",3),c("SYL",3),c("EPD",3),c("SSE",2),c("NSH",2),c("TDW",3),c("NFF",2),c("CHR",2),c("LKP",2),c("EXD",2)]},{name:"ErrorAsh: Necro Mobiltiy",factions:["N","T"],cards:[c("NSH",2),c("SMD",2),c("DDD",3),c("TDW",3),c("VRP",3),c("WCS",3),c("BSM",3),c("SHG",2),c("TGI",2),c("EPD",3),c("FVA",2),c("DBT",1),c("TRN",1)]},{name:"Hans: Yetis",factions:["T","U"],cards:[c("UWL",3),c("FFU",3),c("WBY",3),c("UIM",3),c("WBU",3),c("SSR",1),c("TRN",1),c("GTT",1),c("GCR",3),c("FRR",3),c("UBL",3),c("WWP",3)]},{name:"MingisTheKing: Mobility",factions:["N","T"],cards:[c("DDD",3),c("DBT",3),c("EPD",3),c("EFP",3),c("GGP",3),c("LSK",3),c("SHK",3),c("UBL",3),c("WCS",3),c("ZTU",3)]},{name:"Noetherian: Shambler",factions:["N","U"],cards:[c("XSH",3),c("SPM",3),c("FRR",3),c("ODC",3),c("SSE",3),c("ESK",3),c("TGS",3),c("XRF",3),c("VRP",3),c("URB",3)]},{name:"Noetherian: Tempo",factions:["T","U"],cards:[c("RBH",3),c("TDS",3),c("FRR",3),c("WWP",3),c("EFP",3),c("AMY",2),c("FVA",2),c("ENR",3),c("ZSH",3),c("EHW",3),c("GHB",2)]},{name:"Piquadore: Zombies",factions:["N","T"],cards:[c("BWK",2),c("KOD",2),c("CYC",3),c("GRM",3),c("VYE",3),c("XRW",3),c("MOE",2),c("ZTU",3),c("BSM",3),c("EPD",3),c("DSS",3)]},{name:"Stautmeister: Yeti Mobility",factions:["T","U"],cards:[c("AGM",3),c("TDS",2),c("FRR",3),c("WWP",3),c("CSW",3),c("FLN",3),c("EFP",2),c("UWL",3),c("WBY",2),c("WCS",2),c("EHW",2),c("SHS",2)]},{name:"Technonaut: Steelscale",factions:["A","T"],cards:[c("UHS",2),c("FLN",3),c("STG",3),c("CRC",3),c("SHK",3),c("EFP",2),c("WMR",2),c("WMM",3),c("JPK",3),c("SMD",3),c("FVA",3)]},{name:"Technonaut: Woebringer",factions:["N","T"],cards:[c("LSK",2),c("WBG",3),c("EPD",3),c("DDD",3),c("SHK",3),c("EFP",3),c("ZTU",2),c("GGD",2),c("GGP",3),c("CTW",3),c("DBT",3)]},{name:"Zrandles: Metaminds",factions:["A","N"],cards:[c("DMW",3),c("GMP",3),c("MMA",3),c("MMV",2),c("TDW",3),c("VRP",3),c("EPD",3),c("SHG",2),c("OJC",2),c("ESK",2),c("CHV",2),c("CTW",2)]},{name:"Zrandles: Tempo",factions:["N","T"],cards:[c("CTW",1),c("GCR",1),c("CFG",1),c("FZS",1),c("FBI",3),c("MOE",3),c("EFP",3),c("LSK",3),c("FLN",3),c("SHK",3),c("RTS",3),c("GGP",3),c("UBL",2)]}]},Re={name:"Set 1 Fundecks",id:"FUN1",decks:[{name:"Frankenbomb",factions:["N"],cards:[c("DFB",3),c("BSR",3),c("HGS",3),c("HFA",3),c("FFD",3),c("XSH",3),c("XHU",3),c("WBG",3),c("GBG",3),c("CTI",3)]},{name:"Hangry Beasts",factions:["T","U"],cards:[c("TBA",3),c("SVH",3),c("MBP",2),c("FSH",3),c("RBH",3),c("FBC",3),c("LBR",2),c("CFB",3),c("AAK",3),c("KKK",2),c("FRR",1),c("FIN",1),c("IBF",1)]},{name:"Metamind Zapper",factions:["A","T"],cards:[c("MMA",3),c("DMW",3),c("GMP",3),c("SYO",3),c("KAW",3),c("SHK",3),c("CTL",2),c("CAG",2),c("MSC",2),c("MTS",2),c("ASG",2),c("ESU",2)]},{name:"Plant Party",factions:["N","U"],cards:[c("CTV",3),c("TDW",3),c("BTS",3),c("CHR",3),c("GMR",3),c("KOD",2),c("LKP",2),c("SHV",2),c("DBA",2),c("CCR",2),c("PTB",2),c("FIN",1),c("DBT",2)]},{name:"Voltron",factions:["A"],cards:[c("FGA",3),c("FGB",3),c("FGD",3),c("FGG",3),c("AFS",3),c("BSS",3),c("PRI",3),c("TUP",2),c("JPK",2),c("BWH",2),c("SFT",3)]},{name:"Do Fear The Reaper",factions:["A","N"],cards:[c("CTI",3),c("DFR",3),c("GRW",3),c("LGT",3),c("OXM",3),c("OXP",3),c("PHM",3),c("CTW",2),c("NNS",2),c("OXA",2),c("SDN",3)]},{name:"Muadib",factions:["N","U"],cards:[c("DBA",3),c("DYL",3),c("GSW",3),c("LBD",3),c("MMW",3),c("NCW",3),c("SRV",3),c("LBL",2),c("VYE",2),c("MSP",2),c("SBD",3)]},{name:"Triassic Park",factions:["T","U"],cards:[c("URB",3),c("UTR",3),c("UTM",3),c("ULR",3),c("UIC",3),c("UGL",3),c("RTS",3),c("BRN",2),c("LBR",2),c("IBF",2),c("GHB",3)]},{name:"Whacky Whinds",factions:["N","T"],cards:[c("DDD",3),c("WBH",3),c("HMF",3),c("WCS",3),c("GGP",3),c("SAD",3),c("SDN",3),c("EWE",3),c("SBG",3),c("ZSH",3)]},{name:"WWP 4 Victory",factions:["A","U"],cards:[c("WWP",3),c("EHN",2),c("SDR",2),c("HTR",2),c("MML",2),c("HTP",2),c("SHS",3),c("MND",2),c("NXC",2),c("CDT",2),c("PTB",2),c("SVO",2),c("MPH",2),c("SYO",2)]},{name:"Braaiins",factions:["N"],cards:[c("XDV",3),c("XRW",3),c("ONN",2),c("SLH",2),c("FWK",2),c("BWK",2),c("URD",2),c("TPG",2),c("DSS",2),c("KOD",2),c("ZMT",2),c("RSZ",2),c("BLW",2),c("CSB",2)]},{name:"Wanderin",factions:["N","U"],cards:[c("LYS",3),c("STR",2),c("MBP",2),c("OSL",2),c("RLW",3),c("SSR",1),c("SVO",2),c("SSE",2),c("RHW",3),c("SYL",2),c("TGS",2),c("TMG",3),c("XDH",3)]},{name:"Walls",factions:["A","T"],cards:[c("CDC",3),c("CTG",3),c("CRC",3),c("DCS",3),c("FRI",3),c("FGA",2),c("OBB",3),c("FVA",2),c("TGN",2),c("OWH",3),c("STN",3)]},{name:"Snakes In A Lane",factions:["A","U"],cards:[c("AFO",3),c("DSV",3),c("PSC",3),c("SHS",3),c("STO",3),c("NCL",2),c("VNF",3),c("LYS",2),c("SVO",1),c("VNS",3),c("TXS",2),c("ART",2)]},{name:"Benny & Izzy",factions:["A","T"],cards:[c("BRN",3),c("EFM",2),c("IZK",3),c("JPK",1),c("MTT",1),c("NNS",1),c("OBB",2),c("OWF",2),c("OEX",3),c("PRI",2),c("PTR",1),c("TST",1),c("FLS",2),c("BLH",3),c("SHK",3)]}]},Ut=[Ne,He,Me,Re];class Ge{state;constructor(t){this.state=t}get adjacent(){return a.field.adjacentPositions(this.lane)}get attack(){return this.state.attack+this.modSum("AT")}get activationAvailable(){return this.state.negateActivate?!1:this.state.activationAvailable}set activationAvailable(t){this.state.activationAvailable=t}get aggressive(){return this.state.aggressive||this.modBool("AG")}set aggressive(t){this.state.aggressive=t}get armor(){return this.negateArmor?0:this.state.armor+this.modSum("AR")}get armorDmg(){return this.state.armorDmg}set armorDmg(t){this.state.armorDmg=t}get bonus(){return this.state.bonus}set bonus(t){this.state.bonus=t}get breakthrough(){return this.state.breakthrough||this.modBool("BT")}set breakthrough(t){this.state.breakthrough=t}get changed(){return this.state.changed||this.negateDefender||this.negateArmor||this.negateActivate||this.negateMobility||this.negateRegen||this.state.triggers.some(t=>t.changes)}set changed(t){this.state.changed=t}get code(){return this.state.code}get defender(){return this.negateDefender?!1:this.state.defender||this.modBool("DF")}set defender(t){this.negateDefender||(this.state.defender=t,this.enforceEffects("DF"))}get effects(){return this.state.effects}get extraBattles(){return this.state.extraBattles}set extraBattles(t){this.state.extraBattles=t}get faction(){return a.cards.getCard(this.code).faction}get health(){return this.state.health+this.modSum("HL")}get id(){return this.state.id}get isActive(){return!this.sleeping||this.aggressive}isTribe(t){return a.cards.getCard(this.code).isTribe(t)}get lane(){return this.state.lane}get level(){return a.cards.getCard(this.code).level}get maxHealth(){return this.state.maxHealth+this.modSum("MH")}get mobility(){return this.negateMobility?0:this.state.mobility+this.modSum("MB")}get mobilityAvailable(){return this.state.mobilityAvailable}set mobilityAvailable(t){this.state.mobilityAvailable=t}get mods(){return this.state.mods}get negateActivate(){return this.state.negateActivate}set negateActivate(t){this.state.negateActivate=t}get negateArmor(){return this.state.negateArmor||this.modBool("NA")}set negateArmor(t){this.state.negateArmor=t,this.enforceEffects("AR")}get negateDefender(){return this.state.negateDefender||this.modBool("ND")}set negateDefender(t){this.state.negateDefender=t,this.enforceEffects("DF")}get negateMobility(){return this.state.negateMobility||this.modBool("NM")}set negateMobility(t){this.state.negateMobility=t}get negateRegen(){return this.state.negateRegen||this.modBool("NM")}set negateRegen(t){this.state.negateRegen=t}get opposed(){const t=d.crTarg();return t.player=a.player.toTarget(!this.owner),t.lanes=a.field.oppositeLane(this.lane),a.field.creatByTarget(t)[0]}get owner(){return this.state.owner}get poison(){return this.state.poison+this.modSum("PN")}get rank(){return a.player.toPlayer(this.owner).rank}get regen(){return this.negateRegen?0:this.state.regen+this.modSum("RG")}get sleeping(){return this.state.sleeping}set sleeping(t){this.state.sleeping=t}get status(){return this.state.status}set status(t){this.state.status=t}get triggers(){return this.state.triggers}buff(t,i,e=void 0){t!==0&&(this.state.attack+=t,this.enforceEffects("AT")),i!==0&&(this.state.health+=i,this.state.maxHealth+=i,this.enforceEffects("CH"),a.death.deathProdder(this,e))}addArmor(t){if(!this.negateArmor){const i=this.state.armor+t;this.state.armor=Math.max(0,i),this.enforceEffects("AR")}}addMobility(t){if(!this.negateMobility){const i=this.state.mobility+t;this.state.mobility=Math.max(0,i)}}addPoison(t){const i=this.state.poison+t;this.state.poison=Math.max(0,i)}addRegen(t){if(!this.negateRegen){const i=this.state.regen+t;this.state.regen=Math.max(0,i)}}heal(t){if(t===0)return 0;const i=Math.min(this.health+t,this.maxHealth)-this.health;return this.state.health+=i,i}setHealth(t){this.state.health=t}hurt(t,i=!1){if(t<1)return[0,0];const e=Math.max(Math.min(t,this.armor-this.armorDmg),0);let s=t-e,l=this.health-s;this.state.armorDmg+=e;let u=0;return i&&l<0&&(u=s-this.health,s=this.health),s>0&&(this.state.health-=s),[s,u]}hurtBattle(t,i,e=!1){const s=this.hurt(t,e);return s[0]>0&&a.batch.addEvents(d.damageEvent(!0,s[0],!0,!0,this,i)),s[1]}hurtDirect(t,i,e=void 0){const s=this.hurt(t,!1);return s[0]>0&&(a.log.new().crd(i).txt(` dealt ${t} dmg to `).crd(this.code).txt(".").go(),a.batch.addEvents(d.damageEvent(!1,s[0],!1,!0,this,void 0)),a.death.deathProdder(this,e)),s[0]}modIdx(t){return this.mods.findIndex(i=>i.granter===t)}modEffectPropagator(t){t.type==="AT"?this.enforceEffects("AT"):t.type==="HL"?(this.enforceEffects("CH"),a.death.deathProdder(this)):t.type==="AR"||t.type==="NA"?this.enforceEffects("AR"):(t.type==="DF"||t.type==="ND")&&this.enforceEffects("DF")}modSum(t){return this.mods.filter(i=>i.type===t).map(i=>i.value).reduce((i,e)=>i+e,0)}modBool(t){return this.mods.some(i=>i.type===t&&i.value===1)}hasMod(t){return this.modIdx(t)>-1}addMod(t){this.mods.push(t),this.modEffectPropagator(t)}addModSafe(t){this.mods.findIndex(e=>e.granter===t.granter&&e.type===t.type)===-1&&this.addMod(t)}removeMod(t){const i=this.state.mods.filter(e=>e.granter===t);this.state.mods=this.state.mods.filter(e=>e.granter!==t),i.forEach(e=>this.modEffectPropagator(e))}removeModSafe(t){this.hasMod(t)&&this.removeMod(t)}expireMod(t){this.state.mods.splice(this.state.mods.indexOf(t),1)}endActivation(){this.state.activationAvailable=!1,a.death.deathCheck(),a.action.actionDone()}move(t){this.state.lane=t,a.effect.positionChange(this.owner),a.batch.addEvents(d.creatureEvent("MOV",this))}addEffect(t,i){const e=d.effect(t,i);return this.effects.push(e),e}enforceEffects(t,i=!1){this.effects.filter(e=>e.watch===t).filter(e=>e.area==="A"||e.area==="C"&&this.owner===i).forEach(e=>a.cards.getCard(e.logicCode).enforceEffect(e,this))}jr4(t,i){const e=d.trigger(t,i);return e.cardCode=this.code,e.creatId=this.id,this.triggers.push(e),e}removeTrigger(t){const i=this.triggers.indexOf(t);i>-1?this.triggers.splice(i,1):console.error("Wery curious, could not find trigger to remove",t)}wipeAll(){this.state.mods=[],this.state.triggers=[],this.state.effects=[],this.state.hints=[],this.state.armor=0,this.state.mobility=0,this.state.poison=0,this.state.regen=0,this.state.aggressive=!1,this.state.defender=!1,this.state.breakthrough=!1,this.state.defender=!1,this.state.negateDefender=!1,this.state.negateArmor=!1,this.state.bonus=0,this.state.changed=!0,this.state.negateActivate=!0,a.field.creatByTarget(d.crTarg()).forEach(t=>{t.removeMod(this.id),t.enforceEffects("PS",this.owner)}),this.enforceEffects("AT"),this.enforceEffects("AR"),this.enforceEffects("CH"),a.effect.defenderChange(this.owner)}get hints(){return this.state.hints}aiHints(){return this.hints}}var R=(n=>(n[n.Never=-999]="Never",n[n.Horrid=-2]="Horrid",n[n.Bad=-1]="Bad",n[n.Noice=1]="Noice",n[n.Grand=2]="Grand",n))(R||{});const Rt=10218;class Le{modeStack=["M"];clickMode="M";pxRatio=1;options={bark:!0,bigCards:!0,highHealth:!1,cheater:!1,legDraft:!1,fatPacks:!1,playerDeck:[],wasDrafting:!1,wasRandCards:!1,scale:"100"};playerA=d.player(!0);playerB=d.player(!1);activePlayer=!0;isLocalA=!0;aiMode=!1;aiActive=!1;firstTurn=!0;winFlag=0;field=[];phase="ST";batch={type:"N0",events:[],triggerActions:[],deathCheck:!0,iatLane:0};turn=d.freshTurn();ui=d.freshUI();deathOrder=[];birthOrder=[];graveyard=[];newGame(t,i){a.resetIds(),this.aiMode=!0,a.fight.barking=a.state.gs.options.bark,this.activePlayer=a.randInt(0,2)===0,this.aiActive=!this.activePlayer,this.playerA.name="Forgy McGhee",this.playerA.nameOffset=25;const e=a.player.nameOSaurus();this.playerB.name=e[0],this.playerB.nameOffset=e[1],a.log.setup(),a.action.actionHistory=[],this.graveyard=[],this.field=[],this.deathOrder=[],this.birthOrder=[],this.ui=d.freshUI(),this.firstTurn=!0,this.winFlag=0,a.player.initPlayer(this.playerA,t),a.player.initPlayer(this.playerB,i),a.log.add("Ready...FIGHT!"),a.phase.startTurn()}}class d{static creatureState(t,i){return{activationAvailable:!0,aggressive:!1,armor:0,armorDmg:0,attack:0,bonus:0,breakthrough:!1,changed:!1,code:"",defender:!1,effects:[],extraBattles:0,health:0,hints:[],id:"",lane:i,maxHealth:0,mobility:0,mobilityAvailable:!0,mods:[],negateActivate:!1,negateArmor:!1,negateDefender:!1,negateMobility:!1,negateRegen:!1,owner:t,poison:0,regen:0,sleeping:!0,status:"A",triggers:[]}}static effect(t,i){return{area:"A",watch:t,logicCode:i}}static freeCard(t){return{id:a.genId(),condition:d.target("TH"),sourceCard:t}}static mod(t,i,e=""){return{type:t,value:typeof i=="boolean"?i?1:0:i,granter:e,expiry:"NN"}}static player(t){return{hand:[],deck:[],discard:[],isPlayerA:t,health:120,name:"",nameOffset:0,turn:1,rank:1,avatar:Math.floor(Math.random()*17)}}static trigger(t,i){return{type:t,logicCode:i,cardCode:"",creatId:"",customCode:"",interactive:!1,changes:!1}}static triggerReaction(t,i,e,s){return{event:t,ownerPlayerA:e,creatId:"",cardCode:"",trigger:i,host:s}}static freshTurn(){return{mainBattle:!1,creaturesKilled:0,friendlyFightStarters:0,regularPlays:2,cardsPlayed:0,freeCards:[]}}static freshUI(){return{handScrollLeft:0,detailStack:[],deckContents:[],deckScroll:0,deckSummary:!1,animating:!1}}static basicAction(t){return{zone:"N",actionKey:t,hostCard:"",param:""}}static fieldSelectAction(t,i=-1,e=!0){return{zone:"F",actionKey:t,playerA:e,lane:i,hostCard:"",param:""}}static deckSelectAction(t,i,e){return{zone:"N",actionKey:t,card:i,position:e,hostCard:"",param:""}}static handSelectAction(t,i="",e="",s=-1){return{zone:"H",actionKey:t,card:i,cost:e,position:s,hostCard:"",param:""}}static playerSelectAction(t,i){return{zone:"P",actionKey:t,playerA:i,hostCard:"",param:""}}static draftSelectAction(t,i,e){return{zone:"N",actionKey:t,index:i,pack:e,hostCard:"",param:""}}static ddf4(){return{zone:"N",actionKey:"ACTV",hostCard:"",param:""}}static menuButtonAction(t){return{zone:"N",actionKey:"MNBT",hostCard:"",param:t}}static creatureEvent(t,i){return{code:t,creature:i}}static enterFieldEvent(t){return{code:"ENT",creature:t,forged:!1}}static creatStatEvent(t,i,e){return{code:t,creature:i,newValue:e}}static playCardEvent(t,i){const e=d.playerEvent("PLC",i);return e.cardCode=t,e}static playerEvent(t,i){return{code:t,playerA:i}}static playerHealEvent(t,i,e){return{code:t,playerA:i,healAmt:e}}static damageEvent(t,i,e,s,l,u){return{code:"DMG",battle:t,dmg:i,creatureSrc:e,creatureTarg:s,target:l,source:u}}static actionifier(t,i,e,s){const l=t;return l.actionKey=i,l.hostCard=e,l.param=s,l}static target(t){return{target:t,level:"LA",canLevel:!1,faction:"X",player:"X",card:"A",field:"A",creatStatus:"A",tribe:"AN",notMe:"",hasArmor:!1,canArmor:!1,hasDefender:!1,canDefender:!1,hasMobility:!1,canMove:!1,hasPoison:!1,hasRegen:!1,canRegen:!1,cardCode:"",victims:""}}static actionTarget(t,i,e,s){return d.actionifier(d.target(t),i,e,s)}static crTarg(){const t=d.target("TF");return t.field="O",t.creatStatus="V",t}static crActTarg(t,i,e){return d.actionifier(d.crTarg(),t,i,e)}static crNotMeTarg(t){const i=d.target("TF");return i.field="O",i.creatStatus="V",i.notMe=t,i}static crNotMeActTarg(t,i,e,s){return d.actionifier(d.crNotMeTarg(i),t,e,s)}static crFriendTarg(){const t=d.crTarg();return t.player="F",t}static crFriendActTarg(t,i,e){return d.actionifier(d.crFriendTarg(),t,i,e)}static crFriendNotMeTarg(t){const i=d.crNotMeTarg(t);return i.player="F",i}static crFriendNotMeActTarg(t,i,e,s){return d.actionifier(d.crFriendNotMeTarg(i),t,e,s)}static crEnemyTarg(){const t=d.crTarg();return t.player="E",t}static crEnemyActTarg(t,i,e){return d.actionifier(d.crEnemyTarg(),t,i,e)}static playerTarg(t){const i=d.target("TP");return i.player=a.player.toTarget(t),i}static playerActTarg(t,i,e,s){return d.actionifier(d.playerTarg(t),i,e,s)}static lvlHandActTarg(t,i){const e=this.actionTarget("TH","CARD",t,i);return e.player="F",e.canLevel=!0,e}static emptyTarg(){const t=d.target("TF");return t.field="E",t}static emptyActTarg(t,i,e){return d.actionifier(d.emptyTarg(),t,i,e)}static emptyPlayerTarg(t){const i=d.emptyTarg();return i.player=a.player.toTarget(t),i}static emptyPlayerActTarg(t,i,e,s){return d.actionifier(d.emptyPlayerTarg(t),i,e,s)}static underHint(t){return t===1?"UL1":t===2?"UL2":"UL3"}static alliedHint(t){if(t==="A")return "ALA";if(t==="N")return "ALN";if(t==="T")return "ALT";if(t==="U")return "ALU";throw new Error("non faction passed to allied hint")}static actionEval(t,i,e){const s=e??[];return{type:i,hints:Array.isArray(s)?s:[s],vectors:[],action:t,final:!0,bonus:0}}static ddp5(t){const i=d.actionEval(t,"PS");return i.final=!1,i}static ddp7(t,i,e,s){const l=d.actionEval(t,"ST",s),u=d.ddp1(i,e);return u.destroy=!0,l.vectors=[u],l}static ddp8(t,i,e){return d.ddp7(t,i.owner,i.lane,e)}static ddp2(t,i,e,s={},l){const u=d.actionEval(t,"ST",l);return u.vectors=[d.ddp1(i,e,s)],u}static ddp3(t,i,e={},s){return d.ddp2(t,i.owner,i.lane,e,s)}static actionEvalBuffN(t,i,e,s=0,l=0,u){return d.ddp2(t,i,e,{att:s,hlt:l},u)}static actionEvalBuffC(t,i,e=0,s=0,l){return d.ddp3(t,i,{att:e,hlt:s},l)}static ddp4(t,i,e,s,l=!1){const u=d.actionEval(t,"PC"),m=a.cards.getCard(s);u.hints=m.aiHints();const y=d.evalVectorCreatureFromClass(m,i,e);return y.type="R",u.vectors.push(y),l&&(u.bonus=m.bonusPlay()),u}static evalVectorEmpty(t,i){return{shape:"B",type:"E",playerA:t,lane:i,destroy:!1,dirDmg:0,moveTo:0,health:0,attack:0,aggressive:!1,armor:0,armorDmg:0,breakthrough:!1,defender:!1,negateDefender:!1,poison:0,regen:0,sleeping:!1,bonus:0}}static evalVectorCreatureFromCode(t,i,e){const s=a.cards.getCard(t);return d.evalVectorCreatureFromClass(s,i,e)}static evalVectorCreatureFromClass(t,i,e){const s=t.jr3(i,e);return d.evalVectorCreature(s)}static evalVectorCreature(t){return{shape:"B",type:"C",playerA:t.owner,lane:t.lane,destroy:!1,dirDmg:0,moveTo:0,health:t.health,attack:t.attack,aggressive:t.aggressive,armor:t.armor,armorDmg:t.armorDmg,breakthrough:t.breakthrough,defender:t.defender,negateDefender:t.negateDefender,poison:t.poison,regen:t.regen,sleeping:t.sleeping,bonus:t.bonus}}static evalVectorPlayerLife(t,i){const e=d.evalVectorEmpty(t,0);return e.shape="P",e.type="M",e.health=i,e}static evalVectorPlayerDmg(t,i){const e=d.evalVectorEmpty(t,0);return e.shape="P",e.type="M",e.dirDmg=i,e}static evalVectorPlayer(t){const i=d.evalVectorEmpty(t,0);return i.shape="P",i.type="P",i}static ddp1(t,i,e){const s=d.evalVectorEmpty(t,i);return s.type="M",e&&(s.attack=e.att??0,s.health=e.hlt??0,s.armor=e.arm??0,s.regen=e.rgn??0,s.poison=e.psn??0,s.dirDmg=e.dmg??0,s.defender=e.def??!1,s.breakthrough=e.brt??!1,s.aggressive=e.agr??!1,s.negateDefender=e.noD??!1),s}}class pt{constructor(t){this.code=t,this.level=parseInt(t.substring(3))}code;consistent=!1;faction="X";cardCode(){return pt.extractCardCode(this.code)}image(t){return this.type==="S"?this.fixedImage(t):this.leveledImage(t)}leveledImage(t){return this.rawImage(this.code,t)}fixedImage(t){return this.rawImage(this.cardCode(),t)}rawImage(t,i){return`card/${i?"b":"s"}/${this.faction}/${t}.jpg`}isFree=!1;level;maxLevel=3;minLevel=1;name="";overload=!1;rarity="T";text="";get type(){return "C"}hints;aiHints(){return this.hints??[]}bonus;bonusPlay(){return this?.bonus?.play??0}bonusExist(){return this?.bonus?.exist??0}canLevel(){return this.level{l+=s[m]*e[0][m],u+=s[m]*e[1][m]}),[l,u]}static extractCardCode(t){return t.substring(0,3)}get boof123n(){return this.level*-1}get boof124(){return this.lValN([1,2,4])}get boof135(){return this.lValN([1,3,5])}get boof137(){return this.lValN([1,3,7])}get boof147(){return this.lValN([1,4,7])}get boof234(){return this.level+1}get boof235(){return this.lValN([2,3,5])}get boof236(){return this.lValN([2,3,6])}get boof246(){return this.level*2}get boof246n(){return this.level*-2}get boof247(){return this.lValN([2,4,7])}get boof247n(){return this.lValN([-2,-4,-7])}get boof248(){return this.lValN([2,4,8])}get boof258(){return this.lValN([2,5,8])}get boof2510(){return this.lValN([2,5,10])}get boof2612(){return this.lValN([2,6,12])}get boof357(){return this.lValN([3,5,7])}get boof358(){return this.lValN([3,5,8])}get boof359(){return this.lValN([3,5,9])}get boof3510(){return this.lValN([3,5,10])}get boof3612(){return this.lValN([3,6,12])}get boof369(){return this.level*3}get boof369n(){return this.level*-3}get boof3610(){return this.lValN([3,6,10])}get boof3711(){return this.lValN([3,7,11])}get boof3712(){return this.lValN([3,7,12])}get boof3713(){return this.lValN([3,7,13])}get boof3714(){return this.lValN([3,7,14])}get boof3814(){return this.lValN([3,8,14])}get boof468(){return this.lValN([4,6,8])}get boof469(){return this.lValN([4,6,9])}get boof4610(){return this.lValN([4,6,10])}get boof4612(){return this.lValN([4,6,12])}get boof4710(){return this.lValN([4,7,10])}get boof4711(){return this.lValN([4,7,11])}get boof4712(){return this.lValN([4,7,12])}get boof4713(){return this.lValN([4,7,13])}get boof4714(){return this.lValN([4,7,14])}get boof4812(){return this.level*4}get boof4812n(){return this.level*-4}get boof4813(){return this.lValN([4,8,13])}get boof4814(){return this.lValN([4,8,14])}get boof4815(){return this.lValN([4,8,15])}get boof4816(){return this.lValN([4,8,16])}get boof4914(){return this.lValN([4,9,14])}get boof4915(){return this.lValN([4,9,15])}get boof579(){return this.lValN([5,7,9])}get boof5711(){return this.lValN([5,7,11])}get boof5714(){return this.lValN([5,7,14])}get boof5812(){return this.lValN([5,8,12])}get boof5813(){return this.lValN([5,8,13])}get boof5814(){return this.lValN([5,8,14])}get boof5815(){return this.lValN([5,8,15])}get boof5914(){return this.lValN([5,9,14])}get boof5915(){return this.lValN([5,9,15])}get boof5916(){return this.lValN([5,9,16])}get boof5917(){return this.lValN([5,9,17])}get boof51014(){return this.lValN([5,10,14])}get boof51015(){return this.level*5}get boof51020(){return this.lValN([5,10,20])}get boof6812(){return this.lValN([6,8,12])}get boof6814(){return this.lValN([6,8,14])}get boof6912(){return this.lValN([6,9,12])}get boof6914(){return this.lValN([6,9,14])}get boof6915(){return this.lValN([6,9,15])}get boof6916(){return this.lValN([6,9,16])}get boof61014(){return this.lValN([6,10,14])}get boof61015(){return this.lValN([6,10,15])}get boof61016(){return this.lValN([6,10,16])}get boof61017(){return this.lValN([6,10,17])}get boof61018(){return this.lValN([6,10,18])}get boof61117(){return this.lValN([6,11,17])}get boof61218(){return this.lValN([6,12,18])}get boof61224(){return this.lValN([6,12,24])}get boof7911(){return this.lValN([7,9,11])}get boof7914(){return this.lValN([7,9,14])}get boof71013(){return this.lValN([7,10,13])}get boof71014(){return this.lValN([7,10,14])}get boof71015(){return this.lValN([7,10,15])}get boof71116(){return this.lValN([7,11,16])}get boof71117(){return this.lValN([7,11,17])}get boof71118(){return this.lValN([7,11,18])}get boof81116(){return this.lValN([8,11,16])}get boof81117(){return this.lValN([8,11,17])}get boof81217(){return this.lValN([8,12,17])}get boof81220(){return this.lValN([8,12,20])}get boof81318(){return this.lValN([8,13,18])}get boof91420(){return this.lValN([9,14,20])}get boof91421(){return this.lValN([9,14,21])}get boof101520(){return this.lValN([10,15,20])}get boof255080(){return this.lValN([25,50,80])}}class x extends pt{constructor(t){super(t)}jr2=0;jr1=0;initAggro=!1;initArmor=0;initBT=!1;initDefend=!1;initMobile=0;initRegen=0;tribe=[];isTribe(t){return(Array.isArray(t)?t:[t]).every(e=>this.tribe.includes(e))}jr3(t,i){const e=d.creatureState(t,i);return e.id=a.genId(),e.code=this.code,e.health=this.jr2,e.attack=this.jr1,e.maxHealth=e.health,e.regen=this.initRegen,e.breakthrough=this.initBT,e.defender=this.initDefend,e.aggressive=this.initAggro,e.armor=this.initArmor,e.mobility=this.initMobile,e.hints=this.aiHints(),e.bonus=this.bonusExist(),new Ge(e)}playTargets(){const t=super.playTargets(),i=d.actionTarget("TF","FORG",this.code,"");return i.player="F",t.push(i),t}canActivate(t){return!1}startActivation(t){console.error("encountered activation request for creature with no activate",t)}levelSpice(){return[{icon:"A",num:this.jr1},{icon:"H",num:this.jr2}]}}class rt extends pt{constructor(t){super(t)}get type(){return "S"}logSpell(){a.log.new().txt("Casted ").crd(this.code).txt(".").go()}}class Ie extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Abraxas, Avatar of Kadras",this.jr1=this.boof4712,this.jr2=this.lValN([7,11,21]),this.tribe.push("HY"),this.hints=["LJ"];const i=this.lValS(["Give an adjacent creature","Each adjacent creature gets","Each other friendly creature gets"]);this.text=`Activate: ${i} 2x attack this turn.`}targ(t){const i=d.crFriendNotMeActTarg("CARD",t.id,this.code,t.id);return this.level<3&&(i.lanes=t.adjacent),i}canActivate(t){return a.field.creatByTarget(this.targ(t)).length>0}startActivation(t){if(this.level===1)a.action.ddf5(this.getCardActions(d.ddf4(),t));else{const i=this.targ(t);a.field.creatByTarget(i).forEach(e=>{this.applyMod(e,t.id)}),t.endActivation()}}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.applyMod(i,e.id),e.endActivation()}getCardActions(t,i){if(t.actionKey==="ACTV"){this.level>1&&console.error("Abraxis asking for activate actions after level 1. Something in your code is wrong");const e=i??a.field.jr5(t.param),s=this.targ(e);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){const i=Rt+1,e=d.actionEval(t,"ST");if(t.actionKey==="ACTV")if(this.level>1){const s=a.field.jr5(t.param);let l;this.level===3?l=a.field.laneIdx.filter(u=>u!==s.lane):l=s.adjacent,e.vectors=l.map(u=>d.ddp1(s.owner,u,{att:i}))}else return d.ddp5(t);else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{att:i}))}return e}applyMod(t,i){const e=d.mod("AT",t.attack,i);e.expiry="ET",t.addMod(e)}}class $e extends x{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Apocrymancer",this.jr1=this.boof3713,this.jr2=this.jr1+3,this.tribe.push("HM"),this.text="When you play an Alloyin spell, you may discard and level up a card."}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){a.turn.levelAndDiscard(t),a.action.actionDone(!0)}ddf8(t){if(t.event.code==="PLC"){const i=t.event;if(i.playerA===t.ownerPlayerA){const e=a.cards.getCard(i.cardCode);if(e.type==="S"&&e.faction==="A")return!0}}return!1}jr8(t){const i=d.lvlHandActTarg(this.code,t.creatId);a.action.ddf5(a.target.toActions([i,a.target.buttonTarget("NOTR")]))}ddf7(t){return t.actionKey==="CARD"?d.actionEval(t,"DC"):super.ddf7(t)}}class Ve extends x{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Arboris, Grove Dragon",this.jr1=this.lValN([5,9,20]),this.jr2=this.jr1,this.tribe.push("DG");const i=this.boof;this.text=`While you have over 120 health, Arboris gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i);return e.addEffect("PH",this.code),e}enforceEffect(t,i){if(a.state.getPlayer(i.owner).health>120&&i.status==="A"){const s=this.boof;i.addModSafe(d.mod("HL",s,i.id)),i.addModSafe(d.mod("MH",s,i.id)),i.addModSafe(d.mod("AT",s,i.id))}else i.removeModSafe(i.id)}get boof(){return this.lValN([4,8,80])}}class Yt extends x{constructor(t){super(t),this.rarity="H",this.jr1=this.level+2,this.jr2=this.jr1;const i=this.cardCode();i==="SFA"?this.steel():i==="RFA"?this.root():i==="HFA"?this.hell():i==="SGA"&&this.storm(),this.hints=["P1",d.alliedHint(this.faction)],this.text=`Forge: ${this.name} gets ${a.log.jr9(this.level,this.level)} for each ${a.log.factionText(this.faction)} card in your hand.`}hell(){this.faction="N",this.name="Hellforged Avatar",this.initRegen=this.level,this.tribe.push("AB")}root(){this.faction="U",this.name="Rootforged Avatar",this.initBT=!0,this.tribe.push("HM")}steel(){this.faction="A",this.name="Steelforged Avatar",this.initArmor=this.level,this.tribe.push("CY")}storm(){this.faction="T",this.name="Stormforged Avatar",this.initMobile=this.level,this.tribe.push("MT")}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}jr8(t){const i=t.event,e=a.state.getPlayer(t.ownerPlayerA).hand.filter(s=>a.cards.getCard(s).faction===this.faction).length;if(e>0){const s=e*this.level;i.creature.buff(s,s)}a.batch.triggerDone()}}class N extends x{imgKey="";lookup(t){return{["BOS"]:()=>this.fixedSapling(3),["DZA"]:()=>this.dozer(),["FWG"]:()=>this.feywing(),["FUN"]:()=>this.funguy(),["OOZ"]:()=>this.ooze(),["SPL"]:()=>this.minion(),["SXP"]:()=>this.fixedSapling(5),["SXD"]:()=>this.fixedSeedling(3),["SXT"]:()=>this.fixedTreefolk(7),["SDL"]:()=>this.minion(),["SPN"]:()=>this.nekSpirit(),["XYR"]:()=>this.yuruSpirit(),["TFK"]:()=>this.minion(),["TFD"]:()=>this.fixedTreefolk(this.boof5714),["TFF"]:()=>this.tfFight(),["ZTR"]:()=>this.zimus(),["ZBS"]:()=>this.threeZomb(),["ZMB"]:()=>this.commonZomb()}[t]}constructor(t){super(t),this.rarity="T";const i=this.cardCode();this.imgKey=i,this.minLevel=this.level,this.maxLevel=this.level,this.lookup(i)()}image(t){return this.rawImage(this.imgKey,t)}fixedNekSpirit(t){this.faction="N",this.rarity="T",this.name="Spirit",this.tribe.push("ST"),this.jr1=t,this.jr2=t,this.imgKey=`${"SPN"}${this.level}`}nekSpirit(){this.fixedNekSpirit(this.boof51015)}yuruSpirit(){this.fixedNekSpirit(this.boof5814)}ooze(){this.faction="N",this.rarity="T",this.name="Oozeling",this.tribe.push("OZ"),this.jr1=this.boof4711,this.jr2=this.jr1,this.imgKey="OOZ"}minion(){this.jr1=N.minionBuff(this.level),this.plont(),this.name=N.minionName(this.level)}static minionCode(t){return(t===1?"SDL":t===2?"SPL":"TFK")+t}static minionName(t){return t===1?"Seedling":t===2?"Sapling":"Treefolk"}static minionBuff(t){return t===1?1:t===2?3:5}plont(){this.faction="U",this.jr2=this.jr1,this.tribe.push("PL")}fixedSapling(t){this.jr1=t,this.plont(),this.name=N.minionName(2),this.imgKey="SPL"}fixedSeedling(t){this.jr1=t,this.plont(),this.name=N.minionName(1),this.imgKey="SDL"}fixedTreefolk(t){this.jr1=t,this.plont(),this.name=N.minionName(3),this.imgKey="TFK"}tfFight(){this.jr1=this.boof91421,this.plont(),this.name=N.minionName(3),this.imgKey="TFK"}feywing(){this.faction="U",this.name="Feywing",this.jr1=9,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("DG")}funguy(){this.name="Funguy",this.jr1=this.lValN([6,12,14]),this.plont(),this.minLevel=1,this.maxLevel=3,this.hints=["DL"]}dozer(){this.faction="U",this.name="Dozer, the Awakened",this.jr1=this.level*3+6,this.jr2=this.jr1,this.initAggro=!0,this.initBT=!0,this.tribe.push("BR"),this.imgKey=this.code,this.text=`${this.name} enters play with health equal to the Dozer, the Dormant it replaced.`}zimus(){this.faction="N",this.rarity="L",this.name="Zimus, the Returned",this.tribe.push("ZB"),this.jr1=10,this.jr2=5,this.imgKey=`${"ZTU"}2`}zomb(t,i){this.faction="N",this.rarity="T",this.name="Zombie",this.tribe.push("ZB"),this.jr1=t,this.jr2=i,this.imgKey="ZMB"}commonZomb(){const t=this.boof359;this.zomb(t,t)}threeZomb(){this.zomb(3,3)}}class J extends rt{lookup(t){return{["AGP"]:{c:()=>this.apulseC(),z:()=>this.apulseZ(),e:e=>this.apulseE(e)},["CTL"]:{c:()=>this.ctlC(),z:()=>this.ctlZ(),e:e=>this.ctlE(e)},["DCR"]:{c:()=>this.dcurC(),z:()=>this.dcurZ(),e:e=>this.dcurE(e)},["DGZ"]:{c:()=>this.digiC(),z:()=>this.digiZ(),e:e=>this.digiE(e)},["EPD"]:{c:()=>this.epiC(),z:()=>this.epiZ(),e:e=>this.epiE(e)},["FRR"]:{c:()=>this.roarC(),z:()=>this.roarZ(),e:e=>this.roarE(e)},["FSM"]:{c:()=>this.fstormC(),z:()=>this.fstormZ(),e:e=>this.fstormE(e)},["GRM"]:{c:()=>this.mealC(),z:()=>this.mealZ(),e:e=>this.mealE(e)},["IBF"]:{c:()=>this.ibfC(),z:()=>this.ibfZ(),e:e=>this.ibfE(e)},["NSH"]:{c:()=>this.shriekC(),z:()=>this.shriekZ(),e:e=>this.shriekE(e)},["NCL"]:{c:()=>this.noxC(),z:()=>this.noxZ(),e:e=>this.noxE(e)},["OWF"]:{c:()=>this.oforceC(),z:()=>this.oforceZ(),e:e=>this.oforceE(e)},["PTB"]:{c:()=>this.phyC(),z:()=>this.phyZ(),e:e=>this.phyE(e)},["PYS"]:{c:()=>this.pyreC(),z:()=>this.pyreZ(),e:e=>this.pyreE(e)},["ROK"]:{c:()=>this.rokC(),z:()=>this.rokZ(),e:e=>this.rokE(e)},["STS"]:{c:()=>this.stsC(),z:()=>this.stsZ(),e:e=>this.stsE(e)},["SNP"]:{c:()=>this.pulseC(),z:()=>this.pulseZ(),e:e=>this.pulseE(e)},["SRD"]:{c:()=>this.sradC(),z:()=>this.sradZ(),e:e=>this.sradE(e)},["TST"]:{c:()=>this.talinC(),z:()=>this.talinZ(),e:e=>this.talinE(e)},["TRN"]:{c:()=>this.turnbC(),z:()=>this.turnbZ(),e:e=>this.turnbE(e)}}[t]}constructor(t){super(t),this.lookup(this.cardCode()).c()}image(t){return this.cardCode()==="NSH"?this.leveledImage(t):this.fixedImage(t)}playTargets(){const t=super.playTargets(),i=a.target.boardTarget("CARD",this.code);return t.push(i),t}handleAction(t){this.logSpell(),this.lookup(this.cardCode()).z(),a.turn.spellCast()}ddf7(t){return this.lookup(this.cardCode()).e(t)}apulseC(){this.faction="A",this.rarity="C",this.name="Aegis Pulse",this.text=`Each friendly creature gets Armor ${this.boof234}.`}apulseZ(){const t=this.boof234;a.field.ddf1().forEach(i=>{i.addArmor(t)})}apulseE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof234;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{arm:s})),i}get ctlboof(){return(this.level-1)*2}ctlC(){this.faction="T",this.rarity="L",this.name="Call the Lightning";const t=this.level>1?` gets ${a.log.jr9(this.ctlboof,0)} this turn. Those creatures`:"";this.text=`Each friendly creature${t} battles an additional time this turn.`}ctlZ(){const t=this.ctlboof;a.field.ddf1().forEach(i=>{const e=d.mod("AT",t,this.code);e.expiry="ET",i.addMod(e),i.extraBattles+=1})}ctlE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.ctlboof;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}dcurC(){this.faction="N",this.rarity="R",this.name="Death Current";const t=this.lValS(["a level 2 or lower","an","two"]);this.text=`Destroy ${t} enemy creature at random.`}dcurZ(){const t=this.dCurrHunter(),i=t.length;if(i>0){const e=a.randInt(0,i),s=Date.now();a.death.destroy(t[e],this.code,s),this.level===3&&i>1&&(t.splice(e,1),a.death.destroy(t[a.randInt(0,i-1)],this.code,s))}}dcurE(t){let i;const e=this.dCurrHunter(),s=e.length;if(s>0){const l=a.randInt(0,s);if(i=d.ddp8(t,e[l]),this.level===3&&s>1){e.splice(l,1);const u=d.ddp1(e[0].owner,a.randInt(0,s-1));u.destroy=!0,i.vectors.push(u)}}else i=d.actionEval(t,"NR");return i}dCurrHunter(){const t=d.crEnemyTarg();return t.level=a.target.ddf2(this.level+1),a.field.creatByTarget(t)}digiC(){this.faction="A",this.rarity="R",this.name="Digitize",this.text=`Each enemy creature gets ${a.log.jr9(this.boof4812n,0)}.`}digiZ(){const t=this.boof4812n;a.field.qEnemyCreats().forEach(i=>{i.buff(t,0)})}digiE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof4812n;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}epiC(){this.faction="N",this.rarity="H",this.name="Epidemic";const t=this.boof246n;this.text=`Each enemy creature gets ${a.log.jr9(t,t)}.`}epiZ(){const t=this.boof246n,i=d.crEnemyTarg();a.field.creatByTarget(i).forEach(e=>{e.buff(t,t)})}epiE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof246n;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s,hlt:s})),i}roarC(){this.faction="U",this.rarity="H",this.name="Ferocious Roar";const t=this.boof235;this.text=`Each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}roarZ(){const t=this.boof235;a.field.ddf1().forEach(i=>{i.buff(t,t),this.level===3&&(i.breakthrough=!0)})}roarE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof235,l=this.level===3;return i.vectors=a.field.laneIdx.map(u=>d.ddp1(e,u,{att:s,hlt:s,brt:l})),i}get fszap(){return this.level+4}fstormC(){this.faction="T",this.rarity="H",this.name="Firestorm",this.text=`Deal ${this.fszap} damage to each creature.`}fstormZ(){const t=this.fszap,i=Date.now();a.field.qActiveCreats().forEach(e=>{e.hurtDirect(t,this.code,i)})}fstormE(t){const i=d.actionEval(t,"ST"),e=this.fszap;return i.vectors=[!0,!1].map(s=>a.field.laneIdx.map(l=>d.ddp1(s,l,{dmg:e}))).flat(),i}mealC(){this.faction="N",this.rarity="R",this.name="Group Meal";const t=this.boof234;this.text=`Each enemy creature gets ${a.log.jr9(-1*t,0)}. Each friendly creature gets ${a.log.jr9(t,0)}.`}mealZ(){const t=this.boof234,i=a.state.ddf9();a.field.qActiveCreats().forEach(e=>{const s=e.owner===i?t:-1*t;e.buff(s,0)})}mealE(t){const i=d.actionEval(t,"ST"),e=this.boof234,s=a.state.ddf9();return i.vectors=[!0,!1].map(l=>a.field.laneIdx.map(u=>d.ddp1(l,u,{att:l===s?e:-e}))).flat(),i}ibfC(){this.faction="T",this.rarity="R",this.name="Iceborn Fortitude",this.text=`Each friendly creature gets ${a.log.jr9(0,this.boof3510)}.`}ibfZ(){const t=this.boof3510,i=d.crFriendTarg();a.field.creatByTarget(i).forEach(e=>{e.buff(0,t)})}ibfE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof3510;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{hlt:s})),i}shriekC(){this.faction="N",this.rarity="L",this.name="Nethershriek";const t=this.boof4815;this.text=`Spawn a ${t}/${t} Netherdrake.`}shriekZ(){a.field.birthCreature(`${"NDR"}${this.level}`,"S",a.state.ddf9())}shriekE(t){const i=a.state.ddf9(),e=a.field.emptyLanes(i);if(e.length===0)return d.actionEval(t,"NR");{const s=d.ddp4(t,i,e[a.randInt(0,e.length)],`${"NDR"}${this.level}`);return s.type="ST",s.hints.push("ENF"),s}}noxC(){this.faction="U",this.rarity="R",this.name="Noxious Cloud",this.text=`Each enemy creature gets Poison ${this.boof246}.`}noxZ(){const t=this.boof246;a.field.qEnemyCreats().forEach(i=>{i.addPoison(t)})}noxE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof246;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{psn:s})),i}oforceC(){this.faction="A",this.rarity="H",this.name="Overwhelming Force",this.text="Each friendly creature gets "+(this.level===3?"2x attack.":`${a.log.jr9(this.boof369,0)}.`)}oforceZ(){if(this.level===3)a.field.ddf1().forEach(t=>{t.buff(t.attack,0)});else{const t=this.boof369;a.field.ddf1().forEach(i=>{i.buff(t,0)})}}oforceE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.lValN([3,6,Rt+1]);return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}phyC(){this.faction="U",this.rarity="H",this.name="Phytobomb";const t=N.minionBuff(this.level);this.text=`Put a ${t}/${t} ${N.minionName(this.level)} into each players available lanes.`}phyZ(){const t=N.minionCode(this.level),i=Date.now();[!0,!1].forEach(e=>{a.field.emptyLanes(e).forEach(s=>{a.field.birthCreature(t,"P",e,s,i)})})}phyE(t){const i=N.minionCode(this.level),e=d.actionEval(t,"ST");return e.vectors=[!0,!1].map(s=>a.field.emptyLanes(s).map(l=>{const u=d.evalVectorCreatureFromCode(i,s,l);return u.type="R",u})).flat(),e}pyreC(){this.faction="T",this.rarity="C",this.name="Pyre Song",this.text=`Each friendly creature deals ${this.level} damage to each enemy creature.`}pyreZ(){const t=this.level,i=Date.now(),e=a.field.qEnemyCreats();a.field.ddf1().forEach(s=>{e.forEach(l=>{l.hurtDirect(t,s.code,i)})})}pyreE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.level*a.field.ddf1().length;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{dmg:s})),i}rokC(){this.faction="T",this.rarity="L",this.name="Rage of Kadras",this.overload=!0,this.maxLevel=1,this.text="Each friendly Tempys creature gets +1 attack and deals damage equal to its attack to the creature opposing it."}rokZ(){const t=Date.now(),i=d.crFriendTarg();i.faction="T",a.field.creatByTarget(i).forEach(e=>{e.buff(1,0);const s=e.opposed;s&&s.hurtDirect(e.attack,e.code,t)})}rokE(t){const i=d.actionEval(t,"ST"),e=d.crFriendTarg();return e.faction="T",i.vectors=a.field.creatByTarget(e).map(s=>{const l=d.ddp1(s.owner,s.lane,{att:1}),u=s.opposed;return u?[l,d.ddp1(u.owner,u.lane,{dmg:s.attack+1})]:[l]}).flat(),i}get spboof(){return(this.level+1)*-2}pulseC(){this.faction="A",this.rarity="H",this.name="Sonic Pulse",this.text=`Each enemy creature gets ${a.log.jr9(this.spboof,0)}.`}pulseZ(){const t=this.spboof;a.field.qEnemyCreats().forEach(i=>{i.buff(t,0)})}pulseE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.spboof;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}sradC(){this.faction="U",this.rarity="C",this.name="Soothing Radiance",this.text=`Heal ${this.boof61224} damage from each friendly creature.`}sradZ(){const t=this.boof61224;a.field.ddf1().forEach(i=>{i.heal(t)})}sradE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof3612;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{hlt:s})),i}stsC(){this.faction="U",this.rarity="C",this.name="Scatter the Seeds";const t=N.minionBuff(this.level);this.text=`Spawn three ${t}/${t} ${N.minionName(this.level)}s.`}stsZ(){const t=N.minionCode(this.level),i=Date.now();[1,2,3].forEach(e=>{a.field.birthCreature(t,"S",a.state.ddf9(),void 0,i)})}stsE(t){const i=d.actionEval(t,"ST"),e=Math.min(3,a.field.emptyLanes(a.state.ddf9()).length),s=N.minionBuff(this.level),l=this.ddp9(1,s+s,s,0);return i.bonus=l*e,i}talinC(){this.faction="T",this.rarity="C",this.name="Talin Stampede",this.text=`Each friendly Tempys creature gets ${a.log.jr9(this.boof5814,0)} this turn.`}talinZ(){const t=this.boof5814;this.talinTarg().forEach(i=>{const e=d.mod("AT",t);e.expiry="ET",i.addMod(e)})}talinE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof5814;return i.vectors=this.talinTarg().map(l=>d.ddp1(e,l.lane,{att:s})),i}talinTarg(){const t=d.crFriendTarg();return t.faction="T",a.field.creatByTarget(t)}turnbC(){this.faction="T",this.rarity="H",this.name="Turnabout",this.isFree=this.level===3;const t=this.boof235;this.text=`Each creature gets ${a.log.jr9(t,-1*t)} this turn.`}turnbZ(){const t=this.boof235,i=-1*t;a.field.qActiveCreats().forEach(e=>{const s=d.mod("AT",t),l=d.mod("HL",i),u=d.mod("MH",i);s.expiry="ET",l.expiry="ET",u.expiry="ET",e.addMod(s),e.addMod(l),e.addMod(u)})}turnbE(t){const i=d.actionEval(t,"ST"),e=this.boof235,s=-1*e;return i.vectors=[!0,!1].map(l=>a.field.laneIdx.map(u=>d.ddp1(l,u,{att:e,hlt:s}))).flat(),i}}class Oe extends x{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Borean Mystic",this.jr1=this.boof4814,this.jr2=this.boof71118,this.tribe.push("WN","AS"),this.text=`Activate: Move another friendly creature to an available lane adjacent to ${this.name}.`}canActivate(t){return this.emptySloots(t).length>0&&this.buddies(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.jr5(i[2]).move(t.lane),e.endActivation()}}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.buddies(e.id);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=a.field.jr5(s[1]),u=this.emptySloots(l,e.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=t,l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.moveTo=s.lane,e.vectors.push(u),e}}}emptySloots(t,i=""){return a.action.emptyAdjacents(t,a.enTil("P2",t.id,i))}buddies(t){return a.target.toActions(d.crFriendNotMeActTarg("CARD",t,this.code,a.enTil("P1",t)))}}class Ue extends x{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Brightsteel Gargoyle",this.jr1=this.boof61016,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("RB"),this.text=`At the end of your turn, ${this.name} gets Armor ${this.boof2510} and Defender until the end of the next turn.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PT",this.code),e}ddf8(t){return t.trigger.type==="PT"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){const i=d.mod("AR",this.boof2510,t.creatId),e=d.mod("DF",!0,t.creatId);i.expiry="ET",e.expiry="ET";const s=a.field.jr5(t.creatId);s.addMod(i),s.addMod(e),a.batch.triggerDone()}}class We extends rt{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Bullwark Bash",this.text=`Deal damage equal to ${this.level>1?this.level+"x ":""}the Armor on a friendly creature to an enemy creature.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");i.hasArmor=!0,t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]);e.hurtDirect(s.armor*this.level,this.code),a.turn.spellCast()}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}getCardActions(t){const i=a.field.ddf6(t),e=this.enemyTargActions(i.id);return e.push(a.action.cancelAction()),e}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=t,s=a.field.jr5(i[1]);return d.ddp2(t,e.playerA,e.lane,{dmg:s.armor*this.level})}}}class ze extends x{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Byzerak Spitemage",this.jr1=this.boof369,this.jr2=this.level,this.initAggro=!0,this.tribe.push("HM"),this.hints=["ALN"],this.bonus={play:this.level*.5},this.text=`Allied Nekrium: When ${this.name} ${a.log.dbdtac(this.level)}, destroy it.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.creatureSrc&&i.creatureTarg&&i.dmg>0&&i.source.id===t.creatId&&a.target.levelTestCommon(i.target.level,this.level)}else return!1}jr8(t){if(t.trigger.type==="FR"&&a.turn.allied("N")){const i=a.field.jr5(t.creatId);i.jr4("DM",this.code),i.hints.push("BX"),i.changed=!0}else if(t.trigger.type==="DM"){const e=t.event.target;e.status==="A"&&a.death.destroy(e,this.code)}a.batch.triggerDone()}}class Ze extends x{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Cercee, Hand of Varna",this.jr1=this.lValN([1,3,5,7]),this.jr2=this.lValN([6,10,20,40]),this.tribe.push("FB"),this.initMobile=1,this.maxLevel=4,this.level===4?this.hints=["OL","LKV","BX"]:this.hints=["OP","BX"];const i=this.level===4?`When ${this.name} ${a.log.dbdtap()}, deal damamge to that player equal to their health. `:"";this.text=i+`When ${this.name} ${a.log.dbdtac(this.level)}, destroy that creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.battle&&i.creatureSrc&&i.source.id===t.creatId){if(this.level===4)return!0;if(i.creatureTarg){const e=i.target;return a.target.levelTestCommon(e.level,this.level)}}}return!1}jr8(t){const i=t.event;if(i.creatureTarg){const e=i.target;e.status==="A"&&a.death.destroy(e,this.code)}else{const e=a.player.toPlayer(i.target);a.player.ddf3(e,e.health,this.code)}a.batch.triggerDone()}}class Z extends x{lookup(t){return{["BSW"]:{c:()=>this.bswC(),a:(e,s)=>this.bswA(e,s),t:e=>this.bswT(e),e:(e,s)=>this.bswE(e,s)},["CCS"]:{c:()=>this.ccsC(),a:(e,s)=>this.ccsA(e,s),t:e=>this.ccsT(e),e:(e,s)=>this.ccsE(e,s)},["CGL"]:{c:()=>this.clordC(),a:(e,s)=>this.clordA(e,s),t:e=>this.clordT(e),e:(e,s)=>this.clordE(e,s)},["CSH"]:{c:()=>this.cswC(),a:(e,s)=>this.cswA(e,s),t:e=>this.cswT(e),e:(e,s)=>this.cswE(e,s)},["FFU"]:{c:()=>this.ffuC(),a:(e,s)=>this.ffuA(e,s),t:e=>this.ffuT(e),e:(e,s)=>this.ffuE(e,s)},["FFS"]:{c:()=>this.ffsC(),a:(e,s)=>this.ffsA(e,s),t:e=>this.ffsT(e),e:(e,s)=>this.ffsE(e,s)},["FSH"]:{c:()=>this.fssC(),a:(e,s)=>this.fssA(e,s),t:e=>this.fssT(e),e:(e,s)=>this.fssE(e,s)},["KOD"]:{c:()=>this.kodC(),a:(e,s)=>this.kodA(e,s),t:e=>this.kodT(e),e:(e,s)=>this.kodE(e,s)},["MBP"]:{c:()=>this.mbpC(),a:(e,s)=>this.mbpA(e,s),t:e=>this.mbpT(e),e:(e,s)=>this.mbpE(e,s)},["MND"]:{c:()=>this.mndC(),a:(e,s)=>this.mndA(e,s),t:e=>this.mndT(e),e:(e,s)=>this.mndE(e,s)},["NCS"]:{c:()=>this.ncsC(),a:(e,s)=>this.ncsA(e,s),t:e=>this.ncsT(e),e:(e,s)=>this.ncsE(e,s)},["NXG"]:{c:()=>this.nxgC(),a:(e,s)=>this.nxgA(e,s),t:e=>this.nxgT(e),e:(e,s)=>this.nxgE(e,s)},["NFF"]:{c:()=>this.nffC(),a:(e,s)=>this.nffA(e,s),t:e=>this.nffT(e),e:(e,s)=>this.nffE(e,s)},["OHV"]:{c:()=>this.orghC(),a:(e,s)=>this.orghA(e,s),t:e=>this.orghT(e),e:(e,s)=>this.orghE(e,s)},["PPM"]:{c:()=>this.ppmC(),a:(e,s)=>this.ppmA(e,s),t:e=>this.ppmT(e),e:(e,s)=>this.ppmE(e,s)},["PSC"]:{c:()=>this.pcoilC(),a:(e,s)=>this.pcoilA(e,s),t:e=>this.pcoilT(e),e:(e,s)=>this.pcoilE(e,s)},["SGF"]:{c:()=>this.siggyC(),a:(e,s)=>this.siggyA(e,s),t:e=>this.siggyT(e),e:(e,s)=>this.siggyE(e,s)},["SSA"]:{c:()=>this.ssaC(),a:(e,s)=>this.ssaA(e,s),t:e=>this.ssaT(e),e:(e,s)=>this.ssaE(e,s)},["SWM"]:{c:()=>this.swmC(),a:(e,s)=>this.swmA(e,s),t:e=>this.swmT(e),e:(e,s)=>this.swmE(e,s)},["UCM"]:{c:()=>this.ucmC(),a:(e,s)=>this.ucmA(e,s),t:e=>this.ucmT(e),e:(e,s)=>this.ucmE(e,s)},["UIM"]:{c:()=>this.uimC(),a:(e,s)=>this.uimA(e,s),t:e=>this.uimT(e),e:(e,s)=>this.uimE(e,s)},["WMR"]:{c:()=>this.warmC(),a:(e,s)=>this.warmA(e,s),t:e=>this.warmT(e),e:(e,s)=>this.warmE(e,s)},["WWR"]:{c:()=>this.wwrC(),a:(e,s)=>this.wwrA(e,s),t:e=>this.wwrT(e),e:(e,s)=>this.wwrE(e,s)},["WFS"]:{c:()=>this.wfsC(),a:(e,s)=>this.wfsA(e,s),t:e=>this.wfsT(e),e:(e,s)=>this.wfsE(e,s)},["XSH"]:{c:()=>this.shambC(),a:(e,s)=>this.shambA(e,s),t:e=>this.shambT(e),e:(e,s)=>this.shambE(e,s)},["ZPM"]:{c:()=>this.zpmC(),a:(e,s)=>this.zpmA(e,s),t:e=>this.zpmT(e),e:(e,s)=>this.zpmE(e,s)}}[t]}targAction(t,i,e){this.lookup(t).a(i,e)}actTargets(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.doubleActivator()&&(e.jr4("TS",this.code),this.addExtraActivate(e)),e}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t,e=a.field.jr5(t.param);return this.lookup(this.cardCode()).e(i,e)}}canActivate(t){return a.target.toActions(this.actTargets(this.cardCode(),t)).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.targAction(this.cardCode(),i,e),e.endActivation(),this.doubleActivator()&&e.hasMod(e.id)&&(e.removeMod(e.id),e.activationAvailable=!0,a.phase.whatNext())}makeCreatTarg(t){return d.crActTarg("CARD",this.code,t.id)}makeOtherCreatTarg(t){const i=this.makeCreatTarg(t);return i.notMe=t.id,i}doubleActivator(){return this.code==="CGL"+"3"||this.code==="XSH"+"3"}addExtraActivate(t){const i=d.mod("EA",!0,t.id);i.expiry="ET",t.addMod(i)}ddf8(t){return pt.extractCardCode(t.trigger.logicCode)==="KOD"&&(t.trigger.type==="PT"||t.trigger.type==="VN")?!0:t.trigger.type==="TS"&&this.doubleActivator()?t.event.playerA===t.ownerPlayerA:super.ddf8(t)}jr8(t){if(t.trigger.type==="VN"){const i=t.event;a.field.birthCreature(i.creature.code,"S",t.ownerPlayerA),a.batch.triggerDone()}else if(t.trigger.type==="PT"){const i=t.trigger.customCode,e=a.field.jr5(t.creatId);e.triggers.filter(l=>l.customCode===i).forEach(l=>e.removeTrigger(l)),a.batch.triggerDone()}else if(t.trigger.type==="TS"){const i=a.field.jr5(t.creatId);this.addExtraActivate(i),a.batch.triggerDone()}}getCardActions(t,i){const e=i??a.field.jr5(t.param);return a.target.toActions([this.actTargets(this.cardCode(),e),a.target.buttonTarget("CANC")])}bswC(){this.faction="T",this.rarity="C",this.name="Borean Stormweaver",this.jr1=this.boof4816,this.jr2=this.lValN([6,10,20]),this.tribe.push("GT");const t=this.boof234;this.text=`Activate: Deal ${t} damage to a creature.`}bswT(t){return this.makeCreatTarg(t)}bswA(t,i){t.hurtDirect(this.boof234,this.code)}bswE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof234})}ccsC(){this.faction="N",this.rarity="C",this.name="Catacomb Spider",this.jr1=this.boof4815,this.jr2=this.lValN([5,10,16]),this.tribe.push("SP");const t=this.boof246;this.text=`Activate: Give another creature Regenerate ${t}.`}ccsT(t){const i=this.makeOtherCreatTarg(t);return i.canRegen=!0,i}ccsA(t,i){t.addRegen(this.boof246)}ccsE(t,i){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof246})}clordC(){this.faction="N",this.rarity="H",this.name="Contagion Lord",this.jr1=this.boof4914,this.jr2=this.jr1+3,this.tribe.push("AB"),this.text="Activate, destroy a friendly Abomination: You may play an additional card this turn.",this.level===3&&(this.text+=" You may use this ability twice per turn.")}clordT(t){const i=this.makeCreatTarg(t);return i.player="F",i.tribe="AB",i}clordA(t,i){a.death.destroy(t,this.code),a.state.gs.turn.regularPlays+=1}clordE(t,i){const e=d.ddp7(t,t.playerA,t.lane,"SD");return e.bonus=this.ddp6(this.level),e}cswC(){this.faction="A",this.rarity="C",this.name="Cypien Shieldwarden",this.jr1=this.boof4610,this.jr2=this.boof61016,this.tribe.push("HM");const t=this.boof246;this.text=`Activate: Give a creature Armor ${t} this turn.`}cswT(t){const i=this.makeCreatTarg(t);return i.canArmor=!0,i}cswA(t,i){const e=d.mod("AR",this.boof246,i.id);e.expiry="ET",t.addMod(e)}cswE(t,i){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof246})}ffuC(){this.faction="T",this.rarity="H",this.name="Firefist Uranti",this.jr1=this.boof357,this.jr2=this.boof71116,this.tribe.push("FR","YT"),this.text=`Activate: Deal damage equal to ${this.name}'s attack to a creature.`}ffuT(t){return this.makeCreatTarg(t)}ffuA(t,i){t.hurtDirect(i.attack,this.code)}ffuE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:i.attack})}ffsC(){this.faction="T",this.rarity="R",this.name="Flamefury Shaman",this.jr1=this.boof369,this.jr2=this.boof81116,this.tribe.push("HM"),this.text=`Activate: Grant another creature ${a.log.jr9(this.jr1,0)} this turn.`}ffsT(t){return this.makeOtherCreatTarg(t)}ffsA(t,i){const e=d.mod("AT",this.jr1,i.id);e.expiry="ET",t.addMod(e)}ffsE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1)}fssC(){this.faction="T",this.rarity="R",this.name="Flamestoke Shaman",this.jr1=this.boof61218,this.jr2=this.boof3712,this.tribe.push("HM"),this.text=`Activate: Grant an adjacent ${a.log.levelGateText(this.level,!0)}creature Aggressive.`}fssT(t){const i=this.makeCreatTarg(t);return i.level=a.target.ddf2(this.level),i.lanes=t.adjacent,i.player=a.player.toTarget(t.owner),i}fssA(t,i){t.aggressive=!0}fssE(t,i){return d.ddp2(t,t.playerA,t.lane,{agr:!0})}kodC(){this.faction="N",this.rarity="L",this.name="Keeper of the Damned",this.jr1=this.boof5815,this.jr2=this.boof61017,this.tribe.push("ZB"),this.text=`Activate: another friendly ${a.log.levelGateText(this.level,!0)}creature gets "Vengeance: Spawn this" this turn.`}kodT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i.player=a.player.toTarget(t.owner),i}kodA(t,i){const e=t.jr4("VN",this.code);e.customCode=i.id,e.changes=!0;const s=t.jr4("PT",this.code);s.customCode=i.id}kodE(t,i){const e=d.ddp2(t,t.playerA,t.lane,void 0,"LZ");return e.bonus=2,e}mbpC(){this.faction="U",this.rarity="H",this.name="Mossbeard Patriarch",this.jr1=this.boof137,this.jr2=this.boof81220,this.tribe.push("PL"),this.text=`Activate: Give another creature ${a.log.jr9(0,this.boof468)}.`}mbpT(t){return this.makeOtherCreatTarg(t)}mbpA(t,i){t.buff(0,this.boof468)}mbpE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof468)}mndC(){this.faction="A",this.rarity="R",this.name="Munitions Drone",this.jr1=this.boof137,this.jr2=this.boof6814,this.tribe.push("RB"),this.text=`Activate: Give another creature ${a.log.jr9(this.boof357,0)}.`}mndT(t){return this.makeOtherCreatTarg(t)}mndA(t,i){t.buff(this.boof357,0)}mndE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof357)}ncsC(){this.faction="N",this.rarity="R",this.name="Necroslime",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("OZ");const t=this.boof248;this.text=`Activate, deal 3 damage to another friendly creature: ${this.name} gets ${a.log.jr9(t,t)}.`}ncsT(t){const i=this.makeOtherCreatTarg(t);return i.player="F",i}ncsA(t,i){const e=this.boof248;t.hurtDirect(3,this.code),i.buff(e,e)}ncsE(t,i){const e=this.boof248,s=d.actionEvalBuffC(t,i,e,e);return s.vectors.push(d.ddp1(t.playerA,t.lane,{dmg:3})),s}nxgC(){this.faction="A",this.rarity="H",this.name="Nexus Gunner",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("HM"),this.text=`Activate: Give a creature ${a.log.jr9(this.jr1,0)}. Use this ability only if ${this.name} is in the center lane.`}nxgT(t){const i=this.makeCreatTarg(t);return t.lane!==3&&(i.cardCode="???"),i}nxgA(t,i){t.buff(this.jr1,0)}nxgE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1,0)}nffC(){this.faction="U",this.rarity="L",this.name="Nuada, Faith's Flourish",this.jr1=this.boof246,this.jr2=this.lValN([10,17,25]),this.initDefend=!0,this.tribe.push("TK");const t=this.boof91421;this.text=`Activate: Give a friendly Plant with a ${t}/${t} Treefolk.`}nffT(t){const i=this.makeCreatTarg(t);return i.player="F",i.tribe="PL",i}nffA(t,i){a.field.birthCreature(`${"TFF"}${this.level}`,"R",i.owner,t.lane)}nffE(t,i){const e=d.ddp4(t,t.playerA,t.lane,`${"TFF"}${this.level}`);return e.hints=["RE"],e}orghC(){this.faction="N",this.rarity="R",this.name="Organ Harvester",this.jr1=this.lValN([2,6,9]),this.jr2=this.jr1+1,this.tribe.push("AB"),this.text=`Activate, destroy ${this.name}: Destroy a ${a.log.levelGateText(this.level,!0)}creature.`}orghT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i}orghA(t,i){const e=Date.now();a.death.destroy(t,this.code,e),a.death.destroy(i,this.code,e)}orghE(t,i){const e=d.ddp7(t,t.playerA,t.lane),s=d.ddp1(i.owner,i.lane);return s.destroy=!0,e.vectors.push(s),e}ppmC(){this.faction="A",this.rarity="R",this.name="Palladium Pulsemage",this.jr1=this.lValN([2,8,12]),this.jr2=this.lValN([7,12,15]),this.tribe.push("HM"),this.text=`Activate: give a creature ${a.log.jr9(this.boof4812n,0)} this turn.`}ppmT(t){return this.makeCreatTarg(t)}ppmA(t,i){const e=d.mod("AT",this.boof4812n,i.id);e.expiry="ET",t.addMod(e)}ppmE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof4812n)}pcoilC(){this.faction="U",this.rarity="R",this.name="Poisoncoil",this.jr1=this.boof357,this.jr2=this.boof71013,this.initDefend=!0,this.tribe.push("SN"),this.text=`Activate: Give another creature Poison ${this.boof135}.`}pcoilT(t){return this.makeOtherCreatTarg(t)}pcoilA(t,i){t.addPoison(this.boof135)}pcoilE(t,i){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof135})}siggyC(){this.faction="N",this.rarity="H",this.name="Sigmund Fraud",this.jr1=this.boof357,this.jr2=this.lValN([9,14,19]),this.initDefend=!0,this.tribe.push("AB");const t=this.boof4812;this.text=`Activate, destroy another friendly creature: Deal ${t} damage to the enemy player and you gain ${t} health.`}siggyT(t){const i=this.makeOtherCreatTarg(t);return i.player="F",i}siggyA(t,i){a.death.destroy(t,this.code);const e=this.boof4812;a.player.ddf3(!i.owner,e,this.code),a.player.healPlayer(i.owner,e)}siggyE(t,i){const e=d.ddp7(t,t.playerA,t.lane,"SD"),s=this.boof4812;return e.vectors.push(d.evalVectorPlayerDmg(!i.owner,s),d.evalVectorPlayerLife(i.owner,s)),e}ssaC(){this.faction="N",this.rarity="H",this.name="Spitesower Acolyte",this.jr1=this.boof234,this.jr2=this.lValN([8,14,22]),this.tribe.push("HM");const t=this.boof246n;this.text=`Activate, deal ${-t} damage to ${this.name}: Give a creature ${a.log.jr9(t,t)}.`}ssaT(t){return this.makeCreatTarg(t)}ssaA(t,i){const e=this.boof246n,s=Date.now();i.hurtDirect(-e,this.code,s),t.buff(e,e,s)}ssaE(t,i){const e=this.boof246n,s=d.actionEvalBuffN(t,t.playerA,t.lane,e,e);return s.vectors.push(d.ddp1(i.owner,i.lane,{dmg:-e})),s}swmC(){this.faction="A",this.rarity="R",this.name="Steelwelder Medic",this.jr1=this.lValN([3,5,13]),this.jr2=this.boof61014,this.tribe.push("HM"),this.text=`Activate: Give another creature Armor ${this.level}.`}swmT(t){const i=this.makeOtherCreatTarg(t);return i.canArmor=!0,i}swmA(t,i){t.addArmor(this.level)}swmE(t,i){return d.ddp2(t,t.playerA,t.lane,{arm:this.level})}ucmC(){this.faction="T",this.rarity="R",this.name="Uranti Cryomancer",this.jr1=this.boof247,this.jr2=this.lValN([8,13,17]),this.tribe.push("IC","YT"),this.text=`Activate: Deal ${this.boof135} damage to a creature.`}ucmT(t){return this.makeCreatTarg(t)}ucmA(t,i){t.hurtDirect(this.boof135,this.code)}ucmE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof135})}uimC(){this.faction="T",this.rarity="C",this.name="Uranti Icemage",this.jr1=this.lValN([2,5,9]),this.jr2=this.lValN([8,13,20]),this.tribe.push("IC","YT"),this.text="Activate: Negate Defender this turn."}uimT(t){return this.makeCreatTarg(t)}uimA(t,i){const e=d.mod("ND",!0,i.id);e.expiry="ET",t.addMod(e)}uimE(t,i){return d.ddp2(t,t.playerA,t.lane,{noD:!0})}warmC(){this.faction="A",this.rarity="H",this.name="War Merchant",this.jr1=this.boof468,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("HM"),this.text=`Activate: Give a creature in a center lane ${a.log.jr9(this.jr1,this.level===3?this.jr1:0)}.`}warmT(t){const i=this.makeCreatTarg(t);return i.lanes=3,i}warmA(t,i){t.buff(this.jr1,this.level===3?this.jr1:0)}warmE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1,this.level===3?this.jr1:0)}wwrC(){this.faction="U",this.rarity="C",this.name="Weirwood Ranger",this.jr1=this.boof51015,this.jr2=this.jr1-1,this.tribe.push("HM"),this.text=`Activate: Give another creature ${a.log.jr9(this.level,this.level)}.`}wwrT(t){return this.makeOtherCreatTarg(t)}wwrA(t,i){t.buff(this.level,this.level)}wwrE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level)}wfsC(){this.faction="N",this.rarity="H",this.name="Witherfrost Succubus",this.jr1=this.boof147,this.jr2=this.boof61018,this.tribe.push("DM");const t=-this.boof357;this.text=`Activate: Give a creature ${a.log.jr9(t,t)} this turn.`}wfsT(t){return this.makeCreatTarg(t)}wfsA(t,i){const e=-this.boof357,s=d.mod("AT",e,i.id);s.expiry="ET",t.addMod(s);const l=d.mod("HL",e,i.id);l.expiry="ET",t.addMod(l);const u=d.mod("MH",e,i.id);u.expiry="ET",t.addMod(u)}wfsE(t,i){const e=-this.boof357;return d.actionEvalBuffN(t,t.playerA,t.lane,e,e)}shambC(){this.faction="N",this.rarity="L",this.name="Xithian Shambler",this.jr1=this.boof369,this.jr2=this.jr1+1,this.tribe.push("AB");let t="",i=1;this.level===3&&(t=" You may use this ability twice per turn.",i=2),this.text=`Activate, destroy an adjacent creature: ${this.name} moves into that creature's lane, then gets +attack and +health equal to that creature's attack and health.${t}`,this.hints=["LJ"];const e=this.avgCreatureStats();this.bonus={exist:this.ddp9(-1,e[0]+e[1],e[0],0)*i}}shambT(t){const i=d.crFriendActTarg("CARD",this.code,t.id);return i.lanes=t.adjacent,i}shambA(t,i){const e=t.attack,s=t.health;a.death.destroy(t,this.code),i.move(t.lane),i.buff(e,s)}shambE(t,i){const e=a.field.ddf6(t),s=d.actionEvalBuffC(t,i,e.attack,e.health),l=d.ddp1(e.owner,e.lane);l.destroy=!0;const u=d.ddp1(i.owner,i.lane);return u.moveTo=t.lane,s.vectors.push(l,u),s}zpmC(){this.faction="T",this.rarity="R",this.name="Zephyr Mage",this.jr1=this.boof4813,this.jr2=this.boof61017,this.tribe.push("WN","AS"),this.text=`Activate: Give another ${a.log.levelGateText(this.level,!0)}creature Mobility ${this.level}.`}zpmT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i.canMove=!0,i}zpmA(t,i){t.addMobility(this.level)}zpmE(t,i){const e=d.ddp2(t,t.playerA,t.lane);return e.bonus=.5,e}}class Q extends x{lookup(t){return{["AGC"]:{c:()=>this.aconC(),f:(e,s)=>this.aconF(e,s),e:e=>this.aconE(e)},["BSR"]:{c:()=>this.bsrC(),f:(e,s)=>this.bsrF(e,s),e:e=>this.bsrE(e)},["BAW"]:{c:()=>this.bawC(),f:(e,s)=>this.bawF(e,s),e:e=>this.bawE(e)},["CHA"]:{c:()=>this.chaC(),f:(e,s)=>this.chaF(e,s),e:e=>this.chaE(e)},["CCR"]:{c:()=>this.ccC(),f:(e,s)=>this.ccF(e,s),e:e=>this.ccE(e)},["FRI"]:{c:()=>this.friC(),f:(e,s)=>this.friF(e,s),e:e=>this.friE(e)},["FRV"]:{c:()=>this.freavC(),f:(e,s)=>this.freavF(e,s),e:e=>this.freavE(e)},["GLF"]:{c:()=>this.gfiendC(),f:(e,s)=>this.gfiendF(e,s),e:e=>this.gfiendE(e)},["GRW"]:{c:()=>this.grwC(),f:(e,s)=>this.grwF(e,s),e:e=>this.grwE(e)},["GHT"]:{c:()=>this.grhC(),f:(e,s)=>this.grhF(e,s),e:e=>this.grhE(e)},["MMH"]:{c:()=>this.houndC(),f:(e,s)=>this.houndF(e,s),e:e=>this.houndE(e)},["MXW"]:{c:()=>this.mtxC(),f:(e,s)=>this.mtxF(e,s),e:e=>this.mtxE(e)},["NGB"]:{c:()=>this.ngbC(),f:(e,s)=>this.ngbF(e,s),e:e=>this.ngbE(e)},["PHS"]:{c:()=>this.phxsC(),f:(e,s)=>this.phxsF(e,s),e:e=>this.phxsE(e)},["STD"]:{c:()=>this.stdC(),f:(e,s)=>this.stdF(e,s),e:e=>this.stdE(e)},["SEV"]:{c:()=>this.surzC(),f:(e,s)=>this.surzF(e,s),e:e=>this.surzE(e)},["VNF"]:{c:()=>this.vnfC(),f:(e,s)=>this.vnfF(e,s),e:e=>this.vnfE(e)},["WBY"]:{c:()=>this.wbyC(),f:(e,s)=>this.wbyF(e,s),e:e=>this.wbyE(e)},["WBU"]:{c:()=>this.wbuC(),f:(e,s)=>this.wbuF(e,s),e:e=>this.wbuE(e)},["XDH"]:{c:()=>this.dogsC(),f:(e,s)=>this.dogsF(e,s),e:e=>this.dogsE(e)}}[t]}targAction(t,i,e){this.lookup(t).f(i,e)}targEval(t,i){return this.lookup(t).e(i)}playTarg;optional=!1;notme=!1;ftext="";forges=!0;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c(),this.forges&&(this.text="Forge: "+this.ftext),this.ftext=""}jr3(t,i){const e=super.jr3(t,i);if(this.forges){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.targAction(this.cardCode(),i,e),a.action.actionDone(!0)}jr8(t){this.notme&&(this.playTarg.notMe=t.creatId);const i=a.target.toActions(this.playTarg);i.length>0?(i.forEach(e=>{e.param=t.creatId}),this.optional&&i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}ddf7(t){return this.targEval(this.cardCode(),t)}aconC(){this.faction="A",this.rarity="C",this.name="Aegis Conscript",this.jr1=this.boof3612,this.jr2=this.boof6915,this.tribe.push("HM"),this.hints=["FRO"],this.bonus={play:this.ddp9(0,this.boof248,0,0)},this.playTarg.canArmor=!0,this.playTarg.player="F",this.ftext=`Give a friendly creature Armor ${this.boof124}.`}aconF(t,i){t.addArmor(this.boof124)}aconE(t){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof124})}bsrC(){if(this.faction="N",this.rarity="R",this.name="Bonescythe Reaver",this.jr1=this.boof5813,this.jr2=this.boof3712,this.tribe.push("AB"),this.hints=["ENS"],this.bonus={play:this.ddp6()},this.forges=this.level>1,this.forges){const t=this.level-1;this.hints=["ENS"],this.bonus={play:this.ddp6(t)},this.playTarg.level=a.target.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${a.log.levelGateText(t)} enemy creature.`,this.optional=!0}else this.hints=["LV"]}bsrF(t,i){a.death.destroy(t,this.code)}bsrE(t){return d.ddp7(t,t.playerA,t.lane)}bawC(){this.faction="U",this.rarity="R",this.name="Brambleaxe Warrior",this.jr1=this.boof61014,this.jr2=this.jr1-4,this.tribe.push("HM"),this.hints=["FRO"];const t=this.avgCreatureStats()[0];this.bonus={play:this.ddp9(0,0,t,t)},this.ftext="Give a creature Breakthrough this turn."}bawF(t,i){const e=d.mod("BT",!0,i.id);e.expiry="ET",t.addMod(e)}bawE(t){return d.ddp2(t,t.playerA,t.lane,{brt:!0})}chaC(){this.faction="U",this.rarity="R",this.name="Chistlehearth Archer",this.jr1=this.boof2510,this.jr2=this.jr1+7,this.tribe.push("HM"),this.hints=["ENS"];const t=this.boof4816;this.bonus={play:this.ddp9(0,t/2,0,0)},this.playTarg.player="E",this.playTarg.hasMobility=!0,this.ftext=`Deal ${t} damage to an enemy creature with Mobility. Negate Mobility from that creature.`}chaF(t,i){t.hurtDirect(this.boof4816,this.code),t.negateMobility=!0}chaE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof4816})}ccC(){this.faction="N",this.rarity="C",this.name="Corpse Crawler",this.jr1=this.boof81220,this.jr2=this.jr1+1,this.tribe.push("AB"),this.hints=["SD"],this.playTarg.player="F",this.ftext="Destroy a friendly creature."}ccF(t,i){a.death.destroy(t,this.code)}ccE(t){return d.ddp7(t,t.playerA,t.lane,"SD")}friC(){this.faction="T",this.rarity="C",this.name="Flamerift Instigator",this.jr1=this.lValN([7,12,17]),this.jr2=this.jr1-5,this.tribe.push("GT"),this.ftext="Negate Defender from a creature."}friF(t,i){t.negateDefender=!0}friE(t){return d.ddp2(t,t.playerA,t.lane,{noD:!0})}freavC(){if(this.faction="N",this.rarity="R",this.name="Fleshreaver",this.jr1=this.boof6915,this.jr2=this.boof235,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.hints=["ENS"],this.bonus={play:this.ddp6(t)},this.consistent=!0,this.playTarg.level=a.target.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${a.log.levelGateText(t)} enemy creature.`,this.optional=!0}else this.hints=["LV"]}freavF(t,i){a.death.destroy(t,this.code)}freavE(t){return d.ddp7(t,t.playerA,t.lane)}get fiendBof(){return this.lValN([-1,-2,-5])}gfiendC(){this.faction="N",this.rarity="C",this.name="Gloomfiend",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("AB"),this.hints=["ENS"],this.playTarg.player="E";const t=this.fiendBof;this.ftext=`You may give an enemy creature ${a.log.jr9(t,t)}.`,this.optional=!0,this.bonus={play:this.ddp9(0,-2*t,-t,0)}}gfiendF(t,i){const e=this.fiendBof;t.buff(e,e)}gfiendE(t){const i=this.fiendBof;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}grwC(){this.faction="N",this.rarity="C",this.name="Gloomreaper Witch",this.jr1=this.boof5915,this.jr2=this.jr1,this.tribe.push("HM"),this.hints=["ENS"],this.bonus={play:this.ddp6()/4};const t=this.boof147;this.playTarg.maxAttack=t,this.playTarg.player="E",this.ftext=`You may destroy an enemy creature with ${t} or less attack.`,this.optional=!0}grwF(t,i){a.death.destroy(t,this.code)}grwE(t){return d.ddp7(t,t.playerA,t.lane)}grhC(){this.faction="U",this.rarity="C",this.name="Grove Huntress",this.jr1=this.boof4711,this.jr2=this.jr1-1,this.tribe.push("HM"),this.playTarg.player="F";const t=this.boof135;this.ftext=`Give a friendly creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}grhF(t,i){const e=this.boof135;t.buff(e,e)}grhE(t){const i=this.boof135;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}houndC(){this.faction="T",this.rarity="C",this.name="Magma Hound",this.jr1=this.boof4813,this.jr2=this.jr1-1,this.tribe.push("ER","EL"),this.hints=["ENS"];const t=this.boof246;this.optional=!0,this.playTarg.player="E",this.ftext=`You may deal ${t} damage to an enemy creature.`,this.bonus={play:this.ddp9(0,t,0,0)}}houndF(t,i){t.hurtDirect(this.boof246,this.code)}houndE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof246})}mtxC(){this.faction="A",this.rarity="C",this.name="Matrix Warden",this.jr1=this.lValN([3,8,12]),this.jr2=this.jr1,this.tribe.push("RB");const t=this.boof3510;this.playTarg.player="F",this.ftext=`Give a friendly creature ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}mtxF(t,i){t.buff(this.boof3510,0)}mtxE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof3510)}ngbC(){this.faction="T",this.rarity="C",this.name="Nargath Bruiser",this.jr1=this.boof5814,this.jr2=this.jr1-1,this.tribe.push("ER","AS");const t=this.boof248;this.playTarg.player="F",this.ftext=`Give a friendly creature ${a.log.jr9(0,t)}.`,this.bonus={play:this.ddp9(0,t,0,0)}}ngbF(t,i){t.buff(0,this.boof248)}ngbE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof248)}phxsC(){this.faction="A",this.rarity="R",this.name="Phalanx Squadron",this.jr1=this.boof3714,this.jr2=this.boof61117,this.tribe.push("HM"),this.hints=["FRO"],this.playTarg.hasArmor=!0,this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature with Armor ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t,t/2,0)}}phxsF(t,i){const e=this.boof234;t.buff(e,e)}phxsE(t){const i=this.boof234;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}stdC(){this.faction="A",this.rarity="H",this.name="Shardthief Druid",this.jr1=this.boof5813,this.jr2=this.boof81318,this.tribe.push("MM"),this.hints=["ENS"],this.playTarg.canRegen,this.playTarg.player="E",this.ftext=`Negate and remove all Regenerate from an enemy creature. ${this.name} gets that much Renerate.`,this.bonus={play:this.ddp9(0,2,0,0)}}stdF(t,i){const e=t.regen;t.negateRegen=!0,i.addRegen(e)}stdE(t){const i=a.field.ddf6(t);return d.ddp3(t,i,{rgn:-i.regen})}surzC(){this.faction="N",this.rarity="L",this.name="Suruzal, Emissary of Varna",this.jr1=this.boof4814,this.jr2=this.jr1-1,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="F",this.playTarg.level=a.target.ddf2(this.level),this.ftext=`You may destroy another friendly ${a.log.levelGateText(this.level,!0)}creature. If you do, spawn a copy of it.`}surzF(t,i){const e=Date.now();a.death.destroy(t,this.code,e),a.field.birthCreature(t.code,"S",i.owner,void 0,e)}surzE(t){const i=a.field.ddf6(t),e=a.cards.getCard(i.code),s=e.jr3(t.playerA,t.lane),l=d.ddp7(t,t.playerA,t.lane);return l.bonus=kt.creatValueFormula(s)+1+e.bonusExist(),l}vnfC(){this.faction="U",this.rarity="R",this.name="Venomfang",this.jr1=this.boof61014,this.jr2=this.jr1-2,this.tribe.push("SN");const t=this.boof246;this.playTarg.player="E",this.ftext=`Give an enemy creature Poison ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}vnfF(t,i){t.addPoison(this.boof246)}vnfE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof246})}wbyC(){this.faction="T",this.rarity="R",this.name="Wallbreaker Yeti",this.jr1=this.boof4712,this.jr2=this.boof71116,this.tribe.push("ER","YT"),this.hints=["ENS"],this.bonus={play:this.ddp6()/4},this.playTarg.player="E",this.playTarg.level=a.target.ddf2(this.level),this.playTarg.hasDefender=!0,this.ftext=`You may destroy a ${a.log.levelGateText(this.level,!0)}enemy creature with Defender.`,this.optional=!0}wbyF(t,i){a.death.destroy(t,this.code)}wbyE(t){return d.ddp7(t,t.playerA,t.lane)}wbuC(){this.faction="T",this.rarity="C",this.name="Warbringer Uranti",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("LT","YT"),this.hints=["FRO"];const t=this.boof4812;this.notme=!0,this.playTarg.player="F",this.ftext=`Give another friendly creature ${a.log.jr9(t,0)} this turn.`,this.bonus={play:this.ddp9(0,t,t,0)}}wbuF(t,i){const e=d.mod("AT",this.boof4812,i.id);e.expiry="ET",t.addMod(e)}wbuE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof4812)}dogsC(){this.faction="N",this.rarity="R",this.name="Xithian Direhound",this.jr1=4,this.jr2=4,this.tribe.push("AB"),this.hints=["ENS"],this.overload=!0,this.maxLevel=1,this.optional=!0,this.playTarg.player="E",this.ftext=`You may give an enemy creature ${a.log.jr9(-4,-4)}.`,this.bonus={play:this.ddp9(0,8,4,0)}}dogsF(t,i){t.buff(-4,-4)}dogsE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-4,-4)}}class F extends rt{lookup(t){return{["ASG"]:{c:()=>this.asurgeC(),z:e=>this.asurgeZ(e),e:e=>this.asurgeE(e)},["AQE"]:{c:()=>this.aqatC(),z:e=>this.aqatZ(e),e:e=>this.aqatE(e)},["ABL"]:{c:()=>this.ablC(),z:e=>this.ablZ(e),e:e=>this.ablE(e)},["BTM"]:{c:()=>this.botC(),z:e=>this.botZ(e),e:e=>this.botE(e)},["CSU"]:{c:()=>this.csurgeC(),z:e=>this.csurgeZ(e),e:e=>this.csurgeE(e)},["CTW"]:{c:()=>this.cullC(),z:e=>this.cullZ(e),e:e=>this.cullE(e)},["CTV"]:{c:()=>this.cultC(),z:e=>this.cultZ(e),e:e=>this.cultE(e)},["CAG"]:{c:()=>this.cypaC(),z:e=>this.cypaZ(e),e:e=>this.cypaE(e)},["CBS"]:{c:()=>this.cypbC(),z:e=>this.cypbZ(e),e:e=>this.cypbE(e)},["DBT"]:{c:()=>this.dreadC(),z:e=>this.dreadZ(e),e:e=>this.dreadE(e)},["DYB"]:{c:()=>this.drybC(),z:e=>this.drybZ(e),e:e=>this.drybE(e)},["ETN"]:{c:()=>this.elnC(),z:e=>this.elnZ(e),e:e=>this.elnE(e)},["ENP"]:{c:()=>this.enpC(),z:e=>this.enpZ(e),e:e=>this.enpE(e)},["ENR"]:{c:()=>this.rageC(),z:e=>this.rageZ(e),e:e=>this.rageE(e)},["EXD"]:{c:()=>this.expdmC(),z:e=>this.expdmZ(e),e:e=>this.expdmE(e)},["FIN"]:{c:()=>this.feralC(),z:e=>this.feralZ(e),e:e=>this.feralE(e)},["FVA"]:{c:()=>this.fervassC(),z:e=>this.fervassZ(e),e:e=>this.fervassE(e)},["FLN"]:{c:()=>this.flncC(),z:e=>this.flncZ(e),e:e=>this.flncE(e)},["FFL"]:{c:()=>this.ffldC(),z:e=>this.ffldZ(e),e:e=>this.ffldE(e)},["FZS"]:{c:()=>this.frozC(),z:e=>this.frozZ(e),e:e=>this.frozE(e)},["GTH"]:{c:()=>this.ghastC(),z:e=>this.ghastZ(e),e:e=>this.ghastE(e)},["GCR"]:{c:()=>this.crushC(),z:e=>this.crushZ(e),e:e=>this.crushE(e)},["HAR"]:{c:()=>this.hartC(),z:e=>this.hartZ(e),e:e=>this.hartE(e)},["IFR"]:{c:()=>this.izftC(),z:e=>this.izftZ(e),e:e=>this.izftE(e)},["JPK"]:{c:()=>this.jpC(),z:e=>this.jpZ(e),e:e=>this.jpE(e)},["LBR"]:{c:()=>this.lbrandC(),z:e=>this.lbrandZ(e),e:e=>this.lbrandE(e)},["LYS"]:{c:()=>this.shartC(),z:e=>this.shartZ(e),e:e=>this.shartE(e)},["MPH"]:{c:()=>this.morphC(),z:e=>this.morphZ(e),e:e=>this.morphE(e)},["MSC"]:{c:()=>this.sculptC(),z:e=>this.sculptZ(e),e:e=>this.sculptE(e)},["NNS"]:{c:()=>this.nanoC(),z:e=>this.nanoZ(e),e:e=>this.nanoE(e)},["NSL"]:{c:()=>this.natselC(),z:e=>this.natselZ(e),e:e=>this.natselE(e)},["NCV"]:{c:()=>this.nviveC(),z:e=>this.nviveZ(e),e:e=>this.nviveE(e)},["OEX"]:{c:()=>this.oexpC(),z:e=>this.oexpZ(e),e:e=>this.oexpE(e)},["PTR"]:{c:()=>this.pwtorC(),z:e=>this.pwtorZ(e),e:e=>this.pwtorE(e)},["PSG"]:{c:()=>this.psurgeC(),z:e=>this.psurgeZ(e),e:e=>this.psurgeE(e)},["PMS"]:{c:()=>this.pslamC(),z:e=>this.pslamZ(e),e:e=>this.pslamE(e)},["ROG"]:{c:()=>this.rotgC(),z:e=>this.rotgZ(e),e:e=>this.rotgE(e)},["SAP"]:{c:()=>this.sapC(),z:e=>this.sapZ(e),e:e=>this.sapE(e)},["SVO"]:{c:()=>this.soathC(),z:e=>this.soathZ(e),e:e=>this.soathE(e)},["SOA"]:{c:()=>this.soaC(),z:e=>this.soaZ(e),e:e=>this.soaE(e)},["SOD"]:{c:()=>this.sodC(),z:e=>this.sodZ(e),e:e=>this.sodE(e)},["SOT"]:{c:()=>this.sotC(),z:e=>this.sotZ(e),e:e=>this.sotE(e)},["SHG"]:{c:()=>this.shgrC(),z:e=>this.shgrZ(e),e:e=>this.shgrE(e)},["SNB"]:{c:()=>this.snbC(),z:e=>this.snbZ(e),e:e=>this.snbE(e)},["SHV"]:{c:()=>this.sharvC(),z:e=>this.sharvZ(e),e:e=>this.sharvE(e)},["STR"]:{c:()=>this.sttorC(),z:e=>this.sttorZ(e),e:e=>this.sttorE(e)},["STO"]:{c:()=>this.sptorC(),z:e=>this.sptorZ(e),e:e=>this.sptorE(e)},["STN"]:{c:()=>this.stbrnC(),z:e=>this.stbrnZ(e),e:e=>this.stbrnE(e)},["SIN"]:{c:()=>this.sinC(),z:e=>this.sinZ(e),e:e=>this.sinE(e)},["TGL"]:{c:()=>this.tanglC(),z:e=>this.tanglZ(e),e:e=>this.tanglE(e)},["TPT"]:{c:()=>this.tpactC(),z:e=>this.tpactZ(e),e:e=>this.tpactE(e)},["TUP"]:{c:()=>this.tugC(),z:e=>this.tugZ(e),e:e=>this.tugE(e)},["TOB"]:{c:()=>this.blightC(),z:e=>this.blightZ(e),e:e=>this.blightE(e)},["TXS"]:{c:()=>this.sporeC(),z:e=>this.sporeZ(e),e:e=>this.sporeE(e)},["TCG"]:{c:()=>this.tremcC(),z:e=>this.tremcZ(e),e:e=>this.tremcE(e)},["VGR"]:{c:()=>this.vgraC(),z:e=>this.vgraZ(e),e:e=>this.vgraE(e)},["VYE"]:{c:()=>this.vembC(),z:e=>this.vembZ(e),e:e=>this.vembE(e)},["UBL"]:{c:()=>this.uboltC(),z:e=>this.uboltZ(e),e:e=>this.uboltE(e)},["WMM"]:{c:()=>this.warC(),z:e=>this.warZ(e),e:e=>this.warE(e)},["XRW"]:{c:()=>this.xwillC(),z:e=>this.xwillZ(e),e:e=>this.xwillE(e)}}[t]}cardCast(t,i){this.lookup(t).z(i)}castEval(t,i){return this.lookup(t).e(i)}playTarg;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return this.cardCode()==="NSL"&&a.field.creatByTarget(d.crFriendTarg()).length<5||t.push(this.playTarg),t}handleAction(t){this.logSpell();const i=a.field.ddf6(t);this.cardCast(this.cardCode(),i),a.turn.spellCast()}ddf7(t){return this.castEval(this.cardCode(),t)}ddf8(t){const i=pt.extractCardCode(t.trigger.logicCode);if(i==="TOB"&&t.trigger.type==="DM"){const e=t.event;if(e.battle&&e.creatureTarg&&e.creatureSrc&&e.source.id===t.creatId)return this.level===3?!0:a.cards.getCard(e.target.code).level<=this.level}else if((i==="ABL"||i==="OEX")&&t.trigger.type==="DM"){const e=t.event;return e.battle&&!e.creatureTarg&&e.creatureSrc&&e.source.id===t.creatId}else if((i==="FZS"||i==="IFR")&&t.trigger.type==="DM"){const e=t.event;if(e.creatureTarg&&e.target.id===t.creatId)return!0}else if(i==="DYB"&&t.trigger.type==="EF"){const e=t.event;return t.trigger.creatId!==e.creature.id&&e.creature.owner===t.ownerPlayerA}else if(i==="FVA"&&t.trigger.type==="FK"||i==="ROG"&&t.trigger.type==="DS"||i==="SHG"&&(t.trigger.type==="PT"||t.trigger.type==="VN")||(i==="IFR"||i==="OEX")&&t.trigger.type==="PT")return!0;return!1}jr8(t){const i=pt.extractCardCode(t.trigger.logicCode);if(i==="TOB"){const s=t.event.target;a.death.destroy(s,this.code)}else if(i==="ABL")a.field.jr5(t.creatId).buff(this.level,this.level);else if(i==="FVA"){const e=a.field.jr5(t.creatId),s=a.field.searchByLane(a.field.oppositeLane(e.lane),!e.owner);s&&s.hurtDirect(this.boof3612,e.code)}else if(i==="FZS"||i==="IFR"&&t.trigger.type==="DM"){const e=a.field.jr5(t.creatId);e.status==="A"&&a.death.destroy(e,this.code)}else if(i==="ROG"||i==="DYB")a.field.jr5(t.creatId).buff(this.level,this.level);else if(i==="SHG"){if(t.trigger.type==="VN"){const e=t.event;a.field.birthCreature(e.creature.code,"S",t.ownerPlayerA)}else if(t.trigger.type==="PT"){const e=t.trigger.customCode,s=a.field.jr5(t.creatId);s.triggers.filter(u=>u.customCode===e).forEach(u=>s.removeTrigger(u))}}else if(i==="IFR"&&t.trigger.type==="PT"){const e=a.deTil(t.trigger.customCode),s=e[1];if(e[0]==="P2")t.trigger.customCode=a.enTil("P1",s);else{const l=a.field.jr5(t.creatId),u=l.triggers.find(m=>m.customCode===s);u&&l.removeTrigger(u),l.removeTrigger(t.trigger)}}else if(i==="OEX"){if(t.trigger.type==="DM"){const e=t.event,s=a.field.qEnemyCreats(),l=s.length,u=Date.now();let m;l>0&&(this.level===1?m=[s[a.randInt(0,l)]]:this.level===2?(m=s.splice(a.randInt(0,l),1),s.length>0&&m.push(s[a.randInt(0,l-1)])):m=s,m.forEach(y=>y.hurtDirect(e.dmg,this.code,u)))}else if(t.trigger.type==="PT"){const e=t.trigger.customCode,s=a.field.jr5(t.creatId);s.triggers.filter(u=>u.customCode===e).forEach(u=>s.removeTrigger(u))}}else super.jr8(t);a.batch.triggerDone()}asurgeC(){this.faction="T",this.rarity="R",this.name="Aerial Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.playTarg.canMove=!0,this.text=`Give a creature Mobility ${this.level}.`}asurgeZ(t){t.addMobility(this.level)}asurgeE(t){return d.actionEval(t,"ST","GM")}aqatC(){this.faction="T",this.rarity="C",this.name="Aquatic Embrace",this.text=`Give a creature ${a.log.jr9(0,this.boof51015)}.`}aqatZ(t){t.buff(0,this.boof51015)}aqatE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof51015)}ablC(){this.faction="T",this.rarity="R",this.name="Asir's Blessing",this.text=`Give a creature "When this creature ${a.log.dbdtap()}, it gets ${a.log.jr9(this.level,this.level)}."`}ablZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("OL")}ablE(t){const i=d.actionEval(t,"ST","OL");return i.bonus=.5,i}botC(){this.faction="U",this.rarity="H",this.name="Botanimate",this.text=`Replace an enemy ${a.log.levelGateText(this.level,!0)}creature with a 3/3 Sapling.`,this.playTarg.player="E",this.playTarg.level=a.target.ddf2(this.level)}botZ(t){a.field.birthCreature(`${"BOS"}${this.level}`,"R",t.owner,t.lane)}botE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"BOS"}${this.level}`);return i.hints=["RE"],i}csurgeC(){this.faction="N",this.rarity="R",this.name="Contagion Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]);const t=this.boof123n;this.text=`Give a creature ${a.log.jr9(t,t)}.`}csurgeZ(t){const i=this.boof123n;t.buff(i,i)}csurgeE(t){const i=this.boof123n;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cullC(){this.faction="N",this.rarity="C",this.name="Cull the Weak";const t=this.boof4814;this.text=`Destroy a creature with ${t} or less attack.`,this.playTarg.maxAttack=t}cullZ(t){a.death.destroy(t,this.code)}cullE(t){return d.ddp7(t,t.playerA,t.lane)}cultC(){this.faction="U",this.rarity="H",this.name="Cultivate";const t=this.boof91421;this.text=`Replace a friendly Plant with a ${t}/${t} Treefolk.`,this.playTarg.player="F",this.playTarg.tribe="PL"}cultZ(t){a.field.birthCreature(`${"TFF"}${this.level}`,"R",t.owner,t.lane)}cultE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"TFF"}${this.level}`);return i.hints=["RE"],i}cypaC(){this.faction="A",this.rarity="R",this.name="Cypien Augmentation",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]);const t=this.boof246;this.text=`Give a creature in a center lane ${a.log.jr9(t,t)}.`,this.playTarg.lanes=3}cypaZ(t){const i=this.boof246;t.buff(i,i)}cypaE(t){const i=this.boof246;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cypbC(){this.faction="A",this.rarity="C",this.name="Cypien Battlesuit",this.text=`Give an Alloyin creature ${a.log.jr9(this.boof51015,0)} and Armor ${this.boof124}.`,this.playTarg.faction="A"}cypbZ(t){t.buff(this.boof51015,0),t.addArmor(this.boof124)}cypbE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof51015,arm:this.boof124})}dreadC(){this.faction="N",this.rarity="H",this.name="Dreadbolt",this.hints=["LV"],this.text=`Destroy a ${a.log.levelGateText(this.level,!0)}creature.`,this.playTarg.level=a.target.ddf2(this.level)}dreadZ(t){a.death.destroy(t,this.code)}dreadE(t){return d.ddp7(t,t.playerA,t.lane)}drybC(){this.faction="U",this.rarity="R",this.name="Dryad's Boon",this.text=`Give a creature ${a.log.jr9(this.level,this.level,!0)}, and "When another friendly creature enters play, this gets ${a.log.jr9(this.level,this.level)}."`}drybZ(t){t.buff(this.level,this.level),t.changed=!0,t.jr4("EF",this.code),t.hints.push("BF")}drybE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level,"BF")}enpC(){this.faction="A",this.rarity="H",this.name="Energy Prison",this.isFree=this.level===3,this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature Defender.`,this.playTarg.canDefender=!0}enpZ(t){t.defender=!0}enpE(t){return d.ddp2(t,t.playerA,t.lane,{def:!0})}elnC(){this.faction="A",this.rarity="C",this.name="Electro Net",this.text=`Give a creature ${a.log.jr9(-this.boof51015,0)}.`}elnZ(t){t.buff(-this.boof51015,0)}elnE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.boof51015)}rageC(){this.faction="U",this.rarity="C",this.name="Enrage";const t=this.boof3612;this.text=`Give a creature ${a.log.jr9(t,t)}.`}rageZ(t){const i=this.boof3612;t.buff(i,i)}rageE(t){const i=this.boof3612;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}expdmC(){this.faction="N",this.rarity="H",this.name="Explosive Demise",this.text=`Destroy a friendly ${a.log.levelGateText(this.level+1,!0)}creature. Deal damage equal to its attack to the enemy player.${this.level===3?" You gain that much health.":""}`,this.playTarg.level=a.target.ddf2(this.level+1),this.playTarg.player="F"}expdmZ(t){const i=t.attack;a.death.destroy(t,this.code),a.player.ddf3("E",i,this.code),this.level===3&&a.player.healPlayer("F",i)}expdmE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return e.vectors.push(d.evalVectorPlayerDmg(!i.owner,i.attack)),this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(i.owner,i.attack)),e}get fiboof(){return this.lValN([1,3,8])}feralC(){this.faction="U",this.rarity="C",this.name="Feral Instinct";const t=this.fiboof;this.text=`Give a creature ${a.log.jr9(t,t,!0)} and Breakthrough.`}feralZ(t){const i=this.fiboof;t.breakthrough=!0,t.buff(i,i)}feralE(t){const i=this.fiboof;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,brt:!0})}fervassC(){this.faction="T",this.rarity="H",this.name="Fervent Assault",this.playTarg.player="F",this.text=`Give a friendly creature Mobility ${this.level} and "Flank: Deal ${this.boof3612} damage to the opposing creature.`}fervassZ(t){t.changed=!0,t.addMobility(this.level),t.jr4("FK",this.code),t.hints.push("FH")}fervassE(t){return d.actionEval(t,"ST","FH")}flncC(){this.faction="T",this.rarity="R",this.name="Flame Lance";const t=this.boof579;this.text=`Deal ${t} damage to an enemy creature and ${t} damage to the enemy player.`,this.playTarg.player="E"}flncZ(t){const i=this.boof579;t.hurtDirect(i,this.code),a.player.ddf3("E",i,this.code)}flncE(t){const i=this.boof579,e=d.ddp2(t,t.playerA,t.lane,{dmg:i});return e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i)),e}ffldC(){this.faction="A",this.rarity="C",this.name="Forcefield",this.playTarg.canArmor=!0,this.text=`Give a creature Armor ${this.boof51020} this turn.`}ffldZ(t){const i=d.mod("AR",this.boof51020,this.code);i.expiry="ET",t.addMod(i)}ffldE(t){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof51020})}frozC(){this.faction="T",this.rarity="R",this.name="Frozen Solid",this.playTarg.level=a.target.ddf2(this.level),this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature "When this is dealt damage, destroy it".`}frozZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("DD")}frozE(t){return d.actionEval(t,"ST","DD")}ghastC(){this.faction="N",this.rarity="C",this.name="Ghastly Touch";const t=-this.boof3612;this.text=`Give a creature ${a.log.jr9(t,t)}.`}ghastZ(t){const i=-this.boof3612;t.buff(i,i)}ghastE(t){const i=-this.boof3612;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}crushC(){this.faction="T",this.rarity="C",this.name="Glacial Crush",this.isFree=this.level>1,this.isFree||(this.hints=["LV"]),this.playTarg.player="E",this.playTarg.hasDefender=!0,this.text=`Destroy an enemy creature with Defender.${this.level===3?" Deal damage equal to its health to the enemy player.":""}`}crushZ(t){const i=t.health;a.death.destroy(t,this.code),this.level===3&&a.player.ddf3(t.owner,i,this.code)}crushE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(i.owner,i.health)),e}hartC(){this.faction="A",this.rarity="C",this.name="Heavy Artillery",this.text=`Give a creature ${a.log.jr9(this.boof51015,0)}.`}hartZ(t){t.buff(this.boof51015,0)}hartE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof51015)}izftC(){this.faction="T",this.rarity="T",this.name="Iztek's Frost",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Until the end of the next turn, give a ${a.log.levelGateText(this.level+1,!0)}creature "When this is dealt damage, destroy it".`}izftZ(t){const i=a.genId(),e=t.jr4("DM",this.code);e.changes=!0,e.customCode=i;const s=t.jr4("PT",this.code);s.customCode=a.enTil("P2",i),t.hints.push("DD")}izftE(t){return d.actionEval(t,"ST","DD")}jpC(){this.faction="A",this.rarity="C",this.name="Jet Pack",this.text=`Give a creature ${a.log.jr9(this.boof369,0)} and Mobility 1.`}jpZ(t){t.buff(this.boof369,0),t.addMobility(1)}jpE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof369,void 0,"GM")}lbrandC(){this.faction="T",this.rarity="C",this.name="Lightning Brand",this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Give a ${a.log.levelGateText(this.level+1)}creature ${a.log.jr9(this.boof124,0)} and Aggressive this turn.`}lbrandZ(t){const i=d.mod("AT",this.boof124,this.code),e=d.mod("AG",!0,this.code);i.expiry="ET",e.expiry="ET",t.addMod(i),t.addMod(e)}lbrandE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof124,agr:!0})}shartC(){this.faction="U",this.rarity="R",this.name="Lysian Shard",this.overload=!0,this.maxLevel=1,this.text=`Give a creature ${a.log.jr9(6,6)}.`}shartZ(t){t.buff(6,6)}shartE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,6,6)}morphC(){this.faction="U",this.rarity="H",this.name="Metamorphosis",this.text=`Replace a ${a.log.levelGateText(this.level,!0)}creature with a 0/3 Feywing Chrysalis.`,this.playTarg.level=a.target.ddf2(this.level)}morphZ(t){a.field.birthCreature(`${"FWC"}1`,"R",t.owner,t.lane)}morphE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"FWC"}1`);return i.hints=["RE"],i}sculptC(){this.faction="A",this.rarity="H",this.name="Metasculpt",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Remove all abilities from a ${a.log.levelGateText(this.level+1,!0)}creature.`}sculptZ(t){t.wipeAll()}sculptE(t){return d.actionEval(t,"ST","NT")}nanoC(){this.faction="A",this.rarity="R",this.name="Nanoswarm",this.playTarg.level=a.target.ddf2(this.level),this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature ${a.log.jr9(-this.boof51015,0)} and remove all abilities from it.`}nanoZ(t){t.buff(-this.boof51015,0),t.wipeAll()}nanoE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.boof51015,0,"NT")}natselC(){this.faction="U",this.rarity="R",this.name="Natural Selection",this.text=`If there is a friendly creature in each lane, destroy a ${a.log.levelGateText(this.level,!0)}creature.`,this.playTarg.level=a.target.ddf2(this.level)}natselZ(t){a.death.destroy(t,this.code)}natselE(t){return d.ddp7(t,t.playerA,t.lane)}nviveC(){this.faction="N",this.rarity="C",this.name="Necrovive",this.playTarg.canRegen=!0,this.text=`Give a creature Regenerate ${this.boof3612}.`}nviveZ(t){t.addRegen(this.boof3612)}nviveE(t){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof3612})}oexpC(){this.faction="A",this.rarity="H",this.name="Oratek Explosives",this.playTarg.player="F",this.hints=["ALT"];const t=this.lValS(["an enemy creature at random","up to two enemy creatures at random","each enemy creature"]);this.text=`Give a friendly creature ${a.log.jr9(5,0)}. Allied Tempys: This turn, when that creature ${a.log.dbdtap()}, deal that much damage to ${t}.`}oexpZ(t){if(t.buff(5,0),a.turn.allied("T")){const i=a.genId(),e=t.jr4("DM",this.code);e.changes=!0,e.customCode=i;const s=t.jr4("PT",this.code);s.customCode=i,t.hints.push("OL")}}oexpE(t){const i=d.actionEvalBuffN(t,t.playerA,t.lane,5,0,"OL");return i.bonus=.5,i}pwtorC(){this.faction="A",this.rarity="R",this.name="Power Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature ${a.log.jr9(this.boof234,0)}.`}pwtorZ(t){t.buff(this.boof234,0)}pwtorE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof234)}psurgeC(){this.faction="U",this.rarity="R",this.name="Primal Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature ${a.log.jr9(this.level,this.level)}.`}psurgeZ(t){t.buff(this.level,this.level)}psurgeE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level)}pslamC(){this.faction="T",this.rarity="C",this.name="Primordial Slam",this.text=`Give a creature ${a.log.jr9(this.boof71116,0)} this turn.`}pslamZ(t){const i=d.mod("AT",this.boof71116,this.code);i.expiry="ET",t.addMod(i)}pslamE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof71116)}rotgC(){this.faction="N",this.rarity="H",this.name="Rite of the Grimgaunt",this.text=`Give a creature "When a creature is destroyed, this gets ${a.log.jr9(this.level,this.level)}."`}rotgZ(t){t.changed=!0,t.jr4("DS",this.code),t.hints.push("BD")}rotgE(t){return d.actionEval(t,"ST","BD")}sapC(){this.faction="A",this.rarity="C",this.name="Sap",this.playTarg.level=a.target.ddf2(this.level),this.text=`Reduce a ${a.log.levelGateText(this.level,!0)}creature's attack to 0.`}sapZ(t){t.buff(-t.attack,0)}sapE(t){const i=a.field.ddf6(t);return d.actionEvalBuffC(t,i,-i.attack)}soathC(){this.faction="U",this.rarity="C",this.name="Savage Oath",this.level===1&&(this.hints=["LV"]);const t=this.saboof;this.text=`Give an Uterra creature ${a.log.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.faction="U"}soathZ(t){const i=this.saboof;t.buff(i,i),t.breakthrough=!0}soathE(t){const i=this.saboof;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,brt:!0})}get saboof(){return this.lValN([2,6,15])}soaC(){this.faction="A",this.rarity="C",this.name="Seal of Anvillon",this.level===1?this.hints=["LV"]:this.consistent=!0,this.text=`Give a creature ${a.log.jr9(this.ubzap,0)}.`}soaZ(t){t.buff(this.ubzap,0)}soaE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.ubzap)}sodC(){this.faction="U",this.rarity="C",this.name="Seal of Deepwood",this.level===1?this.hints=["LV"]:this.consistent=!0;const t=this.derpboof;this.text=`Give a creature ${a.log.jr9(t,t)}.`}sodZ(t){const i=this.derpboof;t.buff(i,i)}sodE(t){const i=this.derpboof;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get derpboof(){return this.lValN([1,6,12])}sotC(){this.faction="N",this.rarity="C",this.name="Seal of Tarsus",this.level===1?this.hints=["LV"]:this.consistent=!0;const t=this.tars;this.text=`Give a creature ${a.log.jr9(t,t)}.`}sotZ(t){const i=this.tars;t.buff(i,i)}sotE(t){const i=this.tars;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get tars(){return this.lValN([-2,-8,-16])}shgrC(){this.faction="N",this.rarity="L",this.name="Shallow Grave",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Give a ${a.log.levelGateText(this.level+1,!0)}friendly creature "Vengeance: Spawn this" this turn.`}shgrZ(t){const i=a.genId(),e=t.jr4("VN",this.code);e.customCode=i,e.changes=!0;const s=t.jr4("PT",this.code);s.customCode=i,t.hints.push("LZ")}shgrE(t){return d.actionEval(t,"ST","LZ")}sinC(){this.faction="U",this.rarity="C",this.name="Strength In Numbers",this.text=`Give a creature ${a.log.jr9(this.level,this.level)} for each friendly creature.`}sinZ(t){const i=this.level*a.field.ddf1().length;t.buff(i,i)}sinE(t){const i=this.level*a.field.ddf1().length;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get snbboof(){return-1*(this.level+7)}snbC(){this.faction="A",this.rarity="C",this.name="Sonic Burst",this.text=`Give a creature ${a.log.jr9(this.snbboof,0)}.`}snbZ(t){t.buff(this.snbboof,0)}snbE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.snbboof)}sharvC(){this.faction="N",this.rarity="H",this.name="Soul Harvest";const t=this.lValS(["an additional level 1 card","an additional card","two additional cards"]);this.text=`Destroy a friendly creature. You may play ${t} this turn.`,this.playTarg.player="F"}sharvZ(t){if(a.death.destroy(t,this.code),this.level===1){const i=a.turn.freeCard(this.code);i.condition.level=a.target.ddf2(1)}else a.state.gs.turn.regularPlays+=this.level-1}sharvE(t){return d.ddp7(t,t.playerA,t.lane,["FRC","SD"])}sttorC(){this.faction="N",this.rarity="R",this.name="Spirit Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature Regenerate ${this.boof234}.`,this.playTarg.canRegen=!0}sttorZ(t){t.addRegen(this.boof234)}sttorE(t){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof234})}sptorC(){this.faction="U",this.rarity="R",this.name="Spore Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature Poison ${this.boof234}.`}sptorZ(t){t.addPoison(this.boof234)}sptorE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof234})}stbrnC(){this.faction="T",this.rarity="R",this.name="Stone Brand";const t=this.boof579;this.text=`Give a creature with Defender ${a.log.jr9(t,t,!0)} and Negate Defender from it.`,this.playTarg.hasDefender=!0}stbrnZ(t){const i=this.boof579;t.buff(i,i),t.negateDefender=!0}stbrnE(t){const i=this.boof579;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,noD:!0})}tanglC(){this.faction="U",this.rarity="R",this.name="Tangle";const t=this.level===3?" You gain health equal to that creature's attack.":"";this.text=`Destroy a ${a.log.levelGateText(this.level+1,!0)}creature with Mobility.${t}`,this.playTarg.level=a.target.ddf2(this.level+1),this.playTarg.hasMobility=!0}tanglZ(t){a.death.destroy(t,this.code),this.level===3&&a.player.healPlayer("F",t.attack)}tanglE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(a.state.ddf9(),i.attack)),e}tpactC(){this.faction="N",this.rarity="C",this.name="Tarsian Pact";const t=this.boof235;this.text=`Give a Nekrium creature ${a.log.jr9(t,t,!0)} and Regenerate ${t}.`,this.playTarg.faction="N"}tpactZ(t){const i=this.boof235;t.buff(i,i),t.addRegen(i)}tpactE(t){const i=this.boof235;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,rgn:i})}tugC(){this.faction="A",this.rarity="R",this.name="Tech Upgrade",this.playTarg.tribe="RB",this.text=`Give a Robot ${a.log.jr9(this.boof4612,0)} and Armor ${this.boof236}.`}tugZ(t){t.addArmor(this.boof236),t.buff(this.boof4612,0)}tugE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof4612,arm:this.boof236})}blightC(){this.faction="N",this.rarity="R",this.name="Touch Of Blight",this.text=`Give a creature "When this creature ${a.log.dbdtac(this.level)}, destroy that creature."`}blightZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("BX")}blightE(t){return d.actionEval(t,"ST","BX")}get tspois(){return this.lValN([5,7,12])}sporeC(){this.faction="U",this.rarity="C",this.name="Toxic Spores",this.text=`Give a creature Poison ${this.tspois}.`}sporeZ(t){t.addPoison(this.tspois)}sporeE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.tspois})}tremcC(){this.faction="T",this.rarity="C",this.name="Tremorcharge",this.text=`Give a Tempys creature ${a.log.jr9(0,this.boof4812)} and Mobility ${this.level}.`,this.playTarg.faction="T"}tremcZ(t){t.buff(0,this.boof4812),t.addMobility(this.level)}tremcE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,void 0,this.boof4812,"GM")}uboltC(){this.faction="T",this.rarity="R",this.name="Uranti Bolt",this.text=`Deal ${this.ubzap} damage to a creature. It gets Defender until the end of the next turn.`}uboltZ(t){t.hurtDirect(this.ubzap,this.code);const i=d.mod("DF",!0,this.code);i.expiry="EN",t.addMod(i)}uboltE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.ubzap,def:!0})}get ubzap(){return this.lValN([3,10,20])}vgraC(){this.faction="U",this.rarity="C",this.name="Verdant Grace",this.playTarg.player="F",this.text=`Heal ${this.boof101520} damage from a friendly creature and ${this.boof246} health from each other friendly creature.`}vgraZ(t){t.heal(this.boof101520);const i=this.boof246;a.field.creatByTarget(d.crFriendNotMeTarg(t.id)).forEach(e=>{e.heal(i)})}vgraE(t){const i=this.boof246,e=a.field.ddf6(t),s=d.actionEvalBuffC(t,e,0,this.boof101520),l=a.field.creatByTarget(d.crFriendNotMeTarg(e.id)).map(u=>{const m=d.ddp1(u.owner,u.lane);return m.health=i,m});return s.vectors.push(...l),s}vembC(){this.faction="N",this.rarity="C",this.name="Vyric's Embrace";const t=this.boof468,i=t*-1;this.text=`Give a creature ${a.log.jr9(i,i)}. You gain ${t} health.`}vembZ(t){const i=this.boof468,e=-i;t.buff(e,e),a.player.healPlayer(a.state.getActivePlayer(),i)}vembE(t){const i=this.boof468,e=-i,s=d.actionEvalBuffN(t,t.playerA,t.lane,e,e);return s.vectors.push(d.evalVectorPlayerLife(a.state.ddf9(),i)),s}warC(){this.faction="A",this.rarity="H",this.name="Warmonger Mod";let t=this.level,i=3;this.level===1&&(this.playTarg.level="LN",i=2,t=2),this.text=`Give a ${a.log.levelGateText(i,!0)}creature ${t}x attack.`}warZ(t){const i=this.level===3?2:1;t.buff(t.attack*i,0)}warE(t){const i=this.level===3?2:1;return d.actionEvalBuffN(t,t.playerA,t.lane,Rt+i)}xwillC(){this.faction="N",this.rarity="H",this.name="Xrath's Will";const t=this.boof3612;this.text=`Destroy an enemy creature with ${t} or less attack. You may play and additional Zombie this turn.`,this.playTarg.player="E",this.playTarg.maxAttack=t}xwillZ(t){a.death.destroy(t,this.code);const i=a.turn.freeCard(this.code);i.condition.tribe="ZB"}xwillE(t){return d.ddp7(t,t.playerA,t.lane,"FRZ")}}class ae extends x{lookup(t){return{["ATP"]:{c:()=>this.phagC(),t:()=>this.phagT(),f:(e,s)=>this.phagF(e,s),e:e=>this.phagE(e)},["TPG"]:{c:()=>this.pillC(),t:()=>this.pillT(),f:(e,s)=>this.pillF(e,s),e:e=>this.pillE(e)},["TMG"]:{c:()=>this.grootC(),t:()=>this.grootT(),f:(e,s)=>this.grootF(e,s),e:e=>this.grootE(e)}}[t]}forgTargets(t){return this.lookup(t).t()}forgAction(t,i,e){this.lookup(t).f(i,e)}forgEval(t,i){return this.lookup(t).e(i)}optional=!0;ftext="";constructor(t){super(t),this.lookup(this.cardCode()).c(),this.text="Forge: "+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.jr5(t.param);this.forgAction(this.cardCode(),t.position,i),a.mode.popMode(),a.action.actionDone(!0)}jr8(t){const i=this.forgTargets(this.cardCode());if(i.length>0){const e=i.map(s=>{const l=d.deckSelectAction("CARD",s.cardCode,s.sourceIdx);return l.param=t.creatId,l.hostCard=this.code,l});if(this.optional){const s=a.action.noneEndTrigger();s.param="PM",e.push(s)}a.deck.showCustomDeck(i,e)}else a.batch.triggerDone()}ddf7(t){return this.forgEval(this.cardCode(),t)}phagC(){this.faction="U",this.rarity="H",this.name="Aetherphage",this.jr1=this.lValN([7,10,16]),this.jr2=this.boof3612,this.tribe.push("IN"),this.ftext=`Look at the ${a.log.levelGateText(this.level,!0)}spells in the enemy player's hand and choose one. The enemy player discards the chosen spell.`}phagT(){const t=a.player.toPlayer(!a.state.ddf9()),i=d.target("TH");return i.player=a.player.toTarget(t),i.level=a.target.ddf2(this.level),i.card="S",a.deck.generateContent(t.hand,!1,i)}phagF(t,i){const e=a.player.toPlayer(!i.owner),s=e.hand[t];e.hand.splice(t,1),e.discard.push(s)}phagE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}pillC(){this.faction="N",this.rarity="H",this.name="Tomb Pillager",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("ZB"),this.consistent=this.level>1,this.ftext="You may banish a Nekrium card from your discard pile."}pillT(){const t=a.state.getActivePlayer(),i=d.target("TD");return i.player=a.player.toTarget(t),i.faction="N",a.deck.generateContent(t.discard,!1,i)}pillF(t,i){a.player.toPlayer(i.owner).discard.splice(t,1)}pillE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}grootC(){this.faction="U",this.rarity="R",this.name="Toorgmai Guardian",this.jr1=this.boof4711,this.jr2=this.jr1,this.tribe.push("PL");const t=this.boof358;this.bonus={play:this.ddp9(0,t+t,t,0)/2},this.ftext=`You may banish a Plant from your discard pile. If you do, ${this.name} gets ${a.log.jr9(t,t)}.`}grootT(){const t=a.state.getActivePlayer(),i=d.target("TD");return i.player=a.player.toTarget(t),i.tribe="PL",a.deck.generateContent(t.discard,!1,i)}grootF(t,i){a.player.toPlayer(i.owner).discard.splice(t,1);const s=this.boof358;i.buff(s,s)}grootE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}}class Ke extends rt{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Dissolve",this.isFree=this.level===3,this.text=`Double the Poison on ${this.level===1?"an":"each"} enemy creature.`}playTargets(){const t=super.playTargets(),i=this.poisTarg();return this.level===1?t.push(i):a.field.creatByTarget(i).length>0&&t.push(a.target.boardTarget("CARD",this.code)),t}handleAction(t){if(this.logSpell(),this.level===1){const i=a.field.ddf6(t);i.addPoison(i.poison)}else a.field.creatByTarget(this.poisTarg()).forEach(e=>{e.addPoison(e.poison)});a.turn.spellCast()}poisTarg(){const t=d.crEnemyActTarg("CARD",this.code,"");return t.hasPoison=!0,t}ddf7(t){const i=Rt+1,e=d.actionEval(t,"ST"),s=!a.state.ddf9();let l;return t.zone==="R"?l=a.field.laneIdx:l=[t.lane],e.vectors=l.map(u=>d.ddp1(s,u,{psn:i})),e}}class Ye extends x{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Dysian Broodqueen",this.jr1=this.boof248,this.jr2=this.boof61117,this.tribe.push("NG"),this.hints=["ALU"];const i=`Destroy an enemy ${a.log.levelGateText(this.level,!0)}creature.`;this.text=`Activate, destroy another friendly creature: ${i} Allied Uterra: Put a ${this.level}/${this.level} Broodfang into an available lane.`,this.bonus={play:this.ddp9(1,this.level*2,this.level,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}canActivate(t){return this.enemies(t).length>0&&this.friends(t).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[1]==="P1")a.action.ddf5(this.getCardActions(t));else if(i[1]==="P2"){const e=a.field.jr5(i[0]),s=Date.now(),l=a.field.jr5(i[2]);a.death.destroy(l,this.code,s);const u=a.field.ddf6(t);a.death.destroy(u,this.code,s),e.endActivation()}else a.field.birthCreature(`${"BRF"}${this.level}`,"P",t.playerA,t.lane),a.action.actionDone(!0)}jr8(t){if(a.turn.allied("U")){const i=d.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId),e=a.target.toActions(i);e.length>0?a.action.ddf5(e):a.batch.triggerDone()}else a.batch.triggerDone()}friends(t){const i=d.crFriendNotMeActTarg("CARD",t.id,this.code,a.enTil(t.id,"P1"));return a.target.toActions(i)}enemies(t,i=""){const e=d.crEnemyActTarg("CARD",this.code,a.enTil(t.id,"P2",i));return e.level=a.target.ddf2(this.level),a.target.toActions(e)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param);let s;return s=this.friends(e),s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.deTil(t.param),s=a.field.jr5(e[0]),l=a.field.ddf6(t),u=this.enemies(s,l.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param),e=t;if(i[1]==="P1")return d.ddp5(t);if(i[1]==="P2"){const s=d.ddp7(t,e.playerA,e.lane),l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.destroy=!0,s.vectors.push(u),s}else return d.ddp4(t,e.playerA,e.lane,`${"BRF"}${this.level}`)}}}class Xe extends rt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Dysian Siphon",this.hints=["ALU"];const i=this.boof357;this.text=`Give an enemy creature ${a.log.jr9(-i,-i)}. Allied Uterra: Give a friendly creature ${a.log.jr9(i,i)}. `}playTargets(){const t=super.playTargets(),i=d.crEnemyActTarg("CARD",this.code,"P1");return t.push(i),t}handleAction(t){const i=a.deTil(t.param),e=this.boof357;if(i[0]==="P1"){const s=this.getCardActions(t);a.turn.allied("U")&&s.length>1?a.action.ddf5(s):(this.logSpell(),a.field.ddf6(t).buff(-e,-e),a.turn.spellCast())}else{this.logSpell();const s=a.field.ddf6(t);a.field.jr5(i[1]).buff(-e,-e),s.buff(e,e),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=this.friendTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param),e=this.boof357;if(i[0]==="P1")return a.turn.allied("U")&&this.friendTargActions().length>1?d.ddp5(t):d.actionEvalBuffN(t,t.playerA,t.lane,-e,-e);{const s=d.actionEval(t,"ST"),l=a.field.ddf6(t),u=a.field.jr5(i[1]);return s.vectors.push(d.ddp1(u.owner,u.lane,{att:-e,hlt:-e}),d.ddp1(l.owner,l.lane,{att:e,hlt:e})),s}}friendTargActions(t=""){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}}class qe extends x{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Dysian Sludge",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("OZ"),this.hints=["ALN","HH","OP"];const i=-this.boof135;this.text=`Forge: If you have health over 120, you may put a copy of ${this.name} into another lane. When this enters play, if you have a Nekrium card in hand, the opposing creathure gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,s.customCode=e.id,e.jr4("EF",this.code),e}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){const i=t.event;if(i.forged&&i.creature.id===t.trigger.customCode)if(a.state.getActivePlayer().health>120){const e=d.actionTarget("TF","CARD",this.code,"");e.player="F",e.lanes=a.field.laneIdx.filter(l=>l!==i.creature.lane);const s=a.target.toActions(e);s.push(a.action.noneEndTrigger()),a.action.ddf5(s)}else a.batch.triggerDone();else{const e=i.creature.opposed;if(e&&a.turn.allied("N",i.creature.owner)){const s=-this.boof135;e.buff(s,s)}a.batch.triggerDone()}}handleAction(t){a.field.birthCreature(this.code,"R",t.playerA,t.lane),a.action.actionDone(!0)}}class je extends x{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Echowisp",this.jr1=this.lValN([7,8,10]),this.jr2=this.boof135,this.tribe.push("ST"),this.level===3?(this.text="Forge: Put a copy of Echowisp into each available lane.",this.hints=["EML"]):(this.text="Forge: You may put a copy of Echowisp into an adjacent lane.",this.hints=["EMA"])}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=this.level<3,e}jr8(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId);if(this.level<3){const s=a.field.jr5(t.trigger.creatId);i.lanes=s.adjacent}let e=a.target.toActions(i);if(e.length>0)if(this.level<3)a.action.ddf5([a.action.noneEndTrigger(),...e]);else{const s=Date.now();e.forEach(l=>a.field.birthCreature(this.code,"P",l.playerA,l.lane,s)),a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){a.field.birthCreature(this.code,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.code)}}class Je extends x{lookup(t){return{["TVG"]:{c:()=>this.tvgC(),m:e=>this.tvgM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}armThreshold=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("AR",this.code);return s.area="A",e}enforceEffect(t,i){this.armThreshold<=i.armor?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}tvgC(){this.faction="A",this.rarity="R",this.name="Tower Vanguard",this.jr1=this.lValN([3,6,11]),this.jr2=this.lValN([7,13,21]),this.tribe.push("RB"),this.hints=["LKA"],this.armThreshold=1;const t=this.boof247;this.text=`While ${this.name} has Armor, it gets ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}tvgM(t){return[d.mod("AT",this.boof247,t.id)]}}class se extends x{lookup(t){return{["CIN"]:{c:()=>this.cyinC(),m:e=>this.cyinM(e)},["HWM"]:{c:()=>this.hlwmC(),m:e=>this.hlwmM(e)},["LSP"]:{c:()=>this.lspC(),m:e=>this.lspM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}attThreshold=0;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=["ATH"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("AT",this.code);return s.area="A",e}enforceEffect(t,i){this.attThreshold<=i.attack?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}cyinC(){this.faction="A",this.rarity="R",this.name="Cypien Infiltrator",this.jr1=this.boof61117,this.jr2=this.jr1-1,this.tribe.push("HM"),this.attThreshold=this.lValN([7,14,21]),this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Breakthrough.`}cyinM(t){return[d.mod("BT",!0,t.id)]}hlwmC(){this.faction="A",this.rarity="L",this.name="Hinterland Watchman",this.jr1=this.lValN([4,7,15]),this.jr2=this.lValN([7,10,20]),this.tribe.push("MC"),this.attThreshold=this.boof51020;const t=this.lValS(["Mobility 3","Armor 5 and Mobility 3","Armor 5, Breakthrough, Aggressive, Mobility 3, and Regenerate 5"]);this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets ${t}.`,this.bonus={exist:this.ddp9(0,this.lValN([1,9,17]),0,0)*2}}hlwmM(t){const i=[d.mod("MB",3,t.id)];return this.level>1&&i.push(d.mod("AR",5,t.id)),this.level===3&&(i.push(d.mod("BT",!0,t.id)),i.push(d.mod("AG",!0,t.id)),i.push(d.mod("RG",5,t.id))),i}lspC(){this.faction="A",this.rarity="C",this.name="Lightshield Patrol",this.jr1=this.lValN([4,7,15]),this.jr2=this.boof51020,this.tribe.push("HM"),this.attThreshold=this.jr2,this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Armor ${this.boof234}.`}lspM(t){return[d.mod("AR",this.boof234,t.id)]}}class ve extends x{friendNotMe(t){const i=d.crNotMeTarg(t.id);return i.player=a.player.toTarget(t.owner),i}friendNone(t){const i=d.crTarg();return i.player=a.player.toTarget(t.owner),i.lanes=[],i}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforcementActive(t){return t.status==="A"}applyEffect(t,i,e){const s=this.friendNotMe(t),l=a.field.creatByTarget(s),u=a.field.creatByTarget(e);l.forEach(m=>{u.includes(m)?m.addModSafe(i):m.removeModSafe(t.id)})}}class ne extends ve{lookup(t){return{["HTR"]:{c:()=>this.hrtC(),m:e=>this.hrtM(e),t:e=>this.hrtT(e)},["KKK"]:{c:()=>this.kkkC(),m:e=>this.kkkM(e),t:e=>this.kkkT(e)},["XDV"]:{c:()=>this.xdvC(),m:e=>this.xdvM(e),t:e=>this.xdvT(e)}}[t]}createMod(t,i){return this.lookup(t).m(i)}effTargs(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}enforceEffect(t,i){const e=this.cardCode(),s=this.createMod(e,i),l=this.enforcementActive(i)?this.effTargs(e,i):this.friendNone(i);this.applyEffect(i,s,l)}hrtC(){this.faction="U",this.rarity="L",this.name="Heart Tree",this.jr1=0,this.jr2=this.lValN([10,15,30]),this.initRegen=this.boof246,this.initDefend=!0,this.tribe.push("PL"),this.hints=["FRS"],this.text=`Each other friendly creature gets Regenerate ${this.initRegen}.`,this.bonus={exist:this.ddp9(0,this.initRegen,0,0)*2}}hrtM(t){return d.mod("RG",this.initRegen,t.id)}hrtT(t){return this.friendNotMe(t)}kkkC(){if(this.faction="T",this.rarity="L",this.name="Korok, Khan of Kadras",this.jr1=this.lValN([4,7,12,18]),this.jr2=this.lValN([7,12,18,26]),this.initAggro=!0,this.tribe.push("FB"),this.maxLevel=4,this.level>1){const t=this.lValS(["","friendly level 1","friendly level 2 or lower","other friendly"]);this.text=`Each ${t} creature gets Aggressive.`,this.hints=["FRS"],this.bonus={exist:(this.level-1)*.5}}}kkkM(t){return d.mod("AG",!0,t.id)}kkkT(t){const i=this.friendNotMe(t);return this.level===1?i.lanes=[]:i.level=a.target.ddf2(this.level-1),i}xdvC(){this.faction="N",this.rarity="H",this.name="Xrath, Dreadnight Of Varna",this.jr1=this.boof5914,this.jr2=this.jr1+1,this.initRegen=this.boof248,this.tribe.push("ZB"),this.text=`Each other friendly Zombie gets Regenerate ${this.initRegen}`,this.bonus={exist:this.ddp9(0,this.initRegen,0,0)}}xdvM(t){return d.mod("RG",this.initRegen,t.id)}xdvT(t){const i=this.friendNotMe(t);return i.tribe="ZB",i}}class Qe extends x{lookup(t){return{["AHL"]:{c:()=>this.ahlC(),m:e=>this.ahlM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){const e=d.crNotMeTarg(i.id);e.player=a.player.toTarget(i.owner),a.field.creatByTarget(e).length===0?this.createMods(this.cardCode(),i).forEach(l=>{i.addModSafe(l)}):i.removeModSafe(i.id)}ahlC(){this.faction="A",this.rarity="H",this.name="Alloyin Highlander",this.jr1=this.lValN([5,7,10]),this.jr2=this.boof6914,this.tribe.push("HM"),this.text=`While ${this.name} is your only friendly creature, it gets ${a.log.jr9(this.boof4812,0)} and Armor ${this.boof248}.`}ahlM(t){return[d.mod("AT",this.boof4812,t.id),d.mod("AR",this.boof248,t.id)]}}class Ae extends x{lookup(t){return{["NXP"]:{c:()=>this.nxpC(),m:e=>this.nxpM(e)},["SKG"]:{c:()=>this.skgC(),m:e=>this.skgM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=["NX"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){i.lane===3?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}nxpC(){this.faction="A",this.rarity="C",this.name="Nexus Pilot",this.jr1=this.boof358,this.jr2=this.boof4710,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets ${a.log.jr9(this.jr1,this.jr2)}.`,this.bonus={play:this.ddp9(0,this.jr1+this.jr2,this.jr1,0)}}nxpM(t){return[d.mod("AT",this.jr1,t.id),d.mod("HL",this.jr2,t.id),d.mod("MH",this.jr2,t.id)]}skgC(){this.faction="A",this.rarity="C",this.name="Skyknight Glider",this.jr1=this.boof5916,this.jr2=this.jr1+1,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets Mobility 2.`}skgM(t){return[d.mod("MB",2,t.id)]}}class oe extends x{lookup(t){return{["CCT"]:{c:()=>this.cctC(),m:e=>this.cctM(e)},["GHB"]:{c:()=>this.ghbC(),m:e=>this.ghbM(e)},["PYG"]:{c:()=>this.pygC(),m:e=>this.pygM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}likesOpposed=!1;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=[this.likesOpposed?"OP":"OL"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="A",e}enforceEffect(t,i){!!i.opposed===this.likesOpposed?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}cctC(){this.faction="T",this.rarity="R",this.name="Cloudcleaver Titan",this.jr1=this.boof4812,this.jr2=this.lValN([7,10,16]),this.tribe.push("WN","GT"),this.initMobile=this.level;const t=this.boof246;this.bonus={play:this.ddp9(0,t,t,0)},this.text=`While ${this.name} is unopposed, it gets ${a.log.jr9(t,0)}.`}cctM(t){return[d.mod("AT",this.boof246,t.id)]}ghbC(){this.faction="U",this.rarity="R",this.name="Gemhide Basher",this.jr1=this.lValN([5,10,16]),this.jr2=this.lValN([3,7,10]),this.tribe.push("DN"),this.likesOpposed=!0,this.text=`While ${this.name} is opposed, it gets Aggressive.`}ghbM(t){return[d.mod("AG",!0,t.id)]}pygC(){this.faction="T",this.rarity="H",this.name="Pyre Giant",this.jr1=this.boof468,this.jr2=this.boof234,this.tribe.push("FR","GT"),this.initAggro=!0,this.bonus={play:this.ddp9(0,this.jr1,this.jr1,0)},this.text=`While ${this.name} is unopposed, it gets ${a.log.jr9(this.jr1,0)}.`}pygM(t){return[d.mod("AT",this.jr1,t.id)]}}class zt extends ve{lookup(t){return{["ALG"]:{c:()=>this.algnC(),m:e=>this.algnM(e)},["ALS"]:{c:()=>this.alstC(),m:e=>this.alstM(e)},["BTN"]:{c:()=>this.btcC(),m:e=>this.btcM(e)},["NXA"]:{c:()=>this.aeroC(),m:e=>this.aeroM(e)},["NXT"]:{c:()=>this.ntcC(),m:e=>this.ntcM(e)}}[t]}createMod(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=this.nexus?["NX"]:["LJ"]}nexus=!1;enforcementActive(t){return super.enforcementActive(t)?this.nexus?t.lane===3:!0:!1}enforceEffect(t,i){const e=this.cardCode(),s=this.createMod(e,i);let l;this.enforcementActive(i)?(l=this.friendNotMe(i),this.nexus?l.lanes=[1,2,4,5]:l.lanes=i.adjacent):l=this.friendNone(i),this.applyEffect(i,s,l)}algnC(){this.faction="A",this.rarity="R",this.name="Alloyin General",this.jr1=this.boof246,this.jr2=this.boof81318,this.tribe.push("HM"),this.text=`Adjacent creatures gets ${a.log.jr9(this.jr1,0)}.`,this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)}}algnM(t){return d.mod("AT",this.jr1,t.id)}alstC(){this.faction="A",this.rarity="H",this.name="Alloyin Strategist",this.jr1=this.boof4814,this.jr2=this.jr1+1,this.initMobile=this.level,this.tribe.push("HM");const t=this.boof246;this.text=`Adjacent creatures gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)}}alstM(t){return d.mod("AT",this.boof246,t.id)}btcC(){this.faction="A",this.rarity="H",this.name="Battle Techtician",this.jr1=this.boof3714,this.jr2=this.boof71117,this.tribe.push("HM"),this.nexus=!0;const t=this.boof248;this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)*2}}btcM(t){return d.mod("AT",this.boof248,t.id)}aeroC(){this.faction="A",this.rarity="L",this.name="Nexus Aeronaut",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("HM"),this.initMobile=1;const t=this.boof236;this.nexus=!0,this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${a.log.jr9(t,0)}. Otherwise this gets Armor ${t}.`,this.bonus={exist:this.ddp9(0,t,t,0)*2}}aeroM(t){return d.mod("AT",this.boof236,t.id)}ntcC(){this.faction="A",this.rarity="H",this.name="Nexus Techtician",this.jr2=this.boof6916,this.jr1=this.jr2-3,this.tribe.push("HM"),this.nexus=!0;const t=this.boof235;this.text=`While ${this.name} is in the center lane, each other friendly creature gets Armor ${this.boof235}.`,this.bonus={exist:this.ddp9(0,t,0,0)*4}}ntcM(t){return d.mod("AR",this.boof235,t.id)}}class Xt extends x{cardConstruct(t){({["BWD"]:()=>this.bwdC(),["BTS"]:()=>this.btsC(),["ESC"]:()=>this.escarC(),["EHN"]:()=>this.ethhC()})[t]()}targAction(t){a.field.birthCreature(this.spawnCode,"P",t.playerA,t.lane)}adjacent=!1;optional=!1;spawnCode="";ftext="";allied="X";constructor(t){super(t),this.cardConstruct(this.cardCode());const i=a.log.forglied(this.allied);this.text=i+": "+this.ftext}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}jr8(t){if(this.allied==="X"||a.turn.allied(this.allied)){const i=d.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId);if(this.adjacent){const s=a.field.jr5(t.trigger.creatId);i.lanes=s.adjacent}const e=a.target.toActions(i);e.length>0?(this.optional&&e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){this.targAction(t),a.action.actionDone(!0)}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.spawnCode)}bwdC(){this.faction="U",this.rarity="C",this.name="Branchweaver Druid",this.jr1=1,this.jr2=1,this.tribe.push("HM"),this.hints=["EMO"],this.spawnCode=`${"TFD"}${this.level}`,this.optional=!0;const t=this.boof5714;this.ftext=`You may put a ${t}/${t} ${N.minionName(3)} into another lane.`}btsC(){this.faction="U",this.rarity="C",this.name="Brighttusk Sower",this.jr1=this.lValN([6,8,10]),this.jr2=this.jr1,this.tribe.push("TK"),this.hints=["EMA"],this.spawnCode=N.minionCode(this.level),this.optional=!0,this.adjacent=!0;const t=N.minionBuff(this.level);this.ftext=`You may put a ${t}/${t} ${N.minionName(this.level)} into an adjacent lane.`}escarC(){this.faction="A",this.rarity="H",this.name="Esperian Scarab",this.jr1=this.lValN([3,4,7]),this.jr2=this.boof5711,this.initArmor=this.boof135,this.tribe.push("RB"),this.allied="U",this.hints=["EMO","ALU"],this.spawnCode=this.code,this.optional=!0,this.ftext=`You may but a copy of ${this.name} into another lane.`}ethhC(){this.faction="U",this.rarity="C",this.name="Ether Hounds",this.jr1=this.boof369,this.jr2=this.jr1,this.tribe.push("ST"),this.hints=["EMO"],this.spawnCode=this.code,this.ftext="Put a copy of this into an available lane."}}class _e extends x{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Esperian Steelplate",this.jr1=this.boof369,this.jr2=this.boof6916,this.tribe.push("IN"),this.hints=["ALA"],this.text=`Activate: Heal ${this.boof358} damage from each other friendly creature. Allied Alloyin: Armor ${this.boof247}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){const i=d.crFriendNotMeTarg(t.id);return a.field.creatByTarget(i).length>0}startActivation(t){const i=this.boof358,e=d.crFriendNotMeTarg(t.id);a.field.creatByTarget(e).forEach(s=>{s.heal(i)}),t.endActivation()}jr8(t){a.turn.allied("A")&&a.field.jr5(t.creatId).addArmor(this.boof247),a.batch.triggerDone()}}class ti extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Everflame Phoenix",this.jr1=this.lValN([7,0,22]),this.jr2=this.lValN([6,1,15]),this.tribe.push("PX"),this.initMobile=this.lValN([1,0,2]),this.level===2?(this.initDefend=!0,this.text=`When you gain a rank, replace ${this.name} with a level 3 ${this.name}.`,this.hints=["RH","LV"],this.bonus={exist:this.ddp9(1,37,22,0)}):this.level===3&&(this.text=`Vengeance: Put a level 2 ${this.name} into this lane.`,this.bonus={exist:this.ddp9(1,1,0,0)})}jr3(t,i){const e=super.jr3(t,i);return this.level===2?e.jr4("RU",this.code):this.level===3&&e.jr4("VN",this.code),e}ddf8(t){return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:super.ddf8(t)}jr8(t){if(t.trigger.type==="RU"){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"EFP"}3`,"R",i.owner,i.lane)}else if(t.trigger.type==="VN"){const e=t.event.creature;a.field.birthCreature(`${"EFP"}2`,"P",e.owner,e.lane)}a.batch.triggerDone()}}class ei extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Frostmane Dragon",this.jr1=this.lValN([6,9,13]),this.jr2=this.jr1+1,this.tribe.push("IC","DG"),this.initMobile=2,this.text=`At the start of your turn, if ${this.name} was Forged last turn, you may put a Level ${this.level} Frostmane egg into an available lane.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}handleAction(t){a.field.birthCreature(`${"FME"}${this.level}`,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){return t.trigger.type==="TS"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){const i=a.field.jr5(t.creatId);if(t.event.code==="ENT"){const e=i.jr4("TS",this.code);e.interactive=!0,e.changes=!0,e.customCode=i.id,a.batch.triggerDone()}else if(t.event.code==="TRS"){const e=t.trigger.customCode,s=i.triggers.find(m=>m.customCode===e);s&&i.removeTrigger(s);const l=d.emptyPlayerActTarg("F","CARD",this.code,""),u=a.target.toActions(l);u.length===0?a.batch.triggerDone():(u.push(a.action.noneEndTrigger()),a.action.ddf5(u))}}ddf7(t){return d.ddp4(t,t.playerA,t.lane,`${"FME"}${this.level}`)}}class ii extends rt{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Frostshatter Strike";const i=this.boof4711;this.text=`Deal ${i} damage to an enemy creature. Give a friendly creature ${a.log.jr9(i,0)} this turn.`}playTargets(){const t=super.playTargets();return this.friends().length>0&&t.push(d.crEnemyActTarg("CARD",this.code,"P1")),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof4711;s.hurtDirect(l,this.code);const u=d.mod("AT",l,this.code);u.expiry="ET",e.addMod(u),a.turn.spellCast()}}friends(t=""){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}getCardActions(t,i){const e=a.field.ddf6(t),s=this.friends(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=this.boof359,s=d.actionEvalBuffN(t,t.playerA,t.lane,e),l=a.field.jr5(i[1]);return s.vectors.push(d.ddp1(l.owner,l.lane,{dmg:e})),s}}}class ri extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Glaceus, Tundra Tyrant",this.jr1=this.boof5916,this.jr2=this.jr1+2,this.tribe.push("IC","EL"),this.hints=["TL"];const i=`Gain Rank: each enemy ${a.log.levelGateText(this.level,!0)}creature gets "When this is dealt damage, destroy it."`,e=this.level===3?"At the start of each turn, deal 1 damage to each enemy creature. ":"";this.text=e+i}jr3(t,i){const e=super.jr3(t,i);return e.jr4("RU",this.code),this.level===3&&e.jr4("TS",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.creatureTarg&&i.target.id===t.creatId)return!0}return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="RU"){const i=d.crEnemyTarg();i.level=a.target.ddf2(this.level),a.field.creatByTarget(i).forEach(e=>{e.jr4("DM",this.code),e.hints.push("DD"),e.changed=!0})}else if(t.trigger.type==="TS"){const i=Date.now();a.field.qEnemyCreats().forEach(e=>{e.hurtDirect(1,this.code,i)})}else if(t.trigger.type==="DM"){const i=a.field.jr5(t.creatId);i.status==="A"&&a.death.destroy(i,this.code)}a.batch.triggerDone()}}class ai extends rt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Grave Pact",this.isFree=this.level===3,this.text=`Destroy a friendly creature. Destroy an ${a.log.levelGateText(this.level+1,!0)}enemy creature.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=Date.now();a.death.destroy(s,this.code,l),a.death.destroy(e,this.code,l),a.turn.spellCast()}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return i.level=a.target.ddf2(this.level+1),a.target.toActions(i)}getCardActions(t,i){const e=a.field.ddf6(t),s=this.enemyTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=d.ddp8(t,e,"SD"),l=d.ddp1(t.playerA,t.lane);return l.destroy=!0,s.vectors.push(l),s}}}class si extends rt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Hungering Strike";const i=this.boof359;this.text=`Give a friendly creature +${i} attack. Give an enemy creature -${i} attack.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof359;s.buff(l,0),e.buff(-l,0),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=this.enemyTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=a.field.ddf6(t),l=a.field.jr5(i[1]),u=this.boof359;return e.vectors.push(d.ddp1(s.owner,s.lane,{att:-u}),d.ddp1(l.owner,l.lane,{att:u})),e}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}}class ni extends x{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Hunting Pack",this.jr1=this.boof3612,this.jr2=this.boof248,this.tribe.push("WF"),this.hints=["EML"],this.text=`When ${this.name} enters play, you have a 50% chance to put a copy of ${this.name} into an available lane.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("EF",this.code);return s.interactive=!0,e}handleAction(t){a.field.birthCreature(this.code,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){if(a.randInt(0,2)===1){const e=d.emptyPlayerActTarg("F","CARD",this.code,""),s=d.actionTarget("TB","NOTR",this.code,""),l=a.target.toActions([e,s]);l.length===1?a.batch.triggerDone():a.action.ddf5(l)}else a.batch.triggerDone()}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.code)}}class oi extends x{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Flame",this.jr1=this.lValN([7,12,20]),this.jr2=this.boof6915,this.tribe.push("FR","EL"),this.initAggro=!0,this.text=`When Iztek ${a.log.dbdtap()}, deal that much damage to that player again. When you play Iztek's Frost, replace this with a level ${this.level} Iztek, Avatar of Frost.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PC",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}else if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.ownerPlayerA)return a.cards.getCard(i.cardCode).cardCode()==="IFR"}return!1}jr8(t){if(t.trigger.type==="DM"){const i=t.event;a.player.ddf3(!t.ownerPlayerA,i.dmg,this.code)}else if(t.trigger.type==="PC"){const i=a.field.jr5(t.trigger.creatId);a.field.birthCreature(`${"IZL"}${this.level}`,"R",i.owner,i.lane)}a.batch.triggerDone()}}class hi extends x{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Frost",this.jr1=this.boof6915,this.jr2=this.lValN([7,12,20]),this.tribe.push("IC","EL"),this.initAggro=!0;const i=this.boof2510;this.text=`When you play Iztek's Flame, replace this with a level ${this.level} Iztek, Avatar of Flame. Activate: Deal ${i} damage to a creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PC",this.code),e}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp2(i,i.playerA,i.lane,{dmg:this.boof2510})}}canActivate(t){return!0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);i.hurtDirect(this.boof2510,this.code),e.endActivation()}ddf8(t){const i=t.event;return i.playerA===t.ownerPlayerA?a.cards.getCard(i.cardCode).cardCode()==="IFL":!1}jr8(t){const i=a.field.jr5(t.trigger.creatId);a.field.birthCreature(`${"IZL"}${this.level}`,"R",i.owner,i.lane),a.batch.triggerDone()}getCardActions(t,i){const e=i??a.field.jr5(t.param);return a.target.toActions([d.crActTarg("CARD",this.code,e.id),a.target.buttonTarget("CANC")])}}class li extends x{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Killion, Infinity Warden",this.maxLevel=4,this.jr1=this.lValN([6,9,16,22]),this.jr2=this.lValN([3,7,14,20]),this.tribe.push("FB");let i;this.level<3?i=`a ${a.log.levelGateText(this.level)} card in your`:this.level===3?i="a card in your hand and":i="each card in your hand, deck, and",this.text=`Forge: Level up ${i} discard pile.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=this.level<4,e}handleAction(t){const i=a.state.getActivePlayer();if(t.zone==="N"){const e=a.cards.getCard(i.discard[t.position]);i.discard[t.position]=e.levelUpCard(),a.mode.popMode(),a.action.actionDone(!0)}else{const e=a.cards.getCard(i.hand[t.position]);i.hand[t.position]=e.levelUpCard(),this.discardLevel(!0)}}jr8(t){if(this.level<3)this.discardLevel(!1);else if(this.level===3){const i=a.target.toActions(d.lvlHandActTarg(this.code,""));i.length>0?a.action.ddf5(i):this.discardLevel(!1)}else{const i=a.state.getActivePlayer();this.levelDeck(i.deck),this.levelDeck(i.hand),this.levelDeck(i.discard),a.batch.triggerDone()}}ddf7(t){return d.actionEval(t,"DC")}discardLevel(t){const i=a.state.getActivePlayer(),e=d.target("TD");e.player=a.player.toTarget(i),e.level=a.target.ddf2(this.level),e.canLevel=!0;const s=a.deck.generateContent(i.discard,!1,e);if(s.length>0){const l=s.map(u=>{const m=d.deckSelectAction("CARD",u.cardCode,u.sourceIdx);return m.hostCard=this.code,m});a.deck.showCustomDeck(s,l)}else t?a.action.actionDone(!0):a.batch.triggerDone()}levelDeck(t){t.map(e=>{const s=a.cards.getCard(e);return s.canLevel()?s.levelUpCard():e}).forEach((e,s)=>t[s]=e)}}class ci extends x{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Leafkin Progenitor",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("PL"),this.level===3?(this.text=`Activate: Put a level 1 ${this.name} into an adjacent available lane.`,this.bonus={exist:this.ddp9(1,6,3,0)}):(this.text=`Activate: Replace this with a level ${this.level+1} ${this.name}.`,this.bonus={exist:this.ddp9(0,12*this.level,6*this.level,0)})}canActivate(t){return this.level===3?a.action.emptyAdjacents(t,"").length>0:!0}startActivation(t){this.level===3?a.action.ddf5(this.getCardActions(d.ddf4(),t)):(a.field.birthCreature(this.leafCode(this.level+1),"R",t.owner,t.lane),t.endActivation())}handleAction(t){const i=a.field.jr5(t.param);a.field.birthCreature(this.leafCode(1),"P",t.playerA,t.lane),i.endActivation()}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=a.action.emptyAdjacents(e,"");return s.push(a.action.cancelAction()),s}ddf7(t){if(t.actionKey==="ACTV"){if(this.level===3)return d.ddp5(t);{const i=a.field.jr5(t.param),e=d.ddp4(t,i.owner,i.lane,this.leafCode(this.level+1));return e.hints=["RE"],e}}else{const i=t;return d.ddp4(t,i.playerA,i.lane,this.leafCode(1))}}leafCode(t){return`${"LKP"}${t}`}}class qt extends x{cardConstruct(t){({["AFO"]:()=>this.aetorC(),["CRS"]:()=>this.scootC(),["FOL"]:()=>this.forcC(),["TSM"]:()=>this.tsmithC()})[t]()}targAction(t,i,e){({["AFO"]:(l,u)=>this.doNossing(l,u),["CRS"]:(l,u)=>this.doNossing(l,u),["FOL"]:(l,u)=>this.doNossing(l,u),["TSM"]:(l,u)=>this.doNossing(l,u)})[t](i,e)}playTarg;optional=!1;ftext="";forgeLevels=[1,2,3,4];constructor(t){super(t),this.playTarg=d.lvlHandActTarg(this.code,""),this.cardConstruct(this.cardCode()),this.forgeLevels.includes(this.level)&&(this.text="Forge: "+this.ftext)}jr3(t,i){const e=super.jr3(t,i);if(this.forgeLevels.includes(this.level)){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){a.turn.levelAndDiscard(t);const i=a.field.jr5(t.param);this.targAction(this.cardCode(),t,i),a.action.actionDone(!0)}jr8(t){const i=a.target.toActions(this.playTarg);i.length>0?(i.forEach(e=>{e.param=t.creatId}),this.optional&&i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}doNossing(t,i){}ddf7(t){return d.actionEval(t,"DC")}aetorC(){this.faction="A",this.rarity="C",this.name="Aetherforge Oracle",this.jr1=this.boof61218,this.jr2=this.boof246,this.tribe.push("HM"),this.optional=!0,this.playTarg.card="S",this.ftext="You may discard and level up a spell.",this.bonus={play:.5}}scootC(){this.faction="A",this.rarity="R",this.name="Cerebral Scout",this.jr1=this.boof51015,this.jr2=this.boof3712,this.tribe.push("MM"),this.optional=!0,this.playTarg.tribe="MM",this.ftext="You may discard and level up a Metamind.",this.bonus={play:.5}}forcC(){this.faction="A",this.rarity="H",this.name="Forge Oracle",this.jr1=this.lValN([1,10,20]),this.jr2=this.jr1,this.tribe.push("ST"),this.playTarg.faction="A",this.optional=!0,this.ftext="You may discard an Alloyin card and level it.",this.level===1?(this.hints=["LV"],this.bonus={play:1}):(this.consistent=!0,this.bonus={play:.3})}tsmithC(){this.faction="A",this.rarity="C",this.name="Technosmith",this.jr1=this.boof5915,this.jr2=this.jr1-1,this.tribe.push("HM"),this.optional=!0,this.ftext=`You may ${a.log.daluac()}.`,this.bonus={play:.5}}}class di extends rt{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Metatransfer",this.text=`Give a creature ${a.log.jr9(-this.boof579,0)}. Discard and level up a card.`}playTargets(){const t=super.playTargets();return t.push(d.crActTarg("CARD",this.code,"P1")),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1"){const e=a.field.ddf6(t),s=d.lvlHandActTarg(this.code,a.enTil("P2",e.id));s.deckPositionSkip=a.action.cardBeingPlayed.position;const l=a.target.toActions(s);l.length===0?(this.logSpell(),e.buff(-this.boof579,0),a.turn.spellCast()):(l.push(a.action.cancelAction()),a.action.ddf5(l))}else{this.logSpell(),a.field.jr5(i[1]).buff(-this.boof579,0);const s=t;s.position0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.field.birthCreature(i.code,"P",t.playerA,t.lane),i.endActivation()}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=a.action.emptyAdjacents(e,"");return s.push(a.action.cancelAction()),s}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp4(t,i.playerA,i.lane,this.code)}}}class fi extends x{constructor(t){if(super(t),this.faction="U",this.rarity="L",this.name="Mimicwurm",this.jr1=7,this.jr2=this.jr1,this.tribe.push("WR"),this.level>1){this.hints=[this.level===2?"EMO":"EML"];const i=this.level-1;this.bonus={play:this.ddp9(i,14*i,7*i,0)}}this.text=this.lValS(["","Forge: You may put a level 1 Mimicwurm into another lane.","Forge: You may put a level 2 Mimicwurm into another lane. Then you may put a level 1 Mimicwurm into another lane."])}jr3(t,i){const e=super.jr3(t,i);if(this.level>1){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){a.deTil(t.param)[0]==="P1"?this.level===3?(this.wurmsign(2,t),a.action.ddf5(this.getCardActions(t))):(this.wurmsign(1,t),a.action.actionDone(!0)):(this.wurmsign(1,t),a.action.actionDone(!0))}jr8(t){a.action.ddf5(this.fieldActions("P1",[t.event.creature.lane]))}fieldActions(t,i){const e=d.actionTarget("TF","CARD",this.code,a.enTil(t,i[0]));e.player="F",e.lanes=a.field.laneIdx.filter(l=>!i.includes(l));const s=a.target.toActions(e);return s.push(a.action.noneEndTrigger()),s}wurmsign(t,i){a.field.birthCreature(this.wurmCode(t),"R",i.playerA,i.lane)}wurmCode(t){return`${"MMW"}${t}`}getCardActions(t,i){const e=a.deTil(t.param),s=[t.lane,parseInt(e[1])];return this.fieldActions("P2",s)}ddf7(t){const i=a.deTil(t.param),e=this.level===2||i[0]==="P2"?1:2,s=d.ddp4(t,t.playerA,t.lane,this.wurmCode(e));return s.final=e===1,s.hints=["RE"],s}}class Zt extends rt{lookup(t){return{["BRN"]:{c:()=>this.boutC(),z:(e,s)=>this.burner(e,s,8),e:e=>this.burnerEval(e,8)},["IFL"]:{c:()=>this.izfmC(),z:(e,s)=>this.burner(e,s,this.boof6915),e:e=>this.burnerEval(e,this.boof6915)},["LSK"]:{c:()=>this.lspkC(),z:(e,s)=>this.burner(e,s,this.boof6812),e:e=>this.burnerEval(e,this.boof6812)},["SOK"]:{c:()=>this.sealkC(),z:(e,s)=>this.burner(e,s,this.sealzap),e:e=>this.burnerEval(e,this.sealzap)},["SHK"]:{c:()=>this.shkC(),z:(e,s)=>this.shkZ(e,s),e:e=>this.shkE(e)}}[t]}cardCast(t,i,e){this.lookup(t).z(i,e)}castEval(t,i){return this.lookup(t).e(i)}playTarg;burner(t,i,e){i?t.hurtDirect(e,this.code):a.player.ddf3(t,e,this.code)}burnerEval(t,i){const e=d.actionEval(t,"ST");if(t.zone==="P")e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i));else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{dmg:i}))}return e}burnText(t){return`Deal ${t} damage to a creature or player.`}constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return t.push(this.playTarg),t.push(d.actionTarget("TP","CARD",this.code,"")),t}handleAction(t){this.logSpell();let i,e;t.zone==="P"?(i=!1,e=t.playerA):(e=a.field.ddf6(t),i=!0),this.cardCast(this.cardCode(),e,i),a.turn.spellCast()}ddf7(t){return this.castEval(this.cardCode(),t)}boutC(){this.faction="T",this.rarity="R",this.name="Burnout",this.overload=!0,this.maxLevel=1,this.text=this.burnText(8)}izfmC(){this.faction="T",this.rarity="T",this.name="Iztek's Flame",this.text=this.burnText(this.boof6915)}lspkC(){this.faction="T",this.rarity="C",this.name="Lightning Spark",this.text=this.burnText(this.boof6812)}sealkC(){this.faction="T",this.rarity="C",this.name="Seal of Kadras",this.level<3&&(this.hints=["LV"]),this.consistent=this.level>1,this.text=this.burnText(this.sealzap)}get sealzap(){return this.lValN([1,2,25])}shkC(){this.faction="T",this.rarity="H",this.name="Static Shock",this.text=`${this.burnText(this.boof124)} You may play an additional ${a.log.levelGateText(this.level,!0)}spell this turn.`}shkZ(t,i){this.burner(t,i,this.boof124);const e=a.turn.freeCard(this.code);e.condition.level=a.target.ddf2(this.level),e.condition.card="S"}shkE(t){const i=this.boof124,e=this.burnerEval(t,i);return e.bonus=1,e}}class gi extends x{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Nefrax, the Soulweaver",this.jr1=this.boof4712,this.jr2=this.lValN([10,15,25]),this.tribe.push("HM");const i=this.boof51015;this.text=`Activate: Put a ${i}/${i} Spirit into an available lane. Forge: Destroy a friendly creature.`,this.bonus={play:this.ddp9(1,i*2,i,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}canActivate(t){return this.empties(t).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1"){const e=a.field.jr5(i[1]);a.field.birthCreature(`${"SPN"}${this.level}`,"P",t.playerA,t.lane),e.endActivation()}else{const e=a.field.ddf6(t);a.death.destroy(e,this.code),a.action.actionDone(!0)}}jr8(t){const i=d.crFriendActTarg("CARD",this.code,""),e=a.target.toActions(i);a.action.ddf5(e)}empties(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,a.enTil("P1",t.id));return a.target.toActions(i)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param);let s;return s=this.empties(e),s.push(a.action.cancelAction()),s}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param),e=t;return i[0]==="P1"?d.ddp4(t,e.playerA,e.lane,`${"SPN"}${this.level}`):d.ddp7(t,e.playerA,e.lane)}}}class mi extends x{constructor(t){super(t),this.faction="N",this.rarity="T",this.name="Netherdrake",this.jr1=this.boof4815,this.jr2=this.jr1,this.initMobile=this.lValN([0,0,1]),this.tribe.push("DG"),this.hints=["FK"],this.text=`When this enters play or moves into a lane, destroy the opposing ${a.log.levelGateText(this.level,!0)}creature.`}image(t){return this.rawImage(`${"NSH"}${this.level}`,t)}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FK",this.code),e.jr4("EF",this.code),e}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){const e=t.event.creature.opposed;e&&a.target.levelTestCommon(e.level,this.level)&&a.death.destroy(e,this.code),a.batch.triggerDone()}}class pi extends zt{enforceEffect(t,i){i.lane===3?i.removeModSafe(i.id):i.addModSafe(d.mod("AR",this.boof236,i.id)),super.enforceEffect(t,i)}}class yi extends rt{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Omnomnom";const i=this.boof246,e=i*-1;this.text=`Give a friendly Zombie ${a.log.jr9(i,i,!0)}, and Regenerate ${i}. Then give an enemy non-Zombie ${a.log.jr9(e,e)}.`}playTargets(){const t=super.playTargets();if(this.nonZombies().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");i.tribe="ZB",t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof246;s.buff(l,l),s.addRegen(l),e.buff(-l,-l),a.turn.spellCast()}}nonZombies(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i).filter(e=>{const s=e;return!a.field.ddf6(s).isTribe("ZB")})}getCardActions(t,i){if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.action.cancelAction(),l=this.nonZombies(e.id);return l.push(s),l}return super.getCardActions(t,i)}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=this.boof246,l=d.ddp3(t,e,{att:s,hlt:s,rgn:s});return l.vectors.push(d.ddp1(t.playerA,t.lane,{att:-s,hlt:-s})),l}}}class bi extends x{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Onyxium Allomancer",this.jr1=this.boof248,this.jr2=this.boof61016,this.tribe.push("HM"),this.hints=["ALN","OL"];const i=this.boof358;this.text=`Activate: Discard and level up a card. Allied Nekrium: Regenerate ${i}.`,this.bonus={exist:this.ddp9(0,i,0,0,.5)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){return a.state.getPlayer(t.owner).hand.some(e=>a.cards.getCard(e).canLevel())}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.turn.levelAndDiscard(t),i.endActivation()}jr8(t){a.turn.allied("N")&&a.field.jr5(t.creatId).addRegen(this.boof358),a.batch.triggerDone()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.lvlHandActTarg(this.code,e.id);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){return t.actionKey==="ACTV"?d.ddp5(t):d.actionEval(t,"DC")}}class vi extends x{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Onyxium Phantasm",this.jr1=this.boof246,this.jr2=this.lValN([9,12,19]),this.initRegen=this.boof124,this.tribe.push("ST"),this.text=`Allied Alloyin: Activate: Give a creature ${a.log.jr9(this.boof4812n,0)}`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){return t.hasMod(t.id)}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.field.ddf6(t).buff(this.boof4812n,0),i.endActivation()}jr8(t){if(a.turn.allied("A")){const i=a.field.jr5(t.creatId);i.addMod(d.mod("AL",!0,i.id)),i.changed=!0}a.batch.triggerDone()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.crActTarg("CARD",this.code,e.id),l=a.target.toActions(s);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.actionEvalBuffN(t,i.playerA,i.lane,this.boof4812n)}}}class Ai extends rt{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Oratek Battlebrand",this.hints=["ALA"];const i=this.boof71013;this.text=`Deal ${i} damage to a creature. Allied Alloyin: You may discard a card and level it.`}playTargets(){const t=super.playTargets();return t.push(d.crActTarg("CARD",this.code,"")),t}handleAction(t){if(t.zone==="F"){this.logSpell();const i=t;if(a.field.ddf6(i).hurtDirect(this.boof71013,this.code),a.turn.allied("A")){const s=this.levelActs();s.length===1?a.turn.spellCast():a.action.ddf5(s)}else a.turn.spellCast()}else if(t.zone==="H"){const i=t;i.position0?(i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}}ddf7(t){return d.actionEval(t,"DC")}}class he extends x{hitCreature;constructor(t,i){super(t),this.hitCreature=i}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.creatureTarg===this.hitCreature&&i.creatureSrc&&i.source.id===t.creatId}return!1}}class Ti extends he{constructor(t){super(t,!1),this.faction="U",this.rarity="L",this.name="Oros, Deepwood's Chosen",this.jr1=this.lValN([7,11,16,0]),this.jr2=this.jr1,this.initBT=!0,this.maxLevel=4,this.tribe.push("FB"),this.hints=["OL","LKV"];const i=`When Oros ${a.log.dbdtap()}, you gain that much health.`,e=this.level===4?"Oros gets +attack and +health equal to your health. ":"";this.text=e+i}jr3(t,i){const e=super.jr3(t,i);return this.level===4&&e.addEffect("PH",this.code),e}jr8(t){const i=t.event;a.player.healPlayer(t.ownerPlayerA,i.dmg),a.batch.triggerDone()}enforceEffect(t,i){const e=a.state.getPlayer(i.owner).health;i.status==="A"&&(i.removeModSafe(i.id),i.addModSafe(d.mod("HL",e,i.id)),i.addModSafe(d.mod("MH",e,i.id)),i.addModSafe(d.mod("AT",e,i.id)))}}class Ci extends x{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Oxidon Spitter",this.jr1=this.boof7914,this.jr2=this.boof3510,this.tribe.push("DN"),this.l3=this.level===3,this.text=`Forge: Negate Armor from ${this.l3?"each":"an"} enemy creature.`}l3;jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!this.l3,e}jr8(t){if(this.l3)a.field.creatByTarget(d.crEnemyTarg()).forEach(i=>{i.negateArmor=!0}),a.batch.triggerDone();else{const i=d.crEnemyActTarg("CARD",this.code,""),e=a.target.toActions(i);e.length>0?a.action.ddf5(e):a.batch.triggerDone()}}handleAction(t){const i=a.field.ddf6(t);i.negateArmor=!0,a.action.actionDone(!0)}ddf7(t){const i=a.field.ddf6(t);return d.ddp3(t,i,{arm:-i.armor})}}class Gt extends x{lookup(t){return{["AFS"]:{c:()=>this.afsC(),a:e=>this.afsA(e),t:e=>this.afsT(e),e:e=>this.afsE(e)},["DMW"]:{c:()=>this.drixC(),a:e=>this.drixA(e),t:e=>this.drixT(e),e:e=>this.drixE(e)},["FGG"]:{c:()=>this.fggC(),a:e=>this.fggA(e),t:e=>this.fggT(e),e:e=>this.fggE(e)},["GHS"]:{c:()=>this.mvpC(),a:e=>this.mvpA(e),t:e=>this.mvpT(e),e:e=>this.mvpE(e)},["OWW"]:{c:()=>this.owwC(),a:e=>this.owwA(e),t:e=>this.owwT(e),e:e=>this.owwE(e)},["UPM"]:{c:()=>this.upakC(),a:e=>this.upakA(e),t:e=>this.upakT(e),e:e=>this.upakE(e)},["WFM"]:{c:()=>this.wfmC(),a:e=>this.wfmA(e),t:e=>this.wfmT(e),e:e=>this.wfmE(e)}}[t]}runAct(t,i){this.lookup(t).a(i)}testAct(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}canActivate(t){return this.testAct(this.cardCode(),t)}startActivation(t){this.runAct(this.cardCode(),t),t.endActivation()}ddf7(t){return this.lookup(this.cardCode()).e(t)}evalAfterPlayCards(t){return a.state.gs.turn.regularPlays>0||a.state.gs.turn.freeCards.length>0?d.actionEval(t,"NR"):d.actionEval(t,"ST")}afsC(){this.faction="A",this.rarity="L",this.name="Arcflight Squadron",this.jr1=this.boof4710,this.jr2=this.jr1+2,this.tribe.push("RB"),this.hints=["OL"],this.text=`Activate: You may play an additional ${a.log.levelGateText(this.level,!0)}Robot this turn.`}afsT(t){return!0}afsA(t){const i=a.turn.freeCard(this.code);i.condition.tribe="RB",i.condition.level=a.target.ddf2(this.level)}afsE(t){return d.actionEval(t,"ST")}drixC(){this.faction="A",this.rarity="L",this.name="Drix, the Mindwelder",this.jr1=this.boof3612,this.jr2=this.lValN([6,12,21]),this.tribe.push("MM"),this.text=`Activate, discard your hand: Each friendly Metamind gets ${a.log.jr9(this.level,0)} for each card discarded this way.`}drixT(t){return a.state.getActivePlayer().hand.length>0}drixA(t){const i=a.state.getPlayer(t.owner),e=i.hand.length*this.level;i.discard.push(...i.hand),i.hand=[];const s=d.crFriendTarg();s.tribe="MM",a.field.creatByTarget(s).forEach(l=>{l.buff(e,0)})}drixE(t){return this.evalAfterPlayCards(t)}fggC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Gamma",this.jr1=this.boof4816,this.jr2=this.jr1,this.tribe.push("RB","GD");const t=this.boof255080;this.text=`Activate, destroy five friendly Robot Guardians: Put a ${t}/${t} Forge Guardian Omega into this lane.`}fggT(t){return a.field.creatByTarget(this.fggTarg()).length===5}fggA(t){const i=t.lane,e=t.owner,s=Date.now();a.field.creatByTarget(this.fggTarg()).forEach(l=>a.death.destroy(l,this.code,s)),a.field.birthCreature(`${"FGO"}${this.level}`,"P",e,i)}fggTarg(){const t=d.crFriendTarg();return t.tribe="GD",t}fggE(t){const i=a.field.jr5(t.param),e=d.ddp4(t,i.owner,i.lane,`${"FGO"}${this.level}`);return e.hints=["RE"],e.bonus=100,e.type="ST",e}mvpC(){this.faction="U",this.rarity="C",this.name="Gemheart Sprout",this.jr1=this.boof357,this.jr2=this.jr1+this.level,this.initDefend=!0,this.tribe.push("PL"),this.text=`Activate: You gain health equal to ${this.level}x the number of friendly creatures.`}mvpT(t){return!0}mvpA(t){const i=a.field.ddf1().length;a.player.healPlayer(t.owner,i*this.level)}mvpE(t){return this.evalAfterPlayCards(t)}owwC(){this.faction="A",this.rarity="L",this.name="Oreian Warwalker",this.jr1=this.boof359,this.jr2=this.boof61018,this.tribe.push("RB"),this.text=`Activate: ${this.name} gets ${this.owwbuff+1}x attack.`}owwT(t){return!0}owwA(t){t.buff(t.attack*this.owwbuff,0)}get owwbuff(){return this.lValN([1,1,2])}owwE(t){return this.evalAfterPlayCards(t)}upakC(){this.faction="U",this.rarity="L",this.name="Uterra Packmaster",this.jr1=this.boof6914,this.jr2=this.jr1,this.tribe.push("HM");const t=this.boof124;this.text=`Activate: each other friendly Uterra creature gets ${a.log.jr9(t,t)}.`}upakT(t){return a.field.creatByTarget(this.upakTarg(t.id)).length>0}upakA(t){const i=this.boof124;a.field.creatByTarget(this.upakTarg(t.id)).forEach(e=>{e.buff(i,i)})}upakTarg(t){const i=d.crFriendNotMeTarg(t);return i.faction="U",i}upakE(t){return this.evalAfterPlayCards(t)}wfmC(){this.faction="T",this.rarity="H",this.name="Wildfire Maiden",this.jr1=this.boof4610,this.jr2=this.boof5814,this.tribe.push("FR","AS"),this.text=`Activate, destroy ${this.name}: Deal damage equal to its attack to each enemy creature.`}wfmT(t){return!0}wfmA(t){const i=Date.now();a.field.creatByTarget(d.crEnemyTarg()).forEach(e=>{e.hurtDirect(t.attack,this.code,i)}),a.death.destroy(t,this.code)}wfmE(t){const i=a.field.jr5(t.param),e=d.ddp8(t,i),s=!i.owner;return e.vectors.push(...a.field.laneIdx.map(l=>d.ddp1(s,l,{dmg:i.attack}))),e}}class ht extends x{lookup(t){return{["FGD"]:{c:()=>this.fgdC(),t:(e,s)=>this.fgdT(e,s),b:(e,s)=>this.fgdB(e,s)},["FSP"]:{c:()=>this.fspC(),t:(e,s)=>this.fspT(e,s),b:(e,s)=>this.fspB(e,s)},["HMF"]:{c:()=>this.hamfC(),t:(e,s)=>this.hamfT(e,s),b:(e,s)=>this.hamfB(e,s)},["HOD"]:{c:()=>this.haroldC(),t:(e,s)=>this.ocarT(e,s),b:(e,s)=>this.haroldB(e,s)},["OJC"]:{c:()=>this.ocarC(),t:(e,s)=>this.ocarT(e,s),b:(e,s)=>this.ocarB(e,s)},["RLW"]:{c:()=>this.restwandC(),t:(e,s)=>this.restwandT(e,s),b:(e,s)=>this.restwandB(e,s)},["RHW"]:{c:()=>this.ruthwandC(),t:(e,s)=>this.restwandT(e,s),b:(e,s)=>this.ruthwandB(e,s)},["SDR"]:{c:()=>this.spdryC(),t:(e,s)=>this.spdryT(e,s),b:(e,s)=>this.spdryB(e,s)},["TDW"]:{c:()=>this.tdwC(),t:(e,s)=>this.tdwT(e,s),b:(e,s)=>this.tdwB(e,s)},["UTR"]:{c:()=>this.urexC(),t:(e,s)=>this.urexT(e,s),b:(e,s)=>this.urexB(e,s)}}[t]}testBirth(t,i){return this.lookup(t).t(i,i.event)}actBirth(t,i){this.lookup(t).b(i,i.event)}iTrigger=!0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.iTrigger&&e.jr4("EF",this.code),e}ddf8(t){return t.event.code==="ENT"?this.testBirth(this.cardCode(),t):!1}jr8(t){this.actBirth(this.cardCode(),t),a.batch.triggerDone()}fgdC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Delta",this.jr1=this.boof71117,this.jr2=this.jr1,this.tribe.push("RB","GD");const t=this.boof255080;this.text=`When ${this.name} enters play, if there is a friendly Alpha Beta, and Gamma, put a ${t}/${t} Forge Guardian Omega in your discard pile.`}fgdT(t,i){return i.creature.id===t.creatId}fgdB(t,i){const e=d.crTarg();e.player=a.player.toTarget(t.ownerPlayerA);const s=a.field.creatByTarget(e).map(l=>l.code.slice(0,3));s.includes("FGA")&&s.includes("FGB")&&s.includes("FGG")&&a.player.toPlayer(t.ownerPlayerA).discard.push("FGO"+this.level)}fspC(){if(this.faction="A",this.rarity="L",this.name="Flowsteel Prototype",this.jr1=this.lValN([3,6,8]),this.jr2=this.lValN([8,15,20]),this.tribe.push("SS"),this.hints=["P1"],this.iTrigger=this.level>1,this.iTrigger){const t=a.log.levelGateText(this.level-1);this.text=`When you Forge a ${t} creature, ${this.name} gets +attack equal to that creature's attack.`;const i=this.avgCreatureStats(this.level-1);this.bonus={exist:this.ddp9(0,i[0],i[0],0)*.5}}}fspT(t,i){return!!(i.forged&&i.creature.owner===t.ownerPlayerA&&a.cards.getCard(i.creature.code).level0&&a.field.jr5(t.creatId).move(e[a.randInt(0,s)])}haroldC(){this.faction="T",this.rarity="R",this.name="Herald of Destruction",this.jr1=this.boof369,this.jr2=this.lValN([9,12,18]),this.tribe.push("FR","AS"),this.text=`When an enemy creature enters play, if it wasn't Forged, deal damage equal to ${this.name}'s attack to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,this.jr1)*.5}}haroldB(t,i){if(ht.itBirthedFirst(i.creature.id,t.creatId)){const e=a.field.jr5(t.creatId);a.player.ddf3(!e.owner,e.attack,this.code)}}ocarC(){this.faction="A",this.rarity="H",this.name="Oreian Justicar",this.jr1=this.boof5814,this.jr2=this.boof81220,this.tribe.push("HM");const t=this.ocarbuff;this.text=`When an enemy creature enters play, if it wasn't Forged, it gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)*-.5}}ocarT(t,i){return i.creature.owner!==t.ownerPlayerA&&!i.forged}ocarB(t,i){ht.itBirthedFirst(i.creature.id,t.creatId)&&i.creature.buff(this.ocarbuff,0)}get ocarbuff(){return this.lValN([-5,-10,-20])}restwandC(){this.faction="U",this.rarity="H",this.name="Restless Wanderers",this.jr1=this.boof51014,this.jr2=this.boof3610,this.tribe.push("ST","WD");const t=this.boof369;this.text=`When another friendly Spirit Wanderer enters play, ${this.name} gets ${a.log.jr9(t,t)}.`}restwandT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA?i.creature.isTribe("WD"):!1}restwandB(t,i){const e=a.field.jr5(t.trigger.creatId),s=this.boof369;e.buff(s,s)}ruthwandC(){this.faction="N",this.rarity="C",this.name="Ruthless Wanderers",this.jr1=this.boof3610,this.jr2=this.boof51014,this.tribe.push("ST","WD");const t=-this.boof369;this.text=`When another friendly Spirit Wanderer enters play, the creature opposing this gets ${a.log.jr9(t,t)}.`}ruthwandB(t,i){const s=a.field.jr5(t.trigger.creatId).opposed;if(s){const l=-this.boof369;s.buff(l,l)}}spdryC(){this.faction="U",this.rarity="R",this.name="Spring Dryad",this.jr1=this.boof469,this.jr2=this.jr1,this.tribe.push("DY"),this.hints=["P1"],this.text=`When a friendly creature enters play, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)}}spdryT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA}spdryB(t,i){a.field.jr5(t.trigger.creatId).buff(this.level,this.level)}tdwC(){this.faction="N",this.rarity="R",this.name="Tarsus Deathweaver",this.jr1=this.boof5915,this.jr2=this.jr1,this.tribe.push("HM");const t=this.boof246;this.text=`When a friendly creature enters play, if it wasn't Forged, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}tdwT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA&&!i.forged}tdwB(t,i){if(ht.itBirthedFirst(i.creature.id,t.creatId)){const e=this.boof246;i.creature.buff(e,e)}}urexC(){this.faction="U",this.rarity="H",this.name="Uterradon Rex",this.jr1=this.boof4813,this.jr2=this.boof71118,this.tribe.push("DN");const t=this.boof124;this.text=`When another friendly Dinosaur enters play, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}urexT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA&&i.creature.isTribe("DN")}urexB(t,i){if(ht.itBirthedFirst(i.creature.id,t.creatId)){const e=this.boof124;i.creature.buff(e,e)}}static itBirthedFirst(t,i){if(t===i)return!0;let e=!1;const s=a.death.findDeathTime(i);if(a.isUn(s))e=!0;else{const l=a.field.findBirthTime(t);(a.isUn(l)||l<=s)&&(e=!0)}return e}}class Lt extends he{lookup(t){return{["AGM"]:{c:()=>this.agamC(),h:(e,s,l,u)=>this.agamH(e,s,l,u)},["BWK"]:{c:()=>this.blwalkC(),h:(e,s,l,u)=>this.blwalkH(e,s,l,u)},["BRF"]:{c:()=>this.bfangC(),h:(e,s,l,u)=>this.bfangH(e,s,l,u)},["CDT"]:{c:()=>this.cadtC(),h:(e,s,l,u)=>this.cadtH(e,s,l,u)},["GSC"]:{c:()=>this.gcobC(),h:(e,s,l,u)=>this.gcobH(e,s,l,u)},["IHA"]:{c:()=>this.ibhaC(),h:(e,s,l,u)=>this.ibhaH(e,s,l,u)},["SHS"]:{c:()=>this.shimfC(),h:(e,s,l,u)=>this.shimfH(e,s,l,u)}}[t]}image(t){return this.rarity==="T"?this.fixedImage(t):this.leveledImage(t)}cardConstruct(t){this.hints=["OP"],this.lookup(t).c()}creatHit(t,i,e,s,l){this.lookup(t).h(i,e,s,l)}constructor(t){super(t,!0),this.cardConstruct(this.cardCode())}jr8(t){const i=t.event,e=i.source,s=i.target;e?this.creatHit(this.cardCode(),t,i,e,s):a.log.add("ERROR couldnt find creature - "+this.name),a.batch.triggerDone()}agamC(){this.faction="T",this.rarity="L",this.name="Agamemnon",this.jr1=this.boof4814,this.jr2=this.lValN([8,12,18]),this.level>1&&(this.initMobile=1,this.initAggro=this.level===3),this.tribe.push("GT"),this.text=`When ${this.name} ${a.log.dbdtac()} on your turn, this battles again.`}agamH(t,i,e,s){t.ownerPlayerA===a.state.ddf9()&&(e.extraBattles+=1)}blwalkC(){this.faction="N",this.rarity="R",this.name="Blight Walker",this.jr1=this.boof137,this.jr2=this.lValN([5,10,17]),this.tribe.push("ZB"),this.text=`When ${this.name} ${a.log.dbdtac(this.level)}, destroy that creature.`,this.hints.push("BX")}blwalkH(t,i,e,s){s.status==="A"&&a.target.levelTestCommon(s.level,this.level)&&a.death.destroy(s,this.code)}bfangC(){this.faction="U",this.rarity="T",this.name="Broodfang",this.jr1=this.level,this.jr2=this.level,this.maxLevel=this.level,this.minLevel=this.level,this.tribe.push("SN"),this.text=this.poisonText(this.jr1)}bfangH(t,i,e,s){s.addPoison(this.jr1)}poisonText(t){return`When ${this.name} ${a.log.dbdtac()}, give that creature gets Poison ${t}.`}cadtC(){this.faction="U",this.rarity="R",this.name="Cadaverous Thicket",this.jr1=this.boof135,this.jr2=this.lValN([7,12,22]),this.tribe.push("PL"),this.text=this.poisonText(this.jr1)}cadtH(t,i,e,s){s.addPoison(this.jr1)}gcobC(){this.faction="U",this.rarity="C",this.name="Ghostscale Cobra",this.jr1=this.boof4610,this.jr2=this.boof135,this.tribe.push("SN"),this.text=this.poisonText(this.jr1)}gcobH(t,i,e,s){s.addPoison(this.jr1)}ibhaC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Hammer of Anvillon",this.jr1=this.lValN([4,7,12,15]),this.jr2=this.lValN([7,11,17,25]),this.initArmor=this.lValN([1,3,5,20]),this.tribe.push("FB"),this.maxLevel=4;const t=this.level===4?"'s attack gets reduced to 0":` gets ${a.log.jr9(this.boof246n,0)}`;this.text=`When Ironbeard ${a.log.dbdtac()}, that creature${t}, and moves to an available enemy lane at random.`}ibhaH(t,i,e,s){if(s.status==="A"){const l=this.level===4?s.attack*-1:this.boof246n;s.buff(l,0);const u=a.field.emptyLanes(s.owner),m=u.length;m>0&&s.move(u[a.randInt(0,m)])}}shimfC(){this.faction="U",this.rarity="R",this.name="Shimmerfang Serpent",this.jr1=this.boof357,this.jr2=this.boof61016,this.tribe.push("SN"),this.text=`When ${this.name} ${a.log.dbdtac()}, that creatures gets that much Poison.`,this.hints.push("ATH")}shimfH(t,i,e,s){s.addPoison(i.dmg)}}class Dt extends he{lookup(t){return{["ABR"]:{c:()=>this.ashbC(),h:(e,s,l)=>this.ashyH(e,s,l)},["AMY"]:{c:()=>this.ashmC(),h:(e,s,l)=>this.ashyH(e,s,l)},["CFB"]:{c:()=>this.cfbC(),h:(e,s,l)=>this.cfbH(e,s,l)},["EFM"]:{c:()=>this.efmC(),h:(e,s,l)=>this.efmH(e,s,l)},["FBC"]:{c:()=>this.fbcC(),h:(e,s,l)=>this.fbcH(e,s,l)},["RTS"]:{c:()=>this.rzstC(),h:(e,s,l)=>this.rzstH(e,s,l)},["SVH"]:{c:()=>this.strhyC(),h:(e,s,l)=>this.strhyH(e,s,l)},["URB"]:{c:()=>this.uridC(),h:(e,s,l)=>this.uridH(e,s,l)},["VES"]:{c:()=>this.veskC(),h:(e,s,l)=>this.veskH(e,s,l)}}[t]}cardConstruct(t){this.hints=["OP","LKV"],this.lookup(t).c()}creatHit(t,i,e,s){this.lookup(t).h(i,e,s)}bothTurns=!0;constructor(t){super(t,!1),this.cardConstruct(this.cardCode())}jr8(t){const i=t.event,e=i.source;e&&(this.bothTurns||e.owner===a.state.ddf9())?this.creatHit(this.cardCode(),t,i,e):a.log.add("ERROR couldnt find creature - "+this.name),a.batch.triggerDone()}ashyC(){this.faction="T",this.rarity="C",this.tribe.push("FR","AS");const t=this.boof124;this.text=`When ${this.name} ${a.log.dbdtap()}, it gets ${a.log.jr9(t,t)}.`}ashyH(t,i,e){const s=this.boof124;e.buff(s,s)}ashbC(){this.name="Ashurian Brawler",this.jr1=this.boof7911,this.jr2=this.jr1,this.ashyC()}ashmC(){this.name="Ashurian Mystic",this.jr1=this.boof3610,this.jr2=this.boof5812,this.initAggro=!0,this.ashyC()}cfbC(){this.faction="T",this.rarity="H",this.name="Cinderfist Brawler",this.jr1=this.boof71014,this.jr2=this.boof357,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${a.log.dbdtap()}, deal that much damage to that player again.`}cfbH(t,i,e){a.player.ddf3(!e.owner,i.dmg,e.code)}efmC(){this.faction="T",this.rarity="L",this.name="Everflame Mystic",this.jr1=this.boof5813,this.jr2=this.jr1+1,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, you may play ${this.lValS(["one","two","three"])} spells this turn.`}efmH(t,i,e){if(a.state.ddf9()===e.owner)for(let s=0;sl.hurtDirect(i.dmg,this.code,s))}rzstC(){this.faction="T",this.rarity="C",this.name="Razortooth Stalker",this.jr1=this.boof4812,this.jr2=this.jr1+1,this.initMobile=1,this.tribe.push("DN");const t=this.boof235;this.text=`When ${this.name} ${a.log.dbdtap()}, it gets ${a.log.jr9(t,t)}.`}rzstH(t,i,e){const s=this.boof235;e.buff(s,s)}strhyC(){this.faction="U",this.rarity="C",this.name="Stranglevine Hydra",this.jr1=this.boof5815,this.jr2=this.jr1+1,this.tribe.push("HY"),this.text=`When ${this.name} ${a.log.dbdtap()}, it gets Regenerate ${this.level}.`}strhyH(t,i,e){e.addRegen(this.level)}uridC(){this.faction="U",this.rarity="L",this.name="Uterradon Ridgeback",this.jr1=this.boof71117,this.jr2=this.boof4713,this.initBT=!0,this.tribe.push("DN"),this.hints.push("FRS"),this.bothTurns=!1;const t=this.boof124;this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}uridH(t,i,e){const s=this.boof124,l=this.level===3;a.field.ddf1().forEach(u=>{u.buff(s,s),l&&(u.breakthrough=!0)})}veskC(){this.faction="N",this.rarity="L",this.name="Vyric Ebonskull",this.jr1=this.boof3713,this.jr2=this.boof71117,this.tribe.push("VP"),this.text=`When Vyric ${a.log.dbdtap()}, destroy an enemy ${a.log.levelGateText(this.level,!0)} creature at random.${this.level===3?" Then Spawn a copy of that creature.":""}`}veskH(t,i,e){const s=d.crTarg();s.player=a.player.toTarget(i.target),s.level=a.target.ddf2(this.level);const l=a.field.creatByTarget(s);if(l.length>0){const u=Date.now(),m=l[a.randInt(0,l.length)];a.death.destroy(m,this.code,u),this.level===3&&a.field.birthCreature(m.code,"S",e.owner,void 0,u)}}}class jt extends x{lookup(t){return{["CHR"]:{c:()=>this.crgC(),d:(e,s,l)=>this.crgD(e,s,l)},["DZD"]:{c:()=>this.dozC(),d:(e,s,l)=>this.dozD(e,s,l)},["IMD"]:{c:()=>this.eddieC(),d:(e,s,l)=>this.eddieD(e,s,l)},["TDS"]:{c:()=>this.tsrC(),d:(e,s,l)=>this.tsrD(e,s,l)}}[t]}constructor(t){super(t),this.lookup(this.cardCode()).c()}cares=!0;cardDamaged(t,i){const e=i.event,s=e.target;this.lookup(t).d(i,s,e)}image(t){return this.cardCode()==="DZD"?this.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return this.cares&&e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.creatureTarg&&i.target.id===t.creatId}return!1}jr8(t){this.cardDamaged(this.cardCode(),t),a.batch.triggerDone()}crgC(){this.faction="U",this.rarity="L",this.name="Chrogias",this.jr1=this.lValN([1,0,40]),this.jr2=this.lValN([1,15,40]),this.tribe.push("PL"),this.level===1?(this.hints=["LV","ST"],this.bonus={play:1},this.cares=!1):this.level===2?(this.initRegen=2,this.initDefend=!0,this.bonus={play:1}):this.level===3&&(this.initBT=!0,this.initRegen=5),this.level>1&&(this.hints=["DLK"],this.text="When Chrogias is dealt damage, you gain that much health.")}crgD(t,i,e){a.player.healPlayer(t.ownerPlayerA,e.dmg)}dozC(){this.faction="U",this.rarity="L",this.name="Dozer, the Dormant",this.jr1=0,this.jr2=this.level*3+6,this.tribe.push("BR"),this.initDefend=!0,this.hints=["DLK"],this.text=`When ${this.name} is dealt damage and survives, replace it with a ${this.jr2}/${this.jr2} Dozer, the Awakened`}dozD(t,i,e){if(i.health>0&&i.status==="A"){const s=a.field.birthCreature(`${"DZA"}${this.level}`,"R",i.owner,i.lane);s&&s.setHealth(i.health)}}eddieC(){this.faction="A",this.rarity="L",this.name="Iron Maiden",this.jr1=this.lValN([1,3,30]),this.jr2=this.jr1,this.tribe.push("RB"),this.consistent=this.level>1,this.level===3?(this.initBT=!0,this.hints=["DLK","LKR"],this.text="When Iron Maiden is dealt damage, deal that much damage to the enemy player."):(this.cares=!1,this.hints=["LV","ST"],this.bonus={play:1})}eddieD(t,i,e){a.player.ddf3(!t.ownerPlayerA,e.dmg,this.code)}tsrC(){this.faction="U",this.rarity="L",this.name="Thundersaur",this.jr1=0,this.jr2=this.level*12,this.tribe.push("DN"),this.initBT=!0,this.hints=["DLK","LKR"],this.text=`When ${this.name} is dealt damage, it gets +1 attack for each damage dealt.`}tsrD(t,i,e){i.buff(e.dmg,0)}}class ft extends x{lookup(t){return{["DFB"]:{c:()=>this.dfbC(),d:e=>this.dfbD(e)},["GGD"]:{c:()=>this.ggdC(),d:e=>this.ggdD(e)},["GGR"]:{c:()=>this.ggdrC(),d:e=>this.ggdrD(e)},["GGP"]:{c:()=>this.ggpC(),d:e=>this.ggpD(e)},["NGT"]:{c:()=>this.ngauntC(),d:e=>this.ngauntD(e)},["SRH"]:{c:()=>this.sharvC(),d:e=>this.sharvD(e)},["YNS"]:{c:()=>this.yuruC(),d:e=>this.yuruD(e)}}[t]}creatDied(t,i){this.lookup(t).d(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DS",this.code),e}ddf8(t){return t.trigger.type==="DS"}jr8(t){this.creatDied(this.cardCode(),t),a.batch.triggerDone()}dfbC(){this.faction="N",this.rarity="R",this.name="Dr. Frankenbaum",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.tribe.push("AB");const t=this.boof234;this.text=`When a friendly Abomination is destroyed, deal ${t} damage to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,t*2)}}dfbD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;(i.id===s.id||s.owner===i.owner&&s.isTribe("AB")&&ft.itDiedFirst(s.id,i.id))&&a.player.ddf3(!i.owner,this.boof234,this.code)}ggdC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Devourer",this.jr1=this.boof579,this.jr2=this.jr1-2,this.tribe.push("GG"),this.hints=["OL"],this.text=`When a creature is destroyed, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)*2}}ggdD(t){a.field.jr5(t.creatId).buff(this.level,this.level)}get doomb(){return this.lValN([1,1,2])}ggdrC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Doomrider",this.jr1=this.boof4712,this.jr2=this.jr1+2,this.tribe.push("GG");const t=this.doomb;this.text=`When a friendly creature is destroyed, ${this.name} moves to that creatures lane and gets ${a.log.jr9(t,t)}. Then give the opposing creature ${a.log.jr9(-t,-t)}.`,this.bonus={exist:this.ddp9(0,t*4,t*2,0)}}ggdrD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;if(s.owner===i.owner&&i.id!==s.id&&ft.itDiedFirst(s.id,i.id)&&!a.field.searchByLane(s.lane,s.owner)){const u=this.doomb;i.move(s.lane),i.buff(u,u);const m=i.opposed;m&&m.buff(-u,-u)}}ggpC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Predator",this.jr1=this.boof5914,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("GG"),this.hints=["OP"];const t=this.boof246;this.text=`When the opposing creature is destroyed, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,2*t,t,0)}}ggpD(t){const i=a.field.jr5(t.creatId),e=a.field.oppositeLane(i.lane),s=t.event;if(s.creature.owner!==i.owner&&s.creature.lane===e){const l=this.boof246;i.buff(l,l)}}ngauntC(){this.faction="N",this.rarity="R",this.name="Nightgaunt",this.jr1=this.boof4815,this.jr2=this.jr1+1,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets Regenerate 1.`,this.bonus={exist:this.ddp9(0,4,0,0)}}ngauntD(t){a.field.jr5(t.creatId).addRegen(1)}sharvC(){this.faction="N",this.rarity="C",this.name="Sorrow Harvester",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("AB"),this.text="When a friendly Abomination is destroyed on your turn, draw a card.",this.bonus={exist:.25}}sharvD(t){const e=t.event.creature;e.owner===t.ownerPlayerA&&e.isTribe("AB")&&a.state.ddf9()===t.ownerPlayerA&&ft.itDiedFirst(e.id,t.creatId)&&a.player.drawCard(t.ownerPlayerA,1)}yuruC(){this.faction="N",this.rarity="L",this.name="Yuru, the Necrosage",this.jr1=3,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("HM"),this.hints=["LJ"];const t=this.boof5814;this.text=`When an adjacent non-Spirit creature is destroyed, put a ${t}/${t} Spirit into that lane.`,this.bonus={exist:this.ddp9(1,t*2,t,0)}}yuruD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;s.owner===i.owner&&i.adjacent.includes(s.lane)&&!s.isTribe("ST")&&ft.itDiedFirst(s.id,i.id)&&a.field.birthCreature(`${"XYR"}${this.level}`,"P",i.owner,s.lane)}static itDiedFirst(t,i){if(t===i)return!0;let e=!1;const s=a.death.findDeathTime(i);if(a.isUn(s))e=!0;else{const l=a.death.findDeathTime(t);(a.isUn(l)||l<=s)&&(e=!0)}return e}}class M extends x{lookup(t){return{["AGK"]:{c:()=>this.agknitC(),f:e=>this.agknitF(e)},["AFR"]:{c:()=>this.afsC(),f:e=>this.afsF(e)},["BTR"]:{c:()=>this.bwtC(),f:e=>this.bwtF(e)},["BSS"]:{c:()=>this.bssC(),f:e=>this.bssF(e)},["BZD"]:{c:()=>this.bzdrC(),f:e=>this.bzdrF(e)},["BFM"]:{c:()=>this.bfmC(),f:e=>this.bfmF(e)},["CTI"]:{c:()=>this.charnC(),f:e=>this.charnF(e)},["CHH"]:{c:()=>this.chihC(),f:e=>this.chihF(e)},["CSW"]:{c:()=>this.chickenC(),f:e=>this.chickenF(e)},["DFR"]:{c:()=>this.dfrC(),f:e=>this.dfrF(e)},["DBA"]:{c:()=>this.dbaC(),f:e=>this.dbaF(e)},["DDD"]:{c:()=>this.dddC(),f:e=>this.dddF(e)},["EWT"]:{c:()=>this.espwrC(),f:e=>this.espwrF(e)},["FWT"]:{c:()=>this.fwtC(),f:e=>this.fwtF(e)},["GSW"]:{c:()=>this.gwurmC(),f:e=>this.gwurmF(e)},["GSS"]:{c:()=>this.gsC(),f:e=>this.gsF(e)},["IMA"]:{c:()=>this.iracoC(),f:e=>this.iracoF(e)},["LGT"]:{c:()=>this.legtitC(),f:e=>this.legtitF(e)},["LBD"]:{c:()=>this.lbdC(),f:e=>this.lbdF(e)},["LMV"]:{c:()=>this.lyrC(),f:e=>this.lyrF(e)},["MOE"]:{c:()=>this.moeC(),f:e=>this.moeF(e)},["MMA"]:{c:()=>this.mmaC(),f:e=>this.mmaF(e)},["NSY"]:{c:()=>this.nysymC(),f:e=>this.nysymF(e)},["OXM"]:{c:()=>this.onxmarC(),f:e=>this.onxmarF(e)},["OFM"]:{c:()=>this.ofmC(),f:e=>this.ofmF(e)},["OPK"]:{c:()=>this.orpC(),f:e=>this.orpF(e)},["PHM"]:{c:()=>this.phmC(),f:e=>this.phmF(e)},["PSM"]:{c:()=>this.palsC(),f:e=>this.palsF(e)},["SMD"]:{c:()=>this.scorchC(),f:e=>this.scorchF(e)},["SDN"]:{c:()=>this.souldrC(),f:e=>this.souldrF(e)},["SBD"]:{c:()=>this.sbdC(),f:e=>this.sbdF(e)},["SSK"]:{c:()=>this.sssC(),f:e=>this.sssF(e)},["SYL"]:{c:()=>this.lotusC(),f:e=>this.lotusF(e)},["TGI"]:{c:()=>this.tgiC(),f:e=>this.tgiF(e)},["UGL"]:{c:()=>this.umglidC(),f:e=>this.umglidF(e)},["UWL"]:{c:()=>this.uwarC(),f:e=>this.uwarF(e)},["UWS"]:{c:()=>this.ustokeC(),f:e=>this.ustokeF(e)},["UTM"]:{c:()=>this.umaulC(),f:e=>this.umaulF(e)},["VNS"]:{c:()=>this.vnsC(),f:e=>this.vnsF(e)},["WWP"]:{c:()=>this.wwpC(),f:e=>this.wwpF(e)},["WFB"]:{c:()=>this.wfbC(),f:e=>this.wfbF(e)}}[t]}cardForge(t,i){this.lookup(t).f(i)}ftext="";forges=!0;flanks=!1;allied="X";constructor(t){super(t),this.lookup(this.cardCode()).c();let i="";this.flanks&&(i="Flank"),this.forges&&(i?i="Forge/"+i:i=a.log.forglied(this.allied)),i&&(this.text=i+": "+this.ftext),this.ftext=""}jr3(t,i){const e=super.jr3(t,i);return this.forges&&e.jr4("FR",this.code),this.flanks&&e.jr4("FK",this.code),e}jr8(t){this.cardForge(this.cardCode(),t),a.batch.triggerDone()}agknitC(){this.faction="A",this.rarity="L",this.name="Aegis Knight",this.jr1=this.boof5814,this.jr2=this.jr1,this.tribe.push("HM"),this.initArmor=this.lValN([1,2,5]),this.hints=["P2","OP"],this.bonus={play:this.ddp9(0,this.initArmor*2,0,0)},this.ftext="Each friendly creature deals damage equal to its Armor to the opposing creature"}agknitF(t){const i=d.crFriendTarg();i.hasArmor=!0;const e=Date.now();a.field.creatByTarget(i).forEach(s=>{s.opposed&&s.opposed.hurtDirect(s.armor,s.code,e)})}afsC(){this.faction="T",this.rarity="H",this.name="Ashurian Flamesculptor",this.jr1=this.boof5915,this.jr2=this.boof3610,this.tribe.push("FR","AS"),this.forges=this.level>1,this.consistent=this.forges,this.ftext=`You may play an additional ${a.log.levelGateText(this.level-1)} Tempys spell this turn.`,this.forges&&(this.bonus={play:this.ddp9(0,0,0,0,(this.level-1)/2)})}afsF(t){const i=a.turn.freeCard(this.code);i.condition.card="S",i.condition.level=a.target.ddf2(this.level-1),i.condition.faction="T"}bwtC(){if(this.faction="U",this.rarity="H",this.name="Bramblewood Tracker",this.jr1=this.boof3712,this.jr2=this.jr1+3,this.tribe.push("HM"),this.forges=this.level>1,this.forges){const t=this.level-1;this.ftext=`You may play an additional ${a.log.levelGateText(t)} Uterra creature this turn.`,this.bonus={play:this.ddp6(t)},this.consistent=!0}else this.hints=["LV"]}bwtF(t){const i=a.turn.freeCard(this.code);i.condition.card="C",i.condition.faction="U",i.condition.level=a.target.ddf2(this.level-1)}bssC(){this.faction="A",this.rarity="L",this.name="Brightsteel Sentinal",this.jr1=this.boof4914,this.jr2=this.jr1+1,this.tribe.push("RB"),this.hints=["P2","OP"];const t=this.boof51015;this.bonus={play:this.ddp9(0,t*1.5,0,0)},this.ftext=`Each friendly Robot gets Armor ${t} this turn.`}bssF(t){const i=this.boof51015,e=d.crFriendTarg();e.tribe="RB",e.canArmor=!0,a.field.creatByTarget(e).forEach(l=>{const u=d.mod("AR",i,t.creatId);u.expiry="ET",l.addMod(u)})}bzdrC(){this.faction="N",this.rarity="R",this.name="Byzerak Drake",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.initRegen=this.level,this.allied="T",this.tribe.push("DG"),this.hints=["ALT"],this.ftext=`Mobility ${this.level}.`}bzdrF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addMobility(this.level)}bfmC(){this.faction="N",this.rarity="H",this.name="Byzerak Frostmaiden",this.jr1=this.boof135,this.jr2=this.boof91420,this.tribe.push("HM"),this.hints=["ALT","OP","FH"],this.flanks=!0;const t=this.boof246;this.ftext=`If ${this.name} is opposed, the opposing creature gets ${a.log.jr9(-1*t,0)} and this gets ${a.log.jr9(t,0)}. Allied Tempys: Mobility ${this.level}.`;const i=this.ddp9(0,t*2,t*2,0);this.bonus={play:i,exist:i/2}}bfmF(t){const e=t.event.creature;t.trigger.type==="FR"&&a.turn.allied("T")&&e.addMobility(this.level);const s=e.opposed;if(s){const l=this.boof246;s.buff(-1*l,0),e.buff(l,0)}}charnC(){this.faction="N",this.rarity="C",this.name="Charnel Titan",this.jr1=this.boof359,this.jr2=this.boof5814,this.tribe.push("AB");const t=this.boof357;this.ftext=`If there is an enemy creature with ${t} or less attack, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,2*t,t,0)/2}}charnF(t){const i=this.boof357,e=d.crEnemyTarg();e.maxAttack=i,a.field.creatByTarget(e).length>0&&a.field.jr5(t.creatId).buff(i,i)}chihC(){this.faction="U",this.rarity="C",this.name="Chistlehearth Hunter",this.jr1=this.lValN([2,6,11]),this.jr2=this.boof81217,this.tribe.push("HM"),this.hints=["P2","FRF"],this.ftext=`${this.name} gets ${a.log.jr9(1,0)} for each other friendly creature.`,this.bonus={play:this.ddp9(0,2,2,0)}}chihF(t){const i=a.field.ddf1().length;i>1&&a.field.jr5(t.creatId).buff(i-1,0)}chickenC(){this.faction="T",this.rarity="L",this.name="Cindersmoke Wyvern",this.jr1=this.boof3610,this.jr2=this.lValN([7,12,17]),this.tribe.push("DG"),this.initMobile=this.boof124,this.hints=["FH"],this.forges=!1,this.flanks=!0,this.ftext="Deal damage equal to its attack to the opposing creature. If there is no opposing creature, deal that damage to the enemy player instead.",this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)}}chickenF(t){const i=t.event,e=i.creature.attack,s=i.creature.opposed;s?s.hurtDirect(e,this.code):a.player.ddf3(!t.ownerPlayerA,e,this.code)}dfrC(){this.faction="N",this.rarity="H",this.name="Darkfrost Reaper",this.jr1=this.boof6916,this.jr2=this.boof3713,this.tribe.push("SK"),this.ftext="Destroy each creature with 1 or less attack.",this.bonus={play:this.ddp6()/5}}dfrF(t){const i=d.crTarg();i.maxAttack=1;const e=a.field.creatByTarget(i),s=Date.now();e.forEach(l=>{a.death.destroy(l,this.code,s)})}dbaC(){this.faction="U",this.rarity="H",this.name="Deepbranch Ancient",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("HY"),this.hints=["FRF"],this.ftext=`If there is a friendly creature in each lane, ${this.name} gets ${a.log.jr9(this.jr1,this.jr2)}.`,this.bonus={play:this.ddp9(0,this.jr1*2,this.jr1,0)/4}}dbaF(t){a.field.ddf1().length===5&&a.field.jr5(t.creatId).buff(this.jr1,this.jr2)}dddC(){this.faction="N",this.rarity="L",this.name="Doomwing, Dire Drake",this.jr1=this.boof61018,this.jr2=this.lValN([2,6,10]),this.initMobile=this.level,this.tribe.push("DG"),this.hints=["FK"],this.forges=!1,this.flanks=!0,this.ftext=`Destroy the opposing ${a.log.levelGateText(this.level,!0)}creature.`,this.bonus={exist:this.ddp6()/2}}dddF(t){const e=t.event.creature.opposed;e&&a.target.levelTestCommon(e.level,this.level)&&a.death.destroy(e,this.code)}espwrC(){this.faction="U",this.rarity="R",this.name="Esperian Wartusk",this.jr1=this.boof5916,this.jr2=this.jr1-1,this.initBT=!0,this.allied="A",this.tribe.push("TK"),this.hints=["ALA"];const t=this.boof124;this.ftext=`Armor ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}espwrF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addArmor(this.boof124)}fwtC(){this.faction="U",this.rarity="H",this.name="Frostwild Tracker",this.jr1=this.boof4712,this.jr2=this.boof248,this.tribe.push("TG"),this.forges=this.level>1;const t=this.level-1;this.ftext=`You may play an additional ${a.log.levelGateText(t)} creature this turn.`,this.level>1?this.bonus={play:this.ddp6(t)}:this.hints=["LV"]}fwtF(t){const i=a.turn.freeCard(this.code);i.condition.card="C",i.condition.level=a.target.ddf2(this.level-1)}gwurmC(){this.faction="N",this.rarity="C",this.name="Gloomspire Wurm",this.jr1=this.boof4813,this.jr2=this.jr1,this.tribe.push("WR"),this.hints=["ENN"],this.ftext=`If there are no enemy creatures, ${this.name} gets ${a.log.jr9(4,4)}.`}gwurmF(t){a.field.qEnemyCreats().length===0&&a.field.jr5(t.creatId).buff(4,4)}gsC(){this.faction="U",this.rarity="C",this.name="Glowstride Stag",this.jr1=this.boof5812,this.jr2=this.jr1+this.level,this.tribe.push("ST");const t=this.boof51015;this.ftext=`You gain ${t} health.`,this.bonus={play:this.ddp9(0,0,0,t)}}gsF(t){const i=this.boof51015;a.player.healPlayer(t.ownerPlayerA,i),a.log.add("Glowstride flexed for "+i)}iracoC(){this.faction="A",this.rarity="L",this.name="Ironmind Acolyte",this.jr1=this.boof61015,this.jr2=this.jr1-2,this.tribe.push("GN"),this.hints=["P1"],this.ftext="If you have five or more cards in your hand, you may play an additional card this turn.",this.bonus={play:this.ddp6()/5}}iracoF(t){a.player.toPlayer(t.ownerPlayerA).hand.length>4&&(a.state.gs.turn.regularPlays+=1)}legtitC(){this.faction="N",this.rarity="R",this.name="Legion Titan",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("ZB"),this.hints=["ENF"],this.ftext=`${this.name} gets ${a.log.jr9(this.level,this.level)} for each enemy creature with ${this.boof357} or less attack.`,this.bonus={play:this.ddp9(0,this.level*2,this.level,0)/2}}legtitF(t){const i=d.crEnemyTarg();i.maxAttack=this.boof357;const e=a.field.creatByTarget(i);if(e.length>0){const s=this.level*e.length;a.field.jr5(t.creatId).buff(s,s)}}lbdC(){this.faction="U",this.rarity="H",this.name="Lifeblood Dryad",this.jr1=this.lValN([4,7,9]),this.jr2=this.jr1,this.tribe.push("DY"),this.hints=["FRF"];const t=this.boof236;this.ftext=`If there is a friendly creature in each lane, each other friendly creature gets ${a.log.jr9(t,t)}`,this.bonus={play:this.ddp9(0,t*2,t,0)}}lbdF(t){const i=a.field.creatByTarget(d.crFriendNotMeTarg(t.creatId));if(i.length===4){const e=this.boof236;i.forEach(s=>s.buff(e,e))}}lyrC(){this.faction="N",this.rarity="L",this.name="Lyria, Muse of Varna",this.jr1=this.boof5815,this.jr2=this.boof4714,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=this.level===2?"Spawn a random creature that was destroyed this game.":"Put a random creature that was destroyed this game into each of your available lanes.",this.forges?(this.hints=["EML"],this.bonus={play:this.ddp6(1)*(this.level-1)}):this.hints=["LV"]}lyrF(t){if(this.level===2){const i=a.death.gravedigger();i&&a.field.birthCreature(i,"S",t.ownerPlayerA)}else if(this.level===3){const i=a.field.emptyLanes(t.ownerPlayerA),e=i.map(s=>a.death.gravedigger());if(i.length>0&&e[0]){const s=Date.now();i.forEach((l,u)=>{a.field.birthCreature(e[u],"P",t.ownerPlayerA,l,s)})}}}moeC(){this.faction="T",this.rarity="H",this.name="Master of Elements",this.jr1=this.boof5917,this.jr2=this.jr1,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=`You may play an additional ${a.log.levelGateText(this.level-1)} spell this turn.`,this.forges&&(this.bonus={play:this.ddp9(0,0,0,0,(this.level-1)/2)})}moeF(t){const i=a.turn.freeCard(this.code);i.condition.card="S",i.condition.level=a.target.ddf2(this.level-1)}mmaC(){this.faction="A",this.rarity="C",this.name="Metamind Adept",this.jr1=this.boof5915,this.jr2=this.boof4813,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`Draw ${this.level} card${t}.`,this.bonus={play:this.ddp9(0,0,0,0,this.level/4)}}mmaF(t){a.player.drawCard(t.ownerPlayerA,this.level)}nysymC(){this.faction="N",this.rarity="C",this.name="Nyrali Symbiote",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("OZ"),this.hints=["OP"];const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets Regenerate ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}nysymF(t){const i=t.event;i.creature.opposed&&i.creature.addRegen(this.boof246)}ofmC(){this.faction="A",this.rarity="R",this.name="Oreian Fieldmarshal",this.jr1=this.boof5914,this.jr2=this.jr1-2,this.tribe.push("HM"),this.hints=["FRS"];const t=this.boof135;this.ftext=`Each other friendly creature gets ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t*2,t*2,0)}}ofmF(t){const i=this.boof135;a.field.creatByTarget(d.crFriendNotMeTarg(t.creatId)).forEach(s=>{s.buff(i,0)})}orpC(){this.faction="A",this.rarity="R",this.name="Oreian Peacekeeper",this.jr1=this.boof4816,this.jr2=this.boof248,this.tribe.push("RB"),this.hints=["OP"],this.ftext=`${this.name} gets Armor ${this.jr1} this turn.`,this.bonus={play:this.ddp9(0,this.jr1,0,0)}}orpF(t){const i=a.field.jr5(t.creatId),e=d.mod("AR",this.jr1,t.creatId);e.expiry="ET",i.addMod(e)}onxmarC(){this.faction="A",this.rarity="R",this.name="Onyxium Marauder",this.jr1=this.boof4714,this.jr2=this.lValN([6,9,17]),this.initArmor=this.level,this.allied="N",this.tribe.push("HM"),this.hints=["ALN"],this.ftext=`Regenerate ${this.level}.`,this.bonus={play:this.ddp9(0,this.level,0,0)}}onxmarF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addRegen(this.level)}phmC(){this.faction="A",this.rarity="R",this.name="Palladium Hindermind",this.jr1=this.boof2612,this.jr2=this.boof61016,this.tribe.push("HM"),this.hints=["ENF"],this.ftext=`Each enemy creature gets ${a.log.jr9(this.boof123n,0)}.`;const t=this.level*2;this.bonus={play:this.ddp9(0,t,t,0)}}phmF(t){const i=this.boof123n;a.field.qEnemyCreats().forEach(e=>{e.buff(i,0)})}palsC(){this.faction="A",this.rarity="L",this.name="Palladium Simulacrum",this.jr1=this.boof4816,this.jr2=this.boof248,this.initMobile=this.level-1,this.tribe.push("SS"),this.hints=["NX"],this.flanks=!0,this.ftext=`If ${this.name} is in the center lane, Spawn a copy.`,this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0)}}palsF(t){t.event.creature.lane===3&&a.field.birthCreature(this.code,"S",t.ownerPlayerA)}scorchC(){this.faction="T",this.rarity="L",this.name="Scorchmane Dragon",this.jr1=this.lValN([0,12,24]),this.jr2=this.boof61224,this.tribe.push("DG"),this.initDefend=this.level===1,this.initMobile=this.level-1,this.forges=this.level>1,this.ftext="Deal 5 damage to "+(this.level===2?"the opposing creature.":"each enemy creature and player."),this.level===1?this.hints=["LV"]:this.level===2?(this.hints=["OP"],this.bonus={play:this.ddp9(0,5,0,0)}):this.bonus={play:this.ddp9(0,10,0,5)}}scorchF(t){const i=t.event,e=!t.ownerPlayerA;if(this.level===2){const s=i.creature.opposed;s&&s.hurtDirect(5,this.code)}else if(this.level===3){const s=Date.now();a.field.qPlayerCreats(e).forEach(l=>l.hurtDirect(5,this.code,s)),a.player.ddf3(e,5,this.code)}}souldrC(){this.faction="N",this.rarity="L",this.name="Soul Drinker",this.jr1=1,this.jr2=this.boof4814,this.initMobile=this.level===3?1:0,this.tribe.push("VP"),this.hints=["OP"],this.flanks=this.level===3,this.ftext=`The opposing creature's attack gets reduced to 0 and ${this.name} gains that much attack.`;const t=this.avgCreatureStats()[0]*2;this.bonus={play:this.ddp9(0,t,t,0)}}souldrF(t){const i=t.event,e=i.creature.opposed;if(e){const s=e.attack;i.creature.buff(s,0),e.buff(-1*s,0)}}sbdC(){this.faction="U",this.rarity="C",this.name="Spiritbloom Dryad",this.jr1=this.boof6812,this.jr2=this.jr1+this.level,this.tribe.push("DY"),this.ftext=`Each player gains ${this.boof468} health.`}sbdF(t){const i=this.boof468;a.player.healPlayer(!0,i),a.player.healPlayer(!1,i)}sssC(){this.faction="A",this.rarity="C",this.name="Steelskin Spelunker",this.jr1=this.boof5814,this.jr2=this.boof61018,this.tribe.push("HM"),this.ftext=`If there is another friendly creature in the center lane, that creature gets Armor ${this.boof124}`}sssF(t){const i=a.field.searchByLane(3,t.ownerPlayerA);i&&i.id!==t.creatId&&!i.negateArmor&&i.addArmor(this.boof124)}lotusC(){this.faction="U",this.rarity="H",this.name="Stygian Lotus",this.jr1=this.boof468,this.jr2=this.jr1-1,this.tribe.push("PL"),this.hints=["ENF","EML","OP"],this.ftext=`If ${this.name} is opposed, spawn a copy of it. Then repeat this for each copy.`,this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0)}}lotusF(t){if(t.event.creature.opposed){let e=!0;for(;e;){const s=a.field.emptyLanes(t.ownerPlayerA),l=s.length;if(l===0)e=!1;else{const u=s[a.randInt(0,l)];a.field.birthCreature(this.code,"P",t.ownerPlayerA,u).opposed||(e=!1)}}}}tgiC(){this.faction="T",this.rarity="R",this.name="Thundergale Invoker",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("WN","GT"),this.hints=["LJ"],this.ftext=`Each creature adjacent to ${this.name} moves one lane away if possible.`}tgiF(t){const i=a.field.jr5(t.creatId),e=i.lane,s=i.owner;if(e>2){const l=a.field.searchByLane(e-1,s);l&&(a.field.searchByLane(e-2,s)||l.move(e-2))}if(e<4){const l=a.field.searchByLane(e+1,s);l&&(a.field.searchByLane(e+2,s)||l.move(e+2))}}umglidC(){this.faction="T",this.rarity="R",this.name="Umbruk Glider",this.jr1=this.boof71117,this.jr2=this.jr1-4,this.initMobile=this.level,this.allied="U",this.tribe.push("DN"),this.hints=["ALU"],this.ftext="Breakthrough."}umglidF(t){if(a.turn.allied(this.allied)){const i=a.field.jr5(t.creatId);i.breakthrough=!0}}uwarC(){this.faction="T",this.rarity="H",this.name="Uranti Warlord",this.jr1=this.boof3713,this.jr2=this.boof71117,this.tribe.push("FR","YT"),this.hints=["OP"],this.ftext=`Each friendly Yeti deals ${this.jr1} damage to the opposing creature.`,this.bonus={play:this.ddp9(0,this.jr1,0,0)}}uwarF(t){const i=d.crFriendTarg();i.tribe="YT";const e=a.field.creatByTarget(i),s=Date.now();e.forEach(l=>{const u=l.opposed;u&&u.hurtDirect(this.jr1,l.code,s)})}ustokeC(){this.faction="T",this.rarity="R",this.name="Uranti Warstoker",this.jr1=this.boof6812,this.jr2=this.jr1-1,this.tribe.push("YT"),this.ftext=`Each other friendly Yeti get ${a.log.jr9(this.stokeboof,0)} this turn.`}ustokeF(t){const i=d.crFriendNotMeTarg(t.creatId);i.tribe="YT";const e=a.field.creatByTarget(i),s=this.stokeboof;e.forEach(l=>{const u=d.mod("AT",s,t.creatId);u.expiry="ET",l.addMod(u)})}get stokeboof(){return this.lValN([3,4,6])}umaulC(){this.faction="U",this.rarity="C",this.name="Uterradon Mauler",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("DN"),this.hints=["OP"];const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}umaulF(t){const i=t.event;if(i.creature.opposed){const e=this.boof246;i.creature.buff(e,e)}}vnsC(){this.faction="U",this.rarity="H",this.name="Venomous Netherscale",this.jr1=this.boof4713,this.jr2=this.jr1+4,this.tribe.push("NG"),this.ftext=`Double the Poison on each enemy creature${this.level===3?" and the enemy player":""}.`}vnsF(t){const i=d.crEnemyTarg();i.hasPoison=!0,a.field.creatByTarget(i).forEach(s=>{s.addPoison(s.poison)})}wwpC(){this.faction="U",this.rarity="H",this.name="Weirwood Patriarch",this.jr1=this.boof5714,this.jr2=this.lValN([7,10,17]),this.tribe.push("HM");const t=this.boof235;this.ftext=`Each friendly creature with ${this.boof357} or less attack gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}wwpF(t){const i=this.boof235,e=d.crFriendNotMeTarg(t.creatId);e.maxAttack=this.boof357,a.field.creatByTarget(e).forEach(s=>s.buff(i,i))}wfbC(){this.faction="N",this.rarity="C",this.name="Witherfrost Banshee",this.jr1=this.boof3612,this.jr2=this.jr1,this.tribe.push("ST"),this.hints=["OP"],this.flanks=!0;const t=this.boof247n;this.ftext=`The opposing creature gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}wfbF(t){const e=t.event.creature.opposed;if(e){const s=this.boof247n;e.buff(s,s)}}}class ke extends x{lookup(t){return{["RBG"]:{c:()=>this.rbgC(),g:(e,s)=>this.rbgG(e,s)},["SRV"]:{c:()=>this.sprvC(),g:(e,s)=>this.sprvG(e,s)}}[t]}onGain(t,i){this.lookup(t).g(i,i.event)}hPlayer=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("LG",this.code),e}ddf8(t){return t.trigger.type==="LG"&&this.validPlayer(t)}jr8(t){this.onGain(this.cardCode(),t),a.batch.triggerDone()}validPlayer(t){if(this.hPlayer===0)return!0;const i=t.event;return this.hPlayer===1?t.ownerPlayerA===i.playerA:t.ownerPlayerA!==i.playerA}rbgC(){this.faction="U",this.rarity="H",this.name="Runebark Guardian",this.jr1=this.boof5916,this.jr2=this.jr1,this.tribe.push("HM"),this.hPlayer=1;const t=this.boof135;this.text=`When you gain health, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}rbgG(t,i){const e=a.field.jr5(t.creatId),s=this.boof135;e.buff(s,s)}sprvC(){this.faction="N",this.rarity="R",this.name="Spirit Reaver",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("DM"),this.hPlayer=-1;const t=this.boof234;this.text=`When an enemy player gains health, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}sprvG(t,i){const e=a.field.jr5(t.creatId),s=this.boof234;e.buff(s,s)}}class le extends x{lookup(t){return{["EWE"]:{c:()=>this.eweC(),m:(e,s)=>this.eweM(e,s)},["FFM"]:{c:()=>this.ffmC(),m:(e,s)=>this.ffmM(e,s)},["WBH"]:{c:()=>this.rbgC(),m:(e,s)=>this.rbgM(e,s)}}[t]}onMove(t,i){this.lookup(t).m(i,i.event)}mPlayer=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("MV",this.code),e}ddf8(t){return t.trigger.type==="MV"&&this.validPlayer(t)}jr8(t){this.onMove(this.cardCode(),t),a.batch.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=t.event;return this.mPlayer===1?t.ownerPlayerA===i.creature.owner:t.ownerPlayerA!==i.creature.owner}eweC(){this.faction="T",this.rarity="H",this.name="Emberwind Evoker",this.jr1=this.boof4914,this.jr2=this.jr1+2,this.tribe.push("HM"),this.mPlayer=1;const t=this.boof124;this.text=`When a friendly creature moves, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)}}eweM(t,i){const e=this.boof124;i.creature.buff(e,e)}ffmC(){this.faction="T",this.rarity="H",this.name="Frostfang Maiden",this.jr1=this.boof5814,this.jr2=this.jr1+this.level,this.tribe.push("HM"),this.initMobile=this.level,this.mPlayer=1;const t=this.ffbof;this.text=`When a friendly creature moves, deal ${t} to the creature opposing it.`,this.bonus={exist:this.ddp9(0,t,0,0)}}ffmM(t,i){const e=i.creature.opposed;e&&e.hurtDirect(this.ffbof,this.code)}get ffbof(){return this.level+2}rbgC(){this.faction="T",this.rarity="R",this.name="Windborn Hellion",this.jr1=this.boof4812,this.jr2=this.boof81217,this.tribe.push("WN","EL"),this.mPlayer=1,this.text=`When a friendly creature moves, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)}}rbgM(t,i){a.field.jr5(t.creatId).buff(this.level,this.level)}}class xt extends x{lookup(t){return{["ATG"]:{c:()=>this.agrdC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.agrdP(e,s)},["ART"]:{c:()=>this.arootC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"U"),p:(e,s)=>this.arootP(e,s)},["BLH"]:{c:()=>this.bblhC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.bblhP(e,s)},["CYC"]:{c:()=>this.ccC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"N"),p:(e,s)=>this.ccP(e,s)},["DHW"]:{c:()=>this.dhwC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.dhwP(e,s)},["FBI"]:{c:()=>this.fbiC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"T"),p:(e,s)=>this.fbiP(e,s)},["FLS"]:{c:()=>this.flspkC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.flspkP(e,s)},["IZK"]:{c:()=>this.izzyC(),t:(e,s)=>this.izzyT(e,s),p:(e,s)=>this.izzyP(e,s)},["KAW"]:{c:()=>this.kasC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.kasP(e,s)}}[t]}testPlay(t,i){return this.lookup(t).t(i,i.event)}actPlay(t,i){this.lookup(t).p(i,i.event)}triggerLevels=[1,2,3,4];constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.triggerLevels.includes(this.level)&&e.jr4("PC",this.code),e}ddf8(t){return t.event.code==="PLC"?this.testPlay(this.cardCode(),t):t.event.code==="TRE"&&this.cardCode()==="BLH"}jr8(t){if(t.event.code==="PLC")this.actPlay(this.cardCode(),t);else{const i=a.field.jr5(t.creatId);a.death.destroy(i,this.code)}a.batch.triggerDone()}spellMyTurn(t,i){return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}factionSpellMyTurn(t,i,e){if(i.playerA===t.ownerPlayerA){const s=a.cards.getCard(i.cardCode);if(s.type==="S"&&s.faction===e)return!0}return!1}agrdC(){this.faction="A",this.rarity="C",this.name="Aetherguard",this.jr1=this.boof6814,this.jr2=this.jr1-1,this.tribe.push("RB"),this.bonus={exist:this.ddp9(0,this.level,0,0)},this.text=`When you play a spell, ${this.name} gets Armor ${this.level}.`}agrdP(t,i){a.field.jr5(t.trigger.creatId).addArmor(this.level)}arootC(){this.faction="U",this.rarity="H",this.name="Aether Root",this.jr1=this.boof3610,this.jr2=this.jr1,this.tribe.push("PL");const t=this.boof234;this.text=`When you play an Uterra spell, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}arootP(t,i){const e=a.field.jr5(t.trigger.creatId),s=this.boof234;e.buff(s,s)}bblhC(){this.faction="T",this.rarity="L",this.name="Binben, Lightning Herald",this.jr1=this.boof61017,this.jr2=this.boof468,this.tribe.push("LT","AS");const t=this.boof4711,i=this.boof258;this.text=`When you play a spell, Spawn a ${t}/${i} Lightning Wyrm. At the end of your turn, destroy it.`,this.bonus={exist:this.ddp9(1,t+i,t,0)*.5}}bblhP(t,i){const e=a.field.birthCreature(`${"LWY"}${this.level}`,"S",t.ownerPlayerA);if(e){const s=e.jr4("TE",this.code);s.changes=!0}}ccC(){this.faction="N",this.rarity="H",this.name="Crypt Conjurer",this.jr1=this.boof258,this.jr2=this.lValN([8,14,20]),this.tribe.push("VP"),this.text=`When you play a Nekrium spell, deal ${this.jr1} damage to the enemy player and you gain ${this.jr1} health.`,this.bonus={exist:this.ddp9(0,0,0,this.jr1)}}ccP(t,i){a.player.ddf3(!t.ownerPlayerA,this.jr1,t.cardCode),a.player.healPlayer(t.ownerPlayerA,this.jr1)}dhwC(){this.faction="N",this.rarity="R",this.name="Darkheart Wanderer",this.jr1=this.boof3612,this.jr2=this.boof81116,this.tribe.push("HM");const t=this.boof124;this.text=`When you play a spell, ${this.name} gets Regenerate ${t}.`,this.bonus={exist:this.ddp9(0,t,0,0)}}dhwP(t,i){a.field.jr5(t.trigger.creatId).addRegen(this.boof124)}fbiC(){this.faction="T",this.rarity="H",this.name="Flamebreak Invoker",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("FR","GT"),this.text=`When you play a Tempys spell, deal ${this.level} damage to each enemy creature.`,this.bonus={exist:this.ddp9(0,this.level*2,0,0)*.5}}fbiP(t,i){const e=Date.now();a.field.qEnemyCreats().forEach(s=>{s.hurtDirect(this.level,this.code,e)})}flspkC(){this.faction="T",this.rarity="C",this.name="Flame Speaker",this.jr1=this.lValN([2,6,13]),this.jr2=this.level*6,this.tribe.push("HM");const t=this.boof235;this.text=`When you play a spell, deal ${t} damage to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,t)*.5}}flspkP(t,i){a.player.ddf3(!t.ownerPlayerA,this.boof235,t.cardCode)}izzyC(){this.faction="T",this.rarity="L",this.name="Iztek, Khan of Arrachtor",this.jr1=this.boof6915,this.jr2=this.jr1,this.tribe.push("IC","FR","AS"),this.hints=["OL","LKV"],this.text=`When you play Iztek's Frost, replace this with a level ${this.level} Iztek, Avatar of Frost. When you play Iztek's Flame, replace this with a level ${this.level} Iztek, Avatar of Flame.`}izzyT(t,i){if(i.playerA===t.ownerPlayerA){const s=a.cards.getCard(i.cardCode).cardCode();if(s==="IFL"||s==="IFR")return!0}return!1}izzyP(t,i){const e=a.field.jr5(t.trigger.creatId),l=a.cards.getCard(i.cardCode).cardCode()==="IFL"?"IZL":"IZR";a.field.birthCreature(`${l}${this.level}`,"R",e.owner,e.lane)}kasC(){this.faction="T",this.rarity="L",this.name="Kas, Arcweaver",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("LT","AS"),this.hints=["OL","LKV"],this.text="When you play a spell, Kas battles an additional time this turn.",this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)*.5}}kasP(t,i){const e=a.field.jr5(t.trigger.creatId);e.extraBattles+=1}}class lt extends x{lookup(t){return{["CGF"]:{c:()=>this.cfiendC(),v:e=>this.cfiendV(e)},["CSB"]:{c:()=>this.corpsC(),v:e=>this.corpsV(e)},["DSK"]:{c:()=>this.dskC(),v:e=>this.dskV(e)},["FWK"]:{c:()=>this.fwlkC(),v:e=>this.fwlkV(e)},["FFD"]:{c:()=>this.ffC(),v:e=>this.ffV(e)},["GVS"]:{c:()=>this.ghsC(),v:e=>this.ghsV(e)},["GBG"]:{c:()=>this.ggC(),v:e=>this.ggV(e)},["GMR"]:{c:()=>this.gromC(),v:e=>this.gromV(e)},["MMX"]:{c:()=>this.mmeC(),v:e=>this.mmeV(e)},["NOZ"]:{c:()=>this.nyozC(),v:e=>this.nyozV(e)},["RSZ"]:{c:()=>this.rszC(),v:e=>this.rszV(e)},["SFM"]:{c:()=>this.spirmC(),v:e=>this.spirmV(e)},["VGN"]:{c:()=>this.vgfsC(),v:e=>this.vgfsV(e)},["XHS"]:{c:()=>this.xhostC(),v:e=>this.xhostV(e)},["ZTU"]:{c:()=>this.zimusC(),v:e=>this.zimusV(e)}}[t]}cardVengeance(t,i){this.lookup(t).v(i)}vtext="";venges=!0;fixedImgCreat=!1;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.venges&&(this.text="Vengeance: "+this.vtext),this.vtext=""}image(t){return this.fixedImgCreat?this.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return this.venges&&e.jr4("VN",this.code),e}jr8(t){this.cardVengeance(this.cardCode(),t),a.batch.triggerDone()}cfiendC(){this.faction="N",this.rarity="T",this.name="Contagion Fiend",this.jr1=this.boof234,this.jr2=this.boof5812,this.tribe.push("AB"),this.hints=["ENF"],this.fixedImgCreat=!0;const t=-this.level;this.vtext=`Each enemy creature gets ${a.log.jr9(t,t)}.`}cfiendV(t){const i=-this.level,e=Date.now(),s=d.crTarg();s.player=a.player.toTarget(!t.ownerPlayerA),a.field.creatByTarget(s).forEach(l=>l.buff(i,i,e))}corpsC(){this.faction="N",this.rarity="C",this.name="Corpulent Shambler",this.jr1=this.lValN([5,7,15]),this.jr2=this.jr1,this.tribe.push("ZB"),this.vtext="Put a 3/3 Zombie into this lane.",this.bonus={play:this.ddp9(1,6,3,0)}}corpsV(t){const i=t.event,e=`${"ZBS"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}dskC(){this.faction="N",this.rarity="C",this.name="Death Seeker",this.jr1=1,this.jr2=1,this.tribe.push("HM"),this.fixedImgCreat=!0,this.hints=["ST"];const t=this.boof51015;this.vtext=`Put a ${t}/${t} Spirit into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}dskV(t){const i=t.event,e=`${"SPN"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}fwlkC(){this.faction="N",this.rarity="C",this.name="Fell Walker",this.jr1=this.boof359,this.jr2=this.jr1,this.tribe.push("ZB"),this.vtext=`Put a ${this.jr1}/${this.jr1} Zombie into this lane.`,this.bonus={play:this.ddp9(1,this.jr1*2,this.jr1,0)}}fwlkV(t){const i=t.event,e=`${"ZMB"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}ffC(){if(this.faction="N",this.rarity="H",this.name="Fleshfiend",this.jr1=this.boof6812,this.jr2=this.jr1,this.tribe.push("AB"),this.venges=this.level>1,this.vtext=`Put a level ${this.level-1} ${this.name} into this lane.`,this.venges){const t=this.lValN([0,6,15]);this.bonus={play:this.ddp9(1,t*2,t,0)}}}ffV(t){const i=t.event,e=`${"FFD"}${this.level-1}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}ghsC(){this.faction="U",this.rarity="C",this.name="Glowhive Siren",this.jr1=this.boof3814,this.jr2=this.boof61117,this.tribe.push("IN"),this.vtext=`You gain ${this.boof124} to ${this.gghigh-1} health.`,this.bonus={play:this.ddp9(0,0,0,this.boof258)}}ghsV(t){const i=a.randInt(this.boof124,this.gghigh);a.player.healPlayer(t.ownerPlayerA,i)}get gghigh(){return this.lValN([5,9,13])}ggC(){this.faction="N",this.rarity="C",this.name="Graveborn Glutton",this.jr1=this.boof61117,this.jr2=this.boof3814,this.tribe.push("AB"),this.vtext=`Deal ${this.boof124} to ${this.gghigh-1} damage to the enemy player.`,this.bonus={play:this.ddp9(0,0,0,this.boof258)}}ggV(t){const i=a.randInt(this.boof124,this.gghigh);a.player.ddf3(!t.ownerPlayerA,i,this.code)}gromC(){this.faction="U",this.rarity="C",this.name="Grove Matriarch",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("PL");const t=N.minionBuff(this.level),i=N.minionName(this.level);this.vtext=`Put a ${t}/${t} ${i} into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}gromV(t){const i=t.event,e=N.minionCode(this.level);a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}mmeC(){this.faction="A",this.rarity="C",this.name="Metamind Explorer",this.jr1=this.boof3713,this.jr2=this.jr1+2,this.tribe.push("MM"),this.vtext=`Draw ${this.level} cards.`,this.bonus={play:this.ddp9(0,0,0,0,this.level/4)}}mmeV(t){a.player.drawCard(t.ownerPlayerA,this.level)}nyozC(){this.faction="N",this.rarity="R",this.name="Nyrali Ooze",this.jr1=this.boof247,this.jr2=this.jr1,this.tribe.push("OZ");const t=this.level+this.jr1+1;this.vtext=`Put a ${t}/${t} Oozeling into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}nyozV(t){const i=t.event,e=`${"OOZ"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}rszC(){this.faction="N",this.rarity="R",this.name="Runescarred Zombie",this.jr1=this.lValN([5,8,16]),this.jr2=this.boof359,this.tribe.push("ZB"),this.vtext=`Put a ${a.log.levelGateText(this.level,!0)}spell at random from your discard pile into your hand.`,this.bonus={play:this.ddp9(0,0,0,0,.25)}}rszV(t){const i=a.player.toPlayer(t.ownerPlayerA),e=d.target("TD");e.player=a.player.toTarget(i),e.card="S",e.level=a.target.ddf2(this.level);const s=a.target.deckByTarget(e);if(s.length>0){const l=s[a.randInt(0,s.length)];i.discard.splice(l[1],1),i.hand.push(l[0])}}spirmC(){this.faction="T",this.rarity="H",this.name="Spiritflame Mystic",this.jr1=this.boof6912,this.jr2=this.jr1-3,this.tribe.push("HM"),this.hints=["ENF","EML","OP"],this.vtext=`Deal ${this.boof246} damage to each creature.`}spirmV(t){const i=this.boof246,e=Date.now();a.field.qActiveCreats().forEach(s=>s.hurtDirect(i,this.code,e))}vgfsC(){this.faction="N",this.rarity="C",this.name="Vengeful Spirit",this.jr1=this.boof357,this.jr2=this.jr1-2,this.tribe.push("ST"),this.hints=["OP"];const t=this.boof369n;this.vtext=`Give the opposing creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*-2,-t,0)}}vgfsV(t){const e=t.event.creature.opposed;if(e){const s=this.boof369n;e.buff(s,s)}}xhostC(){this.faction="N",this.rarity="C",this.name="Xithian Host",this.jr1=this.boof359,this.jr2=this.boof135,this.tribe.push("AB"),this.vtext=`Deal ${this.jr1} damage to the enemy player and you gain ${this.jr1} health.`,this.bonus={play:this.ddp9(0,0,0,this.jr1*2)}}xhostV(t){const i=this.jr1;a.player.ddf3(!t.ownerPlayerA,i,this.code),a.player.healPlayer(t.ownerPlayerA,i)}zimusC(){this.faction="N",this.rarity="L",this.name="Zimus, the Undying",this.jr1=this.boof51014,this.jr2=this.lValN([2,5,7]),this.tribe.push(this.level===1?"HM":"ZB"),this.venges=this.level>1,this.vtext=`Spawn a Zimus, the ${this.level===2?"Returned":"Undying"}.`,this.level<3?(this.hints=["LV"],this.level===2&&(this.bonus={play:this.ddp9(1,15,10,0)})):(this.hints=["ST"],this.bonus={play:this.ddp9(0,0,0,0,8)})}zimusV(t){let i;this.level===2?i=`${"ZTR"}2`:i=`${"ZTU"}3`,a.field.birthCreature(i,"S",t.ownerPlayerA)}}class Ot extends rt{lookup(t){return{["DIS"]:{c:()=>this.disnC(),p:e=>this.disnZ(e),e:e=>this.disnE(e)},["DCH"]:{c:()=>this.dchantC(),p:e=>this.dchantZ(e),e:e=>this.dchantE(e)},["ESU"]:{c:()=>this.esrgC(),p:e=>this.esrgZ(e),e:e=>this.esrgE(e)},["ITO"]:{c:()=>this.itorC(),p:e=>this.itorZ(e),e:e=>this.itorE(e)},["MSP"]:{c:()=>this.mendC(),p:e=>this.mendZ(e),e:e=>this.mendE(e)},["NEM"]:{c:()=>this.netherC(),p:e=>this.netherZ(e),e:e=>this.netherE(e)}}[t]}cardCast(t,i){this.lookup(t).p(i)}playTarg;constructor(t){super(t),this.playTarg="X",this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return t.push(d.playerActTarg(this.playTarg,"CARD",this.code,"")),t}handleAction(t){this.logSpell();const i=a.state.getPlayer(t.playerA);this.cardCast(this.cardCode(),i),a.turn.spellCast()}ddf7(t){return this.lookup(this.cardCode()).e(t)}disnC(){this.faction="T",this.rarity="R",this.name="Disintigrate",this.playTarg="E",this.text=`Deal 1 to ${this.dshigh-1} damage to the enemy player.`}disnZ(t){a.player.ddf3(t,a.randInt(1,this.dshigh),this.code)}get dshigh(){return this.lValN([9,16,26])}disnE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerDmg(t.playerA,this.dshigh/2)],i}dchantC(){this.faction="U",this.rarity="C",this.name="Druid's Chant",this.playTarg="F",this.text=`You gain ${this.boof81220} health.`}dchantZ(t){a.player.healPlayer(t,this.boof81220)}dchantE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerLife(t.playerA,this.boof81220)],i}esrgC(){this.faction="A",this.rarity="R",this.name="Energy Surge",this.isFree=this.level>1,this.overload=this.level===3,this.level===1&&(this.hints=["LV"]),this.playTarg="F",this.text=`Draw ${this.level} card${this.level>1?"s":""}.`}esrgZ(t){a.player.drawCard(t,this.level)}esrgE(t){return d.actionEval(t,"ST")}itorC(){this.faction="T",this.rarity="R",this.name="Ice Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.playTarg="E",this.text=`Deal ${this.boof234} damage to the enemy player.`}itorZ(t){a.player.ddf3(t,this.boof234,this.code)}itorE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerDmg(t.playerA,this.boof234)],i}mendC(){this.faction="U",this.rarity="R",this.name="Mending Spring",this.playTarg="F",this.text=`You gain 1 to ${this.mendboof} Health.`}mendZ(t){a.player.healPlayer(t,a.randInt(1,this.mendboof+1))}get mendboof(){return this.lValN([10,20,40])}mendE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerLife(t.playerA,this.mendboof/2)],i}netherC(){this.faction="N",this.rarity="C",this.name="Nether Embrace",this.playTarg="E";const t=this.boof4712;this.text=`Deal ${t} damage to the enemy player. You gain ${t} heal`}netherZ(t){const i=this.boof4712;a.player.ddf3(t,i,this.code),a.player.healPlayer(!t.isPlayerA,i)}netherE(t){const i=this.boof4712,e=d.actionEval(t,"ST");return e.vectors=[d.evalVectorPlayerLife(!t.playerA,i),d.evalVectorPlayerDmg(t.playerA,i)],e}}class Si extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Rageborn Hellion",this.jr1=this.boof469,this.jr2=this.jr1*2,this.tribe.push("FR","EL"),this.hints=["OL","LKV"],this.text=`When a friendly creature ${a.log.dbdtap()}, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.owner===t.ownerPlayerA}return!1}jr8(t){a.field.jr5(t.creatId).buff(this.level,this.level),a.batch.triggerDone()}}class gt extends x{lookup(t){return{["AIV"]:{c:()=>this.avinvC(),r:e=>this.avinvR(e)},["BSP"]:{c:()=>this.bskphC(),r:e=>this.bskphR(e)},["CRC"]:{c:()=>this.crucC(),r:e=>this.crucR(e)},["ESK"]:{c:()=>this.ebknC(),r:e=>this.ebknR(e)},["FWC"]:{c:()=>this.fwcC(),r:e=>this.fwcR(e)},["FME"]:{c:()=>this.feggC(),r:e=>this.feggR(e)},["MMV"]:{c:()=>this.mmovC(),r:e=>this.mmovR(e)},["RGG"]:{c:()=>this.runegC(),r:e=>this.runegR(e)},["SSR"]:{c:()=>this.solrevC(),r:e=>this.solrevR(e)},["SSM"]:{c:()=>this.spshamC(),r:e=>this.spshamR(e)},["SSG"]:{c:()=>this.snoutC(),r:e=>this.snoutR(e)},["UGM"]:{c:()=>this.mantisC(),r:e=>this.mantisR(e)}}[t]}rtext="";constructor(t){super(t),this.lookup(this.cardCode()).c(),this.text="Gain Rank: "+this.rtext,this.rtext=""}image(t){return this.rarity==="T"?this.cardCode()==="FWC"?this.rawImage("MPH",t):super.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return e.jr4("RU",this.code),e}ddf8(t){return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){this.lookup(this.cardCode()).r(t),a.batch.triggerDone()}avinvC(){this.faction="T",this.rarity="H",this.name="Avalanche Invoker",this.jr1=this.boof6914,this.jr2=this.jr1+1,this.tribe.push("ER","AS"),this.hints=["TL"],this.rtext=`Deal ${this.boof3612} damage to each non-Tempys creature.`}avinvR(t){const i=this.boof3612,e=Date.now();a.field.qActiveCreats().filter(s=>s.faction!=="T").forEach(s=>s.hurtDirect(i,this.code,e))}bskphC(){this.faction="N",this.rarity="C",this.name="Blightskull Phantasm",this.jr1=this.boof5814,this.jr2=this.boof61017,this.tribe.push("ST"),this.hints=["TL","OP"];const t=this.boof369n;this.rtext=`the opposing creature gets ${a.log.jr9(t,t)}.`}bskphR(t){const e=a.field.jr5(t.creatId).opposed;if(e){const s=this.boof369n;e.buff(s,s)}}crucC(){this.faction="A",this.rarity="R",this.name="Crucible Colossus",this.jr1=this.boof61016,this.jr2=this.jr1+2,this.tribe.push("RB"),this.initDefend=!0,this.hints=["TL"],this.rtext=`Negate Defender from ${this.name}.`}crucR(t){const i=a.field.jr5(t.creatId);i.negateDefender=!0}ebknC(){this.faction="N",this.rarity="H",this.name="Ebonskull Knight",this.jr1=this.lValN([9,13,18]),this.jr2=this.jr1-2,this.tribe.push("VP"),this.hints=["TL"],this.rtext=`Destroy ${this.name}.`}ebknR(t){const i=a.field.jr5(t.creatId);a.death.destroy(i,this.code)}fwcC(){this.faction="U",this.rarity="T",this.maxLevel=1,this.name="Feywing Chrysalis",this.jr1=0,this.jr2=3,this.tribe.push("CR"),this.initDefend=!0,this.rtext=`Replace ${this.name} with a 9/9 Feywing.`}fwcR(t){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"FWG"}1`,"R",i.owner,i.lane)}feggC(){this.faction="T",this.rarity="T",this.minLevel=this.level,this.maxLevel=this.level,this.name="Frostmane Egg",this.jr1=0,this.jr2=6,this.tribe.push("DG"),this.initDefend=!0,this.rtext=`Replace ${this.name} with a level ${this.level} Frostmane Dragon.`}feggR(t){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"FMD"}${this.level}`,"R",i.owner,i.lane)}mmovC(){this.faction="A",this.rarity="C",this.name="Metamind Overseer",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("MM"),this.hints=["TL"],this.rtext="Draw 2 cards."}mmovR(t){a.player.drawCard(t.ownerPlayerA,2)}runegC(){this.faction="U",this.rarity="H",this.name="Runegrove Guardian",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("PL"),this.hints=["TL"],this.rtext=`${this.name} gets ${a.log.jr9(this.jr1,this.jr1)}.`}runegR(t){a.field.jr5(t.creatId).buff(this.jr1,this.jr1)}solrevC(){this.faction="U",this.rarity="L",this.name="Solstice Reveler",this.jr1=this.boof4816,this.jr2=this.jr1,this.tribe.push("HM"),this.hints=["TL","FRS"];const t=this.solbof;this.rtext=`each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}solrevR(t){const i=this.solbof;a.field.ddf1().forEach(e=>{e.buff(i,i),this.level===3&&(e.breakthrough=!0)})}get solbof(){return this.jr1/2}spshamC(){this.faction="T",this.rarity="C",this.name="Spiritfrost Shaman",this.jr1=this.boof71117,this.jr2=this.boof4610,this.tribe.push("HM"),this.hints=["TL"],this.rtext=`Deal ${this.boof579} damage to the enemy player.`}spshamR(t){a.player.ddf3(!t.ownerPlayerA,this.boof579,this.code)}snoutC(){this.faction="U",this.rarity="C",this.name="Stouthide Stegadon",this.jr1=this.boof4714,this.jr2=this.boof71117,this.tribe.push("DN"),this.hints=["TL"],this.rtext=`Heal ${this.snoutbof} damage from ${this.name}.`}snoutR(t){a.field.jr5(t.creatId).heal(this.snoutbof)}get snoutbof(){return this.level*10}mantisC(){this.faction="U",this.rarity="C",this.name="Umbraglim Mantis",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.tribe.push("IN"),this.hints=["TL"],this.rtext=`You gain ${this.mantbof} health.`}mantisR(t){a.player.healPlayer(t.ownerPlayerA,this.mantbof)}get mantbof(){return this.lValN([8,10,12])}}class wi extends x{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Riftlasher",this.jr1=this.boof359,this.jr2=this.boof61016,this.tribe.push("FR","EL"),this.hints=["OL","LKV","ATH"],this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`,this.bonus={exist:this.ddp9(0,this.jr1,0,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("DM",this.code);return s.interactive=!0,e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId&&t.ownerPlayerA===a.state.ddf9()}return!1}jr8(t){const i=t.event,e=a.target.toActions(d.crEnemyActTarg("CARD",this.code,a.enTil(t.creatId,i.dmg)));e.length>0?(e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}handleAction(t){const i=a.deTil(t.param);a.field.ddf6(t).hurtDirect(parseInt(i[1]),this.code),a.action.actionDone(!0)}ddf7(t){const i=a.deTil(t.param);return d.ddp2(t,t.playerA,t.lane,{dmg:parseInt(i[1])})}}class Di extends x{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Scourgeflame Sorcerer",this.jr1=this.boof358,this.jr2=this.boof5914,this.tribe.push("ZB");const i=`Destroy an enemy ${a.log.levelGateText(this.level+1,!0)}creature.`,e=this.level===3?": ":", destroy another friendly creature: ";this.text=`Activate${e}${i}`}canActivate(t){return this.enemies(t).length>0?this.level===3?!0:this.friends(t).length>0:!1}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[1]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[0]),s=Date.now();if(this.level<3){const u=a.field.jr5(i[2]);a.death.destroy(u,this.code,s)}const l=a.field.ddf6(t);a.death.destroy(l,this.code,s),e.endActivation()}}friends(t){const i=d.crFriendNotMeActTarg("CARD",t.id,this.code,a.enTil(t.id,"P1"));return a.target.toActions(i)}enemies(t,i=""){const e=d.crEnemyActTarg("CARD",this.code,a.enTil(t.id,"P2",i));return e.level=a.target.ddf2(this.level+1),a.target.toActions(e)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param);let s;return this.level===3?s=this.enemies(e):s=this.friends(e),s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.deTil(t.param),s=a.field.jr5(e[0]),l=a.field.ddf6(t),u=this.enemies(s,l.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[1]==="P1")return d.ddp5(t);{const e=t,s=d.ddp7(t,e.playerA,e.lane);if(this.level<3){const l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);u.destroy=!0,s.vectors.push(u)}return s}}}}class xi extends x{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Seismic Adept",this.jr1=this.boof4712,this.jr2=this.boof61218,this.tribe.push("HM"),this.text="Activate: Move an enemy creature to another available enemy lane.",this.bonus={exist:this.level*.5}}canActivate(t){return this.enemies(t).length>0&&this.empties(t).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.jr5(i[2]).move(t.lane),e.endActivation()}}empties(t,i=""){const e=d.emptyPlayerActTarg("E","CARD",this.code,a.enTil("P2",t.id,i));return a.target.toActions(e)}enemies(t){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P1",t.id));return a.target.toActions(i)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.enemies(e);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=a.field.jr5(s[1]),u=this.empties(l,e.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=t,l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.moveTo=s.lane,e.vectors.push(u),e}}}}class Jt extends x{constructor(t){super(t),this.rarity="R",this.jr1=this.boof4612,this.jr2=this.boof61016;const i=this.cardCode();if(i==="SSS"?this.steel():i==="LSS"?this.life():i==="FSS"?this.flame():i==="DSS"&&this.dark(),this.level>1){const e=a.log.levelGateText(this.level-1);this.text=`When you play a ${e} ${a.log.factionText(this.faction)} card, you may ${this.tuxt}.`}else this.hints=["LV"];this.bonus={exist:this.level*.5},this.tuxt=""}tuxt="";dark(){this.faction="N",this.name="Darkshaper Savant",this.tribe.push("ZB");const t=-this.boof135;this.tuxt=`give an enemy creature ${a.log.jr9(t,t)}`}life(){this.faction="U",this.name="Lifeshaper Savant",this.tribe.push("SE");const t=this.boof135;this.tuxt=`give another friendly creature ${a.log.jr9(t,t)}`}steel(){this.faction="A",this.name="Steelshaper Savant",this.tribe.push("HM"),this.tuxt=`give another friendly creature Armor ${this.boof124}`}flame(){this.faction="T",this.name="Flameshaper Savant",this.tribe.push("HM"),this.tuxt=`deal ${this.boof147} damage to target creature or player`}jr3(t,i){const e=super.jr3(t,i);if(this.level>1){const s=e.jr4("PC",this.code);s.interactive=!0}return e}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.ownerPlayerA){const e=a.cards.getCard(i.cardCode);if(e.level{u.health>i&&(i=u.health)});const s=e.filter(u=>u.health===i).map(u=>u.id),l=d.crActTarg("CARD",this.code,"");return l.level=a.target.ddf2(this.level+1),l.victims=a.enTil(...s),t.push(l),t}handleAction(t){this.logSpell();const i=a.field.ddf6(t);a.death.destroy(i,this.code),this.level===3&&a.player.healPlayer(a.state.ddf9(),i.health),a.turn.spellCast()}ddf7(t){return d.ddp7(t,t.playerA,t.lane)}}class Fi extends rt{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Spiritleash";const i=this.boof5814;this.text=`Destroy a friendly creature. Give a creature ${a.log.jr9(i,i)}.`}playTargets(){const t=super.playTargets(),i=d.crFriendActTarg("CARD",this.code,"P1");return a.field.creatByTarget(i).length>0&&a.field.qActiveCreats().length>1&&t.push(i),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof5814;a.death.destroy(s,this.code),e.buff(l,l),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=a.target.toActions(d.crNotMeActTarg("CARD",e.id,this.code,a.enTil("P2",e.id)));return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=d.ddp8(t,e,"SD"),l=this.boof5814;return s.vectors.push(d.ddp1(t.playerA,t.lane,{att:l,hlt:l})),s}}}class Pi extends x{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Statis Warden",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("MM"),this.text="When you play a spell, give a friendly creature Defender until the end of the enemy player's next turn."}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.ddf6(t),e=d.mod("DF",!0,t.param);e.expiry="EN",i.addMod(e),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}return!1}jr8(t){const i=d.crFriendNotMeActTarg("CARD",t.creatId,this.code,t.creatId);i.canDefender=!0;const e=a.target.toActions(i);e.length===0?a.batch.triggerDone():(e.push(a.action.noneEndTrigger()),a.action.ddf5(e))}ddf7(t){return d.ddp2(t,t.playerA,t.lane,{def:!0})}}class Bi extends x{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steelscale Dragon",this.jr1=this.boof4812,this.jr2=this.jr1+2,this.tribe.push("RB","DG"),this.initMobile=this.level,this.text=`While each other friendly creature has Defender, ${this.name} gets ${a.log.jr9(this.jr1,0)}, Armor ${this.boof246}, and Breakthrough.`}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("DF",this.code);s.area="C";const l=e.addEffect("PS",this.code);return l.area="C",e}enforceEffect(t,i){const e=d.crNotMeTarg(i.id);if(e.player=a.player.toTarget(i.owner),a.field.creatByTarget(e).some(l=>!l.defender))i.removeModSafe(i.id);else{const l=d.mod("AT",this.jr1,i.id),u=d.mod("AR",this.boof246,i.id),m=d.mod("BT",!0,i.id);i.addModSafe(l),i.addModSafe(u),i.addModSafe(m)}}}class Ni extends x{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Storm Bringer",this.jr1=this.boof5814,this.jr2=this.boof61018,this.tribe.push("WN","EL"),this.hints=["FH"];const i=this.boof246;this.bonus={exist:this.ddp9(0,i+2,0,0)},this.text=`At the start of each turn, ${this.name} moves to an available lane at random. Flank: Deal ${i} damage to the opposing creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("TS",this.code),e.jr4("FK",this.code),e}ddf8(t){return t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="TS"){const i=a.field.emptyLanes(t.ownerPlayerA);i.length>0&&a.field.jr5(t.creatId).move(i[a.randInt(0,i.length)]),a.batch.triggerDone()}else if(t.trigger.type==="FK"){const e=t.event.creature.opposed;e&&e.hurtDirect(this.boof246,this.code),a.batch.triggerDone()}else super.jr8(t)}}class Hi extends x{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Synapsis Oracle",this.jr1=this.boof358,this.jr2=this.lValN([9,15,24]),this.tribe.push("HM"),this.hints=["OL"];let i;this.level===3?(this.text="Activate: Level up a card in your hand.",i=1):(this.text=`Activate: ${a.log.daluac(!0)}.`,i=.5),this.bonus={exist:i}}canActivate(t){return a.state.getPlayer(t.owner).hand.some(e=>a.cards.getCard(e).canLevel())}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param),e=a.state.getPlayer(i.owner);this.level===3?e.hand[t.position]=a.cards.getCard(t.card).levelUpCard():a.turn.levelAndDiscard(t),i.endActivation()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.lvlHandActTarg(this.code,e.id);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){return t.actionKey==="ACTV"?d.ddp5(t):d.actionEval(t,"DC")}}class At extends x{lookup(t){return{["DCS"]:{c:()=>this.delphC(),t:e=>this.delphT(e)},["GMP"]:{c:()=>this.gmpC(),t:e=>this.gmpT(e)},["LBL"]:{c:()=>this.lbcC(),t:e=>this.lbcT(e)},["SSE"]:{c:()=>this.sseC(),t:e=>this.sseT(e)},["SPD"]:{c:()=>this.spdC(),t:e=>this.spdT(e)},["SPM"]:{c:()=>this.spmC(),t:e=>this.spmT(e)},["TBA"]:{c:()=>this.tbaC(),t:e=>this.tbaT(e)},["VCG"]:{c:()=>this.vgC(),t:e=>this.vgT(e)},["WBG"]:{c:()=>this.woeC(),t:e=>this.woeT(e)},["ZSH"]:{c:()=>this.zyxC(),t:e=>this.zyxT(e)}}[t]}bothTurns=!1;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("TS",this.code),e}ddf8(t){return t.trigger.type==="TS"?this.bothTurns?!0:t.event.playerA===t.ownerPlayerA:!1}jr8(t){this.lookup(this.cardCode()).t(t),a.batch.triggerDone()}delphC(){this.faction="A",this.rarity="L",this.name="Delpha, Chronosculptor",this.jr1=this.boof7914,this.jr2=this.jr1,this.tribe.push("HM"),this.level>1&&(this.hints=["OL"],this.bonus={exist:this.ddp9(0,9,4,0)},this.text=`At the start of your turn, level a ${this.level===2?"level 1 ":""}card in your hand at random.`)}delphT(t){if(this.level>1){const i=a.state.getPlayer(t.ownerPlayerA),e=i.hand.map((l,u)=>{const m=a.cards.getCard(l);return{idx:u,lvl:m.level,nxt:m.canLevel()?m.levelUpCard():""}}).filter(l=>l.nxt&&(this.level===3||l.lvl===1)),s=e.length;if(s>0){const l=e[a.randInt(0,s)];i.hand[l.idx]=l.nxt}}}gmpC(){this.faction="A",this.rarity="L",this.name="Ghox, Metamind Paragon",this.jr1=this.boof4814,this.jr2=this.boof61218,this.tribe.push("MM"),this.hints=["OL"];const t=this.level===1?"":"s";this.bonus={exist:this.ddp9(0,0,0,0,this.level*.5)},this.text=`At the start of your turn, draw ${this.level} card${t}.`}gmpT(t){a.player.drawCard(t.ownerPlayerA,this.level)}lbcC(){this.faction="U",this.rarity="R",this.name="Lightbringer Cleric",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("TK"),this.hints=["OL"],this.bonus={exist:this.ddp9(0,0,0,this.boof3610)},this.text=`At the start of your turn, you gain ${this.boof137} to ${this.boof5914-1} health.`}lbcT(t){a.player.healPlayer(t.ownerPlayerA,a.randInt(this.boof137,this.boof5914))}sseC(){this.faction="U",this.rarity="L",this.name="Scatterspore Eidolon",this.jr1=8,this.jr2=this.jr1,this.tribe.push("PL"),this.hints=["OL","EMO","DL"];const t=this.boof357,i=N.minionName(this.level);this.bonus={exist:this.ddp9(1,t*2,t,0)},this.text=`At the start of your turn, Spawn a ${t}/${t} ${i}.`}sseT(t){const i=this.lValS(["SXD","SXP","SXT"])+this.level.toString();a.field.birthCreature(i,"S",t.ownerPlayerA)}spdC(){this.faction="U",this.rarity="R",this.name="Shardplate Delver",this.jr1=this.boof4612,this.jr2=this.jr1,this.tribe.push("DN"),this.hints=["OL"];const t=this.boof246;this.bonus={exist:this.ddp9(0,t*2,t,0)},this.text=`At the start of your turn, ${this.name} gets ${a.log.jr9(t,t)}.`}spdT(t){const i=this.boof246;a.field.jr5(t.creatId).buff(i,i)}spmC(){this.faction="U",this.rarity="L",this.name="Shardplate Mutant",this.jr1=this.boof91421,this.jr2=this.jr1,this.tribe.push("IN"),this.hints=["OP"],this.text="At the start of your turn, randomly discard down to two cards in your hand."}spmT(t){const i=a.state.getPlayer(t.ownerPlayerA);if(i.hand.length>2){let e=i.hand.slice(),s=[];for(;e.length>2;)s.push(e.splice(a.randInt(0,e.length),1)[0]);i.discard.push(...s),i.hand=e}}tbaC(){this.faction="U",this.rarity="L",this.name="Talisin, Bard of Abundance",this.jr1=this.lValN([8,12,16]),this.jr2=this.lValN([10,14,20]),this.tribe.push("SY"),this.bothTurns=this.lValB([!0,!0,!1]),this.hints=["OL"],this.level===3&&(this.bonus={exist:this.ddp6()}),this.text=`At the start of ${this.bothTurns?"your":"each player's"} turn, ${this.bothTurns?"you":"that player"} may play an additional card.`}tbaT(t){a.state.gs.turn.regularPlays+=1}vgC(){this.faction="T",this.rarity="C",this.name="Volcanic Giant",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("ER","GT"),this.hints=["OL"],this.bonus={exist:this.ddp9(0,0,0,this.boof3610)},this.text=`At the start of your turn, deals ${this.boof137} to ${this.boof5914-1} damage to the enemy player.`}vgT(t){const i=a.randInt(this.boof137,this.boof5914);a.player.ddf3(!t.ownerPlayerA,i,this.code)}woeC(){this.faction="N",this.rarity="L",this.name="Woebringer",this.jr1=this.lValN([7,10,18]),this.jr2=this.boof5815,this.tribe.push("AB"),this.text=`At the start of your turn, destroy the ${this.level===3?"enemy ":""}creature with the lowest attack. If there is a tie, one is chosen at random.`}woeT(t){const i=d.crTarg();this.level===3&&(i.player=a.player.toTarget(!t.ownerPlayerA));const e=a.field.creatByTarget(i);let s=99999,l=[];e.forEach(m=>{m.attack===s?l.push(m):m.attack0){const m=l[a.randInt(0,u)];a.death.destroy(m,this.code)}}zyxC(){this.faction="T",this.rarity="L",this.name="Zyx, Storm Herald",this.jr1=this.boof4712,this.jr2=this.lValN([6,9,20]),this.initMobile=1,this.tribe.push("LT","AS"),this.hints=["OL","ATH","LKV"],this.text="Zyx battles an additional time on your turn."}zyxT(t){const i=a.field.jr5(t.creatId);i.extraBattles+=1}}class Mi extends x{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tuskin Sporelord",this.jr1=this.lValN([2,6,10]),this.jr2=this.lValN([10,14,18]),this.tribe.push("TK"),this.text=`Activate: Put a copy of friendly ${a.log.levelGateText(this.level,!0)}Plant into an available lane.`,this.bonus={exist:this.ddp6(this.level)/2}}canActivate(t){return this.emptySloots(t.id).length>0&&this.buddies(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.birthCreature(i[2],"P",e.owner,t.lane),e.endActivation()}}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.buddies(e.id);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=this.emptySloots(s[1],e.code);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=t;return d.ddp4(t,e.playerA,e.lane,i[2])}}}emptySloots(t,i=""){const e=d.emptyPlayerActTarg("F","CARD",this.code,a.enTil("P2",t,i));return a.target.toActions(e)}buddies(t){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P1",t));return i.tribe="PL",i.level=a.target.ddf2(this.level),a.target.toActions(i)}}class Te extends rt{constructor(t){super(t),this.faction="A",t==="PRI"+"1"?(this.rarity="R",this.name="Perilous Insight",this.maxLevel=1,this.overload=!0):(this.rarity="C",this.name="Metasight",this.maxLevel=2,this.isFree=this.level===2),this.text="Discard and level up two cards."}playTargets(){const t=super.playTargets();return t.push(this.targParty("P1")),t}handleAction(t){if(t.positionthis.confC(),z:(e,s)=>this.confZ(e,s),e:(e,s,l)=>this.confE(e,s,l)},["CSG"]:{c:()=>this.cystgC(),z:(e,s)=>this.cystgZ(e,s),e:(e,s,l)=>this.cystgE(e,s,l)},["GRN"]:{c:()=>this.grenC(),z:(e,s)=>this.grenZ(e,s),e:(e,s,l)=>this.grenE(e,s,l)},["TWG"]:{c:()=>this.twstrC(),z:(e,s)=>this.twstrZ(e,s),e:(e,s,l)=>this.twstrE(e,s,l)}}[t]}cardCast(t,i,e){this.lookup(t).z(i,e)}playTarg;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return this.playTarg.param="P1",this.playTarg.notMe="",a.field.creatByTarget(this.playTarg).length>1&&t.push(this.playTarg),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]);this.cardCast(this.cardCode(),s,e),a.turn.spellCast()}}getCardActions(t){const i=a.field.ddf6(t);return this.playTarg.notMe=i.id,this.playTarg.param=a.enTil("P2",i.id),a.target.toActions([this.playTarg,a.target.buttonTarget("CANC")])}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.ddf6(t),s=a.field.jr5(i[1]);return this.lookup(this.cardCode()).e(t,s,e)}}confC(){this.faction="T",this.rarity="C",this.name="Conflagrate",this.text=`Deal ${this.boof369} to two enemy creatures.`,this.playTarg.player="E"}confZ(t,i){const e=Date.now(),s=this.boof369;t.hurtDirect(s,this.code,e),i.hurtDirect(s,this.code,e)}confE(t,i,e){const s=this.boof369,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{dmg:s}),d.ddp1(e.owner,e.lane,{dmg:s})],l}cystgC(){this.faction="A",this.rarity="C",this.name="Cypien Steelgraft",this.text=`Two friendly creatures get Armor ${this.boof246}.`,this.playTarg.player="F",this.playTarg.canArmor=!0}cystgZ(t,i){const e=this.boof246;t.addArmor(e),i.addArmor(e)}cystgE(t,i,e){const s=this.boof246,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{arm:s}),d.ddp1(e.owner,e.lane,{arm:s})],l}grenC(){this.faction="N",this.rarity="C",this.name="Ghastly Renewal",this.text=`Give two friendly creatures Regenerate ${this.boof246}.`,this.playTarg.player="F",this.playTarg.canRegen=!0}grenZ(t,i){const e=this.boof246;t.addRegen(e),i.addRegen(e)}grenE(t,i,e){const s=this.boof246,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{rgn:s}),d.ddp1(e.owner,e.lane,{rgn:s})],l}get tsboof(){return this.level+2}twstrC(){this.faction="U",this.rarity="C",this.name="Twinstrength";const t=this.tsboof;this.text=`Two friendly creatures get ${a.log.jr9(t,t)}.`,this.playTarg.player="F"}twstrZ(t,i){const e=this.tsboof;t.buff(e,e),i.buff(e,e)}twstrE(t,i,e){const s=this.tsboof,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{att:s,hlt:s}),d.ddp1(e.owner,e.lane,{att:s,hlt:s})],l}}class Ri extends x{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Umbruk Icecrusher",this.jr1=this.boof61014,this.jr2=this.boof246,this.tribe.push("DN"),this.hints=["OL","ALU","ATH","LKV"],this.bonus={exist:this.ddp9(0,5,this.jr1+2,0)},this.text=`When ${this.name} ${a.log.dbdtap()}, deal that much damage to that player. Allied Uterra: This gets ${a.log.jr9(2,2,!0)}, and Breakthrough.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}jr8(t){if(t.trigger.type==="FR"){if(a.turn.allied("U")){const i=a.field.jr5(t.creatId);i.breakthrough=!0,i.buff(2,2)}a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event;a.player.ddf3(i.target,i.dmg,this.code),a.batch.triggerDone()}}}class Gi extends x{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Umbruk Lasher",this.jr1=this.boof71014,this.jr2=this.jr1-1,this.initBT=!0,this.tribe.push("DN"),this.hints=["OL","LKV","ATH","ALT"],this.text=`Allied Tempys: When ${this.name} ${a.log.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`,this.bonus={exist:this.ddp9(0,this.jr1,0,0)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}handleAction(t){a.field.ddf6(t).hurtDirect(parseInt(t.param),this.code),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId&&i.source.owner===a.state.ddf9()}return!1}jr8(t){if(t.trigger.type==="FR"){if(a.turn.allied("T")){const i=a.field.jr5(t.creatId),e=i.jr4("DM",this.code);e.interactive=!0,i.changed=!0}a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,e=a.target.toActions(d.crEnemyActTarg("CARD",this.code,i.dmg.toString()));e.length>0?(e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}}ddf7(t){return d.ddp2(t,t.playerA,t.lane,{dmg:parseInt(t.param)})}}class _t extends x{lookup(t){return{["CBB"]:{c:()=>this.cindC(),f:e=>this.cindF(e),e:e=>this.cindE(e)},["EBW"]:{c:()=>this.ebwC(),f:e=>this.ebwF(e),e:e=>this.ebwE(e)},["IBR"]:{c:()=>this.ibrfC(),f:e=>this.ibrfF(e),e:e=>this.ibrfE(e)},["SBI"]:{c:()=>this.sbiC(),f:e=>this.sbiF(e),e:e=>this.sbiE(e)}}[t]}targAction(t,i){this.lookup(t).f(i)}targEval(t,i){return this.lookup(t).e(i)}enemy=!1;ftext="";constructor(t){super(t),this.hints=[d.underHint(this.level)],this.lookup(this.cardCode()).c(),this.text=`Forge: If you are rank ${this.level+1} or higher, `+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.ddf6(t);this.targAction(this.cardCode(),i),a.action.actionDone(!0)}jr8(t){if(a.field.jr5(t.creatId).rank>this.level){const e=d.crActTarg("CARD",this.code,t.creatId);this.enemy&&(e.player="E");const s=a.target.toActions(e);s.length>0?a.action.ddf5(s):a.batch.triggerDone()}else a.batch.triggerDone()}ddf7(t){return this.targEval(this.cardCode(),t)}ebwC(){this.faction="N",this.rarity="C",this.name="Ebonbound Warlord",this.jr1=this.boof3714,this.jr2=this.jr1+4,this.tribe.push("VP"),this.hints.push("ENS"),this.enemy=!0;const t=this.boof369n;this.ftext=`give an enemy creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,-2*t,-t,0)}}ebwF(t){const i=this.boof369n;t.buff(i,i)}ebwE(t){const i=this.boof369n;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}sbiC(){this.faction="U",this.rarity="C",this.name="Shardbound Invoker",this.jr1=this.boof4714,this.jr2=this.jr1+1,this.tribe.push("TK");const t=this.boof359;this.ftext=`give a creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}sbiF(t){const i=this.boof359;t.buff(i,i)}sbiE(t){const i=this.boof359;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cindC(){this.faction="T",this.rarity="C",this.name="Cinderbound Barbarian",this.jr1=this.boof3612,this.jr2=this.jr1,this.tribe.push("FR","AS"),this.hints.push("ENS");const t=this.boof6912;this.enemy=!0,this.ftext=`deal ${t} damage to an enemy creature.`,this.bonus={play:this.ddp9(0,t,0,0)}}cindF(t){t.hurtDirect(this.boof6912,this.code)}cindE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof6912})}ibrfC(){this.faction="A",this.rarity="C",this.name="Ironbound Reinforcements",this.jr1=this.lValN([3,6,8]),this.jr2=this.jr1*2,this.tribe.push("GN");const t=this.boof5812;this.ftext=`give a creature ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}ibrfF(t){t.buff(this.boof5812,0)}ibrfE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof5812)}}class Li extends x{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Uranti Heartseeker",this.jr1=this.boof4915,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("YT"),this.text=`Activate: Deal ${this.jr1} damage to an enemy creature or player with exactly ${this.jr1} health.`}canActivate(t){return this.findVictims(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){if(t.zone==="F")a.field.ddf6(t).hurtDirect(this.jr1,this.code);else{const e=t;a.player.ddf3(e.playerA,this.jr1,this.code)}a.field.jr5(t.param).endActivation()}findVictims(t){const i=this.jr1,e=d.crEnemyTarg(),l=a.field.creatByTarget(e).filter(m=>m.health===i).map(m=>d.fieldSelectAction("CARD",m.lane,m.owner)),u=a.player.toPlayer("E");return u.health===i&&l.push(d.playerSelectAction("CARD",u.isPlayerA)),l.forEach(m=>{m.hostCard=this.code,m.param=t}),l}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=this.jr1,e=d.actionEval(t,"ST");if(t.zone==="P")e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i)),e.bonus=9999;else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{dmg:i}))}return e}}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=this.findVictims(e.id);return s.push(a.action.cancelAction()),s}}class E extends x{constructor(t){super(t),this.cardConstruct(this.cardCode())}cardConstruct(t){({["AEN"]:()=>this.anvenf(),["AGU"]:()=>this.avguard(),["BTH"]:()=>this.batthid(),["BLW"]:()=>this.blitwi(),["BWG"]:()=>this.brambleguard(),["CHY"]:()=>this.cavernhyd(),["CDC"]:()=>this.cindcol(),["CNM"]:()=>this.cindmy(),["CTG"]:()=>this.citg(),["CWK"]:()=>this.crag(),["DBP"]:()=>this.prowler(),["DMR"]:()=>this.raptor(),["DBR"]:()=>this.bearride(),["DSZ"]:()=>this.duskzomb(),["FWB"]:()=>this.fangbear(),["FWR"]:()=>this.ravager(),["FMS"]:()=>this.firemane(),["FPR"]:()=>this.flop(),["FGA"]:()=>this.falpha(),["FGB"]:()=>this.fbeta(),["FGO"]:()=>this.fomega(),["FPM"]:()=>this.minot(),["FPS"]:()=>this.forgeplate(),["GGE"]:()=>this.geist(),["GGH"]:()=>this.ghast(),["GGS"]:()=>this.ggs(),["GCL"]:()=>this.glacial(),["IWC"]:()=>this.warcharger(),["LWY"]:()=>this.lwyrm(),["LHY"]:()=>this.lyshyd(),["KDC"]:()=>this.kadc(),["MRF"]:()=>this.marrow(),["MMO"]:()=>this.mmop(),["NCW"]:()=>this.necrotic(),["NXC"]:()=>this.nexcore(),["NAM"]:()=>this.nyam(),["OBD"]:()=>this.battledroid(),["OSP"]:()=>this.oss(),["OSL"]:()=>this.ogsl(),["RHY"]:()=>this.ravh(),["RHC"]:()=>this.rime(),["RSP"]:()=>this.runprim(),["SCS"]:()=>this.scorp(),["SCD"]:()=>this.scout(),["SFT"]:()=>this.scrap(),["SBA"]:()=>this.sparkblade(),["SKB"]:()=>this.sparkbot(),["SBR"]:()=>this.sparkass(),["SSN"]:()=>this.sfsent(),["SGI"]:()=>this.stonefist(),["SCL"]:()=>this.stormcall(),["SML"]:()=>this.lurker(),["TGS"]:()=>this.tsprout(),["TGN"]:()=>this.tgnome(),["TWS"]:()=>this.tscout(),["TWT"]:()=>this.tund(),["URD"]:()=>this.unrelenting(),["VBK"]:()=>this.vblock(),["VTC"]:()=>this.vtech(),["WTW"]:()=>this.waterwalk(),["WPD"]:()=>this.windprime(),["XCR"]:()=>this.xithcrush(),["XHU"]:()=>this.hulk(),["YWC"]:()=>this.yetiwar(),["ZIN"]:()=>this.zombinf()})[t]()}sist(){this.rarity="R",this.level===1?this.hints=["LV"]:this.consistent=!0}anvenf(){this.faction="A",this.rarity="C",this.name="Anvillon Enforcer",this.jr1=this.boof5711,this.jr2=this.jr1-1,this.initArmor=this.boof246,this.tribe.push("RB")}avguard(){this.faction="T",this.rarity="R",this.name="Avalanche Guardian",this.jr1=this.boof5915,this.jr2=this.lValN([8,15,23]),this.initMobile=1,this.initDefend=!0,this.tribe.push("IC","EL")}batthid(){this.faction="U",this.name="Batterhide",this.jr1=this.boof3814,this.jr2=this.jr1+3,this.sist(),this.initBT=!0,this.tribe.push("DN")}battledroid(){this.faction="A",this.rarity="H",this.name="Oreian Battledroid",this.jr1=this.lValN([5,7,17]),this.jr2=1,this.initArmor=this.jr1,this.tribe.push("RB")}bearride(){this.faction="U",this.rarity="C",this.name="Deepwood Bear Rider",this.jr1=this.lValN([5,16,18]),this.jr2=this.lValN([2,8,10]),this.tribe.push("LP")}blitwi(){this.faction="N",this.name="Blight Witch",this.jr1=this.lValN([2,5,9]),this.jr2=this.boof71117,this.sist(),this.initRegen=this.boof234,this.tribe.push("ZB")}brambleguard(){this.faction="U",this.rarity="C",this.name="Bramblewood Guardian",this.jr1=this.boof2612,this.jr2=this.lValN([9,14,24]),this.tribe.push("PL")}cavernhyd(){this.faction="U",this.rarity="C",this.name="Cavern Hydra",this.jr1=this.boof4711,this.jr2=this.boof71015,this.initRegen=this.boof135,this.tribe.push("HY")}cindcol(){this.faction="T",this.rarity="C",this.name="Cinder Colossus",this.jr1=this.lValN([3,13,24]),this.jr2=this.lValN([4,14,27]),this.initDefend=!0,this.level===1&&(this.hints=["LV"]),this.tribe.push("ER","EL")}cindmy(){this.faction="T",this.rarity="C",this.name="Cinder Mystic",this.jr1=this.lValN([4,11,21]),this.jr2=this.boof3714,this.tribe.push("FR","AS")}citg(){this.faction="A",this.rarity="C",this.name="Citadel Guard",this.jr1=this.lValN([8,12,25]),this.jr2=this.lValN([9,13,30]),this.initDefend=!0,this.tribe.push("RB")}crag(){this.faction="T",this.rarity="C",this.name="Crag Walker",this.jr1=this.lValN([7,12,18]),this.jr2=this.boof246,this.initMobile=1,this.tribe.push("DN")}duskzomb(){this.faction="N",this.rarity="C",this.name="Duskspire Zombie",this.jr1=this.lValN([2,5,16]),this.jr2=this.lValN([5,8,19]),this.initRegen=4,this.tribe.push("ZB")}falpha(){this.faction="A",this.rarity="C",this.name="Forge Guardian Alpha",this.jr1=this.lValN([4,8,20]),this.jr2=this.lValN([8,14,26]),this.initDefend=!0,this.tribe.push("RB","GD")}fangbear(){this.faction="U",this.rarity="C",this.name="Fangwood Bear",this.jr1=this.boof61016,this.jr2=this.jr1,this.tribe.push("BR")}fbeta(){this.faction="A",this.rarity="R",this.name="Forge Guardian Beta",this.jr1=this.lValN([5,8,20]),this.jr2=this.lValN([3,6,18]),this.initArmor=this.boof124,this.tribe.push("RB","GD")}firemane(){this.faction="T",this.rarity="C",this.name="Firemane Steed",this.jr1=this.lValN([3,6,16]),this.jr2=this.lValN([6,9,19]),this.initMobile=2,this.tribe.push("FR","EL")}flop(){this.faction="T",this.rarity="C",this.name="Flowstone Primordial",this.jr1=this.lValN([6,7,15]),this.jr2=this.jr1+1,this.tribe.push("FR","EL")}fomega(){this.faction="A",this.rarity="L",this.name="Forge Guardian Omega",this.jr1=this.boof255080,this.jr2=this.jr1,this.initMobile=this.boof124,this.initArmor=this.initMobile*10,this.initBT=!0,this.initAggro=!0,this.consistent=!0,this.tribe.push("RB","GD")}forgeplate(){this.faction="A",this.rarity="C",this.name="Forgeplate Sentry",this.jr1=this.boof4915,this.jr2=this.jr1,this.initArmor=this.boof135,this.tribe.push("RB")}ggs(){this.faction="N",this.rarity="C",this.name="Grimgaunt Spectre",this.jr1=this.lValN([3,11,14]),this.jr2=this.jr1,this.initMobile=1,this.hints=["LV"],this.tribe.push("GG")}geist(){this.faction="N",this.rarity="C",this.name="Grave Geist",this.jr1=this.boof71118,this.jr2=this.boof4711,this.tribe.push("ST")}ghast(){this.faction="N",this.rarity="C",this.name="Grave Ghast",this.jr2=this.boof71013,this.jr1=this.jr2-2,this.initRegen=this.boof246,this.tribe.push("ZB")}glacial(){this.faction="T",this.rarity="C",this.name="Glacial Colossus",this.jr1=this.boof61016,this.jr2=this.lValN([8,13,19]),this.tribe.push("IC","EL"),this.initDefend=!0}hulk(){this.faction="N",this.rarity="C",this.name="Xithian Hulk",this.jr1=this.boof4814,this.jr2=this.jr1+3,this.tribe.push("AB")}kadc(){this.faction="T",this.rarity="C",this.name="Kadras Colossus",this.jr1=this.lValN([6,11,13]),this.jr2=this.jr1,this.tribe.push("GT"),this.hints=["DL"]}lurker(){this.faction="U",this.rarity="C",this.name="Swampmoss Lurker",this.jr1=this.lValN([8,13,22]),this.jr2=this.lValN([4,6,15]),this.tribe.push("DN")}lwyrm(){this.faction="T",this.rarity="C",this.name="Lightning Wyrm",this.jr1=this.boof4711,this.jr2=this.boof258,this.tribe.push("LT","EL"),this.initAggro=!0}lyshyd(){this.faction="U",this.rarity="C",this.name="Lysian Hydra",this.jr1=this.boof5914,this.jr2=this.jr1+1,this.initRegen=this.level,this.tribe.push("HY")}marrow(){this.faction="N",this.rarity="C",this.name="Marrow Fiend",this.jr1=this.boof81117,this.jr2=this.lValN([1,5,13]),this.tribe.push("SK")}minot(){this.faction="A",this.name="Forgeplate Minotaur",this.jr1=this.lValN([2,8,16]),this.jr2=this.lValN([4,9,17]),this.sist(),this.initArmor=this.level,this.tribe.push("RB")}mmop(){this.faction="A",this.rarity="C",this.name="Metamind Operator",this.jr1=this.boof4610,this.jr2=this.lValN([10,14,18]),this.tribe.push("MM")}necrotic(){this.faction="N",this.rarity="C",this.name="Necrotic Wurm",this.jr1=this.lValN([4,7,18]),this.jr2=this.lValN([5,8,19]),this.tribe.push("WR")}nexcore(){this.faction="A",this.rarity="C",this.name="Nexus Core",this.jr1=0,this.jr2=this.lValN([15,25,40]),this.tribe.push("RB"),this.initDefend=!0}nyam(){this.faction="N",this.rarity="C",this.name="Nyrali Ambusher",this.jr1=this.boof71117,this.jr2=this.lValN([3,6,13]),this.tribe.push("OZ")}ogsl(){this.faction="U",this.rarity="C",this.name="Overgrown Spineleaf",this.jr1=this.lValN([6,12,16]),this.jr2=this.boof4812,this.tribe.push("PL")}oss(){this.faction="N",this.rarity="R",this.name="Ossuary Spirit",this.jr1=this.lValN([1,3,6]),this.jr2=this.boof91420,this.initRegen=this.jr1+2,this.tribe.push("ST")}prowler(){this.faction="U",this.rarity="C",this.name="Deepbranch Prowler",this.jr1=this.lValN([8,9,10]),this.jr2=this.jr1,this.tribe.push("CT"),this.hints=["DL"],this.initBT=!0}raptor(){this.faction="U",this.rarity="C",this.name="Deepmoss Raptor",this.jr1=this.lValN([2,13,16]),this.jr2=this.jr1,this.hints=["LV","ST"],this.tribe.push("DN")}ravager(){this.faction="U",this.rarity="C",this.name="Fangwood Ravager",this.jr1=this.boof5917,this.jr2=this.jr1,this.tribe.push("BE")}ravh(){this.faction="U",this.rarity="C",this.name="Ravenous Hydra",this.jr1=this.boof5813,this.jr2=this.jr1+this.level,this.initRegen=this.level,this.initBT=!0,this.tribe.push("HY")}rime(){this.faction="T",this.rarity="C",this.name="Rimehorn Charger",this.jr1=this.lValN([5,8,10]),this.jr2=this.jr1+3,this.initMobile=1,this.hints=["DL"],this.tribe.push("RM")}runprim(){this.faction="T",this.name="Runestorm Primordial",this.jr1=this.boof3714,this.jr2=this.jr1-1,this.sist(),this.initAggro=!0,this.tribe.push("LT","EL")}scorp(){this.faction="N",this.rarity="C",this.name="Scavenger Scorpion",this.jr1=this.lValN([6,9,11]),this.jr2=this.jr1,this.initRegen=this.level,this.hints=["DL"],this.tribe.push("AB")}scout(){this.faction="A",this.rarity="H",this.name="Scout Drone",this.jr1=this.boof246,this.jr2=this.jr1,this.isFree=this.level>1,this.hints=[this.level===1?"LV":"DL"],this.tribe.push("RB")}scrap(){this.faction="A",this.rarity="H",this.name="Scrapforge Titan",this.jr1=this.lValN([1,5,20]),this.jr2=this.jr1,this.initArmor=this.lValN([1,5,10]),this.level===1&&(this.hints=["LV","ST"],this.bonus={play:1}),this.tribe.push("RB")}sfsent(){this.faction="A",this.rarity="C",this.name="Spiritforge Sentinel",this.jr1=this.lValN([3,6,9]),this.jr2=this.jr1*2,this.initArmor=this.lValN([1,2,6]),this.tribe.push("RB")}sparkbot(){this.faction="A",this.rarity="C",this.name="Spark Bot",this.jr1=this.boof5914,this.jr2=this.lValN([6,11,16]),this.tribe.push("RB")}sparkblade(){this.faction="A",this.rarity="C",this.name="Sparkblade Assassin",this.jr1=this.lValN([4,12,14]),this.jr2=this.lValN([5,13,15]),this.tribe.push("HM")}sparkass(){this.faction="T",this.rarity="C",this.name="Sparkbrand Asir",this.jr1=this.lValN([2,7,9]),this.jr2=this.lValN([6,11,13]),this.initAggro=!0,this.tribe.push("LT","AS")}stonefist(){this.faction="T",this.rarity="C",this.name="Stonefist Giant",this.jr1=this.lValN([3,7,16]),this.jr2=this.lValN([6,10,24]),this.tribe.push("ER","EL")}stormcall(){this.faction="T",this.rarity="C",this.name="Storm Caller",this.jr1=this.lValN([8,11,14]),this.jr2=this.jr1-2,this.tribe.push("WN","AS")}tgnome(){this.faction="A",this.rarity="C",this.name="Technognome",this.jr1=this.lValN([3,9,19]),this.jr2=this.jr1,this.level===1&&(this.hints=["LV"]),this.tribe.push("GN")}tscout(){this.faction="A",this.rarity="C",this.name="Tower Scout",this.jr1=this.boof5915,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("HM")}tund(){this.faction="A",this.rarity="C",this.name="Tundra Watcher",this.jr1=this.lValN([5,10,12]),this.jr2=this.lValN([8,11,13]),this.hints=["DL"],this.tribe.push("RB")}tsprout(){this.faction="U",this.rarity="C",this.name="Tanglesprout",this.jr1=this.boof7911,this.jr2=this.jr1+1,this.hints=["DL"],this.tribe.push("PL")}unrelenting(){this.faction="N",this.rarity="H",this.name="Unrelenting Dead",this.jr1=this.boof4814,this.jr2=this.jr1,this.initRegen=this.jr1,this.tribe.push("ZB")}vblock(){this.faction="A",this.rarity="R",this.name="Vault Blockade",this.jr1=0,this.jr2=this.boof135,this.initArmor=this.boof101520,this.initDefend=!0,this.tribe.push("RB")}vtech(){this.faction="A",this.rarity="C",this.name="Vault Technician",this.jr1=this.boof61218,this.jr2=this.lValN([3,9,15]),this.tribe.push("HM")}warcharger(){this.faction="A",this.rarity="C",this.name="Ionic Warcharger",this.jr1=this.boof4915,this.jr2=this.lValN([7,12,18]),this.initMobile=1,this.tribe.push("RB")}waterwalk(){this.faction="T",this.rarity="C",this.name="Water Walker",this.jr1=this.lValN([5,12,14]),this.jr2=this.lValN([2,9,11]),this.tribe.push("IC","AS")}windprime(){this.faction="T",this.rarity="C",this.name="Wind Primordial",this.jr2=this.boof4814,this.jr1=this.jr2+2,this.initMobile=this.level,this.tribe.push("WN","EL")}xithcrush(){this.faction="N",this.rarity="C",this.name="Xithian Crusher",this.jr1=this.lValN([4,10,16]),this.jr2=this.jr1+2,this.tribe.push("AB")}yetiwar(){this.faction="T",this.rarity="C",this.name="Yeti Warcaller",this.jr1=this.boof248,this.jr2=this.lValN([10,15,23]),this.tribe.push("YT")}zombinf(){this.faction="N",this.rarity="C",this.name="Zombie Infantry",this.jr1=this.boof61015,this.jr2=this.jr1-1,this.tribe.push("ZB")}}class Ii extends rt{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Varna's Pact";const i=this.lValS(["a","two","three"]),e=this.level===1?"":"s",s=this.level===1?"was":"were";this.text=`Put ${i} random creature${e} that ${s} destroyed this game into ${i} lane${e}.`}playTargets(){const t=super.playTargets();return t.push(this.fieldTarget("P1",[])),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")this.level===1?this.endSpell([t.lane],t.playerA):a.action.ddf5(this.getCardActions(t));else if(i[0]==="P2"){const e=[t.lane,parseInt(i[1])];this.level===2?this.endSpell(e,t.playerA):a.action.ddf5(this.getCardActions(t))}else this.endSpell([t.lane,parseInt(i[1]),parseInt(i[2])],t.playerA)}endSpell(t,i){this.logSpell();const e=Date.now();t.forEach(s=>{const l=a.death.gravedigger();l&&a.field.birthCreature(l,"R",i,s,e)}),a.turn.spellCast()}fieldTarget(t,i){const e=d.actionTarget("TF","CARD",this.code,a.enTil(t,...i));return e.player="F",e.lanes=a.field.laneIdx.filter(s=>!i.includes(s)),e}getCardActions(t,i){const e=a.deTil(t.param);let s;if(e[0]==="P1")s=this.fieldTarget("P2",[t.lane]);else{const l=[t.lane,parseInt(e[1])];s=this.fieldTarget("P3",l)}return a.target.toActions(s)}ddf7(t){const e=a.deTil(t.param)[0],s=d.ddp4(t,t.playerA,t.lane,`${"XHU"}1`);return s.final=this.level===1&&e==="P1"||this.level===2&&e==="P2"||this.level===3&&e==="P3",s.hints=["RE"],s}}class $i extends x{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Wildwood Sower",this.jr1=this.boof3612,this.jr2=this.lValN([6,11,18]),this.tribe.push("HM"),this.hints=["EMO"];const i=N.minionBuff(this.level);this.text=`When you play a spell, you may put a ${i}/${i} ${N.minionName(this.level)} into an available lane.`,this.bonus={exist:this.ddp9(1,i*2,i,0)*.5}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){a.field.birthCreature(N.minionCode(this.level),"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}return!1}jr8(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,""),e=a.target.toActions(i);e.length===0?a.batch.triggerDone():(e.push(a.action.noneEndTrigger()),a.action.ddf5(e))}ddf7(t){return d.ddp4(t,t.playerA,t.lane,N.minionCode(this.level))}}class Vi extends x{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Windcaller Shaman",this.jr1=this.boof3713,this.jr2=this.jr1+4,this.tribe.push("WN","AS"),this.hints=["FRO","EMA"],this.text=`Forge: You may move another friendly ${a.log.levelGateText(this.level,!0)}creature to an available lane adjacent to ${this.name}.`,this.bonus={play:this.lValN([.25,.5,1])}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}jr8(t){const i=a.field.jr5(t.creatId);if(this.emptySloots(i).length>0){const e=d.crFriendNotMeActTarg("CARD",i.id,this.code,a.enTil("P1",i.id));e.level=a.target.ddf2(this.level);const s=a.target.toActions(e);s.length>0?(s.push(a.action.noneEndTrigger()),a.action.ddf5(s)):a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){const i=a.deTil(t.param);i[0]==="P1"?a.action.ddf5(this.getCardActions(t)):(a.field.jr5(i[1]).move(t.lane),a.action.actionDone(!0))}emptySloots(t,i=""){return a.action.emptyAdjacents(t,a.enTil("P2",i))}getCardActions(t,i){const e=a.deTil(t.param),s=a.field.ddf6(t),l=a.field.jr5(e[1]),u=this.emptySloots(l,s.id);return u.push(a.action.cancelAction()),u}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=a.field.jr5(i[1]),l=d.ddp1(s.owner,s.lane);return l.moveTo=t.lane,e.vectors.push(l),e}}}class Oi extends x{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Xithian Rotfiend",this.jr1=this.lValN([7,12,20]),this.jr2=this.jr1+1,this.tribe.push("AB"),this.hints=["OL"];const i=-this.boof135;this.text=`When ${this.name} becomes opposed, it gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("EF",this.code),e.jr4("MV",this.code),e}ddf8(t){if(t.trigger.type==="EF"||t.trigger.type==="MV"){const i=t.event;return t.trigger.creatId===i.creature.id&&t.trigger.type==="MV"||i.creature.owner!==t.ownerPlayerA}return!1}jr8(t){let i=!1;const e=a.field.jr5(t.creatId),s=t.event;if((e.id===s.creature.id&&e.opposed||s.creature.lane===a.field.oppositeLane(e.lane))&&(i=!0),i){const l=-this.boof135;e.buff(l,l)}a.batch.triggerDone()}}class Ui extends x{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Zombie Titan",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("ZB");const i=this.boof234;this.text=`While ${this.name} is in a side lane, it gets ${a.log.jr9(i,i,!0)} and Regenerate ${this.level}.`,this.bonus={play:this.ddp9(0,i*2+this.level,i,0)},this.hints=["SL"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){if(i.lane===1||i.lane===5){const e=this.boof234;[d.mod("AT",e,i.id),d.mod("HL",e,i.id),d.mod("MH",e,i.id),d.mod("RG",this.level,i.id)].forEach(l=>{i.addModSafe(l)})}else i.removeModSafe(i.id)}}class Wi{cardCache={};mapper={["AAK"]:Ie,["AGC"]:Q,["AGK"]:M,["AGP"]:J,["ASG"]:F,["AFO"]:qt,["ATG"]:xt,["ART"]:xt,["ATP"]:ae,["AGM"]:Lt,["ALG"]:zt,["AHL"]:Qe,["ALS"]:zt,["AEN"]:E,["APM"]:$e,["AQE"]:F,["AGD"]:Ve,["AFS"]:Gt,["ABR"]:Dt,["AFR"]:M,["AMY"]:Dt,["ABL"]:F,["AGU"]:E,["AIV"]:gt,["BTH"]:E,["BTN"]:zt,["BLH"]:xt,["BSP"]:gt,["BWK"]:Lt,["BLW"]:E,["BSR"]:Q,["BMY"]:Oe,["BSW"]:Z,["BTM"]:F,["BOS"]:N,["BAW"]:Q,["BWG"]:E,["BTR"]:M,["BWD"]:Xt,["BSG"]:Ue,["BSS"]:M,["BTS"]:Xt,["BRF"]:Lt,["BWH"]:We,["BRN"]:Zt,["BZD"]:M,["BFM"]:M,["BSM"]:ze,["CDT"]:Lt,["CTL"]:J,["CCS"]:Z,["CHY"]:E,["CRS"]:qt,["CHV"]:Ze,["CTI"]:M,["CHA"]:Q,["CHH"]:M,["CHR"]:jt,["CBB"]:_t,["CDC"]:E,["CFB"]:Dt,["CNM"]:E,["CSW"]:M,["CTG"]:E,["CCT"]:oe,["CFG"]:Qt,["CGF"]:lt,["CGL"]:Z,["CSU"]:F,["CCR"]:Q,["CSB"]:lt,["CWK"]:E,["CRC"]:gt,["CYC"]:xt,["CTW"]:F,["CTV"]:F,["CAG"]:F,["CBS"]:F,["CIN"]:se,["CSH"]:Z,["CSG"]:Qt,["DFR"]:M,["DHW"]:xt,["DSS"]:Jt,["DCR"]:J,["DSK"]:lt,["DBA"]:M,["DBP"]:E,["DMR"]:E,["DBR"]:E,["DCS"]:At,["DGZ"]:J,["DIS"]:Ot,["DSV"]:Ke,["DDD"]:M,["DZA"]:N,["DZD"]:jt,["DBT"]:F,["DFB"]:ft,["DMW"]:Gt,["DCH"]:Ot,["DSZ"]:E,["DYB"]:F,["DBQ"]:Ye,["DYS"]:Xe,["DYL"]:qe,["EBW"]:_t,["ESK"]:gt,["EHW"]:je,["ETN"]:F,["EWE"]:le,["ENP"]:F,["ESU"]:Ot,["ENR"]:F,["EPD"]:J,["ESC"]:Xt,["ESP"]:_e,["EWT"]:M,["EHN"]:Xt,["EFM"]:Dt,["EFP"]:ti,["EXD"]:F,["FWB"]:E,["FWR"]:E,["FWK"]:lt,["FIN"]:F,["FRR"]:J,["FVA"]:F,["FWG"]:N,["FWC"]:gt,["FFU"]:Z,["FMS"]:E,["FSM"]:J,["FBC"]:Dt,["FBI"]:xt,["FFS"]:Z,["FLN"]:F,["FRI"]:Q,["FSS"]:Jt,["FLS"]:xt,["FSH"]:Z,["FFD"]:lt,["FRV"]:Q,["FSP"]:ht,["FPR"]:E,["FFL"]:F,["FGA"]:E,["FGB"]:E,["FGD"]:ht,["FGG"]:Gt,["FGO"]:E,["FOL"]:qt,["FPM"]:E,["FPS"]:E,["FFM"]:le,["FMD"]:ei,["FME"]:gt,["FSK"]:ii,["FWT"]:M,["FZS"]:F,["FUN"]:N,["GHS"]:Gt,["GHB"]:oe,["GRN"]:Qt,["GTH"]:F,["GSC"]:Lt,["GMP"]:At,["GTT"]:ri,["GCL"]:E,["GCR"]:F,["GLF"]:Q,["GRW"]:Q,["GSW"]:M,["GVS"]:lt,["GSS"]:M,["GBG"]:lt,["GGE"]:E,["GGH"]:E,["GRP"]:ai,["GGD"]:ft,["GGR"]:ft,["GGP"]:ft,["GGS"]:E,["GRM"]:J,["GHT"]:Q,["GMR"]:lt,["HMF"]:ht,["HTR"]:ne,["HAR"]:F,["HFA"]:Yt,["HOD"]:ht,["HWM"]:se,["HGS"]:si,["HTP"]:ni,["IBF"]:J,["ITO"]:Ot,["IWC"]:E,["IHA"]:Lt,["IBR"]:_t,["IMD"]:jt,["IMA"]:M,["IZL"]:oi,["IZR"]:hi,["IZK"]:xt,["IFL"]:Zt,["IFR"]:F,["JPK"]:F,["KDC"]:E,["KAW"]:xt,["KOD"]:Z,["KIW"]:li,["KKK"]:ne,["LKP"]:ci,["LGT"]:M,["LBR"]:F,["LSK"]:Zt,["LWY"]:E,["LBD"]:M,["LSS"]:Jt,["LBL"]:At,["LSP"]:se,["LMV"]:M,["LHY"]:E,["LYS"]:F,["MMH"]:Q,["MRF"]:E,["MOE"]:M,["MXW"]:Q,["MSP"]:Ot,["MMA"]:M,["MMX"]:lt,["MMO"]:E,["MMV"]:gt,["MPH"]:F,["MSC"]:F,["MTS"]:Te,["MTT"]:di,["MML"]:ui,["MMW"]:fi,["MBP"]:Z,["MND"]:Z,["NNS"]:F,["NGB"]:Q,["NSL"]:F,["NCS"]:Z,["NCW"]:E,["NCV"]:F,["NSW"]:gi,["NDR"]:mi,["NEM"]:Ot,["NSH"]:J,["NXA"]:pi,["NXC"]:E,["NXG"]:Z,["NXP"]:Ae,["NXT"]:zt,["NGT"]:ft,["NCL"]:J,["NFF"]:Z,["NAM"]:E,["NOZ"]:lt,["NSY"]:M,["ONN"]:yi,["OXA"]:bi,["OXM"]:M,["OXP"]:vi,["OOZ"]:N,["OBB"]:Ai,["OEX"]:F,["OWH"]:ki,["OBD"]:E,["OFM"]:M,["OJC"]:ht,["OPK"]:M,["OWW"]:Gt,["OHV"]:Z,["ODC"]:Ti,["OSP"]:E,["OSL"]:E,["OWF"]:J,["OXS"]:Ci,["PHM"]:M,["PPM"]:Z,["PSM"]:M,["PRI"]:Te,["PHS"]:Q,["PTB"]:J,["PSC"]:Z,["PTR"]:F,["PSG"]:F,["PMS"]:F,["PYG"]:oe,["PYS"]:J,["RBH"]:Si,["ROK"]:J,["RHY"]:E,["RTS"]:Dt,["RLW"]:ht,["RFL"]:wi,["RHC"]:E,["ROG"]:F,["RFA"]:Yt,["RBG"]:ke,["RGG"]:gt,["RSZ"]:lt,["RSP"]:E,["RHW"]:ht,["SAP"]:F,["SPL"]:N,["SVO"]:F,["SSE"]:At,["SXP"]:N,["SXD"]:N,["SXT"]:N,["STS"]:J,["SCS"]:E,["SMD"]:M,["SFS"]:Di,["SCD"]:E,["SFT"]:E,["SOA"]:F,["SOD"]:F,["SOK"]:Zt,["SOT"]:F,["SDL"]:N,["SAD"]:xi,["SHG"]:F,["SBI"]:_t,["SPD"]:At,["SPM"]:At,["STD"]:Q,["SHS"]:Lt,["SGF"]:Z,["SKG"]:Ae,["SSR"]:gt,["SNB"]:F,["SNP"]:J,["SRD"]:J,["SRH"]:ft,["SDN"]:M,["SHV"]:F,["SBA"]:E,["SKB"]:E,["SBR"]:E,["SBD"]:M,["SCV"]:Ei,["SFM"]:lt,["SSN"]:E,["SSM"]:gt,["SLH"]:Fi,["SPN"]:N,["SRV"]:ke,["STR"]:F,["XYR"]:N,["SSA"]:Z,["STO"]:F,["SDR"]:ht,["SWR"]:Pi,["SHK"]:Zt,["SFA"]:Yt,["STG"]:Bi,["SSS"]:Jt,["SSK"]:M,["SWM"]:Z,["STN"]:F,["SGI"]:E,["SBG"]:Ni,["SCL"]:E,["SGA"]:Yt,["SSG"]:gt,["SVH"]:Dt,["SIN"]:F,["SYL"]:M,["SEV"]:Q,["SML"]:E,["SYO"]:Hi,["TST"]:J,["TBA"]:At,["TGL"]:F,["TGS"]:E,["TPT"]:F,["TDW"]:ht,["TGN"]:E,["TSM"]:qt,["TUP"]:F,["TGI"]:M,["TDS"]:jt,["TPG"]:ae,["TMG"]:ae,["TOB"]:F,["TWS"]:E,["TVG"]:Je,["TXS"]:F,["TFK"]:N,["TFD"]:N,["TFF"]:N,["TCG"]:F,["TWT"]:E,["TRN"]:J,["TSL"]:Mi,["TWG"]:Qt,["UGM"]:gt,["UGL"]:M,["UIC"]:Ri,["ULR"]:Gi,["URD"]:E,["UBL"]:F,["UCM"]:Z,["UHS"]:Li,["UIM"]:Z,["UWL"]:M,["UWS"]:M,["UTM"]:M,["UTR"]:ht,["URB"]:Dt,["UPM"]:Gt,["VRP"]:Ii,["VBK"]:E,["VTC"]:E,["VGN"]:lt,["VNF"]:Q,["VNS"]:M,["VGR"]:F,["VCG"]:At,["VES"]:Dt,["VYE"]:F,["WBY"]:Q,["WBU"]:Q,["WMR"]:Z,["WMM"]:F,["WTW"]:E,["WWP"]:M,["WWR"]:Z,["WFM"]:Gt,["WWS"]:$i,["WBH"]:le,["WCS"]:Vi,["WPD"]:E,["WFB"]:M,["WFS"]:Z,["WBG"]:At,["XCR"]:E,["XDH"]:Q,["XHS"]:lt,["XHU"]:E,["XRF"]:Oi,["XSH"]:Z,["XDV"]:ne,["XRW"]:F,["YWC"]:E,["YNS"]:ft,["ZPM"]:Z,["ZTR"]:N,["ZTU"]:lt,["ZIN"]:E,["ZBS"]:N,["ZMT"]:Ui,["ZMB"]:N,["ZSH"]:At};makeCard(t){try{return new this.mapper[pt.extractCardCode(t)](t)}catch(i){throw console.error("Make card screwed up on code: "+t),i}}getCard(t){return this.cardCache[t]||(this.cardCache[t]=this.makeCard(t)),this.cardCache[t]}}class zi{guts="";txt(t){return this.guts+=t,this}plr(t){const i=a.player.toBool(t);return this.guts+="^p"+(i?"a":"b"),this}crd(t){return this.guts+="^c"+t,this}go(){a.log.parse(this)}}class Zi{loglist;you=!0;localPlayerKey="";oppPlayerKey="";localPlayerSpan="";oppPlayerSpan="";constructor(){this.loglist=document.getElementById("loglist")}setup(){this.you=a.state.gs.isLocalA,this.localPlayerKey=this.you?"^pa":"^pb",this.oppPlayerKey=this.you?"^pb":"^pa",this.localPlayerSpan=this.span(a.player.toPlayer(this.you).name,"green"),this.oppPlayerSpan=this.span(a.player.toPlayer(!this.you).name,"red")}addLi(t){const i=document.createElement("li");i.innerHTML=t,this.loglist.appendChild(i),i.scrollIntoView({behavior:"smooth",block:"end"})}span(t,i,e=""){const s=e.length>0?` onclick="sfapi.details('${e}')"`:"";return`${t}`}add(t){this.addLi(t)}clearAll(){this.loglist.innerHTML=""}new(){return new zi}factMap={["A"]:"all",["N"]:"nek",["T"]:"tem",["U"]:"ute"};parseCards(t){let i=!0;for(;i;){const e=t.indexOf("^c");if(e===-1)i=!1;else{const s=t.slice(e+2,e+6);if(s==="POIS")t=t.replaceAll("^c"+s,this.span("Poison","green"));else{const l=a.cards.getCard(s);t=t.replaceAll("^c"+s,this.span(`${l.name} ${l.level}`,this.factMap[l.faction],s))}}}return t}parse(t){const e=t.guts.replaceAll(this.localPlayerKey,this.localPlayerSpan).replaceAll(this.oppPlayerKey,this.oppPlayerSpan),s=this.parseCards(e);this.add(s)}cardText(t){let i;if(t.type==="C"){const e=t,s=[];e.initRegen>0&&s.push("Regenerate "+e.initRegen),e.initArmor>0&&s.push("Armor "+e.initArmor),e.initMobile>0&&s.push("Mobility "+e.initMobile),e.initBT&&s.push("Breakthrough"),e.initDefend&&s.push("Defender"),e.initAggro&&s.push("Aggressive"),e.consistent&&s.push("Consistent"),s.length>0&&s.push(""),i=s.join(". ")+t.text}else i=t.text;return(t.isFree?"Free. ":"")+(t.overload?"Overload. ":"")+i}cardTextSplit(t){const i=[];if(t.isFree&&i.push("Free"),t.consistent&&i.push("Consistent"),t.overload&&i.push("Overload"),t.type==="C"){const e=t;e.initRegen>0&&i.push("Regenerate "+e.initRegen),e.initArmor>0&&i.push("Armor "+e.initArmor),e.initMobile>0&&i.push("Mobility "+e.initMobile),e.initBT&&i.push("Breakthrough"),e.initDefend&&i.push("Defender"),e.initAggro&&i.push("Aggressive")}if(t.text.length>0&&i.push(t.text),t.level===1){const e=t.cardCode(),s=be.find(l=>l[0]===e);if(s){let l;const u=s[1];u.length===2&&u[0]===u[1]?l="2x "+a.cards.getCard(`${u[0]}1`).name:l=u.map(m=>a.cards.getCard(`${m}1`).name).join(", "),i.push("Solbind: "+l)}}return i}factionText(t){switch(t){case "A":return"Alloyin";case "N":return"Nekrium";case "T":return"Tempys";case "U":return"Uterra";case "X":return""}}cardTypeText(t){return t==="C"?"Creature":"Spell"}rarityText(t){switch(t){case "C":return"Common";case "R":return"Rare";case "H":return"Heroic";case "L":return"Legendary";case "T":return"Token"}}levelGateText(t,i=!1){const e=i?" ":"";return t===1?`level 1${e}`:t===2?`level 2 or lower${e}`:""}jr9(t,i,e=!1){return t!==0&&i!==0?`${this.bufferson(t,!0)}${e?",":" and"} ${this.bufferson(i,!1)}`:t!==0?this.bufferson(t,!0):this.bufferson(i,!1)}bufferson(t,i){return`${t>0?"+":""}${t} ${i?"attack":"health"}`}dbdtac(t=-1){return`deals battle damage to a ${t===-1?"":this.levelGateText(t,!0)}creature`}dbdtap(){return"deals battle damage to a player"}daluac(t=!1){return(t?"D":"d")+"iscard and level up a card"}forglied(t){return t==="X"?"Forge":`Allied ${this.factionText(t)}`}fastName(t){return t.length===3&&(t=`${t}1`),a.cards.getCard(t).name}actionText(t){switch(t.actionKey){case "ACTV":return"Activate";case "CARD":return`Card (${this.fastName(t.hostCard)})`;case "FITE":return"Fight";case "FORG":const i=t;return`Forge (${this.fastName(i.hostCard)}) Lane ${6-i.lane}`;case "HDSC":return`Hand Discard (${this.fastName(t.hostCard)})`;case "HPLY":const e=t;return`Hand Pick (${this.fastName(e.card)})`;case "MEND":return"Move End";case "MOVE":return"Move Start";case "NOTR":return"Pick None";case "ENDT":return"Donethanks";default:return t.actionKey}}tribeText(t){switch(t){case "AN":return"Any";case "AB":return"Abomination";case "AG":return"Angel";case "AS":return"Asir";case "BR":return"Bear";case "BE":return"Beast";case "CT":return"Cat";case "CR":return"Chrysalis";case "CY":return"Cyborg";case "DF":return"Darkforged";case "DM":return"Demon";case "DN":return"Dinosaur";case "DG":return"Dragon";case "DY":return"Dryad";case "ER":return"Earth";case "EL":return"Elemental";case "EN":return"Energeist";case "FY":return"Fairy";case "FR":return"Fire";case "FB":return"Forgeborn";case "FT":return"Frost";case "GT":return"Giant";case "GN":return"Gnome";case "GL":return"Golem";case "GG":return"Grimgaunt";case "GD":return"Guardian";case "HM":return"Human";case "HY":return"Hydra";case "IC":return"Ice";case "IN":return"Insect";case "LT":return"Lightning";case "LP":return"Lupin";case "MT":return"Manticore";case "MC":return"Mech";case "MM":return"Metamind";case "NG":return"Naga";case "OZ":return"Ooze";case "PX":return"Phoenix";case "PL":return"Plant";case "RM":return"Ram";case "RB":return"Robot";case "SY":return"Satyr";case "SE":return"Seraph";case "SH":return"Shaman";case "SS":return"Shapeshifter";case "SK":return"Skeleton";case "SN":return"Snake";case "SP":return"Spider";case "ST":return"Spirit";case "TG":return"Tigrin";case "TK":return"Tuskin";case "VP":return"Vampire";case "WD":return"Wanderer";case "WN":return"Wind";case "WF":return"Wolf";case "WR":return"Wurm";case "YT":return"Yeti";case "ZB":return"Zombie"}}}class Ki{get stack(){return a.state.gs.modeStack}setMode(t){this.deetMode(t)||t==="X"?this.stack.push(t):(a.state.gs.modeStack=[t],t==="G"?(a.canvases.get("game-ui").clear(),a.drawing.setBackground("playmat")):t==="R"||t==="P"||t==="I"?(a.canvases.get("game-ui").clear(),a.drawing.setBackground("blueface")):t==="M"&&(a.drawing.clearAll(),a.drawing.setBackground("mainmenu")))}popMode(){this.stack.pop()}get mode(){const t=this.stack;return t[t.length-1]}get isDetailMode(){return this.deetMode(this.mode)}get baseMode(){return this.stack[0]}deetMode(t){return t==="C"||t==="D"}}class Yi{ddf8(t){return t.trigger.type==="FR"?this.forgeTriggerTest(t):t.trigger.type==="VN"?this.vengeanceTriggerTest(t):t.trigger.type==="FK"?this.flankTriggerTest(t):t.trigger.type==="DM"&&t.event.code==="DMG"||t.trigger.type==="EF"&&t.event.code==="ENT"||t.trigger.type==="DS"&&t.event.code==="DIE"||t.trigger.type==="PC"&&t.event.code==="PLC"||t.trigger.type==="MV"&&t.event.code==="MOV"||t.trigger.type==="LG"&&t.event.code==="PHL"||t.trigger.type==="TS"&&t.event.code==="TRS"||t.trigger.type==="TE"&&t.event.code==="TRE"||t.trigger.type==="PT"&&t.event.code==="PTN"||t.trigger.type==="RU"&&t.event.code==="RKU"?this.generalTriggerTest(t):!1}resolve(t){t.host==="C"?(t.trigger.interactive&&(a.state.gs.batch.iatLane=a.field.jr5(t.creatId).lane),a.cards.getCard(t.trigger.logicCode).jr8(t)):t.host==="P"?console.error("player hosted trigger encountered. No code!"):t.host==="H"?console.error("hand card hosted trigger encountered. No code!"):console.error("Encountered trigger reaction with mystery host ",t)}forgeTriggerTest(t){if(t.event.code==="ENT"){const i=t.event;if(!i.creature)throw new Error("Creature Enters Field event not provided creature payload");if(i.forged){const e=a.field.jr5(t.creatId);return e.status==="A"&&e.id===i.creature.id}}return!1}vengeanceTriggerTest(t){if(t.event.code==="DIE"){const i=t.event;if(!i.creature)throw new Error("Creature Died event not provided creature payload");const e=a.field.searchById(t.creatId);if(e)return e.status==="D"&&e.id===i.creature.id;console.warn("interesting. venegeance trigger test could not find its creature",t)}return!1}flankTriggerTest(t){if(t.event.code==="MOV"){const i=t.event;if(!i.creature)throw new Error("Creature Moved event not provided creature payload");const e=a.field.jr5(t.creatId);return e.status==="A"&&e.id===i.creature.id}return!1}generalTriggerTest(t){return t.creatId?a.cards.getCard(t.trigger.logicCode).ddf8(t):(console.error("player based trigger event encountered"),!1)}}class Xi{deathCheck(){const t=Date.now();a.field.qActiveCreats().forEach(s=>{s.health<1&&(a.log.new().crd(s.code).txt(" died.").go(),this.smite(s,t))});const i=a.player.toPlayer(!0),e=a.player.toPlayer(!1);(i.health<1||e.health<1)&&(i.healthe.creatId===t.id)&&(a.state.gs.deathOrder=a.state.gs.deathOrder.filter(e=>e.creatId!==t.id))}findDeathTime(t){const i=a.state.gs.deathOrder.filter(e=>e.creatId===t).map(e=>e.time);if(i.length!==0)return Math.min(...i)}destroy(t,i,e=void 0){t.status==="A"?(a.log.new().crd(t.code).txt(" was destroyed by ").crd(i).txt(".").go(),this.smite(t,e)):(console.warn(`Attempted to destroy creature that was not active. Targ creat ${t.code}; Killer creat ${i}`),console.trace())}gravedigger(t="X"){if(t==="X"){const i=a.state.gs.graveyard.length;return i===0?"":a.state.gs.graveyard[a.randInt(0,i)].cardCode}else{const i=a.player.toBool(t),e=a.state.gs.graveyard.filter(l=>l.owner===i),s=e.length;return s===0?"":e[a.randInt(0,s)].cardCode}}smite(t,i=void 0){t.status="D",a.state.gs.deathOrder.push({creatId:t.id,time:i||Date.now()}),a.state.gs.graveyard.push({cardCode:t.code,owner:t.owner}),a.batch.addEvents(d.creatureEvent("DIE",t)),a.effect.positionChange(t.owner)}}class qi{startBatch(){this.deathCheck=!1,this.type==="C0"?this.type="C1":this.type==="C1"?this.type="C2":this.type==="C2"&&(this.type="N0");const t=this.type;let i;if(t==="N0")i=a.state.gs.batch.events.slice(),a.state.gs.batch.events=[];else{const s=a.state.gs.batch.events.filter(u=>u.code==="DIE"),l=a.state.gs.batch.events.filter(u=>u.code!=="DIE");t==="C1"?(i=l,a.state.gs.batch.events=s):(i=s,a.state.gs.batch.events=l)}const e=this.generateTriggers(i);a.state.gs.batch.triggerActions=this.sortTriggers(e),a.phase.whatNext()}generateTriggers(t){let i;const e=t.map(s=>(s.code==="TRS"&&(i=s),a.state.gs.field.map(u=>u.triggers.map(m=>{const y=d.triggerReaction(s,m,u.owner,"C");return y.creatId=u.id,y.cardCode=u.code,y}).filter(m=>a.trigger.ddf8(m))).flat())).flat();return i&&this.handleTurnStart(i),e}sortTriggers(t){const i=a.state.ddf9(),e=t.filter(u=>!u.trigger.interactive&&u.ownerPlayerA===i),s=t.filter(u=>!u.trigger.interactive&&u.ownerPlayerA!==i);return t.filter(u=>u.trigger.interactive&&u.ownerPlayerA===i).concat(s,e)}handleTurnStart(t){const i=a.state.ddf9();a.field.qPlayerCreats(i).filter(s=>s.sleeping).forEach(s=>{s.sleeping=!1});const e=Date.now();a.field.qActiveCreats().forEach(s=>{if(s.owner===t.playerA&&(s.activationAvailable=!0,s.mobilityAvailable=!0,s.sleeping=!1),s.armorDmg=0,s.poison>0&&s.hurtDirect(s.poison,"POIS",e),s.regen>0){const l=s.heal(s.regen);this.addEvents(d.creatStatEvent("RGN",s,l))}a.death.deathProdder(s,e)})}getNextTrigger(){const t=a.state.gs.batch.triggerActions;if(t.length!==0)return t[t.length-1]}triggerDone(){const t=a.state.gs.batch.triggerActions;t.length===0?console.error("batch.triggerDone() was called when there is no trigger actions"):(t.pop(),a.state.gs.batch.iatLane=0),a.phase.whatNext()}addEvents(...t){a.state.gs.batch.events.push(...t)}get deathCheck(){return a.state.gs.batch.deathCheck}set deathCheck(t){a.state.gs.batch.deathCheck=t}get type(){return a.state.gs.batch.type}set type(t){a.state.gs.batch.type=t}get iaTrigLane(){return a.state.gs.batch.iatLane}}class ji{chirpy=!1;chirp(t){}enterMainPhase(){a.state.setPhase("MN");const t=a.state.getActivePlayer(),i=this.getMainPhaseActions(t);a.action.ddf5(i)}passTheTurn(){a.state.gs.activePlayer=!a.state.gs.activePlayer,a.state.setPhase("WT"),a.state.gs.aiMode&&(a.state.gs.aiActive=!a.state.gs.aiActive,this.startTurn())}startTurn(){a.log.new().txt("------").go(),a.log.new().plr(a.state.ddf9()).txt(" starts turn.").go(),a.state.resetTurnData(),a.state.setPhase("ST"),a.batch.addEvents(d.playerEvent("TRS",a.state.ddf9())),this.expireMods(),this.whatNext()}async whatNext(){if(a.state.gs.winFlag!==0){this.chirp("NEXT! found win state"),a.action.actionHistory=[],a.state.gs.aiActive=!1,a.state.gs.ui.animating=!1,await a.drawing.drawAll();return}if(await a.drawing.drawAll(),a.action.actionHistory.length>0)this.chirp("NEXT! action restore"),a.action.ddf5();else if(a.batch.getNextTrigger())this.chirp("NEXT! next trigger"),a.trigger.resolve(a.batch.getNextTrigger());else if(!a.batch.deathCheck)this.chirp("NEXT! death check"),a.death.deathCheck(),this.whatNext();else if(a.state.gs.batch.events.length>0)this.chirp("NEXT! batch start"),a.batch.startBatch();else switch(this.chirp("NEXT! enter phase handler "+a.state.gs.phase),a.state.gs.field=a.state.gs.field.filter(t=>t.status==="A"),a.state.gs.deathOrder=[],a.state.gs.birthOrder=[],a.state.gs.phase){case "MN":this.enterMainPhase();break;case "ET":a.state.setPhase("PT"),a.batch.addEvents(d.playerEvent("PTN",a.state.ddf9())),a.phase.expireMods(),this.whatNext();break;case "PT":this.passTheTurn();break;case "WT":console.error("Hit unhandled waiting phase"),a.state.setPhase("MN"),this.whatNext();break;case "ST":a.state.setPhase("MN"),a.ai.cheater()?a.sleep(500).then(()=>this.whatNext()):this.whatNext();break}}expireMods(){const t=a.state.gs.phase,i=a.field.creatByTarget(d.crTarg());let e=[];t==="PT"?i.forEach(s=>{s.mods.forEach(l=>{l.expiry==="EN"?l.expiry="ET":l.expiry==="ET"&&e.push([s,l])})}):t==="ST"&&i.forEach(s=>{s.mods.forEach(l=>{l.expiry==="SN"?l.expiry="ST":l.expiry==="ST"&&e.push([s,l])})}),e.length>0&&(e.forEach(s=>s[0].expireMod(s[1])),a.effect.enforceAllNonPositionCreatureEffects())}getMainPhaseActions(t){const i=this.getHandActions(t),e=this.getFieldActions(t);let s=!a.state.gs.turn.mainBattle,l="M";return s||(s=a.field.ddf1().some(m=>m.extraBattles>0&&m.isActive&&!m.defender),l="E"),s&&i.push({actionKey:"FITE",zone:"B",param:l,hostCard:""}),s||i.push({actionKey:"ENDT",zone:"B",param:"",hostCard:""}),[i,e].flat()}getHandActions(t){const i=[...new Set(t.hand)],e=[],s=[];i.forEach(y=>{a.cards.getCard(y).isFree?e.push(y):s.push(y)});const l=e.map(y=>[y,"FREE"]);a.state.gs.turn.freeCards.forEach(y=>{a.target.cardByTarget(s,y.condition).forEach(k=>{l.push([k[0],y.id]),s.splice(s.indexOf(k[0]),1)})}),l.push(...s.map(y=>[y,""]));const u=a.state.gs.turn.regularPlays>0;let m=t.hand.map((y,A)=>[y,A]);return u||(m=m.filter(y=>!s.includes(y[0]))),m.map(y=>{const A=l.find(k=>k[0]===y[0]);return A||console.error("No cost found for card"+y[0]),d.handSelectAction("HPLY",y[0],A[1],y[1])})}getFieldActions(t){const i=a.field.qPlayerCreats(t.isPlayerA),e=i.filter(l=>a.field.canMove(l).length>0).map(l=>d.fieldSelectAction("MOVE",l.lane,l.owner)),s=i.filter(l=>l.isActive&&l.activationAvailable?a.cards.getCard(l.code).canActivate(l):!1).map(l=>{const u=d.fieldSelectAction("ACTV",l.lane,l.owner);return u.hostCard=l.code,u.param=l.id,u});return e.forEach(l=>{const u=s.findIndex(m=>m.lane===l.lane);u>-1&&(s.splice(u,1),l.param="ACTV")}),e.concat(s)}}var W=(n=>(n[n.Left=0]="Left",n[n.Both=1]="Both",n[n.Right=2]="Right",n))(W||{});class ce{action;hitTest(t,i,e){}enabled=!0;mouse=0;validButton(t){return this.mouse===1||this.mouse===t}static arrayHit(t,i,e,s){let l,u=0;const m=t.length;for(;l===void 0&&u=t&&this.originY<=i&&this.endY>=i?this.action:void 0}}class yt extends U{constructor(t,i,e,s,l=0){super({zone:"N",actionKey:"BNDL",hostCard:"",param:""},t,i,e,s,l)}childs=[];addChild(t){this.childs.push(t)}clear(){this.childs=[]}hitTest(t,i,e){if(super.hitTest(t,i,e))return ce.arrayHit(this.childs,t,i,e)}}class Ji{registry;constructor(){this.registry=[]}find(t){const i=this.registry.find(e=>e.action===t);if(i)return i;throw console.trace(),new Error("Attempted to find non-existing clicker")}entoggle(t,i){const e=this.find(t);e.enabled=i}add(t){this.registry.push(t)}get(t){return this.find(t)}remove(t){const i=this.registry.findIndex(e=>e.action===t);i>-1&&this.registry.splice(i,1)}removeAll(){this.registry=[]}enable(t){this.entoggle(t,!0)}disable(t){this.entoggle(t,!1)}hitTest(t,i,e){if(a.state.gs.ui.animating)return;let s,l;this.scaleFactor===1?(s=t,l=i):(s=Math.round(t*this.scaleFactor),l=Math.round(i*this.scaleFactor));let u,m=a.state.clickMode;return m==="M"?u=e:m==="T"?u=0:u=2,ce.arrayHit(this.registry,s,l,u)}updateScale(t){t===1?this.scaleFactor=1:this.scaleFactor=1/t}scaleFactor=1}class Qi{forgeCard(t,i){const e=this.cardPlayed(i),s=a.state.getActivePlayer();a.log.new().txt("Forged ").crd(e.code).txt(".").go(),a.field.birthCreature(e,"F",s.isPlayerA,t.lane),a.action.actionDone()}levelAndDiscard(t){const i=a.cards.getCard(t.card),e=a.state.getActivePlayer();return e.hand.splice(t.position,1),i.overload||e.discard.push(i.levelUpCard()),i}cardPlayed(t,i=!1){const e=this.levelAndDiscard(t),s=a.state.getActivePlayer();if(t.cost==="")a.state.gs.turn.regularPlays-=1;else if(t.cost!=="FREE"){const l=a.state.gs.turn.freeCards.findIndex(u=>u.id===t.cost);l>-1?a.state.gs.turn.freeCards.splice(l,1):console.error("Could not find free card rule!")}if(a.state.gs.turn.cardsPlayed+=1,!i){const l=d.playCardEvent(t.card,s.isPlayerA);a.batch.addEvents(l)}return e}spellCast(){this.cardPlayed(a.action.cardBeingPlayed),a.action.actionDone()}endTurn(){const t=a.state.getActivePlayer();t.discard.push(...t.hand),t.hand=[],t.turn++;const i=t.turn>4;a.batch.addEvents(d.playerEvent("TRE",t.isPlayerA)),i&&(t.turn=1,t.rank++,a.batch.addEvents(d.playerEvent("RKU",t.isPlayerA)),t.deck.push(...t.discard),t.discard=[],a.pack.shuffleDeck(t.isPlayerA)),a.field.qActiveCreats().forEach(e=>{e.extraBattles=0}),a.player.drawCard(t,5),a.state.setPhase("ET"),a.action.actionDone()}mobility(t){const i=a.field.jr5(t.param);i.mobilityAvailable=!1,i.move(t.lane),a.action.actionDone()}allied(t,i){const e=i??a.state.getActivePlayer(),s=d.target("TH");return s.player=a.player.toTarget(e),s.faction=t,a.target.deckByTarget(s).length>0}freeCard(t){const i=d.freeCard(t);return a.state.gs.turn.freeCards.push(i),i}}class _i{laneIdx=[1,2,3,4,5];jr5(t){const i=this.searchById(t);if(i)return i;throw console.error("naughty creature id",t),new Error("Could not find creature by id")}creatByLane(t,i){const e=this.searchByLane(t,i);if(e)return e;throw console.error("naughty creature lane ",t,i),new Error("Could not find creature by lane")}ddf6(t){const i=this.searchByFSA(t);if(i)return i;throw console.error("naughty FSA",t),new Error("Could not find creature by FSA")}searchById(t){return a.state.gs.field.find(i=>i.id===t)}searchByLane(t,i){return a.state.gs.field.find(e=>e.lane===t&&e.owner===i&&e.status==="A")}searchByFSA(t){return this.searchByLane(t.lane,t.playerA)}creatByTarget(t){let i=a.state.gs.field;if(t){if(t.player!=="X"){const e=a.player.toBool(t.player);i=i.filter(s=>s.owner===e)}if(t.creatStatus!=="A"){const e=this.creatStatusTargetToCS(t.creatStatus);i=i.filter(s=>s.status===e)}if(!a.isUn(t.lanes)){const e=a.target.lanesToArr(t.lanes);i=i.filter(s=>e.includes(s.lane))}if(a.isUn(t.maxAttack)||(i=i.filter(e=>e.attack<=t.maxAttack)),t.notMe&&(i=i.filter(e=>e.id!==t.notMe)),t.victims){const e=a.deTil(t.victims);i=i.filter(s=>e.includes(s.id))}if(t.tribe!=="AN"&&(i=i.filter(e=>e.isTribe(t.tribe))),t.canLevel&&(i=i.filter(e=>a.cards.getCard(e.code).canLevel())),t.level!=="LA"){const e=a.target.levelTargetToLevel(t.level);i=i.filter(s=>e.includes(s.level))}t.cardCode&&(i=i.filter(e=>a.cards.getCard(e.code).cardCode()===t.cardCode)),t.canDefender&&(i=i.filter(e=>!e.negateDefender)),t.hasDefender&&(i=i.filter(e=>e.defender)),t.canArmor&&(i=i.filter(e=>!e.negateArmor)),t.hasArmor&&(i=i.filter(e=>e.armor>0)),t.canMove&&(i=i.filter(e=>!e.negateMobility)),t.hasMobility&&(i=i.filter(e=>e.mobility>0)),t.hasPoison&&(i=i.filter(e=>e.poison>0)),t.canRegen&&(i=i.filter(e=>!e.negateRegen)),t.hasRegen&&(i=i.filter(e=>e.regen>0)),t.faction!=="X"&&(i=i.filter(e=>e.faction===t.faction))}return i}cst2cs={["A"]:()=>{throw new Error("goof passed any to field state target mapper")},["V"]:()=>"A",["D"]:()=>"D",["R"]:()=>"R"};creatStatusTargetToCS(t){return this.cst2cs[t]()}emptyLanes(t){return this.laneIdx.filter(i=>!a.state.gs.field.find(s=>s.owner===t&&s.lane===i&&s.status==="A"))}oppositeLane(t){return 6-t}adjacentPositions(t){return[[2],[1,3],[2,4],[3,5],[4]][t-1]}canMove(t){return t.mobility>0&&t.mobilityAvailable&&(!t.sleeping||t.aggressive)?this.emptyLanes(t.owner).filter(i=>Math.abs(t.lane-i)<=t.mobility):[]}birthCreature(t,i,e,s=0,l=void 0){if(i==="S"){const k=this.emptyLanes(e);if(k.length===0)return;s=k[a.randInt(0,k.length)]}else if(i==="P"&&!this.emptyLanes(e).includes(s))return;const m=(typeof t=="string"?a.cards.getCard(t):t).jr3(e,s),y=a.state.gs.field;if(i==="F"||i==="R"){const k=a.field.searchByLane(s,e);k&&(a.log.new().crd(k.code).txt(" was replaced.").go(),k.status="R",a.batch.addEvents(d.creatureEvent("RPL",k)))}y.push(m);const A=d.enterFieldEvent(m);return A.forged=i==="F",a.state.gs.birthOrder.push({creatId:m.id,time:l||Date.now()}),a.batch.addEvents(A),m.enforceEffects("PH"),a.effect.positionChange(e),m}findBirthTime(t){const i=a.state.gs.birthOrder.filter(e=>e.creatId===t).map(e=>e.time);if(i.length!==0)return i.length>1&&console.warn("wery curious, more than one birth record for creat "+t),i[0]}qActiveCreats(){return this.creatByTarget(d.crTarg())}qPlayerCreats(t){const i=d.crTarg();return i.player=a.player.toTarget(t),this.creatByTarget(i)}ddf1(){return this.creatByTarget(d.crFriendTarg())}qEnemyCreats(){return this.creatByTarget(d.crEnemyTarg())}}class tr{creatFightState(t,i){return t?i===1||t.defender||t.sleeping&&!t.aggressive?1:i===0?2:t.extraBattles>0?(t.extraBattles-=1,2):1:0}dukeItOut(t,i,e,s){if(t>0){let l=0;if(i>0){const u=t===2&&e.breakthrough;l=s.hurtBattle(e.attack,e,u)}else t===2&&(l=e.attack);l>0&&a.player.hurtPlayerBattle(!e.owner,l,e)}}fight(t){a.log.add("FIGHT!");let i=2,e=1;t&&(a.state.gs.turn.mainBattle=!0,i=0,e=0);const s=a.state.ddf9(),l=[],u=[];a.field.laneIdx.forEach(m=>{const y=a.field.searchByLane(m,s),A=a.field.searchByLane(6-m,!s),k=this.creatFightState(y,i),D=this.creatFightState(A,e);(k===2||D===2)&&(u.push([k,D,y,A],[D,k,A,y]),k===2&&(a.state.gs.turn.friendlyFightStarters++,l.push([m,s])),D===2&&l.push([a.field.oppositeLane(m),!s]))}),this.barking&&l.length>0&&a.dogBark(),a.drawing.drawCombat(l).then(()=>{u.forEach(m=>this.dukeItOut(...m)),a.effect.playerHealthChange(),a.death.deathCheck(),a.batch.type="C0",a.action.actionDone()})}barking=!0}class er{positionChange(t){a.field.creatByTarget().forEach(i=>{i.enforceEffects("PS",t)})}defenderChange(t){a.field.qActiveCreats().forEach(e=>{e.effects.filter(s=>s.watch==="DF").filter(s=>s.area==="C"&&e.owner===t||s.area==="A").forEach(s=>a.cards.getCard(s.logicCode).enforceEffect(s,e))})}playerHealthChange(){a.field.qActiveCreats().forEach(t=>{t.enforceEffects("PH")})}enforceAllNonPositionCreatureEffects(){a.field.qActiveCreats().forEach(i=>{i.enforceEffects("AT"),i.enforceEffects("AR"),i.enforceEffects("CH"),i.enforceEffects("DF",i.owner)})}}class ir{}class rr{pt2pb={["X"]:()=>{throw new Error("goof passed any to player target boolean-o-fier")},["A"]:()=>!0,["B"]:()=>!1,["F"]:()=>a.state.ddf9(),["E"]:()=>!a.state.ddf9()};toPlayer(t){return typeof t=="boolean"?a.state.getPlayer(t):typeof t=="string"?a.state.getPlayer(this.pt2pb[t]()):t}toBool(t){return typeof t=="boolean"?t:typeof t=="string"?this.pt2pb[t]():t.isPlayerA}toTarget(t){return typeof t=="string"?t:(typeof t=="boolean"?t:t.isPlayerA)?"A":"B"}hurtPlayer(t,i){return i<1?0:(t.health-=i,i)}ddf3(t,i,e){const s=this.toPlayer(t),l=this.hurtPlayer(s,i);l>0&&(a.log.new().crd(e).txt(` dealt ${l} dmg to `).plr(s).txt(".").go(),a.batch.addEvents(d.damageEvent(!1,l,!1,!1,s.isPlayerA,void 0)),a.effect.playerHealthChange())}hurtPlayerBattle(t,i,e){const s=this.toPlayer(t),l=this.hurtPlayer(s,i);l>0&&(a.log.new().crd(e.code).txt(` dealt ${l} battle dmg to `).plr(s).txt(".").go(),a.batch.addEvents(d.damageEvent(!0,l,!0,!1,s.isPlayerA,e)))}healPlayer(t,i){const e=this.toPlayer(t);e.health+=i,a.log.new().plr(e).txt(` gained ${i} health.`).go(),a.batch.addEvents(d.playerHealEvent("PHL",e.isPlayerA,i)),a.effect.playerHealthChange()}drawCard(t,i){const e=this.toPlayer(t);for(let s=0;s{const s=this.actionTargGuts(e);return s.forEach(l=>{l.hostCard=e.hostCard,l.param=e.param}),s}).flat()}actionTargGuts(t){if(t.target==="TH")return this.deckByTarget(t).map(i=>d.handSelectAction(t.actionKey,i[0],"",i[1]));if(t.target==="TF"){if(t.field==="O")return a.field.creatByTarget(t).map(i=>d.fieldSelectAction(t.actionKey,i.lane,i.owner));{const i=t.player==="X"?[!0,!1]:[a.player.toBool(t.player)],e=a.isUn(t.lanes)?a.field.laneIdx:this.lanesToArr(t.lanes);if(t.field==="A")return i.map(s=>e.map(l=>d.fieldSelectAction(t.actionKey,l,s))).flat();if(t.field==="E")return i.map(s=>a.field.emptyLanes(s).filter(l=>e.includes(l)).map(l=>d.fieldSelectAction(t.actionKey,l,s))).flat()}}if(t.target==="TP")return t.player==="X"?[d.playerSelectAction(t.actionKey,!0),d.playerSelectAction(t.actionKey,!1)]:[d.playerSelectAction(t.actionKey,a.player.toBool(t.player))];if(t.target==="TB")return[{actionKey:t.actionKey,zone:"B",hostCard:t.hostCard,param:""}];if(t.target==="TR")return[{actionKey:t.actionKey,zone:"R",hostCard:t.hostCard,param:""}];if(t.target==="TD")return[];throw new Error("Target encountered that doesnt have mappings to actions: "+t.target)}cardByTarget(t,i){let e=t.map((s,l)=>[s,l]);if(i){if(a.isUn(i.deckPositionSkip)||(e=e.filter(s=>s[1]!==i.deckPositionSkip)),i.faction!=="X"&&(e=e.filter(s=>a.cards.getCard(s[0]).faction===i.faction)),i.tribe!=="AN"&&(e=e.filter(s=>{const l=a.cards.getCard(s[0]);return l.type==="C"?l.isTribe(i.tribe):!1})),i.canLevel&&(e=e.filter(s=>a.cards.getCard(s[0]).canLevel())),i.level!=="LA"){const s=a.target.levelTargetToLevel(i.level);e=e.filter(l=>{const u=parseInt(l[0].substring(3,4));return s.includes(u)})}if(i.card!=="A"){const s=i.card==="C"?"C":"S";e=e.filter(l=>a.cards.getCard(l[0]).type===s)}i.cardCode&&(e=e.filter(s=>a.cards.getCard(s[0]).cardCode()===i.cardCode))}return e}deckByTarget(t){const i=a.player.toPlayer(t.player);let e;if(t.target==="TH")e=i.hand;else if(t.target==="TD")e=i.discard;else throw new Error("bad target passed to deckByTarget: "+t.target);return this.cardByTarget(e,t)}buttonTarget(t,i="",e=""){return d.actionTarget("TB",t,i,e)}boardTarget(t,i){return d.actionTarget("TR",t,i,"")}ddf2(t){return t===1?"L1":t===2?"LN":"LA"}lt2l={["LA"]:()=>[1,2,3,4],["L1"]:()=>[1],["L2"]:()=>[2],["L3"]:()=>[3],["LN"]:()=>[1,2]};levelTargetToLevel(t){return this.lt2l[t]()}levelTargetTest(t,i){return this.levelTargetToLevel(t).includes(i)}levelTestCommon(t,i){return this.levelTargetTest(this.ddf2(i),t)}lanesToArr(t){return Array.isArray(t)?t:[t]}}class sr{handleAction(t){if(t.actionKey==="DEET"){a.details.init(t.param);return}if(t.actionKey==="HPLY"){this.playCardSelect(t);return}if(t.actionKey==="FORG"){a.turn.forgeCard(t,this.cardBeingPlayed);return}if(t.actionKey==="FITE"){a.fight.fight(t.param==="M");return}if(t.actionKey==="ENDT"){a.turn.endTurn();return}if(t.actionKey==="MOVE"){this.mobilitySelect(t);return}if(t.actionKey==="MEND"){a.turn.mobility(t);return}if(t.actionKey==="HDSC"){const i=this.cardBeingPlayed;i.cost="",a.turn.cardPlayed(i,!0),this.actionDone();return}if(t.actionKey==="ACTV"){const i=a.field.jr5(t.param);a.cards.getCard(i.code).startActivation(i);return}if(t.actionKey==="NOTR"){t.param==="PM"&&a.mode.popMode(),this.actionDone(!0);return}if(t.actionKey==="CARD"){a.cards.getCard(t.hostCard).handleAction(t);return}if(t.actionKey==="CANC"||t.actionKey==="CNCL"){t.param==="PM"&&a.mode.popMode(),this.actionHistory.pop(),this.ddf5();return}if(t.actionKey==="DTUP"){a.details.updateDetails(t),a.drawing.drawAll();return}if(t.actionKey==="VWDK"){a.deck.handleShowDeck(t);return}if(t.actionKey==="SCRK"){a.deck.handleDeckScroll(t);return}if(t.actionKey==="SCRH"){t.param==="R"?a.state.gs.ui.handScrollLeft+=1:a.state.gs.ui.handScrollLeft-=1,a.drawing.drawAll();return}if(t.actionKey==="DRFT"){a.draft.resumeDraft(t.param);return}if(t.actionKey==="SCRD"){t.param==="U"?a.draft.paginating=!1:a.draft.paginating=!0,a.drawing.drawAll();return}if(t.actionKey==="UIBT"){a.menu.handleUIButton(t);return}if(t.actionKey==="MENU"){a.menu.handleMainMenuButton(t);return}if(t.actionKey==="MNBT"){a.menu.handleMenuButton(t);return}if(t.actionKey==="DSET"){this.ddf5(a.menu.generateDeckPickerActions(parseInt(t.param)));return}if(t.actionKey==="DECK"){a.menu.handleDeckPick(t);return}}ddf5(t){let i;if(t){const e=this.generateDetailActions();i=t.concat(e),this.actionHistory.push(i)}else i=this.actionHistory[this.actionHistory.length-1];a.state.gs.aiActive?a.ai.processAction(i):a.drawing.drawAll()}currPlayHandAction;get cardBeingPlayed(){if(this.currPlayHandAction)return this.currPlayHandAction;throw new Error("Attempted to read current card being played, nothing exists")}actionHistory=[];get activeActions(){const t=this.actionHistory.length;return t===0?[]:this.actionHistory[t-1]}actionDone(t=!1){this.currPlayHandAction=void 0,this.actionHistory=[],a.clickers.removeAll(),a.drawing.drawActions([]),t?a.batch.triggerDone():a.phase.whatNext()}playCardSelect(t){this.currPlayHandAction=t;const i=this.getPlayCardActions(t);this.ddf5(i)}getPlayCardActions(t){if(t.actionKey!=="HPLY")throw new Error("Unexpected action passed to getPlayCardActions: "+t.actionKey);const e=a.cards.getCard(t.card).playTargets();a.state.getRegularPlays()>0&&e.push(a.target.buttonTarget("HDSC",t.card));const s=a.target.toActions(e);return s.push(d.handSelectAction("CANC",t.card,"",t.position)),s}mobilitySelect(t){const i=this.getMoveCardActions(t);this.ddf5(i)}getMoveCardActions(t){if(t.actionKey!=="MOVE")throw new Error("Unexpected action passed to getMoveCardActions: "+t.actionKey);const i=a.field.ddf6(t);let e=[];if(t.param==="ACTV"){const s=d.actionTarget("TB","ACTV",i.code,i.id);e=a.target.toActions(s)}return e.push(d.fieldSelectAction("CANC",t.lane,t.playerA)),a.field.canMove(i).map(s=>{const l=d.fieldSelectAction("MEND",s,t.playerA);return l.param=i.id,l}).concat(e)}noneEndTrigger(){return a.target.toActions(a.target.buttonTarget("NOTR"))[0]}cancelAction(){return a.target.toActions(a.target.buttonTarget("CANC"))[0]}emptyAdjacents(t,i){const e=i||t.id,s=d.emptyPlayerActTarg("F","CARD",t.code,e);return s.lanes=t.adjacent,a.target.toActions(s)}generateDetailActions(){const t=a.mode.mode;if(a.state.gs.aiActive)return[];if(t==="G"){const i=a.state.getLocalPlayer().hand.map((s,l)=>{const u=d.handSelectAction("DEET",s,"",l);return u.param=s,u}),e=a.field.qActiveCreats().map(s=>{const l=d.fieldSelectAction("DEET",s.lane,s.owner);return l.param=s.code,l});return i.concat(e)}else if(t==="R"){const i=a.draft.currentPack.map((s,l)=>{const u=d.draftSelectAction("DEET",l,!0);return u.param=`${s}1`,u}),e=a.draft.picksAsDeck().map((s,l)=>{const u=d.draftSelectAction("DEET",l,!1);return u.param=`${s.card}1`,u});return i.concat(e)}return[]}}class nr{_state=new Le;get gs(){return this._state}resetTurnData(){this.gs.turn=d.freshTurn(),this.gs.firstTurn&&(this.gs.firstTurn=!1,this.gs.turn.regularPlays=1)}getPlayer(t){return t?this._state.playerA:this._state.playerB}getActivePlayer(){return this.getPlayer(this._state.activePlayer)}ddf9(){return this._state.activePlayer}getLocalPlayer(){return this.getPlayer(this._state.isLocalA)}setPhase(t){this.gs.phase=t}getRegularPlays(){return this.gs.turn.regularPlays}getCardsPlayed(){return this.gs.turn.cardsPlayed}writeStorage(t,i){localStorage.setItem(t,i)}readStorage(t){return localStorage.getItem(t)}strRead(t,i){const e=this.readStorage(t);return e===null?i:e}boolRead(t,i){const e=this.readStorage(t);return e===null?i:e==="Y"}boolWrite(t,i){this.writeStorage(t,i?"Y":"N")}restoreOptions(){const t=this.gs.options;t.bark=this.boolRead("bark",!0),t.bigCards=this.boolRead("bigCards",!0),t.cheater=this.boolRead("cheater",!1),t.highHealth=this.boolRead("highHealth",!1),t.fatPacks=this.boolRead("fatPacks",!1),t.legDraft=this.boolRead("legDraft",!1),t.scale=this.strRead("scale","100")}toggleOption(t){this.gs.options[t]=!this.gs.options[t],this.boolWrite(t,this.gs.options[t])}setClickMode(t){this.gs.clickMode=t}get clickMode(){return this.gs.clickMode}}class or{friends;friendText;get browseStack(){return a.state.gs.ui.detailStack}n(t,i){return`${t}${i}`}allLevelFriendo(t,i){const e=Array.isArray(i)?i:[i];[1,2,3].forEach(s=>{this.friends[this.n(t,s)]=e.map(l=>this.n(l,s))})}plont(t){this.friends[this.n(t,1)]=[this.n("SDL",1)],this.friends[this.n(t,2)]=[this.n("SPL",2)],this.friends[this.n(t,3)]=[this.n("TFK",3)]}constructor(){const t=this.n("FWC",1);this.friends={[this.n("CGL",1)]:[this.n("CGF",1)],[t]:[this.n("FWG",1)],[this.n("MPH",1)]:[t],[this.n("MPH",2)]:[t],[this.n("MPH",3)]:[t],[this.n("SSE",1)]:[this.n("SXD",1)],[this.n("SSE",2)]:[this.n("SXP",2)],[this.n("SSE",3)]:[this.n("SXT",3)],[this.n("TSL",1)]:[this.n("FUN",1)],[this.n("ZTU",2)]:[this.n("ZTR",2)]},this.allLevelFriendo("BLH","LWY"),this.allLevelFriendo("BTM","BOS"),this.allLevelFriendo("BWD","TFD"),this.plont("BTS"),this.allLevelFriendo("CSB","ZBS"),this.allLevelFriendo("DSK","SPN"),this.allLevelFriendo("DZD","DZA"),this.allLevelFriendo("DBQ","BRF"),this.allLevelFriendo("FWK","ZMB"),this.allLevelFriendo("FGD",["FGA","FGB","FGG","FGO"]),this.allLevelFriendo("FGG","FGO"),this.allLevelFriendo("FMD","FME"),this.plont("GMR"),this.allLevelFriendo("IZL",["IFL","IFR","IZR"]),this.allLevelFriendo("IZR",["IFL","IFR","IZL"]),this.allLevelFriendo("IZK",["IFL","IFR","IZL","IZR"]),this.allLevelFriendo("NSW","SPN"),this.allLevelFriendo("NSH","NDR"),this.allLevelFriendo("NFF","TFF"),this.allLevelFriendo("NOZ","OOZ"),this.plont("PTB"),this.plont("STS"),this.plont("WWS"),this.allLevelFriendo("YNS","XYR"),this.friendText={["BOS"]:[51,""],["BRF"]:[18,""],["CGF"]:[65,"Fiend"],["DZA"]:[59,"Dozer"],["FWG"]:[44,""],["FWC"]:[28,"Chrysalis"],["FGA"]:[65,"Alpha"],["FGB"]:[77,"Beta"],["FGG"]:[53,"Gamma"],["FGO"]:[57,"Omega"],["FME"]:[78,"Egg"],["FUN"]:[49,""],["IZL"]:[42,"Av Flame"],["IZR"]:[44,"Av Frost"],["IFL"]:[65,"Flame"],["IFR"]:[67,"Frost"],["LWY"]:[65,"Wyrm"],["NDR"]:[3,""],["OOZ"]:[31,""],["SPL"]:[51,""],["SXP"]:[51,""],["SXD"]:[40,""],["SXT"]:[38,""],["SDL"]:[40,""],["SPN"]:[66,""],["XYR"]:[66,""],["TFK"]:[38,""],["TFD"]:[38,""],["ZTR"]:[32,"Returned"],["ZMB"]:[52,""],["ZBS"]:[52,""]}}get currentCard(){const t=this.browseStack;return t[t.length-1]}get friendos(){return this.friends[this.currentCard]??[]}get canGoBack(){return this.browseStack.length>1}init(t){if(a.state.gs.ui.detailStack=[t],a.mode.mode!=="C"){a.mode.setMode("C");const i=d.basicAction("CNCL");i.zone=a.mode.baseMode==="G"?"B":"N",i.param="PM",a.action.ddf5([i])}else a.drawing.drawAll()}changeLevel(t){const i=this.browseStack,e=i.length-1,s=i[e];i[e]=this.n(pt.extractCardCode(s),t)}goBack(){this.browseStack.pop()}goToFriend(t){this.browseStack.push(t)}friendTxt(t){const i=this.friendText[t];return i||[3,"I am error"]}goBackAction(){const t=d.basicAction("DTUP");return t.param="DB",t}levelAction(t){const i=d.basicAction("DTUP");return i.param=a.enTil("DL",t),i}friendAction(t){const i=d.basicAction("DTUP");return i.param=a.enTil("DF",t),i}updateDetails(t){const i=a.deTil(t.param),e=i[0];e==="DB"?this.goBack():e==="DF"?this.goToFriend(i[1]):e==="DL"?this.changeLevel(parseInt(i[1])):console.error("Unknown detail arg",t)}}class hr{async drawAll(){const t=a.mode.mode;a.clickers.removeAll(),this.clearDetails(),t==="G"?(this.clearDeck(),await Promise.all([this.drawHand(a.state.getLocalPlayer()),this.drawPlayers(),this.drawField(),this.drawActions(a.action.activeActions)]),a.state.gs.winFlag!==0?await this.drawGameOver():await this.drawCommonButtons(!0,!0,!0)):t==="C"?await this.drawDetails(a.action.activeActions):t==="D"?await this.drawDeck(a.action.activeActions):t==="R"?await this.drawDraft(a.action.activeActions):t==="P"?await this.drawDeckPick(a.action.activeActions):t==="I"?await this.drawInfoMenu():t==="X"?await this.drawExit(a.action.activeActions):await this.drawMenu()}async drawGameOver(){await new ge().drawGameOver()}async drawHand(t){await new xe().drawCards(t)}async drawField(){await new fe().drawCards()}async drawPlayers(){await new ge().drawAllPlayers()}async drawDeck(t){const i=t.find(s=>s.zone==="B");i&&await new ue().drawActions([i]);const e=new yr;await e.drawCards(),await e.drawActions(t),await this.drawCommonButtons(!0,!0,!1)}async drawActions(t){const i=new ue;if(a.state.gs.aiActive)await i.drawActions([]);else{a.canvases.get("effects").clear();const s=new xe,l=new fe,u=new ge;await Promise.all([s.drawActions(t),l.drawActions(t),i.drawActions(t),u.drawActions(t)])}}async drawCombat(t){if(t.length===0)return;a.state.gs.ui.animating=!0,a.canvases.get("effects").clear(),await new fe().drawFight(t),a.state.gs.ui.animating=!1}async drawDraft(t){a.canvases.get("effects").clear();const e=new vr,s=a.canvases.get("game-ui");s.clear(),a.clickers.removeAll(),await e.drawPack(t,s),await e.drawList(t,s),await this.drawCommonButtons(!0,!0,!1)}async drawMenu(){const t=new kr,i=a.canvases.get("game-ui");i.clear(),a.clickers.removeAll(),await t.drawMenu(i)}async drawInfoMenu(){const t=new Ar,i=a.canvases.get("game-ui");i.clear(),a.clickers.removeAll(),await t.drawMenu(i)}async drawDeckPick(t){const i=new Pe,e=a.canvases.get("game-ui");e.clear(),a.clickers.removeAll(),await i.drawSets(t,e),await i.drawList(t,e)}clearDetails(){a.canvases.get("card").clear()}clearDeck(){a.canvases.get("decklist").clear()}async drawDetails(t){await this.drawActions(t),await this.drawCommonButtons(!0,!0,!1),a.canvases.get("card").clear();const e=new br,s=t.find(l=>l.actionKey==="CNCL");s?await e.drawDetails(s):console.error("Attempted to show details view with no cancel action")}async drawCommonButtons(t,i,e){let s=979;const l=723,u=new de,m=a.canvases.get("game-ui");if(e&&m.clear(),t&&(await u.makeIconButton(m,s,l,"EX"),s-=50),i){const y=a.state.clickMode;y!=="M"&&await u.makeIconButton(m,s,l,y==="I"?"TM":"DM")}}async drawExit(t){a.canvases.get("decklist").clear();const e=a.canvases.get("effects"),s=new Kt;await s.drawButton(e,151,488,t[1],"Quit Game",24,!1),await s.drawButton(e,478,488,t[0],"Resume",52,!1)}setBackground(t){const i="hide";this.allBackgrounds.forEach(e=>{const s=document.getElementById(e);t===e?s.classList.remove(i):s.classList.add(i)})}changeScale(t){this.clearAll();let i=a.state.gs.options.scale;i===t&&(i="100");const e=t==="100"?1:.90625;a.clickers.updateScale(e);const s=`uiSize${i}`,l=`uiSize${t}`;this.allCanvases.forEach(y=>{a.canvases.get(y).dom.classList.replace(s,l)}),this.allBackgrounds.forEach(y=>{document.getElementById(y).classList.replace(s,l)}),document.getElementById("solforge").classList.replace(`gameSize${i}`,`gameSize${t}`),document.getElementById("log").classList.replace(`logSize${i}`,`logSize${t}`),a.state.gs.options.scale=t,a.state.writeStorage("scale",t)}clearAll(){this.allCanvases.forEach(t=>{a.canvases.get(t).clear()})}allCanvases=["game-ui","field","player","hand","effects","decklist","card"];allBackgrounds=["playmat","blueface","mainmenu"]}class Ht{paStats;pbStats;constructor(t,i){this.paStats=t,this.pbStats=i}allStats(){return[this.paStats,this.pbStats]}playerStats(t){return t?this.paStats:this.pbStats}deltaStats(t){const i=this.playerStats(t),e=this.playerStats(!t);return Ht.deltafier(i,e)}static deltafier(t,i){const e=Ht.blankStats(!0);return e.creatCount=t.creatCount-i.creatCount,e.creatValue=t.creatValue-i.creatValue,e.threatValue=t.threatValue-i.threatValue,e.playerHealth=t.playerHealth-i.playerHealth,e}static blankStats(t){return{side:t,creatCount:0,creatValue:0,threatValue:0,playerHealth:0}}}class kt{guts;constructor(t){this.guts=t}static fromState(){const t=a.field.qActiveCreats(),i=[!0,!1],e=i.map(l=>a.field.laneIdx.map(u=>{const m=t.find(y=>y.owner===l&&y.lane===u);return m?d.evalVectorCreature(m):d.evalVectorEmpty(l,u)})).flat(),s=i.map(l=>{const u=a.player.toPlayer(l),m=d.evalVectorPlayer(l);return m.health=u.health,m});return e.push(...s),new kt(e)}static ddp9(t,i,e,s,l=0){return t/2+l+i/10+(s+e)/3}static creatValueFormula(t){return t.health+Math.max(0,t.attack)+t.bonus+t.regen+t.armor-t.poison}clone(){return new kt(structuredClone(this.guts))}boardStats(){const t=[!0,!1].map(i=>this.guts.filter(e=>e.playerA===i)).map(i=>{const e=Ht.blankStats(i[0].playerA),s=i.filter(l=>l.type==="C");return e.creatCount=s.length,e.playerHealth=i[5].health,e.creatValue=this.creatSum(s,kt.creatValueFormula),e.threatValue=this.creatSum(s,l=>{if(l.defender)return 0;{const u=this.guts[this.findLaneIndex(6-l.lane,!l.playerA)];let m=0;if(u.type==="E"?m=l.attack:l.breakthrough&&(m=l.attack-u.health),m<1)return 0;if(m<6)return m;{let y=!0,A=0,k=5,D=1;const B=5;for(;y;)m>k+B?(A+=D*B,k+=B,D++):(A+=D*(m-k),y=!1);return m+(l.sleeping&&!l.aggressive?A/2:A)}}}),e});return new Ht(t[0],t[1])}weighState(t,i,e){const s=this.boardStats(),l=s.playerStats(!e).playerHealth;if(l<1&&li(e)).reduce((e,s)=>e+s,0)}findLaneIndex(t,i){return t+(i?-1:4)}findVectorIdx(t){return t.shape==="B"?this.findLaneIndex(t.lane,t.playerA):t.playerA?10:11}getBaseVector(t){return this.guts[this.findVectorIdx(t)]}replaceBaseVector(t){const i=this.findVectorIdx(t);this.guts[i]=t}applyVectors(t){t.forEach(e=>{switch(e.type){case "M":if(e.shape==="B")if(e.destroy)this.replaceBaseVector(d.evalVectorEmpty(e.playerA,e.lane));else{const l=this.getBaseVector(e);if(l.type!=="E"){if(e.moveTo){const u=d.evalVectorEmpty(e.playerA,e.lane);l.lane=e.moveTo,this.replaceBaseVector(l),this.replaceBaseVector(u)}else if(this.applyCreatVector(l,e),e.dirDmg){const u=Math.min(e.dirDmg,l.armor-l.armorDmg);l.armorDmg+=u,l.health-=e.dirDmg-u}}}else{const l=this.getBaseVector(e);l.health+=e.health,e.dirDmg&&(l.health-=e.dirDmg)}break;case "R":const s=d.evalVectorEmpty(e.playerA,e.lane);this.applyCreatVector(s,e),s.type="C",this.replaceBaseVector(s);break;case "P":break;default:console.warn("BoardEval is applying vectors, encountered unexpected vector type:",e)}}),this.guts.filter(e=>e.shape==="B"&&e.health<1).forEach(e=>this.replaceBaseVector(d.evalVectorEmpty(e.playerA,e.lane)))}battleState(t){return t.type==="E"?0:t.defender||t.sleeping&&!t.aggressive?1:2}battleVector(t,i,e,s){const l=[];if(t>0){let u=0;const m=Math.max(e.attack,0);if(i>0){const y=t===2&&e.breakthrough,A=Math.max(Math.min(m,s.armor-s.armorDmg),0);let k=m-A;if(y&&k>s.health&&(u=k-s.health,k=s.health),A>0||k>0){const D=d.ddp1(s.playerA,s.lane);D.health=-k,D.armorDmg=A,l.push(D)}}else t===2&&(u=m);u>0&&l.push(d.evalVectorPlayerLife(s.playerA,-u))}return l}applyCombat(){const t=a.field.laneIdx.map(i=>{const e=this.guts[i-1],s=this.guts[10-i],l=this.battleState(e),u=this.battleState(s);return l===2||u===2?this.battleVector(l,u,e,s).concat(this.battleVector(u,l,s,e)):[]}).flat();this.applyVectors(t)}applyTurnEnd(t,i){const e=!t,s=!i,l=this.guts.filter(u=>u.shape==="B"&&(e||u.playerA===s)&&u.poison>0).map(u=>{const m=u.regen-Math.max(0,u.poison-u.armor),y=d.ddp1(u.playerA,u.lane);return y.health=m,y}).filter(u=>u.health!==0);this.applyVectors(l)}applyCreatVector(t,i){t.health+=i.health,t.attack+=this.doubleOrNossing(t.attack,i.attack),t.armor+=i.armor,t.armorDmg+=i.armorDmg,t.poison+=this.doubleOrNossing(t.poison,i.poison),t.regen+=i.regen,t.aggressive=i.aggressive,t.breakthrough=i.breakthrough,t.defender=i.defender,t.negateDefender=i.negateDefender}doubleOrNossing(t,i){if(i>=Rt&&i0||e.freeCards.length>0)&&(i-=R.Horrid);break;case "NT":break;case "PS":break;case "NO":break;default:console.error("Final type with no weighting switch: "+t.type),i=-2}return i+t.bonus}weighPlacement(t){let i=0;const e=t.action,s=a.field.searchByFSA(e),l=a.field.searchByLane(a.field.oppositeLane(e.lane),!e.playerA),u=t.hints.includes("RD");if(s){const y=s.aiHints().includes("RT");y&&u?i+=R.Grand:y||u?i+=R.Noice:t.hints.includes("RE")||(a.state.gs.turn.mainBattle?i+=R.Bad:i+=R.Never)}else u&&(i+=R.Bad);return i+=this.weighOpposition(t,l),i+=this.weighLanePlacement(t,e.lane,e.playerA),t.hints.includes("SD")&&(i+=this.weighSacrificeDemand(t)),i+=this.weighRank(t),i}weighStatChange(t){let i=0;return t.hints.includes("SD")&&(i+=this.weighSacrificeDemand(t)),i}weighDestroy(t){let i=0;const e=t.action;return a.field.ddf6(e).owner===this.aiPlayer?t.hints.includes("ST")?i+=R.Noice:i+=R.Horrid:i+=R.Noice,i}weighDmg(t){return 0}weighDiscard(t){let i=0,e;t.action.actionKey==="HDSC"?(a.state.gs.turn.mainBattle||(i+=R.Horrid),e=t.action.hostCard):(i+=R.Noice,e=t.action.card);const l=a.cards.getCard(e).aiHints();return l.includes("LV")?i+=R.Noice:l.includes("DL")&&(i+=R.Horrid),i}weighMove(t){let i=0;const e=t.action,s=a.field.jr5(e.param),l=s.owner===this.aiPlayer?1:-1,u=this.weighLanePlacement(t,s.lane,s.owner),y=this.weighLanePlacement(t,e.lane,s.owner)-u,A=a.field.searchByLane(a.field.oppositeLane(s.lane),!s.owner),k=this.weighOpposition(t,A),D=a.field.searchByLane(a.field.oppositeLane(e.lane),!s.owner),$=this.weighOpposition(t,D)-k;let q=0;D&&(t.hints.includes("FH")?q=R.Noice:t.hints.includes("FK")&&a.target.levelTestCommon(D.level,s.level)&&(q=R.Grand*2));const K=(y+$+q)*l;return i+K}weighLanePlacement(t,i,e){let s=0;const l=t.hints.includes("NX"),u=t.hints.includes("SL"),m=t.hints.includes("LJ");if(l?i===3?s+=R.Noice:s+=R.Bad:u&&(i===1||i===5?s+=R.Noice:s+=R.Bad),m){const y=d.crTarg();y.player=a.player.toTarget(e),y.lanes=a.field.adjacentPositions(i);const A=a.field.creatByTarget(y).length;A>0&&(s+=R.Noice*A)}return s}weighOpposition(t,i){let e=0;const s=t.hints.includes("OL"),l=t.hints.includes("OP");if(i){const u=i.aiHints(),m=u.includes("OL"),y=u.includes("OP");l?m?e+=R.Grand:y||(e+=R.Noice):s&&(y?e+=R.Horrid:m||(e+=R.Bad))}else l?e+=R.Bad:s&&(e+=R.Grand);return e}weighSacrificeDemand(t){let i=R.Never;const e=s=>{i{s.hints.includes("ST")?e(R.Grand*2):kt.ddp9(1,kt.creatValueFormula(s),s.attack,0)<2?e(R.Grand):e(R.Horrid)}),i}weighRank(t){let i=0,e=0;t.hints.every(u=>u==="UL1"?(e=1,!1):u==="UL2"?(e=2,!1):u==="UL3"?(e=3,!1):!0);const s=t.hints.includes("DL"),l=t.hints.includes("RH");if(l||s||e>0){const u=a.player.toPlayer(this.aiPlayer).rank;e>0&&(u>e?i+=R.Noice:i+=R.Horrid),s&&u===1&&(i+=R.Horrid*2),l&&(i+=R.Noice*(u-1))}return i}logHint(t){}logHintStarter(t,i){this.logHint(`Eval start - ${a.log.actionText(t)} / ${i}`)}}class cr{logChains=!1;aiPlayer=!1;actEval=new lr(this.aiPlayer);whiffActions=["CANC","DEET","SCRH"];committedVectors=[];evaluateActions(t,i=""){const e=t.filter(s=>this.whiffActions.indexOf(s.actionKey)===-1);return e.forEach(s=>{switch(s.actionKey){case "ACTV":case "CARD":const l=a.cards.getCard(s.hostCard),u=l.ddf7(s);if(u.final)s.evals=[[u]];else{const tt=l.getCardActions(s);s.evals=this.evalSmoosh(this.evaluateActions(tt,i+"--"),u)}break;case "FORG":const m=s,y=d.ddp4(s,m.playerA,m.lane,m.hostCard,!0);s.evals=[[y]];break;case "HDSC":s.evals=[[d.actionEval(s,"DC")]];break;case "HPLY":const A=s,k=pt.extractCardCode(A.card);if(k==="MTS"||k==="MTT"||k==="PRI"||k==="OBB")s.evals=[[d.actionEval(s,"NR")]];else{const tt=a.action.getPlayCardActions(A);s.evals=this.evalSmoosh(this.evaluateActions(tt))}break;case "MEND":const D=d.actionEval(s,"MC"),B=a.field.jr5(s.param),$=s;D.hints=B.aiHints();const q=d.ddp1(B.owner,B.lane);q.moveTo=$.lane,D.vectors.push(q),s.evals=[[D]];break;case "MOVE":const K=a.action.getMoveCardActions(s);s.evals=this.evalSmoosh(this.evaluateActions(K));break;case "NOTR":s.evals=[[d.actionEval(s,"NO")]];break;case "FITE":s.evals=[[d.actionEval(s,"FT")]];break;case "ENDT":s.evals=[[d.actionEval(s,"DT")]];break;default:s.evals=[],console.error("Encountered action that AI could not evaluate:",s)}}),e}evalSmoosh(t,i){const e=t.map(s=>s.evals||[]).flat();return i?e.map(s=>[i,...s]):e}processAction(t){const i=this.evaluateActions(t),e=kt.fromState(),s=e.boardStats();let l=-9999;const m=i.map(A=>{let k=-9999;return A.evals?.forEach(D=>{let B=0;D.forEach(_=>{const St=this.actEval.weighEval(_);B+=St});const $=e.clone(),q=D.map(_=>_.vectors).flat();$.applyVectors(q);const K=$.boardStats(),tt=!a.state.gs.turn.mainBattle;tt&&$.applyCombat(),$.applyTurnEnd(tt,this.aiPlayer);const j=$.weighState(s,K,this.aiPlayer);B=Math.round((B+j.formula)*2)/2,B>k&&(k=B)}),k>l&&(l=k),{action:A,weight:k}}).filter(A=>A.weight===l),y=m[a.randInt(0,m.length)].action;a.sleep(500).then(()=>{a.action.handleAction(y)})}logChain(t){}jr7(t,i=3){return`${t}${i}`}jr6(t,i){const e=a.randInt(0,i.length),s=i[e];return i.splice(e,1),a.field.birthCreature(t,"F",this.aiPlayer,s)}cheater(){const t=a.state.gs;if(!(t.aiMode&&t.aiActive&&t.options.cheater))return!1;const i=a.player.toPlayer(this.aiPlayer),e=a.player.toPlayer(!this.aiPlayer),s=e.health-i.health;let l=0;s>85?l=3:s>65?l=2:s>45&&(l=1);const u=a.field.emptyLanes(this.aiPlayer);if(l===0||u.length===0)return!1;a.log.new().plr(this.aiPlayer).txt(" is a cheaty cheaterton.").go();let m=0;if(l===1){if(t.turn.regularPlays-=1,m=a.randInt(0,13),m===0)this.jr6(this.jr7("HTR"),u);else if(m===1)this.jr6(this.jr7("AGM"),u).addRegen(8);else if(m===2){const y=this.jr6(this.jr7("YNS"),u);y.buff(0,15),y.addRegen(4)}else if(m===3)this.jr6(this.jr7("TBA"),u);else if(m===4)this.jr6(this.jr7("DCS"),u);else if(m===5)this.jr6(this.jr7("GGP"),u).addRegen(8);else if(m===6){const y=this.jr6(this.jr7("WFM"),u);y.aggressive=!0}else if(m===7){const y=this.jr6(this.jr7("FFU"),u);y.aggressive=!0}else if(m===8){const y=this.jr6(this.jr7("URB"),u);y.aggressive=!0}else if(m===9){const y=this.jr6(this.jr7("KOD"),u);y.aggressive=!0,y.addRegen(6)}else if(m===10)this.jr6(this.jr7("AGK"),u).addArmor(3);else if(m===11){const y=this.jr6(this.jr7("PSC"),u);y.aggressive=!0}else if(m===12){const y=this.jr6(this.jr7("SAD"),u);y.aggressive=!0}}else if(l===2)if(t.turn.regularPlays-=1,m=a.randInt(0,17),m===0){const y=this.jr6(this.jr7("NDR"),u);y.aggressive=!0}else if(m===1){const y=this.jr6(this.jr7("CSW"),u);y.aggressive=!0}else if(m===2)this.jr6(this.jr7("GGD"),u).addRegen(6);else if(m===3)this.jr6(this.jr7("EFP"),u);else if(m===4)this.jr6(this.jr7("ZTU"),u);else if(m===5){const y=this.jr6(this.jr7("DDD"),u);y.aggressive=!0}else if(m===6)this.jr6(this.jr7("RBH"),u).addRegen(8);else if(m===7)this.jr6(this.jr7("SFT"),u);else if(m===8)this.jr6(this.jr7("GTT"),u);else if(m===9)this.jr6(this.jr7("SMD"),u);else if(u.length===5)this.jr6(this.jr7("DFB"),u),[1,2,3,4].forEach(y=>this.jr6(this.jr7("XHS"),u));else if(u.length===4)this.jr6(this.jr7("LMV"),u);else if(u.length===3)this.jr6(this.jr7("LHY"),u),this.jr6(this.jr7("SVH"),u),this.jr6(this.jr7("DBA"),u);else if(u.length===2)this.jr6(this.jr7("UTR"),u),this.jr6(this.jr7("TDS"),u);else if(i.turn===4)this.jr6(this.jr7("SSR"),u);else if(i.turn===1)this.jr6(this.jr7("ESK"),u);else{const y=this.jr6(this.jr7("XSH"),u);y.aggressive=!0}else if(l===3)if(m=a.randInt(0,20),m===0){const y=this.jr6(this.jr7("IHA",4),u);y.aggressive=!0}else if(m===1)this.jr6(this.jr7("CHR"),u);else if(m===2)this.jr6(this.jr7("FGO",1),u);else if(m===3)this.jr6(this.jr7("CHV",4),u);else if(m===4)this.jr6(this.jr7("KKK",4),u);else if(i.health<20){const y=this.jr6(this.jr7("ODC",4),u);y.aggressive=!0}else if(u.length===5){const y=a.randInt(0,4);if(y===0)[1,2,3,4,5].forEach(A=>this.jr6(this.jr7("UWL",2),u));else if(y===1)[1,2].forEach(A=>this.jr6(this.jr7("DFB"),u)),[1,2,3].forEach(A=>this.jr6(this.jr7("FFD"),u));else if(y===2)[1,2,3,4,5].forEach(A=>this.jr6(this.jr7("BWK"),u));else if(y===3){this.jr6(this.jr7("SBG"),u),this.jr6(this.jr7("EWE"),u);const A=this.jr6(this.jr7("BMY"),u);A.defender=!0,A.aggressive=!0}}else if(e.health>350)i.health<180&&a.player.healPlayer(i,180-i.health),this.jr6(this.jr7("AGD"),u);else if(e.health>250)this.jr6(this.jr7("FGO"),u);else if(u.length===4){const y=a.randInt(0,3);y===0?(this.jr6(this.jr7("AGK"),u),[1,2,3].forEach(A=>this.jr6(this.jr7("VBK"),u))):y===1?(this.jr6(this.jr7("TDS"),u),this.jr6(this.jr7("TDS"),u),this.jr6(this.jr7("UTR"),u)):y===2&&[1,2,3,4].forEach(A=>this.jr6(this.jr7("CDC"),u))}else if(u.length===3)if(a.randInt(0,2)){this.jr6(this.jr7("SDR"),u),this.jr6(this.jr7("SDR"),u);const y=this.jr6(this.jr7("UPM"),u);y.aggressive=!0}else{this.jr6(this.jr7("SDL"),u);const y=this.jr6(this.jr7("NFF"),u);y.aggressive=!0}else if(u.length===2)this.jr6(this.jr7("SPM"),u),this.jr6(this.jr7("SPM"),u);else{const y=this.jr6(this.jr7("NXC"),u);y.buff(10,0),y.aggressive=!0,y.addMobility(2),y.addRegen(5)}return i.health<30&&a.player.healPlayer(i,50-i.health),!0}}class dr{get youi(){return a.state.gs.ui}initDeck(t,i){this.youi.deckContents=t,this.youi.deckScroll=0,this.youi.deckSummary=i,a.mode.setMode("D")}get canPageDown(){return this.youi.deckContents.length-this.youi.deckScroll>15}get canPageUp(){return this.youi.deckScroll>0}paginate(t){t?this.youi.deckScroll+=15:this.youi.deckScroll-=15}visibleContent(){const t=this.youi.deckScroll;return this.youi.deckContents.slice(t,t+15)}generateContent(t,i,e){const s=a.target.cardByTarget(t,e);if(s.sort((l,u)=>{const m=l[0],y=u[0];return y===m?0:m>y?1:-1}),i){const l=s.length;let u=0,m="",y=0;const A=[];for(;u0&&A.push({cardCode:m,sourceIdx:-1,cardCount:y}),m=s[u][0],y=1),u++;return l>0&&A.push({cardCode:m,sourceIdx:-1,cardCount:y}),A}else return s.map(l=>({cardCode:l[0],sourceIdx:l[1],cardCount:0}))}handleShowDeck(t){const i=a.state.getActivePlayer();this.showDeck(i,t.param==="VD")}handleDeckScroll(t){this.paginate(t.param==="D"),a.drawing.drawAll()}showPlayerDeck(t){this.showDeck(t,!1)}showPlayerDiscard(t){this.showDeck(t,!1)}showCustomDeck(t,i){this.initDeck(t,!1);const e=this.rightClickers();a.action.ddf5(i.concat(e))}showDeck(t,i){const e=a.player.toPlayer(t);this.initDeck(this.generateContent(i?e.discard:e.deck,!0),!0);const s=a.action.cancelAction();s.actionKey="CNCL",s.param="PM";const l=this.rightClickers();l.push(s),a.action.ddf5(l)}rightClickers(){return this.youi.deckContents.map((t,i)=>{const e=d.deckSelectAction("DEET",t.cardCode,i);return e.param=t.cardCode,e})}}class ur{handleMainMenuButton(t){t.param==="D"?(a.mode.setMode("R"),a.state.gs.options.wasDrafting=!0,a.draft.startDraft(!1,!1)):t.param==="C"?(a.mode.setMode("P"),a.state.gs.options.wasDrafting=!1,a.action.ddf5(this.generateDeckPickerActions())):t.param==="I"?(a.mode.setMode("I"),a.drawing.drawAll()):window.open("deckbuilder.html")}handleMenuButton(t){if(t.param==="RP")if(a.log.clearAll(),a.state.gs.options.wasDrafting)a.draft.startDraft(!1,!0);else{const i=a.state.gs.options.wasRandCards?a.pack.treatsAbound(!0):a.pack.randomStockDeck();a.state.gs.newGame(a.state.gs.options.playerDeck,i.cards)}else if(t.param==="MM")a.mode.setMode("M"),a.log.clearAll(),a.drawing.drawAll();else if(t.param==="LK")a.pack.loadFromFile().then(i=>{Array.isArray(i)?this.launchConstructed(i):new Pe().iAmError(i)});else if(t.param==="GP")a.state.toggleOption("fatPacks"),a.drawing.drawAll();else if(t.param==="LD")a.state.toggleOption("legDraft"),a.drawing.drawAll();else if(t.param==="HH")a.state.toggleOption("highHealth"),a.drawing.drawAll();else if(t.param==="CH")a.state.toggleOption("cheater"),a.drawing.drawAll();else if(t.param==="BB")a.state.toggleOption("bark"),a.drawing.drawAll();else if(t.param==="BC")a.state.toggleOption("bigCards"),a.drawing.drawAll();else if(t.param==="90"){const i=a.state.gs.options.scale==="90"?"100":"90";a.drawing.changeScale(i),a.drawing.drawAll()}else t.param==="RU"?window.open("https://github.com/grousewood-games/solforge/blob/main/docs/rules.md#rules"):t.param==="FQ"?window.open("https://github.com/grousewood-games/solforge/blob/main/docs/faq.md#info--faq"):console.error("missing handler for menu button param "+t.param)}handleUIButton(t){t.param==="DM"?(a.state.setClickMode("I"),a.drawing.drawAll()):t.param==="TM"?(a.state.setClickMode("T"),a.drawing.drawAll()):t.param==="EX"?(a.mode.setMode("X"),a.action.ddf5(this.generateExitActions())):console.error("missing handler for common button param "+t.param)}handleDeckPick(t){let i;if(t.param==="~random~")i=a.pack.randomStockDeck();else if(t.param==="~dogs~")i=a.pack.treatsAbound(!0);else{const e=a.deTil(t.param);i=a.pack.stockDeckByName(e[0],e[1])}a.state.gs.options.wasRandCards=t.param==="~dogs~",this.launchConstructed(i.cards)}generateDeckPickerActions(t=-1){const i=Ut.map((e,s)=>{const l=d.basicAction("DSET");return l.param=s.toString(),l});if(t>-1){const e=Ut[t],s=e.decks.map(l=>{const u=d.basicAction("DECK");return u.param=a.enTil(e.id,l.name),u});return i.concat(s)}return i}generateExitActions(){const t=d.basicAction("CANC");return t.param="PM",[t,d.menuButtonAction("MM")]}launchConstructed(t){a.state.gs.options.playerDeck=t;const i=a.state.gs.options.wasRandCards?a.pack.treatsAbound(!0):a.pack.randomStockDeck();a.mode.setMode("G"),a.state.gs.newGame(t,i.cards)}}class fr{constructor(){this.loader=document.getElementById("fileupload"),this.loader.addEventListener("change",t=>this.loadInputHandler(t))}shuffleDeck(t){const i=a.player.toPlayer(t),e=[],s=[];if(i.deck.forEach(l=>{a.cards.getCard(l).consistent?e.push(l):s.push(l)}),e.length===0)this.shuffle(i.deck);else{this.shuffle(s);const l=20-e.length,u=e.concat(s.slice(0,l));this.shuffle(u),i.deck=s.slice(l).concat(u)}}shuffle(t){const i=t.length,e=(s,l)=>{const u=t[s];t[s]=t[l],t[l]=u};if(i>0){let s,l;const u=i*4;for(let m=0;me.decks).flat(),i=a.randInt(0,t.length);return t[i]}stockDeckByName(t,i){let e;if(Ut.some(s=>s.id===t?s.decks.some(l=>{l.name===i&&(e=l)}):!1),e)return e;throw new Error("Stock Deck not found: Set: "+t+"; Name: "+i)}ripper(t,i,e){const s=[[15,8,5],[30,15,10]],l=this.getDeckCards([],[t]),u=[],m=s[e===15?0:1][i-1];for(;u.lengthD===k)||u.push(k)}const y=u.map(A=>({card:A,num:i}));return i===2&&e===15&&(y[0].num=1),y}deckify(t){const i=t.map(e=>{const s=be.find(l=>l[0]===e);return s?s[1]:[]}).flat();return t.concat(i).map(e=>`${e}1`)}parseDeck(t){const i=t.map(e=>Array(e.num).fill(e.card)).flat();return this.deckify(i)}validDeck(t){const i={};t.forEach(A=>{i[A.card]?i[A.card]+=A.num:i[A.card]=A.num});const e=Object.entries(i).map(A=>({card:A[0],num:A[1]})),s=e.map(A=>A.num).reduce((A,k)=>A+k,0);if(s!==30)return"Deck must have 30 cards, found "+s;const l=[];let u="";if(e.some(A=>{const k=Ft.findIndex(D=>D.crd===A.card);return k===-1?(u=A.card,!0):(l.push(Ft[k].fct),!1)}))return`Invalid card code: '${u}'`;let m=0;if(e.some(A=>A.num>3?(u=A.card,m=A.num,!0):!1))return`${m} copies of '${u}' ${a.log.fastName(u)}`;const y=[...new Set(l)];return y.length>2?"Deck must have two or less factions, found: "+y.join():""}getDeckCards(t=[],i=[]){return t.length===0&&i.length===0?Ft.map(e=>e.crd):t.length>0&&i.length>0?Ft.filter(e=>t.includes(e.rty)&&i.includes(e.fct)).map(e=>e.crd):t.length>0?Ft.filter(e=>t.includes(e.rty)).map(e=>e.crd):Ft.filter(e=>i.includes(e.fct)).map(e=>e.crd)}getCardFaction(t){const i=Ft.find(e=>e.crd===t);return i?i.fct:"X"}getCardRarity(t){const i=Ft.find(e=>e.crd===t);return i?i.rty:"T"}cardStats(){ye.forEach(t=>{const i=`${a.log.factionText(t)} total: ${this.getDeckCards(void 0,[t]).length}; `,e=re.map(s=>`${a.log.rarityText(s)}: ${this.getDeckCards([s],[t]).length}`).join("; ");console.log(i+e)})}loadPromise=new Ce;fileguts="";loader;async loadFromFile(){if(this.loadPromise=new Ce,this.loader.click(),await this.loadPromise.getPromise(),this.fileguts==="")return"";if(this.fileguts.startsWith("!")){const s=this.fileguts.substring(1);return this.fileguts="",s}const t=JSON.parse(this.fileguts);this.fileguts="";const i=t.cards,e=this.validDeck(i);return e||i}readError(t){this.fileguts="!"+t,this.loadPromise.resolveMe()}loadInputHandler(t){const i=this.loader.files;if(i&&i.length>0){const s=i[0];var e=new FileReader;e.onload=l=>{try{var u=e.result;if(u){var m=JSON.parse(new TextDecoder("utf-8").decode(new Uint8Array(u)));m.cards&&Array.isArray(m.cards)&&!m.cards.some(y=>!(y&&typeof y.card=="string"&&Number.isInteger(y.num)))?(this.fileguts=JSON.stringify(m),this.loadPromise.resolveMe()):this.readError("File format is incorrect.")}else this.readError("File read was empty.")}catch(y){console.error(y),this.readError("Error occurred while reading file.")}};try{e.readAsArrayBuffer(s)}catch{this.readError("Could not read file.")}}else this.loadPromise.resolveMe()}}class Ce{realPromise;resolveMe(){}rejectMe(){}getPromise(){return this.realPromise}constructor(){this.realPromise=new Promise((t,i)=>{this.resolveMe=t,this.rejectMe=i})}}class gr{rarityCache={["L"]:[],["H"]:[],["R"]:[],["C"]:[],["T"]:[]};faction1="X";faction2="X";factionLock=!1;picks=[];currentPack=[];paginating=!1;aiPicking=!1;packOdds=[];legMode=!1;startDraft(t,i){!t&&i?this.startDraft(!0,!1):(t||(a.state.gs.options.playerDeck=[]),this.aiPicking=t,this.legMode=a.state.gs.options.legDraft,this.paginating=!1,this.packOdds=a.state.gs.options.fatPacks?[9,31,40]:[5,25,40],re.forEach(e=>{this.rarityCache[e]=a.pack.getDeckCards([e])}),this.faction1="X",this.faction2="X",this.factionLock=!1,this.picks=[],this.resumeDraft(""))}resumeDraft(t){if(t){if(this.picks.push(t),this.picks.length===30){let s=this.picksAsDeck();this.aiPicking?a.state.gs.options.playerDeck.length>0&&(a.mode.setMode("G"),a.state.gs.newGame(a.state.gs.options.playerDeck,this.picksAsDeck())):(this.startDraft(!0,!1),a.state.gs.options.playerDeck=s,a.mode.setMode("G"),a.state.gs.newGame(s,this.picksAsDeck()));return}if(!this.factionLock){const s=a.pack.getCardFaction(t);this.faction1==="X"?this.faction1=s:s!==this.faction1&&(this.faction2=s,this.factionLock=!0,re.forEach(l=>{this.rarityCache[l]=a.pack.getDeckCards([l],[this.faction1,this.faction2])}))}}const i=this.generatePack().slice(-1*(6-this.picks.length%5)),e=this.fillPack(i);if(this.aiPicking)this.resumeDraft(e[e.length-1]);else{this.currentPack=e;const s=e.map((l,u)=>{const m=d.draftSelectAction("DRFT",u,!0);return m.param=l,m});a.action.ddf5(s)}}picksAsDeck(){const t=[];return this.picks.forEach(i=>{const e=t.findIndex(s=>s.card===i);e===-1?t.push({card:i,num:1}):t[e].num+=1}),t.sort((i,e)=>{const s=a.cards.getCard(i.card+"1"),l=a.cards.getCard(e.card+"1");return s.name.toLowerCase(){const s=this.rarityCache[e].length;let l=!0;for(;l;){const u=this.rarityCache[e][a.randInt(0,s)];i.includes(u)||(i.push(u),l=!1)}}),i}}class Se{id;dom;context;width;height;constructor(t){if(this.id=t,this.dom=document.getElementById(t),!this.dom)throw new Error(`Could not find canvas id ${t}`);this.context=this.dom.getContext("2d"),this.width=this.dom.width,this.height=this.dom.height,this.context.textBaseline="top",this.context.shadowOffsetX=1,this.context.shadowOffsetY=1}show(){this.dom.hidden=!1}hide(){this.dom.hidden=!0}get visible(){return!this.dom.hidden}clear(){this.context.clearRect(0,0,this.width,this.height)}sprite(t,i,e){this.context.drawImage(t,i,e)}updateScale(t){this.context.scale(t,t)}}class mr{registry;constructor(){this.registry={}}register(t){if(this.registry[t])throw new Error(`Double registration of canvas ${t}`);this.registry[t]=new Se(t)}get(t){return this.registry[t]}}class ut{getCanv(t){return t instanceof Se?t:a.canvases.get(t)}async drawSprite(t,i,e,s,l={}){const u=this.getCanv(t).context,m=await a.getSprite(a.imgRoot+i);let y=1;l&&(y=l.alpha??1),y<1&&(u.globalAlpha=y),u.drawImage(m,e,s,m.naturalWidth,m.naturalHeight),y<1&&(u.globalAlpha=1)}async drawText(t,i,e,s,l={}){const u=this.getCanv(t).context,m=l.fontSize??24;a.state.gs.pxRatio===2&&(s=this.retinaTextY(s,m)),u.fillStyle=l.colour||"#000000",u.font=`${m}px ${l.fontName||"cinzel"}`,u.shadowColor=l.shadow?"#000000":"#00000000",u.fillText(i,e,s),u.shadowColor="#00000000"}async spriteNumber(t,i,e,s,l,u){let m=e-this.numOffset(i,l);const y=[];i.toString().split("").forEach(A=>{y.push(this.drawSprite(t,this.numSpriteUrl(A,l,u),m,s)),m+=this.numSize(A,l)}),await Promise.all(y)}async drawHighlight(t,i,e,s,l,u="#00FF00"){const m=u.length===7?u.concat("aa"):u,y=this.getCanv(t);y.context.strokeStyle=m,y.context.beginPath(),y.context.rect(i,e,s,l),y.context.stroke()}hlColour(t){return t==="CANC"?"#FF0000":"#00FF00"}drawRarity(t,i,e,s){return this.drawSprite(t,`icons/rarity/new/${a.log.rarityText(i).toLowerCase()}.png`,e,s)}drawFaction(t,i,e,s){const l=i==="T"?2:0;return this.drawSprite(t,`icons/faction/${a.log.factionText(i).toLowerCase()}.png`,e+l,s+3)}retinaTextY(t,i){let e;return i<21?e=6:i<27?e=7:e=8,t-e}smallNumSize={"-":7,0:10,1:9,2:10,3:8,4:10,5:9,6:10,7:9,8:8,9:9};bigNumSize={"-":8,0:13,1:9,2:13,3:11,4:14,5:12,6:12,7:12,8:12,9:12};numSize(t,i){return i==="S"?this.smallNumSize[t]:this.bigNumSize[t]}numOffset(t,i){const e=t.toString().split("").reduce((s,l)=>s+this.numSize(l,i),0)-(i==="B"?2:1);return Math.floor(e/2)}numSpriteUrl(t,i,e){return`text/nums/${i}/${e}/${t}.png`}haze="#222222d8"}class Kt extends ut{async drawButton(t,i,e,s,l,u=7,m=!1){let y,A;m?(y="ui/button/menu_on.png",A="#d7fc03"):(y="ui/button/menu_off.png",A="#00DEF7");const k=this.buttonBounds(i,e);await this.drawSprite(t,y,k[0],k[1]),await this.drawText(t,l,k[0]+7+u,k[1]+24,{colour:A,fontSize:30});const D=new U(s,...k,W.Both);a.clickers.add(D)}buttonBounds(t,i){return[t-7,i-7,232,69]}}class de extends ut{async makeIconButton(t,i,e,s){let u;u=`ui/button/ui_${s}.png`,await this.drawSprite(t,u,i,e);const m=d.basicAction("UIBT");m.param=s;const y=new U(m,i,e,40,40,W.Both);a.clickers.add(y)}async makeVScroller(t,i,e,s,l){const u=this.vScrollHilightBounds(i,e);await this.drawSprite(t,`ui/arrow/${s?"up":"down"}.png`,i,e);const m={zone:"N",actionKey:l,hostCard:"",param:s?"U":"D"},y=new U(m,...u,W.Both);a.clickers.add(y)}vScrollHilightBounds(t,i){return[t-3,i-3,40,27]}}class ue extends ut{async drawActions(t){if(a.mode.baseMode==="G"){const i=a.canvases.get("effects"),e=t.filter(s=>s.zone==="B");if(e.length>1&&console.error("Two button actions encountered in one batch",e),e.length===0||a.state.gs.aiActive||a.state.clickMode==="I"&&!a.mode.isDetailMode){const s=this.buttonBounds();await this.drawSprite(i,"ui/button/off.png",s[0],s[1])}else{const s=e[0],l=this.buttonBounds();await this.drawSprite(i,"ui/button/on.png",l[0],l[1]);let u;s.actionKey==="CARD"?u=s.param:u=s.actionKey,await this.drawSprite(i,`text/butt/${u}.png`,l[0]+23,l[1]+18);const m=this.highlightBounds(),y=new U(s,...m);s.actionKey==="CNCL"&&(y.mouse=W.Both),a.clickers.add(y)}}}buttonBounds(){return[856,406,160,63]}highlightBounds(){const t=this.buttonBounds(),i=5,e=[-1,-1,2,2];return t.map((s,l)=>s+i*e[l])}}class Et extends ut{async drawCard(t,i,e,s){const l=this.getCanv(i),u=this.extractStats(t),m=u.cardClass;if(await this.drawSprite(l,m.image(!1),e+14,s+35),await this.drawSprite(l,this.frameImg(m.level,m.faction,m.type,!1),e,s),await this.drawSprite(l,`text/card/${m.cardCode()}.png`,e+12,s+16),u.isCreature){const y=s+178;await this.spriteNumber(l,u.att,e+24,y,"S","Y"),await this.spriteNumber(l,u.hlt,e+127,y,"S","Y")}if(u.sleeping&&await this.drawSprite(l,"icons/effects/defensive.png",e+5,s+40,{alpha:.7}),u.iconList.length>0){const y=e+57-17*(u.iconList.length-1);await Promise.all(u.iconList.map(async(A,k)=>this.drawIcon(l,y+k*35,s+140,A[0],A[1])))}}async drawBigCard(t,i,e,s){const l=this.extractStats(i);if(await this.drawSprite(t,i.image(!0),e+38,s+117),await this.drawSprite(t,this.frameImg(i.level,i.faction,i.type,!0),e,s),i.rarity!=="T"&&await this.drawRarity(t,i.rarity,e+309,s+394),l.isCreature){const u=s+555;await this.spriteNumber(t,l.att,e+44,u,"B","Y"),await this.spriteNumber(t,l.hlt,e+325,u,"B","Y")}}async drawIcon(t,i,e,s,l=0){const u=this.getCanv(t);if(await this.drawSprite(u,`icons/effects/${s}.png`,i,e),l>0){const m=s==="poison"?12:9;await this.spriteNumber(u,l,i+17,e+m,"S","B")}}extractStats(t){let i,e=!1,s=0,l=0,u=!1,m=0,y=!1,A=!1,k=!1,D=!1,B=0,$=0,q=0,K=!1,tt=!1;if(!(t instanceof pt))e=!0,s=t.attack,l=t.health,u=t.sleeping&&!t.aggressive,m=t.regen,y=t.breakthrough,A=t.defender,k=t.aggressive,B=t.armor,$=t.poison,q=t.mobility,D=t.changed,i=a.cards.getCard(t.code);else{if(t.type==="C"){e=!0;const _=t;s=_.jr1,l=_.jr2,m=_.initRegen,y=_.initBT,A=_.initDefend,k=_.initAggro,B=_.initArmor,q=_.initMobile}K=t.overload,tt=t.consistent,i=t}const j=[];return K&&j.push(["overload",0]),tt&&j.push(["consistent",0]),m>0&&j.push(["regenerate",m]),y&&j.push(["breakthrough",0]),A&&j.push(["defender",0]),k&&j.push(["aggressive",0]),B>0&&j.push(["armor",B]),$>0&&j.push(["poison",$]),q>0&&j.push(["mobility",q]),D&&j.push(["changed",0]),{cardClass:i,isCreature:e,iconList:j,hlt:l,att:s,sleeping:u}}async drawHilight(t,i,e,s="#00FF00"){await super.drawHighlight(t,...this.highlightBounds(i,e),s)}cardBounds(t,i){return[t,i,150,205]}highlightBounds(t,i){const e=this.cardBounds(t,i),s=5,l=[-1,-1,2,2];return e.map((u,m)=>u+s*l[m])}frameImg(t,i,e,s){return`frames/${s?"big":"small"}/lvl${t}_${i}${e}.png`}levelImg(t){return`icons/frame/lvl${t}.png`}oldFrameImg(t){return`icons/frame/frame${t}.png`}factionImg(t){return`icons/faction/orb${t}.png`}}const we=30,ee=540,De=5;class xe extends ut{async drawCards(t){const i=a.canvases.get("hand");i.clear();const e=new Et,s=e.highlightBounds(0,0)[2]+De;let l=we;const u=this.paginatron(t);for(let m=u[0];m<=u[1];m++){const y=a.cards.getCard(t.hand[m]);await e.drawCard(y,i,l,ee),l+=s}}async drawActions(t){const i=a.state.clickMode!=="I",e=a.state.clickMode!=="T",s=a.canvases.get("effects"),l=new Et,u=l.highlightBounds(0,0)[2]+De,m=new yt(0,520,1e3,250),y=new yt(0,520,1e3,250,W.Right),A=this.paginatron(a.state.getActivePlayer());await Promise.all(t.filter(k=>k.zone==="H").map(async k=>{const D=k;if(D.position>=A[0]&&D.position<=A[1]){const B=we+(D.position-A[0])*u;if(e&&k.actionKey==="DEET"){const $=new U(k,...l.highlightBounds(B,ee),W.Right);y.addChild($)}else if(i&&k.actionKey!=="DEET"){const $=new U(k,...l.highlightBounds(B,ee));m.addChild($),await l.drawHilight(s,B,ee,this.hlColour(D.actionKey))}}})),i&&a.clickers.add(m),e&&a.clickers.add(y),A[0]>0&&await this.makeScroller(s,!1),A[1]0&&t.hand.length-i<5&&(i=Math.max(0,t.hand.length-5),a.state.gs.ui.handScrollLeft=i),[i,Math.min(i+4,t.hand.length-1),t.hand.length-1]}scrollHilightBounds(t,i){return[t-3,i-2,27,38]}async makeScroller(t,i){const e=i?894:856,s=726,l=this.scrollHilightBounds(e,s);await this.drawSprite(t,`ui/arrow/${i?"right":"left"}.png`,e,s),await this.drawHighlight(t,...l);const u={zone:"N",actionKey:"SCRH",hostCard:"",param:i?"R":"L"},m=new U(u,...l,W.Both);a.clickers.add(m)}}class fe extends ut{fieldBoundary=[17,62,821,443];async drawCards(t){const i=a.state.gs.isLocalA,e=a.canvases.get("field");e.clear();const s=new Et,l=a.field.qActiveCreats().map(u=>{let m=0;t&&t.scrappers.some(A=>A[0]===u.lane&&A[1]===u.owner)&&(m=t.battlePhase);const y=this.coordCalc(u.lane,u.owner,i,m);return s.drawCard(u,e,...y)});if(await Promise.all(l),a.batch.iaTrigLane>0){const u=this.coordCalc(a.batch.iaTrigLane,a.state.ddf9(),i),m=s.cardBounds(...u);await this.drawSprite(e,"icons/rewards/gold.png",m[0]+m[2]/2-20,m[1]+m[3]+7)}}async drawActions(t){const i=a.state.clickMode!=="I",e=a.state.clickMode!=="T",s=a.state.gs.isLocalA,l=a.canvases.get("effects"),u=new Et,m=new yt(...this.fieldBoundary),y=new yt(...this.fieldBoundary,W.Right);await Promise.all(t.filter(A=>A.zone==="F"||A.zone==="R").map(async A=>{if(A.zone==="R"&&i){const k=new U(A,...this.fieldBoundary);a.clickers.add(k),await this.drawHighlight(l,...this.fieldBoundary)}else{const k=A,D=this.coordCalc(k.lane,k.playerA,s);if(e&&A.actionKey==="DEET"){const B=new U(A,...u.highlightBounds(...D),W.Right);y.addChild(B)}else if(i&&A.actionKey!=="DEET"){const B=new U(A,...u.highlightBounds(...D));m.addChild(B),await u.drawHilight(l,...D,this.hlColour(k.actionKey))}}})),i&&m.childs.length>0&&a.clickers.add(m),e&&y.childs.length>0&&a.clickers.add(y)}async drawFight(t){if(t.length>0){const i={battlePhase:1,scrappers:t},e=72;await new ue().drawActions([]),await this.drawCards(i),await a.sleep(e),i.battlePhase=2,await this.drawCards(i),await a.sleep(e),i.battlePhase=3,await this.drawCards(i),await a.sleep(e),i.battlePhase=4,await this.drawCards(i),await a.sleep(e+70),i.battlePhase=3,await this.drawCards(i),await a.sleep(e),i.battlePhase=2,await this.drawCards(i),await a.sleep(e),i.battlePhase=1,await this.drawCards(i),await a.sleep(e)}}coordCalc(t,i,e,s=0){const l=e===i,u=166,m=5;let y,A,k;return[y,k,A]=l?[22,290,1]:[687,65,-1],[y+(t-1)*u*A,k+s*m*(-1*A)]}}class ge extends ut{avatars=["barf","beee","behold","boof","crowley","darko","deert","eyebs","fine","furiousgeorge","ghoost","judge","kenta","nom","pupsky","skelly","stache"];async drawPlayer(t,i,e,s){const l=this.getCanv(i);await this.drawSprite(l,`avatar/${this.avatars[t.avatar]}.jpg`,e+46,s+48),await this.drawSprite(l,"ui/player_frame.png",e,s),await this.drawSprite(l,"ui/player_health.png",e+10,s+102),await this.spriteNumber(l,t.health,e+45,s+149,"B","G"),await this.drawText(l,`Turn: ${t.turn.toString()} Rank: ${t.rank.toString()}`,e+25,s+210,{colour:"#f5f242",fontSize:20}),await this.drawText(l,t.name,e+t.nameOffset,s+185,{colour:"#42a4f5",fontSize:20})}async drawAllPlayers(){const t=a.canvases.get("player");t.clear();const i=a.state.getLocalPlayer(),e=a.state.getPlayer(!i.isPlayerA);if(await this.drawPlayer(i,t,...this.playerOrigin(!0)),await this.drawPlayer(e,t,...this.playerOrigin(!1)),i.isPlayerA===a.state.ddf9()){let s=862;const l=295,u=a.state.getRegularPlays(),m=Array(u).fill("blue").concat(a.state.gs.turn.freeCards.map(A=>A.sourceCard)),y=[];m.forEach(A=>{let k;if(A==="blue")k=A;else{k="green";const D={actionKey:"DEET",zone:"N",hostCard:"",param:A},B=new U(D,s-1,l-1,28,41,W.Both);a.clickers.add(B)}y.push(this.drawSprite(t,`ui/${k}card.png`,s,l)),s+=30}),await Promise.all(y)}await this.drawDeckButton(t,i,!0),await this.drawDeckButton(t,i,!1)}async drawDeckButton(t,i,e){let s,l,u;if(e?(s=i.discard.length,l=935,u="T"):(s=i.deck.length,l=858,u="U"),await this.drawSprite(t,`ui/button/faction_${u}.png`,l,350),await this.spriteNumber(t,s,l+38,350+14,"S","Y"),s>0){const y=d.basicAction("VWDK");y.param=e?"VD":"VR";const A=new U(y,l,350,77,44,W.Both);a.clickers.add(A)}}async drawActions(t){if(a.state.clickMode==="I")return;const i=a.canvases.get("effects"),e=a.state.gs.isLocalA;await Promise.all(t.filter(s=>s.zone==="P").map(s=>{const l=s,u=this.playerOrigin(l.playerA===e),m=this.highlightBounds(...u),y=new U(s,...m);return a.clickers.add(y),this.drawHighlight(i,...m)}))}playerOrigin(t){return[832,t?485:0]}playerBounds(t,i){return[t+18,i+18,170,170]}highlightBounds(t,i){return this.playerBounds(t,i)}async drawGameOver(){const t=a.canvases.get("field"),i=94,e=a.state.gs.isLocalA,s=a.state.gs.winFlag,l=e&&s===1||!e&&s===-1;await this.drawSprite(t,`ui/you-${l?"win":"lose"}.png`,i,89),a.clickers.removeAll();const u=new Kt,m=a.canvases.get("effects");await u.drawButton(m,i+62,520,d.menuButtonAction("MM"),"Main Menu",20,!1),await u.drawButton(m,i+389,520,d.menuButtonAction("RP"),"Replay",55,!1)}}const Ee=15,Fe=15,pr=5;class yr extends ut{constructor(){super();const i=new Et().highlightBounds(0,0);this.xOffset=i[2]+pr,this.yOffset=i[3]+25}xOffset;yOffset;async drawCards(){const t=a.canvases.get("decklist");t.clear(),t.context.fillStyle=this.haze,t.context.fillRect(0,0,849,a.gameHeight);const i=new Et,s=a.deck.visibleContent().map((l,u)=>{const m=a.cards.getCard(l.cardCode),y=this.listXY(u);return i.drawCard(m,t,...y).then(()=>{if(l.cardCount>0)return this.drawCount(t,y[0]+62,y[1]+163,l.cardCount)})});await Promise.all(s)}async drawActions(t){const i=a.canvases.get("decklist"),e=new Et,s=new de,l=a.state.clickMode!=="I",u=a.state.clickMode!=="T",m=a.deck.visibleContent(),y=a.state.gs.ui,A=y.deckScroll,k=A+15,D=y.deckSummary,B=D?W.Both:W.Right,$=new yt(...this.deckBoundary()),q=new yt(...this.deckBoundary(),B),K=[];t.forEach(tt=>{if(tt.actionKey==="DEET"&&(u||D)){const j=tt;if(j.position>=A&&j.positionSt.sourceIdx===j.position);if(_>-1){const St=this.listXY(_-A),It=new U(tt,...e.highlightBounds(...St));$.addChild(It),K.push(e.drawHilight(i,...St,this.hlColour(tt.actionKey)))}}}),l&&$.childs.length>0&&a.clickers.add($),(u||D)&&q.childs.length>0&&a.clickers.add(q),a.deck.canPageDown&&K.push(s.makeVScroller(i,319,723,!1,"SCRK")),a.deck.canPageUp&&K.push(s.makeVScroller(i,487,723,!0,"SCRK")),await Promise.all(K)}async drawCount(t,i,e,s){await this.drawSprite(t,"ui/dullcard.png",i,e),await this.spriteNumber(t,s,i+13,e+13,"S","Y")}listXY(t){return[Ee+t%5*this.xOffset,Fe+Math.floor(t/5)*this.yOffset]}deckBoundary(){return[Ee,Fe,this.xOffset*5,this.yOffset*3]}}class br extends ut{async drawDetails(t){const i=[],e=a.canvases.get("card");e.clear(),e.context.fillStyle=this.haze,e.context.fillRect(0,0,849,a.gameHeight);const s=30,l=30,u=a.cards.getCard(a.details.currentCard),m=new Et;a.state.gs.options.bigCards?i.push(m.drawBigCard(e,u,s,l)):i.push(m.drawCard(u,e,134,280));const y=435;let A=30;const k="#f5f242",D="#03fcfc",B=33,$=23,q=28;let K=u.name;for(;K.length>0;){A+=36;let et;if(K.length<$)et=K,K="";else{const bt=K.lastIndexOf(" ",$);et=K.substring(0,bt),K=K.substring(bt+1)}i.push(this.drawText(e,et,y,A,{colour:D,fontSize:28}))}A+=36,i.push(this.drawText(e,this.cardSummary(u),y,A,{colour:D,fontSize:20})),u.type==="C"&&(A+=30,i.push(this.drawText(e,this.tribeSummary(u),y,A,{colour:D,fontSize:20})));let tt=a.log.cardTextSplit(u);A+=40,tt.forEach(et=>{for(;et.length>0;){let bt;if(et.length1){const et=u.cardCode(),bt=_===3?[19,147,270]:_===2?[78,216]:[0,98,196,294];j.forEach(($t,ie)=>{i.push(this.drawLevelButton(e,et,$t,40+bt[ie],658,$t===u.level))})}const St=new Kt;let It=0;const me=513,pe=697,Be=74;a.mode.baseMode!=="G"&&(i.push(St.drawButton(e,me,pe,t,"Close",65,!1)),It++);const Cr=new U(t,s,l,377,603,W.Both);if(a.clickers.add(Cr),a.details.canGoBack){const et=a.details.goBackAction();i.push(St.drawButton(e,me,this.buttonY(pe,It,Be),et,"Back",72,!1)),It++}a.details.friendos.forEach(et=>{const bt=a.cards.getCard(et),$t=a.details.friendAction(et),ie=a.details.friendTxt(bt.cardCode());i.push(St.drawButton(e,me,this.buttonY(pe,It,Be),$t,ie[1]||bt.name,ie[0],!1)),It++}),await Promise.all(i)}buttonY(t,i,e){return t-i*e}cardSummary(t){const i=a.log.factionText(t.faction),e=a.log.rarityText(t.rarity),s=a.log.cardTypeText(t.type);return`${i}, ${e} ${s}`}tribeSummary(t){return t.tribe.map(i=>a.log.tribeText(i)).join(" ")}async drawLevelButton(t,i,e,s,l,u){if(await this.drawSprite(t,`icons/frame/level${e}.png`,s,l),!u){const k=a.details.levelAction(e),D=new U(k,s-15,l-5,88,112,W.Both);a.clickers.add(D)}const y=a.cards.getCard(`${i}${e}`).levelSpice(),A=[[-16,55],[41,55],[25,62]];await Promise.all(y.map((k,D)=>{const B=s+A[D][0],$=l+A[D][1];if(k.icon==="A"||k.icon==="H"){let q,K;return k.icon==="A"?(q="icons/frame/attack.png",K=B+17):(q="icons/frame/health.png",K=B+16),this.drawSprite(t,q,B-1,$-1).then(()=>this.spriteNumber(t,k.num,K,$+10,"S","Y"))}else return Promise.resolve()}))}levelFun(t){return t.maxLevel===3?t.minLevel===1?[1,2,3]:[3]:t.maxLevel===t.minLevel?[t.minLevel]:t.maxLevel===4?[1,2,3,4]:[1,2]}}class vr extends ut{async drawPack(t,i){const e=new Et,s=a.state.clickMode!=="I",l=a.state.clickMode!=="T",u=[],m=new yt(...this.packBoundary),y=new yt(...this.packBoundary,W.Right);t.filter(k=>k.pack).forEach(k=>{const D=this.coordCalcPack(k.index);if(k.actionKey==="DRFT"){const B=a.cards.getCard(k.param+"1");if(u.push(e.drawCard(B,i,...D).then(()=>this.drawRarity(i,B.rarity,D[0]+112,D[1]+4))),s){const $=new U(k,...e.highlightBounds(...D));m.addChild($)}}else if(l){const B=new U(k,...e.highlightBounds(...D),W.Right);y.addChild(B)}}),s&&m.childs.length>0&&a.clickers.add(m),l&&y.childs.length>0&&a.clickers.add(y),await Promise.all(u)}async drawList(t,i){let e=170;const s=570,l=[],u=a.draft.picksAsDeck(),m=new yt(s,e,600,600,W.Both),y=t,A=15,k=a.draft.paginating;u.length>A&&await this.makeScroller(i,k),y.filter(D=>!D.pack).forEach(D=>{if(k===D.index>=A){const B=a.cards.getCard(D.param);l.push(this.drawFaction(i,B.faction,s,e),this.drawRarity(i,B.rarity,s+28,e),this.drawText(i,`${u[D.index].num}x ${B.name}`,s+65,e+7,{colour:"#f5f242"}));const $=new U(D,s,e-2,600,35,W.Both);m.addChild($),e+=35}}),await Promise.all(l),a.clickers.add(m)}packBoundary=[17,190,537,480];coordCalcPack(t){const s=t%3,l=Math.floor(t/3);return[22+s*176,200+l*235]}async makeScroller(t,i){const e=new de,s=530,l=720;await e.makeVScroller(t,s,l,i,"SCRD")}}class Pe extends ut{async drawSets(t,i){let e=200;const s=100,l=[],u=new yt(s,e,400,600);t.filter(D=>D.actionKey==="DSET").forEach(D=>{const B=Ut[parseInt(D.param)];l.push(this.drawText(i,B.name,s,e,{colour:"#f5f242"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const $=new U(D,s,e-2,400,35,W.Both);u.addChild($),e+=45}),l.push(this.drawText(i,"Random Deck",s,e,{colour:"#ffa500"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const m=new U({actionKey:"DECK",zone:"N",param:"~random~",hostCard:""},s,e-2,400,35,W.Both);u.addChild(m),e+=45,l.push(this.drawText(i,"Random Cards",s,e,{colour:"#ffa500"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const y=new U({actionKey:"DECK",zone:"N",param:"~dogs~",hostCard:""},s,e-2,400,35,W.Both);u.addChild(y),a.clickers.add(u),await Promise.all(l);const A={actionKey:"MNBT",zone:"N",hostCard:"",param:"LK"};await new Kt().drawButton(i,s-48,650,A,"LOAD FILE",32)}async drawList(t,i){let e=170;const s=570,l=[],u=new yt(s,e,600,600);t.filter(m=>m.actionKey==="DECK").forEach(m=>{const y=a.deTil(m.param),A=a.pack.stockDeckByName(y[0],y[1]);l.push(this.drawFaction(i,A.factions[0],s,e),this.drawText(i,A.name,s+65,e+7,{colour:"#f5f242"})),A.factions.length===2&&l.push(this.drawFaction(i,A.factions[1],s+28,e));const k=new U(m,s,e-2,600,35,W.Both);u.addChild(k),e+=35}),await Promise.all(l),a.clickers.add(u)}packBoundary=[17,190,537,480];coordCalcPack(t){const s=t%3,l=Math.floor(t/3);return[22+s*176,200+l*235]}iAmError(t){const i=a.canvases.get("game-ui");this.drawText(i,t,295,670,{colour:"#f5142e",fontSize:26})}}class Ar extends ut{async drawMenu(t){const i=new Kt,e=80,s=45,l=34,u=240;let m=50,y=u;await this.textFun(m+28,y,"More Info",t),y+=s,await this.buttonMaker(t,i,m,y,"RU","RULES",66),y+=e,await this.buttonMaker(t,i,m,y,"FQ","INFO & FAQ",20),y+=e*3,await this.buttonMaker(t,i,m,y,"MM","MAIN MENU",20),m=404,y=u,await this.textFun(m+5,y,"Draft Modes",t),y+=s,await this.buttonMaker(t,i,m,y,"GP","GOOD PACKS",9,a.state.gs.options.fatPacks),y+=e,await this.buttonMaker(t,i,m,y,"LD","LEGENDARY",17,a.state.gs.options.legDraft),y+=e+l,await this.textFun(m+37,y,"UI Modes",t),y+=e-l,await this.buttonMaker(t,i,m,y,"90","90% SIZE",47,a.state.gs.options.scale==="90"),y+=e,await this.buttonMaker(t,i,m,y,"BC","BIG CARDS",29,a.state.gs.options.bigCards),m=757,y=u,await this.textFun(m+12,y,"Game Modes",t),y+=s,await this.buttonMaker(t,i,m,y,"HH","BIG HEALTH",20,a.state.gs.options.highHealth),y+=e,await this.buttonMaker(t,i,m,y,"CH","CHEATER",37,a.state.gs.options.cheater),y+=e,await this.buttonMaker(t,i,m,y,"BB","BATTLE BARK",13,a.state.gs.options.bark),await this.drawText(t,"v0.4.2",494,730,{fontSize:16,colour:"#7b68ee"})}async textFun(t,i,e,s){await this.drawText(s,e,t,i,{colour:"#f5f242",fontSize:30})}async buttonMaker(t,i,e,s,l,u,m=7,y=!1){const A={actionKey:"MNBT",zone:"N",hostCard:"",param:l};await i.drawButton(t,e,s,A,u,m,y)}}class kr extends ut{async drawMenu(t){let e=22;await this.drawSprite(t,"ui/button/constructed.png",778,e);const s=new U(this.makeAction("C"),...this.buttHilightBounds(778,e),W.Both);a.clickers.add(s),e=148,await this.drawSprite(t,"ui/button/draft.png",778,e);const l=new U(this.makeAction("D"),...this.buttHilightBounds(778,e),W.Both);a.clickers.add(l),e=508,await this.drawSprite(t,"ui/button/deck.png",778,e);const u=new U(this.makeAction("B"),...this.buttHilightBounds(778,e),W.Both);a.clickers.add(u),e=634,await this.drawSprite(t,"ui/button/info.png",778,e);const m=new U(this.makeAction("I"),...this.buttHilightBounds(778,e),W.Both);a.clickers.add(m),await this.drawSprite(t,"gwg/gwg_red.png",58,0)}buttBounds(t,i){return[t,i,242,113]}buttHilightBounds(t,i){const s=[-3,-3,6,6];return this.buttBounds(t,i).map((l,u)=>l+s[u])}makeAction(t){return{zone:"N",actionKey:"MENU",hostCard:"",param:t}}}class Tr{gameWidth;gameHeight;spriteCache;action;ai;batch;canvases;cards;clickers;creat;death;deck;details;draft;drawing;effect;field;fight;log;menu;mode;pack;phase;player;state;target;trigger;turn;dogAudio;idnum=0;imgRoot;constructor(){this.spriteCache={},this.imgRoot="./img/",this.gameWidth=1024,this.gameHeight=768,this.action=new sr,this.ai=new cr,this.batch=new qi,this.canvases=new mr,this.cards=new Wi,this.clickers=new Ji,this.creat=new ir,this.death=new Xi,this.deck=new dr,this.details=new or,this.draft=new gr,this.drawing=new hr,this.effect=new er,this.field=new _i,this.fight=new tr,this.log=new Zi,this.menu=new ur,this.mode=new Ki,this.pack=new fr,this.phase=new ji,this.player=new rr,this.state=new nr,this.target=new ar,this.trigger=new Yi,this.turn=new Qi,this.dogAudio=document.getElementById("dogbark")}randInt(t,i){return Math.floor(Math.random()*(i-t))+t}isUn(t){return typeof t>"u"}async sleep(t){return new Promise(i=>{setTimeout(()=>{i()},t)})}async getSprite(t){return this.spriteCache[t]||(this.spriteCache[t]=this.imageLoader(t)),this.spriteCache[t]}async bulkLoadSprite(t){await Promise.all(t.map(i=>this.getSprite(`${this.imgRoot}${i}`)))}dogBark(){this.dogAudio.volume=.3,this.dogAudio.play()}genId(){return this.idnum+=1,"@"+this.idnum.toString(36)}resetIds(){this.idnum=0}enTil(...t){return t.join("~")}deTil(t){return t.split("~")}imageLoader(t){return new Promise(i=>{const e=new Image;e.onload=()=>{i(e)},e.src=t})}}const a=new Tr;window.onload=async()=>{await document.fonts.ready;let n=[];document.fonts.forEach(l=>{l.load(),n.push(l.loaded)}),await Promise.all(n),["game-ui","field","player","hand","effects","decklist","card"].forEach(l=>{a.canvases.register(l)});const i=a.canvases.get("effects");i.context.lineWidth=2;try{document.createEvent("TouchEvent"),a.state.setClickMode("T")}catch{}a.state.gs.pxRatio=window.devicePixelRatio;const e=l=>{const u=a.clickers.hitTest(l.pageX,l.pageY,l.button);u&&a.action.handleAction(u)},s=document.getElementById("solforge");s.addEventListener("click",e),s.addEventListener("contextmenu",l=>(l.preventDefault(),e(l),!1)),window.sfapi={details:l=>{a.details.init(l)}},a.state.restoreOptions(),a.state.gs.options.scale!=="100"&&a.drawing.changeScale(a.state.gs.options.scale),a.drawing.drawAll()}})(); +(function(){"use strict";const ke=["A","N","T","U"];const le=["C","R","H","L"];const Pt=[{crd:"AAK",fct:"T",rty:"L",set:1,typ:"C"},{crd:"ABB",fct:"N",rty:"R",set:4,typ:"C"},{crd:"AGC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"AGK",fct:"A",rty:"L",set:2.1,typ:"C"},{crd:"AGP",fct:"A",rty:"C",set:1.1,typ:"S"},{crd:"AGW",fct:"A",rty:"R",set:4,typ:"S"},{crd:"ASG",fct:"T",rty:"R",set:1,typ:"S"},{crd:"AFO",fct:"A",rty:"C",set:2.1,typ:"C"},{crd:"ATG",fct:"A",rty:"C",set:2,typ:"C"},{crd:"ART",fct:"U",rty:"H",set:2.1,typ:"C"},{crd:"ATP",fct:"U",rty:"H",set:3,typ:"C"},{crd:"AGM",fct:"T",rty:"L",set:2.2,typ:"C"},{crd:"ALG",fct:"A",rty:"R",set:1,typ:"C"},{crd:"AHL",fct:"A",rty:"H",set:1,typ:"C"},{crd:"ALS",fct:"A",rty:"H",set:2,typ:"C"},{crd:"ATZ",fct:"A",rty:"C",set:4,typ:"S"},{crd:"ARB",fct:"A",rty:"H",set:4,typ:"C"},{crd:"AEN",fct:"A",rty:"C",set:2,typ:"C"},{crd:"APM",fct:"A",rty:"H",set:2,typ:"C"},{crd:"AQE",fct:"T",rty:"C",set:1,typ:"S"},{crd:"AGD",fct:"U",rty:"L",set:1,typ:"C"},{crd:"AFS",fct:"A",rty:"L",set:1,typ:"C"},{crd:"ABR",fct:"T",rty:"C",set:2,typ:"C"},{crd:"AFR",fct:"T",rty:"H",set:3.1,typ:"C"},{crd:"AMY",fct:"T",rty:"C",set:1,typ:"C"},{crd:"ABL",fct:"T",rty:"R",set:1,typ:"S"},{crd:"ATT",fct:"T",rty:"L",set:4.1,typ:"C"},{crd:"AGU",fct:"T",rty:"R",set:2.1,typ:"C"},{crd:"AIV",fct:"T",rty:"H",set:1,typ:"C"},{crd:"BTH",fct:"U",rty:"R",set:3,typ:"C"},{crd:"BTI",fct:"A",rty:"C",set:4,typ:"C"},{crd:"BTN",fct:"A",rty:"H",set:1,typ:"C"},{crd:"BBB",fct:"U",rty:"H",set:4,typ:"C"},{crd:"BLH",fct:"T",rty:"L",set:2,typ:"C"},{crd:"BSP",fct:"N",rty:"C",set:2.2,typ:"C"},{crd:"BWK",fct:"N",rty:"R",set:1,typ:"C"},{crd:"BLW",fct:"N",rty:"R",set:3,typ:"C"},{crd:"BSR",fct:"N",rty:"R",set:1,typ:"C"},{crd:"BMY",fct:"T",rty:"H",set:2.1,typ:"C"},{crd:"BSW",fct:"T",rty:"C",set:3,typ:"C"},{crd:"BWW",fct:"T",rty:"H",set:4,typ:"C"},{crd:"BTM",fct:"U",rty:"H",set:1,typ:"S"},{crd:"BAW",fct:"U",rty:"R",set:2,typ:"C"},{crd:"BWG",fct:"U",rty:"C",set:1,typ:"C"},{crd:"BTR",fct:"U",rty:"H",set:3.1,typ:"C"},{crd:"BWD",fct:"U",rty:"C",set:2,typ:"C"},{crd:"BSG",fct:"A",rty:"L",set:1,typ:"C"},{crd:"BSS",fct:"A",rty:"L",set:1,typ:"C"},{crd:"BTS",fct:"U",rty:"C",set:1.1,typ:"C"},{crd:"BST",fct:"T",rty:"L",set:4,typ:"C"},{crd:"BWT",fct:"U",rty:"L",set:4.2,typ:"C"},{crd:"BWH",fct:"A",rty:"R",set:1,typ:"S"},{crd:"BRN",fct:"T",rty:"R",set:3,typ:"S"},{crd:"BZD",fct:"N",rty:"R",set:2,typ:"C"},{crd:"BFM",fct:"N",rty:"H",set:2.3,typ:"C"},{crd:"BSM",fct:"T",rty:"H",set:2,typ:"C"},{crd:"CDT",fct:"U",rty:"R",set:1,typ:"C"},{crd:"CMF",fct:"N",rty:"R",set:4,typ:"C"},{crd:"CTL",fct:"T",rty:"L",set:1,typ:"S"},{crd:"CCS",fct:"N",rty:"C",set:3,typ:"C"},{crd:"CHY",fct:"U",rty:"C",set:1,typ:"C"},{crd:"CHV",fct:"N",rty:"L",set:2,typ:"C"},{crd:"CRS",fct:"A",rty:"R",set:3,typ:"C"},{crd:"COD",fct:"T",rty:"R",set:4,typ:"S"},{crd:"CTI",fct:"N",rty:"C",set:1.1,typ:"C"},{crd:"CHA",fct:"U",rty:"R",set:2.1,typ:"C"},{crd:"CHH",fct:"U",rty:"C",set:2,typ:"C"},{crd:"CHR",fct:"U",rty:"L",set:1,typ:"C"},{crd:"CBB",fct:"T",rty:"C",set:3,typ:"C"},{crd:"CDC",fct:"T",rty:"C",set:2,typ:"C"},{crd:"CFB",fct:"T",rty:"H",set:1,typ:"C"},{crd:"CNM",fct:"T",rty:"C",set:2,typ:"C"},{crd:"CSW",fct:"T",rty:"L",set:2.3,typ:"C"},{crd:"CTG",fct:"A",rty:"C",set:3,typ:"C"},{crd:"CCT",fct:"T",rty:"R",set:2,typ:"C"},{crd:"CFG",fct:"T",rty:"C",set:2,typ:"S"},{crd:"CGL",fct:"N",rty:"H",set:3,typ:"C"},{crd:"CSU",fct:"N",rty:"R",set:1,typ:"S"},{crd:"CCR",fct:"N",rty:"C",set:1,typ:"C"},{crd:"CSB",fct:"N",rty:"C",set:2,typ:"C"},{crd:"CWK",fct:"T",rty:"C",set:3,typ:"C"},{crd:"CRC",fct:"A",rty:"R",set:2,typ:"C"},{crd:"CYC",fct:"N",rty:"H",set:2,typ:"C"},{crd:"CYS",fct:"N",rty:"C",set:4,typ:"C"},{crd:"CTW",fct:"N",rty:"C",set:1,typ:"S"},{crd:"CTV",fct:"U",rty:"H",set:1,typ:"S"},{crd:"CAG",fct:"A",rty:"R",set:1,typ:"S"},{crd:"CBS",fct:"A",rty:"C",set:2.1,typ:"S"},{crd:"CIN",fct:"A",rty:"R",set:1.1,typ:"C"},{crd:"CSH",fct:"A",rty:"C",set:3,typ:"C"},{crd:"CSG",fct:"A",rty:"C",set:2,typ:"S"},{crd:"DFR",fct:"N",rty:"H",set:2,typ:"C"},{crd:"DHW",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DSS",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DCR",fct:"N",rty:"R",set:2,typ:"S"},{crd:"DSK",fct:"N",rty:"C",set:1,typ:"C"},{crd:"DBA",fct:"U",rty:"H",set:1,typ:"C"},{crd:"DBP",fct:"U",rty:"C",set:1,typ:"C"},{crd:"DMR",fct:"U",rty:"C",set:2,typ:"C"},{crd:"DBR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"DCS",fct:"A",rty:"L",set:2,typ:"C"},{crd:"DGZ",fct:"A",rty:"R",set:2,typ:"S"},{crd:"DBN",fct:"N",rty:"C",set:4,typ:"C"},{crd:"DDS",fct:"A",rty:"H",set:4.2,typ:"S"},{crd:"DIS",fct:"T",rty:"R",set:1,typ:"S"},{crd:"DSV",fct:"U",rty:"R",set:2,typ:"S"},{crd:"DDD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"DZD",fct:"U",rty:"L",set:3,typ:"C"},{crd:"DBT",fct:"N",rty:"H",set:1,typ:"S"},{crd:"DFB",fct:"N",rty:"R",set:1,typ:"C"},{crd:"DMW",fct:"A",rty:"L",set:1.1,typ:"C"},{crd:"DCH",fct:"U",rty:"C",set:1,typ:"S"},{crd:"DTD",fct:"N",rty:"L",set:4.2,typ:"C"},{crd:"DSZ",fct:"N",rty:"C",set:2,typ:"C"},{crd:"DYB",fct:"U",rty:"R",set:2,typ:"S"},{crd:"DBQ",fct:"N",rty:"H",set:3,typ:"C"},{crd:"DYS",fct:"N",rty:"R",set:3,typ:"S"},{crd:"DYL",fct:"U",rty:"L",set:3,typ:"C"},{crd:"EBW",fct:"N",rty:"C",set:3,typ:"C"},{crd:"ESK",fct:"N",rty:"H",set:2,typ:"C"},{crd:"EHW",fct:"U",rty:"L",set:1,typ:"C"},{crd:"ETN",fct:"A",rty:"C",set:1,typ:"S"},{crd:"EWE",fct:"T",rty:"H",set:2,typ:"C"},{crd:"ENP",fct:"A",rty:"H",set:1,typ:"S"},{crd:"ESU",fct:"A",rty:"R",set:1,typ:"S"},{crd:"ENR",fct:"U",rty:"C",set:1,typ:"S"},{crd:"EPD",fct:"N",rty:"H",set:1,typ:"S"},{crd:"EPH",fct:"A",rty:"L",set:4.2,typ:"C"},{crd:"ESG",fct:"A",rty:"H",set:4.1,typ:"C"},{crd:"ESC",fct:"A",rty:"H",set:2,typ:"C"},{crd:"ESP",fct:"U",rty:"H",set:2.3,typ:"C"},{crd:"EWT",fct:"U",rty:"R",set:2,typ:"C"},{crd:"EHN",fct:"U",rty:"C",set:1,typ:"C"},{crd:"EFM",fct:"T",rty:"L",set:2.1,typ:"C"},{crd:"EFP",fct:"T",rty:"L",set:1,typ:"C"},{crd:"EXD",fct:"N",rty:"H",set:1,typ:"S"},{crd:"FWB",fct:"U",rty:"C",set:2.3,typ:"C"},{crd:"FWR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"FFG",fct:"U",rty:"C",set:4,typ:"C"},{crd:"FST",fct:"N",rty:"R",set:4,typ:"C"},{crd:"FWK",fct:"N",rty:"C",set:1,typ:"C"},{crd:"FIN",fct:"U",rty:"C",set:1,typ:"S"},{crd:"FRR",fct:"U",rty:"H",set:1,typ:"S"},{crd:"FVA",fct:"T",rty:"H",set:1,typ:"S"},{crd:"FFU",fct:"T",rty:"H",set:1,typ:"C"},{crd:"FLH",fct:"T",rty:"C",set:4,typ:"C"},{crd:"FMS",fct:"T",rty:"C",set:2,typ:"C"},{crd:"FSM",fct:"T",rty:"H",set:1,typ:"S"},{crd:"FBC",fct:"T",rty:"L",set:1,typ:"C"},{crd:"FBI",fct:"T",rty:"H",set:2.2,typ:"C"},{crd:"FFS",fct:"T",rty:"R",set:2,typ:"C"},{crd:"FLN",fct:"T",rty:"R",set:2,typ:"S"},{crd:"FRI",fct:"T",rty:"C",set:3,typ:"C"},{crd:"FSS",fct:"T",rty:"R",set:1,typ:"C"},{crd:"FLS",fct:"T",rty:"C",set:1,typ:"C"},{crd:"FSH",fct:"T",rty:"R",set:1,typ:"C"},{crd:"FFD",fct:"N",rty:"H",set:1,typ:"C"},{crd:"FRV",fct:"N",rty:"H",set:3,typ:"C"},{crd:"FSP",fct:"A",rty:"L",set:1,typ:"C"},{crd:"FPR",fct:"T",rty:"C",set:2.1,typ:"C"},{crd:"FFL",fct:"A",rty:"C",set:1,typ:"S"},{crd:"FGA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"FGB",fct:"A",rty:"R",set:1,typ:"C"},{crd:"FGD",fct:"A",rty:"H",set:3,typ:"C"},{crd:"FGG",fct:"A",rty:"H",set:1,typ:"C"},{crd:"FOL",fct:"A",rty:"H",set:3.1,typ:"C"},{crd:"FPM",fct:"A",rty:"R",set:3,typ:"C"},{crd:"FPS",fct:"A",rty:"C",set:1,typ:"C"},{crd:"FFM",fct:"T",rty:"H",set:3,typ:"C"},{crd:"FMD",fct:"T",rty:"L",set:3,typ:"C"},{crd:"FSK",fct:"T",rty:"C",set:2.3,typ:"S"},{crd:"FWT",fct:"U",rty:"H",set:1,typ:"C"},{crd:"FZS",fct:"T",rty:"R",set:1,typ:"S"},{crd:"GOS",fct:"A",rty:"L",set:4,typ:"S"},{crd:"GHS",fct:"U",rty:"C",set:2.2,typ:"C"},{crd:"GHB",fct:"U",rty:"R",set:1,typ:"C"},{crd:"GHR",fct:"U",rty:"H",set:4.2,typ:"C"},{crd:"GRN",fct:"N",rty:"C",set:2,typ:"S"},{crd:"GTH",fct:"N",rty:"C",set:1,typ:"S"},{crd:"GSC",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GMP",fct:"A",rty:"L",set:1,typ:"C"},{crd:"GTT",fct:"T",rty:"L",set:2,typ:"C"},{crd:"GCL",fct:"T",rty:"C",set:1,typ:"C"},{crd:"GCR",fct:"T",rty:"C",set:2,typ:"S"},{crd:"GLF",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GRW",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GSW",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GVS",fct:"U",rty:"C",set:2,typ:"C"},{crd:"GSS",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GBG",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GGE",fct:"N",rty:"C",set:2,typ:"C"},{crd:"GGH",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GRP",fct:"N",rty:"R",set:1,typ:"S"},{crd:"GGD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"GGR",fct:"N",rty:"L",set:3,typ:"C"},{crd:"GGP",fct:"N",rty:"H",set:1,typ:"C"},{crd:"GGS",fct:"N",rty:"C",set:1,typ:"C"},{crd:"GRM",fct:"N",rty:"R",set:2,typ:"S"},{crd:"GHT",fct:"U",rty:"C",set:1,typ:"C"},{crd:"GMR",fct:"U",rty:"C",set:1,typ:"C"},{crd:"HMF",fct:"T",rty:"H",set:3,typ:"C"},{crd:"HTR",fct:"U",rty:"L",set:1,typ:"C"},{crd:"HAR",fct:"A",rty:"C",set:1,typ:"C"},{crd:"HFA",fct:"N",rty:"H",set:1,typ:"C"},{crd:"HOD",fct:"T",rty:"R",set:3,typ:"C"},{crd:"HWM",fct:"A",rty:"L",set:1,typ:"C"},{crd:"HOX",fct:"N",rty:"R",set:4,typ:"S"},{crd:"HGS",fct:"N",rty:"R",set:1,typ:"S"},{crd:"HTP",fct:"U",rty:"C",set:1,typ:"C"},{crd:"IBF",fct:"T",rty:"R",set:1,typ:"S"},{crd:"ITO",fct:"T",rty:"R",set:2,typ:"S"},{crd:"IVS",fct:"N",rty:"C",set:4,typ:"S"},{crd:"IWC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"IHA",fct:"A",rty:"L",set:2,typ:"C"},{crd:"IBR",fct:"A",rty:"C",set:3,typ:"C"},{crd:"IMD",fct:"A",rty:"L",set:3,typ:"C"},{crd:"IMA",fct:"A",rty:"L",set:2.3,typ:"C"},{crd:"IZK",fct:"T",rty:"L",set:3,typ:"C"},{crd:"JPK",fct:"A",rty:"C",set:1,typ:"S"},{crd:"KDC",fct:"T",rty:"C",set:3,typ:"C"},{crd:"KAW",fct:"T",rty:"L",set:1.1,typ:"C"},{crd:"KOD",fct:"N",rty:"L",set:1,typ:"C"},{crd:"KIW",fct:"A",rty:"L",set:3,typ:"C"},{crd:"KTS",fct:"U",rty:"H",set:4,typ:"C"},{crd:"KKK",fct:"T",rty:"L",set:2,typ:"C"},{crd:"LOD",fct:"U",rty:"L",set:4,typ:"S"},{crd:"LFA",fct:"T",rty:"H",set:4,typ:"C"},{crd:"LKP",fct:"U",rty:"L",set:1,typ:"C"},{crd:"LGT",fct:"N",rty:"R",set:2.3,typ:"C"},{crd:"LBD",fct:"U",rty:"H",set:1,typ:"C"},{crd:"LSS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"LBL",fct:"U",rty:"R",set:1,typ:"C"},{crd:"LBR",fct:"T",rty:"C",set:1,typ:"S"},{crd:"LSK",fct:"T",rty:"C",set:1,typ:"S"},{crd:"LWY",fct:"T",rty:"C",set:1,typ:"C"},{crd:"LSP",fct:"A",rty:"C",set:1,typ:"C"},{crd:"LUC",fct:"T",rty:"L",set:4.2,typ:"C"},{crd:"LMV",fct:"N",rty:"L",set:1,typ:"C"},{crd:"LHY",fct:"U",rty:"C",set:2,typ:"C"},{crd:"LYR",fct:"U",rty:"C",set:4,typ:"S"},{crd:"LYS",fct:"U",rty:"R",set:3,typ:"S"},{crd:"MMH",fct:"T",rty:"C",set:1,typ:"C"},{crd:"MRF",fct:"N",rty:"C",set:1,typ:"C"},{crd:"MOE",fct:"T",rty:"H",set:1,typ:"C"},{crd:"MXW",fct:"A",rty:"C",set:1,typ:"C"},{crd:"MSP",fct:"U",rty:"R",set:2,typ:"S"},{crd:"MMA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"MMX",fct:"A",rty:"C",set:2,typ:"C"},{crd:"MMI",fct:"A",rty:"C",set:4,typ:"C"},{crd:"MMO",fct:"A",rty:"C",set:2,typ:"C"},{crd:"MMV",fct:"A",rty:"C",set:2.2,typ:"C"},{crd:"MPH",fct:"U",rty:"H",set:3,typ:"S"},{crd:"MSC",fct:"A",rty:"H",set:1,typ:"S"},{crd:"MTS",fct:"A",rty:"C",set:1.1,typ:"S"},{crd:"MTT",fct:"A",rty:"C",set:2,typ:"S"},{crd:"MML",fct:"U",rty:"H",set:2,typ:"C"},{crd:"MMW",fct:"U",rty:"L",set:2.2,typ:"C"},{crd:"MDE",fct:"N",rty:"C",set:4,typ:"C"},{crd:"MBP",fct:"U",rty:"H",set:1,typ:"C"},{crd:"MND",fct:"A",rty:"R",set:1,typ:"C"},{crd:"NNS",fct:"A",rty:"R",set:3,typ:"S"},{crd:"NGB",fct:"T",rty:"C",set:1,typ:"C"},{crd:"NGW",fct:"T",rty:"C",set:4,typ:"C"},{crd:"NSL",fct:"U",rty:"R",set:1,typ:"S"},{crd:"NCF",fct:"N",rty:"C",set:4,typ:"S"},{crd:"NCS",fct:"N",rty:"R",set:1,typ:"C"},{crd:"NCW",fct:"N",rty:"C",set:1,typ:"C"},{crd:"NCV",fct:"N",rty:"C",set:1,typ:"S"},{crd:"NEM",fct:"N",rty:"C",set:1,typ:"S"},{crd:"NSW",fct:"N",rty:"L",set:3,typ:"C"},{crd:"NSH",fct:"N",rty:"L",set:2.3,typ:"S"},{crd:"NXA",fct:"A",rty:"L",set:3.1,typ:"C"},{crd:"NXC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"NXG",fct:"A",rty:"H",set:3,typ:"C"},{crd:"NXP",fct:"A",rty:"C",set:1,typ:"C"},{crd:"NXT",fct:"A",rty:"H",set:2,typ:"C"},{crd:"NGT",fct:"N",rty:"R",set:2,typ:"C"},{crd:"NGQ",fct:"U",rty:"L",set:4.1,typ:"C"},{crd:"NCL",fct:"U",rty:"R",set:1.1,typ:"S"},{crd:"NFF",fct:"U",rty:"L",set:2,typ:"C"},{crd:"NAM",fct:"N",rty:"C",set:3,typ:"C"},{crd:"NOZ",fct:"N",rty:"R",set:2,typ:"C"},{crd:"NSY",fct:"N",rty:"C",set:2.1,typ:"C"},{crd:"ONN",fct:"N",rty:"H",set:1.1,typ:"S"},{crd:"OXA",fct:"A",rty:"H",set:2.3,typ:"C"},{crd:"OXM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"OXP",fct:"N",rty:"H",set:2,typ:"C"},{crd:"OBB",fct:"T",rty:"R",set:3,typ:"S"},{crd:"OEX",fct:"A",rty:"H",set:3,typ:"S"},{crd:"OWH",fct:"T",rty:"H",set:3,typ:"C"},{crd:"OBD",fct:"A",rty:"H",set:1,typ:"C"},{crd:"OFM",fct:"A",rty:"R",set:2.1,typ:"C"},{crd:"OJC",fct:"A",rty:"H",set:1.1,typ:"C"},{crd:"OPK",fct:"A",rty:"R",set:2,typ:"C"},{crd:"OSV",fct:"A",rty:"H",set:4,typ:"C"},{crd:"OWW",fct:"A",rty:"L",set:1,typ:"C"},{crd:"OHV",fct:"N",rty:"R",set:2,typ:"C"},{crd:"ODC",fct:"U",rty:"L",set:2,typ:"C"},{crd:"OSP",fct:"N",rty:"R",set:2,typ:"C"},{crd:"OSL",fct:"U",rty:"C",set:3,typ:"C"},{crd:"OWF",fct:"A",rty:"H",set:2,typ:"S"},{crd:"OXS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"PHM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"PPM",fct:"A",rty:"R",set:1,typ:"C"},{crd:"PSM",fct:"A",rty:"L",set:2.2,typ:"C"},{crd:"PLW",fct:"A",rty:"R",set:4,typ:"S"},{crd:"PRG",fct:"N",rty:"C",set:4,typ:"C"},{crd:"PRI",fct:"A",rty:"R",set:3,typ:"S"},{crd:"PHS",fct:"A",rty:"R",set:2.2,typ:"C"},{crd:"PTB",fct:"U",rty:"H",set:1,typ:"S"},{crd:"PSC",fct:"U",rty:"R",set:2,typ:"C"},{crd:"PSH",fct:"N",rty:"H",set:4,typ:"C"},{crd:"PTR",fct:"A",rty:"R",set:2,typ:"S"},{crd:"PSG",fct:"U",rty:"R",set:1,typ:"S"},{crd:"PMS",fct:"T",rty:"C",set:1,typ:"S"},{crd:"POX",fct:"N",rty:"H",set:4.2,typ:"C"},{crd:"PYG",fct:"T",rty:"H",set:1,typ:"C"},{crd:"PYS",fct:"T",rty:"C",set:1.1,typ:"S"},{crd:"RBH",fct:"T",rty:"L",set:1,typ:"C"},{crd:"ROK",fct:"T",rty:"L",set:3.1,typ:"S"},{crd:"RHY",fct:"U",rty:"C",set:3,typ:"C"},{crd:"RTS",fct:"T",rty:"C",set:2.2,typ:"C"},{crd:"RLW",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RHU",fct:"A",rty:"L",set:4.1,typ:"C"},{crd:"RFL",fct:"T",rty:"R",set:1,typ:"C"},{crd:"RHC",fct:"T",rty:"C",set:1,typ:"C"},{crd:"ROG",fct:"N",rty:"H",set:1,typ:"S"},{crd:"RWC",fct:"U",rty:"C",set:4,typ:"C"},{crd:"RFA",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RSE",fct:"T",rty:"H",set:4.1,typ:"C"},{crd:"RBG",fct:"U",rty:"H",set:2,typ:"C"},{crd:"RGG",fct:"U",rty:"H",set:1,typ:"C"},{crd:"RSZ",fct:"N",rty:"R",set:1.1,typ:"C"},{crd:"RSP",fct:"T",rty:"R",set:3,typ:"C"},{crd:"RHW",fct:"N",rty:"C",set:3,typ:"C"},{crd:"SBF",fct:"T",rty:"H",set:4,typ:"C"},{crd:"SAP",fct:"A",rty:"C",set:2,typ:"S"},{crd:"SVO",fct:"U",rty:"C",set:2.1,typ:"S"},{crd:"SSE",fct:"U",rty:"L",set:2.1,typ:"C"},{crd:"STS",fct:"U",rty:"C",set:3,typ:"S"},{crd:"SCS",fct:"N",rty:"C",set:1,typ:"C"},{crd:"SMD",fct:"T",rty:"L",set:1,typ:"C"},{crd:"SFS",fct:"N",rty:"L",set:1,typ:"C"},{crd:"SCD",fct:"A",rty:"H",set:1,typ:"C"},{crd:"SFT",fct:"A",rty:"H",set:1,typ:"C"},{crd:"SOC",fct:"N",rty:"L",set:4,typ:"S"},{crd:"SOA",fct:"A",rty:"C",set:3,typ:"S"},{crd:"SOD",fct:"U",rty:"C",set:3,typ:"S"},{crd:"SOK",fct:"T",rty:"C",set:3,typ:"S"},{crd:"SOT",fct:"N",rty:"C",set:3,typ:"S"},{crd:"SAD",fct:"T",rty:"H",set:1,typ:"C"},{crd:"SHG",fct:"N",rty:"L",set:2,typ:"S"},{crd:"SBI",fct:"U",rty:"C",set:3,typ:"C"},{crd:"SCC",fct:"U",rty:"C",set:4,typ:"C"},{crd:"SPD",fct:"U",rty:"R",set:1,typ:"C"},{crd:"SPM",fct:"U",rty:"L",set:1,typ:"C"},{crd:"STD",fct:"A",rty:"H",set:2.2,typ:"C"},{crd:"SHS",fct:"U",rty:"R",set:2.2,typ:"C"},{crd:"SGF",fct:"N",rty:"H",set:2.2,typ:"C"},{crd:"SKG",fct:"A",rty:"C",set:2,typ:"C"},{crd:"SSR",fct:"U",rty:"L",set:2,typ:"C"},{crd:"SNB",fct:"A",rty:"C",set:2.3,typ:"S"},{crd:"SNP",fct:"A",rty:"H",set:1,typ:"S"},{crd:"SRD",fct:"U",rty:"C",set:1,typ:"S"},{crd:"SSH",fct:"U",rty:"H",set:4,typ:"C"},{crd:"SRM",fct:"N",rty:"H",set:4,typ:"C"},{crd:"SRH",fct:"N",rty:"C",set:2.3,typ:"C"},{crd:"SDN",fct:"N",rty:"L",set:1,typ:"C"},{crd:"SHV",fct:"N",rty:"H",set:1,typ:"S"},{crd:"SRP",fct:"N",rty:"L",set:4,typ:"S"},{crd:"SGG",fct:"N",rty:"H",set:4,typ:"C"},{crd:"SBA",fct:"A",rty:"C",set:1,typ:"C"},{crd:"SKB",fct:"A",rty:"C",set:1,typ:"C"},{crd:"SBR",fct:"T",rty:"C",set:2,typ:"C"},{crd:"SKS",fct:"T",rty:"C",set:4,typ:"C"},{crd:"STM",fct:"T",rty:"R",set:4,typ:"C"},{crd:"SBD",fct:"U",rty:"C",set:2.1,typ:"C"},{crd:"SCV",fct:"N",rty:"R",set:3,typ:"S"},{crd:"SFM",fct:"T",rty:"H",set:1,typ:"C"},{crd:"SSN",fct:"A",rty:"C",set:2.2,typ:"C"},{crd:"SSM",fct:"T",rty:"C",set:2.2,typ:"C"},{crd:"SLH",fct:"N",rty:"C",set:2,typ:"S"},{crd:"SRV",fct:"N",rty:"R",set:2.2,typ:"C"},{crd:"SSI",fct:"A",rty:"R",set:4,typ:"C"},{crd:"SND",fct:"U",rty:"R",set:4,typ:"C"},{crd:"STR",fct:"N",rty:"R",set:2,typ:"S"},{crd:"SPH",fct:"N",rty:"H",set:4.1,typ:"C"},{crd:"SSA",fct:"N",rty:"H",set:2.1,typ:"C"},{crd:"STO",fct:"U",rty:"R",set:2,typ:"S"},{crd:"SDR",fct:"U",rty:"R",set:1,typ:"C"},{crd:"SOL",fct:"U",rty:"C",set:4,typ:"C"},{crd:"SOV",fct:"T",rty:"L",set:4,typ:"S"},{crd:"SHK",fct:"T",rty:"H",set:1,typ:"S"},{crd:"SWR",fct:"A",rty:"R",set:1,typ:"C"},{crd:"SER",fct:"A",rty:"C",set:4,typ:"C"},{crd:"SFA",fct:"A",rty:"H",set:1,typ:"C"},{crd:"STG",fct:"A",rty:"L",set:2,typ:"C"},{crd:"SSS",fct:"A",rty:"R",set:1,typ:"C"},{crd:"SSK",fct:"A",rty:"C",set:3,typ:"C"},{crd:"SWG",fct:"A",rty:"C",set:4,typ:"C"},{crd:"SWM",fct:"A",rty:"R",set:2,typ:"C"},{crd:"STN",fct:"T",rty:"R",set:2,typ:"S"},{crd:"SGI",fct:"T",rty:"C",set:1,typ:"C"},{crd:"SBG",fct:"T",rty:"L",set:1,typ:"C"},{crd:"SCL",fct:"T",rty:"C",set:1,typ:"C"},{crd:"SGA",fct:"T",rty:"H",set:1,typ:"C"},{crd:"STP",fct:"T",rty:"C",set:4,typ:"S"},{crd:"SSG",fct:"U",rty:"C",set:2,typ:"C"},{crd:"SVH",fct:"U",rty:"C",set:2.3,typ:"C"},{crd:"SIN",fct:"U",rty:"C",set:1.1,typ:"S"},{crd:"SYL",fct:"U",rty:"H",set:2.2,typ:"C"},{crd:"SEV",fct:"N",rty:"L",set:3.1,typ:"C"},{crd:"SML",fct:"U",rty:"C",set:1,typ:"C"},{crd:"SYO",fct:"A",rty:"L",set:1,typ:"C"},{crd:"TST",fct:"T",rty:"C",set:2,typ:"S"},{crd:"TBA",fct:"U",rty:"L",set:1,typ:"C"},{crd:"TGL",fct:"U",rty:"R",set:3,typ:"S"},{crd:"TGS",fct:"U",rty:"C",set:2,typ:"C"},{crd:"TPT",fct:"N",rty:"C",set:2.1,typ:"S"},{crd:"TDW",fct:"N",rty:"R",set:1.1,typ:"C"},{crd:"TNL",fct:"N",rty:"L",set:4.1,typ:"C"},{crd:"TEX",fct:"A",rty:"C",set:4,typ:"C"},{crd:"TGN",fct:"A",rty:"C",set:2,typ:"C"},{crd:"TSM",fct:"A",rty:"C",set:1,typ:"C"},{crd:"TUP",fct:"A",rty:"R",set:1,typ:"S"},{crd:"TAB",fct:"T",rty:"C",set:4,typ:"C"},{crd:"TGI",fct:"T",rty:"R",set:2,typ:"C"},{crd:"TDS",fct:"U",rty:"L",set:1.1,typ:"C"},{crd:"TSP",fct:"T",rty:"H",set:4.2,typ:"S"},{crd:"TPG",fct:"N",rty:"H",set:3.1,typ:"C"},{crd:"TMG",fct:"U",rty:"R",set:3,typ:"C"},{crd:"TBB",fct:"T",rty:"R",set:4,typ:"C"},{crd:"TOB",fct:"N",rty:"R",set:1,typ:"S"},{crd:"TWS",fct:"A",rty:"C",set:2,typ:"C"},{crd:"TVG",fct:"A",rty:"R",set:1.1,typ:"C"},{crd:"TXS",fct:"U",rty:"C",set:1,typ:"S"},{crd:"TCG",fct:"T",rty:"C",set:2.1,typ:"S"},{crd:"TWT",fct:"A",rty:"C",set:3,typ:"C"},{crd:"TRN",fct:"T",rty:"H",set:2,typ:"S"},{crd:"TGK",fct:"U",rty:"R",set:4,typ:"C"},{crd:"TSL",fct:"U",rty:"H",set:3,typ:"C"},{crd:"TWG",fct:"U",rty:"C",set:2,typ:"S"},{crd:"UGM",fct:"U",rty:"C",set:2.2,typ:"C"},{crd:"UGL",fct:"T",rty:"R",set:2,typ:"C"},{crd:"UIC",fct:"T",rty:"H",set:2.3,typ:"C"},{crd:"ULR",fct:"U",rty:"H",set:2,typ:"C"},{crd:"URD",fct:"N",rty:"H",set:1,typ:"C"},{crd:"UBL",fct:"T",rty:"R",set:1,typ:"S"},{crd:"UCM",fct:"T",rty:"R",set:1,typ:"C"},{crd:"UEM",fct:"T",rty:"C",set:4,typ:"C"},{crd:"UHS",fct:"T",rty:"H",set:2,typ:"C"},{crd:"UIM",fct:"T",rty:"C",set:2,typ:"C"},{crd:"UWL",fct:"T",rty:"H",set:2,typ:"C"},{crd:"UWS",fct:"T",rty:"R",set:2.3,typ:"C"},{crd:"UIW",fct:"A",rty:"L",set:4,typ:"C"},{crd:"UTM",fct:"U",rty:"C",set:2,typ:"C"},{crd:"UTR",fct:"U",rty:"H",set:2,typ:"C"},{crd:"URB",fct:"U",rty:"L",set:2.3,typ:"C"},{crd:"UPM",fct:"U",rty:"L",set:1,typ:"C"},{crd:"VRP",fct:"N",rty:"L",set:2,typ:"S"},{crd:"VBK",fct:"A",rty:"R",set:2,typ:"C"},{crd:"VTC",fct:"A",rty:"C",set:1,typ:"C"},{crd:"VTW",fct:"A",rty:"R",set:4,typ:"C"},{crd:"VGN",fct:"N",rty:"C",set:1,typ:"C"},{crd:"VND",fct:"U",rty:"R",set:4,typ:"C"},{crd:"VNF",fct:"U",rty:"R",set:1.1,typ:"C"},{crd:"VNS",fct:"U",rty:"H",set:2,typ:"C"},{crd:"VSK",fct:"U",rty:"C",set:4,typ:"S"},{crd:"VCH",fct:"U",rty:"H",set:4.1,typ:"S"},{crd:"VGR",fct:"U",rty:"C",set:2,typ:"S"},{crd:"VOB",fct:"T",rty:"R",set:4,typ:"S"},{crd:"VCG",fct:"T",rty:"C",set:1,typ:"C"},{crd:"VES",fct:"N",rty:"L",set:2.1,typ:"C"},{crd:"VYE",fct:"N",rty:"C",set:2,typ:"S"},{crd:"WBY",fct:"T",rty:"R",set:2,typ:"C"},{crd:"WBU",fct:"T",rty:"C",set:1.1,typ:"C"},{crd:"WMR",fct:"A",rty:"H",set:2.1,typ:"C"},{crd:"WTK",fct:"A",rty:"H",set:4,typ:"C"},{crd:"WMM",fct:"A",rty:"H",set:1,typ:"C"},{crd:"WTW",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WTA",fct:"U",rty:"L",set:4,typ:"C"},{crd:"WWP",fct:"U",rty:"H",set:1.1,typ:"C"},{crd:"WWR",fct:"U",rty:"C",set:3,typ:"C"},{crd:"WOD",fct:"U",rty:"R",set:4,typ:"S"},{crd:"WFM",fct:"T",rty:"H",set:1.1,typ:"C"},{crd:"WWS",fct:"U",rty:"R",set:1,typ:"C"},{crd:"WBH",fct:"T",rty:"R",set:1.1,typ:"C"},{crd:"WCS",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WPD",fct:"T",rty:"C",set:1,typ:"C"},{crd:"WFB",fct:"N",rty:"C",set:1.1,typ:"C"},{crd:"WFS",fct:"N",rty:"H",set:1,typ:"C"},{crd:"WBG",fct:"N",rty:"L",set:1.1,typ:"C"},{crd:"XCR",fct:"N",rty:"C",set:2,typ:"C"},{crd:"XDH",fct:"N",rty:"R",set:3,typ:"C"},{crd:"XHS",fct:"N",rty:"C",set:2.2,typ:"C"},{crd:"XHU",fct:"N",rty:"C",set:1,typ:"C"},{crd:"XRF",fct:"N",rty:"C",set:2,typ:"C"},{crd:"XSH",fct:"N",rty:"L",set:1,typ:"C"},{crd:"XDV",fct:"N",rty:"H",set:1,typ:"C"},{crd:"XRW",fct:"N",rty:"H",set:2,typ:"S"},{crd:"YWC",fct:"T",rty:"C",set:2,typ:"C"},{crd:"YNS",fct:"N",rty:"L",set:2.2,typ:"C"},{crd:"ZPM",fct:"T",rty:"R",set:1.1,typ:"C"},{crd:"ZTU",fct:"N",rty:"L",set:1,typ:"C"},{crd:"ZIN",fct:"N",rty:"C",set:1,typ:"C"},{crd:"ZMT",fct:"N",rty:"C",set:3,typ:"C"},{crd:"ZSH",fct:"T",rty:"L",set:1,typ:"C"}],Te=[["ASQ",["SLG","SLG"]],["CGL",["CGF"]],["DHC",["DYF"]],["DTD",["TOT"]],["FGD",["FGA","FGB","FGG"]],["IBA",["AVB"]],["IZK",["IFL","IFR"]],["RHU",["RSC"]],["SLS",["MMY"]],["TSL",["FUN"]],["WHR",["WHC"]]],c=(o,t)=>({card:o,num:t}),Ie={name:"Official",id:"SBE",decks:[{name:"Alloyin Starter",factions:["A"],cards:[c("SYO",1),c("BSS",1),c("SFT",2),c("SNP",2),c("TSM",2),c("SSS",2),c("ALG",2),c("MXW",3),c("TUP",3),c("FPS",3),c("MND",3),c("IWC",3),c("SKB",3)]},{name:"Nekrium Starter",factions:["N"],cards:[c("SFS",1),c("GGD",1),c("FFD",3),c("EPD",2),c("CCR",2),c("HGS",2),c("DSS",2),c("BWK",2),c("GBG",3),c("DSK",3),c("GRP",3),c("VGN",3),c("XHU",3)]},{name:"Tempys Starter",factions:["T"],cards:[c("FBC",1),c("RBH",1),c("CFB",3),c("FSM",2),c("FSH",2),c("FSS",2),c("PMS",2),c("RFL",2),c("UBL",3),c("WPD",3),c("SGI",3),c("AMY",3),c("WCS",3)]},{name:"Uterra Starter",factions:["U"],cards:[c("UPM",1),c("EHW",1),c("FRR",3),c("SPD",2),c("HTP",2),c("LSS",2),c("SDR",2),c("SRD",2),c("FWR",3),c("DBP",3),c("GHT",3),c("GSS",3),c("TXS",3)]},{name:"Cruel Corrosion",factions:["A","N"],cards:[c("IHA",1),c("WBG",1),c("OXP",1),c("DFR",1),c("APM",1),c("SNP",1),c("GRM",2),c("ETN",2),c("DHW",2),c("OXM",2),c("AEN",2),c("ATG",2),c("CTI",2),c("CTW",2),c("FPS",2),c("GRW",2),c("MTT",2),c("SAP",2)]},{name:"Death March",factions:["N","T"],cards:[c("ZTU",1),c("VRP",1),c("GGP",1),c("EPD",1),c("DBT",1),c("BSM",1),c("TDW",2),c("NGT",2),c("UBL",2),c("FWK",2),c("BZD",2),c("CSB",2),c("SLH",2),c("MMH",2),c("LSK",2),c("GBG",2),c("CFG",2),c("DSK",2)]},{name:"Dinosaurs!",factions:["T","U"],cards:[c("TDS",1),c("SSR",1),c("FRR",1),c("ULR",1),c("UTR",1),c("BTM",1),c("UGL",2),c("EHN",2),c("SPD",2),c("GHB",2),c("FLN",2),c("SML",2),c("RFL",2),c("OXS",2),c("UTM",2),c("TWG",2),c("ENR",2),c("DBP",2)]},{name:"Wyvern's Wrath",factions:["T","U"],cards:[c("CSW",1),c("SMD",1),c("FRR",1),c("UIC",1),c("CFB",1),c("UGL",2),c("FSH",2),c("FLN",2),c("WPD",1),c("TWG",2),c("TCG",2),c("TGS",2),c("SML",2),c("SVH",1),c("SCL",2),c("RTS",1),c("FWB",2),c("ENR",2),c("ABR",2)]},{name:"Ironmind Intuition",factions:["A","N"],cards:[c("IMA",1),c("GMP",1),c("OXA",1),c("EPD",1),c("OJC",1),c("ESU",2),c("OXM",2),c("MMA",2),c("SAP",1),c("AFO",2),c("GBG",2),c("CTW",2),c("SRH",1),c("TSM",2),c("SLH",1),c("MTT",1),c("DCR",1),c("DFB",1),c("BSR",1),c("LGT",1),c("XRF",2),c("MMX",1)]},{name:"Nethershriek Negation",factions:["N","T"],cards:[c("SBG",1),c("NSH",1),c("FFU",1),c("EWE",1),c("BFM",1),c("WBH",1),c("UWS",1),c("TGI",2),c("RFL",2),c("GRM",1),c("ASG",1),c("YWC",2),c("XRF",2),c("WPD",2),c("WCS",2),c("WBU",2),c("TCG",1),c("FSK",1),c("SLH",2),c("CFG",1),c("RTS",2)]},{name:"Ridgeback's Rage",factions:["A","U"],cards:[c("URB",1),c("AGK",1),c("ESP",1),c("FRR",1),c("NXT",1),c("ALG",1),c("FGB",1),c("PHS",2),c("TUP",1),c("EWT",2),c("PTR",1),c("VBK",1),c("AGC",1),c("AEN",2),c("ETN",1),c("FPS",2),c("MXW",2),c("GHT",1),c("TWG",2),c("SNB",1),c("SML",1),c("JPK",1),c("ENR",1),c("IWC",1)]},{name:"Spare Parts",factions:["N"],cards:[c("SEV",1),c("SHG",1),c("TPG",1),c("CGL",1),c("FRV",1),c("HFA",2),c("XDH",1),c("GRM",1),c("SCV",1),c("DFB",2),c("EBW",2),c("GBG",2),c("GLF",2),c("XHS",2),c("SOT",1),c("XRF",2),c("SCS",1),c("ZMT",1),c("SLH",1),c("VYE",1),c("XCR",2),c("XHU",1)]},{name:"Future Forged",factions:["A"],cards:[c("NXA",1),c("IMD",1),c("FOL",1),c("SFA",2),c("SFT",1),c("SCD",1),c("CAG",1),c("ESU",1),c("NNS",1),c("FPM",1),c("PRI",1),c("SSS",1),c("CTG",1),c("TSM",2),c("IWC",1),c("MMA",2),c("TGN",2),c("MTT",1),c("SKG",1),c("AFO",1),c("MMV",1),c("TWS",1),c("SBA",2),c("SSK",1),c("JPK",1)]},{name:"Burning Rage",factions:["T"],cards:[c("ROK",1),c("KKK",1),c("MOE",1),c("AFR",1),c("FBI",1),c("FSS",2),c("FLN",2),c("CCT",2),c("BRN",2),c("WPD",2),c("SSM",2),c("SOK",1),c("RTS",2),c("FSK",2),c("CWK",2),c("CFG",2),c("BSW",2),c("FMS",2)]},{name:"Awakened Fury",factions:["U"],cards:[c("DZD",1),c("SSE",1),c("BTR",1),c("TSL",1),c("MPH",1),c("CDT",1),c("DYB",1),c("BTH",2),c("TMG",2),c("BWD",2),c("RHY",2),c("SBD",2),c("GMR",2),c("STS",1),c("OSL",2),c("SBI",2),c("LYS",2),c("TGS",2),c("SOD",2)]}]},Ge={name:"Set 1 & 2 Tournies",id:"T1309",decks:[{name:"Axel: Lifegain",factions:["T","U"],cards:[c("AGD",3),c("EHW",3),c("FRR",3),c("FIN",1),c("UPM",1),c("LKP",2),c("BTM",2),c("LBL",3),c("GSS",3),c("RFA",3),c("GHB",3),c("EFP",3)]},{name:"Derk: Metaminds",factions:["A"],cards:[c("OJC",3),c("DMW",3),c("MMV",3),c("JPK",3),c("MMO",3),c("GMP",3),c("ALS",3),c("MMA",3),c("SFA",3),c("BTN",3)]},{name:"Foxhull: Grow Wide",factions:["U"],cards:[c("DBP",3),c("EHW",2),c("FRR",3),c("FWT",3),c("UPM",3),c("LKP",2),c("BTM",3),c("HTR",2),c("LBD",2),c("RFA",3),c("GHB",2),c("SDR",2)]},{name:"Hectares: Dino Attack",factions:["A","U"],cards:[c("ALS",3),c("TDS",3),c("FRR",3),c("WWP",3),c("SML",2),c("BSG",3),c("JPK",2),c("ODC",3),c("NXT",2),c("WMM",3),c("GHB",3)]},{name:"Klaven: Mono-N",factions:["N"],cards:[c("SCS",3),c("ROG",1),c("GGP",1),c("GGD",3),c("WFS",1),c("DSS",3),c("ZTU",1),c("GBG",3),c("HFA",3),c("EXD",1),c("EPD",1),c("BSR",1),c("MRF",2),c("HGS",3),c("GTH",3)]},{name:"Phoenyx: Free Spell Dmg",factions:["T","U"],cards:[c("SHK",3),c("MOE",3),c("FRR",3),c("LSK",3),c("FFU",3),c("UBL",3),c("WWS",3),c("FSS",3),c("ENR",3),c("MMH",3)]},{name:"Technogeek5000: Grow Wide",factions:["N","U"],cards:[c("DBP",2),c("EHW",2),c("FRR",3),c("HTP",2),c("UPM",3),c("LKP",2),c("GHT",3),c("GGP",2),c("LBD",1),c("EPD",2),c("DBT",2),c("SPD",3),c("SDR",3)]},{name:"Thematik: Level Up",factions:["A","T"],cards:[c("IWC",3),c("FSS",3),c("ETN",1),c("WPD",2),c("FSM",1),c("AHL",1),c("UBL",3),c("SMD",2),c("BTN",3),c("LSK",1),c("MMH",3),c("FFU",1),c("TSM",3),c("ALG",3)]},{name:"TinyGrimes: NT Shapers",factions:["N","T"],cards:[c("DSS",3),c("FSS",3),c("EPD",2),c("GTH",3),c("FSM",1),c("MOE",1),c("UBL",3),c("GGP",3),c("GBG",1),c("LSK",3),c("HGS",1),c("CTW",1),c("SHK",3),c("GGD",1),c("DBT",1)]}]},$e={name:"The Forge",id:"TG10",decks:[{name:"DarkSoulSP: Grim Debuff",factions:["N","U"],cards:[c("BWK",3),c("TDS",2),c("FRR",3),c("WWP",3),c("GGP",3),c("GGD",3),c("DBT",1),c("WFS",3),c("CTW",3),c("EPD",3),c("GHB",3)]},{name:"ErrorAsh: Burn",factions:["N","T"],cards:[c("UBL",2),c("EFM",2),c("FBI",3),c("ESK",3),c("FLN",3),c("EFP",3),c("MOE",3),c("FSS",3),c("SHK",3),c("EPD",3),c("CHV",2)]},{name:"ErrorAsh: Farmer Tarsus",factions:["N","U"],cards:[c("WWS",3),c("DYB",3),c("FRR",3),c("SYL",3),c("EPD",3),c("SSE",2),c("NSH",2),c("TDW",3),c("NFF",2),c("CHR",2),c("LKP",2),c("EXD",2)]},{name:"ErrorAsh: Necro Mobiltiy",factions:["N","T"],cards:[c("NSH",2),c("SMD",2),c("DDD",3),c("TDW",3),c("VRP",3),c("WCS",3),c("BSM",3),c("SHG",2),c("TGI",2),c("EPD",3),c("FVA",2),c("DBT",1),c("TRN",1)]},{name:"Hans: Yetis",factions:["T","U"],cards:[c("UWL",3),c("FFU",3),c("WBY",3),c("UIM",3),c("WBU",3),c("SSR",1),c("TRN",1),c("GTT",1),c("GCR",3),c("FRR",3),c("UBL",3),c("WWP",3)]},{name:"MingisTheKing: Mobility",factions:["N","T"],cards:[c("DDD",3),c("DBT",3),c("EPD",3),c("EFP",3),c("GGP",3),c("LSK",3),c("SHK",3),c("UBL",3),c("WCS",3),c("ZTU",3)]},{name:"Noetherian: Shambler",factions:["N","U"],cards:[c("XSH",3),c("SPM",3),c("FRR",3),c("ODC",3),c("SSE",3),c("ESK",3),c("TGS",3),c("XRF",3),c("VRP",3),c("URB",3)]},{name:"Noetherian: Tempo",factions:["T","U"],cards:[c("RBH",3),c("TDS",3),c("FRR",3),c("WWP",3),c("EFP",3),c("AMY",2),c("FVA",2),c("ENR",3),c("ZSH",3),c("EHW",3),c("GHB",2)]},{name:"Piquadore: Zombies",factions:["N","T"],cards:[c("BWK",2),c("KOD",2),c("CYC",3),c("GRM",3),c("VYE",3),c("XRW",3),c("MOE",2),c("ZTU",3),c("BSM",3),c("EPD",3),c("DSS",3)]},{name:"Stautmeister: Yeti Mobility",factions:["T","U"],cards:[c("AGM",3),c("TDS",2),c("FRR",3),c("WWP",3),c("CSW",3),c("FLN",3),c("EFP",2),c("UWL",3),c("WBY",2),c("WCS",2),c("EHW",2),c("SHS",2)]},{name:"Technonaut: Steelscale",factions:["A","T"],cards:[c("UHS",2),c("FLN",3),c("STG",3),c("CRC",3),c("SHK",3),c("EFP",2),c("WMR",2),c("WMM",3),c("JPK",3),c("SMD",3),c("FVA",3)]},{name:"Technonaut: Woebringer",factions:["N","T"],cards:[c("LSK",2),c("WBG",3),c("EPD",3),c("DDD",3),c("SHK",3),c("EFP",3),c("ZTU",2),c("GGD",2),c("GGP",3),c("CTW",3),c("DBT",3)]},{name:"Zrandles: Metaminds",factions:["A","N"],cards:[c("DMW",3),c("GMP",3),c("MMA",3),c("MMV",2),c("TDW",3),c("VRP",3),c("EPD",3),c("SHG",2),c("OJC",2),c("ESK",2),c("CHV",2),c("CTW",2)]},{name:"Zrandles: Tempo",factions:["N","T"],cards:[c("CTW",1),c("GCR",1),c("CFG",1),c("FZS",1),c("FBI",3),c("MOE",3),c("EFP",3),c("LSK",3),c("FLN",3),c("SHK",3),c("RTS",3),c("GGP",3),c("UBL",2)]}]},Ve={name:"Set 1 Fundecks",id:"FUN1",decks:[{name:"Frankenbomb",factions:["N"],cards:[c("DFB",3),c("BSR",3),c("HGS",3),c("HFA",3),c("FFD",3),c("XSH",3),c("XHU",3),c("WBG",3),c("GBG",3),c("CTI",3)]},{name:"Hangry Beasts",factions:["T","U"],cards:[c("TBA",3),c("SVH",3),c("MBP",2),c("FSH",3),c("RBH",3),c("FBC",3),c("LBR",2),c("CFB",3),c("AAK",3),c("KKK",2),c("FRR",1),c("FIN",1),c("IBF",1)]},{name:"Metamind Zapper",factions:["A","T"],cards:[c("MMA",3),c("DMW",3),c("GMP",3),c("SYO",3),c("KAW",3),c("SHK",3),c("CTL",2),c("CAG",2),c("MSC",2),c("MTS",2),c("ASG",2),c("ESU",2)]},{name:"Plant Party",factions:["N","U"],cards:[c("CTV",3),c("TDW",3),c("BTS",3),c("CHR",3),c("GMR",3),c("KOD",2),c("LKP",2),c("SHV",2),c("DBA",2),c("CCR",2),c("PTB",2),c("FIN",1),c("DBT",2)]},{name:"Voltron",factions:["A"],cards:[c("FGA",3),c("FGB",3),c("FGD",3),c("FGG",3),c("AFS",3),c("BSS",3),c("PRI",3),c("TUP",2),c("JPK",2),c("BWH",2),c("SFT",3)]},{name:"Do Fear The Reaper",factions:["A","N"],cards:[c("CTI",3),c("DFR",3),c("GRW",3),c("LGT",3),c("OXM",3),c("OXP",3),c("PHM",3),c("CTW",2),c("NNS",2),c("OXA",2),c("SDN",3)]},{name:"Muadib",factions:["N","U"],cards:[c("DBA",3),c("DYL",3),c("GSW",3),c("LBD",3),c("MMW",3),c("NCW",3),c("SRV",3),c("LBL",2),c("MSP",2),c("VYE",2),c("SBD",3)]},{name:"Triassic Park",factions:["T","U"],cards:[c("URB",3),c("UTR",3),c("UTM",3),c("ULR",3),c("UIC",3),c("UGL",3),c("RTS",3),c("BRN",2),c("LBR",2),c("IBF",2),c("GHB",3)]},{name:"Whacky Whinds",factions:["N","T"],cards:[c("DDD",3),c("WBH",3),c("HMF",3),c("WCS",3),c("GGP",3),c("SAD",3),c("SDN",3),c("EWE",3),c("SBG",3),c("ZSH",3)]},{name:"WWP 4 Victory",factions:["A","U"],cards:[c("WWP",3),c("EHN",2),c("SDR",2),c("HTR",2),c("MML",2),c("HTP",2),c("SHS",3),c("MND",2),c("NXC",2),c("CDT",2),c("PTB",2),c("SVO",2),c("MPH",2),c("SYO",2)]},{name:"Braaiins",factions:["N"],cards:[c("XDV",3),c("XRW",3),c("ONN",2),c("SLH",2),c("FWK",2),c("BWK",2),c("URD",2),c("TPG",2),c("DSS",2),c("KOD",2),c("ZMT",2),c("RSZ",2),c("BLW",2),c("CSB",2)]},{name:"Wanderin",factions:["N","U"],cards:[c("LYS",3),c("STR",2),c("MBP",2),c("OSL",2),c("RLW",3),c("SSR",1),c("SVO",2),c("SSE",2),c("RHW",3),c("SYL",2),c("TGS",2),c("TMG",3),c("XDH",3)]},{name:"Walls",factions:["A","T"],cards:[c("CDC",3),c("CTG",3),c("CRC",3),c("DCS",3),c("FRI",3),c("FGA",2),c("OBB",3),c("FVA",2),c("TGN",2),c("OWH",3),c("STN",3)]},{name:"Snakes In A Lane",factions:["A","U"],cards:[c("AFO",3),c("DSV",3),c("PSC",3),c("SHS",3),c("STO",3),c("NCL",2),c("VNF",3),c("LYS",2),c("SVO",1),c("VNS",3),c("TXS",2),c("ART",2)]},{name:"Benny & Izzy",factions:["A","T"],cards:[c("BRN",3),c("EFM",2),c("IZK",3),c("JPK",1),c("MTT",1),c("NNS",1),c("OBB",2),c("OWF",2),c("OEX",3),c("PRI",2),c("PTR",1),c("TST",1),c("FLS",2),c("BLH",3),c("SHK",3)]}]},Zt=[Ie,Ge,$e,Ve];class Oe{state;constructor(t){this.state=t}get adjacent(){return a.field.adjacentPositions(this.lane)}get attack(){return this.state.attack+this.modSum("AT")}get activationAvailable(){return this.state.negateActivate?!1:this.state.activationAvailable}set activationAvailable(t){this.state.activationAvailable=t}get aggressive(){return this.state.aggressive||this.modBool("AG")}set aggressive(t){this.state.aggressive=t}get armor(){return this.negateArmor?0:this.state.armor+this.modSum("AR")}get armorDmg(){return this.state.armorDmg}set armorDmg(t){this.state.armorDmg=t}get bonus(){return this.state.bonus}set bonus(t){this.state.bonus=t}get breakthrough(){return this.state.breakthrough||this.modBool("BT")}set breakthrough(t){this.state.breakthrough=t}get changed(){return this.state.changed||this.negateDefender||this.negateArmor||this.negateActivate||this.negateMobility||this.negateRegen||this.state.triggers.some(t=>t.changes)}set changed(t){this.state.changed=t}get code(){return this.state.code}get defender(){return this.negateDefender?!1:this.state.defender||this.modBool("DF")}set defender(t){this.negateDefender||(this.state.defender=t,this.enforceEffects("DF"))}get effects(){return this.state.effects}get extraBattles(){return this.state.extraBattles}set extraBattles(t){this.state.extraBattles=t}get faction(){return a.cards.getCard(this.code).faction}get health(){return this.state.health+this.modSum("HL")}get id(){return this.state.id}get isActive(){return!this.sleeping||this.aggressive}isTribe(t){return a.cards.getCard(this.code).isTribe(t)}get lane(){return this.state.lane}get level(){return a.cards.getCard(this.code).level}get maxHealth(){return this.state.maxHealth+this.modSum("MH")}get mobility(){return this.negateMobility?0:this.state.mobility+this.modSum("MB")}get mobilityAvailable(){return this.state.mobilityAvailable}set mobilityAvailable(t){this.state.mobilityAvailable=t}get mods(){return this.state.mods}get negateActivate(){return this.state.negateActivate}set negateActivate(t){this.state.negateActivate=t}get negateArmor(){return this.state.negateArmor||this.modBool("NA")}set negateArmor(t){this.state.negateArmor=t,this.enforceEffects("AR")}get negateDefender(){return this.state.negateDefender||this.modBool("ND")}set negateDefender(t){this.state.negateDefender=t,this.enforceEffects("DF")}get negateMobility(){return this.state.negateMobility||this.modBool("NM")}set negateMobility(t){this.state.negateMobility=t}get negateRegen(){return this.state.negateRegen||this.modBool("NM")}set negateRegen(t){this.state.negateRegen=t}get opposed(){const t=d.crTarg();return t.player=a.player.toTarget(!this.owner),t.lanes=a.field.oppositeLane(this.lane),a.field.creatByTarget(t)[0]}get owner(){return this.state.owner}get poison(){return this.state.poison+this.modSum("PN")}get rank(){return a.player.toPlayer(this.owner).rank}get regen(){return this.negateRegen?0:this.state.regen+this.modSum("RG")}get sleeping(){return this.state.sleeping}set sleeping(t){this.state.sleeping=t}get status(){return this.state.status}set status(t){this.state.status=t}get triggers(){return this.state.triggers}buff(t,i,e=void 0){t!==0&&(this.state.attack+=t,this.enforceEffects("AT")),i!==0&&(this.state.health+=i,this.state.maxHealth+=i,this.enforceEffects("CH"),a.death.deathProdder(this,e))}addArmor(t){if(!this.negateArmor){const i=this.state.armor+t;this.state.armor=Math.max(0,i),this.enforceEffects("AR")}}addMobility(t){if(!this.negateMobility){const i=this.state.mobility+t;this.state.mobility=Math.max(0,i)}}addPoison(t){const i=this.state.poison+t;this.state.poison=Math.max(0,i)}addRegen(t){if(!this.negateRegen){const i=this.state.regen+t;this.state.regen=Math.max(0,i)}}heal(t){if(t===0)return 0;const i=Math.min(this.health+t,this.maxHealth)-this.health;return this.state.health+=i,i}setHealth(t){this.state.health=t}hurt(t,i=!1){if(t<1)return[0,0];const e=Math.max(Math.min(t,this.armor-this.armorDmg),0);let s=t-e,l=this.health-s;this.state.armorDmg+=e;let u=0;return i&&l<0&&(u=s-this.health,s=this.health),s>0&&(this.state.health-=s),[s,u]}hurtBattle(t,i,e=!1){const s=this.hurt(t,e);return s[0]>0&&a.batch.addEvents(d.damageEvent(!0,s[0],!0,!0,this,i)),s[1]}hurtDirect(t,i,e=void 0){const s=this.hurt(t,!1);return s[0]>0&&(a.log.new().crd(i).txt(` dealt ${t} dmg to `).crd(this.code).txt(".").go(),a.batch.addEvents(d.damageEvent(!1,s[0],!1,!0,this,void 0)),a.death.deathProdder(this,e)),s[0]}modIdx(t){return this.mods.findIndex(i=>i.granter===t)}modEffectPropagator(t){t.type==="AT"?this.enforceEffects("AT"):t.type==="HL"?(this.enforceEffects("CH"),a.death.deathProdder(this)):t.type==="AR"||t.type==="NA"?this.enforceEffects("AR"):(t.type==="DF"||t.type==="ND")&&this.enforceEffects("DF")}modSum(t){return this.mods.filter(i=>i.type===t).map(i=>i.value).reduce((i,e)=>i+e,0)}modBool(t){return this.mods.some(i=>i.type===t&&i.value===1)}hasMod(t){return this.modIdx(t)>-1}addMod(t){this.mods.push(t),this.modEffectPropagator(t)}addModSafe(t){this.mods.findIndex(e=>e.granter===t.granter&&e.type===t.type)===-1&&this.addMod(t)}removeMod(t){const i=this.state.mods.filter(e=>e.granter===t);this.state.mods=this.state.mods.filter(e=>e.granter!==t),i.forEach(e=>this.modEffectPropagator(e))}removeModSafe(t){this.hasMod(t)&&this.removeMod(t)}expireMod(t){this.state.mods.splice(this.state.mods.indexOf(t),1)}endActivation(){this.state.activationAvailable=!1,a.death.deathCheck(),a.action.actionDone()}move(t){this.state.lane=t,a.effect.positionChange(this.owner),a.batch.addEvents(d.creatureEvent("MOV",this))}addEffect(t,i){const e=d.effect(t,i);return this.effects.push(e),e}enforceEffects(t,i=!1){this.effects.filter(e=>e.watch===t).filter(e=>e.area==="A"||e.area==="C"&&this.owner===i).forEach(e=>a.cards.getCard(e.logicCode).enforceEffect(e,this))}jr4(t,i){const e=d.trigger(t,i);return e.cardCode=this.code,e.creatId=this.id,this.triggers.push(e),e}removeTrigger(t){const i=this.triggers.indexOf(t);i>-1?this.triggers.splice(i,1):console.error("Wery curious, could not find trigger to remove",t)}wipeAll(){this.state.mods=[],this.state.triggers=[],this.state.effects=[],this.state.hints=[],this.state.armor=0,this.state.mobility=0,this.state.poison=0,this.state.regen=0,this.state.aggressive=!1,this.state.defender=!1,this.state.breakthrough=!1,this.state.defender=!1,this.state.negateDefender=!1,this.state.negateArmor=!1,this.state.bonus=0,this.state.changed=!0,this.state.negateActivate=!0,a.field.creatByTarget(d.crTarg()).forEach(t=>{t.removeMod(this.id),t.enforceEffects("PS",this.owner)}),this.enforceEffects("AT"),this.enforceEffects("AR"),this.enforceEffects("CH"),a.effect.defenderChange(this.owner)}get hints(){return this.state.hints}aiHints(){return this.hints}}var L=(o=>(o[o.Never=-999]="Never",o[o.Horrid=-2]="Horrid",o[o.Bad=-1]="Bad",o[o.Noice=1]="Noice",o[o.Grand=2]="Grand",o))(L||{});const Rt=10218;class Ue{modeStack=["M"];clickMode="M";pxRatio=1;options={bark:!0,bigCards:!0,highHealth:!1,cheater:!1,legDraft:!1,fatPacks:!1,playerDeck:[],wasDrafting:!1,wasRandCards:!1,scale:"100"};playerA=d.player(!0);playerB=d.player(!1);activePlayer=!0;isLocalA=!0;aiMode=!1;aiActive=!1;firstTurn=!0;winFlag=0;field=[];phase="ST";batch={type:"N0",events:[],triggerActions:[],deathCheck:!0,iatLane:0};turn=d.freshTurn();ui=d.freshUI();deathOrder=[];birthOrder=[];graveyard=[];newGame(t,i){a.resetIds(),this.aiMode=!0,a.fight.barking=a.state.gs.options.bark,this.activePlayer=a.randInt(0,2)===0,this.aiActive=!this.activePlayer,this.playerA.name="Forgy McGhee",this.playerA.nameOffset=25;const e=a.player.nameOSaurus();this.playerB.name=e[0],this.playerB.nameOffset=e[1],a.log.setup(),a.action.actionHistory=[],this.graveyard=[],this.field=[],this.deathOrder=[],this.birthOrder=[],this.ui=d.freshUI(),this.firstTurn=!0,this.winFlag=0,a.player.initPlayer(this.playerA,t),a.player.initPlayer(this.playerB,i),a.log.add("Ready...FIGHT!"),a.phase.startTurn()}}class d{static creatureState(t,i){return{activationAvailable:!0,aggressive:!1,armor:0,armorDmg:0,attack:0,bonus:0,breakthrough:!1,changed:!1,code:"",defender:!1,effects:[],extraBattles:0,health:0,hints:[],id:"",lane:i,maxHealth:0,mobility:0,mobilityAvailable:!0,mods:[],negateActivate:!1,negateArmor:!1,negateDefender:!1,negateMobility:!1,negateRegen:!1,owner:t,poison:0,regen:0,sleeping:!0,status:"A",triggers:[]}}static effect(t,i){return{area:"A",watch:t,logicCode:i}}static freeCard(t){return{id:a.genId(),condition:d.target("TH"),sourceCard:t}}static mod(t,i,e=""){return{type:t,value:typeof i=="boolean"?i?1:0:i,granter:e,expiry:"NN"}}static player(t){return{hand:[],deck:[],discard:[],isPlayerA:t,health:120,name:"",nameOffset:0,triggers:[],turn:1,rank:1,avatar:Math.floor(Math.random()*17)}}static trigger(t,i){return{type:t,logicCode:i,cardCode:"",creatId:"",customCode:"",interactive:!1,changes:!1}}static triggerReaction(t,i,e,s){return{event:t,ownerPlayerA:e,creatId:"",cardCode:"",trigger:i,host:s}}static freshTurn(){return{mainBattle:!1,creaturesKilled:0,friendlyFightStarters:0,regularPlays:2,cardsPlayed:0,freeCards:[]}}static freshUI(){return{handScrollLeft:0,detailStack:[],deckContents:[],deckScroll:0,deckSummary:!1,animating:!1}}static basicAction(t){return{zone:"N",actionKey:t,hostCard:"",param:""}}static fieldSelectAction(t,i=-1,e=!0){return{zone:"F",actionKey:t,playerA:e,lane:i,hostCard:"",param:""}}static deckSelectAction(t,i,e){return{zone:"N",actionKey:t,card:i,position:e,hostCard:"",param:""}}static handSelectAction(t,i="",e="",s=-1){return{zone:"H",actionKey:t,card:i,cost:e,position:s,hostCard:"",param:""}}static playerSelectAction(t,i){return{zone:"P",actionKey:t,playerA:i,hostCard:"",param:""}}static draftSelectAction(t,i,e){return{zone:"N",actionKey:t,index:i,pack:e,hostCard:"",param:""}}static ddf4(){return{zone:"N",actionKey:"ACTV",hostCard:"",param:""}}static menuButtonAction(t){return{zone:"N",actionKey:"MNBT",hostCard:"",param:t}}static creatureEvent(t,i){return{code:t,creature:i}}static enterFieldEvent(t){return{code:"ENT",creature:t,forged:!1}}static replacedEvent(t,i){return{code:"RPL",creature:t,replacedCreat:i}}static playCardEvent(t,i){const e=d.playerEvent("PLC",i);return e.cardCode=t,e}static playerEvent(t,i){return{code:t,playerA:i}}static playerHealEvent(t,i,e){return{code:t,playerA:i,healAmt:e}}static damageEvent(t,i,e,s,l,u){return{code:"DMG",battle:t,dmg:i,creatureSrc:e,creatureTarg:s,target:l,source:u}}static actionifier(t,i,e,s){const l=t;return l.actionKey=i,l.hostCard=e,l.param=s,l}static target(t){return{target:t,level:"LA",canLevel:!1,faction:"X",player:"X",card:"A",field:"A",creatStatus:"A",tribe:"AN",notMe:"",hasArmor:!1,canArmor:!1,hasDefender:!1,canDefender:!1,hasMobility:!1,canMove:!1,hasPoison:!1,hasRegen:!1,canRegen:!1,cardCode:"",victims:""}}static actionTarget(t,i,e,s){return d.actionifier(d.target(t),i,e,s)}static crTarg(){const t=d.target("TF");return t.field="O",t.creatStatus="V",t}static crActTarg(t,i,e){return d.actionifier(d.crTarg(),t,i,e)}static crNotMeTarg(t){const i=d.target("TF");return i.field="O",i.creatStatus="V",i.notMe=t,i}static crNotMeActTarg(t,i,e,s){return d.actionifier(d.crNotMeTarg(i),t,e,s)}static crFriendTarg(){const t=d.crTarg();return t.player="F",t}static crFriendActTarg(t,i,e){return d.actionifier(d.crFriendTarg(),t,i,e)}static crFriendNotMeTarg(t){const i=d.crNotMeTarg(t);return i.player="F",i}static crFriendNotMeActTarg(t,i,e,s){return d.actionifier(d.crFriendNotMeTarg(i),t,e,s)}static crEnemyTarg(){const t=d.crTarg();return t.player="E",t}static crEnemyActTarg(t,i,e){return d.actionifier(d.crEnemyTarg(),t,i,e)}static playerTarg(t){const i=d.target("TP");return i.player=a.player.toTarget(t),i}static playerActTarg(t,i,e,s){return d.actionifier(d.playerTarg(t),i,e,s)}static lvlHandActTarg(t,i){const e=this.actionTarget("TH","CARD",t,i);return e.player="F",e.canLevel=!0,e}static emptyTarg(){const t=d.target("TF");return t.field="E",t}static emptyActTarg(t,i,e){return d.actionifier(d.emptyTarg(),t,i,e)}static emptyPlayerTarg(t){const i=d.emptyTarg();return i.player=a.player.toTarget(t),i}static emptyPlayerActTarg(t,i,e,s){return d.actionifier(d.emptyPlayerTarg(t),i,e,s)}static underHint(t){return t===1?"UL1":t===2?"UL2":"UL3"}static alliedHint(t){if(t==="A")return "ALA";if(t==="N")return "ALN";if(t==="T")return "ALT";if(t==="U")return "ALU";throw new Error("non faction passed to allied hint")}static actionEval(t,i,e){const s=e??[];return{type:i,hints:Array.isArray(s)?s:[s],vectors:[],action:t,final:!0,bonus:0}}static ddp5(t){const i=d.actionEval(t,"PS");return i.final=!1,i}static ddp7(t,i,e,s){const l=d.actionEval(t,"ST",s),u=d.ddp1(i,e);return u.destroy=!0,l.vectors=[u],l}static ddp8(t,i,e){return d.ddp7(t,i.owner,i.lane,e)}static ddp2(t,i,e,s={},l){const u=d.actionEval(t,"ST",l);return u.vectors=[d.ddp1(i,e,s)],u}static ddp3(t,i,e={},s){return d.ddp2(t,i.owner,i.lane,e,s)}static actionEvalBuffN(t,i,e,s=0,l=0,u){return d.ddp2(t,i,e,{att:s,hlt:l},u)}static actionEvalBuffC(t,i,e=0,s=0,l){return d.ddp3(t,i,{att:e,hlt:s},l)}static ddp4(t,i,e,s,l=!1){const u=d.actionEval(t,"PC"),p=a.cards.getCard(s);u.hints=p.aiHints();const y=d.evalVectorCreatureFromClass(p,i,e);return y.type="R",u.vectors.push(y),l&&(u.bonus=p.bonusPlay()),u}static evalVectorEmpty(t,i){return{shape:"B",type:"E",playerA:t,lane:i,destroy:!1,dirDmg:0,moveTo:0,health:0,attack:0,aggressive:!1,armor:0,armorDmg:0,breakthrough:!1,defender:!1,negateDefender:!1,poison:0,regen:0,sleeping:!1,bonus:0}}static evalVectorCreatureFromCode(t,i,e){const s=a.cards.getCard(t);return d.evalVectorCreatureFromClass(s,i,e)}static evalVectorCreatureFromClass(t,i,e){const s=t.jr3(i,e);return d.evalVectorCreature(s)}static evalVectorCreature(t){return{shape:"B",type:"C",playerA:t.owner,lane:t.lane,destroy:!1,dirDmg:0,moveTo:0,health:t.health,attack:t.attack,aggressive:t.aggressive,armor:t.armor,armorDmg:t.armorDmg,breakthrough:t.breakthrough,defender:t.defender,negateDefender:t.negateDefender,poison:t.poison,regen:t.regen,sleeping:t.sleeping,bonus:t.bonus}}static evalVectorPlayerLife(t,i){const e=d.evalVectorEmpty(t,0);return e.shape="P",e.type="M",e.health=i,e}static evalVectorPlayerDmg(t,i){const e=d.evalVectorEmpty(t,0);return e.shape="P",e.type="M",e.dirDmg=i,e}static evalVectorPlayer(t){const i=d.evalVectorEmpty(t,0);return i.shape="P",i.type="P",i}static ddp1(t,i,e){const s=d.evalVectorEmpty(t,i);return s.type="M",e&&(s.attack=e.att??0,s.health=e.hlt??0,s.armor=e.arm??0,s.regen=e.rgn??0,s.poison=e.psn??0,s.dirDmg=e.dmg??0,s.defender=e.def??!1,s.breakthrough=e.brt??!1,s.aggressive=e.agr??!1,s.negateDefender=e.noD??!1),s}}class ut{constructor(t){this.code=t,this.level=parseInt(t.substring(3))}code;consistent=!1;faction="X";cardCode(){return ut.extractCardCode(this.code)}image(t){return this.type==="S"?this.fixedImage(t):this.leveledImage(t)}leveledImage(t){return this.rawImage(this.code,t)}fixedImage(t){return this.rawImage(this.cardCode(),t)}rawImage(t,i){return`card/${i?"b":"s"}/${this.faction}/${t}.jpg`}isFree=!1;level;maxLevel=3;minLevel=1;name="";overload=!1;rarity="T";text="";get type(){return "C"}hints;aiHints(){return this.hints??[]}bonus;bonusPlay(){return this?.bonus?.play??0}bonusExist(){return this?.bonus?.exist??0}canLevel(){return this.level{l+=s[p]*e[0][p],u+=s[p]*e[1][p]}),[l,u]}static extractCardCode(t){return t.substring(0,3)}get boof123n(){return this.level*-1}get boof124(){return this.lValN([1,2,4])}get boof135(){return this.lValN([1,3,5])}get boof137(){return this.lValN([1,3,7])}get boof147(){return this.lValN([1,4,7])}get boof234(){return this.level+1}get boof235(){return this.lValN([2,3,5])}get boof236(){return this.lValN([2,3,6])}get boof246(){return this.level*2}get boof246n(){return this.level*-2}get boof247(){return this.lValN([2,4,7])}get boof247n(){return this.lValN([-2,-4,-7])}get boof248(){return this.lValN([2,4,8])}get boof258(){return this.lValN([2,5,8])}get boof2510(){return this.lValN([2,5,10])}get boof2612(){return this.lValN([2,6,12])}get boof357(){return this.lValN([3,5,7])}get boof358(){return this.lValN([3,5,8])}get boof359(){return this.lValN([3,5,9])}get boof3510(){return this.lValN([3,5,10])}get boof3612(){return this.lValN([3,6,12])}get boof369(){return this.level*3}get boof369n(){return this.level*-3}get boof3610(){return this.lValN([3,6,10])}get boof3711(){return this.lValN([3,7,11])}get boof3712(){return this.lValN([3,7,12])}get boof3713(){return this.lValN([3,7,13])}get boof3714(){return this.lValN([3,7,14])}get boof3814(){return this.lValN([3,8,14])}get boof468(){return this.lValN([4,6,8])}get boof469(){return this.lValN([4,6,9])}get boof4610(){return this.lValN([4,6,10])}get boof4612(){return this.lValN([4,6,12])}get boof4710(){return this.lValN([4,7,10])}get boof4711(){return this.lValN([4,7,11])}get boof4712(){return this.lValN([4,7,12])}get boof4713(){return this.lValN([4,7,13])}get boof4714(){return this.lValN([4,7,14])}get boof4812(){return this.level*4}get boof4812n(){return this.level*-4}get boof4813(){return this.lValN([4,8,13])}get boof4814(){return this.lValN([4,8,14])}get boof4815(){return this.lValN([4,8,15])}get boof4816(){return this.lValN([4,8,16])}get boof4914(){return this.lValN([4,9,14])}get boof4915(){return this.lValN([4,9,15])}get boof579(){return this.lValN([5,7,9])}get boof5711(){return this.lValN([5,7,11])}get boof5714(){return this.lValN([5,7,14])}get boof5812(){return this.lValN([5,8,12])}get boof5813(){return this.lValN([5,8,13])}get boof5814(){return this.lValN([5,8,14])}get boof5815(){return this.lValN([5,8,15])}get boof5914(){return this.lValN([5,9,14])}get boof5915(){return this.lValN([5,9,15])}get boof5916(){return this.lValN([5,9,16])}get boof5917(){return this.lValN([5,9,17])}get boof51014(){return this.lValN([5,10,14])}get boof51015(){return this.level*5}get boof51020(){return this.lValN([5,10,20])}get boof6812(){return this.lValN([6,8,12])}get boof6814(){return this.lValN([6,8,14])}get boof6912(){return this.lValN([6,9,12])}get boof6914(){return this.lValN([6,9,14])}get boof6915(){return this.lValN([6,9,15])}get boof6916(){return this.lValN([6,9,16])}get boof61014(){return this.lValN([6,10,14])}get boof61015(){return this.lValN([6,10,15])}get boof61016(){return this.lValN([6,10,16])}get boof61017(){return this.lValN([6,10,17])}get boof61018(){return this.lValN([6,10,18])}get boof61117(){return this.lValN([6,11,17])}get boof61218(){return this.lValN([6,12,18])}get boof61224(){return this.lValN([6,12,24])}get boof7911(){return this.lValN([7,9,11])}get boof7914(){return this.lValN([7,9,14])}get boof71013(){return this.lValN([7,10,13])}get boof71014(){return this.lValN([7,10,14])}get boof71015(){return this.lValN([7,10,15])}get boof71116(){return this.lValN([7,11,16])}get boof71117(){return this.lValN([7,11,17])}get boof71118(){return this.lValN([7,11,18])}get boof81116(){return this.lValN([8,11,16])}get boof81117(){return this.lValN([8,11,17])}get boof81217(){return this.lValN([8,12,17])}get boof81220(){return this.lValN([8,12,20])}get boof81318(){return this.lValN([8,13,18])}get boof91420(){return this.lValN([9,14,20])}get boof91421(){return this.lValN([9,14,21])}get boof101520(){return this.lValN([10,15,20])}get boof255080(){return this.lValN([25,50,80])}}class E extends ut{constructor(t){super(t)}jr2=0;jr1=0;initAggro=!1;initArmor=0;initBT=!1;initDefend=!1;initMobile=0;initRegen=0;tribe=[];isTribe(t){return(Array.isArray(t)?t:[t]).every(e=>this.tribe.includes(e))}jr3(t,i){const e=d.creatureState(t,i);return e.id=a.genId(),e.code=this.code,e.health=this.jr2,e.attack=this.jr1,e.maxHealth=e.health,e.regen=this.initRegen,e.breakthrough=this.initBT,e.defender=this.initDefend,e.aggressive=this.initAggro,e.armor=this.initArmor,e.mobility=this.initMobile,e.hints=this.aiHints(),e.bonus=this.bonusExist(),new Oe(e)}playTargets(){const t=super.playTargets(),i=d.actionTarget("TF","FORG",this.code,"");return i.player="F",t.push(i),t}canActivate(t){return!1}startActivation(t){console.error("encountered activation request for creature with no activate",t)}levelSpice(){return[{icon:"A",num:this.jr1},{icon:"H",num:this.jr2}]}}class Q extends ut{constructor(t){super(t)}get type(){return "S"}logSpell(){a.log.new().txt("Casted ").crd(this.code).txt(".").go()}}class We extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Abraxas, Avatar of Kadras",this.jr1=this.boof4712,this.jr2=this.lValN([7,11,21]),this.tribe.push("HY"),this.hints=["LJ"];const i=this.lValS(["Give an adjacent creature","Each adjacent creature gets","Each other friendly creature gets"]);this.text=`Activate: ${i} 2x attack this turn.`}targ(t){const i=d.crFriendNotMeActTarg("CARD",t.id,this.code,t.id);return this.level<3&&(i.lanes=t.adjacent),i}canActivate(t){return a.field.creatByTarget(this.targ(t)).length>0}startActivation(t){if(this.level===1)a.action.ddf5(this.getCardActions(d.ddf4(),t));else{const i=this.targ(t);a.field.creatByTarget(i).forEach(e=>{this.applyMod(e,t.id)}),t.endActivation()}}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.applyMod(i,e.id),e.endActivation()}getCardActions(t,i){if(t.actionKey==="ACTV"){this.level>1&&console.error("Abraxis asking for activate actions after level 1. Something in your code is wrong");const e=i??a.field.jr5(t.param),s=this.targ(e);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){const i=Rt+1,e=d.actionEval(t,"ST");if(t.actionKey==="ACTV")if(this.level>1){const s=a.field.jr5(t.param);let l;this.level===3?l=a.field.laneIdx.filter(u=>u!==s.lane):l=s.adjacent,e.vectors=l.map(u=>d.ddp1(s.owner,u,{att:i}))}else return d.ddp5(t);else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{att:i}))}return e}applyMod(t,i){const e=d.mod("AT",t.attack,i);e.expiry="ET",t.addMod(e)}}class ze extends E{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Abyssal Brute",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("ZB"),this.hints=["SL"],this.text=`When ${this.name} or another friendly creature enters a side lane, that creature gets ${a.log.jr9(this.level,this.level,!0)} and Regenerate ${this.level}.`,this.bonus={exist:this.ddp9(0,this.level*3,this.level,0)*.4}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("EF",this.code),e.jr4("MV",this.code),e}ddf8(t){if(t.trigger.type==="EF"||t.trigger.type==="MV"){const i=t.event,e=i.creature.lane;return(e===1||e===5)&&i.creature.owner===t.ownerPlayerA}return!1}jr8(t){const i=t.event;i.creature.buff(this.level,this.level),i.creature.addRegen(this.level),a.batch.triggerDone()}}class Ze extends E{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Apocrymancer",this.jr1=this.boof3713,this.jr2=this.jr1+3,this.tribe.push("HM"),this.text="When you play an Alloyin spell, you may discard and level up a card."}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){a.turn.levelAndDiscard(t),a.action.actionDone(!0)}ddf8(t){if(t.event.code==="PLC"){const i=t.event;if(i.playerA===t.ownerPlayerA){const e=a.cards.getCard(i.cardCode);if(e.type==="S"&&e.faction==="A")return!0}}return!1}jr8(t){const i=d.lvlHandActTarg(this.code,t.creatId);a.action.ddf5(a.target.toActions([i,a.target.buttonTarget("NOTR")]))}ddf7(t){return t.actionKey==="CARD"?d.actionEval(t,"DC"):super.ddf7(t)}}class Ke extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Arboris, Grove Dragon",this.jr1=this.lValN([5,9,20]),this.jr2=this.jr1,this.tribe.push("DG");const i=this.boof;this.text=`While you have over 120 health, Arboris gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i);return e.addEffect("PH",this.code),e}enforceEffect(t,i){if(a.state.getPlayer(i.owner).health>120&&i.status==="A"){const s=this.boof;i.addModSafe(d.mod("HL",s,i.id)),i.addModSafe(d.mod("MH",s,i.id)),i.addModSafe(d.mod("AT",s,i.id))}else i.removeModSafe(i.id)}get boof(){return this.lValN([4,8,80])}}class Jt extends E{constructor(t){super(t),this.rarity="H",this.jr1=this.level+2,this.jr2=this.jr1;const i=this.cardCode();i==="SFA"?this.steel():i==="RFA"?this.root():i==="HFA"?this.hell():i==="SGA"&&this.storm(),this.hints=["P1",d.alliedHint(this.faction)],this.text=`Forge: ${this.name} gets ${a.log.jr9(this.level,this.level)} for each ${a.log.factionText(this.faction)} card in your hand.`}hell(){this.faction="N",this.name="Hellforged Avatar",this.initRegen=this.level,this.tribe.push("AB")}root(){this.faction="U",this.name="Rootforged Avatar",this.initBT=!0,this.tribe.push("HM")}steel(){this.faction="A",this.name="Steelforged Avatar",this.initArmor=this.level,this.tribe.push("CY")}storm(){this.faction="T",this.name="Stormforged Avatar",this.initMobile=this.level,this.tribe.push("MT")}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}jr8(t){const i=t.event,e=a.state.getPlayer(t.ownerPlayerA).hand.filter(s=>a.cards.getCard(s).faction===this.faction).length;if(e>0){const s=e*this.level;i.creature.buff(s,s)}a.batch.triggerDone()}}class B extends E{imgKey="";lookup(t){return{["BOS"]:()=>this.fixedSapling(3),["COZ"]:()=>this.cooze(),["DZA"]:()=>this.dozer(),["FWG"]:()=>this.feywing(),["FUN"]:()=>this.funguy(),["NSD"]:()=>this.fixedSeedling(1),["OOZ"]:()=>this.nooze(),["RPT"]:()=>this.raptor(),["SPL"]:()=>this.minion(),["SXP"]:()=>this.fixedSapling(5),["SXD"]:()=>this.fixedSeedling(3),["SXT"]:()=>this.fixedTreefolk(7),["SDL"]:()=>this.minion(),["SPN"]:()=>this.nekSpirit(),["SPU"]:()=>this.uspirit(),["XYR"]:()=>this.yuruSpirit(),["TFK"]:()=>this.minion(),["TFD"]:()=>this.fixedTreefolk(this.boof5714),["TFF"]:()=>this.tfFight(),["TTF"]:()=>this.fixedTreefolk(3),["ZTR"]:()=>this.zimus(),["ZBS"]:()=>this.threeZomb(),["ZST"]:()=>this.strideZomb(),["ZMB"]:()=>this.commonZomb()}[t]}constructor(t){super(t),this.rarity="T";const i=this.cardCode();this.imgKey=i,this.minLevel=this.level,this.maxLevel=this.level,this.lookup(i)()}image(t){return this.rawImage(this.imgKey,t)}fixedNekSpirit(t){this.faction="N",this.rarity="T",this.name="Spirit",this.tribe.push("ST"),this.jr1=t,this.jr2=t,this.imgKey=`${"SPN"}${this.level}`}nekSpirit(){this.fixedNekSpirit(this.boof51015)}yuruSpirit(){this.fixedNekSpirit(this.boof5814)}oozer(t){this.faction="N",this.rarity="T",this.name="Oozeling",this.tribe.push("OZ"),this.jr2=this.jr1,this.imgKey=t?"???":"OOZ"}nooze(){this.jr1=this.boof4711,this.oozer(!1)}cooze(){this.jr1=1,this.oozer(!1)}minion(){this.jr1=B.minionBuff(this.level),this.plont(),this.name=B.minionName(this.level)}static minionCode(t){return(t===1?"SDL":t===2?"SPL":"TFK")+t}static minionName(t){return t===1?"Seedling":t===2?"Sapling":"Treefolk"}static minionBuff(t){return t===1?1:t===2?3:5}plont(){this.faction="U",this.jr2=this.jr1,this.tribe.push("PL")}fixedSapling(t){this.jr1=t,this.plont(),this.name=B.minionName(2),this.imgKey="SPL"}fixedSeedling(t){this.jr1=t,this.plont(),this.name=B.minionName(1),this.imgKey="SDL"}fixedTreefolk(t){this.jr1=t,this.plont(),this.name=B.minionName(3),this.imgKey="TFK"}tfFight(){this.jr1=this.boof91421,this.plont(),this.name=B.minionName(3),this.imgKey="TFK"}dozer(){this.faction="U",this.name="Dozer, the Awakened",this.jr1=this.level*3+6,this.jr2=this.jr1,this.initAggro=!0,this.initBT=!0,this.tribe.push("BR"),this.imgKey=this.code,this.text=`${this.name} enters play with health equal to the Dozer, the Dormant it replaced.`}feywing(){this.faction="U",this.name="Feywing",this.jr1=9,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("DG")}funguy(){this.name="Funguy",this.jr1=this.lValN([6,12,14]),this.plont(),this.minLevel=1,this.maxLevel=3,this.hints=["DL"]}raptor(){this.faction="U",this.name="Raptor",this.jr1=1,this.jr2=1,this.tribe.push("DN")}uspirit(){this.faction="U",this.name="Spirit",this.jr1=this.boof4610,this.jr2=this.lValN([3,4,6]),this.tribe.push("ST")}zimus(){this.faction="N",this.rarity="L",this.name="Zimus, the Returned",this.tribe.push("ZB"),this.jr1=10,this.jr2=5,this.imgKey=`${"ZTU"}2`}zomb(t,i){this.faction="N",this.rarity="T",this.name="Zombie",this.tribe.push("ZB"),this.jr1=t,this.jr2=i,this.imgKey="ZMB"}commonZomb(){const t=this.boof359;this.zomb(t,t)}threeZomb(){this.zomb(3,3)}strideZomb(){this.zomb(this.lValN([4,8,10]),this.boof369)}}class K extends Q{lookup(t){return{["AGP"]:{c:()=>this.apulseC(),z:()=>this.apulseZ(),e:e=>this.apulseE(e)},["CTL"]:{c:()=>this.ctlC(),z:()=>this.ctlZ(),e:e=>this.ctlE(e)},["COD"]:{c:()=>this.chontC(),z:()=>this.chontZ(),e:e=>this.chontE(e)},["DCR"]:{c:()=>this.dcurC(),z:()=>this.dcurZ(),e:e=>this.dcurE(e)},["DGZ"]:{c:()=>this.digiC(),z:()=>this.digiZ(),e:e=>this.digiE(e)},["EPD"]:{c:()=>this.epiC(),z:()=>this.epiZ(),e:e=>this.epiE(e)},["FRR"]:{c:()=>this.roarC(),z:()=>this.roarZ(),e:e=>this.roarE(e)},["FSM"]:{c:()=>this.fstormC(),z:()=>this.fstormZ(),e:e=>this.fstormE(e)},["GRM"]:{c:()=>this.mealC(),z:()=>this.mealZ(),e:e=>this.mealE(e)},["IBF"]:{c:()=>this.ibfC(),z:()=>this.ibfZ(),e:e=>this.ibfE(e)},["IVS"]:{c:()=>this.infvC(),z:()=>this.infvZ(),e:e=>this.infvE(e)},["LOD"]:{c:()=>this.lashC(),z:()=>this.lashZ(),e:e=>this.lashE(e)},["NSH"]:{c:()=>this.shriekC(),z:()=>this.shriekZ(),e:e=>this.shriekE(e)},["NCL"]:{c:()=>this.noxC(),z:()=>this.noxZ(),e:e=>this.noxE(e)},["OWF"]:{c:()=>this.oforceC(),z:()=>this.oforceZ(),e:e=>this.oforceE(e)},["PLW"]:{c:()=>this.palwC(),z:()=>this.palwZ(),e:e=>this.palwE(e)},["PTB"]:{c:()=>this.phyC(),z:()=>this.phyZ(),e:e=>this.phyE(e)},["PYS"]:{c:()=>this.pyreC(),z:()=>this.pyreZ(),e:e=>this.pyreE(e)},["ROK"]:{c:()=>this.rokC(),z:()=>this.rokZ(),e:e=>this.rokE(e)},["STS"]:{c:()=>this.stsC(),z:()=>this.stsZ(),e:e=>this.stsE(e)},["SNP"]:{c:()=>this.pulseC(),z:()=>this.pulseZ(),e:e=>this.pulseE(e)},["SRD"]:{c:()=>this.sradC(),z:()=>this.sradZ(),e:e=>this.sradE(e)},["TST"]:{c:()=>this.talinC(),z:()=>this.talinZ(),e:e=>this.talinE(e)},["TRN"]:{c:()=>this.turnbC(),z:()=>this.turnbZ(),e:e=>this.turnbE(e)},["VCH"]:{c:()=>this.verdC(),z:()=>this.verdZ(),e:e=>this.verdE(e)},["WOD"]:{c:()=>this.wdenC(),z:()=>this.wdenZ(),e:e=>this.wdenE(e)}}[t]}constructor(t){super(t),this.lookup(this.cardCode()).c()}image(t){return this.cardCode()==="NSH"?this.leveledImage(t):this.fixedImage(t)}playTargets(){const t=super.playTargets(),i=a.target.boardTarget("CARD",this.code);return t.push(i),t}handleAction(t){this.logSpell(),this.lookup(this.cardCode()).z(),a.turn.spellCast()}ddf7(t){return this.lookup(this.cardCode()).e(t)}apulseC(){this.faction="A",this.rarity="C",this.name="Aegis Pulse",this.text=`Each friendly creature gets Armor ${this.boof234}.`}apulseZ(){const t=this.boof234;a.field.ddf1().forEach(i=>{i.addArmor(t)})}apulseE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof234;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{arm:s})),i}get ctlboof(){return(this.level-1)*2}ctlC(){this.faction="T",this.rarity="L",this.name="Call the Lightning";const t=this.level>1?` gets ${a.log.jr9(this.ctlboof,0)} this turn. Those creatures`:"";this.text=`Each friendly creature${t} battles an additional time this turn.`}ctlZ(){const t=this.ctlboof;a.field.ddf1().forEach(i=>{const e=d.mod("AT",t,this.code);e.expiry="ET",i.addMod(e),i.extraBattles+=1})}ctlE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.ctlboof;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}chontC(){this.faction="T",this.rarity="R",this.name="Chant of Dragonwatch",this.maxLevel=1,this.text="Deal X damaage to each enemy creature, where X is your rank."}chontZ(){const t=a.state.getActivePlayer().rank,i=Date.now();a.field.qEnemyCreats().forEach(e=>{e.hurtDirect(t,this.code,i)})}chontE(t){const i=a.state.getActivePlayer(),e=i.rank,s=d.actionEval(t,"ST");return s.vectors=a.field.laneIdx.map(l=>d.ddp1(!i.isPlayerA,l,{dmg:e})),s}dcurC(){this.faction="N",this.rarity="R",this.name="Death Current";const t=this.lValS(["a level 2 or lower","an","two"]);this.text=`Destroy ${t} enemy creature at random.`}dcurZ(){const t=this.dCurrHunter(),i=t.length;if(i>0){const e=a.randInt(0,i),s=Date.now();a.death.destroy(t[e],this.code,s),this.level===3&&i>1&&(t.splice(e,1),a.death.destroy(t[a.randInt(0,i-1)],this.code,s))}}dcurE(t){let i;const e=this.dCurrHunter(),s=e.length;if(s>0){const l=a.randInt(0,s);if(i=d.ddp8(t,e[l]),this.level===3&&s>1){e.splice(l,1);const u=d.ddp1(e[0].owner,a.randInt(0,s-1));u.destroy=!0,i.vectors.push(u)}}else i=d.actionEval(t,"NR");return i}dCurrHunter(){const t=d.crEnemyTarg();return t.level=a.target.ddf2(this.level+1),a.field.creatByTarget(t)}digiC(){this.faction="A",this.rarity="R",this.name="Digitize",this.text=`Each enemy creature gets ${a.log.jr9(this.boof4812n,0)}.`}digiZ(){const t=this.boof4812n;a.field.qEnemyCreats().forEach(i=>{i.buff(t,0)})}digiE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof4812n;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}epiC(){this.faction="N",this.rarity="H",this.name="Epidemic";const t=this.boof246n;this.text=`Each enemy creature gets ${a.log.jr9(t,t)}.`}epiZ(){const t=this.boof246n,i=d.crEnemyTarg();a.field.creatByTarget(i).forEach(e=>{e.buff(t,t)})}epiE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof246n;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s,hlt:s})),i}roarC(){this.faction="U",this.rarity="H",this.name="Ferocious Roar";const t=this.boof235;this.text=`Each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}roarZ(){const t=this.boof235;a.field.ddf1().forEach(i=>{i.buff(t,t),this.level===3&&(i.breakthrough=!0)})}roarE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof235,l=this.level===3;return i.vectors=a.field.laneIdx.map(u=>d.ddp1(e,u,{att:s,hlt:s,brt:l})),i}get fszap(){return this.level+4}fstormC(){this.faction="T",this.rarity="H",this.name="Firestorm",this.text=`Deal ${this.fszap} damage to each creature.`}fstormZ(){const t=this.fszap,i=Date.now();a.field.qActiveCreats().forEach(e=>{e.hurtDirect(t,this.code,i)})}fstormE(t){const i=d.actionEval(t,"ST"),e=this.fszap;return i.vectors=[!0,!1].map(s=>a.field.laneIdx.map(l=>d.ddp1(s,l,{dmg:e}))).flat(),i}mealC(){this.faction="N",this.rarity="R",this.name="Group Meal";const t=this.boof234;this.text=`Each enemy creature gets ${a.log.jr9(-1*t,0)}. Each friendly creature gets ${a.log.jr9(t,0)}.`}mealZ(){const t=this.boof234,i=a.state.ddf9();a.field.qActiveCreats().forEach(e=>{const s=e.owner===i?t:-1*t;e.buff(s,0)})}mealE(t){const i=d.actionEval(t,"ST"),e=this.boof234,s=a.state.ddf9();return i.vectors=[!0,!1].map(l=>a.field.laneIdx.map(u=>d.ddp1(l,u,{att:l===s?e:-e}))).flat(),i}ibfC(){this.faction="T",this.rarity="R",this.name="Iceborn Fortitude",this.text=`Each friendly creature gets ${a.log.jr9(0,this.boof3510)}.`}ibfZ(){const t=this.boof3510,i=d.crFriendTarg();a.field.creatByTarget(i).forEach(e=>{e.buff(0,t)})}ibfE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof3510;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{hlt:s})),i}infvC(){this.faction="N",this.rarity="C",this.name="Infernal Visage";const t=this.boof246;this.text=`Each friendly creature in a side lane gets ${a.log.jr9(t,t,!0)} and Regenerate ${this.level}.`}infvZ(){const t=this.boof246,i=d.crFriendTarg();i.lanes=[1,5],a.field.creatByTarget(i).forEach(e=>{e.buff(t,t),e.addRegen(this.level)})}infvE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof246;return i.vectors=[1,5].map(l=>d.ddp1(e,l,{att:s,hlt:s,rgn:this.level})),i}lashC(){this.faction="U",this.rarity="L",this.name="Lash of Demara",this.text=`Each enemy creature gets Poison ${this.level+2}.`}lashZ(){const t=this.level+2;a.field.qEnemyCreats().forEach(i=>{i.addPoison(t)})}lashE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.level+2;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{psn:s})),i}shriekC(){this.faction="N",this.rarity="L",this.name="Nethershriek";const t=this.boof4815;this.text=`Spawn a ${t}/${t} Netherdrake.`}shriekZ(){a.field.birthCreature(`${"NDR"}${this.level}`,"S",a.state.ddf9())}shriekE(t){const i=a.state.ddf9(),e=a.field.emptyLanes(i);if(e.length===0)return d.actionEval(t,"NR");{const s=d.ddp4(t,i,e[a.randInt(0,e.length)],`${"NDR"}${this.level}`);return s.type="ST",s.hints.push("ENF"),s}}noxC(){this.faction="U",this.rarity="R",this.name="Noxious Cloud",this.text=`Each enemy creature gets Poison ${this.boof246}.`}noxZ(){const t=this.boof246;a.field.qEnemyCreats().forEach(i=>{i.addPoison(t)})}noxE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.boof246;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{psn:s})),i}oforceC(){this.faction="A",this.rarity="H",this.name="Overwhelming Force",this.text="Each friendly creature gets "+(this.level===3?"2x attack.":`${a.log.jr9(this.boof369,0)}.`)}oforceZ(){if(this.level===3)a.field.ddf1().forEach(t=>{t.buff(t.attack,0)});else{const t=this.boof369;a.field.ddf1().forEach(i=>{i.buff(t,0)})}}oforceE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.lValN([3,6,Rt+1]);return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}palwC(){this.faction="A",this.rarity="R",this.name="Palladium Wave",this.maxLevel=1,this.text=`Each enemy creature gets ${a.log.jr9(-1,0).replaceAll("1","X")}, where X is two times your rank.`}palwZ(){const t=-2*a.state.getActivePlayer().rank;a.field.qEnemyCreats().forEach(i=>{i.buff(t,0)})}palwE(t){const i=a.state.getActivePlayer(),e=-2*i.rank,s=d.actionEval(t,"ST");return s.vectors=a.field.laneIdx.map(l=>d.ddp1(!i.isPlayerA,l,{att:e})),s}phyC(){this.faction="U",this.rarity="H",this.name="Phytobomb";const t=B.minionBuff(this.level);this.text=`Put a ${t}/${t} ${B.minionName(this.level)} into each players available lanes.`}phyZ(){const t=B.minionCode(this.level),i=Date.now();[!0,!1].forEach(e=>{a.field.emptyLanes(e).forEach(s=>{a.field.birthCreature(t,"P",e,s,i)})})}phyE(t){const i=B.minionCode(this.level),e=d.actionEval(t,"ST");return e.vectors=[!0,!1].map(s=>a.field.emptyLanes(s).map(l=>{const u=d.evalVectorCreatureFromCode(i,s,l);return u.type="R",u})).flat(),e}pyreC(){this.faction="T",this.rarity="C",this.name="Pyre Song",this.text=`Each friendly creature deals ${this.level} damage to each enemy creature.`}pyreZ(){const t=this.level,i=Date.now(),e=a.field.qEnemyCreats();a.field.ddf1().forEach(s=>{e.forEach(l=>{l.hurtDirect(t,s.code,i)})})}pyreE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.level*a.field.ddf1().length;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{dmg:s})),i}rokC(){this.faction="T",this.rarity="L",this.name="Rage of Kadras",this.overload=!0,this.maxLevel=1,this.text="Each friendly Tempys creature gets +1 attack and deals damage equal to its attack to the creature opposing it."}rokZ(){const t=Date.now(),i=d.crFriendTarg();i.faction="T",a.field.creatByTarget(i).forEach(e=>{e.buff(1,0);const s=e.opposed;s&&s.hurtDirect(e.attack,e.code,t)})}rokE(t){const i=d.actionEval(t,"ST"),e=d.crFriendTarg();return e.faction="T",i.vectors=a.field.creatByTarget(e).map(s=>{const l=d.ddp1(s.owner,s.lane,{att:1}),u=s.opposed;return u?[l,d.ddp1(u.owner,u.lane,{dmg:s.attack+1})]:[l]}).flat(),i}get spboof(){return(this.level+1)*-2}pulseC(){this.faction="A",this.rarity="H",this.name="Sonic Pulse",this.text=`Each enemy creature gets ${a.log.jr9(this.spboof,0)}.`}pulseZ(){const t=this.spboof;a.field.qEnemyCreats().forEach(i=>{i.buff(t,0)})}pulseE(t){const i=d.actionEval(t,"ST"),e=!a.state.ddf9(),s=this.spboof;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s})),i}sradC(){this.faction="U",this.rarity="C",this.name="Soothing Radiance",this.text=`Heal ${this.boof61224} damage from each friendly creature.`}sradZ(){const t=this.boof61224;a.field.ddf1().forEach(i=>{i.heal(t)})}sradE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof3612;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{hlt:s})),i}stsC(){this.faction="U",this.rarity="C",this.name="Scatter the Seeds";const t=B.minionBuff(this.level);this.text=`Spawn three ${t}/${t} ${B.minionName(this.level)}s.`}stsZ(){const t=B.minionCode(this.level),i=Date.now();[1,2,3].forEach(e=>{a.field.birthCreature(t,"S",a.state.ddf9(),void 0,i)})}stsE(t){const i=d.actionEval(t,"ST"),e=Math.min(3,a.field.emptyLanes(a.state.ddf9()).length),s=B.minionBuff(this.level),l=this.ddp9(1,s+s,s,0);return i.bonus=l*e,i}talinC(){this.faction="T",this.rarity="C",this.name="Talin Stampede",this.text=`Each friendly Tempys creature gets ${a.log.jr9(this.boof5814,0)} this turn.`}talinZ(){const t=this.boof5814;this.talinTarg().forEach(i=>{const e=d.mod("AT",t);e.expiry="ET",i.addMod(e)})}talinE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.boof5814;return i.vectors=this.talinTarg().map(l=>d.ddp1(e,l.lane,{att:s})),i}talinTarg(){const t=d.crFriendTarg();return t.faction="T",a.field.creatByTarget(t)}turnbC(){this.faction="T",this.rarity="H",this.name="Turnabout",this.isFree=this.level===3;const t=this.boof235;this.text=`Each creature gets ${a.log.jr9(t,-1*t)} this turn.`}turnbZ(){const t=this.boof235,i=-1*t;a.field.qActiveCreats().forEach(e=>{const s=d.mod("AT",t),l=d.mod("HL",i),u=d.mod("MH",i);s.expiry="ET",l.expiry="ET",u.expiry="ET",e.addMod(s),e.addMod(l),e.addMod(u)})}turnbE(t){const i=d.actionEval(t,"ST"),e=this.boof235,s=-1*e;return i.vectors=[!0,!1].map(l=>a.field.laneIdx.map(u=>d.ddp1(l,u,{att:e,hlt:s}))).flat(),i}verdC(){this.faction="U",this.rarity="H",this.name="Verdant Charge";const t=this.verdb;this.text=`Each friendly creature gets ${a.log.jr9(t,t,!0)} and Regenerate ${t}.`}verdZ(){const t=this.verdb;a.field.ddf1().forEach(i=>{i.buff(t,t),i.addRegen(t)})}verdE(t){const i=d.actionEval(t,"ST"),e=a.state.ddf9(),s=this.verdb;return i.vectors=a.field.laneIdx.map(l=>d.ddp1(e,l,{att:s,hlt:s,rgn:s})),i}get verdb(){return this.lValN([1,3,6])}wdenC(){this.faction="U",this.rarity="R",this.name="Whispers of Dendris",this.maxLevel=1,this.text=`Each friendly creature gets ${a.log.jr9(1,1).replaceAll("1","X")}, where X is your rank.`}wdenZ(){const t=a.state.getActivePlayer().rank;a.field.ddf1().forEach(i=>{i.buff(t,t)})}wdenE(t){const i=a.state.getActivePlayer(),e=i.rank,s=d.actionEval(t,"ST");return s.vectors=a.field.laneIdx.map(l=>d.ddp1(i.isPlayerA,l,{att:e,hlt:e})),s}}class Ye extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Borean Mystic",this.jr1=this.boof4814,this.jr2=this.boof71118,this.tribe.push("WN","AS"),this.text=`Activate: Move another friendly creature to an available lane adjacent to ${this.name}.`}canActivate(t){return this.emptySloots(t).length>0&&this.buddies(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.jr5(i[2]).move(t.lane),e.endActivation()}}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.buddies(e.id);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=a.field.jr5(s[1]),u=this.emptySloots(l,e.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=t,l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.moveTo=s.lane,e.vectors.push(u),e}}}emptySloots(t,i=""){return a.action.emptyAdjacents(t,a.enTil("P2",t.id,i))}buddies(t){return a.target.toActions(d.crFriendNotMeActTarg("CARD",t,this.code,a.enTil("P1",t)))}}class Xe extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Bron, Wild Tamer",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("TK"),this.hints=["OL","LKV"];const i=this.boof357;this.bonus={exist:this.ddp9(0,i*2,0,0)},this.text=`Upgrade Dinosaur: Replace Bron with a level ${this.level} Dino Knight.~When this ${a.log.dbdtap()}, heal ${i} damage from each other friendly creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("UP",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}jr8(t){if(t.trigger.type==="UP"){const e=t.event.replacedCreat;e.isTribe("DN")&&a.field.birthCreature("DNK"+this.level,"R",e.owner,e.lane),a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=this.boof357,e=d.crNotMeTarg(t.creatId);e.player=a.player.toTarget(t.ownerPlayerA),a.field.creatByTarget(e).forEach(l=>l.heal(i)),a.batch.triggerDone()}}}class qe extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Brightsteel Gargoyle",this.jr1=this.boof61016,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("RB"),this.text=`At the end of your turn, ${this.name} gets Armor ${this.boof2510} and Defender until the end of the next turn.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PT",this.code),e}ddf8(t){return t.trigger.type==="PT"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){const i=d.mod("AR",this.boof2510,t.creatId),e=d.mod("DF",!0,t.creatId);i.expiry="ET",e.expiry="ET";const s=a.field.jr5(t.creatId);s.addMod(i),s.addMod(e),a.batch.triggerDone()}}class je extends Q{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Bullwark Bash",this.text=`Deal damage equal to ${this.level>1?this.level+"x ":""}the Armor on a friendly creature to an enemy creature.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");i.hasArmor=!0,t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]);e.hurtDirect(s.armor*this.level,this.code),a.turn.spellCast()}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}getCardActions(t){const i=a.field.ddf6(t),e=this.enemyTargActions(i.id);return e.push(a.action.cancelAction()),e}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=t,s=a.field.jr5(i[1]);return d.ddp2(t,e.playerA,e.lane,{dmg:s.armor*this.level})}}}class Je extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Byzerak Spitemage",this.jr1=this.boof369,this.jr2=this.level,this.initAggro=!0,this.tribe.push("HM"),this.hints=["ALN"],this.bonus={play:this.level*.5},this.text=`Allied Nekrium: When ${this.name} ${a.log.dbdtac(this.level)}, destroy it.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.creatureSrc&&i.creatureTarg&&i.dmg>0&&i.source.id===t.creatId&&a.target.levelTestCommon(i.target.level,this.level)}else return!1}jr8(t){if(t.trigger.type==="FR"&&a.turn.allied("N")){const i=a.field.jr5(t.creatId);i.jr4("DM",this.code),i.hints.push("BX"),i.changed=!0}else if(t.trigger.type==="DM"){const e=t.event.target;e.status==="A"&&a.death.destroy(e,this.code)}a.batch.triggerDone()}}class Qe extends E{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Cercee, Hand of Varna",this.jr1=this.lValN([1,3,5,7]),this.jr2=this.lValN([6,10,20,40]),this.tribe.push("FB"),this.initMobile=1,this.maxLevel=4,this.level===4?this.hints=["OL","LKV","BX"]:this.hints=["OP","BX"];const i=this.level===4?`When ${this.name} ${a.log.dbdtap()}, deal damamge to that player equal to their health.~`:"";this.text=i+`When ${this.name} ${a.log.dbdtac(this.level)}, destroy that creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.battle&&i.creatureSrc&&i.source.id===t.creatId){if(this.level===4)return!0;if(i.creatureTarg){const e=i.target;return a.target.levelTestCommon(e.level,this.level)}}}return!1}jr8(t){const i=t.event;if(i.creatureTarg){const e=i.target;e.status==="A"&&a.death.destroy(e,this.code)}else{const e=a.player.toPlayer(i.target);a.player.ddf3(e,e.health,this.code)}a.batch.triggerDone()}}class W extends E{lookup(t){return{["BSW"]:{c:()=>this.bswC(),a:(e,s)=>this.bswA(e,s),t:e=>this.bswT(e),e:(e,s)=>this.bswE(e,s)},["CCS"]:{c:()=>this.ccsC(),a:(e,s)=>this.ccsA(e,s),t:e=>this.ccsT(e),e:(e,s)=>this.ccsE(e,s)},["CGL"]:{c:()=>this.clordC(),a:(e,s)=>this.clordA(e,s),t:e=>this.clordT(e),e:(e,s)=>this.clordE(e,s)},["CSH"]:{c:()=>this.cswC(),a:(e,s)=>this.cswA(e,s),t:e=>this.cswT(e),e:(e,s)=>this.cswE(e,s)},["FFU"]:{c:()=>this.ffuC(),a:(e,s)=>this.ffuA(e,s),t:e=>this.ffuT(e),e:(e,s)=>this.ffuE(e,s)},["FFS"]:{c:()=>this.ffsC(),a:(e,s)=>this.ffsA(e,s),t:e=>this.ffsT(e),e:(e,s)=>this.ffsE(e,s)},["FSH"]:{c:()=>this.fssC(),a:(e,s)=>this.fssA(e,s),t:e=>this.fssT(e),e:(e,s)=>this.fssE(e,s)},["KOD"]:{c:()=>this.kodC(),a:(e,s)=>this.kodA(e,s),t:e=>this.kodT(e),e:(e,s)=>this.kodE(e,s)},["LOD"]:{c:()=>this.lashC(),a:(e,s)=>this.lashA(e,s),t:e=>this.lashT(e),e:(e,s)=>this.lashE(e,s)},["MBP"]:{c:()=>this.mbpC(),a:(e,s)=>this.mbpA(e,s),t:e=>this.mbpT(e),e:(e,s)=>this.mbpE(e,s)},["MND"]:{c:()=>this.mndC(),a:(e,s)=>this.mndA(e,s),t:e=>this.mndT(e),e:(e,s)=>this.mndE(e,s)},["NCS"]:{c:()=>this.ncsC(),a:(e,s)=>this.ncsA(e,s),t:e=>this.ncsT(e),e:(e,s)=>this.ncsE(e,s)},["NXG"]:{c:()=>this.nxgC(),a:(e,s)=>this.nxgA(e,s),t:e=>this.nxgT(e),e:(e,s)=>this.nxgE(e,s)},["NFF"]:{c:()=>this.nffC(),a:(e,s)=>this.nffA(e,s),t:e=>this.nffT(e),e:(e,s)=>this.nffE(e,s)},["OHV"]:{c:()=>this.orghC(),a:(e,s)=>this.orghA(e,s),t:e=>this.orghT(e),e:(e,s)=>this.orghE(e,s)},["PPM"]:{c:()=>this.ppmC(),a:(e,s)=>this.ppmA(e,s),t:e=>this.ppmT(e),e:(e,s)=>this.ppmE(e,s)},["PSC"]:{c:()=>this.pcoilC(),a:(e,s)=>this.pcoilA(e,s),t:e=>this.pcoilT(e),e:(e,s)=>this.pcoilE(e,s)},["SGF"]:{c:()=>this.siggyC(),a:(e,s)=>this.siggyA(e,s),t:e=>this.siggyT(e),e:(e,s)=>this.siggyE(e,s)},["SRM"]:{c:()=>this.srmdC(),a:(e,s)=>this.srmdA(e,s),t:e=>this.srmdT(e),e:(e,s)=>this.srmdE(e,s)},["SSA"]:{c:()=>this.ssaC(),a:(e,s)=>this.ssaA(e,s),t:e=>this.ssaT(e),e:(e,s)=>this.ssaE(e,s)},["SWM"]:{c:()=>this.swmC(),a:(e,s)=>this.swmA(e,s),t:e=>this.swmT(e),e:(e,s)=>this.swmE(e,s)},["UCM"]:{c:()=>this.ucmC(),a:(e,s)=>this.ucmA(e,s),t:e=>this.ucmT(e),e:(e,s)=>this.ucmE(e,s)},["UIM"]:{c:()=>this.uimC(),a:(e,s)=>this.uimA(e,s),t:e=>this.uimT(e),e:(e,s)=>this.uimE(e,s)},["WMR"]:{c:()=>this.warmC(),a:(e,s)=>this.warmA(e,s),t:e=>this.warmT(e),e:(e,s)=>this.warmE(e,s)},["WWR"]:{c:()=>this.wwrC(),a:(e,s)=>this.wwrA(e,s),t:e=>this.wwrT(e),e:(e,s)=>this.wwrE(e,s)},["WFS"]:{c:()=>this.wfsC(),a:(e,s)=>this.wfsA(e,s),t:e=>this.wfsT(e),e:(e,s)=>this.wfsE(e,s)},["XSH"]:{c:()=>this.shambC(),a:(e,s)=>this.shambA(e,s),t:e=>this.shambT(e),e:(e,s)=>this.shambE(e,s)},["ZPM"]:{c:()=>this.zpmC(),a:(e,s)=>this.zpmA(e,s),t:e=>this.zpmT(e),e:(e,s)=>this.zpmE(e,s)}}[t]}targAction(t,i,e){this.lookup(t).a(i,e)}actTargets(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.doubleActivator()&&(e.jr4("TS",this.code),this.addExtraActivate(e)),e}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t,e=a.field.jr5(t.param);return this.lookup(this.cardCode()).e(i,e)}}canActivate(t){return a.target.toActions(this.actTargets(this.cardCode(),t)).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.targAction(this.cardCode(),i,e),e.endActivation(),this.doubleActivator()&&e.hasMod(e.id)&&(e.removeMod(e.id),e.activationAvailable=!0,a.phase.whatNext())}makeCreatTarg(t){return d.crActTarg("CARD",this.code,t.id)}makeOtherCreatTarg(t){const i=this.makeCreatTarg(t);return i.notMe=t.id,i}doubleActivator(){return this.code==="CGL"+"3"||this.code==="XSH"+"3"}addExtraActivate(t){const i=d.mod("EA",!0,t.id);i.expiry="ET",t.addMod(i)}ddf8(t){return ut.extractCardCode(t.trigger.logicCode)==="KOD"&&(t.trigger.type==="PT"||t.trigger.type==="VN")?!0:t.trigger.type==="TS"&&this.doubleActivator()?t.event.playerA===t.ownerPlayerA:super.ddf8(t)}jr8(t){if(t.trigger.type==="VN"){const i=t.event;a.field.birthCreature(i.creature.code,"S",t.ownerPlayerA),a.batch.triggerDone()}else if(t.trigger.type==="PT"){const i=t.trigger.customCode,e=a.field.jr5(t.creatId);e.triggers.filter(l=>l.customCode===i).forEach(l=>e.removeTrigger(l)),a.batch.triggerDone()}else if(t.trigger.type==="TS"){const i=a.field.jr5(t.creatId);this.addExtraActivate(i),a.batch.triggerDone()}}getCardActions(t,i){const e=i??a.field.jr5(t.param);return a.target.toActions([this.actTargets(this.cardCode(),e),a.target.buttonTarget("CANC")])}bswC(){this.faction="T",this.rarity="C",this.name="Borean Stormweaver",this.jr1=this.boof4816,this.jr2=this.lValN([6,10,20]),this.tribe.push("GT");const t=this.boof234;this.text=`Activate: Deal ${t} damage to a creature.`}bswT(t){return this.makeCreatTarg(t)}bswA(t,i){t.hurtDirect(this.boof234,this.code)}bswE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof234})}ccsC(){this.faction="N",this.rarity="C",this.name="Catacomb Spider",this.jr1=this.boof4815,this.jr2=this.lValN([5,10,16]),this.tribe.push("SP");const t=this.boof246;this.text=`Activate: Give another creature Regenerate ${t}.`}ccsT(t){const i=this.makeOtherCreatTarg(t);return i.canRegen=!0,i}ccsA(t,i){t.addRegen(this.boof246)}ccsE(t,i){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof246})}clordC(){this.faction="N",this.rarity="H",this.name="Contagion Lord",this.jr1=this.boof4914,this.jr2=this.jr1+3,this.tribe.push("AB"),this.text="Activate, destroy a friendly Abomination: You may play an additional card this turn.",this.level===3&&(this.text+="~You may use this ability twice per turn.")}clordT(t){const i=this.makeCreatTarg(t);return i.player="F",i.tribe="AB",i}clordA(t,i){a.death.destroy(t,this.code),a.state.gs.turn.regularPlays+=1}clordE(t,i){const e=d.ddp7(t,t.playerA,t.lane,"SD");return e.bonus=this.ddp6(this.level),e}cswC(){this.faction="A",this.rarity="C",this.name="Cypien Shieldwarden",this.jr1=this.boof4610,this.jr2=this.boof61016,this.tribe.push("HM");const t=this.boof246;this.text=`Activate: Give a creature Armor ${t} this turn.`}cswT(t){const i=this.makeCreatTarg(t);return i.canArmor=!0,i}cswA(t,i){const e=d.mod("AR",this.boof246,i.id);e.expiry="ET",t.addMod(e)}cswE(t,i){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof246})}ffuC(){this.faction="T",this.rarity="H",this.name="Firefist Uranti",this.jr1=this.boof357,this.jr2=this.boof71116,this.tribe.push("FR","YT"),this.text=`Activate: Deal damage equal to ${this.name}'s attack to a creature.`}ffuT(t){return this.makeCreatTarg(t)}ffuA(t,i){t.hurtDirect(i.attack,this.code)}ffuE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:i.attack})}ffsC(){this.faction="T",this.rarity="R",this.name="Flamefury Shaman",this.jr1=this.boof369,this.jr2=this.boof81116,this.tribe.push("HM"),this.text=`Activate: Grant another creature ${a.log.jr9(this.jr1,0)} this turn.`}ffsT(t){return this.makeOtherCreatTarg(t)}ffsA(t,i){const e=d.mod("AT",this.jr1,i.id);e.expiry="ET",t.addMod(e)}ffsE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1)}fssC(){this.faction="T",this.rarity="R",this.name="Flamestoke Shaman",this.jr1=this.boof61218,this.jr2=this.boof3712,this.tribe.push("HM"),this.text=`Activate: Grant an adjacent ${a.log.levelGateText(this.level,!0)}creature Aggressive.`}fssT(t){const i=this.makeCreatTarg(t);return i.level=a.target.ddf2(this.level),i.lanes=t.adjacent,i.player=a.player.toTarget(t.owner),i}fssA(t,i){t.aggressive=!0}fssE(t,i){return d.ddp2(t,t.playerA,t.lane,{agr:!0})}kodC(){this.faction="N",this.rarity="L",this.name="Keeper of the Damned",this.jr1=this.boof5815,this.jr2=this.boof61017,this.tribe.push("ZB"),this.text=`Activate: another friendly ${a.log.levelGateText(this.level,!0)}creature gets "Vengeance: Spawn this" this turn.`}kodT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i.player=a.player.toTarget(t.owner),i}kodA(t,i){const e=t.jr4("VN",this.code);e.customCode=i.id,e.changes=!0;const s=t.jr4("PT",this.code);s.customCode=i.id}kodE(t,i){const e=d.ddp2(t,t.playerA,t.lane,void 0,"LZ");return e.bonus=2,e}lashC(){this.faction="U",this.rarity="L",this.name="Demara, Herald of Affliction",this.jr1=14,this.jr2=20,this.tribe.push("NG"),this.hints=["ENS"],this.text="Activate: Give an enemy creature with Poison Defender.~Forge: Each enemy creature gets Poison 6."}lashT(t){const i=this.makeCreatTarg(t);return i.player="E",i.hasPoison=!0,i.canDefender=!0,i}lashA(t,i){t.defender=!0}lashE(t,i){return d.ddp2(t,t.playerA,t.lane,{noD:!0})}mbpC(){this.faction="U",this.rarity="H",this.name="Mossbeard Patriarch",this.jr1=this.boof137,this.jr2=this.boof81220,this.tribe.push("PL"),this.text=`Activate: Give another creature ${a.log.jr9(0,this.boof468)}.`}mbpT(t){return this.makeOtherCreatTarg(t)}mbpA(t,i){t.buff(0,this.boof468)}mbpE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof468)}mndC(){this.faction="A",this.rarity="R",this.name="Munitions Drone",this.jr1=this.boof137,this.jr2=this.boof6814,this.tribe.push("RB"),this.text=`Activate: Give another creature ${a.log.jr9(this.boof357,0)}.`}mndT(t){return this.makeOtherCreatTarg(t)}mndA(t,i){t.buff(this.boof357,0)}mndE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof357)}ncsC(){this.faction="N",this.rarity="R",this.name="Necroslime",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("OZ");const t=this.boof248;this.text=`Activate, deal 3 damage to another friendly creature: ${this.name} gets ${a.log.jr9(t,t)}.`}ncsT(t){const i=this.makeOtherCreatTarg(t);return i.player="F",i}ncsA(t,i){const e=this.boof248;t.hurtDirect(3,this.code),i.buff(e,e)}ncsE(t,i){const e=this.boof248,s=d.actionEvalBuffC(t,i,e,e);return s.vectors.push(d.ddp1(t.playerA,t.lane,{dmg:3})),s}nxgC(){this.faction="A",this.rarity="H",this.name="Nexus Gunner",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("HM"),this.text=`Activate: Give a creature ${a.log.jr9(this.jr1,0)}. Use this ability only if ${this.name} is in the center lane.`}nxgT(t){const i=this.makeCreatTarg(t);return t.lane!==3&&(i.cardCode="???"),i}nxgA(t,i){t.buff(this.jr1,0)}nxgE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1,0)}nffC(){this.faction="U",this.rarity="L",this.name="Nuada, Faith's Flourish",this.jr1=this.boof246,this.jr2=this.lValN([10,17,25]),this.initDefend=!0,this.tribe.push("TK");const t=this.boof91421;this.text=`Activate: Replace a friendly Plant with a ${t}/${t} Treefolk.`}nffT(t){const i=this.makeCreatTarg(t);return i.player="F",i.tribe="PL",i}nffA(t,i){a.field.birthCreature(`${"TFF"}${this.level}`,"R",i.owner,t.lane)}nffE(t,i){const e=d.ddp4(t,t.playerA,t.lane,`${"TFF"}${this.level}`);return e.hints=["RE"],e}orghC(){this.faction="N",this.rarity="R",this.name="Organ Harvester",this.jr1=this.lValN([2,6,9]),this.jr2=this.jr1+1,this.tribe.push("AB"),this.text=`Activate, destroy ${this.name}: Destroy a ${a.log.levelGateText(this.level,!0)}creature.`}orghT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i}orghA(t,i){const e=Date.now();a.death.destroy(t,this.code,e),a.death.destroy(i,this.code,e)}orghE(t,i){const e=d.ddp7(t,t.playerA,t.lane),s=d.ddp1(i.owner,i.lane);return s.destroy=!0,e.vectors.push(s),e}ppmC(){this.faction="A",this.rarity="R",this.name="Palladium Pulsemage",this.jr1=this.lValN([2,8,12]),this.jr2=this.lValN([7,12,15]),this.tribe.push("HM"),this.text=`Activate: give a creature ${a.log.jr9(this.boof4812n,0)} this turn.`}ppmT(t){return this.makeCreatTarg(t)}ppmA(t,i){const e=d.mod("AT",this.boof4812n,i.id);e.expiry="ET",t.addMod(e)}ppmE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof4812n)}pcoilC(){this.faction="U",this.rarity="R",this.name="Poisoncoil",this.jr1=this.boof357,this.jr2=this.boof71013,this.initDefend=!0,this.tribe.push("SN"),this.text=`Activate: Give another creature Poison ${this.boof135}.`}pcoilT(t){return this.makeOtherCreatTarg(t)}pcoilA(t,i){t.addPoison(this.boof135)}pcoilE(t,i){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof135})}siggyC(){this.faction="N",this.rarity="H",this.name="Sigmund Fraud",this.jr1=this.boof357,this.jr2=this.lValN([9,14,19]),this.initDefend=!0,this.tribe.push("AB");const t=this.boof4812;this.text=`Activate, destroy another friendly creature: Deal ${t} damage to the enemy player and you gain ${t} health.`}siggyT(t){const i=this.makeOtherCreatTarg(t);return i.player="F",i}siggyA(t,i){a.death.destroy(t,this.code);const e=this.boof4812;a.player.ddf3(!i.owner,e,this.code),a.player.healPlayer(i.owner,e)}siggyE(t,i){const e=d.ddp7(t,t.playerA,t.lane,"SD"),s=this.boof4812;return e.vectors.push(d.evalVectorPlayerDmg(!i.owner,s),d.evalVectorPlayerLife(i.owner,s)),e}srmdC(){this.faction="N",this.rarity="H",this.name="Sorrow Maiden",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("HM"),this.bonus={exist:this.ddp6()},this.text=`Activate: Destroy an enemy creature with ${this.jr1} or less attack.`}srmdT(t){const i=this.makeCreatTarg(t);return i.player="E",i.maxAttack=this.jr1,i}srmdA(t,i){a.death.destroy(t,this.code)}srmdE(t,i){return d.ddp7(t,t.playerA,t.lane)}ssaC(){this.faction="N",this.rarity="H",this.name="Spitesower Acolyte",this.jr1=this.boof234,this.jr2=this.lValN([8,14,22]),this.tribe.push("HM");const t=this.boof246n;this.text=`Activate, deal ${-t} damage to ${this.name}: Give a creature ${a.log.jr9(t,t)}.`}ssaT(t){return this.makeCreatTarg(t)}ssaA(t,i){const e=this.boof246n,s=Date.now();i.hurtDirect(-e,this.code,s),t.buff(e,e,s)}ssaE(t,i){const e=this.boof246n,s=d.actionEvalBuffN(t,t.playerA,t.lane,e,e);return s.vectors.push(d.ddp1(i.owner,i.lane,{dmg:-e})),s}swmC(){this.faction="A",this.rarity="R",this.name="Steelwelder Medic",this.jr1=this.lValN([3,5,13]),this.jr2=this.boof61014,this.tribe.push("HM"),this.text=`Activate: Give another creature Armor ${this.level}.`}swmT(t){const i=this.makeOtherCreatTarg(t);return i.canArmor=!0,i}swmA(t,i){t.addArmor(this.level)}swmE(t,i){return d.ddp2(t,t.playerA,t.lane,{arm:this.level})}ucmC(){this.faction="T",this.rarity="R",this.name="Uranti Cryomancer",this.jr1=this.boof247,this.jr2=this.lValN([8,13,17]),this.tribe.push("IC","YT"),this.text=`Activate: Deal ${this.boof135} damage to a creature.`}ucmT(t){return this.makeCreatTarg(t)}ucmA(t,i){t.hurtDirect(this.boof135,this.code)}ucmE(t,i){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof135})}uimC(){this.faction="T",this.rarity="C",this.name="Uranti Icemage",this.jr1=this.lValN([2,5,9]),this.jr2=this.lValN([8,13,20]),this.tribe.push("IC","YT"),this.text="Activate: Negate Defender this turn."}uimT(t){return this.makeCreatTarg(t)}uimA(t,i){const e=d.mod("ND",!0,i.id);e.expiry="ET",t.addMod(e)}uimE(t,i){return d.ddp2(t,t.playerA,t.lane,{noD:!0})}warmC(){this.faction="A",this.rarity="H",this.name="War Merchant",this.jr1=this.boof468,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("HM"),this.text=`Activate: Give a creature in a center lane ${a.log.jr9(this.jr1,this.level===3?this.jr1:0)}.`}warmT(t){const i=this.makeCreatTarg(t);return i.lanes=3,i}warmA(t,i){t.buff(this.jr1,this.level===3?this.jr1:0)}warmE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.jr1,this.level===3?this.jr1:0)}wwrC(){this.faction="U",this.rarity="C",this.name="Weirwood Ranger",this.jr1=this.boof51015,this.jr2=this.jr1-1,this.tribe.push("HM"),this.text=`Activate: Give another creature ${a.log.jr9(this.level,this.level)}.`}wwrT(t){return this.makeOtherCreatTarg(t)}wwrA(t,i){t.buff(this.level,this.level)}wwrE(t,i){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level)}wfsC(){this.faction="N",this.rarity="H",this.name="Witherfrost Succubus",this.jr1=this.boof147,this.jr2=this.boof61018,this.tribe.push("DM");const t=-this.boof357;this.text=`Activate: Give a creature ${a.log.jr9(t,t)} this turn.`}wfsT(t){return this.makeCreatTarg(t)}wfsA(t,i){const e=-this.boof357,s=d.mod("AT",e,i.id);s.expiry="ET",t.addMod(s);const l=d.mod("HL",e,i.id);l.expiry="ET",t.addMod(l);const u=d.mod("MH",e,i.id);u.expiry="ET",t.addMod(u)}wfsE(t,i){const e=-this.boof357;return d.actionEvalBuffN(t,t.playerA,t.lane,e,e)}shambC(){this.faction="N",this.rarity="L",this.name="Xithian Shambler",this.jr1=this.boof369,this.jr2=this.jr1+1,this.tribe.push("AB");let t="",i=1;this.level===3&&(t="~You may use this ability twice per turn.",i=2),this.text=`Activate, destroy an adjacent creature: ${this.name} moves into that creature's lane, then gets +attack and +health equal to that creature's attack and health.${t}`,this.hints=["LJ"];const e=this.avgCreatureStats();this.bonus={exist:this.ddp9(-1,e[0]+e[1],e[0],0)*i}}shambT(t){const i=d.crFriendActTarg("CARD",this.code,t.id);return i.lanes=t.adjacent,i}shambA(t,i){const e=t.attack,s=t.health;a.death.destroy(t,this.code),i.move(t.lane),i.buff(e,s)}shambE(t,i){const e=a.field.ddf6(t),s=d.actionEvalBuffC(t,i,e.attack,e.health),l=d.ddp1(e.owner,e.lane);l.destroy=!0;const u=d.ddp1(i.owner,i.lane);return u.moveTo=t.lane,s.vectors.push(l,u),s}zpmC(){this.faction="T",this.rarity="R",this.name="Zephyr Mage",this.jr1=this.boof4813,this.jr2=this.boof61017,this.tribe.push("WN","AS"),this.text=`Activate: Give another ${a.log.levelGateText(this.level,!0)}creature Mobility ${this.level}.`}zpmT(t){const i=this.makeOtherCreatTarg(t);return i.level=a.target.ddf2(this.level),i.canMove=!0,i}zpmA(t,i){t.addMobility(this.level)}zpmE(t,i){const e=d.ddp2(t,t.playerA,t.lane);return e.bonus=.5,e}}class ce extends E{lookup(t){return{["CMF"]:{c:()=>this.aconC(),f:(e,s)=>this.aconF(e,s),e:e=>this.aconE(e)},["FLH"]:{c:()=>this.flhC(),f:(e,s)=>this.flhF(e,s),e:e=>this.flhE(e)},["TBB"]:{c:()=>this.tbbC(),f:(e,s)=>this.tbbF(e,s),e:e=>this.tbbE(e)}}[t]}targAction(t,i,e){this.lookup(t).f(i,e)}targEval(t,i){return this.lookup(t).e(i)}playTarg;optional=!1;notme=!1;ftext="";constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c(),this.text="Assault: "+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("AS",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.targAction(this.cardCode(),i,e),a.action.actionDone(!0)}jr8(t){this.notme&&(this.playTarg.notMe=t.creatId);const i=a.target.toActions(this.playTarg);i.length>0?(i.forEach(e=>{e.param=t.creatId}),this.optional&&i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}ddf7(t){return this.targEval(this.cardCode(),t)}aconC(){this.faction="N",this.rarity="R",this.name="Calamity Fiend",this.jr1=this.boof4814,this.jr2=this.lValN([5,10,16]),this.tribe.push("DM"),this.hints=["ENS","OL"];const t=this.boof234;this.bonus={play:this.ddp9(0,2*t,t,0)},this.playTarg.player="E",this.ftext=`Give an enemy creature ${a.log.jr9(-t,-t)}.`}aconF(t,i){const e=-this.boof234;t.buff(e,e)}aconE(t){const i=-this.boof234;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}flhC(){this.faction="T",this.rarity="C",this.name="Firelight Hunter",this.jr1=this.boof468,this.jr2=this.jr1-2,this.tribe.push("HM"),this.hints=["ENS","OL"],this.bonus={play:this.ddp9(0,this.jr1,0,0)},this.playTarg.player="E",this.ftext=`Deal ${this.jr1} to an enemy creature.`}flhF(t,i){t.hurtDirect(this.jr1,this.code)}flhE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.jr1})}tbbC(){this.faction="T",this.rarity="R",this.name="Totembound Berserker",this.jr1=this.boof81318,this.jr2=this.lValN([2,4,10]),this.tribe.push("GT"),this.hints=["ENS","OL"],this.playTarg.player="E",this.playTarg.level=a.target.ddf2(this.level),this.optional=!0,this.ftext=`You may move an enemy ${a.log.levelGateText(this.level,!0)}creature to the space opposing ${this.name}.`}tbbF(t,i){i.opposed||t.move(a.field.oppositeLane(i.lane))}tbbE(t){const i=a.field.jr5(t.param),e=d.actionEval(t,"MC"),s=d.ddp1(t.playerA,t.lane);return s.moveTo=a.field.oppositeLane(i.lane),e.vectors.push(s),e}}class _ extends E{lookup(t){return{["AGC"]:{c:()=>this.aconC(),f:(e,s)=>this.aconF(e,s),e:e=>this.aconE(e)},["BTI"]:{c:()=>this.binvC(),f:(e,s)=>this.binvF(e,s),e:e=>this.binvE(e)},["BSR"]:{c:()=>this.bsrC(),f:(e,s)=>this.bsrF(e,s),e:e=>this.bsrE(e)},["BAW"]:{c:()=>this.bawC(),f:(e,s)=>this.bawF(e,s),e:e=>this.bawE(e)},["CHA"]:{c:()=>this.chaC(),f:(e,s)=>this.chaF(e,s),e:e=>this.chaE(e)},["CCR"]:{c:()=>this.ccC(),f:(e,s)=>this.ccF(e,s),e:e=>this.ccE(e)},["FRI"]:{c:()=>this.friC(),f:(e,s)=>this.friF(e,s),e:e=>this.friE(e)},["FRV"]:{c:()=>this.freavC(),f:(e,s)=>this.freavF(e,s),e:e=>this.freavE(e)},["GLF"]:{c:()=>this.gfiendC(),f:(e,s)=>this.gfiendF(e,s),e:e=>this.gfiendE(e)},["GRW"]:{c:()=>this.grwC(),f:(e,s)=>this.grwF(e,s),e:e=>this.grwE(e)},["GHT"]:{c:()=>this.grhC(),f:(e,s)=>this.grhF(e,s),e:e=>this.grhE(e)},["MMH"]:{c:()=>this.houndC(),f:(e,s)=>this.houndF(e,s),e:e=>this.houndE(e)},["MXW"]:{c:()=>this.mtxC(),f:(e,s)=>this.mtxF(e,s),e:e=>this.mtxE(e)},["NGB"]:{c:()=>this.ngbC(),f:(e,s)=>this.ngbF(e,s),e:e=>this.ngbE(e)},["PHS"]:{c:()=>this.phxsC(),f:(e,s)=>this.phxsF(e,s),e:e=>this.phxsE(e)},["STD"]:{c:()=>this.stdC(),f:(e,s)=>this.stdF(e,s),e:e=>this.stdE(e)},["SEV"]:{c:()=>this.surzC(),f:(e,s)=>this.surzF(e,s),e:e=>this.surzE(e)},["VNF"]:{c:()=>this.vnfC(),f:(e,s)=>this.vnfF(e,s),e:e=>this.vnfE(e)},["WBY"]:{c:()=>this.wbyC(),f:(e,s)=>this.wbyF(e,s),e:e=>this.wbyE(e)},["WBU"]:{c:()=>this.wbuC(),f:(e,s)=>this.wbuF(e,s),e:e=>this.wbuE(e)},["XDH"]:{c:()=>this.dogsC(),f:(e,s)=>this.dogsF(e,s),e:e=>this.dogsE(e)}}[t]}targAction(t,i,e){this.lookup(t).f(i,e)}targEval(t,i){return this.lookup(t).e(i)}playTarg;optional=!1;notme=!1;ftext="";forges=!0;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c(),this.forges&&(this.text="Forge: "+this.ftext),this.ftext=""}jr3(t,i){const e=super.jr3(t,i);if(this.forges){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);this.targAction(this.cardCode(),i,e),a.action.actionDone(!0)}jr8(t){this.notme&&(this.playTarg.notMe=t.creatId);const i=a.target.toActions(this.playTarg);i.length>0?(i.forEach(e=>{e.param=t.creatId}),this.optional&&i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}ddf7(t){return this.targEval(this.cardCode(),t)}aconC(){this.faction="A",this.rarity="C",this.name="Aegis Conscript",this.jr1=this.boof3612,this.jr2=this.boof6915,this.tribe.push("HM"),this.hints=["FRO"],this.bonus={play:this.ddp9(0,this.boof248,0,0)},this.playTarg.canArmor=!0,this.playTarg.player="F",this.ftext=`Give a friendly creature Armor ${this.boof124}.`}aconF(t,i){t.addArmor(this.boof124)}aconE(t){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof124})}binvC(){this.faction="A",this.rarity="C",this.name="Battletech Inventor",this.jr1=this.boof369,this.jr2=this.jr1,this.tribe.push("MM"),this.hints=["ENS"],this.playTarg.player="E",this.ftext=`Give an enemy creature ${a.log.jr9(-this.jr1,0)}.`,this.bonus={play:this.ddp9(0,this.jr1,this.jr1,0)}}binvF(t,i){t.buff(-this.jr1,0)}binvE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.jr1)}bsrC(){if(this.faction="N",this.rarity="R",this.name="Bonescythe Reaver",this.jr1=this.boof5813,this.jr2=this.boof3712,this.tribe.push("AB"),this.hints=["ENS"],this.bonus={play:this.ddp6()},this.forges=this.level>1,this.forges){const t=this.level-1;this.hints=["ENS"],this.bonus={play:this.ddp6(t)},this.playTarg.level=a.target.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${a.log.levelGateText(t)} enemy creature.`,this.optional=!0}else this.hints=["LV"]}bsrF(t,i){a.death.destroy(t,this.code)}bsrE(t){return d.ddp7(t,t.playerA,t.lane)}bawC(){this.faction="U",this.rarity="R",this.name="Brambleaxe Warrior",this.jr1=this.boof61014,this.jr2=this.jr1-4,this.tribe.push("HM"),this.hints=["FRO"];const t=this.avgCreatureStats()[0];this.bonus={play:this.ddp9(0,0,t,t)},this.ftext="Give a creature Breakthrough this turn."}bawF(t,i){const e=d.mod("BT",!0,i.id);e.expiry="ET",t.addMod(e)}bawE(t){return d.ddp2(t,t.playerA,t.lane,{brt:!0})}chaC(){this.faction="U",this.rarity="R",this.name="Chistlehearth Archer",this.jr1=this.boof2510,this.jr2=this.jr1+7,this.tribe.push("HM"),this.hints=["ENS"];const t=this.boof4816;this.bonus={play:this.ddp9(0,t/2,0,0)},this.playTarg.player="E",this.playTarg.hasMobility=!0,this.ftext=`Deal ${t} damage to an enemy creature with Mobility. Negate Mobility from that creature.`}chaF(t,i){t.hurtDirect(this.boof4816,this.code),t.negateMobility=!0}chaE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof4816})}ccC(){this.faction="N",this.rarity="C",this.name="Corpse Crawler",this.jr1=this.boof81220,this.jr2=this.jr1+1,this.tribe.push("AB"),this.hints=["SD"],this.playTarg.player="F",this.ftext="Destroy a friendly creature."}ccF(t,i){a.death.destroy(t,this.code)}ccE(t){return d.ddp7(t,t.playerA,t.lane,"SD")}friC(){this.faction="T",this.rarity="C",this.name="Flamerift Instigator",this.jr1=this.lValN([7,12,17]),this.jr2=this.jr1-5,this.tribe.push("GT"),this.ftext="Negate Defender from a creature."}friF(t,i){t.negateDefender=!0}friE(t){return d.ddp2(t,t.playerA,t.lane,{noD:!0})}freavC(){if(this.faction="N",this.rarity="R",this.name="Fleshreaver",this.jr1=this.boof6915,this.jr2=this.boof235,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.hints=["ENS"],this.bonus={play:this.ddp6(t)},this.consistent=!0,this.playTarg.level=a.target.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${a.log.levelGateText(t)} enemy creature.`,this.optional=!0}else this.hints=["LV"]}freavF(t,i){a.death.destroy(t,this.code)}freavE(t){return d.ddp7(t,t.playerA,t.lane)}get fiendBof(){return this.lValN([-1,-2,-5])}gfiendC(){this.faction="N",this.rarity="C",this.name="Gloomfiend",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("AB"),this.hints=["ENS"],this.playTarg.player="E";const t=this.fiendBof;this.ftext=`You may give an enemy creature ${a.log.jr9(t,t)}.`,this.optional=!0,this.bonus={play:this.ddp9(0,-2*t,-t,0)}}gfiendF(t,i){const e=this.fiendBof;t.buff(e,e)}gfiendE(t){const i=this.fiendBof;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}grwC(){this.faction="N",this.rarity="C",this.name="Gloomreaper Witch",this.jr1=this.boof5915,this.jr2=this.jr1,this.tribe.push("HM"),this.hints=["ENS"],this.bonus={play:this.ddp6()/4};const t=this.boof147;this.playTarg.maxAttack=t,this.playTarg.player="E",this.ftext=`You may destroy an enemy creature with ${t} or less attack.`,this.optional=!0}grwF(t,i){a.death.destroy(t,this.code)}grwE(t){return d.ddp7(t,t.playerA,t.lane)}grhC(){this.faction="U",this.rarity="C",this.name="Grove Huntress",this.jr1=this.boof4711,this.jr2=this.jr1-1,this.tribe.push("HM"),this.playTarg.player="F";const t=this.boof135;this.ftext=`Give a friendly creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}grhF(t,i){const e=this.boof135;t.buff(e,e)}grhE(t){const i=this.boof135;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}houndC(){this.faction="T",this.rarity="C",this.name="Magma Hound",this.jr1=this.boof4813,this.jr2=this.jr1-1,this.tribe.push("ER","EL"),this.hints=["ENS"];const t=this.boof246;this.optional=!0,this.playTarg.player="E",this.ftext=`You may deal ${t} damage to an enemy creature.`,this.bonus={play:this.ddp9(0,t,0,0)}}houndF(t,i){t.hurtDirect(this.boof246,this.code)}houndE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof246})}mtxC(){this.faction="A",this.rarity="C",this.name="Matrix Warden",this.jr1=this.lValN([3,8,12]),this.jr2=this.jr1,this.tribe.push("RB");const t=this.boof3510;this.playTarg.player="F",this.ftext=`Give a friendly creature ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}mtxF(t,i){t.buff(this.boof3510,0)}mtxE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof3510)}ngbC(){this.faction="T",this.rarity="C",this.name="Nargath Bruiser",this.jr1=this.boof5814,this.jr2=this.jr1-1,this.tribe.push("ER","AS");const t=this.boof248;this.playTarg.player="F",this.ftext=`Give a friendly creature ${a.log.jr9(0,t)}.`,this.bonus={play:this.ddp9(0,t,0,0)}}ngbF(t,i){t.buff(0,this.boof248)}ngbE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof248)}phxsC(){this.faction="A",this.rarity="R",this.name="Phalanx Squadron",this.jr1=this.boof3714,this.jr2=this.boof61117,this.tribe.push("HM"),this.hints=["FRO"],this.playTarg.hasArmor=!0,this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature with Armor ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t,t/2,0)}}phxsF(t,i){const e=this.boof234;t.buff(e,e)}phxsE(t){const i=this.boof234;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}stdC(){this.faction="A",this.rarity="H",this.name="Shardthief Druid",this.jr1=this.boof5813,this.jr2=this.boof81318,this.tribe.push("MM"),this.hints=["ENS"],this.playTarg.canRegen,this.playTarg.player="E",this.ftext=`Negate and remove all Regenerate from an enemy creature. ${this.name} gets that much Renerate.`,this.bonus={play:this.ddp9(0,2,0,0)}}stdF(t,i){const e=t.regen;t.negateRegen=!0,i.addRegen(e)}stdE(t){const i=a.field.ddf6(t);return d.ddp3(t,i,{rgn:-i.regen})}surzC(){this.faction="N",this.rarity="L",this.name="Suruzal, Emissary of Varna",this.jr1=this.boof4814,this.jr2=this.jr1-1,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="F",this.playTarg.level=a.target.ddf2(this.level),this.ftext=`You may destroy another friendly ${a.log.levelGateText(this.level,!0)}creature. If you do, spawn a copy of it.`}surzF(t,i){const e=Date.now();a.death.destroy(t,this.code,e),a.field.birthCreature(t.code,"S",i.owner,void 0,e)}surzE(t){const i=a.field.ddf6(t),e=a.cards.getCard(i.code),s=e.jr3(t.playerA,t.lane),l=d.ddp7(t,t.playerA,t.lane);return l.bonus=At.creatValueFormula(s)+1+e.bonusExist(),l}vnfC(){this.faction="U",this.rarity="R",this.name="Venomfang",this.jr1=this.boof61014,this.jr2=this.jr1-2,this.tribe.push("SN");const t=this.boof246;this.playTarg.player="E",this.ftext=`Give an enemy creature Poison ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}vnfF(t,i){t.addPoison(this.boof246)}vnfE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof246})}wbyC(){this.faction="T",this.rarity="R",this.name="Wallbreaker Yeti",this.jr1=this.boof4712,this.jr2=this.boof71116,this.tribe.push("ER","YT"),this.hints=["ENS"],this.bonus={play:this.ddp6()/4},this.playTarg.player="E",this.playTarg.level=a.target.ddf2(this.level),this.playTarg.hasDefender=!0,this.ftext=`You may destroy a ${a.log.levelGateText(this.level,!0)}enemy creature with Defender.`,this.optional=!0}wbyF(t,i){a.death.destroy(t,this.code)}wbyE(t){return d.ddp7(t,t.playerA,t.lane)}wbuC(){this.faction="T",this.rarity="C",this.name="Warbringer Uranti",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("LT","YT"),this.hints=["FRO"];const t=this.boof4812;this.notme=!0,this.playTarg.player="F",this.ftext=`Give another friendly creature ${a.log.jr9(t,0)} this turn.`,this.bonus={play:this.ddp9(0,t,t,0)}}wbuF(t,i){const e=d.mod("AT",this.boof4812,i.id);e.expiry="ET",t.addMod(e)}wbuE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof4812)}dogsC(){this.faction="N",this.rarity="R",this.name="Xithian Direhound",this.jr1=4,this.jr2=4,this.tribe.push("AB"),this.hints=["ENS"],this.overload=!0,this.maxLevel=1,this.optional=!0,this.playTarg.player="E",this.ftext=`You may give an enemy creature ${a.log.jr9(-4,-4)}.`,this.bonus={play:this.ddp9(0,8,4,0)}}dogsF(t,i){t.buff(-4,-4)}dogsE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-4,-4)}}class P extends Q{lookup(t){return{["AGW"]:{c:()=>this.awingC(),z:e=>this.awingZ(e),e:e=>this.awingE(e)},["ASG"]:{c:()=>this.asurgeC(),z:e=>this.asurgeZ(e),e:e=>this.asurgeE(e)},["ATZ"]:{c:()=>this.anatC(),z:e=>this.anatZ(e),e:e=>this.anatE(e)},["AQE"]:{c:()=>this.aqatC(),z:e=>this.aqatZ(e),e:e=>this.aqatE(e)},["ABL"]:{c:()=>this.ablC(),z:e=>this.ablZ(e),e:e=>this.ablE(e)},["BTM"]:{c:()=>this.botC(),z:e=>this.botZ(e),e:e=>this.botE(e)},["CSU"]:{c:()=>this.csurgeC(),z:e=>this.csurgeZ(e),e:e=>this.csurgeE(e)},["CTW"]:{c:()=>this.cullC(),z:e=>this.cullZ(e),e:e=>this.cullE(e)},["CTV"]:{c:()=>this.cultC(),z:e=>this.cultZ(e),e:e=>this.cultE(e)},["CAG"]:{c:()=>this.cypaC(),z:e=>this.cypaZ(e),e:e=>this.cypaE(e)},["CBS"]:{c:()=>this.cypbC(),z:e=>this.cypbZ(e),e:e=>this.cypbE(e)},["DBT"]:{c:()=>this.dreadC(),z:e=>this.dreadZ(e),e:e=>this.dreadE(e)},["DYB"]:{c:()=>this.drybC(),z:e=>this.drybZ(e),e:e=>this.drybE(e)},["ETN"]:{c:()=>this.elnC(),z:e=>this.elnZ(e),e:e=>this.elnE(e)},["ENP"]:{c:()=>this.enpC(),z:e=>this.enpZ(e),e:e=>this.enpE(e)},["ENR"]:{c:()=>this.rageC(),z:e=>this.rageZ(e),e:e=>this.rageE(e)},["EXD"]:{c:()=>this.expdmC(),z:e=>this.expdmZ(e),e:e=>this.expdmE(e)},["FIN"]:{c:()=>this.feralC(),z:e=>this.feralZ(e),e:e=>this.feralE(e)},["FVA"]:{c:()=>this.fervassC(),z:e=>this.fervassZ(e),e:e=>this.fervassE(e)},["FLN"]:{c:()=>this.flncC(),z:e=>this.flncZ(e),e:e=>this.flncE(e)},["FFL"]:{c:()=>this.ffldC(),z:e=>this.ffldZ(e),e:e=>this.ffldE(e)},["FZS"]:{c:()=>this.frozC(),z:e=>this.frozZ(e),e:e=>this.frozE(e)},["GTH"]:{c:()=>this.ghastC(),z:e=>this.ghastZ(e),e:e=>this.ghastE(e)},["GCR"]:{c:()=>this.crushC(),z:e=>this.crushZ(e),e:e=>this.crushE(e)},["HAR"]:{c:()=>this.hartC(),z:e=>this.hartZ(e),e:e=>this.hartE(e)},["IFR"]:{c:()=>this.izftC(),z:e=>this.izftZ(e),e:e=>this.izftE(e)},["JPK"]:{c:()=>this.jpC(),z:e=>this.jpZ(e),e:e=>this.jpE(e)},["LBR"]:{c:()=>this.lbrandC(),z:e=>this.lbrandZ(e),e:e=>this.lbrandE(e)},["LYS"]:{c:()=>this.shartC(),z:e=>this.shartZ(e),e:e=>this.shartE(e)},["MPH"]:{c:()=>this.morphC(),z:e=>this.morphZ(e),e:e=>this.morphE(e)},["MSC"]:{c:()=>this.sculptC(),z:e=>this.sculptZ(e),e:e=>this.sculptE(e)},["NNS"]:{c:()=>this.nanoC(),z:e=>this.nanoZ(e),e:e=>this.nanoE(e)},["NSL"]:{c:()=>this.natselC(),z:e=>this.natselZ(e),e:e=>this.natselE(e)},["NCF"]:{c:()=>this.nflayC(),z:e=>this.nflayZ(e),e:e=>this.nflayE(e)},["NCV"]:{c:()=>this.nviveC(),z:e=>this.nviveZ(e),e:e=>this.nviveE(e)},["OEX"]:{c:()=>this.oexpC(),z:e=>this.oexpZ(e),e:e=>this.oexpE(e)},["PTR"]:{c:()=>this.pwtorC(),z:e=>this.pwtorZ(e),e:e=>this.pwtorE(e)},["PSG"]:{c:()=>this.psurgeC(),z:e=>this.psurgeZ(e),e:e=>this.psurgeE(e)},["PMS"]:{c:()=>this.pslamC(),z:e=>this.pslamZ(e),e:e=>this.pslamE(e)},["ROG"]:{c:()=>this.rotgC(),z:e=>this.rotgZ(e),e:e=>this.rotgE(e)},["SAP"]:{c:()=>this.sapC(),z:e=>this.sapZ(e),e:e=>this.sapE(e)},["SVO"]:{c:()=>this.soathC(),z:e=>this.soathZ(e),e:e=>this.soathE(e)},["SOC"]:{c:()=>this.scythC(),z:e=>this.scythZ(e),e:e=>this.scythE(e)},["SOA"]:{c:()=>this.soaC(),z:e=>this.soaZ(e),e:e=>this.soaE(e)},["SOD"]:{c:()=>this.sodC(),z:e=>this.sodZ(e),e:e=>this.sodE(e)},["SOT"]:{c:()=>this.sotC(),z:e=>this.sotZ(e),e:e=>this.sotE(e)},["SHG"]:{c:()=>this.shgrC(),z:e=>this.shgrZ(e),e:e=>this.shgrE(e)},["SNB"]:{c:()=>this.snbC(),z:e=>this.snbZ(e),e:e=>this.snbE(e)},["SHV"]:{c:()=>this.sharvC(),z:e=>this.sharvZ(e),e:e=>this.sharvE(e)},["SRP"]:{c:()=>this.sreapC(),z:e=>this.sreapZ(e),e:e=>this.sreapE(e)},["STR"]:{c:()=>this.sttorC(),z:e=>this.sttorZ(e),e:e=>this.sttorE(e)},["STO"]:{c:()=>this.sptorC(),z:e=>this.sptorZ(e),e:e=>this.sptorE(e)},["SOV"]:{c:()=>this.sovC(),z:e=>this.sovZ(e),e:e=>this.sovE(e)},["STN"]:{c:()=>this.stbrnC(),z:e=>this.stbrnZ(e),e:e=>this.stbrnE(e)},["STP"]:{c:()=>this.ssperC(),z:e=>this.ssperZ(e),e:e=>this.ssperE(e)},["SIN"]:{c:()=>this.sinC(),z:e=>this.sinZ(e),e:e=>this.sinE(e)},["TGL"]:{c:()=>this.tanglC(),z:e=>this.tanglZ(e),e:e=>this.tanglE(e)},["TPT"]:{c:()=>this.tpactC(),z:e=>this.tpactZ(e),e:e=>this.tpactE(e)},["TUP"]:{c:()=>this.tugC(),z:e=>this.tugZ(e),e:e=>this.tugE(e)},["TOT"]:{c:()=>this.totsC(),z:e=>this.totsZ(e),e:e=>this.totsE(e)},["TOB"]:{c:()=>this.blightC(),z:e=>this.blightZ(e),e:e=>this.blightE(e)},["TXS"]:{c:()=>this.sporeC(),z:e=>this.sporeZ(e),e:e=>this.sporeE(e)},["TCG"]:{c:()=>this.tremcC(),z:e=>this.tremcZ(e),e:e=>this.tremcE(e)},["VSK"]:{c:()=>this.vensC(),z:e=>this.vensZ(e),e:e=>this.vensE(e)},["VGR"]:{c:()=>this.vgraC(),z:e=>this.vgraZ(e),e:e=>this.vgraE(e)},["VOB"]:{c:()=>this.vobC(),z:e=>this.vobZ(e),e:e=>this.vobE(e)},["VYE"]:{c:()=>this.vembC(),z:e=>this.vembZ(e),e:e=>this.vembE(e)},["UBL"]:{c:()=>this.uboltC(),z:e=>this.uboltZ(e),e:e=>this.uboltE(e)},["WMM"]:{c:()=>this.warC(),z:e=>this.warZ(e),e:e=>this.warE(e)},["XRW"]:{c:()=>this.xwillC(),z:e=>this.xwillZ(e),e:e=>this.xwillE(e)}}[t]}cardCast(t,i){this.lookup(t).z(i)}castEval(t,i){return this.lookup(t).e(i)}playTarg;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return this.cardCode()==="NSL"&&a.field.creatByTarget(d.crFriendTarg()).length<5||t.push(this.playTarg),t}handleAction(t){this.logSpell();const i=a.field.ddf6(t);this.cardCast(this.cardCode(),i),a.turn.spellCast()}ddf7(t){return this.castEval(this.cardCode(),t)}ddf8(t){const i=ut.extractCardCode(t.trigger.logicCode);if(i==="TOB"&&t.trigger.type==="DM"){const e=t.event;if(e.battle&&e.creatureTarg&&e.creatureSrc&&e.source.id===t.creatId)return this.level===3?!0:a.cards.getCard(e.target.code).level<=this.level}else if((i==="ABL"||i==="OEX"||i==="VOB")&&t.trigger.type==="DM"){const e=t.event;return e.battle&&!e.creatureTarg&&e.creatureSrc&&e.source.id===t.creatId}else if((i==="FZS"||i==="IFR")&&t.trigger.type==="DM"){const e=t.event;if(e.creatureTarg&&e.target.id===t.creatId)return!0}else if(i==="DYB"&&t.trigger.type==="EF"){const e=t.event;return t.trigger.creatId!==e.creature.id&&e.creature.owner===t.ownerPlayerA}else if(i==="FVA"&&t.trigger.type==="FK"||i==="ROG"&&t.trigger.type==="DS"||i==="SHG"&&(t.trigger.type==="PT"||t.trigger.type==="VN")||(i==="IFR"||i==="OEX")&&t.trigger.type==="PT")return!0;return!1}jr8(t){const i=ut.extractCardCode(t.trigger.logicCode);if(i==="TOB"){const s=t.event.target;a.death.destroy(s,this.code)}else if(i==="ABL")a.field.jr5(t.creatId).buff(this.level,this.level);else if(i==="FVA"){const e=a.field.jr5(t.creatId),s=a.field.searchByLane(a.field.oppositeLane(e.lane),!e.owner);s&&s.hurtDirect(this.boof3612,e.code)}else if(i==="FZS"||i==="IFR"&&t.trigger.type==="DM"){const e=a.field.jr5(t.creatId);e.status==="A"&&a.death.destroy(e,this.code)}else if(i==="ROG"||i==="DYB")a.field.jr5(t.creatId).buff(this.level,this.level);else if(i==="SHG"){if(t.trigger.type==="VN"){const e=t.event;a.field.birthCreature(e.creature.code,"S",t.ownerPlayerA)}else if(t.trigger.type==="PT"){const e=t.trigger.customCode,s=a.field.jr5(t.creatId);s.triggers.filter(u=>u.customCode===e).forEach(u=>s.removeTrigger(u))}}else if(i==="IFR"&&t.trigger.type==="PT"){const e=a.deTil(t.trigger.customCode),s=e[1];if(e[0]==="P2")t.trigger.customCode=a.enTil("P1",s);else{const l=a.field.jr5(t.creatId),u=l.triggers.find(p=>p.customCode===s);u&&l.removeTrigger(u),l.removeTrigger(t.trigger)}}else if(i==="OEX"){if(t.trigger.type==="DM"){const e=t.event,s=a.field.qEnemyCreats(),l=s.length,u=Date.now();let p;l>0&&(this.level===1?p=[s[a.randInt(0,l)]]:this.level===2?(p=s.splice(a.randInt(0,l),1),s.length>0&&p.push(s[a.randInt(0,l-1)])):p=s,p.forEach(y=>y.hurtDirect(e.dmg,this.code,u)))}else if(t.trigger.type==="PT"){const e=t.trigger.customCode,s=a.field.jr5(t.creatId);s.triggers.filter(u=>u.customCode===e).forEach(u=>s.removeTrigger(u))}}else if(i==="VOB"){const e=t.event;e.source.hurtDirect(e.dmg,this.code)}else super.jr8(t);a.batch.triggerDone()}awingC(){this.faction="A",this.rarity="R",this.name="Aegis Wings",this.text=`Give a creature ${a.log.jr9(this.boof369,0)}. Then if that creature has the highest attack, it also gets Mobility 1 and Armor ${this.boof246}.`}awingZ(t){t.buff(this.boof369,0);const i=t.attack;this.bigchad(i)&&(t.addMobility(1),t.addArmor(this.boof246))}awingE(t){const i=a.field.ddf6(t),e=this.boof369,s=i.attack+e,l=this.bigchad(s)?this.boof246:0;return d.ddp2(t,t.playerA,t.lane,{att:e,arm:l},"GM")}bigchad(t){return a.field.qActiveCreats().every(i=>i.attack<=t)}asurgeC(){this.faction="T",this.rarity="R",this.name="Aerial Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.playTarg.canMove=!0,this.text=`Give a creature Mobility ${this.level}.`}asurgeZ(t){t.addMobility(this.level)}asurgeE(t){return d.actionEval(t,"ST","GM")}anatC(){this.faction="A",this.rarity="C",this.name="Anatomize",this.text=`Give a creature ${a.log.jr9(-this.boof4816,0)}.~You may play an additional ${this.name} this turn.`}anatZ(t){t.buff(-this.boof4816,0);const i=a.turn.freeCard(this.code);i.condition.cardCode="ATZ"}anatE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.boof4816)}aqatC(){this.faction="T",this.rarity="C",this.name="Aquatic Embrace",this.text=`Give a creature ${a.log.jr9(0,this.boof51015)}.`}aqatZ(t){t.buff(0,this.boof51015)}aqatE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,0,this.boof51015)}ablC(){this.faction="T",this.rarity="R",this.name="Asir's Blessing",this.text=`Give a creature "When this creature ${a.log.dbdtap()}, it gets ${a.log.jr9(this.level,this.level)}."`}ablZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("OL")}ablE(t){const i=d.actionEval(t,"ST","OL");return i.bonus=.5,i}botC(){this.faction="U",this.rarity="H",this.name="Botanimate",this.text=`Replace an enemy ${a.log.levelGateText(this.level,!0)}creature with a 3/3 Sapling.`,this.playTarg.player="E",this.playTarg.level=a.target.ddf2(this.level)}botZ(t){a.field.birthCreature(`${"BOS"}${this.level}`,"R",t.owner,t.lane)}botE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"BOS"}${this.level}`);return i.hints=["RE"],i}csurgeC(){this.faction="N",this.rarity="R",this.name="Contagion Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]);const t=this.boof123n;this.text=`Give a creature ${a.log.jr9(t,t)}.`}csurgeZ(t){const i=this.boof123n;t.buff(i,i)}csurgeE(t){const i=this.boof123n;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cullC(){this.faction="N",this.rarity="C",this.name="Cull the Weak";const t=this.boof4814;this.text=`Destroy a creature with ${t} or less attack.`,this.playTarg.maxAttack=t}cullZ(t){a.death.destroy(t,this.code)}cullE(t){return d.ddp7(t,t.playerA,t.lane)}cultC(){this.faction="U",this.rarity="H",this.name="Cultivate";const t=this.boof91421;this.text=`Replace a friendly Plant with a ${t}/${t} Treefolk.`,this.playTarg.player="F",this.playTarg.tribe="PL"}cultZ(t){a.field.birthCreature(`${"TFF"}${this.level}`,"R",t.owner,t.lane)}cultE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"TFF"}${this.level}`);return i.hints=["RE"],i}cypaC(){this.faction="A",this.rarity="R",this.name="Cypien Augmentation",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]);const t=this.boof246;this.text=`Give a creature in a center lane ${a.log.jr9(t,t)}.`,this.playTarg.lanes=3}cypaZ(t){const i=this.boof246;t.buff(i,i)}cypaE(t){const i=this.boof246;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cypbC(){this.faction="A",this.rarity="C",this.name="Cypien Battlesuit",this.text=`Give an Alloyin creature ${a.log.jr9(this.boof51015,0)} and Armor ${this.boof124}.`,this.playTarg.faction="A"}cypbZ(t){t.buff(this.boof51015,0),t.addArmor(this.boof124)}cypbE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof51015,arm:this.boof124})}dreadC(){this.faction="N",this.rarity="H",this.name="Dreadbolt",this.hints=["LV"],this.text=`Destroy a ${a.log.levelGateText(this.level,!0)}creature.`,this.playTarg.level=a.target.ddf2(this.level)}dreadZ(t){a.death.destroy(t,this.code)}dreadE(t){return d.ddp7(t,t.playerA,t.lane)}drybC(){this.faction="U",this.rarity="R",this.name="Dryad's Boon",this.text=`Give a creature ${a.log.jr9(this.level,this.level,!0)}, and "When another friendly creature enters play, this gets ${a.log.jr9(this.level,this.level)}."`}drybZ(t){t.buff(this.level,this.level),t.changed=!0,t.jr4("EF",this.code),t.hints.push("BF")}drybE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level,"BF")}enpC(){this.faction="A",this.rarity="H",this.name="Energy Prison",this.isFree=this.level===3,this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature Defender.`,this.playTarg.canDefender=!0}enpZ(t){t.defender=!0}enpE(t){return d.ddp2(t,t.playerA,t.lane,{def:!0})}elnC(){this.faction="A",this.rarity="C",this.name="Electro Net",this.text=`Give a creature ${a.log.jr9(-this.boof51015,0)}.`}elnZ(t){t.buff(-this.boof51015,0)}elnE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.boof51015)}rageC(){this.faction="U",this.rarity="C",this.name="Enrage";const t=this.boof3612;this.text=`Give a creature ${a.log.jr9(t,t)}.`}rageZ(t){const i=this.boof3612;t.buff(i,i)}rageE(t){const i=this.boof3612;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}expdmC(){this.faction="N",this.rarity="H",this.name="Explosive Demise",this.text=`Destroy a friendly ${a.log.levelGateText(this.level+1,!0)}creature.~Deal damage equal to its attack to the enemy player.${this.level===3?"~You gain that much health.":""}`,this.playTarg.level=a.target.ddf2(this.level+1),this.playTarg.player="F"}expdmZ(t){const i=t.attack;a.death.destroy(t,this.code),a.player.ddf3("E",i,this.code),this.level===3&&a.player.healPlayer("F",i)}expdmE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return e.vectors.push(d.evalVectorPlayerDmg(!i.owner,i.attack)),this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(i.owner,i.attack)),e}get fiboof(){return this.lValN([1,3,8])}feralC(){this.faction="U",this.rarity="C",this.name="Feral Instinct";const t=this.fiboof;this.text=`Give a creature ${a.log.jr9(t,t,!0)} and Breakthrough.`}feralZ(t){const i=this.fiboof;t.breakthrough=!0,t.buff(i,i)}feralE(t){const i=this.fiboof;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,brt:!0})}fervassC(){this.faction="T",this.rarity="H",this.name="Fervent Assault",this.playTarg.player="F",this.text=`Give a friendly creature Mobility ${this.level} and "Flank: Deal ${this.boof3612} damage to the opposing creature.`}fervassZ(t){t.changed=!0,t.addMobility(this.level),t.jr4("FK",this.code),t.hints.push("FH")}fervassE(t){return d.actionEval(t,"ST","FH")}flncC(){this.faction="T",this.rarity="R",this.name="Flame Lance";const t=this.boof579;this.text=`Deal ${t} damage to an enemy creature and ${t} damage to the enemy player.`,this.playTarg.player="E"}flncZ(t){const i=this.boof579;t.hurtDirect(i,this.code),a.player.ddf3("E",i,this.code)}flncE(t){const i=this.boof579,e=d.ddp2(t,t.playerA,t.lane,{dmg:i});return e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i)),e}ffldC(){this.faction="A",this.rarity="C",this.name="Forcefield",this.playTarg.canArmor=!0,this.text=`Give a creature Armor ${this.boof51020} this turn.`}ffldZ(t){const i=d.mod("AR",this.boof51020,this.code);i.expiry="ET",t.addMod(i)}ffldE(t){return d.ddp2(t,t.playerA,t.lane,{arm:this.boof51020})}frozC(){this.faction="T",this.rarity="R",this.name="Frozen Solid",this.playTarg.level=a.target.ddf2(this.level),this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature "When this is dealt damage, destroy it".`}frozZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("DD")}frozE(t){return d.actionEval(t,"ST","DD")}ghastC(){this.faction="N",this.rarity="C",this.name="Ghastly Touch";const t=-this.boof3612;this.text=`Give a creature ${a.log.jr9(t,t)}.`}ghastZ(t){const i=-this.boof3612;t.buff(i,i)}ghastE(t){const i=-this.boof3612;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}crushC(){this.faction="T",this.rarity="C",this.name="Glacial Crush",this.isFree=this.level>1,this.isFree||(this.hints=["LV"]),this.playTarg.player="E",this.playTarg.hasDefender=!0,this.text=`Destroy an enemy creature with Defender.${this.level===3?" Deal damage equal to its health to the enemy player.":""}`}crushZ(t){const i=t.health;a.death.destroy(t,this.code),this.level===3&&a.player.ddf3(t.owner,i,this.code)}crushE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(i.owner,i.health)),e}hartC(){this.faction="A",this.rarity="C",this.name="Heavy Artillery",this.text=`Give a creature ${a.log.jr9(this.boof51015,0)}.`}hartZ(t){t.buff(this.boof51015,0)}hartE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof51015)}izftC(){this.faction="T",this.rarity="T",this.name="Iztek's Frost",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Until the end of the next turn, give a ${a.log.levelGateText(this.level+1,!0)}creature "When this is dealt damage, destroy it".`}izftZ(t){const i=a.genId(),e=t.jr4("DM",this.code);e.changes=!0,e.customCode=i;const s=t.jr4("PT",this.code);s.customCode=a.enTil("P2",i),t.hints.push("DD")}izftE(t){return d.actionEval(t,"ST","DD")}jpC(){this.faction="A",this.rarity="C",this.name="Jet Pack",this.text=`Give a creature ${a.log.jr9(this.boof369,0)} and Mobility 1.`}jpZ(t){t.buff(this.boof369,0),t.addMobility(1)}jpE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof369,void 0,"GM")}lbrandC(){this.faction="T",this.rarity="C",this.name="Lightning Brand",this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Give a ${a.log.levelGateText(this.level+1)}creature ${a.log.jr9(this.boof124,0)} and Aggressive this turn.`}lbrandZ(t){const i=d.mod("AT",this.boof124,this.code),e=d.mod("AG",!0,this.code);i.expiry="ET",e.expiry="ET",t.addMod(i),t.addMod(e)}lbrandE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof124,agr:!0})}shartC(){this.faction="U",this.rarity="R",this.name="Lysian Shard",this.overload=!0,this.maxLevel=1,this.text=`Give a creature ${a.log.jr9(6,6)}.`}shartZ(t){t.buff(6,6)}shartE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,6,6)}morphC(){this.faction="U",this.rarity="H",this.name="Metamorphosis",this.text=`Replace a ${a.log.levelGateText(this.level,!0)}creature with a 0/3 Feywing Chrysalis.`,this.playTarg.level=a.target.ddf2(this.level)}morphZ(t){a.field.birthCreature(`${"FWC"}1`,"R",t.owner,t.lane)}morphE(t){const i=d.ddp4(t,t.playerA,t.lane,`${"FWC"}1`);return i.hints=["RE"],i}sculptC(){this.faction="A",this.rarity="H",this.name="Metasculpt",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Remove all abilities from a ${a.log.levelGateText(this.level+1,!0)}creature.`}sculptZ(t){t.wipeAll()}sculptE(t){return d.actionEval(t,"ST","NT")}nanoC(){this.faction="A",this.rarity="R",this.name="Nanoswarm",this.playTarg.level=a.target.ddf2(this.level),this.text=`Give a ${a.log.levelGateText(this.level,!0)}creature ${a.log.jr9(-this.boof51015,0)} and remove all abilities from it.`}nanoZ(t){t.buff(-this.boof51015,0),t.wipeAll()}nanoE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,-this.boof51015,0,"NT")}natselC(){this.faction="U",this.rarity="R",this.name="Natural Selection",this.text=`If there is a friendly creature in each lane, destroy a ${a.log.levelGateText(this.level,!0)}creature.`,this.playTarg.level=a.target.ddf2(this.level)}natselZ(t){a.death.destroy(t,this.code)}natselE(t){return d.ddp7(t,t.playerA,t.lane)}nflayC(){this.faction="N",this.rarity="C",this.name="Necroflay";const t=-this.boof3711;this.text=`Give a creature ${a.log.jr9(t,t)}.~You may play an additional ${this.name} this turn.`}nflayZ(t){const i=-this.boof3711;t.buff(i,i);const e=a.turn.freeCard(this.code);e.condition.cardCode="NCF"}nflayE(t){const i=-this.boof3711;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}nviveC(){this.faction="N",this.rarity="C",this.name="Necrovive",this.playTarg.canRegen=!0,this.text=`Give a creature Regenerate ${this.boof3612}.`}nviveZ(t){t.addRegen(this.boof3612)}nviveE(t){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof3612})}oexpC(){this.faction="A",this.rarity="H",this.name="Oratek Explosives",this.playTarg.player="F",this.hints=["ALT"];const t=this.lValS(["an enemy creature at random","up to two enemy creatures at random","each enemy creature"]);this.text=`Give a friendly creature ${a.log.jr9(5,0)}.~Allied Tempys: This turn, when that creature ${a.log.dbdtap()}, deal that much damage to ${t}.`}oexpZ(t){if(t.buff(5,0),a.turn.allied("T")){const i=a.genId(),e=t.jr4("DM",this.code);e.changes=!0,e.customCode=i;const s=t.jr4("PT",this.code);s.customCode=i,t.hints.push("OL")}}oexpE(t){const i=d.actionEvalBuffN(t,t.playerA,t.lane,5,0,"OL");return i.bonus=.5,i}pwtorC(){this.faction="A",this.rarity="R",this.name="Power Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature ${a.log.jr9(this.boof234,0)}.`}pwtorZ(t){t.buff(this.boof234,0)}pwtorE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof234)}psurgeC(){this.faction="U",this.rarity="R",this.name="Primal Surge",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature ${a.log.jr9(this.level,this.level)}.`}psurgeZ(t){t.buff(this.level,this.level)}psurgeE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.level,this.level)}pslamC(){this.faction="T",this.rarity="C",this.name="Primordial Slam",this.text=`Give a creature ${a.log.jr9(this.boof71116,0)} this turn.`}pslamZ(t){const i=d.mod("AT",this.boof71116,this.code);i.expiry="ET",t.addMod(i)}pslamE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof71116)}rotgC(){this.faction="N",this.rarity="H",this.name="Rite of the Grimgaunt",this.text=`Give a creature "When a creature is destroyed, this gets ${a.log.jr9(this.level,this.level)}."`}rotgZ(t){t.changed=!0,t.jr4("DS",this.code),t.hints.push("BD")}rotgE(t){return d.actionEval(t,"ST","BD")}sapC(){this.faction="A",this.rarity="C",this.name="Sap",this.playTarg.level=a.target.ddf2(this.level),this.text=`Reduce a ${a.log.levelGateText(this.level,!0)}creature's attack to 0.`}sapZ(t){t.buff(-t.attack,0)}sapE(t){const i=a.field.ddf6(t);return d.actionEvalBuffC(t,i,-i.attack)}soathC(){this.faction="U",this.rarity="C",this.name="Savage Oath",this.level===1&&(this.hints=["LV"]);const t=this.saboof;this.text=`Give an Uterra creature ${a.log.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.faction="U"}soathZ(t){const i=this.saboof;t.buff(i,i),t.breakthrough=!0}soathE(t){const i=this.saboof;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,brt:!0})}get saboof(){return this.lValN([2,6,15])}scythC(){this.faction="N",this.rarity="L",this.name="Scythe of Chiron",this.hints=["ENS"];const t=this.boof246;this.playTarg.player="F",this.text=`Each enemy creature gets ${a.log.jr9(-t,0)}. Give a friendly creature ${a.log.jr9(t,0)} for each enemy creature.`}scythZ(t){const i=-this.boof246,e=a.field.qEnemyCreats();e.forEach(s=>{s.buff(i,0)}),e.length>0&&t.buff(-i*e.length,0)}scythE(t){const i=-this.boof246,e=a.field.qEnemyCreats(),s=d.actionEvalBuffN(t,t.playerA,t.lane,-i*e.length);return e.forEach(l=>{s.vectors.push(d.ddp1(l.owner,l.lane,{att:i}))}),s}soaC(){this.faction="A",this.rarity="C",this.name="Seal of Anvillon",this.level===1?this.hints=["LV"]:this.consistent=!0,this.text=`Give a creature ${a.log.jr9(this.ubzap,0)}.`}soaZ(t){t.buff(this.ubzap,0)}soaE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.ubzap)}sodC(){this.faction="U",this.rarity="C",this.name="Seal of Deepwood",this.level===1?this.hints=["LV"]:this.consistent=!0;const t=this.derpboof;this.text=`Give a creature ${a.log.jr9(t,t)}.`}sodZ(t){const i=this.derpboof;t.buff(i,i)}sodE(t){const i=this.derpboof;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get derpboof(){return this.lValN([1,6,12])}sotC(){this.faction="N",this.rarity="C",this.name="Seal of Tarsus",this.level===1?this.hints=["LV"]:this.consistent=!0;const t=this.tars;this.text=`Give a creature ${a.log.jr9(t,t)}.`}sotZ(t){const i=this.tars;t.buff(i,i)}sotE(t){const i=this.tars;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get tars(){return this.lValN([-2,-8,-16])}shgrC(){this.faction="N",this.rarity="L",this.name="Shallow Grave",this.isFree=this.level===3,this.playTarg.level=a.target.ddf2(this.level+1),this.text=`Give a ${a.log.levelGateText(this.level+1,!0)}friendly creature "Vengeance: Spawn this" this turn.`}shgrZ(t){const i=a.genId(),e=t.jr4("VN",this.code);e.customCode=i,e.changes=!0;const s=t.jr4("PT",this.code);s.customCode=i,t.hints.push("LZ")}shgrE(t){return d.actionEval(t,"ST","LZ")}sinC(){this.faction="U",this.rarity="C",this.name="Strength In Numbers",this.text=`Give a creature ${a.log.jr9(this.level,this.level)} for each friendly creature.`}sinZ(t){const i=this.level*a.field.ddf1().length;t.buff(i,i)}sinE(t){const i=this.level*a.field.ddf1().length;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}get snbboof(){return-1*(this.level+7)}snbC(){this.faction="A",this.rarity="C",this.name="Sonic Burst",this.text=`Give a creature ${a.log.jr9(this.snbboof,0)}.`}snbZ(t){t.buff(this.snbboof,0)}snbE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.snbboof)}sharvC(){this.faction="N",this.rarity="H",this.name="Soul Harvest";const t=this.lValS(["an additional level 1 card","an additional card","two additional cards"]);this.text=`Destroy a friendly creature. You may play ${t} this turn.`,this.playTarg.player="F"}sharvZ(t){if(a.death.destroy(t,this.code),this.level===1){const i=a.turn.freeCard(this.code);i.condition.level=a.target.ddf2(1)}else a.state.gs.turn.regularPlays+=this.level-1}sharvE(t){return d.ddp7(t,t.playerA,t.lane,["FRC","SD"])}sreapC(){this.faction="N",this.rarity="L",this.name="Soulreap";const t=this.boof248;this.text=`Destroy an enemy creature with ${t} or less attack. Then Spawn a copy of it.`,this.playTarg.player="E",this.playTarg.maxAttack=t}sreapZ(t){a.death.destroy(t,this.code),a.field.birthCreature(t.code,"S",!t.owner)}sreapE(t){const i=a.field.ddf6(t),e=a.cards.getCard(i.code),s=d.ddp7(t,t.playerA,t.lane);return s.bonus=At.ddp9(1,e.jr1+e.jr2+e.initArmor+e.initRegen,e.jr1,0,e.bonusExist()),s}sttorC(){this.faction="N",this.rarity="R",this.name="Spirit Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature Regenerate ${this.boof234}.`,this.playTarg.canRegen=!0}sttorZ(t){t.addRegen(this.boof234)}sttorE(t){return d.ddp2(t,t.playerA,t.lane,{rgn:this.boof234})}sptorC(){this.faction="U",this.rarity="R",this.name="Spore Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.text=`Give a creature Poison ${this.boof234}.`}sptorZ(t){t.addPoison(this.boof234)}sptorE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof234})}sovC(){this.faction="T",this.rarity="L",this.name="Staff of Vaerus",this.text=`Give a friendly ${a.log.levelGateText(this.level+1,!0)}creature Mobility ${this.level}. That creature battles an additional time this turn.`,this.playTarg.level=a.target.ddf2(this.level+1),this.playTarg.player="F"}sovZ(t){t.extraBattles+=1,t.addMobility(this.level)}sovE(t){const i=this.boof579;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,noD:!0})}stbrnC(){this.faction="T",this.rarity="R",this.name="Stone Brand";const t=this.boof579;this.text=`Give a creature with Defender ${a.log.jr9(t,t,!0)} and Negate Defender from it.`,this.playTarg.hasDefender=!0}stbrnZ(t){const i=this.boof579;t.buff(i,i),t.negateDefender=!0}stbrnE(t){const i=this.boof579;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,noD:!0})}ssperC(){this.faction="T",this.rarity="C",this.name="Stormspear",this.text=`Deal ${this.sspb} to a creature.~You may play an additional ${this.name} this turn.`}ssperZ(t){t.hurtDirect(this.sspb,this.code);const i=a.turn.freeCard(this.code);i.condition.cardCode="STP"}ssperE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.sspb})}get sspb(){return this.lValN([3,8,12])}tanglC(){this.faction="U",this.rarity="R",this.name="Tangle";const t=this.level===3?" You gain health equal to that creature's attack.":"";this.text=`Destroy a ${a.log.levelGateText(this.level+1,!0)}creature with Mobility.${t}`,this.playTarg.level=a.target.ddf2(this.level+1),this.playTarg.hasMobility=!0}tanglZ(t){a.death.destroy(t,this.code),this.level===3&&a.player.healPlayer("F",t.attack)}tanglE(t){const i=a.field.ddf6(t),e=d.ddp8(t,i);return this.level===3&&e.vectors.push(d.evalVectorPlayerDmg(a.state.ddf9(),i.attack)),e}tpactC(){this.faction="N",this.rarity="C",this.name="Tarsian Pact";const t=this.boof235;this.text=`Give a Nekrium creature ${a.log.jr9(t,t,!0)} and Regenerate ${t}.`,this.playTarg.faction="N"}tpactZ(t){const i=this.boof235;t.buff(i,i),t.addRegen(i)}tpactE(t){const i=this.boof235;return d.ddp2(t,t.playerA,t.lane,{att:i,hlt:i,rgn:i})}tugC(){this.faction="A",this.rarity="R",this.name="Tech Upgrade",this.playTarg.tribe="RB",this.text=`Give a Robot ${a.log.jr9(this.boof4612,0)} and Armor ${this.boof236}.`}tugZ(t){t.addArmor(this.boof236),t.buff(this.boof4612,0)}tugE(t){return d.ddp2(t,t.playerA,t.lane,{att:this.boof4612,arm:this.boof236})}totsC(){this.faction="N",this.rarity="T",this.name="Tendrils Of Twilight",this.isFree=!0;const t=-this.boof7911;this.text=`Give an enemy creature ${a.log.jr9(-1,-1)}.~If that creature is opposing a friendly Duskmaw, give that creature ${a.log.jr9(t,t)} instead.`,this.playTarg.player="E"}totsZ(t){const i=this.duskBof(t);t.buff(i,i)}totsE(t){const i=a.field.ddf6(t),e=this.duskBof(i);return d.actionEvalBuffN(t,t.playerA,t.lane,e,e)}duskBof(t){const i=t.opposed;let e=!1;return i&&(e=ut.extractCardCode(i.code)==="DTD"),e?-this.boof7911:-1}blightC(){this.faction="N",this.rarity="R",this.name="Touch Of Blight",this.text=`Give a creature "When this creature ${a.log.dbdtac(this.level)}, destroy that creature."`}blightZ(t){t.changed=!0,t.jr4("DM",this.code),t.hints.push("BX")}blightE(t){return d.actionEval(t,"ST","BX")}get tspois(){return this.lValN([5,7,12])}sporeC(){this.faction="U",this.rarity="C",this.name="Toxic Spores",this.text=`Give a creature Poison ${this.tspois}.`}sporeZ(t){t.addPoison(this.tspois)}sporeE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.tspois})}tremcC(){this.faction="T",this.rarity="C",this.name="Tremorcharge",this.text=`Give a Tempys creature ${a.log.jr9(0,this.boof4812)} and Mobility ${this.level}.`,this.playTarg.faction="T"}tremcZ(t){t.buff(0,this.boof4812),t.addMobility(this.level)}tremcE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,void 0,this.boof4812,"GM")}uboltC(){this.faction="T",this.rarity="R",this.name="Uranti Bolt",this.text=`Deal ${this.ubzap} damage to a creature.~It gets Defender until the end of the next turn.`}uboltZ(t){t.hurtDirect(this.ubzap,this.code);const i=d.mod("DF",!0,this.code);i.expiry="EN",t.addMod(i)}uboltE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.ubzap,def:!0})}get ubzap(){return this.lValN([3,10,20])}vensC(){this.faction="U",this.rarity="C",this.name="Venomstrike",this.text=`Give a creature Poison ${this.boof468}.~You may play an additional ${this.name} this turn.`}vensZ(t){t.addPoison(this.boof468);const i=a.turn.freeCard(this.code);i.condition.cardCode="VSK"}vensE(t){return d.ddp2(t,t.playerA,t.lane,{psn:this.boof468})}vgraC(){this.faction="U",this.rarity="C",this.name="Verdant Grace",this.playTarg.player="F",this.text=`Heal ${this.boof101520} damage from a friendly creature and ${this.boof246} health from each other friendly creature.`}vgraZ(t){t.heal(this.boof101520);const i=this.boof246;a.field.creatByTarget(d.crFriendNotMeTarg(t.id)).forEach(e=>{e.heal(i)})}vgraE(t){const i=this.boof246,e=a.field.ddf6(t),s=d.actionEvalBuffC(t,e,0,this.boof101520),l=a.field.creatByTarget(d.crFriendNotMeTarg(e.id)).map(u=>{const p=d.ddp1(u.owner,u.lane);return p.health=i,p});return s.vectors.push(...l),s}vobC(){this.faction="T",this.rarity="R",this.name="Violent Outburst",this.level===3?this.isFree=!0:this.hints=["LV"],this.text=`Give a ${a.log.levelGateText(this.level+1,!0)}creature Aggressive and, "When this creature ${a.log.dbdtap()}, it also deals that much damage to itself."`}vobZ(t){t.changed=!0,t.jr4("DM",this.code)}vobE(t){return d.ddp2(t,t.playerA,t.lane,{agr:!0})}vembC(){this.faction="N",this.rarity="C",this.name="Vyric's Embrace";const t=this.boof468,i=t*-1;this.text=`Give a creature ${a.log.jr9(i,i)}.~You gain ${t} health.`}vembZ(t){const i=this.boof468,e=-i;t.buff(e,e),a.player.healPlayer(a.state.getActivePlayer(),i)}vembE(t){const i=this.boof468,e=-i,s=d.actionEvalBuffN(t,t.playerA,t.lane,e,e);return s.vectors.push(d.evalVectorPlayerLife(a.state.ddf9(),i)),s}warC(){this.faction="A",this.rarity="H",this.name="Warmonger Mod";let t=this.level,i=3;this.level===1&&(this.playTarg.level="LN",i=2,t=2),this.text=`Give a ${a.log.levelGateText(i,!0)}creature ${t}x attack.`}warZ(t){const i=this.level===3?2:1;t.buff(t.attack*i,0)}warE(t){const i=this.level===3?2:1;return d.actionEvalBuffN(t,t.playerA,t.lane,Rt+i)}xwillC(){this.faction="N",this.rarity="H",this.name="Xrath's Will";const t=this.boof3612;this.text=`Destroy an enemy creature with ${t} or less attack.~You may play an additional Zombie this turn.`,this.playTarg.player="E",this.playTarg.maxAttack=t}xwillZ(t){a.death.destroy(t,this.code);const i=a.turn.freeCard(this.code);i.condition.tribe="ZB"}xwillE(t){return d.ddp7(t,t.playerA,t.lane,"FRZ")}}class Qt extends E{lookup(t){return{["ATP"]:{c:()=>this.phagC(),t:()=>this.phagT(),f:(e,s)=>this.phagF(e,s),e:e=>this.phagE(e)},["SSH"]:{c:()=>this.sshmC(),t:()=>this.sshmT(),f:(e,s)=>this.sshmF(e,s),e:e=>this.sshmE(e)},["TPG"]:{c:()=>this.pillC(),t:()=>this.pillT(),f:(e,s)=>this.pillF(e,s),e:e=>this.pillE(e)},["TMG"]:{c:()=>this.grootC(),t:()=>this.grootT(),f:(e,s)=>this.grootF(e,s),e:e=>this.grootE(e)}}[t]}forgTargets(t){return this.lookup(t).t()}forgAction(t,i,e){this.lookup(t).f(i,e)}forgEval(t,i){return this.lookup(t).e(i)}optional=!0;ftext="";constructor(t){super(t),this.lookup(this.cardCode()).c(),this.text="Forge: "+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.jr5(t.param);this.forgAction(this.cardCode(),t.position,i),a.mode.popMode(),a.action.actionDone(!0)}jr8(t){const i=this.forgTargets(this.cardCode());if(i.length>0){const e=i.map(s=>{const l=d.deckSelectAction("CARD",s.cardCode,s.sourceIdx);return l.param=t.creatId,l.hostCard=this.code,l});if(this.optional){const s=a.action.noneEndTrigger();s.param="PM",e.push(s)}a.deck.showCustomDeck(i,e)}else a.batch.triggerDone()}ddf7(t){return this.forgEval(this.cardCode(),t)}phagC(){this.faction="U",this.rarity="H",this.name="Aetherphage",this.jr1=this.lValN([7,10,16]),this.jr2=this.boof3612,this.tribe.push("IN"),this.ftext=`Look at the ${a.log.levelGateText(this.level,!0)}spells in the enemy player's hand and choose one. The enemy player discards the chosen spell.`}phagT(){const t=a.player.toPlayer(!a.state.ddf9()),i=d.target("TH");return i.player=a.player.toTarget(t),i.level=a.target.ddf2(this.level),i.card="S",a.deck.generateContent(t.hand,!1,i)}phagF(t,i){const e=a.player.toPlayer(!i.owner),s=e.hand[t];e.hand.splice(t,1),e.discard.push(s)}phagE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}sshmC(){this.faction="U",this.rarity="H",this.name="Soothsayer Hermit",this.jr1=this.boof61016,this.jr2=this.jr1-1,this.tribe.push("LP"),this.ftext=`You may put a ${a.log.levelGateText(this.level)} creature from your discard pile into your hand.`}sshmT(){const t=a.state.getActivePlayer(),i=d.target("TD");return i.player=a.player.toTarget(t),i.card="C",i.level=a.target.ddf2(this.level),a.deck.generateContent(t.discard,!1,i)}sshmF(t,i){const e=a.player.toPlayer(i.owner),s=e.discard.splice(t,1);e.hand.push(s[0])}sshmE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}pillC(){this.faction="N",this.rarity="H",this.name="Tomb Pillager",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("ZB"),this.consistent=this.level>1,this.ftext="You may banish a Nekrium card from your discard pile."}pillT(){const t=a.state.getActivePlayer(),i=d.target("TD");return i.player=a.player.toTarget(t),i.faction="N",a.deck.generateContent(t.discard,!1,i)}pillF(t,i){a.player.toPlayer(i.owner).discard.splice(t,1)}pillE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}grootC(){this.faction="U",this.rarity="R",this.name="Toorgmai Guardian",this.jr1=this.boof4711,this.jr2=this.jr1,this.tribe.push("PL");const t=this.boof358;this.bonus={play:this.ddp9(0,t+t,t,0)/2},this.ftext=`You may banish a Plant from your discard pile. If you do, ${this.name} gets ${a.log.jr9(t,t)}.`}grootT(){const t=a.state.getActivePlayer(),i=d.target("TD");return i.player=a.player.toTarget(t),i.tribe="PL",a.deck.generateContent(t.discard,!1,i)}grootF(t,i){a.player.toPlayer(i.owner).discard.splice(t,1);const s=this.boof358;i.buff(s,s)}grootE(t){const i=d.actionEval(t,"ST");return i.bonus=.5,i}}class _e extends W{jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}jr8(t){a.field.qEnemyCreats().forEach(i=>{i.addPoison(6)}),a.batch.triggerDone()}}class ti extends E{constructor(t){super(t),this.faction="U",this.rarity="T",this.name="Dino Knight",this.jr1=this.lValN([8,12,18]),this.jr2=this.jr1,this.tribe.push("DN"),this.initAggro=!0,this.initBT=!0,this.maxLevel=this.level,this.minLevel=this.level;const i=this.boof357;this.text=`When this ${a.log.dbdtap()}, heal ${i} damage from each other friendly creature.~Vengeance: Put a level ${this.level} Bron, Wild Tamer into this lane.`}image(t){return this.fixedImage(t)}jr3(t,i){const e=super.jr3(t,i);return e.jr4("VN",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}jr8(t){if(t.trigger.type==="VN"){const i=a.field.jr5(t.creatId);a.field.birthCreature("BWT"+this.level,"P",i.owner,i.lane),a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=this.boof357,e=d.crNotMeTarg(t.creatId);e.player=a.player.toTarget(t.ownerPlayerA),a.field.creatByTarget(e).forEach(l=>l.heal(i)),a.batch.triggerDone()}}}class ei extends Q{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Discordant Strike",this.hints=["ALN"];const i=-this.boof4610;this.text=`Give an enemy creature ${a.log.jr9(i,0)}.~Allied Nekrium: Give an enemy creature ${a.log.jr9(0,i)}.`}playTargets(){const t=super.playTargets(),i=d.crEnemyActTarg("CARD",this.code,"P1");return t.push(i),t}handleAction(t){const i=a.deTil(t.param),e=-this.boof4610,s=a.field.ddf6(t);i[0]==="P1"?(this.logSpell(),s.buff(e,0),a.turn.allied("N")?a.action.ddf5(this.getCardActions(t)):a.turn.spellCast()):(s.buff(0,e),a.turn.spellCast())}getCardActions(t,i){return a.target.toActions(d.crEnemyActTarg("CARD",this.code,"P2"))}ddf7(t){const i=a.deTil(t.param),e=-this.boof4610;if(i[0]==="P1"){const s=d.actionEvalBuffN(t,t.playerA,t.lane,e,0);return a.turn.allied("N")&&(s.final=!1),s}else return d.actionEvalBuffN(t,t.playerA,t.lane,0,e)}}class ii extends Q{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Dissolve",this.isFree=this.level===3,this.text=`Double the Poison on ${this.level===1?"an":"each"} enemy creature.`}playTargets(){const t=super.playTargets(),i=this.poisTarg();return this.level===1?t.push(i):a.field.creatByTarget(i).length>0&&t.push(a.target.boardTarget("CARD",this.code)),t}handleAction(t){if(this.logSpell(),this.level===1){const i=a.field.ddf6(t);i.addPoison(i.poison)}else a.field.creatByTarget(this.poisTarg()).forEach(e=>{e.addPoison(e.poison)});a.turn.spellCast()}poisTarg(){const t=d.crEnemyActTarg("CARD",this.code,"");return t.hasPoison=!0,t}ddf7(t){const i=Rt+1,e=d.actionEval(t,"ST"),s=!a.state.ddf9();let l;return t.zone==="R"?l=a.field.laneIdx:l=[t.lane],e.vectors=l.map(u=>d.ddp1(s,u,{psn:i})),e}}class ri extends E{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Dysian Broodqueen",this.jr1=this.boof248,this.jr2=this.boof61117,this.tribe.push("NG"),this.hints=["ALU"];const i=`Destroy an enemy ${a.log.levelGateText(this.level,!0)}creature.`;this.text=`Activate, destroy another friendly creature: ${i}~Allied Uterra: Put a ${this.level}/${this.level} Broodfang into an available lane.`,this.bonus={play:this.ddp9(1,this.level*2,this.level,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[1]==="P1")a.action.ddf5(this.getCardActions(t));else if(i[1]==="P2"){const e=a.field.jr5(i[0]),s=Date.now(),l=a.field.jr5(i[2]);a.death.destroy(l,this.code,s);const u=a.field.ddf6(t);a.death.destroy(u,this.code,s),e.endActivation()}else a.field.birthCreature(`${"BRF"}${this.level}`,"P",t.playerA,t.lane),a.action.actionDone(!0)}jr8(t){if(a.turn.allied("U")){const i=d.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId),e=a.target.toActions(i);e.length>0?a.action.ddf5(e):a.batch.triggerDone()}else a.batch.triggerDone()}friends(t){const i=d.crFriendNotMeActTarg("CARD",t,this.code,a.enTil(t,"P1"));return a.target.toActions(i)}enemies(t,i=""){const e=d.crEnemyActTarg("CARD",this.code,a.enTil(t,"P2",i));return e.level=a.target.ddf2(this.level),a.target.toActions(e)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i?i.id:t.param,s=this.friends(e);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.deTil(t.param),s=a.field.ddf6(t),l=this.enemies(e[0],s.id);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param),e=t;if(i[1]==="P1")return d.ddp5(t);if(i[1]==="P2"){const s=d.ddp7(t,e.playerA,e.lane),l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.destroy=!0,s.vectors.push(u),s}else return d.ddp4(t,e.playerA,e.lane,`${"BRF"}${this.level}`)}}}class ai extends Q{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Dysian Siphon",this.hints=["ALU"];const i=this.boof357;this.text=`Give an enemy creature ${a.log.jr9(-i,-i)}.~Allied Uterra: Give a friendly creature ${a.log.jr9(i,i)}. `}playTargets(){const t=super.playTargets(),i=d.crEnemyActTarg("CARD",this.code,"P1");return t.push(i),t}handleAction(t){const i=a.deTil(t.param),e=this.boof357;if(i[0]==="P1"){const s=this.getCardActions(t);a.turn.allied("U")&&s.length>1?a.action.ddf5(s):(this.logSpell(),a.field.ddf6(t).buff(-e,-e),a.turn.spellCast())}else{this.logSpell();const s=a.field.ddf6(t);a.field.jr5(i[1]).buff(-e,-e),s.buff(e,e),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=this.friendTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param),e=this.boof357;if(i[0]==="P1")return a.turn.allied("U")&&this.friendTargActions().length>1?d.ddp5(t):d.actionEvalBuffN(t,t.playerA,t.lane,-e,-e);{const s=d.actionEval(t,"ST"),l=a.field.ddf6(t),u=a.field.jr5(i[1]);return s.vectors.push(d.ddp1(u.owner,u.lane,{att:-e,hlt:-e}),d.ddp1(l.owner,l.lane,{att:e,hlt:e})),s}}friendTargActions(t=""){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}}class si extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Dysian Sludge",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("OZ"),this.hints=["ALN","HH","OP"];const i=-this.boof135;this.text=`Forge: If you have health over 120, you may put a copy of ${this.name} into another lane.~When this enters play, if you have a Nekrium card in hand, the opposing creathure gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,s.customCode=e.id,e.jr4("EF",this.code),e}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){const i=t.event;if(i.forged&&i.creature.id===t.trigger.customCode)if(a.state.getActivePlayer().health>120){const e=d.actionTarget("TF","CARD",this.code,"");e.player="F",e.lanes=a.field.laneIdx.filter(l=>l!==i.creature.lane);const s=a.target.toActions(e);s.push(a.action.noneEndTrigger()),a.action.ddf5(s)}else a.batch.triggerDone();else{const e=i.creature.opposed;if(e&&a.turn.allied("N",i.creature.owner)){const s=-this.boof135;e.buff(s,s)}a.batch.triggerDone()}}handleAction(t){a.field.birthCreature(this.code,"R",t.playerA,t.lane),a.action.actionDone(!0)}}class ni extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Echowisp",this.jr1=this.lValN([7,8,10]),this.jr2=this.boof135,this.tribe.push("ST"),this.level===3?(this.text="Forge: Put a copy of Echowisp into each available lane.",this.hints=["EML"]):(this.text="Forge: You may put a copy of Echowisp into an adjacent lane.",this.hints=["EMA"])}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=this.level<3,e}jr8(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId);if(this.level<3){const s=a.field.jr5(t.trigger.creatId);i.lanes=s.adjacent}let e=a.target.toActions(i);if(e.length>0)if(this.level<3)a.action.ddf5([a.action.noneEndTrigger(),...e]);else{const s=Date.now();e.forEach(l=>a.field.birthCreature(this.code,"P",l.playerA,l.lane,s)),a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){a.field.birthCreature(this.code,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.code)}}class oi extends E{lookup(t){return{["TVG"]:{c:()=>this.tvgC(),m:e=>this.tvgM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}armThreshold=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("AR",this.code);return s.area="A",e}enforceEffect(t,i){this.armThreshold<=i.armor?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}tvgC(){this.faction="A",this.rarity="R",this.name="Tower Vanguard",this.jr1=this.lValN([3,6,11]),this.jr2=this.lValN([7,13,21]),this.tribe.push("RB"),this.hints=["LKA"],this.armThreshold=1;const t=this.boof247;this.text=`While ${this.name} has Armor, it gets ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}tvgM(t){return[d.mod("AT",this.boof247,t.id)]}}class Kt extends E{lookup(t){return{["CIN"]:{c:()=>this.cyinC(),m:e=>this.cyinM(e)},["HWM"]:{c:()=>this.hlwmC(),m:e=>this.hlwmM(e)},["LSP"]:{c:()=>this.lspC(),m:e=>this.lspM(e)},["SSI"]:{c:()=>this.ssinC(),m:e=>this.ssinM(e)},["WTA"]:{c:()=>this.weguC(),m:e=>this.weguM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}attThreshold=0;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=["ATH"]}jr3(t,i){const e=super.jr3(t,i);return e.addEffect("AT",this.code),e}enforceEffect(t,i){this.attThreshold<=i.attack?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}cyinC(){this.faction="A",this.rarity="R",this.name="Cypien Infiltrator",this.jr1=this.boof61117,this.jr2=this.jr1-1,this.tribe.push("HM"),this.attThreshold=this.lValN([7,14,21]),this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Breakthrough.`}cyinM(t){return[d.mod("BT",!0,t.id)]}hlwmC(){this.faction="A",this.rarity="L",this.name="Hinterland Watchman",this.jr1=this.lValN([4,7,15]),this.jr2=this.lValN([7,10,20]),this.tribe.push("MC"),this.attThreshold=this.boof51020;const t=this.lValS(["Mobility 3","Armor 5 and Mobility 3","Armor 5, Breakthrough, Aggressive, Mobility 3, and Regenerate 5"]);this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets ${t}.`,this.bonus={exist:this.ddp9(0,this.lValN([1,9,17]),0,0)*2}}hlwmM(t){const i=[d.mod("MB",3,t.id)];return this.level>1&&i.push(d.mod("AR",5,t.id)),this.level===3&&(i.push(d.mod("BT",!0,t.id)),i.push(d.mod("AG",!0,t.id)),i.push(d.mod("RG",5,t.id))),i}lspC(){this.faction="A",this.rarity="C",this.name="Lightshield Patrol",this.jr1=this.lValN([4,7,15]),this.jr2=this.boof51020,this.tribe.push("HM"),this.attThreshold=this.jr2,this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Armor ${this.boof234}.`}lspM(t){return[d.mod("AR",this.boof234,t.id)]}ssinC(){this.faction="A",this.rarity="R",this.name="Spiritsteel Infiltrator",this.jr1=this.boof4815,this.jr2=this.jr1+3,this.tribe.push("EN"),this.attThreshold=this.boof51020,this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Mobility ${this.level} and Armor ${this.boof246}.`}ssinM(t){return[d.mod("MB",this.level,t.id),d.mod("AR",this.boof246,t.id)]}weguC(){this.faction="U",this.rarity="L",this.name="Wegu, the Ancient",this.jr1=0,this.jr2=1,this.tribe.push("PL"),this.initDefend=!0,this.attThreshold=this.lValN([10,25,100]);const t=this.boof124,i=this.level===3?"it gets Breakthrough and ":"";this.text=`When you gain health, Wegu gets ${a.log.jr9(t,t)} for each health you gained.~While Wegu has ${this.attThreshold} or more attack, ${i}Negate Defender from it.`}weguM(t){const i=[d.mod("ND",!0,t.id)];return this.level===3&&i.push(d.mod("BT",!0,t.id)),i}}class Ce extends E{friendNotMe(t){const i=d.crNotMeTarg(t.id);return i.player=a.player.toTarget(t.owner),i}friendNone(t){const i=d.crTarg();return i.player=a.player.toTarget(t.owner),i.lanes=[],i}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforcementActive(t){return t.status==="A"}applyEffect(t,i,e){const s=this.friendNotMe(t),l=a.field.creatByTarget(s),u=a.field.creatByTarget(e);l.forEach(p=>{u.includes(p)?p.addModSafe(i):p.removeModSafe(t.id)})}}class _t extends Ce{lookup(t){return{["BWW"]:{c:()=>this.bwwC(),m:e=>this.bwwM(e),t:e=>this.bwwT(e)},["HTR"]:{c:()=>this.hrtC(),m:e=>this.hrtM(e),t:e=>this.hrtT(e)},["KKK"]:{c:()=>this.kkkC(),m:e=>this.kkkM(e),t:e=>this.kkkT(e)},["XDV"]:{c:()=>this.xdvC(),m:e=>this.xdvM(e),t:e=>this.xdvT(e)}}[t]}createMod(t,i){return this.lookup(t).m(i)}effTargs(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}enforceEffect(t,i){const e=this.cardCode(),s=this.createMod(e,i),l=this.enforcementActive(i)?this.effTargs(e,i):this.friendNone(i);this.applyEffect(i,s,l)}bwwC(){this.faction="T",this.rarity="H",this.name="Borean Windweaver",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.initMobile=this.level,this.tribe.push("WN","AS"),this.hints=["FRS"],this.text=`Each other friendly creature gets Mobility ${this.level}.`}bwwM(t){return d.mod("MB",this.level,t.id)}bwwT(t){return this.friendNotMe(t)}hrtC(){this.faction="U",this.rarity="L",this.name="Heart Tree",this.jr1=0,this.jr2=this.lValN([10,15,30]),this.initRegen=this.boof246,this.initDefend=!0,this.tribe.push("PL"),this.hints=["FRS"],this.text=`Each other friendly creature gets Regenerate ${this.initRegen}.`,this.bonus={exist:this.ddp9(0,this.initRegen,0,0)*2}}hrtM(t){return d.mod("RG",this.initRegen,t.id)}hrtT(t){return this.friendNotMe(t)}kkkC(){if(this.faction="T",this.rarity="L",this.name="Korok, Khan of Kadras",this.jr1=this.lValN([4,7,12,18]),this.jr2=this.lValN([7,12,18,26]),this.initAggro=!0,this.tribe.push("FB"),this.maxLevel=4,this.level>1){const t=this.lValS(["","friendly level 1","friendly level 2 or lower","other friendly"]);this.text=`Each ${t} creature gets Aggressive.`,this.hints=["FRS"],this.bonus={exist:(this.level-1)*.5}}}kkkM(t){return d.mod("AG",!0,t.id)}kkkT(t){const i=this.friendNotMe(t);return this.level===1?i.lanes=[]:i.level=a.target.ddf2(this.level-1),i}xdvC(){this.faction="N",this.rarity="H",this.name="Xrath, Dreadnight Of Varna",this.jr1=this.boof5914,this.jr2=this.jr1+1,this.initRegen=this.boof248,this.tribe.push("ZB"),this.text=`Each other friendly Zombie gets Regenerate ${this.initRegen}`,this.bonus={exist:this.ddp9(0,this.initRegen,0,0)}}xdvM(t){return d.mod("RG",this.initRegen,t.id)}xdvT(t){const i=this.friendNotMe(t);return i.tribe="ZB",i}}class hi extends E{lookup(t){return{["AHL"]:{c:()=>this.ahlC(),m:e=>this.ahlM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){const e=d.crNotMeTarg(i.id);e.player=a.player.toTarget(i.owner),a.field.creatByTarget(e).length===0?this.createMods(this.cardCode(),i).forEach(l=>{i.addModSafe(l)}):i.removeModSafe(i.id)}ahlC(){this.faction="A",this.rarity="H",this.name="Alloyin Highlander",this.jr1=this.lValN([5,7,10]),this.jr2=this.boof6914,this.tribe.push("HM"),this.text=`While ${this.name} is your only friendly creature, it gets ${a.log.jr9(this.boof4812,0)} and Armor ${this.boof248}.`}ahlM(t){return[d.mod("AT",this.boof4812,t.id),d.mod("AR",this.boof248,t.id)]}}class Se extends E{lookup(t){return{["NXP"]:{c:()=>this.nxpC(),m:e=>this.nxpM(e)},["SKG"]:{c:()=>this.skgC(),m:e=>this.skgM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=["NX"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){i.lane===3?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}nxpC(){this.faction="A",this.rarity="C",this.name="Nexus Pilot",this.jr1=this.boof358,this.jr2=this.boof4710,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets ${a.log.jr9(this.jr1,this.jr2)}.`,this.bonus={play:this.ddp9(0,this.jr1+this.jr2,this.jr1,0)}}nxpM(t){return[d.mod("AT",this.jr1,t.id),d.mod("HL",this.jr2,t.id),d.mod("MH",this.jr2,t.id)]}skgC(){this.faction="A",this.rarity="C",this.name="Skyknight Glider",this.jr1=this.boof5916,this.jr2=this.jr1+1,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets Mobility 2.`}skgM(t){return[d.mod("MB",2,t.id)]}}class de extends E{lookup(t){return{["CCT"]:{c:()=>this.cctC(),m:e=>this.cctM(e)},["GHB"]:{c:()=>this.ghbC(),m:e=>this.ghbM(e)},["PYG"]:{c:()=>this.pygC(),m:e=>this.pygM(e)}}[t]}createMods(t,i){return this.lookup(t).m(i)}likesOpposed=!1;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=[this.likesOpposed?"OP":"OL"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="A",e}enforceEffect(t,i){!!i.opposed===this.likesOpposed?this.createMods(this.cardCode(),i).forEach(e=>{i.addModSafe(e)}):i.removeModSafe(i.id)}cctC(){this.faction="T",this.rarity="R",this.name="Cloudcleaver Titan",this.jr1=this.boof4812,this.jr2=this.lValN([7,10,16]),this.tribe.push("WN","GT"),this.initMobile=this.level;const t=this.boof246;this.bonus={play:this.ddp9(0,t,t,0)},this.text=`While ${this.name} is unopposed, it gets ${a.log.jr9(t,0)}.`}cctM(t){return[d.mod("AT",this.boof246,t.id)]}ghbC(){this.faction="U",this.rarity="R",this.name="Gemhide Basher",this.jr1=this.lValN([5,10,16]),this.jr2=this.lValN([3,7,10]),this.tribe.push("DN"),this.likesOpposed=!0,this.text=`While ${this.name} is opposed, it gets Aggressive.`}ghbM(t){return[d.mod("AG",!0,t.id)]}pygC(){this.faction="T",this.rarity="H",this.name="Pyre Giant",this.jr1=this.boof468,this.jr2=this.boof234,this.tribe.push("FR","GT"),this.initAggro=!0,this.bonus={play:this.ddp9(0,this.jr1,this.jr1,0)},this.text=`While ${this.name} is unopposed, it gets ${a.log.jr9(this.jr1,0)}.`}pygM(t){return[d.mod("AT",this.jr1,t.id)]}}class Yt extends Ce{lookup(t){return{["ALG"]:{c:()=>this.algnC(),m:e=>this.algnM(e)},["ALS"]:{c:()=>this.alstC(),m:e=>this.alstM(e)},["BTN"]:{c:()=>this.btcC(),m:e=>this.btcM(e)},["NXA"]:{c:()=>this.aeroC(),m:e=>this.aeroM(e)},["NXT"]:{c:()=>this.ntcC(),m:e=>this.ntcM(e)}}[t]}createMod(t,i){return this.lookup(t).m(i)}constructor(t){super(t),this.lookup(this.cardCode()).c(),this.hints=this.nexus?["NX"]:["LJ"]}nexus=!1;enforcementActive(t){return super.enforcementActive(t)?this.nexus?t.lane===3:!0:!1}enforceEffect(t,i){const e=this.cardCode(),s=this.createMod(e,i);let l;this.enforcementActive(i)?(l=this.friendNotMe(i),this.nexus?l.lanes=[1,2,4,5]:l.lanes=i.adjacent):l=this.friendNone(i),this.applyEffect(i,s,l)}algnC(){this.faction="A",this.rarity="R",this.name="Alloyin General",this.jr1=this.boof246,this.jr2=this.boof81318,this.tribe.push("HM"),this.text=`Adjacent creatures gets ${a.log.jr9(this.jr1,0)}.`,this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)}}algnM(t){return d.mod("AT",this.jr1,t.id)}alstC(){this.faction="A",this.rarity="H",this.name="Alloyin Strategist",this.jr1=this.boof4814,this.jr2=this.jr1+1,this.initMobile=this.level,this.tribe.push("HM");const t=this.boof246;this.text=`Adjacent creatures gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)}}alstM(t){return d.mod("AT",this.boof246,t.id)}btcC(){this.faction="A",this.rarity="H",this.name="Battle Techtician",this.jr1=this.boof3714,this.jr2=this.boof71117,this.tribe.push("HM"),this.nexus=!0;const t=this.boof248;this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)*2}}btcM(t){return d.mod("AT",this.boof248,t.id)}aeroC(){this.faction="A",this.rarity="L",this.name="Nexus Aeronaut",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("HM"),this.initMobile=1;const t=this.boof236;this.nexus=!0,this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${a.log.jr9(t,0)}. Otherwise this gets Armor ${t}.`,this.bonus={exist:this.ddp9(0,t,t,0)*2}}aeroM(t){return d.mod("AT",this.boof236,t.id)}ntcC(){this.faction="A",this.rarity="H",this.name="Nexus Techtician",this.jr2=this.boof6916,this.jr1=this.jr2-3,this.tribe.push("HM"),this.nexus=!0;const t=this.boof235;this.text=`While ${this.name} is in the center lane, each other friendly creature gets Armor ${this.boof235}.`,this.bonus={exist:this.ddp9(0,t,0,0)*4}}ntcM(t){return d.mod("AR",this.boof235,t.id)}}class Xt extends E{cardConstruct(t){({["BWD"]:()=>this.bwdC(),["BTS"]:()=>this.btsC(),["ESC"]:()=>this.escarC(),["EHN"]:()=>this.ethhC(),["RWC"]:()=>this.roamC()})[t]()}targAction(t){a.field.birthCreature(this.spawnCode,"P",t.playerA,t.lane)}adjacent=!1;optional=!1;needsEmpty=!1;spawnCode="";ftext="";allied="X";constructor(t){super(t),this.cardConstruct(this.cardCode());const i=a.log.forglied(this.allied);this.text=i+": "+this.ftext}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}jr8(t){if(this.allied==="X"||a.turn.allied(this.allied)){const i=a.field.jr5(t.creatId),e=d.emptyPlayerActTarg("F","CARD",this.code,t.creatId);this.needsEmpty||(e.field="A",e.lanes=a.field.laneIdx.filter(l=>l!==i.lane)),this.adjacent&&(e.lanes=i.adjacent);const s=a.target.toActions(e);s.length>0?(this.optional&&s.push(a.action.noneEndTrigger()),a.action.ddf5(s)):a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){this.targAction(t),a.action.actionDone(!0)}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.spawnCode)}bwdC(){this.faction="U",this.rarity="C",this.name="Branchweaver Druid",this.jr1=1,this.jr2=1,this.tribe.push("HM"),this.hints=["EMO"],this.spawnCode=`${"TFD"}${this.level}`,this.optional=!0;const t=this.boof5714;this.ftext=`You may put a ${t}/${t} ${B.minionName(3)} into another lane.`}btsC(){this.faction="U",this.rarity="C",this.name="Brighttusk Sower",this.jr1=this.lValN([6,8,10]),this.jr2=this.jr1,this.tribe.push("TK"),this.hints=["EMA"],this.spawnCode=B.minionCode(this.level),this.optional=!0,this.adjacent=!0;const t=B.minionBuff(this.level);this.ftext=`You may put a ${t}/${t} ${B.minionName(this.level)} into an adjacent lane.`}escarC(){this.faction="A",this.rarity="H",this.name="Esperian Scarab",this.jr1=this.lValN([3,4,7]),this.jr2=this.boof5711,this.initArmor=this.boof135,this.tribe.push("RB"),this.allied="U",this.hints=["EMO","ALU"],this.spawnCode=this.code,this.optional=!0,this.ftext=`You may but a copy of ${this.name} into another lane.`}ethhC(){this.faction="U",this.rarity="C",this.name="Ether Hounds",this.jr1=this.boof369,this.jr2=this.jr1,this.tribe.push("ST"),this.needsEmpty=!0,this.hints=["EMO"],this.spawnCode=this.code,this.ftext="Put a copy of this into an available lane."}roamC(){this.faction="U",this.rarity="C",this.name="Roaming Warclaw",this.jr1=this.boof61016,this.jr2=this.jr1-3,this.tribe.push("DN"),this.hints=["EMO"],this.spawnCode=`${"RPT"}${this.level}`,this.optional=!0,this.ftext="You may put a 1/1 Raptor into another lane."}}class li extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Epoch Hawk",this.jr1=this.boof469,this.jr2=this.boof71117,this.tribe.push("MC"),this.hints=["EMO"];const i=this.boof4710;this.text=`While you have 6 or more cards in hand, this gets "Activate: Put a ${i}/${i} Epoch Soldier into an available lane."`}canActivate(t){return a.player.toPlayer(t.owner).hand.length>5&&a.field.emptyLanes(t.owner).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.field.birthCreature(this.soldier,"P",t.playerA,t.lane),i.endActivation()}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=d.emptyPlayerActTarg(e.owner,"CARD",this.code,e.id),l=a.target.toActions(s);return l.push(a.action.cancelAction()),l}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp4(t,i.playerA,i.lane,this.soldier)}}ddf8(t){return t.trigger.type==="TE"}jr8(t){a.player.drawCard(t.ownerPlayerA,1);const i=a.player.toPlayer(t.ownerPlayerA),e=i.triggers.findIndex(s=>s.customCode===t.trigger.customCode);e>-1&&i.triggers.splice(e,1),a.batch.triggerDone()}get soldier(){return "EPS"+this.level}}class ci extends E{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Esperian Sage",this.jr1=this.boof3510,this.jr2=this.boof124,this.tribe.push("HM"),this.hints=["ALU"],this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0,.5)*.5},this.text=`When ${this.name} enters play, discard and level up a card.~Allied Uterra: You may put a copy of this into another lane.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);s.interactive=!0;const l=e.jr4("EF",this.code);return l.interactive=!0,e}handleAction(t){if(t.zone==="H")a.turn.levelAndDiscard(t);else{const i=t;a.field.birthCreature(this.code,"R",i.playerA,i.lane)}a.action.actionDone(!0)}ddf8(t){return t.event.code==="ENT"?t.event.creature.id===t.creatId:!1}jr8(t){if(t.trigger.type==="FR")if(a.turn.allied("U")){const i=a.field.jr5(t.creatId),e=d.actionTarget("TF","CARD",this.code,t.creatId);e.player="F",e.lanes=a.field.laneIdx.filter(l=>l!==i.lane);const s=a.target.toActions(e);s.push(a.action.noneEndTrigger()),a.action.ddf5(s)}else a.batch.triggerDone();else{const i=d.lvlHandActTarg(this.code,t.creatId),e=a.target.toActions(i);e.length>0?a.action.ddf5(e):a.batch.triggerDone()}}ddf7(t){if(t.zone==="H")return d.actionEval(t,"DC");{const i=t;return d.ddp4(t,i.playerA,i.lane,this.code)}}}class di extends E{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Esperian Steelplate",this.jr1=this.boof369,this.jr2=this.boof6916,this.tribe.push("IN"),this.hints=["ALA"],this.text=`Activate: Heal ${this.boof358} damage from each other friendly creature.~Allied Alloyin: Armor ${this.boof247}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){const i=d.crFriendNotMeTarg(t.id);return a.field.creatByTarget(i).length>0}startActivation(t){const i=this.boof358,e=d.crFriendNotMeTarg(t.id);a.field.creatByTarget(e).forEach(s=>{s.heal(i)}),t.endActivation()}jr8(t){a.turn.allied("A")&&a.field.jr5(t.creatId).addArmor(this.boof247),a.batch.triggerDone()}}class ui extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Everflame Phoenix",this.jr1=this.lValN([7,0,22]),this.jr2=this.lValN([6,1,15]),this.tribe.push("PX"),this.initMobile=this.lValN([1,0,2]),this.level===2?(this.initDefend=!0,this.text=`When you gain a rank, replace ${this.name} with a level 3 ${this.name}.`,this.hints=["RH","LV"],this.bonus={exist:this.ddp9(1,37,22,0)}):this.level===3&&(this.text=`Vengeance: Put a level 2 ${this.name} into this lane.`,this.bonus={exist:this.ddp9(1,1,0,0)})}jr3(t,i){const e=super.jr3(t,i);return this.level===2?e.jr4("RU",this.code):this.level===3&&e.jr4("VN",this.code),e}ddf8(t){return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:super.ddf8(t)}jr8(t){if(t.trigger.type==="RU"){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"EFP"}3`,"R",i.owner,i.lane)}else if(t.trigger.type==="VN"){const e=t.event.creature;a.field.birthCreature(`${"EFP"}2`,"P",e.owner,e.lane)}a.batch.triggerDone()}}class fi extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Frostmane Dragon",this.jr1=this.lValN([6,9,13]),this.jr2=this.jr1+1,this.tribe.push("IC","DG"),this.initMobile=2,this.text=`At the start of your turn, if ${this.name} was Forged last turn, you may put a Level ${this.level} Frostmane egg into an available lane.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}handleAction(t){a.field.birthCreature(`${"FME"}${this.level}`,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){return t.trigger.type==="TS"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){const i=a.field.jr5(t.creatId);if(t.event.code==="ENT"){const e=i.jr4("TS",this.code);e.interactive=!0,e.changes=!0,e.customCode=i.id,a.batch.triggerDone()}else if(t.event.code==="TRS"){const e=t.trigger.customCode,s=i.triggers.find(p=>p.customCode===e);s&&i.removeTrigger(s);const l=d.emptyPlayerActTarg("F","CARD",this.code,""),u=a.target.toActions(l);u.length===0?a.batch.triggerDone():(u.push(a.action.noneEndTrigger()),a.action.ddf5(u))}}ddf7(t){return d.ddp4(t,t.playerA,t.lane,`${"FME"}${this.level}`)}}class gi extends Q{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Frostshatter Strike";const i=this.boof4711;this.text=`Deal ${i} damage to an enemy creature.~Give a friendly creature ${a.log.jr9(i,0)} this turn.`}playTargets(){const t=super.playTargets();return this.friends().length>0&&t.push(d.crEnemyActTarg("CARD",this.code,"P1")),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof4711;s.hurtDirect(l,this.code);const u=d.mod("AT",l,this.code);u.expiry="ET",e.addMod(u),a.turn.spellCast()}}friends(t=""){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}getCardActions(t,i){const e=a.field.ddf6(t),s=this.friends(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=this.boof359,s=d.actionEvalBuffN(t,t.playerA,t.lane,e),l=a.field.jr5(i[1]);return s.vectors.push(d.ddp1(l.owner,l.lane,{dmg:e})),s}}}class mi extends Q{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Gauntlets of Sulgrim";const i=this.boof2510;this.text=`Give a friendly creature Armor ${i}, then deal damage equal to its Armor to an enemy creature.`}playTargets(){const t=super.playTargets();if(this.baddies().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");i.canArmor=!0,t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof2510;s.addArmor(l),e.hurtDirect(s.armor,this.code),a.turn.spellCast()}}baddies(t=""){return a.target.toActions(d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t)))}getCardActions(t,i){if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.action.cancelAction(),l=this.baddies(e.id);return l.push(s),l}return super.getCardActions(t,i)}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=this.boof2510,l=d.ddp3(t,e,{arm:s});return l.vectors.push(d.ddp1(t.playerA,t.lane,{dmg:e.armor+s})),l}}}class pi extends E{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Gemhide Ravager",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("DN"),this.hints=["OL","ALT","ATH","LKV"],this.bonus={exist:this.ddp9(0,0,0,this.jr1)},this.text=`When ${this.name} ${a.log.dbdtap()}, you gain that much health.~Allied Tempys: Mobility ${this.level}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}jr8(t){if(t.trigger.type==="FR")a.turn.allied("T")&&a.field.jr5(t.creatId).addMobility(this.level),a.batch.triggerDone();else if(t.trigger.type==="DM"){const i=t.event;a.player.healPlayer(t.ownerPlayerA,i.dmg),a.batch.triggerDone()}}}class yi extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Glaceus, Tundra Tyrant",this.jr1=this.boof5916,this.jr2=this.jr1+2,this.tribe.push("IC","EL"),this.hints=["TL"];const i=`Gain Rank: each enemy ${a.log.levelGateText(this.level,!0)}creature gets "When this is dealt damage, destroy it."`,e=this.level===3?"At the start of each turn, deal 1 damage to each enemy creature.~":"";this.text=e+i}jr3(t,i){const e=super.jr3(t,i);return e.jr4("RU",this.code),this.level===3&&e.jr4("TS",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.creatureTarg&&i.target.id===t.creatId)return!0}return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="RU"){const i=d.crEnemyTarg();i.level=a.target.ddf2(this.level),a.field.creatByTarget(i).forEach(e=>{e.jr4("DM",this.code),e.hints.push("DD"),e.changed=!0})}else if(t.trigger.type==="TS"){const i=Date.now();a.field.qEnemyCreats().forEach(e=>{e.hurtDirect(1,this.code,i)})}else if(t.trigger.type==="DM"){const i=a.field.jr5(t.creatId);i.status==="A"&&a.death.destroy(i,this.code)}a.batch.triggerDone()}}class bi extends Q{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Grave Pact",this.isFree=this.level===3,this.text=`Destroy a friendly creature.~Destroy an ${a.log.levelGateText(this.level+1,!0)}enemy creature.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=Date.now();a.death.destroy(s,this.code,l),a.death.destroy(e,this.code,l),a.turn.spellCast()}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return i.level=a.target.ddf2(this.level+1),a.target.toActions(i)}getCardActions(t,i){const e=a.field.ddf6(t),s=this.enemyTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=d.ddp8(t,e,"SD"),l=d.ddp1(t.playerA,t.lane);return l.destroy=!0,s.vectors.push(l),s}}}class vi extends Q{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Hungering Strike";const i=this.boof359;this.text=`Give a friendly creature +${i} attack.~Give an enemy creature -${i} attack.`}playTargets(){const t=super.playTargets();if(this.enemyTargActions().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof359;s.buff(l,0),e.buff(-l,0),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=this.enemyTargActions(e.id);return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=a.field.ddf6(t),l=a.field.jr5(i[1]),u=this.boof359;return e.vectors.push(d.ddp1(s.owner,s.lane,{att:-u}),d.ddp1(l.owner,l.lane,{att:u})),e}}enemyTargActions(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i)}}class Ai extends E{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Hunting Pack",this.jr1=this.boof3612,this.jr2=this.boof248,this.tribe.push("WF"),this.hints=["EML"],this.text=`When ${this.name} enters play, you have a 50% chance to put a copy of ${this.name} into an available lane.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("EF",this.code);return s.interactive=!0,e}handleAction(t){a.field.birthCreature(this.code,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){if(a.randInt(0,2)===1){const e=d.emptyPlayerActTarg("F","CARD",this.code,""),s=d.actionTarget("TB","NOTR",this.code,""),l=a.target.toActions([e,s]);l.length===1?a.batch.triggerDone():a.action.ddf5(l)}else a.batch.triggerDone()}ddf7(t){return d.ddp4(t,t.playerA,t.lane,this.code)}}class ki extends E{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Flame",this.jr1=this.lValN([7,12,20]),this.jr2=this.boof6915,this.tribe.push("FR","EL"),this.initAggro=!0,this.text=`When Iztek ${a.log.dbdtap()}, deal that much damage to that player again.~When you play Iztek's Frost, replace this with a level ${this.level} Iztek, Avatar of Frost.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PC",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}else if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.ownerPlayerA)return a.cards.getCard(i.cardCode).cardCode()==="IFR"}return!1}jr8(t){if(t.trigger.type==="DM"){const i=t.event;a.player.ddf3(!t.ownerPlayerA,i.dmg,this.code)}else if(t.trigger.type==="PC"){const i=a.field.jr5(t.trigger.creatId);a.field.birthCreature(`${"IZL"}${this.level}`,"R",i.owner,i.lane)}a.batch.triggerDone()}}class Ti extends E{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Frost",this.jr1=this.boof6915,this.jr2=this.lValN([7,12,20]),this.tribe.push("IC","EL"),this.initAggro=!0;const i=this.boof2510;this.text=`When you play Iztek's Flame, replace this with a level ${this.level} Iztek, Avatar of Flame.~Activate: Deal ${i} damage to a creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("PC",this.code),e}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp2(i,i.playerA,i.lane,{dmg:this.boof2510})}}canActivate(t){return!0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);i.hurtDirect(this.boof2510,this.code),e.endActivation()}ddf8(t){const i=t.event;return i.playerA===t.ownerPlayerA?a.cards.getCard(i.cardCode).cardCode()==="IFL":!1}jr8(t){const i=a.field.jr5(t.trigger.creatId);a.field.birthCreature(`${"IZL"}${this.level}`,"R",i.owner,i.lane),a.batch.triggerDone()}getCardActions(t,i){const e=i??a.field.jr5(t.param);return a.target.toActions([d.crActTarg("CARD",this.code,e.id),a.target.buttonTarget("CANC")])}}class Ci extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Killion, Infinity Warden",this.maxLevel=4,this.jr1=this.lValN([6,9,16,22]),this.jr2=this.lValN([3,7,14,20]),this.tribe.push("FB");let i;this.level<3?i=`a ${a.log.levelGateText(this.level)} card in your`:this.level===3?i="a card in your hand and":i="each card in your hand, deck, and",this.text=`Forge: Level up ${i} discard pile.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=this.level<4,e}handleAction(t){const i=a.state.getActivePlayer();if(t.zone==="N"){const e=a.cards.getCard(i.discard[t.position]);i.discard[t.position]=e.levelUpCard(),a.mode.popMode(),a.action.actionDone(!0)}else{const e=a.cards.getCard(i.hand[t.position]);i.hand[t.position]=e.levelUpCard(),this.discardLevel(!0)}}jr8(t){if(this.level<3)this.discardLevel(!1);else if(this.level===3){const i=a.target.toActions(d.lvlHandActTarg(this.code,""));i.length>0?a.action.ddf5(i):this.discardLevel(!1)}else{const i=a.state.getActivePlayer();this.levelDeck(i.deck),this.levelDeck(i.hand),this.levelDeck(i.discard),a.batch.triggerDone()}}ddf7(t){return d.actionEval(t,"DC")}discardLevel(t){const i=a.state.getActivePlayer(),e=d.target("TD");e.player=a.player.toTarget(i),e.level=a.target.ddf2(this.level),e.canLevel=!0;const s=a.deck.generateContent(i.discard,!1,e);if(s.length>0){const l=s.map(u=>{const p=d.deckSelectAction("CARD",u.cardCode,u.sourceIdx);return p.hostCard=this.code,p});a.deck.showCustomDeck(s,l)}else t?a.action.actionDone(!0):a.batch.triggerDone()}levelDeck(t){t.map(e=>{const s=a.cards.getCard(e);return s.canLevel()?s.levelUpCard():e}).forEach((e,s)=>t[s]=e)}}class Si extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Lavafused Asir",this.jr1=this.boof369,this.jr2=this.jr1*2,this.tribe.push("FR","AS"),this.text=`While a friendly creature is unopposed, gets ${a.log.jr9(this.jr1,0)}.`,this.hints=["OL"];const i=this.avgCreatureStats()[0];this.bonus={exist:this.ddp9(0,i,i,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="A",e}enforceEffect(t,i){const e=d.crTarg(),s=i.status!=="A";e.player=a.player.toTarget(i.owner);const l=a.field.creatByTarget(e),u=d.mod("AT",this.jr1,i.id);l.forEach(p=>{p.opposed||s?p.removeModSafe(i.id):p.addModSafe(u)})}}class wi extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Leafkin Progenitor",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("PL"),this.level===3?(this.text=`Activate: Put a level 1 ${this.name} into an adjacent available lane.`,this.bonus={exist:this.ddp9(1,6,3,0)}):(this.text=`Activate: Replace this with a level ${this.level+1} ${this.name}.`,this.bonus={exist:this.ddp9(0,12*this.level,6*this.level,0)})}canActivate(t){return this.level===3?a.action.emptyAdjacents(t,"").length>0:!0}startActivation(t){this.level===3?a.action.ddf5(this.getCardActions(d.ddf4(),t)):(a.field.birthCreature(this.leafCode(this.level+1),"R",t.owner,t.lane),t.endActivation())}handleAction(t){const i=a.field.jr5(t.param);a.field.birthCreature(this.leafCode(1),"P",t.playerA,t.lane),i.endActivation()}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=a.action.emptyAdjacents(e,"");return s.push(a.action.cancelAction()),s}ddf7(t){if(t.actionKey==="ACTV"){if(this.level===3)return d.ddp5(t);{const i=a.field.jr5(t.param),e=d.ddp4(t,i.owner,i.lane,this.leafCode(this.level+1));return e.hints=["RE"],e}}else{const i=t;return d.ddp4(t,i.playerA,i.lane,this.leafCode(1))}}leafCode(t){return`${"LKP"}${t}`}}class qt extends E{cardConstruct(t){({["AFO"]:()=>this.aetorC(),["CRS"]:()=>this.scootC(),["FOL"]:()=>this.forcC(),["TEX"]:()=>this.texC(),["TSM"]:()=>this.tsmithC()})[t]()}targAction(t,i,e){({["AFO"]:(l,u)=>this.doNossing(l,u),["CRS"]:(l,u)=>this.doNossing(l,u),["FOL"]:(l,u)=>this.doNossing(l,u),["TEX"]:(l,u)=>this.doNossing(l,u),["TSM"]:(l,u)=>this.doNossing(l,u)})[t](i,e)}playTarg;optional=!1;ftext="";forgeLevels=[1,2,3,4];constructor(t){super(t),this.playTarg=d.lvlHandActTarg(this.code,""),this.cardConstruct(this.cardCode()),this.forgeLevels.includes(this.level)&&(this.text="Forge: "+this.ftext)}jr3(t,i){const e=super.jr3(t,i);if(this.forgeLevels.includes(this.level)){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){a.turn.levelAndDiscard(t);const i=a.field.jr5(t.param);this.targAction(this.cardCode(),t,i),a.action.actionDone(!0)}jr8(t){const i=a.target.toActions(this.playTarg);i.length>0?(i.forEach(e=>{e.param=t.creatId}),this.optional&&i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}doNossing(t,i){}ddf7(t){return d.actionEval(t,"DC")}aetorC(){this.faction="A",this.rarity="C",this.name="Aetherforge Oracle",this.jr1=this.boof61218,this.jr2=this.boof246,this.tribe.push("HM"),this.optional=!0,this.playTarg.card="S",this.ftext="You may discard and level up a spell.",this.bonus={play:.5}}scootC(){this.faction="A",this.rarity="R",this.name="Cerebral Scout",this.jr1=this.boof51015,this.jr2=this.boof3712,this.tribe.push("MM"),this.optional=!0,this.playTarg.tribe="MM",this.ftext="You may discard and level up a Metamind.",this.bonus={play:.5}}forcC(){this.faction="A",this.rarity="H",this.name="Forge Oracle",this.jr1=this.lValN([1,10,20]),this.jr2=this.jr1,this.tribe.push("ST"),this.playTarg.faction="A",this.optional=!0,this.ftext="You may discard an Alloyin card and level it.",this.level===1?(this.hints=["LV"],this.bonus={play:1}):(this.consistent=!0,this.bonus={play:.3})}texC(){this.faction="A",this.rarity="C",this.name="Tech Explorer",this.jr1=this.lValN([1,8,18]),this.jr2=this.jr1+2,this.tribe.push("GN"),this.level===1&&(this.hints=["LV"]),this.optional=!0,this.playTarg.card="C",this.ftext="You may discard and level up a creature.",this.bonus={play:.5}}tsmithC(){this.faction="A",this.rarity="C",this.name="Technosmith",this.jr1=this.boof5915,this.jr2=this.jr1-1,this.tribe.push("HM"),this.optional=!0,this.ftext=`You may ${a.log.daluac()}.`,this.bonus={play:.5}}}class Ei extends Q{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Metatransfer",this.text=`Give a creature ${a.log.jr9(-this.boof579,0)}.~Discard and level up a card.`}playTargets(){const t=super.playTargets();return t.push(d.crActTarg("CARD",this.code,"P1")),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1"){const e=a.field.ddf6(t),s=d.lvlHandActTarg(this.code,a.enTil("P2",e.id));s.deckPositionSkip=a.action.cardBeingPlayed.position;const l=a.target.toActions(s);l.length===0?(this.logSpell(),e.buff(-this.boof579,0),a.turn.spellCast()):(l.push(a.action.cancelAction()),a.action.ddf5(l))}else{this.logSpell(),a.field.jr5(i[1]).buff(-this.boof579,0);const s=t;s.position0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.field.birthCreature(i.code,"P",t.playerA,t.lane),i.endActivation()}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=a.action.emptyAdjacents(e,"");return s.push(a.action.cancelAction()),s}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp4(t,i.playerA,i.lane,this.code)}}}class xi extends E{constructor(t){if(super(t),this.faction="U",this.rarity="L",this.name="Mimicwurm",this.jr1=7,this.jr2=this.jr1,this.tribe.push("WR"),this.level>1){this.hints=[this.level===2?"EMO":"EML"];const i=this.level-1;this.bonus={play:this.ddp9(i,14*i,7*i,0)}}this.text=this.lValS(["","Forge: You may put a level 1 Mimicwurm into another lane.","Forge: You may put a level 2 Mimicwurm into another lane. Then you may put a level 1 Mimicwurm into another lane."])}jr3(t,i){const e=super.jr3(t,i);if(this.level>1){const s=e.jr4("FR",this.code);s.interactive=!0}return e}handleAction(t){a.deTil(t.param)[0]==="P1"?this.level===3?(this.wurmsign(2,t),a.action.ddf5(this.getCardActions(t))):(this.wurmsign(1,t),a.action.actionDone(!0)):(this.wurmsign(1,t),a.action.actionDone(!0))}jr8(t){a.action.ddf5(this.fieldActions("P1",[t.event.creature.lane]))}fieldActions(t,i){const e=d.actionTarget("TF","CARD",this.code,a.enTil(t,i[0]));e.player="F",e.lanes=a.field.laneIdx.filter(l=>!i.includes(l));const s=a.target.toActions(e);return s.push(a.action.noneEndTrigger()),s}wurmsign(t,i){a.field.birthCreature(this.wurmCode(t),"R",i.playerA,i.lane)}wurmCode(t){return`${"MMW"}${t}`}getCardActions(t,i){const e=a.deTil(t.param),s=[t.lane,parseInt(e[1])];return this.fieldActions("P2",s)}ddf7(t){const i=a.deTil(t.param),e=this.level===2||i[0]==="P2"?1:2,s=d.ddp4(t,t.playerA,t.lane,this.wurmCode(e));return s.final=e===1,s.hints=["RE"],s}}class Wt extends Q{lookup(t){return{["BRN"]:{c:()=>this.boutC(),z:(e,s)=>this.burner(e,s,8),e:e=>this.burnerEval(e,8)},["IFL"]:{c:()=>this.izfmC(),z:(e,s)=>this.burner(e,s,this.boof6915),e:e=>this.burnerEval(e,this.boof6915)},["LSK"]:{c:()=>this.lspkC(),z:(e,s)=>this.burner(e,s,this.boof6812),e:e=>this.burnerEval(e,this.boof6812)},["LYR"]:{c:()=>this.rainC(),z:(e,s)=>this.rainZ(e,s),e:e=>this.rainE(e)},["SOK"]:{c:()=>this.sealkC(),z:(e,s)=>this.burner(e,s,this.sealzap),e:e=>this.burnerEval(e,this.sealzap)},["SHK"]:{c:()=>this.shkC(),z:(e,s)=>this.shkZ(e,s),e:e=>this.shkE(e)}}[t]}cardCast(t,i,e){this.lookup(t).z(i,e)}castEval(t,i){return this.lookup(t).e(i)}playTarg;burner(t,i,e){i?t.hurtDirect(e,this.code):a.player.ddf3(t,e,this.code)}burnerEval(t,i){const e=d.actionEval(t,"ST");if(t.zone==="P")e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i));else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{dmg:i}))}return e}burnText(t){return`Deal ${t} damage to a creature or player.`}constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return t.push(this.playTarg),t.push(d.actionTarget("TP","CARD",this.code,"")),t}handleAction(t){this.logSpell();let i,e;t.zone==="P"?(i=!1,e=t.playerA):(e=a.field.ddf6(t),i=!0),this.cardCast(this.cardCode(),e,i),a.turn.spellCast()}ddf7(t){return this.castEval(this.cardCode(),t)}boutC(){this.faction="T",this.rarity="R",this.name="Burnout",this.overload=!0,this.maxLevel=1,this.text=this.burnText(8)}izfmC(){this.faction="T",this.rarity="T",this.name="Iztek's Flame",this.text=this.burnText(this.boof6915)}lspkC(){this.faction="T",this.rarity="C",this.name="Lightning Spark",this.text=this.burnText(this.boof6812)}rainC(){this.faction="U",this.rarity="C",this.name="Lysian Rain",this.text=`Give a creature or player +${this.boof7911} health.`}rainZ(t,i){const e=this.boof7911;i?t.buff(0,e):a.player.healPlayer(t,e)}rainE(t){const i=this.boof7911,e=d.actionEval(t,"ST");if(t.zone==="P")e.vectors.push(d.evalVectorPlayerLife(t.playerA,i));else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{hlt:i}))}return e}sealkC(){this.faction="T",this.rarity="C",this.name="Seal of Kadras",this.level<3&&(this.hints=["LV"]),this.consistent=this.level>1,this.text=this.burnText(this.sealzap)}get sealzap(){return this.lValN([1,2,25])}shkC(){this.faction="T",this.rarity="H",this.name="Static Shock",this.text=`${this.burnText(this.boof124)} You may play an additional ${a.log.levelGateText(this.level,!0)}spell this turn.`}shkZ(t,i){this.burner(t,i,this.boof124);const e=a.turn.freeCard(this.code);e.condition.level=a.target.ddf2(this.level),e.condition.card="S"}shkE(t){const i=this.boof124,e=this.burnerEval(t,i);return e.bonus=1,e}}class Fi extends E{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Nefrax, the Soulweaver",this.jr1=this.boof4712,this.jr2=this.lValN([10,15,25]),this.tribe.push("HM");const i=this.boof51015;this.text=`Activate: Put a ${i}/${i} Spirit into an available lane.~Forge: Destroy a friendly creature.`,this.bonus={play:this.ddp9(1,i*2,i,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}canActivate(t){return this.empties(t).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1"){const e=a.field.jr5(i[1]);a.field.birthCreature(`${"SPN"}${this.level}`,"P",t.playerA,t.lane),e.endActivation()}else{const e=a.field.ddf6(t);a.death.destroy(e,this.code),a.action.actionDone(!0)}}jr8(t){const i=d.crFriendActTarg("CARD",this.code,""),e=a.target.toActions(i);a.action.ddf5(e)}empties(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,a.enTil("P1",t.id));return a.target.toActions(i)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param);let s;return s=this.empties(e),s.push(a.action.cancelAction()),s}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param),e=t;return i[0]==="P1"?d.ddp4(t,e.playerA,e.lane,`${"SPN"}${this.level}`):d.ddp7(t,e.playerA,e.lane)}}}class Pi extends E{constructor(t){super(t),this.faction="N",this.rarity="T",this.name="Netherdrake",this.jr1=this.boof4815,this.jr2=this.jr1,this.initMobile=this.lValN([0,0,1]),this.tribe.push("DG"),this.hints=["FK"],this.text=`When this enters play or moves into a lane, destroy the opposing ${a.log.levelGateText(this.level,!0)}creature.`}image(t){return this.rawImage(`${"NSH"}${this.level}`,t)}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FK",this.code),e.jr4("EF",this.code),e}ddf8(t){return t.trigger.type==="EF"&&t.event.creature.id===t.creatId}jr8(t){const e=t.event.creature.opposed;e&&a.target.levelTestCommon(e.level,this.level)&&a.death.destroy(e,this.code),a.batch.triggerDone()}}class Bi extends Yt{enforceEffect(t,i){i.lane===3?i.removeModSafe(i.id):i.addModSafe(d.mod("AR",this.boof236,i.id)),super.enforceEffect(t,i)}}class Ni extends E{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Nova, Grove Queen",this.jr1=this.lValN([3,5,10,14]),this.jr2=this.lValN([7,10,15,19]),this.tribe.push("FB"),this.maxLevel=4;const i=this.nbuf,e=this.lValS(["an adjacent","each adjacent","each","each"]);this.text=`Forge: Put a 1/1 Seedling into ${e} available space.~When a friendly creature is replaced, Nova gets ${a.log.jr9(i,i)}.`,this.bonus={play:2},this.hints=this.level<3?["EMA"]:["EML"]}get nbuf(){return this.lValN([1,3,5,10])}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return this.level===1&&(s.interactive=!0),e.jr4("RP",this.code),e}ddf8(t){if(t.event.code==="RPL"){const i=t.event;return t.creatId!==i.replacedCreat.id&&t.ownerPlayerA===i.replacedCreat.owner}return!1}jr8(t){const i=a.field.jr5(t.creatId);if(t.event.code==="RPL"){const e=this.nbuf;i.buff(e,e),a.batch.triggerDone()}else{const e="NSD"+this.level,s=a.field.emptyLanes(t.ownerPlayerA);if(this.level>1){const l=this.level===2?i.adjacent.filter(p=>s.includes(p)):s,u=Date.now();l.forEach(p=>{const y=a.field.birthCreature(e,"P",i.owner,p,u);y&&y.hints.push("RT")}),a.batch.triggerDone()}else{const l=i.adjacent.filter(u=>s.includes(u));if(l.length===0)a.batch.triggerDone();else if(l.length===1){const u=a.field.birthCreature(e,"P",i.owner,l[0]);u&&u.hints.push("RT"),a.batch.triggerDone()}else{const u=a.action.emptyAdjacents(i,"");a.action.ddf5(u)}}}}handleAction(t){a.field.birthCreature("NSD"+this.level,"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf7(t){return d.ddp4(t,t.playerA,t.lane,"NSD"+this.level)}}class Hi extends Q{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Omnomnom";const i=this.boof246,e=i*-1;this.text=`Give a friendly Zombie ${a.log.jr9(i,i,!0)}, and Regenerate ${i}.~Then give an enemy non-Zombie ${a.log.jr9(e,e)}.`}playTargets(){const t=super.playTargets();if(this.nonZombies().length>0){const i=d.crFriendActTarg("CARD",this.code,"P1");i.tribe="ZB",t.push(i)}return t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof246;s.buff(l,l),s.addRegen(l),e.buff(-l,-l),a.turn.spellCast()}}nonZombies(t=""){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P2",t));return a.target.toActions(i).filter(e=>{const s=e;return!a.field.ddf6(s).isTribe("ZB")})}getCardActions(t,i){if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.action.cancelAction(),l=this.nonZombies(e.id);return l.push(s),l}return super.getCardActions(t,i)}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=this.boof246,l=d.ddp3(t,e,{att:s,hlt:s,rgn:s});return l.vectors.push(d.ddp1(t.playerA,t.lane,{att:-s,hlt:-s})),l}}}class Mi extends E{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Onyxium Allomancer",this.jr1=this.boof248,this.jr2=this.boof61016,this.tribe.push("HM"),this.hints=["ALN","OL"];const i=this.boof358;this.text=`Activate: Discard and level up a card.~Allied Nekrium: Regenerate ${i}.`,this.bonus={exist:this.ddp9(0,i,0,0,.5)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){return a.state.getPlayer(t.owner).hand.some(e=>a.cards.getCard(e).canLevel())}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.turn.levelAndDiscard(t),i.endActivation()}jr8(t){a.turn.allied("N")&&a.field.jr5(t.creatId).addRegen(this.boof358),a.batch.triggerDone()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.lvlHandActTarg(this.code,e.id);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){return t.actionKey==="ACTV"?d.ddp5(t):d.actionEval(t,"DC")}}class Ri extends E{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Onyxium Phantasm",this.jr1=this.boof246,this.jr2=this.lValN([9,12,19]),this.initRegen=this.boof124,this.tribe.push("ST"),this.text=`Allied Alloyin: Activate: Give a creature ${a.log.jr9(this.boof4812n,0)}`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){return t.hasMod(t.id)}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param);a.field.ddf6(t).buff(this.boof4812n,0),i.endActivation()}jr8(t){if(a.turn.allied("A")){const i=a.field.jr5(t.creatId);i.addMod(d.mod("AL",!0,i.id)),i.changed=!0}a.batch.triggerDone()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.crActTarg("CARD",this.code,e.id),l=a.target.toActions(s);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.actionEvalBuffN(t,i.playerA,i.lane,this.boof4812n)}}}class Li extends Q{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Oratek Battlebrand",this.hints=["ALA"];const i=this.boof71013;this.text=`Deal ${i} damage to a creature.~Allied Alloyin: You may discard a card and level it.`}playTargets(){const t=super.playTargets();return t.push(d.crActTarg("CARD",this.code,"")),t}handleAction(t){if(t.zone==="F"){this.logSpell();const i=t;if(a.field.ddf6(i).hurtDirect(this.boof71013,this.code),a.turn.allied("A")){const s=this.levelActs();s.length===1?a.turn.spellCast():a.action.ddf5(s)}else a.turn.spellCast()}else if(t.zone==="H"){const i=t;i.position0?(i.push(a.action.noneEndTrigger()),a.action.ddf5(i)):a.batch.triggerDone()}}ddf7(t){return d.actionEval(t,"DC")}}class ue extends E{hitCreature;constructor(t,i){super(t),this.hitCreature=i}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.creatureTarg===this.hitCreature&&i.creatureSrc&&i.source.id===t.creatId}return!1}}class Gi extends ue{constructor(t){super(t,!1),this.faction="U",this.rarity="L",this.name="Oros, Deepwood's Chosen",this.jr1=this.lValN([7,11,16,0]),this.jr2=this.jr1,this.initBT=!0,this.maxLevel=4,this.tribe.push("FB"),this.hints=["OL","LKV"];const i=`When Oros ${a.log.dbdtap()}, you gain that much health.`,e=this.level===4?"Oros gets +attack and +health equal to your health.~":"";this.text=e+i}jr3(t,i){const e=super.jr3(t,i);return this.level===4&&e.addEffect("PH",this.code),e}jr8(t){const i=t.event;a.player.healPlayer(t.ownerPlayerA,i.dmg),a.batch.triggerDone()}enforceEffect(t,i){const e=a.state.getPlayer(i.owner).health;i.status==="A"&&(i.removeModSafe(i.id),i.addModSafe(d.mod("HL",e,i.id)),i.addModSafe(d.mod("MH",e,i.id)),i.addModSafe(d.mod("AT",e,i.id)))}}class $i extends E{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Oxidon Spitter",this.jr1=this.boof7914,this.jr2=this.boof3510,this.tribe.push("DN"),this.l3=this.level===3,this.text=`Forge: Negate Armor from ${this.l3?"each":"an"} enemy creature.`}l3;jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!this.l3,e}jr8(t){if(this.l3)a.field.creatByTarget(d.crEnemyTarg()).forEach(i=>{i.negateArmor=!0}),a.batch.triggerDone();else{const i=d.crEnemyActTarg("CARD",this.code,""),e=a.target.toActions(i);e.length>0?a.action.ddf5(e):a.batch.triggerDone()}}handleAction(t){const i=a.field.ddf6(t);i.negateArmor=!0,a.action.actionDone(!0)}ddf7(t){const i=a.field.ddf6(t);return d.ddp3(t,i,{arm:-i.armor})}}class Lt extends E{lookup(t){return{["AFS"]:{c:()=>this.afsC(),a:e=>this.afsA(e),t:e=>this.afsT(e),e:e=>this.afsE(e)},["DMW"]:{c:()=>this.drixC(),a:e=>this.drixA(e),t:e=>this.drixT(e),e:e=>this.drixE(e)},["FGG"]:{c:()=>this.fggC(),a:e=>this.fggA(e),t:e=>this.fggT(e),e:e=>this.fggE(e)},["GHS"]:{c:()=>this.mvpC(),a:e=>this.mvpA(e),t:e=>this.mvpT(e),e:e=>this.mvpE(e)},["OWW"]:{c:()=>this.owwC(),a:e=>this.owwA(e),t:e=>this.owwT(e),e:e=>this.owwE(e)},["UPM"]:{c:()=>this.upakC(),a:e=>this.upakA(e),t:e=>this.upakT(e),e:e=>this.upakE(e)},["WFM"]:{c:()=>this.wfmC(),a:e=>this.wfmA(e),t:e=>this.wfmT(e),e:e=>this.wfmE(e)}}[t]}runAct(t,i){this.lookup(t).a(i)}testAct(t,i){return this.lookup(t).t(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}canActivate(t){return this.testAct(this.cardCode(),t)}startActivation(t){this.runAct(this.cardCode(),t),t.endActivation()}ddf7(t){return this.lookup(this.cardCode()).e(t)}evalAfterPlayCards(t){return a.state.gs.turn.regularPlays>0||a.state.gs.turn.freeCards.length>0?d.actionEval(t,"NR"):d.actionEval(t,"ST")}afsC(){this.faction="A",this.rarity="L",this.name="Arcflight Squadron",this.jr1=this.boof4710,this.jr2=this.jr1+2,this.tribe.push("RB"),this.hints=["OL"],this.text=`Activate: You may play an additional ${a.log.levelGateText(this.level,!0)}Robot this turn.`}afsT(t){return!0}afsA(t){const i=a.turn.freeCard(this.code);i.condition.tribe="RB",i.condition.level=a.target.ddf2(this.level)}afsE(t){return d.actionEval(t,"ST")}drixC(){this.faction="A",this.rarity="L",this.name="Drix, the Mindwelder",this.jr1=this.boof3612,this.jr2=this.lValN([6,12,21]),this.tribe.push("MM"),this.text=`Activate, discard your hand: Each friendly Metamind gets ${a.log.jr9(this.level,0)} for each card discarded this way.`}drixT(t){return a.state.getActivePlayer().hand.length>0}drixA(t){const i=a.state.getPlayer(t.owner),e=i.hand.length*this.level;i.discard.push(...i.hand),i.hand=[];const s=d.crFriendTarg();s.tribe="MM",a.field.creatByTarget(s).forEach(l=>{l.buff(e,0)})}drixE(t){return this.evalAfterPlayCards(t)}fggC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Gamma",this.jr1=this.boof4816,this.jr2=this.jr1,this.tribe.push("RB","GD");const t=this.boof255080;this.text=`Activate, destroy five friendly Robot Guardians: Put a ${t}/${t} Forge Guardian Omega into this lane.`}fggT(t){return a.field.creatByTarget(this.fggTarg()).length===5}fggA(t){const i=t.lane,e=t.owner,s=Date.now();a.field.creatByTarget(this.fggTarg()).forEach(l=>a.death.destroy(l,this.code,s)),a.field.birthCreature(`${"FGO"}${this.level}`,"P",e,i)}fggTarg(){const t=d.crFriendTarg();return t.tribe="GD",t}fggE(t){const i=a.field.jr5(t.param),e=d.ddp4(t,i.owner,i.lane,`${"FGO"}${this.level}`);return e.hints=["RE"],e.bonus=100,e.type="ST",e}mvpC(){this.faction="U",this.rarity="C",this.name="Gemheart Sprout",this.jr1=this.boof357,this.jr2=this.jr1+this.level,this.initDefend=!0,this.tribe.push("PL"),this.text=`Activate: You gain health equal to ${this.level}x the number of friendly creatures.`}mvpT(t){return!0}mvpA(t){const i=a.field.ddf1().length;a.player.healPlayer(t.owner,i*this.level)}mvpE(t){return this.evalAfterPlayCards(t)}owwC(){this.faction="A",this.rarity="L",this.name="Oreian Warwalker",this.jr1=this.boof359,this.jr2=this.boof61018,this.tribe.push("RB"),this.text=`Activate: ${this.name} gets ${this.owwbuff+1}x attack.`}owwT(t){return!0}owwA(t){t.buff(t.attack*this.owwbuff,0)}get owwbuff(){return this.lValN([1,1,2])}owwE(t){return this.evalAfterPlayCards(t)}upakC(){this.faction="U",this.rarity="L",this.name="Uterra Packmaster",this.jr1=this.boof6914,this.jr2=this.jr1,this.tribe.push("HM");const t=this.boof124;this.text=`Activate: each other friendly Uterra creature gets ${a.log.jr9(t,t)}.`}upakT(t){return a.field.creatByTarget(this.upakTarg(t.id)).length>0}upakA(t){const i=this.boof124;a.field.creatByTarget(this.upakTarg(t.id)).forEach(e=>{e.buff(i,i)})}upakTarg(t){const i=d.crFriendNotMeTarg(t);return i.faction="U",i}upakE(t){return this.evalAfterPlayCards(t)}wfmC(){this.faction="T",this.rarity="H",this.name="Wildfire Maiden",this.jr1=this.boof4610,this.jr2=this.boof5814,this.tribe.push("FR","AS"),this.text=`Activate, destroy ${this.name}: Deal damage equal to its attack to each enemy creature.`}wfmT(t){return!0}wfmA(t){const i=Date.now();a.field.creatByTarget(d.crEnemyTarg()).forEach(e=>{e.hurtDirect(t.attack,this.code,i)}),a.death.destroy(t,this.code)}wfmE(t){const i=a.field.jr5(t.param),e=d.ddp8(t,i),s=!i.owner;return e.vectors.push(...a.field.laneIdx.map(l=>d.ddp1(s,l,{dmg:i.attack}))),e}}class we extends E{lookup(t){return{["MDE"]:{c:()=>this.misdC(),f:e=>this.misdF(e)},["TAB"]:{c:()=>this.thraC(),f:e=>this.thraF(e)}}[t]}cardForge(t,i){this.lookup(t).f(i)}ftext="";constructor(t){super(t),this.lookup(this.cardCode()).c(),this.text="Assault: "+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i);return e.jr4("AS",this.code),e}jr8(t){this.cardForge(this.cardCode(),t),a.batch.triggerDone()}misdC(){this.faction="N",this.rarity="C",this.name="Misery Demon",this.jr1=this.boof5915,this.jr2=this.boof2510,this.tribe.push("DM"),this.hints=["OL"];const t=this.level+3;this.bonus={play:this.ddp9(0,0,0,t*2)},this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health.`}misdF(t){const i=this.level+3;a.player.ddf3(!t.ownerPlayerA,i,this.code),a.player.healPlayer(t.ownerPlayerA,i)}thraC(){this.faction="T",this.rarity="C",this.name="Thranik Ambusher",this.jr1=this.boof5813,this.jr2=this.jr1,this.tribe.push("DK"),this.hints=["OL"];const t=this.boof234;this.bonus={play:this.ddp9(0,t+t,t,0)},this.ftext=`${this.name} gets ${a.log.jr9(t,t)}.`}thraF(t){const i=this.boof234;a.field.jr5(t.creatId).buff(i,i)}}class at extends E{lookup(t){return{["ATT"]:{c:()=>this.atorC(),t:(e,s)=>this.atorT(e,s),b:(e,s)=>this.atorB(e,s)},["FGD"]:{c:()=>this.fgdC(),t:(e,s)=>this.fgdT(e,s),b:(e,s)=>this.fgdB(e,s)},["FSP"]:{c:()=>this.fspC(),t:(e,s)=>this.fspT(e,s),b:(e,s)=>this.fspB(e,s)},["HMF"]:{c:()=>this.hamfC(),t:(e,s)=>this.hamfT(e,s),b:(e,s)=>this.hamfB(e,s)},["HOD"]:{c:()=>this.haroldC(),t:(e,s)=>this.ocarT(e,s),b:(e,s)=>this.haroldB(e,s)},["OJC"]:{c:()=>this.ocarC(),t:(e,s)=>this.ocarT(e,s),b:(e,s)=>this.ocarB(e,s)},["RLW"]:{c:()=>this.restwandC(),t:(e,s)=>this.restwandT(e,s),b:(e,s)=>this.restwandB(e,s)},["RHW"]:{c:()=>this.ruthwandC(),t:(e,s)=>this.restwandT(e,s),b:(e,s)=>this.ruthwandB(e,s)},["SDR"]:{c:()=>this.spdryC(),t:(e,s)=>this.spdryT(e,s),b:(e,s)=>this.spdryB(e,s)},["TDW"]:{c:()=>this.tdwC(),t:(e,s)=>this.tdwT(e,s),b:(e,s)=>this.tdwB(e,s)},["TNL"]:{c:()=>this.tnlC(),t:(e,s)=>this.tnlT(e,s),b:(e,s)=>this.tnlB(e,s)},["UTR"]:{c:()=>this.urexC(),t:(e,s)=>this.urexT(e,s),b:(e,s)=>this.urexB(e,s)}}[t]}testBirth(t,i){return this.lookup(t).t(i,i.event)}actBirth(t,i){this.lookup(t).b(i,i.event)}iTrigger=!0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.iTrigger&&e.jr4("EF",this.code),e}ddf8(t){return t.event.code==="ENT"?this.testBirth(this.cardCode(),t):!1}jr8(t){this.actBirth(this.cardCode(),t),a.batch.triggerDone()}atorC(){this.faction="T",this.rarity="L",this.name="Ator, Thunder Titan",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.tribe.push("GT"),this.text=`Each another friendly ${a.log.levelGateText(this.level,!0)}creature gets Assault: Aggressive.`,this.bonus={exist:.5}}atorT(t,i){const e=i.creature;return i.forged&&t.trigger.creatId!==e.id&&e.owner===t.ownerPlayerA&&a.target.levelTargetTest(a.target.ddf2(this.level),e.level)&&!e.opposed}atorB(t,i){i.creature.aggressive=!0}fgdC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Delta",this.jr1=this.boof71117,this.jr2=this.jr1,this.tribe.push("RB","GD");const t=this.boof255080;this.text=`When ${this.name} enters play, if there is a friendly Alpha Beta, and Gamma, put a ${t}/${t} Forge Guardian Omega in your discard pile.`}fgdT(t,i){return i.creature.id===t.creatId}fgdB(t,i){const e=d.crTarg();e.player=a.player.toTarget(t.ownerPlayerA);const s=a.field.creatByTarget(e).map(l=>l.code.slice(0,3));s.includes("FGA")&&s.includes("FGB")&&s.includes("FGG")&&a.player.toPlayer(t.ownerPlayerA).discard.push("FGO"+this.level)}fspC(){if(this.faction="A",this.rarity="L",this.name="Flowsteel Prototype",this.jr1=this.lValN([3,6,8]),this.jr2=this.lValN([8,15,20]),this.tribe.push("SS"),this.hints=["P1"],this.iTrigger=this.level>1,this.iTrigger){const t=a.log.levelGateText(this.level-1);this.text=`When you Forge a ${t} creature, ${this.name} gets +attack equal to that creature's attack.`;const i=this.avgCreatureStats(this.level-1);this.bonus={exist:this.ddp9(0,i[0],i[0],0)*.5}}}fspT(t,i){return!!(i.forged&&i.creature.owner===t.ownerPlayerA&&a.cards.getCard(i.creature.code).level0&&a.field.jr5(t.creatId).move(e[a.randInt(0,s)])}haroldC(){this.faction="T",this.rarity="R",this.name="Herald of Destruction",this.jr1=this.boof369,this.jr2=this.lValN([9,12,18]),this.tribe.push("FR","AS"),this.text=`When an enemy creature enters play, if it wasn't Forged, deal damage equal to ${this.name}'s attack to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,this.jr1)*.5}}haroldB(t,i){if(at.itBirthedFirst(i.creature.id,t.creatId)){const e=a.field.jr5(t.creatId);a.player.ddf3(!e.owner,e.attack,this.code)}}ocarC(){this.faction="A",this.rarity="H",this.name="Oreian Justicar",this.jr1=this.boof5814,this.jr2=this.boof81220,this.tribe.push("HM");const t=this.ocarbuff;this.text=`When an enemy creature enters play, if it wasn't Forged, it gets ${a.log.jr9(t,0)}.`,this.bonus={exist:this.ddp9(0,t,t,0)*-.5}}ocarT(t,i){return i.creature.owner!==t.ownerPlayerA&&!i.forged}ocarB(t,i){at.itBirthedFirst(i.creature.id,t.creatId)&&i.creature.buff(this.ocarbuff,0)}get ocarbuff(){return this.lValN([-5,-10,-20])}restwandC(){this.faction="U",this.rarity="H",this.name="Restless Wanderers",this.jr1=this.boof51014,this.jr2=this.boof3610,this.tribe.push("ST","WD");const t=this.boof369;this.text=`When another friendly Spirit Wanderer enters play, ${this.name} gets ${a.log.jr9(t,t)}.`}restwandT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA?i.creature.isTribe("WD"):!1}restwandB(t,i){const e=a.field.jr5(t.trigger.creatId),s=this.boof369;e.buff(s,s)}ruthwandC(){this.faction="N",this.rarity="C",this.name="Ruthless Wanderers",this.jr1=this.boof3610,this.jr2=this.boof51014,this.tribe.push("ST","WD");const t=-this.boof369;this.text=`When another friendly Spirit Wanderer enters play, the creature opposing this gets ${a.log.jr9(t,t)}.`}ruthwandB(t,i){const s=a.field.jr5(t.trigger.creatId).opposed;if(s){const l=-this.boof369;s.buff(l,l)}}spdryC(){this.faction="U",this.rarity="R",this.name="Spring Dryad",this.jr1=this.boof469,this.jr2=this.jr1,this.tribe.push("DY"),this.hints=["P1"],this.text=`When a friendly creature enters play, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)}}spdryT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA}spdryB(t,i){a.field.jr5(t.trigger.creatId).buff(this.level,this.level)}tdwC(){this.faction="N",this.rarity="R",this.name="Tarsus Deathweaver",this.jr1=this.boof5915,this.jr2=this.jr1,this.tribe.push("HM");const t=this.boof246;this.text=`When a friendly creature enters play, if it wasn't Forged, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}tdwT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA&&!i.forged}tdwB(t,i){if(at.itBirthedFirst(i.creature.id,t.creatId)){const e=this.boof246;i.creature.buff(e,e)}}tnlC(){this.faction="N",this.rarity="L",this.name="Tarsus Necrolord",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("HM");const t=this.boof124,i=this.boof359;this.text=`Forge: Spawn a ${i}/${i} Zombie for each friendly creature that was destroyed this turn.~When a friendly Zombie enters play, ${this.name} gets ${a.log.jr9(t,t)}.`}tnlT(t,i){return i.creature.owner===t.ownerPlayerA?i.creature.isTribe("ZB"):!1}tnlB(t,i){const e=a.field.jr5(t.trigger.creatId),s=this.boof124;e.buff(s,s)}urexC(){this.faction="U",this.rarity="H",this.name="Uterradon Rex",this.jr1=this.boof4813,this.jr2=this.boof71118,this.tribe.push("DN");const t=this.boof124;this.text=`When another friendly Dinosaur enters play, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}urexT(t,i){return t.trigger.creatId!==i.creature.id&&i.creature.owner===t.ownerPlayerA&&i.creature.isTribe("DN")}urexB(t,i){if(at.itBirthedFirst(i.creature.id,t.creatId)){const e=this.boof124;i.creature.buff(e,e)}}static itBirthedFirst(t,i){if(t===i)return!0;let e=!1;const s=a.death.findDeathTime(i);if(a.isUn(s))e=!0;else{const l=a.field.findBirthTime(t);(a.isUn(l)||l<=s)&&(e=!0)}return e}}class It extends ue{lookup(t){return{["AGM"]:{c:()=>this.agamC(),h:(e,s,l,u)=>this.agamH(e,s,l,u)},["BWK"]:{c:()=>this.blwalkC(),h:(e,s,l,u)=>this.blwalkH(e,s,l,u)},["BRF"]:{c:()=>this.bfangC(),h:(e,s,l,u)=>this.bfangH(e,s,l,u)},["CDT"]:{c:()=>this.cadtC(),h:(e,s,l,u)=>this.cadtH(e,s,l,u)},["GSC"]:{c:()=>this.gcobC(),h:(e,s,l,u)=>this.gcobH(e,s,l,u)},["IHA"]:{c:()=>this.ibhaC(),h:(e,s,l,u)=>this.ibhaH(e,s,l,u)},["SHS"]:{c:()=>this.shimfC(),h:(e,s,l,u)=>this.shimfH(e,s,l,u)}}[t]}image(t){return this.rarity==="T"?this.fixedImage(t):this.leveledImage(t)}cardConstruct(t){this.hints=["OP"],this.lookup(t).c()}creatHit(t,i,e,s,l){this.lookup(t).h(i,e,s,l)}constructor(t){super(t,!0),this.cardConstruct(this.cardCode())}jr8(t){const i=t.event,e=i.source,s=i.target;e?this.creatHit(this.cardCode(),t,i,e,s):a.log.add("ERROR couldnt find creature - "+this.name),a.batch.triggerDone()}agamC(){this.faction="T",this.rarity="L",this.name="Agamemnon",this.jr1=this.boof4814,this.jr2=this.lValN([8,12,18]),this.level>1&&(this.initMobile=1,this.initAggro=this.level===3),this.tribe.push("GT"),this.text=`When ${this.name} ${a.log.dbdtac()} on your turn, this battles again.`}agamH(t,i,e,s){t.ownerPlayerA===a.state.ddf9()&&(e.extraBattles+=1)}blwalkC(){this.faction="N",this.rarity="R",this.name="Blight Walker",this.jr1=this.boof137,this.jr2=this.lValN([5,10,17]),this.tribe.push("ZB"),this.text=`When ${this.name} ${a.log.dbdtac(this.level)}, destroy that creature.`,this.hints.push("BX")}blwalkH(t,i,e,s){s.status==="A"&&a.target.levelTestCommon(s.level,this.level)&&a.death.destroy(s,this.code)}bfangC(){this.faction="U",this.rarity="T",this.name="Broodfang",this.jr1=this.level,this.jr2=this.level,this.maxLevel=this.level,this.minLevel=this.level,this.tribe.push("SN"),this.text=this.poisonText(this.jr1)}bfangH(t,i,e,s){s.addPoison(this.jr1)}poisonText(t){return`When ${this.name} ${a.log.dbdtac()}, give that creature gets Poison ${t}.`}cadtC(){this.faction="U",this.rarity="R",this.name="Cadaverous Thicket",this.jr1=this.boof135,this.jr2=this.lValN([7,12,22]),this.tribe.push("PL"),this.text=this.poisonText(this.jr1)}cadtH(t,i,e,s){s.addPoison(this.jr1)}gcobC(){this.faction="U",this.rarity="C",this.name="Ghostscale Cobra",this.jr1=this.boof4610,this.jr2=this.boof135,this.tribe.push("SN"),this.text=this.poisonText(this.jr1)}gcobH(t,i,e,s){s.addPoison(this.jr1)}ibhaC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Hammer of Anvillon",this.jr1=this.lValN([4,7,12,15]),this.jr2=this.lValN([7,11,17,25]),this.initArmor=this.lValN([1,3,5,20]),this.tribe.push("FB"),this.maxLevel=4;const t=this.level===4?"'s attack gets reduced to 0":` gets ${a.log.jr9(this.boof246n,0)}`;this.text=`When Ironbeard ${a.log.dbdtac()}, that creature${t}, and moves to an available enemy lane at random.`}ibhaH(t,i,e,s){if(s.status==="A"){const l=this.level===4?s.attack*-1:this.boof246n;s.buff(l,0);const u=a.field.emptyLanes(s.owner),p=u.length;p>0&&s.move(u[a.randInt(0,p)])}}shimfC(){this.faction="U",this.rarity="R",this.name="Shimmerfang Serpent",this.jr1=this.boof357,this.jr2=this.boof61016,this.tribe.push("SN"),this.text=`When ${this.name} ${a.log.dbdtac()}, that creatures gets that much Poison.`,this.hints.push("ATH")}shimfH(t,i,e,s){s.addPoison(i.dmg)}}class yt extends ue{lookup(t){return{["ABR"]:{c:()=>this.ashbC(),h:(e,s,l)=>this.ashyH(e,s,l)},["AMY"]:{c:()=>this.ashmC(),h:(e,s,l)=>this.ashyH(e,s,l)},["CFB"]:{c:()=>this.cfbC(),h:(e,s,l)=>this.cfbH(e,s,l)},["EPS"]:{c:()=>this.epsdC(),h:(e,s,l)=>this.epsdH(e,s,l)},["EFM"]:{c:()=>this.efmC(),h:(e,s,l)=>this.efmH(e,s,l)},["FBC"]:{c:()=>this.fbcC(),h:(e,s,l)=>this.fbcH(e,s,l)},["RTS"]:{c:()=>this.rzstC(),h:(e,s,l)=>this.rzstH(e,s,l)},["RSE"]:{c:()=>this.rselC(),h:(e,s,l)=>this.rselH(e,s,l)},["SVH"]:{c:()=>this.strhyC(),h:(e,s,l)=>this.strhyH(e,s,l)},["URB"]:{c:()=>this.uridC(),h:(e,s,l)=>this.uridH(e,s,l)},["VES"]:{c:()=>this.veskC(),h:(e,s,l)=>this.veskH(e,s,l)}}[t]}cardConstruct(t){this.hints=["OP","LKV"],this.lookup(t).c()}creatHit(t,i,e,s){this.lookup(t).h(i,e,s)}bothTurns=!0;constructor(t){super(t,!1),this.cardConstruct(this.cardCode())}jr8(t){const i=t.event,e=i.source;e&&(this.bothTurns||e.owner===a.state.ddf9())?this.creatHit(this.cardCode(),t,i,e):a.log.add("ERROR couldnt find creature - "+this.name),a.batch.triggerDone()}ashyC(){this.faction="T",this.rarity="C",this.tribe.push("FR","AS");const t=this.boof124;this.text=`When ${this.name} ${a.log.dbdtap()}, it gets ${a.log.jr9(t,t)}.`}ashyH(t,i,e){const s=this.boof124;e.buff(s,s)}ashbC(){this.name="Ashurian Brawler",this.jr1=this.boof7911,this.jr2=this.jr1,this.ashyC()}ashmC(){this.name="Ashurian Mystic",this.jr1=this.boof3610,this.jr2=this.boof5812,this.initAggro=!0,this.ashyC()}cfbC(){this.faction="T",this.rarity="H",this.name="Cinderfist Brawler",this.jr1=this.boof71014,this.jr2=this.boof357,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${a.log.dbdtap()}, deal that much damage to that player again.`}cfbH(t,i,e){a.player.ddf3(!e.owner,i.dmg,e.code)}epsdC(){this.faction="A",this.rarity="T",this.name="Epoch Soldier",this.minLevel=this.level,this.maxLevel=this.level,this.jr1=this.boof4710,this.jr2=this.jr1,this.tribe.push("HM"),this.bothTurns=!1,this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, draw a card at the end of the turn.`}epsdH(t,i,e){const s=d.trigger("TE","EPH"+this.level);s.customCode=a.genId(),a.player.toPlayer(t.ownerPlayerA).triggers.push(s)}efmC(){this.faction="T",this.rarity="L",this.name="Everflame Mystic",this.jr1=this.boof5813,this.jr2=this.jr1+1,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, you may play ${this.lValS(["one","two","three"])} spells this turn.`}efmH(t,i,e){if(a.state.ddf9()===e.owner)for(let s=0;sl.hurtDirect(i.dmg,this.code,s))}rzstC(){this.faction="T",this.rarity="C",this.name="Razortooth Stalker",this.jr1=this.boof4812,this.jr2=this.jr1+1,this.initMobile=1,this.tribe.push("DN");const t=this.boof235;this.text=`When ${this.name} ${a.log.dbdtap()}, it gets ${a.log.jr9(t,t)}.`}rzstH(t,i,e){const s=this.boof235;e.buff(s,s)}rselC(){this.faction="T",this.rarity="H",this.name="Rumblestone Elemental",this.jr1=this.boof246,this.jr2=this.level,this.initAggro=!0,this.tribe.push("ER","EL"),this.hints=["OL"],this.bonus={play:this.ddp9(1,this.jr1,this.jr1,0)},this.text=`When ${this.name} ${a.log.dbdtap()}, deal that much damage to itself as well.~Assault: Spawn a copy of ${this.name}. Then repeat this for each copy.`}rselH(t,i,e){e.hurtDirect(i.dmg,this.code)}strhyC(){this.faction="U",this.rarity="C",this.name="Stranglevine Hydra",this.jr1=this.boof5815,this.jr2=this.jr1+1,this.tribe.push("HY"),this.text=`When ${this.name} ${a.log.dbdtap()}, it gets Regenerate ${this.level}.`}strhyH(t,i,e){e.addRegen(this.level)}uridC(){this.faction="U",this.rarity="L",this.name="Uterradon Ridgeback",this.jr1=this.boof71117,this.jr2=this.boof4713,this.initBT=!0,this.tribe.push("DN"),this.hints.push("FRS"),this.bothTurns=!1;const t=this.boof124;this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}uridH(t,i,e){const s=this.boof124,l=this.level===3;a.field.ddf1().forEach(u=>{u.buff(s,s),l&&(u.breakthrough=!0)})}veskC(){this.faction="N",this.rarity="L",this.name="Vyric Ebonskull",this.jr1=this.boof3713,this.jr2=this.boof71117,this.tribe.push("VP"),this.text=`When Vyric ${a.log.dbdtap()}, destroy an enemy ${a.log.levelGateText(this.level,!0)} creature at random.${this.level===3?" Then Spawn a copy of that creature.":""}`}veskH(t,i,e){const s=d.crTarg();s.player=a.player.toTarget(i.target),s.level=a.target.ddf2(this.level);const l=a.field.creatByTarget(s);if(l.length>0){const u=Date.now(),p=l[a.randInt(0,l.length)];a.death.destroy(p,this.code,u),this.level===3&&a.field.birthCreature(p.code,"S",e.owner,void 0,u)}}}class te extends E{lookup(t){return{["CHR"]:{c:()=>this.crgC(),d:(e,s,l)=>this.crgD(e,s,l)},["DZD"]:{c:()=>this.dozC(),d:(e,s,l)=>this.dozD(e,s,l)},["IMD"]:{c:()=>this.eddieC(),d:(e,s,l)=>this.eddieD(e,s,l)},["TDS"]:{c:()=>this.tsrC(),d:(e,s,l)=>this.tsrD(e,s,l)}}[t]}constructor(t){super(t),this.lookup(this.cardCode()).c()}cares=!0;cardDamaged(t,i){const e=i.event,s=e.target;this.lookup(t).d(i,s,e)}image(t){return this.cardCode()==="DZD"?this.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return this.cares&&e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.creatureTarg&&i.target.id===t.creatId}return!1}jr8(t){this.cardDamaged(this.cardCode(),t),a.batch.triggerDone()}crgC(){this.faction="U",this.rarity="L",this.name="Chrogias",this.jr1=this.lValN([1,0,40]),this.jr2=this.lValN([1,15,40]),this.tribe.push("PL"),this.level===1?(this.hints=["LV","ST"],this.bonus={play:1},this.cares=!1):this.level===2?(this.initRegen=2,this.initDefend=!0,this.bonus={play:1}):this.level===3&&(this.initBT=!0,this.initRegen=5),this.level>1&&(this.hints=["DLK"],this.text="When Chrogias is dealt damage, you gain that much health.")}crgD(t,i,e){a.player.healPlayer(t.ownerPlayerA,e.dmg)}dozC(){this.faction="U",this.rarity="L",this.name="Dozer, the Dormant",this.jr1=0,this.jr2=this.level*3+6,this.tribe.push("BR"),this.initDefend=!0,this.hints=["DLK"],this.text=`When ${this.name} is dealt damage and survives, replace it with a ${this.jr2}/${this.jr2} Dozer, the Awakened`}dozD(t,i,e){if(i.health>0&&i.status==="A"){const s=a.field.birthCreature(`${"DZA"}${this.level}`,"R",i.owner,i.lane);s&&s.setHealth(i.health)}}eddieC(){this.faction="A",this.rarity="L",this.name="Iron Maiden",this.jr1=this.lValN([1,3,30]),this.jr2=this.jr1,this.tribe.push("RB"),this.consistent=this.level>1,this.level===3?(this.initBT=!0,this.hints=["DLK","LKR"],this.text="When Iron Maiden is dealt damage, deal that much damage to the enemy player."):(this.cares=!1,this.hints=["LV","ST"],this.bonus={play:1})}eddieD(t,i,e){a.player.ddf3(!t.ownerPlayerA,e.dmg,this.code)}tsrC(){this.faction="U",this.rarity="L",this.name="Thundersaur",this.jr1=0,this.jr2=this.level*12,this.tribe.push("DN"),this.initBT=!0,this.hints=["DLK","LKR"],this.text=`When ${this.name} is dealt damage, it gets +1 attack for each damage dealt.`}tsrD(t,i,e){i.buff(e.dmg,0)}}class mt extends E{lookup(t){return{["DFB"]:{c:()=>this.dfbC(),d:e=>this.dfbD(e)},["GGD"]:{c:()=>this.ggdC(),d:e=>this.ggdD(e)},["GGR"]:{c:()=>this.ggdrC(),d:e=>this.ggdrD(e)},["GGP"]:{c:()=>this.ggpC(),d:e=>this.ggpD(e)},["NGT"]:{c:()=>this.ngauntC(),d:e=>this.ngauntD(e)},["SRH"]:{c:()=>this.sharvC(),d:e=>this.sharvD(e)},["YNS"]:{c:()=>this.yuruC(),d:e=>this.yuruD(e)}}[t]}creatDied(t,i){this.lookup(t).d(i)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DS",this.code),e}ddf8(t){return t.trigger.type==="DS"}jr8(t){this.creatDied(this.cardCode(),t),a.batch.triggerDone()}dfbC(){this.faction="N",this.rarity="R",this.name="Dr. Frankenbaum",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.tribe.push("AB");const t=this.boof234;this.text=`When a friendly Abomination is destroyed, deal ${t} damage to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,t*2)}}dfbD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;(i.id===s.id||s.owner===i.owner&&s.isTribe("AB")&&mt.itDiedFirst(s.id,i.id))&&a.player.ddf3(!i.owner,this.boof234,this.code)}ggdC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Devourer",this.jr1=this.boof579,this.jr2=this.jr1-2,this.tribe.push("GG"),this.hints=["OL"],this.text=`When a creature is destroyed, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)*2}}ggdD(t){a.field.jr5(t.creatId).buff(this.level,this.level)}get doomb(){return this.lValN([1,1,2])}ggdrC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Doomrider",this.jr1=this.boof4712,this.jr2=this.jr1+2,this.tribe.push("GG");const t=this.doomb;this.text=`When a friendly creature is destroyed, ${this.name} moves to that creatures lane and gets ${a.log.jr9(t,t)}. Then give the opposing creature ${a.log.jr9(-t,-t)}.`,this.bonus={exist:this.ddp9(0,t*4,t*2,0)}}ggdrD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;if(s.owner===i.owner&&i.id!==s.id&&mt.itDiedFirst(s.id,i.id)&&!a.field.searchByLane(s.lane,s.owner)){const u=this.doomb;i.move(s.lane),i.buff(u,u);const p=i.opposed;p&&p.buff(-u,-u)}}ggpC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Predator",this.jr1=this.boof5914,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("GG"),this.hints=["OP"];const t=this.boof246;this.text=`When the opposing creature is destroyed, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,2*t,t,0)}}ggpD(t){const i=a.field.jr5(t.creatId),e=a.field.oppositeLane(i.lane),s=t.event;if(s.creature.owner!==i.owner&&s.creature.lane===e){const l=this.boof246;i.buff(l,l)}}ngauntC(){this.faction="N",this.rarity="R",this.name="Nightgaunt",this.jr1=this.boof4815,this.jr2=this.jr1+1,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets Regenerate 1.`,this.bonus={exist:this.ddp9(0,4,0,0)}}ngauntD(t){a.field.jr5(t.creatId).addRegen(1)}sharvC(){this.faction="N",this.rarity="C",this.name="Sorrow Harvester",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("AB"),this.text="When a friendly Abomination is destroyed on your turn, draw a card.",this.bonus={exist:.25}}sharvD(t){const e=t.event.creature;e.owner===t.ownerPlayerA&&e.isTribe("AB")&&a.state.ddf9()===t.ownerPlayerA&&mt.itDiedFirst(e.id,t.creatId)&&a.player.drawCard(t.ownerPlayerA,1)}yuruC(){this.faction="N",this.rarity="L",this.name="Yuru, the Necrosage",this.jr1=3,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("HM"),this.hints=["LJ"];const t=this.boof5814;this.text=`When an adjacent non-Spirit creature is destroyed, put a ${t}/${t} Spirit into that lane.`,this.bonus={exist:this.ddp9(1,t*2,t,0)}}yuruD(t){const i=a.field.jr5(t.creatId),s=t.event.creature;s.owner===i.owner&&i.adjacent.includes(s.lane)&&!s.isTribe("ST")&&mt.itDiedFirst(s.id,i.id)&&a.field.birthCreature(`${"XYR"}${this.level}`,"P",i.owner,s.lane)}static itDiedFirst(t,i){if(t===i)return!0;let e=!1;const s=a.death.findDeathTime(i);if(a.isUn(s))e=!0;else{const l=a.death.findDeathTime(t);(a.isUn(l)||l<=s)&&(e=!0)}return e}}class H extends E{lookup(t){return{["AGK"]:{c:()=>this.agknitC(),f:e=>this.agknitF(e)},["AFR"]:{c:()=>this.afsC(),f:e=>this.afsF(e)},["BTR"]:{c:()=>this.bwtC(),f:e=>this.bwtF(e)},["BSS"]:{c:()=>this.bssC(),f:e=>this.bssF(e)},["BZD"]:{c:()=>this.bzdrC(),f:e=>this.bzdrF(e)},["BFM"]:{c:()=>this.bfmC(),f:e=>this.bfmF(e)},["CTI"]:{c:()=>this.charnC(),f:e=>this.charnF(e)},["CHH"]:{c:()=>this.chihC(),f:e=>this.chihF(e)},["CSW"]:{c:()=>this.chickenC(),f:e=>this.chickenF(e)},["DFR"]:{c:()=>this.dfrC(),f:e=>this.dfrF(e)},["DBA"]:{c:()=>this.dbaC(),f:e=>this.dbaF(e)},["DBN"]:{c:()=>this.drbC(),f:e=>this.drbF(e)},["DDD"]:{c:()=>this.dddC(),f:e=>this.dddF(e)},["EWT"]:{c:()=>this.espwrC(),f:e=>this.espwrF(e)},["FWT"]:{c:()=>this.fwtC(),f:e=>this.fwtF(e)},["GSW"]:{c:()=>this.gwurmC(),f:e=>this.gwurmF(e)},["GSS"]:{c:()=>this.gsC(),f:e=>this.gsF(e)},["IMA"]:{c:()=>this.iracoC(),f:e=>this.iracoF(e)},["LGT"]:{c:()=>this.legtitC(),f:e=>this.legtitF(e)},["LBD"]:{c:()=>this.lbdC(),f:e=>this.lbdF(e)},["LMV"]:{c:()=>this.lyrC(),f:e=>this.lyrF(e)},["MOE"]:{c:()=>this.moeC(),f:e=>this.moeF(e)},["MMA"]:{c:()=>this.mmaC(),f:e=>this.mmaF(e)},["NSY"]:{c:()=>this.nysymC(),f:e=>this.nysymF(e)},["OXM"]:{c:()=>this.onxmarC(),f:e=>this.onxmarF(e)},["OFM"]:{c:()=>this.ofmC(),f:e=>this.ofmF(e)},["OPK"]:{c:()=>this.orpC(),f:e=>this.orpF(e)},["PHM"]:{c:()=>this.phmC(),f:e=>this.phmF(e)},["PSM"]:{c:()=>this.palsC(),f:e=>this.palsF(e)},["SMD"]:{c:()=>this.scorchC(),f:e=>this.scorchF(e)},["SOC"]:{c:()=>this.scythC(),f:e=>this.scythF(e)},["SDN"]:{c:()=>this.souldrC(),f:e=>this.souldrF(e)},["SGG"]:{c:()=>this.ssggC(),f:e=>this.ssggF(e)},["SBD"]:{c:()=>this.sbdC(),f:e=>this.sbdF(e)},["SSK"]:{c:()=>this.sssC(),f:e=>this.sssF(e)},["SYL"]:{c:()=>this.lotusC(),f:e=>this.lotusF(e)},["TGI"]:{c:()=>this.tgiC(),f:e=>this.tgiF(e)},["UGL"]:{c:()=>this.umglidC(),f:e=>this.umglidF(e)},["UWL"]:{c:()=>this.uwarC(),f:e=>this.uwarF(e)},["UWS"]:{c:()=>this.ustokeC(),f:e=>this.ustokeF(e)},["UIW"]:{c:()=>this.uiwC(),f:e=>this.uiwF(e)},["UTM"]:{c:()=>this.umaulC(),f:e=>this.umaulF(e)},["VND"]:{c:()=>this.vdrkC(),f:e=>this.vdrkF(e)},["VNS"]:{c:()=>this.vnsC(),f:e=>this.vnsF(e)},["WWP"]:{c:()=>this.wwpC(),f:e=>this.wwpF(e)},["WFB"]:{c:()=>this.wfbC(),f:e=>this.wfbF(e)}}[t]}cardForge(t,i){this.lookup(t).f(i)}ftext="";forges=!0;flanks=!1;allied="X";constructor(t){super(t),this.lookup(this.cardCode()).c();let i="";this.flanks&&(i="Flank"),this.forges&&(i?i="Forge/"+i:i=a.log.forglied(this.allied)),i&&(this.text=i+": "+this.ftext),this.ftext=""}jr3(t,i){const e=super.jr3(t,i);return this.forges&&e.jr4("FR",this.code),this.flanks&&e.jr4("FK",this.code),e}jr8(t){this.cardForge(this.cardCode(),t),a.batch.triggerDone()}agknitC(){this.faction="A",this.rarity="L",this.name="Aegis Knight",this.jr1=this.boof5814,this.jr2=this.jr1,this.tribe.push("HM"),this.initArmor=this.lValN([1,2,5]),this.hints=["P2","OP"],this.bonus={play:this.ddp9(0,this.initArmor*2,0,0)},this.ftext="Each friendly creature deals damage equal to its Armor to the opposing creature"}agknitF(t){const i=d.crFriendTarg();i.hasArmor=!0;const e=Date.now();a.field.creatByTarget(i).forEach(s=>{s.opposed&&s.opposed.hurtDirect(s.armor,s.code,e)})}afsC(){this.faction="T",this.rarity="H",this.name="Ashurian Flamesculptor",this.jr1=this.boof5915,this.jr2=this.boof3610,this.tribe.push("FR","AS"),this.forges=this.level>1,this.consistent=this.forges,this.ftext=`You may play an additional ${a.log.levelGateText(this.level-1)} Tempys spell this turn.`,this.forges&&(this.bonus={play:this.ddp9(0,0,0,0,(this.level-1)/2)})}afsF(t){const i=a.turn.freeCard(this.code);i.condition.card="S",i.condition.level=a.target.ddf2(this.level-1),i.condition.faction="T"}bwtC(){if(this.faction="U",this.rarity="H",this.name="Bramblewood Tracker",this.jr1=this.boof3712,this.jr2=this.jr1+3,this.tribe.push("HM"),this.forges=this.level>1,this.forges){const t=this.level-1;this.ftext=`You may play an additional ${a.log.levelGateText(t)} Uterra creature this turn.`,this.bonus={play:this.ddp6(t)},this.consistent=!0}else this.hints=["LV"]}bwtF(t){const i=a.turn.freeCard(this.code);i.condition.card="C",i.condition.faction="U",i.condition.level=a.target.ddf2(this.level-1)}bssC(){this.faction="A",this.rarity="L",this.name="Brightsteel Sentinal",this.jr1=this.boof4914,this.jr2=this.jr1+1,this.tribe.push("RB"),this.hints=["P2","OP"];const t=this.boof51015;this.bonus={play:this.ddp9(0,t*1.5,0,0)},this.ftext=`Each friendly Robot gets Armor ${t} this turn.`}bssF(t){const i=this.boof51015,e=d.crFriendTarg();e.tribe="RB",e.canArmor=!0,a.field.creatByTarget(e).forEach(l=>{const u=d.mod("AR",i,t.creatId);u.expiry="ET",l.addMod(u)})}bzdrC(){this.faction="N",this.rarity="R",this.name="Byzerak Drake",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.initRegen=this.level,this.allied="T",this.tribe.push("DG"),this.hints=["ALT"],this.ftext=`Mobility ${this.level}.`}bzdrF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addMobility(this.level)}bfmC(){this.faction="N",this.rarity="H",this.name="Byzerak Frostmaiden",this.jr1=this.boof135,this.jr2=this.boof91420,this.tribe.push("HM"),this.hints=["ALT","OP","FH"],this.flanks=!0;const t=this.boof246;this.ftext=`If ${this.name} is opposed, the opposing creature gets ${a.log.jr9(-1*t,0)} and this gets ${a.log.jr9(t,0)}.~Allied Tempys: Mobility ${this.level}.`;const i=this.ddp9(0,t*2,t*2,0);this.bonus={play:i,exist:i/2}}bfmF(t){const e=t.event.creature;t.trigger.type==="FR"&&a.turn.allied("T")&&e.addMobility(this.level);const s=e.opposed;if(s){const l=this.boof246;s.buff(-1*l,0),e.buff(l,0)}}charnC(){this.faction="N",this.rarity="C",this.name="Charnel Titan",this.jr1=this.boof359,this.jr2=this.boof5814,this.tribe.push("AB");const t=this.boof357;this.ftext=`If there is an enemy creature with ${t} or less attack, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,2*t,t,0)/2}}charnF(t){const i=this.boof357,e=d.crEnemyTarg();e.maxAttack=i,a.field.creatByTarget(e).length>0&&a.field.jr5(t.creatId).buff(i,i)}chihC(){this.faction="U",this.rarity="C",this.name="Chistlehearth Hunter",this.jr1=this.lValN([2,6,11]),this.jr2=this.boof81217,this.tribe.push("HM"),this.hints=["P2","FRF"],this.ftext=`${this.name} gets ${a.log.jr9(1,0)} for each other friendly creature.`,this.bonus={play:this.ddp9(0,2,2,0)}}chihF(t){const i=a.field.ddf1().length;i>1&&a.field.jr5(t.creatId).buff(i-1,0)}chickenC(){this.faction="T",this.rarity="L",this.name="Cindersmoke Wyvern",this.jr1=this.boof3610,this.jr2=this.lValN([7,12,17]),this.tribe.push("DG"),this.initMobile=this.boof124,this.hints=["FH"],this.forges=!1,this.flanks=!0,this.ftext="Deal damage equal to its attack to the opposing creature. If there is no opposing creature, deal that damage to the enemy player instead.",this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)}}chickenF(t){const i=t.event,e=i.creature.attack,s=i.creature.opposed;s?s.hurtDirect(e,this.code):a.player.ddf3(!t.ownerPlayerA,e,this.code)}dfrC(){this.faction="N",this.rarity="H",this.name="Darkfrost Reaper",this.jr1=this.boof6916,this.jr2=this.boof3713,this.tribe.push("SK"),this.ftext="Destroy each creature with 1 or less attack.",this.bonus={play:this.ddp6()/5}}dfrF(t){const i=d.crTarg();i.maxAttack=1;const e=a.field.creatByTarget(i),s=Date.now();e.forEach(l=>{a.death.destroy(l,this.code,s)})}dbaC(){this.faction="U",this.rarity="H",this.name="Deepbranch Ancient",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("HY"),this.hints=["FRF"],this.ftext=`If there is a friendly creature in each lane, ${this.name} gets ${a.log.jr9(this.jr1,this.jr2)}.`,this.bonus={play:this.ddp9(0,this.jr1*2,this.jr1,0)/4}}dbaF(t){a.field.ddf1().length===5&&a.field.jr5(t.creatId).buff(this.jr1,this.jr2)}drbC(){this.faction="N",this.rarity="C",this.name="Dirge Banshee",this.jr1=this.boof248,this.jr2=this.boof61016,this.tribe.push("ST"),this.hints=["OP"],this.flanks=!0;const t=this.boof246;this.ftext=`If ${this.name} is opposed, the opposing creature gets ${a.log.jr9(-t,0)} and this gets ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t*2,t*2,0)}}drbF(t){const i=t.event,e=i.creature.opposed;if(e){const s=this.boof246;e.buff(-s,0),i.creature.buff(s,0)}}dddC(){this.faction="N",this.rarity="L",this.name="Doomwing, Dire Drake",this.jr1=this.boof61018,this.jr2=this.lValN([2,6,10]),this.initMobile=this.level,this.tribe.push("DG"),this.hints=["FK"],this.forges=!1,this.flanks=!0,this.ftext=`Destroy the opposing ${a.log.levelGateText(this.level,!0)}creature.`,this.bonus={exist:this.ddp6()/2}}dddF(t){const e=t.event.creature.opposed;e&&a.target.levelTestCommon(e.level,this.level)&&a.death.destroy(e,this.code)}espwrC(){this.faction="U",this.rarity="R",this.name="Esperian Wartusk",this.jr1=this.boof5916,this.jr2=this.jr1-1,this.initBT=!0,this.allied="A",this.tribe.push("TK"),this.hints=["ALA"];const t=this.boof124;this.ftext=`Armor ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}espwrF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addArmor(this.boof124)}fwtC(){this.faction="U",this.rarity="H",this.name="Frostwild Tracker",this.jr1=this.boof4712,this.jr2=this.boof248,this.tribe.push("TG"),this.forges=this.level>1;const t=this.level-1;this.ftext=`You may play an additional ${a.log.levelGateText(t)} creature this turn.`,this.level>1?this.bonus={play:this.ddp6(t)}:this.hints=["LV"]}fwtF(t){const i=a.turn.freeCard(this.code);i.condition.card="C",i.condition.level=a.target.ddf2(this.level-1)}gwurmC(){this.faction="N",this.rarity="C",this.name="Gloomspire Wurm",this.jr1=this.boof4813,this.jr2=this.jr1,this.tribe.push("WR"),this.hints=["ENN"],this.ftext=`If there are no enemy creatures, ${this.name} gets ${a.log.jr9(4,4)}.`}gwurmF(t){a.field.qEnemyCreats().length===0&&a.field.jr5(t.creatId).buff(4,4)}gsC(){this.faction="U",this.rarity="C",this.name="Glowstride Stag",this.jr1=this.boof5812,this.jr2=this.jr1+this.level,this.tribe.push("ST");const t=this.boof51015;this.ftext=`You gain ${t} health.`,this.bonus={play:this.ddp9(0,0,0,t)}}gsF(t){const i=this.boof51015;a.player.healPlayer(t.ownerPlayerA,i),a.log.add("Glowstride flexed for "+i)}iracoC(){this.faction="A",this.rarity="L",this.name="Ironmind Acolyte",this.jr1=this.boof61015,this.jr2=this.jr1-2,this.tribe.push("GN"),this.hints=["P1"],this.ftext="If you have five or more cards in your hand, you may play an additional card this turn.",this.bonus={play:this.ddp6()/5}}iracoF(t){a.player.toPlayer(t.ownerPlayerA).hand.length>4&&(a.state.gs.turn.regularPlays+=1)}legtitC(){this.faction="N",this.rarity="R",this.name="Legion Titan",this.jr1=this.boof4812,this.jr2=this.jr1,this.tribe.push("ZB"),this.hints=["ENF"],this.ftext=`${this.name} gets ${a.log.jr9(this.level,this.level)} for each enemy creature with ${this.boof357} or less attack.`,this.bonus={play:this.ddp9(0,this.level*2,this.level,0)/2}}legtitF(t){const i=d.crEnemyTarg();i.maxAttack=this.boof357;const e=a.field.creatByTarget(i);if(e.length>0){const s=this.level*e.length;a.field.jr5(t.creatId).buff(s,s)}}lbdC(){this.faction="U",this.rarity="H",this.name="Lifeblood Dryad",this.jr1=this.lValN([4,7,9]),this.jr2=this.jr1,this.tribe.push("DY"),this.hints=["FRF"];const t=this.boof236;this.ftext=`If there is a friendly creature in each lane, each other friendly creature gets ${a.log.jr9(t,t)}`,this.bonus={play:this.ddp9(0,t*2,t,0)}}lbdF(t){const i=a.field.creatByTarget(d.crFriendNotMeTarg(t.creatId));if(i.length===4){const e=this.boof236;i.forEach(s=>s.buff(e,e))}}lyrC(){this.faction="N",this.rarity="L",this.name="Lyria, Muse of Varna",this.jr1=this.boof5815,this.jr2=this.boof4714,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=this.level===2?"Spawn a random creature that was destroyed this game.":"Put a random creature that was destroyed this game into each of your available lanes.",this.forges?(this.hints=["EML"],this.bonus={play:this.ddp6(1)*(this.level-1)}):this.hints=["LV"]}lyrF(t){if(this.level===2){const i=a.death.gravedigger();i&&a.field.birthCreature(i,"S",t.ownerPlayerA)}else if(this.level===3){const i=a.field.emptyLanes(t.ownerPlayerA),e=i.map(s=>a.death.gravedigger());if(i.length>0&&e[0]){const s=Date.now();i.forEach((l,u)=>{a.field.birthCreature(e[u],"P",t.ownerPlayerA,l,s)})}}}moeC(){this.faction="T",this.rarity="H",this.name="Master of Elements",this.jr1=this.boof5917,this.jr2=this.jr1,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=`You may play an additional ${a.log.levelGateText(this.level-1)} spell this turn.`,this.forges&&(this.bonus={play:this.ddp9(0,0,0,0,(this.level-1)/2)})}moeF(t){const i=a.turn.freeCard(this.code);i.condition.card="S",i.condition.level=a.target.ddf2(this.level-1)}mmaC(){this.faction="A",this.rarity="C",this.name="Metamind Adept",this.jr1=this.boof5915,this.jr2=this.boof4813,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`Draw ${this.level} card${t}.`,this.bonus={play:this.ddp9(0,0,0,0,this.level/4)}}mmaF(t){a.player.drawCard(t.ownerPlayerA,this.level)}nysymC(){this.faction="N",this.rarity="C",this.name="Nyrali Symbiote",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("OZ"),this.hints=["OP"];const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets Regenerate ${t}.`,this.bonus={play:this.ddp9(0,t,0,0)}}nysymF(t){const i=t.event;i.creature.opposed&&i.creature.addRegen(this.boof246)}ofmC(){this.faction="A",this.rarity="R",this.name="Oreian Fieldmarshal",this.jr1=this.boof5914,this.jr2=this.jr1-2,this.tribe.push("HM"),this.hints=["FRS"];const t=this.boof135;this.ftext=`Each other friendly creature gets ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t*2,t*2,0)}}ofmF(t){const i=this.boof135;a.field.creatByTarget(d.crFriendNotMeTarg(t.creatId)).forEach(s=>{s.buff(i,0)})}orpC(){this.faction="A",this.rarity="R",this.name="Oreian Peacekeeper",this.jr1=this.boof4816,this.jr2=this.boof248,this.tribe.push("RB"),this.hints=["OP"],this.ftext=`${this.name} gets Armor ${this.jr1} this turn.`,this.bonus={play:this.ddp9(0,this.jr1,0,0)}}orpF(t){const i=a.field.jr5(t.creatId),e=d.mod("AR",this.jr1,t.creatId);e.expiry="ET",i.addMod(e)}onxmarC(){this.faction="A",this.rarity="R",this.name="Onyxium Marauder",this.jr1=this.boof4714,this.jr2=this.lValN([6,9,17]),this.initArmor=this.level,this.allied="N",this.tribe.push("HM"),this.hints=["ALN"],this.ftext=`Regenerate ${this.level}.`,this.bonus={play:this.ddp9(0,this.level,0,0)}}onxmarF(t){a.turn.allied(this.allied)&&a.field.jr5(t.creatId).addRegen(this.level)}phmC(){this.faction="A",this.rarity="R",this.name="Palladium Hindermind",this.jr1=this.boof2612,this.jr2=this.boof61016,this.tribe.push("HM"),this.hints=["ENF"],this.ftext=`Each enemy creature gets ${a.log.jr9(this.boof123n,0)}.`;const t=this.level*2;this.bonus={play:this.ddp9(0,t,t,0)}}phmF(t){const i=this.boof123n;a.field.qEnemyCreats().forEach(e=>{e.buff(i,0)})}palsC(){this.faction="A",this.rarity="L",this.name="Palladium Simulacrum",this.jr1=this.boof4816,this.jr2=this.boof248,this.initMobile=this.level-1,this.tribe.push("SS"),this.hints=["NX"],this.flanks=!0,this.ftext=`If ${this.name} is in the center lane, Spawn a copy.`,this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0)}}palsF(t){t.event.creature.lane===3&&a.field.birthCreature(this.code,"S",t.ownerPlayerA)}scorchC(){this.faction="T",this.rarity="L",this.name="Scorchmane Dragon",this.jr1=this.lValN([0,12,24]),this.jr2=this.boof61224,this.tribe.push("DG"),this.initDefend=this.level===1,this.initMobile=this.level-1,this.forges=this.level>1,this.ftext="Deal 5 damage to "+(this.level===2?"the opposing creature.":"each enemy creature and player."),this.level===1?this.hints=["LV"]:this.level===2?(this.hints=["OP"],this.bonus={play:this.ddp9(0,5,0,0)}):this.bonus={play:this.ddp9(0,10,0,5)}}scorchF(t){const i=t.event,e=!t.ownerPlayerA;if(this.level===2){const s=i.creature.opposed;s&&s.hurtDirect(5,this.code)}else if(this.level===3){const s=Date.now();a.field.qPlayerCreats(e).forEach(l=>l.hurtDirect(5,this.code,s)),a.player.ddf3(e,5,this.code)}}scythC(){this.faction="N",this.rarity="L",this.name="Chiron, Herald of Torment",this.jr1=12,this.jr2=6,this.tribe.push("DM"),this.hints=["ENS"],this.ftext=`Each enemy creature gets ${a.log.jr9(-6,0)} and ${this.name} gets ${a.log.jr9(6,0)} for each enemy creature.`}scythF(t){const i=a.field.qEnemyCreats();i.forEach(e=>{e.buff(-6,0)}),i.length>0&&a.field.jr5(t.creatId).buff(6*i.length,0)}souldrC(){this.faction="N",this.rarity="L",this.name="Soul Drinker",this.jr1=1,this.jr2=this.boof4814,this.initMobile=this.level===3?1:0,this.tribe.push("VP"),this.hints=["OP"],this.flanks=this.level===3,this.ftext=`The opposing creature's attack gets reduced to 0 and ${this.name} gains that much attack.`;const t=this.avgCreatureStats()[0]*2;this.bonus={play:this.ddp9(0,t,t,0)}}souldrF(t){const i=t.event,e=i.creature.opposed;if(e){const s=e.attack;i.creature.buff(s,0),e.buff(-1*s,0)}}ssggC(){this.faction="N",this.rarity="H",this.name="Soulscourge Grimgaunt",this.jr1=this.level+1,this.jr2=this.jr1,this.tribe.push("GG"),this.ftext=`${this.name} gets ${a.log.jr9(this.jr1,this.jr2)} for each creature that was destroyed this turn.`}ssggF(t){const i=this.jr1*a.state.gs.turn.creaturesKilled;i>0&&a.field.jr5(t.creatId).buff(i,i)}sbdC(){this.faction="U",this.rarity="C",this.name="Spiritbloom Dryad",this.jr1=this.boof6812,this.jr2=this.jr1+this.level,this.tribe.push("DY"),this.ftext=`Each player gains ${this.boof468} health.`}sbdF(t){const i=this.boof468;a.player.healPlayer(!0,i),a.player.healPlayer(!1,i)}sssC(){this.faction="A",this.rarity="C",this.name="Steelskin Spelunker",this.jr1=this.boof5814,this.jr2=this.boof61018,this.tribe.push("HM"),this.ftext=`If there is another friendly creature in the center lane, that creature gets Armor ${this.boof124}`}sssF(t){const i=a.field.searchByLane(3,t.ownerPlayerA);i&&i.id!==t.creatId&&!i.negateArmor&&i.addArmor(this.boof124)}lotusC(){this.faction="U",this.rarity="H",this.name="Stygian Lotus",this.jr1=this.boof468,this.jr2=this.jr1-1,this.tribe.push("PL"),this.hints=["ENF","EML","OP"],this.ftext=`If ${this.name} is opposed, spawn a copy of it. Then repeat this for each copy.`,this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0)}}lotusF(t){if(t.event.creature.opposed){let e=!0;for(;e;){const s=a.field.emptyLanes(t.ownerPlayerA),l=s.length;if(l===0)e=!1;else{const u=s[a.randInt(0,l)];a.field.birthCreature(this.code,"P",t.ownerPlayerA,u).opposed||(e=!1)}}}}tgiC(){this.faction="T",this.rarity="R",this.name="Thundergale Invoker",this.jr1=this.boof3711,this.jr2=this.jr1,this.tribe.push("WN","GT"),this.hints=["LJ"],this.ftext=`Each creature adjacent to ${this.name} moves one lane away if possible.`}tgiF(t){const i=a.field.jr5(t.creatId),e=i.lane,s=i.owner;if(e>2){const l=a.field.searchByLane(e-1,s);l&&(a.field.searchByLane(e-2,s)||l.move(e-2))}if(e<4){const l=a.field.searchByLane(e+1,s);l&&(a.field.searchByLane(e+2,s)||l.move(e+2))}}umglidC(){this.faction="T",this.rarity="R",this.name="Umbruk Glider",this.jr1=this.boof71117,this.jr2=this.jr1-4,this.initMobile=this.level,this.allied="U",this.tribe.push("DN"),this.hints=["ALU"],this.ftext="Breakthrough."}umglidF(t){if(a.turn.allied(this.allied)){const i=a.field.jr5(t.creatId);i.breakthrough=!0}}uwarC(){this.faction="T",this.rarity="H",this.name="Uranti Warlord",this.jr1=this.boof3713,this.jr2=this.boof71117,this.tribe.push("FR","YT"),this.hints=["OP"],this.ftext=`Each friendly Yeti deals ${this.jr1} damage to the opposing creature.`,this.bonus={play:this.ddp9(0,this.jr1,0,0)}}uwarF(t){const i=d.crFriendTarg();i.tribe="YT";const e=a.field.creatByTarget(i),s=Date.now();e.forEach(l=>{const u=l.opposed;u&&u.hurtDirect(this.jr1,l.code,s)})}ustokeC(){this.faction="T",this.rarity="R",this.name="Uranti Warstoker",this.jr1=this.boof6812,this.jr2=this.jr1-1,this.tribe.push("YT"),this.ftext=`Each other friendly Yeti get ${a.log.jr9(this.stokeboof,0)} this turn.`}ustokeF(t){const i=d.crFriendNotMeTarg(t.creatId);i.tribe="YT";const e=a.field.creatByTarget(i),s=this.stokeboof;e.forEach(l=>{const u=d.mod("AT",s,t.creatId);u.expiry="ET",l.addMod(u)})}get stokeboof(){return this.lValN([3,4,6])}uiwC(){this.faction="A",this.rarity="L",this.name="Uriel Ironwing",this.jr1=this.lValN([6,8,13]),this.jr2=this.boof81117,this.initMobile=this.level,this.tribe.push("AG"),this.hints=["OP","FH"],this.flanks=!0;const t=this.boof246n,i=this.level===3?" If that creature has 0 or less attack, destroy it.":"";this.ftext=`The opposing creature gets ${a.log.jr9(t,0)}.${i}`;const e=this.ddp9(0,t,t,0);this.bonus={exist:e}}uiwF(t){const s=t.event.creature.opposed;s&&(s.buff(this.boof246n,0),this.level===3&&s.attack<1&&a.death.destroy(s,this.code))}umaulC(){this.faction="U",this.rarity="C",this.name="Uterradon Mauler",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("DN"),this.hints=["OP"];const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}umaulF(t){const i=t.event;if(i.creature.opposed){const e=this.boof246;i.creature.buff(e,e)}}vdrkC(){this.faction="U",this.rarity="R",this.name="Venomdrinker",this.jr1=this.lValN([5,9,13]),this.jr2=this.jr1,this.tribe.push("NG"),this.ftext=`${this.name} gets ${a.log.jr9(1,1).replaceAll("1","X")}, where X is the total amount of Poison on each enemy creature.`}vdrkF(t){const i=a.field.qEnemyCreats();let e=0;i.forEach(s=>{e+=s.poison}),e>0&&a.field.jr5(t.creatId).buff(e,e)}vnsC(){this.faction="U",this.rarity="H",this.name="Venomous Netherscale",this.jr1=this.boof4713,this.jr2=this.jr1+4,this.tribe.push("NG"),this.ftext=`Double the Poison on each enemy creature${this.level===3?" and the enemy player":""}.`}vnsF(t){const i=d.crEnemyTarg();i.hasPoison=!0,a.field.creatByTarget(i).forEach(s=>{s.addPoison(s.poison)})}wwpC(){this.faction="U",this.rarity="H",this.name="Weirwood Patriarch",this.jr1=this.boof5714,this.jr2=this.lValN([7,10,17]),this.tribe.push("HM");const t=this.boof235;this.ftext=`Each friendly creature with ${this.boof357} or less attack gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}wwpF(t){const i=this.boof235,e=d.crFriendNotMeTarg(t.creatId);e.maxAttack=this.boof357,a.field.creatByTarget(e).forEach(s=>s.buff(i,i))}wfbC(){this.faction="N",this.rarity="C",this.name="Witherfrost Banshee",this.jr1=this.boof3612,this.jr2=this.jr1,this.tribe.push("ST"),this.hints=["OP"],this.flanks=!0;const t=this.boof247n;this.ftext=`The opposing creature gets ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}wfbF(t){const e=t.event.creature.opposed;if(e){const s=this.boof247n;e.buff(s,s)}}}class fe extends E{lookup(t){return{["RBG"]:{c:()=>this.rbgC(),g:(e,s)=>this.rbgG(e,s)},["SRV"]:{c:()=>this.sprvC(),g:(e,s)=>this.sprvG(e,s)},["TGK"]:{c:()=>this.tgkC(),g:(e,s)=>this.tgkG(e,s)}}[t]}onGain(t,i){this.lookup(t).g(i,i.event)}hPlayer=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("LG",this.code),e}ddf8(t){return t.trigger.type==="LG"&&this.validPlayer(t)}jr8(t){this.onGain(this.cardCode(),t),a.batch.triggerDone()}validPlayer(t){if(this.hPlayer===0)return!0;const i=t.event;return this.hPlayer===1?t.ownerPlayerA===i.playerA:t.ownerPlayerA!==i.playerA}rbgC(){this.faction="U",this.rarity="H",this.name="Runebark Guardian",this.jr1=this.boof5916,this.jr2=this.jr1,this.tribe.push("HM"),this.hPlayer=1;const t=this.boof135;this.text=`When you gain health, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}rbgG(t,i){const e=a.field.jr5(t.creatId),s=this.boof135;e.buff(s,s)}sprvC(){this.faction="N",this.rarity="R",this.name="Spirit Reaver",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("DM"),this.hPlayer=-1;const t=this.boof234;this.text=`When an enemy player gains health, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}sprvG(t,i){const e=a.field.jr5(t.creatId),s=this.boof234;e.buff(s,s)}tgkC(){this.faction="U",this.rarity="R",this.name="Tuskin Grovekeeper",this.jr1=this.boof6912,this.jr2=this.jr1,this.tribe.push("TK"),this.hPlayer=1,this.text=`When you gain health, Spawn a 3/3 ${B.minionName(this.level)}.`,this.bonus={exist:this.ddp9(1,6,3,0)*.5}}tgkG(t,i){const e=this.lValS(["SXD","SPL","TTF"])+this.level;a.field.birthCreature(e,"S",t.ownerPlayerA)}}class ee extends E{lookup(t){return{["EWE"]:{c:()=>this.eweC(),m:(e,s)=>this.eweM(e,s)},["FFM"]:{c:()=>this.ffmC(),m:(e,s)=>this.ffmM(e,s)},["LUC"]:{c:()=>this.lugC(),m:(e,s)=>this.lugM(e,s)},["WBH"]:{c:()=>this.wbhC(),m:(e,s)=>this.wbhM(e,s)}}[t]}onMove(t,i){this.lookup(t).m(i,i.event)}mPlayer=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("MV",this.code),e}ddf8(t){return t.trigger.type==="MV"&&this.validPlayer(t)}jr8(t){this.onMove(this.cardCode(),t),a.batch.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=t.event;return this.mPlayer===1?t.ownerPlayerA===i.creature.owner:t.ownerPlayerA!==i.creature.owner}eweC(){this.faction="T",this.rarity="H",this.name="Emberwind Evoker",this.jr1=this.boof4914,this.jr2=this.jr1+2,this.tribe.push("HM"),this.mPlayer=1;const t=this.boof124;this.text=`When a friendly creature moves, it gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)}}eweM(t,i){const e=this.boof124;i.creature.buff(e,e)}ffmC(){this.faction="T",this.rarity="H",this.name="Frostfang Maiden",this.jr1=this.boof5814,this.jr2=this.jr1+this.level,this.tribe.push("HM"),this.initMobile=this.level,this.mPlayer=1;const t=this.ffbof;this.text=`When a friendly creature moves, deal ${t} to the creature opposing it.`,this.bonus={exist:this.ddp9(0,t,0,0)}}ffmM(t,i){const e=i.creature.opposed;e&&e.hurtDirect(this.ffbof,this.code)}get ffbof(){return this.level+2}lugC(){this.faction="T",this.rarity="L",this.name="Lug, Uranti Charger",this.jr1=this.boof359,this.jr2=this.lValN([9,13,19]),this.level===3&&(this.initMobile=1),this.tribe.push("YT"),this.mPlayer=1,this.text="When a friendly creature moves on your turn, Lug battles an additional time.",this.bonus={exist:this.ddp9(0,0,0,this.jr1)}}lugM(t,i){if(t.ownerPlayerA===a.state.ddf9()){const e=a.field.jr5(t.creatId);e.extraBattles+=1}}wbhC(){this.faction="T",this.rarity="R",this.name="Windborn Hellion",this.jr1=this.boof4812,this.jr2=this.boof81217,this.tribe.push("WN","EL"),this.mPlayer=1,this.text=`When a friendly creature moves, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`,this.bonus={exist:this.ddp9(0,this.level*2,this.level,0)}}wbhM(t,i){a.field.jr5(t.creatId).buff(this.level,this.level)}}class Ct extends E{lookup(t){return{["ATG"]:{c:()=>this.agrdC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.agrdP(e,s)},["ART"]:{c:()=>this.arootC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"U"),p:(e,s)=>this.arootP(e,s)},["ARB"]:{c:()=>this.arbysC(),t:(e,s)=>this.enemyPlayed(e,s),p:(e,s)=>this.arbysP(e,s)},["BLH"]:{c:()=>this.bblhC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.bblhP(e,s)},["CYC"]:{c:()=>this.ccC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"N"),p:(e,s)=>this.ccP(e,s)},["DHW"]:{c:()=>this.dhwC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.dhwP(e,s)},["FBI"]:{c:()=>this.fbiC(),t:(e,s)=>this.factionSpellMyTurn(e,s,"T"),p:(e,s)=>this.fbiP(e,s)},["FLS"]:{c:()=>this.flspkC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.flspkP(e,s)},["IZK"]:{c:()=>this.izzyC(),t:(e,s)=>this.izzyT(e,s),p:(e,s)=>this.izzyP(e,s)},["KAW"]:{c:()=>this.kasC(),t:(e,s)=>this.spellMyTurn(e,s),p:(e,s)=>this.kasP(e,s)}}[t]}testPlay(t,i){return this.lookup(t).t(i,i.event)}actPlay(t,i){this.lookup(t).p(i,i.event)}triggerLevels=[1,2,3,4];constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return this.triggerLevels.includes(this.level)&&e.jr4("PC",this.code),e}ddf8(t){return t.event.code==="PLC"?this.testPlay(this.cardCode(),t):t.event.code==="TRE"&&this.cardCode()==="BLH"}jr8(t){if(t.event.code==="PLC")this.actPlay(this.cardCode(),t);else{const i=a.field.jr5(t.creatId);a.death.destroy(i,this.code)}a.batch.triggerDone()}spellMyTurn(t,i){return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}factionSpellMyTurn(t,i,e){if(i.playerA===t.ownerPlayerA){const s=a.cards.getCard(i.cardCode);if(s.type==="S"&&s.faction===e)return!0}return!1}enemyPlayed(t,i){return i.playerA!==t.ownerPlayerA}agrdC(){this.faction="A",this.rarity="C",this.name="Aetherguard",this.jr1=this.boof6814,this.jr2=this.jr1-1,this.tribe.push("RB"),this.bonus={exist:this.ddp9(0,this.level,0,0)},this.text=`When you play a spell, ${this.name} gets Armor ${this.level}.`}agrdP(t,i){a.field.jr5(t.trigger.creatId).addArmor(this.level)}arootC(){this.faction="U",this.rarity="H",this.name="Aether Root",this.jr1=this.boof3610,this.jr2=this.jr1,this.tribe.push("PL");const t=this.boof234;this.text=`When you play an Uterra spell, ${this.name} gets ${a.log.jr9(t,t)}.`,this.bonus={exist:this.ddp9(0,t*2,t,0)*.5}}arootP(t,i){const e=a.field.jr5(t.trigger.creatId),s=this.boof234;e.buff(s,s)}arbysC(){this.faction="A",this.rarity="H",this.name="Anvillon Arbiter",this.jr1=this.boof3714,this.jr2=this.jr1+3,this.initArmor=1,this.tribe.push("RB"),this.text="When the enemy player plays their second card in a turn, that player discards their hand."}arbysP(t,i){if(a.state.gs.turn.cardsPlayed>1){const e=a.state.getActivePlayer();e.discard.push(...e.hand),e.hand=[]}}bblhC(){this.faction="T",this.rarity="L",this.name="Binben, Lightning Herald",this.jr1=this.boof61017,this.jr2=this.boof468,this.tribe.push("LT","AS");const t=this.boof4711,i=this.boof258;this.text=`When you play a spell, Spawn a ${t}/${i} Lightning Wyrm. At the end of your turn, destroy it.`,this.bonus={exist:this.ddp9(1,t+i,t,0)*.5}}bblhP(t,i){const e=a.field.birthCreature(`${"LWY"}${this.level}`,"S",t.ownerPlayerA);if(e){const s=e.jr4("TE",this.code);s.changes=!0}}ccC(){this.faction="N",this.rarity="H",this.name="Crypt Conjurer",this.jr1=this.boof258,this.jr2=this.lValN([8,14,20]),this.tribe.push("VP"),this.text=`When you play a Nekrium spell, deal ${this.jr1} damage to the enemy player and you gain ${this.jr1} health.`,this.bonus={exist:this.ddp9(0,0,0,this.jr1)}}ccP(t,i){a.player.ddf3(!t.ownerPlayerA,this.jr1,t.cardCode),a.player.healPlayer(t.ownerPlayerA,this.jr1)}dhwC(){this.faction="N",this.rarity="R",this.name="Darkheart Wanderer",this.jr1=this.boof3612,this.jr2=this.boof81116,this.tribe.push("HM");const t=this.boof124;this.text=`When you play a spell, ${this.name} gets Regenerate ${t}.`,this.bonus={exist:this.ddp9(0,t,0,0)}}dhwP(t,i){a.field.jr5(t.trigger.creatId).addRegen(this.boof124)}fbiC(){this.faction="T",this.rarity="H",this.name="Flamebreak Invoker",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("FR","GT"),this.text=`When you play a Tempys spell, deal ${this.level} damage to each enemy creature.`,this.bonus={exist:this.ddp9(0,this.level*2,0,0)*.5}}fbiP(t,i){const e=Date.now();a.field.qEnemyCreats().forEach(s=>{s.hurtDirect(this.level,this.code,e)})}flspkC(){this.faction="T",this.rarity="C",this.name="Flame Speaker",this.jr1=this.lValN([2,6,13]),this.jr2=this.level*6,this.tribe.push("HM");const t=this.boof235;this.text=`When you play a spell, deal ${t} damage to the enemy player.`,this.bonus={exist:this.ddp9(0,0,0,t)*.5}}flspkP(t,i){a.player.ddf3(!t.ownerPlayerA,this.boof235,t.cardCode)}izzyC(){this.faction="T",this.rarity="L",this.name="Iztek, Khan of Arrachtor",this.jr1=this.boof6915,this.jr2=this.jr1,this.tribe.push("IC","FR","AS"),this.text=`When you play Iztek's Frost, replace this with a level ${this.level} Iztek, Avatar of Frost.~When you play Iztek's Flame, replace this with a level ${this.level} Iztek, Avatar of Flame.`}izzyT(t,i){if(i.playerA===t.ownerPlayerA){const s=a.cards.getCard(i.cardCode).cardCode();if(s==="IFL"||s==="IFR")return!0}return!1}izzyP(t,i){const e=a.field.jr5(t.trigger.creatId),l=a.cards.getCard(i.cardCode).cardCode()==="IFL"?"IZL":"IZR";a.field.birthCreature(`${l}${this.level}`,"R",e.owner,e.lane)}kasC(){this.faction="T",this.rarity="L",this.name="Kas, Arcweaver",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("LT","AS"),this.hints=["OL","LKV"],this.text="When you play a spell, Kas battles an additional time this turn.",this.bonus={exist:this.ddp9(0,this.jr1,this.jr1,0)*.5}}kasP(t,i){const e=a.field.jr5(t.trigger.creatId);e.extraBattles+=1}}class ie extends E{lookup(t){return{["KTS"]:{c:()=>this.kitC(),r:(e,s)=>this.kitR(e,s)},["RSC"]:{c:()=>this.scootC(),r:(e,s)=>this.scootR(e,s)},["SCC"]:{c:()=>this.shcrC(),r:(e,s)=>this.shcrR(e,s)},["SND"]:{c:()=>this.ssdC(),r:(e,s)=>this.ssdR(e,s)}}[t]}actReplace(t,i){this.lookup(t).r(i,i.event)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("RP",this.code),e}ddf8(t){if(t.event.code==="RPL"){const i=t.event;return t.creatId===i.replacedCreat.id}return!1}jr8(t){this.actReplace(this.cardCode(),t),a.batch.triggerDone()}kitC(){this.faction="U",this.rarity="H",this.name="Kitaru Sprite",this.jr1=this.boof358,this.jr2=this.boof71117,this.tribe.push("FY"),this.hints=["RT"],this.text=`When this is replaced, Spawn a ${this.name}.`}kitR(t,i){a.field.birthCreature(this.code,"S",t.ownerPlayerA)}scootC(){this.faction="A",this.rarity="T",this.name="Relic Scout",this.jr1=this.level,this.jr2=this.level,this.initArmor=this.level,this.isFree=!0,this.tribe.push("RB"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${a.log.jr9(this.level,this.level,!0)} and Armor ${this.level}.`}scootR(t,i){i.creature.buff(this.level,this.level),i.creature.addArmor(this.level)}shcrC(){this.faction="U",this.rarity="C",this.name="Shardclaw Crusher",this.jr1=this.boof5812,this.jr2=this.jr1,this.tribe.push("IN"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${a.log.jr9(this.jr1,this.jr1)}.`}shcrR(t,i){i.creature.buff(this.jr1,this.jr1)}ssdC(){this.faction="U",this.rarity="R",this.name="Spiritstone Druid",this.jr1=this.boof4610,this.jr2=this.lValN([3,4,6]),this.tribe.push("TG"),this.hints=["RT","EMA"],this.text=`When ${this.name} is replaced, put a ${this.jr1}/${this.jr2} Spirit into each adjacent available lane.`}ssdR(t,i){const e=i.replacedCreat.adjacent,s=a.field.emptyLanes(t.ownerPlayerA),l=Date.now();e.forEach(u=>{s.includes(u)&&a.field.birthCreature("SPU"+this.level,"P",t.ownerPlayerA,u,l)})}}class zt extends E{lookup(t){return{["BST"]:{c:()=>this.brimC(),u:(e,s)=>this.brimR(e,s)},["OSV"]:{c:()=>this.scavC(),u:(e,s)=>this.scavR(e,s)},["RHU"]:{c:()=>this.tiaC(),u:(e,s)=>this.tiaR(e,s)},["SKS"]:{c:()=>this.spsoC(),u:(e,s)=>this.spsoR(e,s)},["SWG"]:{c:()=>this.stgrC(),u:(e,s)=>this.stgrR(e,s)},["VTW"]:{c:()=>this.weldC(),u:(e,s)=>this.weldR(e,s)}}[t]}actUpgrade(t,i){this.lookup(t).u(i,i.event)}constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("UP",this.code),e}jr8(t){this.actUpgrade(this.cardCode(),t),a.batch.triggerDone()}brimC(){this.faction="T",this.rarity="L",this.name="Brimstone Tyrant",this.jr1=this.boof6916,this.jr2=this.jr1,this.tribe.push("FR","EL"),this.hints=["RD","ENF","EML"];const t=this.boof468;this.bonus={play:this.ddp9(0,t,0,0)},this.text=`Upgrade: Deal ${t} damage to each other creature.`}brimR(t,i){const e=Date.now(),s=this.boof468;a.field.creatByTarget(d.crNotMeTarg(t.creatId)).forEach(l=>l.hurtDirect(s,this.code,e))}scavC(){this.faction="A",this.rarity="H",this.name="Oreian Scavenger",this.jr1=this.boof6916,this.jr2=1,this.tribe.push("LT","EL"),this.hints=["RD"],this.bonus={play:this.ddp9(0,this.jr1,0,0)},this.text=`Upgrade: ${this.name} gets Armor ${this.jr1}.`}scavR(t,i){i.creature.addArmor(this.jr1)}tiaC(){this.faction="A",this.rarity="L",this.name="Relic Hunter",this.jr1=this.boof5915,this.jr2=this.jr1,this.initBT=!0,this.tribe.push("HM"),this.hints=["RD"],this.bonus={play:this.ddp6()},this.text=`Upgrade: ${this.name} gets +attack and +health equal to the creature it replaced.`}tiaR(t,i){i.creature.buff(i.replacedCreat.attack,i.replacedCreat.health)}spsoC(){this.faction="T",this.rarity="C",this.name="Sparksoul",this.jr1=this.boof6915,this.jr2=this.jr1-1,this.tribe.push("LT","EL"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets Aggressive.`}spsoR(t,i){i.creature.aggressive=!0}stgrC(){this.faction="A",this.rarity="C",this.name="Steelwatch Guard",this.jr1=this.boof4711,this.jr2=this.jr1,this.tribe.push("RB"),this.hints=["RD"],this.bonus={play:this.ddp9(0,this.jr1,this.jr1,0)},this.text=`Upgrade: ${this.name} gets ${a.log.jr9(this.jr1,this.jr1)}.`}stgrR(t,i){i.creature.buff(this.jr1,this.jr1)}weldC(){this.faction="A",this.rarity="R",this.name="Vault Welder",this.jr1=this.boof71118,this.jr2=this.lValN([9,14,22]),this.initDefend=!0,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: Negate Defender from ${this.name}.`}weldR(t,i){i.creature.negateDefender=!0}}class st extends E{lookup(t){return{["CGF"]:{c:()=>this.cfiendC(),v:e=>this.cfiendV(e)},["CSB"]:{c:()=>this.corpsC(),v:e=>this.corpsV(e)},["CYS"]:{c:()=>this.cslmC(),v:e=>this.cslmV(e)},["DSK"]:{c:()=>this.dskC(),v:e=>this.dskV(e)},["FST"]:{c:()=>this.fstrC(),v:e=>this.fstrV(e)},["FWK"]:{c:()=>this.fwlkC(),v:e=>this.fwlkV(e)},["FFD"]:{c:()=>this.ffC(),v:e=>this.ffV(e)},["GVS"]:{c:()=>this.ghsC(),v:e=>this.ghsV(e)},["GBG"]:{c:()=>this.ggC(),v:e=>this.ggV(e)},["GMR"]:{c:()=>this.gromC(),v:e=>this.gromV(e)},["MMX"]:{c:()=>this.mmeC(),v:e=>this.mmeV(e)},["NOZ"]:{c:()=>this.nyozC(),v:e=>this.nyozV(e)},["POX"]:{c:()=>this.poxC(),v:e=>this.poxV(e)},["RSZ"]:{c:()=>this.rszC(),v:e=>this.rszV(e)},["SFM"]:{c:()=>this.spirmC(),v:e=>this.spirmV(e)},["VGN"]:{c:()=>this.vgfsC(),v:e=>this.vgfsV(e)},["XHS"]:{c:()=>this.xhostC(),v:e=>this.xhostV(e)},["ZTU"]:{c:()=>this.zimusC(),v:e=>this.zimusV(e)}}[t]}cardVengeance(t,i){this.lookup(t).v(i)}vtext="";venges=!0;fixedImgCreat=!1;constructor(t){super(t),this.lookup(this.cardCode()).c(),this.venges&&(this.text="Vengeance: "+this.vtext),this.vtext=""}image(t){return this.fixedImgCreat?this.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return this.venges&&e.jr4("VN",this.code),e}jr8(t){this.cardVengeance(this.cardCode(),t),a.batch.triggerDone()}cfiendC(){this.faction="N",this.rarity="T",this.name="Contagion Fiend",this.jr1=this.boof234,this.jr2=this.boof5812,this.tribe.push("AB"),this.hints=["ENF"],this.fixedImgCreat=!0;const t=-this.level;this.vtext=`Each enemy creature gets ${a.log.jr9(t,t)}.`}cfiendV(t){const i=-this.level,e=Date.now(),s=d.crTarg();s.player=a.player.toTarget(!t.ownerPlayerA),a.field.creatByTarget(s).forEach(l=>l.buff(i,i,e))}corpsC(){this.faction="N",this.rarity="C",this.name="Corpulent Shambler",this.jr1=this.lValN([5,7,15]),this.jr2=this.jr1,this.tribe.push("ZB"),this.vtext="Put a 3/3 Zombie into this lane.",this.bonus={play:this.ddp9(1,6,3,0)}}corpsV(t){const i=t.event,e=`${"ZBS"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}cslmC(){this.faction="N",this.rarity="C",this.name="Crypt Slime",this.jr1=this.boof5915,this.jr2=this.jr1,this.tribe.push("OZ"),this.vtext="Put a 1/1 Oozeling into this lane.",this.bonus={play:this.ddp9(1,2,1,0)}}cslmV(t){const i=t.event,e=`${"COZ"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}dskC(){this.faction="N",this.rarity="C",this.name="Death Seeker",this.jr1=1,this.jr2=1,this.tribe.push("HM"),this.fixedImgCreat=!0,this.hints=["ST"];const t=this.boof51015;this.vtext=`Put a ${t}/${t} Spirit into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}dskV(t){const i=t.event,e=`${"SPN"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}fstrC(){this.faction="N",this.rarity="R",this.name="Fell Strider",this.jr1=this.lValN([4,8,10]),this.jr2=this.boof369,this.tribe.push("ZB"),this.vtext=`Put a ${this.jr1}/${this.jr2} Zombie into this lane.`,this.bonus={play:this.ddp9(1,this.jr1+this.jr2,this.jr1,0)}}fstrV(t){const i=t.event,e=`${"ZST"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}fwlkC(){this.faction="N",this.rarity="C",this.name="Fell Walker",this.jr1=this.boof359,this.jr2=this.jr1,this.tribe.push("ZB"),this.vtext=`Put a ${this.jr1}/${this.jr1} Zombie into this lane.`,this.bonus={play:this.ddp9(1,this.jr1*2,this.jr1,0)}}fwlkV(t){const i=t.event,e=`${"ZMB"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}ffC(){if(this.faction="N",this.rarity="H",this.name="Fleshfiend",this.jr1=this.boof6812,this.jr2=this.jr1,this.tribe.push("AB"),this.venges=this.level>1,this.vtext=`Put a level ${this.level-1} ${this.name} into this lane.`,this.venges){const t=this.lValN([0,6,15]);this.bonus={play:this.ddp9(1,t*2,t,0)}}}ffV(t){const i=t.event,e=`${"FFD"}${this.level-1}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}ghsC(){this.faction="U",this.rarity="C",this.name="Glowhive Siren",this.jr1=this.boof3814,this.jr2=this.boof61117,this.tribe.push("IN"),this.vtext=`You gain ${this.boof124} to ${this.gghigh-1} health.`,this.bonus={play:this.ddp9(0,0,0,this.boof258)}}ghsV(t){const i=a.randInt(this.boof124,this.gghigh);a.player.healPlayer(t.ownerPlayerA,i)}get gghigh(){return this.lValN([5,9,13])}ggC(){this.faction="N",this.rarity="C",this.name="Graveborn Glutton",this.jr1=this.boof61117,this.jr2=this.boof3814,this.tribe.push("AB"),this.vtext=`Deal ${this.boof124} to ${this.gghigh-1} damage to the enemy player.`,this.bonus={play:this.ddp9(0,0,0,this.boof258)}}ggV(t){const i=a.randInt(this.boof124,this.gghigh);a.player.ddf3(!t.ownerPlayerA,i,this.code)}gromC(){this.faction="U",this.rarity="C",this.name="Grove Matriarch",this.jr1=this.boof4814,this.jr2=this.jr1+2,this.tribe.push("PL");const t=B.minionBuff(this.level),i=B.minionName(this.level);this.vtext=`Put a ${t}/${t} ${i} into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}gromV(t){const i=t.event,e=B.minionCode(this.level);a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}mmeC(){this.faction="A",this.rarity="C",this.name="Metamind Explorer",this.jr1=this.boof3713,this.jr2=this.jr1+2,this.tribe.push("MM"),this.vtext=`Draw ${this.level} cards.`,this.bonus={play:this.ddp9(0,0,0,0,this.level/4)}}mmeV(t){a.player.drawCard(t.ownerPlayerA,this.level)}nyozC(){this.faction="N",this.rarity="R",this.name="Nyrali Ooze",this.jr1=this.boof247,this.jr2=this.jr1,this.tribe.push("OZ");const t=this.level+this.jr1+1;this.vtext=`Put a ${t}/${t} Oozeling into this lane.`,this.bonus={play:this.ddp9(1,t*2,t,0)}}nyozV(t){const i=t.event,e=`${"OOZ"}${this.level}`;a.field.birthCreature(e,"P",i.creature.owner,i.creature.lane)}poxC(){if(this.faction="N",this.rarity="H",this.name="Progeny of Xith",this.jr1=this.boof246,this.jr2=this.jr1,this.tribe.push("AB"),this.hints=["DL"],this.level===1&&this.hints.push("ST"),this.venges=this.level<3,this.vtext=`Spawn a level ${this.level+1} ${this.name}.`,this.venges){const t=this.lValN([10,6,0]);this.bonus={play:this.ddp9(1,t*2,t,0)}}}poxV(t){const i=t.event,e=`${"POX"}${this.level+1}`;a.field.birthCreature(e,"S",i.creature.owner)}rszC(){this.faction="N",this.rarity="R",this.name="Runescarred Zombie",this.jr1=this.lValN([5,8,16]),this.jr2=this.boof359,this.tribe.push("ZB"),this.vtext=`Put a ${a.log.levelGateText(this.level,!0)}spell at random from your discard pile into your hand.`,this.bonus={play:this.ddp9(0,0,0,0,.25)}}rszV(t){const i=a.player.toPlayer(t.ownerPlayerA),e=d.target("TD");e.player=a.player.toTarget(i),e.card="S",e.level=a.target.ddf2(this.level);const s=a.target.deckByTarget(e);if(s.length>0){const l=s[a.randInt(0,s.length)];i.discard.splice(l[1],1),i.hand.push(l[0])}}spirmC(){this.faction="T",this.rarity="H",this.name="Spiritflame Mystic",this.jr1=this.boof6912,this.jr2=this.jr1-3,this.tribe.push("HM"),this.hints=["ENF","EML","OP"],this.vtext=`Deal ${this.boof246} damage to each creature.`}spirmV(t){const i=this.boof246,e=Date.now();a.field.qActiveCreats().forEach(s=>s.hurtDirect(i,this.code,e))}vgfsC(){this.faction="N",this.rarity="C",this.name="Vengeful Spirit",this.jr1=this.boof357,this.jr2=this.jr1-2,this.tribe.push("ST"),this.hints=["OP"];const t=this.boof369n;this.vtext=`Give the opposing creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*-2,-t,0)}}vgfsV(t){const e=t.event.creature.opposed;if(e){const s=this.boof369n;e.buff(s,s)}}xhostC(){this.faction="N",this.rarity="C",this.name="Xithian Host",this.jr1=this.boof359,this.jr2=this.boof135,this.tribe.push("AB"),this.vtext=`Deal ${this.jr1} damage to the enemy player and you gain ${this.jr1} health.`,this.bonus={play:this.ddp9(0,0,0,this.jr1*2)}}xhostV(t){const i=this.jr1;a.player.ddf3(!t.ownerPlayerA,i,this.code),a.player.healPlayer(t.ownerPlayerA,i)}zimusC(){this.faction="N",this.rarity="L",this.name="Zimus, the Undying",this.jr1=this.boof51014,this.jr2=this.lValN([2,5,7]),this.tribe.push(this.level===1?"HM":"ZB"),this.venges=this.level>1,this.vtext=`Spawn a Zimus, the ${this.level===2?"Returned":"Undying"}.`,this.level<3?(this.hints=["LV"],this.level===2&&(this.bonus={play:this.ddp9(1,15,10,0)})):(this.hints=["ST"],this.bonus={play:this.ddp9(0,0,0,0,8)})}zimusV(t){let i;this.level===2?i=`${"ZTR"}2`:i=`${"ZTU"}3`,a.field.birthCreature(i,"S",t.ownerPlayerA)}}class Gt extends Q{lookup(t){return{["DIS"]:{c:()=>this.disnC(),p:e=>this.disnZ(e),e:e=>this.disnE(e)},["DCH"]:{c:()=>this.dchantC(),p:e=>this.dchantZ(e),e:e=>this.dchantE(e)},["ESU"]:{c:()=>this.esrgC(),p:e=>this.esrgZ(e),e:e=>this.esrgE(e)},["HOX"]:{c:()=>this.howlC(),p:e=>this.howlZ(e),e:e=>this.howlE(e)},["ITO"]:{c:()=>this.itorC(),p:e=>this.itorZ(e),e:e=>this.itorE(e)},["MSP"]:{c:()=>this.mendC(),p:e=>this.mendZ(e),e:e=>this.mendE(e)},["NEM"]:{c:()=>this.netherC(),p:e=>this.netherZ(e),e:e=>this.netherE(e)}}[t]}cardCast(t,i){this.lookup(t).p(i)}playTarg;constructor(t){super(t),this.playTarg="X",this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return t.push(d.playerActTarg(this.playTarg,"CARD",this.code,"")),t}handleAction(t){this.logSpell();const i=a.state.getPlayer(t.playerA);this.cardCast(this.cardCode(),i),a.turn.spellCast()}ddf7(t){return this.lookup(this.cardCode()).e(t)}disnC(){this.faction="T",this.rarity="R",this.name="Disintigrate",this.playTarg="E",this.text=`Deal 1 to ${this.dshigh-1} damage to the enemy player.`}disnZ(t){a.player.ddf3(t,a.randInt(1,this.dshigh),this.code)}get dshigh(){return this.lValN([9,16,26])}disnE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerDmg(t.playerA,this.dshigh/2)],i}dchantC(){this.faction="U",this.rarity="C",this.name="Druid's Chant",this.playTarg="F",this.text=`You gain ${this.boof81220} health.`}dchantZ(t){a.player.healPlayer(t,this.boof81220)}dchantE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerLife(t.playerA,this.boof81220)],i}esrgC(){this.faction="A",this.rarity="R",this.name="Energy Surge",this.isFree=this.level>1,this.overload=this.level===3,this.level===1&&(this.hints=["LV"]),this.playTarg="F",this.text=`Draw ${this.level} card${this.level>1?"s":""}.`}esrgZ(t){a.player.drawCard(t,this.level)}esrgE(t){return d.actionEval(t,"ST")}howlC(){this.faction="N",this.rarity="R",this.name="Howl of Xith",this.maxLevel=1,this.playTarg="E",this.text="Deal X damage to the enemy player and gain X health, where X is three times your rank."}howlZ(t){const i=a.state.getActivePlayer(),e=i.rank*3;a.player.ddf3(t,e,this.code),a.player.healPlayer(i,e)}howlE(t){const i=a.player.toPlayer(!t.playerA),e=i.rank*3,s=d.actionEval(t,"ST");return s.vectors=[d.evalVectorPlayerDmg(t.playerA,e),d.evalVectorPlayerLife(i.isPlayerA,e)],s}itorC(){this.faction="T",this.rarity="R",this.name="Ice Torrent",this.isFree=this.level>1,this.level===1&&(this.hints=["LV"]),this.playTarg="E",this.text=`Deal ${this.boof234} damage to the enemy player.`}itorZ(t){a.player.ddf3(t,this.boof234,this.code)}itorE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerDmg(t.playerA,this.boof234)],i}mendC(){this.faction="U",this.rarity="R",this.name="Mending Spring",this.playTarg="F",this.text=`You gain 1 to ${this.mendboof} Health.`}mendZ(t){a.player.healPlayer(t,a.randInt(1,this.mendboof+1))}get mendboof(){return this.lValN([10,20,40])}mendE(t){const i=d.actionEval(t,"ST");return i.vectors=[d.evalVectorPlayerLife(t.playerA,this.mendboof/2)],i}netherC(){this.faction="N",this.rarity="C",this.name="Nether Embrace",this.playTarg="E";const t=this.boof4712;this.text=`Deal ${t} damage to the enemy player. You gain ${t} heal`}netherZ(t){const i=this.boof4712;a.player.ddf3(t,i,this.code),a.player.healPlayer(!t.isPlayerA,i)}netherE(t){const i=this.boof4712,e=d.actionEval(t,"ST");return e.vectors=[d.evalVectorPlayerLife(!t.playerA,i),d.evalVectorPlayerDmg(t.playerA,i)],e}}class Vi extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Rageborn Hellion",this.jr1=this.boof469,this.jr2=this.jr1*2,this.tribe.push("FR","EL"),this.hints=["OL","LKV"],this.text=`When a friendly creature ${a.log.dbdtap()}, ${this.name} gets ${a.log.jr9(this.level,this.level)}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.owner===t.ownerPlayerA}return!1}jr8(t){a.field.jr5(t.creatId).buff(this.level,this.level),a.batch.triggerDone()}}class ft extends E{lookup(t){return{["AIV"]:{c:()=>this.avinvC(),r:e=>this.avinvR(e)},["BSP"]:{c:()=>this.bskphC(),r:e=>this.bskphR(e)},["CRC"]:{c:()=>this.crucC(),r:e=>this.crucR(e)},["ESK"]:{c:()=>this.ebknC(),r:e=>this.ebknR(e)},["FWC"]:{c:()=>this.fwcC(),r:e=>this.fwcR(e)},["FME"]:{c:()=>this.feggC(),r:e=>this.feggR(e)},["MMV"]:{c:()=>this.mmovC(),r:e=>this.mmovR(e)},["PSH"]:{c:()=>this.porshC(),r:e=>this.porshR(e)},["RGG"]:{c:()=>this.runegC(),r:e=>this.runegR(e)},["SSR"]:{c:()=>this.solrevC(),r:e=>this.solrevR(e)},["SSM"]:{c:()=>this.spshamC(),r:e=>this.spshamR(e)},["SSG"]:{c:()=>this.snoutC(),r:e=>this.snoutR(e)},["UGM"]:{c:()=>this.mantisC(),r:e=>this.mantisR(e)}}[t]}rtext="";constructor(t){super(t),this.lookup(this.cardCode()).c(),this.text="Gain Rank: "+this.rtext,this.rtext=""}image(t){return this.rarity==="T"?this.cardCode()==="FWC"?this.rawImage("MPH",t):super.fixedImage(t):super.image(t)}jr3(t,i){const e=super.jr3(t,i);return e.jr4("RU",this.code),e}ddf8(t){return t.trigger.type==="RU"?t.event.playerA===t.ownerPlayerA:!1}jr8(t){this.lookup(this.cardCode()).r(t),a.batch.triggerDone()}avinvC(){this.faction="T",this.rarity="H",this.name="Avalanche Invoker",this.jr1=this.boof6914,this.jr2=this.jr1+1,this.tribe.push("ER","AS"),this.hints=["TL"],this.rtext=`Deal ${this.boof3612} damage to each non-Tempys creature.`}avinvR(t){const i=this.boof3612,e=Date.now();a.field.qActiveCreats().filter(s=>s.faction!=="T").forEach(s=>s.hurtDirect(i,this.code,e))}bskphC(){this.faction="N",this.rarity="C",this.name="Blightskull Phantasm",this.jr1=this.boof5814,this.jr2=this.boof61017,this.tribe.push("ST"),this.hints=["TL","OP"];const t=this.boof369n;this.rtext=`the opposing creature gets ${a.log.jr9(t,t)}.`}bskphR(t){const e=a.field.jr5(t.creatId).opposed;if(e){const s=this.boof369n;e.buff(s,s)}}crucC(){this.faction="A",this.rarity="R",this.name="Crucible Colossus",this.jr1=this.boof61016,this.jr2=this.jr1+2,this.tribe.push("RB"),this.initDefend=!0,this.hints=["TL"],this.rtext=`Negate Defender from ${this.name}.`}crucR(t){const i=a.field.jr5(t.creatId);i.negateDefender=!0}ebknC(){this.faction="N",this.rarity="H",this.name="Ebonskull Knight",this.jr1=this.lValN([9,13,18]),this.jr2=this.jr1-2,this.tribe.push("VP"),this.hints=["TL"],this.rtext=`Destroy ${this.name}.`}ebknR(t){const i=a.field.jr5(t.creatId);a.death.destroy(i,this.code)}fwcC(){this.faction="U",this.rarity="T",this.maxLevel=1,this.name="Feywing Chrysalis",this.jr1=0,this.jr2=3,this.tribe.push("CR"),this.initDefend=!0,this.rtext=`Replace ${this.name} with a 9/9 Feywing.`}fwcR(t){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"FWG"}1`,"R",i.owner,i.lane)}feggC(){this.faction="T",this.rarity="T",this.minLevel=this.level,this.maxLevel=this.level,this.name="Frostmane Egg",this.jr1=0,this.jr2=6,this.tribe.push("DG"),this.initDefend=!0,this.rtext=`Replace ${this.name} with a level ${this.level} Frostmane Dragon.`}feggR(t){const i=a.field.jr5(t.creatId);a.field.birthCreature(`${"FMD"}${this.level}`,"R",i.owner,i.lane)}mmovC(){this.faction="A",this.rarity="C",this.name="Metamind Overseer",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("MM"),this.hints=["TL"],this.rtext="Draw 2 cards."}mmovR(t){a.player.drawCard(t.ownerPlayerA,2)}porshC(){this.faction="N",this.rarity="H",this.name="Portal Shade",this.jr1=this.boof5914,this.jr2=this.boof71118,this.tribe.push("ST"),this.bonus={exist:this.ddp6()},this.rtext="Spawn a random creature that was destroyed this game."}porshR(t){const i=a.death.gravedigger();i&&a.field.birthCreature(i,"S",t.ownerPlayerA)}runegC(){this.faction="U",this.rarity="H",this.name="Runegrove Guardian",this.jr1=this.boof4814,this.jr2=this.jr1,this.tribe.push("PL"),this.hints=["TL"],this.rtext=`${this.name} gets ${a.log.jr9(this.jr1,this.jr1)}.`}runegR(t){a.field.jr5(t.creatId).buff(this.jr1,this.jr1)}solrevC(){this.faction="U",this.rarity="L",this.name="Solstice Reveler",this.jr1=this.boof4816,this.jr2=this.jr1,this.tribe.push("HM"),this.hints=["TL","FRS"];const t=this.solbof;this.rtext=`each friendly creature gets ${a.log.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`}solrevR(t){const i=this.solbof;a.field.ddf1().forEach(e=>{e.buff(i,i),this.level===3&&(e.breakthrough=!0)})}get solbof(){return this.jr1/2}spshamC(){this.faction="T",this.rarity="C",this.name="Spiritfrost Shaman",this.jr1=this.boof71117,this.jr2=this.boof4610,this.tribe.push("HM"),this.hints=["TL"],this.rtext=`Deal ${this.boof579} damage to the enemy player.`}spshamR(t){a.player.ddf3(!t.ownerPlayerA,this.boof579,this.code)}snoutC(){this.faction="U",this.rarity="C",this.name="Stouthide Stegadon",this.jr1=this.boof4714,this.jr2=this.boof71117,this.tribe.push("DN"),this.hints=["TL"],this.rtext=`Heal ${this.snoutbof} damage from ${this.name}.`}snoutR(t){a.field.jr5(t.creatId).heal(this.snoutbof)}get snoutbof(){return this.level*10}mantisC(){this.faction="U",this.rarity="C",this.name="Umbraglim Mantis",this.jr1=this.boof6914,this.jr2=this.jr1-1,this.tribe.push("IN"),this.hints=["TL"],this.rtext=`You gain ${this.mantbof} health.`}mantisR(t){a.player.healPlayer(t.ownerPlayerA,this.mantbof)}get mantbof(){return this.lValN([8,10,12])}}class Oi extends E{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Riftlasher",this.jr1=this.boof359,this.jr2=this.boof61016,this.tribe.push("FR","EL"),this.hints=["OL","LKV","ATH"],this.text=`When ${this.name} ${a.log.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`,this.bonus={exist:this.ddp9(0,this.jr1,0,0)}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("DM",this.code);return s.interactive=!0,e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId&&t.ownerPlayerA===a.state.ddf9()}return!1}jr8(t){const i=t.event,e=a.target.toActions(d.crEnemyActTarg("CARD",this.code,a.enTil(t.creatId,i.dmg)));e.length>0?(e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}handleAction(t){const i=a.deTil(t.param);a.field.ddf6(t).hurtDirect(parseInt(i[1]),this.code),a.action.actionDone(!0)}ddf7(t){const i=a.deTil(t.param);return d.ddp2(t,t.playerA,t.lane,{dmg:parseInt(i[1])})}}class Ui extends yt{jr3(t,i){const e=super.jr3(t,i);return e.jr4("AS",this.code),e}jr8(t){if(t.trigger.type==="AS"){let i=!0;for(;i;){const e=a.field.birthCreature(this.code,"S",t.ownerPlayerA);e?e.opposed&&(i=!1):i=!1}a.batch.triggerDone()}else super.jr8(t)}}class Wi extends E{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Scourgeflame Sorcerer",this.jr1=this.boof358,this.jr2=this.boof5914,this.tribe.push("ZB");const i=`Destroy an enemy ${a.log.levelGateText(this.level+1,!0)}creature.`,e=this.level===3?": ":", destroy another friendly creature: ";this.text=`Activate${e}${i}`}canActivate(t){return this.enemies(t).length>0?this.level===3?!0:this.friends(t).length>0:!1}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[1]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[0]),s=Date.now();if(this.level<3){const u=a.field.jr5(i[2]);a.death.destroy(u,this.code,s)}const l=a.field.ddf6(t);a.death.destroy(l,this.code,s),e.endActivation()}}friends(t){const i=d.crFriendNotMeActTarg("CARD",t.id,this.code,a.enTil(t.id,"P1"));return a.target.toActions(i)}enemies(t,i=""){const e=d.crEnemyActTarg("CARD",this.code,a.enTil(t.id,"P2",i));return e.level=a.target.ddf2(this.level+1),a.target.toActions(e)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param);let s;return this.level===3?s=this.enemies(e):s=this.friends(e),s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.deTil(t.param),s=a.field.jr5(e[0]),l=a.field.ddf6(t),u=this.enemies(s,l.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[1]==="P1")return d.ddp5(t);{const e=t,s=d.ddp7(t,e.playerA,e.lane);if(this.level<3){const l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);u.destroy=!0,s.vectors.push(u)}return s}}}}class zi extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Seismic Adept",this.jr1=this.boof4712,this.jr2=this.boof61218,this.tribe.push("HM"),this.text="Activate: Move an enemy creature to another available enemy lane.",this.bonus={exist:this.level*.5}}canActivate(t){return this.enemies(t).length>0&&this.empties(t).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.jr5(i[2]).move(t.lane),e.endActivation()}}empties(t,i=""){const e=d.emptyPlayerActTarg("E","CARD",this.code,a.enTil("P2",t.id,i));return a.target.toActions(e)}enemies(t){const i=d.crEnemyActTarg("CARD",this.code,a.enTil("P1",t.id));return a.target.toActions(i)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.enemies(e);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=a.field.jr5(s[1]),u=this.empties(l,e.id);return u.push(a.action.cancelAction()),u}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=t,l=a.field.jr5(i[2]),u=d.ddp1(l.owner,l.lane);return u.moveTo=s.lane,e.vectors.push(u),e}}}}class re extends E{constructor(t){super(t),this.rarity="R",this.jr1=this.boof4612,this.jr2=this.boof61016;const i=this.cardCode();if(i==="SSS"?this.steel():i==="LSS"?this.life():i==="FSS"?this.flame():i==="DSS"&&this.dark(),this.level>1){const e=a.log.levelGateText(this.level-1);this.text=`When you play a ${e} ${a.log.factionText(this.faction)} card, you may ${this.tuxt}.`}else this.hints=["LV"];this.bonus={exist:this.level*.5},this.tuxt=""}tuxt="";dark(){this.faction="N",this.name="Darkshaper Savant",this.tribe.push("ZB");const t=-this.boof135;this.tuxt=`give an enemy creature ${a.log.jr9(t,t)}`}life(){this.faction="U",this.name="Lifeshaper Savant",this.tribe.push("SE");const t=this.boof135;this.tuxt=`give another friendly creature ${a.log.jr9(t,t)}`}steel(){this.faction="A",this.name="Steelshaper Savant",this.tribe.push("HM"),this.tuxt=`give another friendly creature Armor ${this.boof124}`}flame(){this.faction="T",this.name="Flameshaper Savant",this.tribe.push("HM"),this.tuxt=`deal ${this.boof147} damage to target creature or player`}jr3(t,i){const e=super.jr3(t,i);if(this.level>1){const s=e.jr4("PC",this.code);s.interactive=!0}return e}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.ownerPlayerA){const e=a.cards.getCard(i.cardCode);if(e.level{u.health>i&&(i=u.health)});const s=e.filter(u=>u.health===i).map(u=>u.id),l=d.crActTarg("CARD",this.code,"");return l.level=a.target.ddf2(this.level+1),l.victims=a.enTil(...s),t.push(l),t}handleAction(t){this.logSpell();const i=a.field.ddf6(t);a.death.destroy(i,this.code),this.level===3&&a.player.healPlayer(a.state.ddf9(),i.health),a.turn.spellCast()}ddf7(t){return d.ddp7(t,t.playerA,t.lane)}}class Ki extends Q{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Spiritleash";const i=this.boof5814;this.text=`Destroy a friendly creature.~Give a creature ${a.log.jr9(i,i)}.`}playTargets(){const t=super.playTargets(),i=d.crFriendActTarg("CARD",this.code,"P1");return a.field.creatByTarget(i).length>0&&a.field.qActiveCreats().length>1&&t.push(i),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]),l=this.boof5814;a.death.destroy(s,this.code),e.buff(l,l),a.turn.spellCast()}}getCardActions(t,i){const e=a.field.ddf6(t),s=a.target.toActions(d.crNotMeActTarg("CARD",e.id,this.code,a.enTil("P2",e.id)));return s.push(a.action.cancelAction()),s}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.jr5(i[1]),s=d.ddp8(t,e,"SD"),l=this.boof5814;return s.vectors.push(d.ddp1(t.playerA,t.lane,{att:l,hlt:l})),s}}}class Yi extends E{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Spite Hydra",this.jr1=this.boof5914,this.jr2=this.jr1,this.tribe.push("HY"),this.hints=["OP","ALT","LKR","LKV"],this.bonus={exist:this.ddp9(0,this.level*4,this.level*2,0)},this.text=`When ${this.name} ${a.log.dbdtac()}, this gets ${a.log.jr9(this.level,this.level)}.~Allied Tempys: Activate: Deal ${this.level} damage to another creature. This gets ${a.log.jr9(this.level,this.level)}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e.jr4("DM",this.code),e}getCardActions(t,i){const e=i??a.field.jr5(t.param);return a.target.toActions([d.crNotMeActTarg("CARD",e.id,this.code,e.id),a.target.buttonTarget("CANC")])}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=t;return d.ddp2(t,i.playerA,i.lane,{dmg:this.level})}}canActivate(t){return this.getCardActions(d.ddf4(),t).length>1&&t.hasMod(t.id)}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}handleAction(t){const i=a.field.ddf6(t),e=a.field.jr5(t.param);i.hurtDirect(this.level,this.code),e.buff(this.level,this.level),e.endActivation()}jr8(t){const i=a.field.jr5(t.creatId);t.trigger.type==="FR"?a.turn.allied("T")&&(i.addMod(d.mod("AL",!0,i.id)),i.changed=!0):t.trigger.type==="DM"&&i.buff(this.level,this.level),a.batch.triggerDone()}}class Xi extends E{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Statis Warden",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("MM"),this.text="When you play a spell, give a friendly creature Defender until the end of the enemy player's next turn."}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.ddf6(t),e=d.mod("DF",!0,t.param);e.expiry="EN",i.addMod(e),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}return!1}jr8(t){const i=d.crFriendNotMeActTarg("CARD",t.creatId,this.code,t.creatId);i.canDefender=!0;const e=a.target.toActions(i);e.length===0?a.batch.triggerDone():(e.push(a.action.noneEndTrigger()),a.action.ddf5(e))}ddf7(t){return d.ddp2(t,t.playerA,t.lane,{def:!0})}}class qi extends E{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Steeleye Researcher",this.jr1=this.boof5915,this.jr2=this.jr1+1,this.tribe.push("HM"),this.bonus={play:.5},this.text=`Upgrade: You may ${a.log.daluac()}.`}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("UP",this.code);return s.interactive=!0,e}handleAction(t){a.turn.levelAndDiscard(t),a.action.actionDone(!0)}jr8(t){const i=d.lvlHandActTarg(this.code,t.creatId),e=a.target.toActions(i);e.length>0?(e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}ddf7(t){return d.actionEval(t,"DC")}}class ji extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steelscale Dragon",this.jr1=this.boof4812,this.jr2=this.jr1+2,this.tribe.push("RB","DG"),this.initMobile=this.level,this.text=`While each other friendly creature has Defender, ${this.name} gets ${a.log.jr9(this.jr1,0)}, Armor ${this.boof246}, and Breakthrough.`}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("DF",this.code);s.area="C";const l=e.addEffect("PS",this.code);return l.area="C",e}enforceEffect(t,i){const e=d.crNotMeTarg(i.id);if(e.player=a.player.toTarget(i.owner),a.field.creatByTarget(e).some(l=>!l.defender))i.removeModSafe(i.id);else{const l=d.mod("AT",this.jr1,i.id),u=d.mod("AR",this.boof246,i.id),p=d.mod("BT",!0,i.id);i.addModSafe(l),i.addModSafe(u),i.addModSafe(p)}}}class Ji extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Storm Bringer",this.jr1=this.boof5814,this.jr2=this.boof61018,this.tribe.push("WN","EL"),this.hints=["FH"];const i=this.boof246;this.bonus={exist:this.ddp9(0,i+2,0,0)},this.text=`At the start of each turn, ${this.name} moves to an available lane at random. Flank: Deal ${i} damage to the opposing creature.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("TS",this.code),e.jr4("FK",this.code),e}ddf8(t){return t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="TS"){const i=a.field.emptyLanes(t.ownerPlayerA);i.length>0&&a.field.jr5(t.creatId).move(i[a.randInt(0,i.length)]),a.batch.triggerDone()}else if(t.trigger.type==="FK"){const e=t.event.creature.opposed;e&&e.hurtDirect(this.boof246,this.code),a.batch.triggerDone()}else super.jr8(t)}}class Qi extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Sulgrim, Herald of Force",this.jr1=15,this.jr2=15,this.tribe.push("GL"),this.hints=["FRS"],this.text="Activate: Deal damage equal to a friendly creature's Armoor to an enemy creature.~Forge: Each friendly creature gets Armor 6.",this.bonus={play:this.ddp9(0,12,0,0)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[1]==="P1")a.action.ddf5(this.getCardActions(t));else if(i[1]==="P2"){const e=a.field.jr5(i[0]),s=a.field.jr5(i[2]);a.field.ddf6(t).hurtDirect(s.armor,this.code),e.endActivation()}}jr8(t){a.field.ddf1().forEach(i=>i.addArmor(6)),a.batch.triggerDone()}friends(t){const i=d.crFriendActTarg("CARD",this.code,a.enTil(t,"P1"));return i.hasArmor=!0,a.target.toActions(i)}enemies(t,i=""){const e=d.crEnemyActTarg("CARD",this.code,a.enTil(t,"P2",i));return a.target.toActions(e)}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i?i.id:t.param,s=this.friends(e);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.deTil(t.param),s=a.field.ddf6(t),l=this.enemies(e[0],s.id);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param),e=t;if(i[1]==="P1")return d.ddp5(t);{const s=a.field.jr5(i[2]);return d.ddp2(t,e.playerA,e.lane,{dmg:s.armor})}}}}class _i extends E{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Synapsis Oracle",this.jr1=this.boof358,this.jr2=this.lValN([9,15,24]),this.tribe.push("HM"),this.hints=["OL"];let i;this.level===3?(this.text="Activate: Level up a card in your hand.",i=1):(this.text=`Activate: ${a.log.daluac(!0)}.`,i=.5),this.bonus={exist:i}}canActivate(t){return a.state.getPlayer(t.owner).hand.some(e=>a.cards.getCard(e).canLevel())}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.field.jr5(t.param),e=a.state.getPlayer(i.owner);this.level===3?e.hand[t.position]=a.cards.getCard(t.card).levelUpCard():a.turn.levelAndDiscard(t),i.endActivation()}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=d.lvlHandActTarg(this.code,e.id);return a.target.toActions([s,a.target.buttonTarget("CANC")])}return super.getCardActions(t,i)}ddf7(t){return t.actionKey==="ACTV"?d.ddp5(t):d.actionEval(t,"DC")}}class tr extends at{jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}jr8(t){if(t.trigger.type==="FR"){const i=a.state.gs.turn.creaturesKilled;if(i>0){const e=Date.now();for(let s=0;s0}getCardActions(t,i){return a.target.toActions(d.crEnemyActTarg("CARD",this.code,"P2"))}ddf7(t){const i=a.deTil(t.param),e=d.ddp2(t,t.playerA,t.lane,{dmg:this.boof5812});return i[0]==="P1"&&this.dino()&&(e.final=!1),e}}class Ee extends E{lookup(t){return{["SOL"]:{c:()=>this.stagC(),t:e=>this.stagT(e)},["WTK"]:{c:()=>this.tinkC(),t:e=>this.tinkT(e)}}[t]}mPlayer=0;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);return e.jr4("TE",this.code),e}ddf8(t){return t.trigger.type==="TE"&&this.validPlayer(t)}jr8(t){this.lookup(this.cardCode()).t(t),a.batch.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=t.event;return this.mPlayer===1?i.playerA===t.ownerPlayerA:i.playerA!==t.ownerPlayerA}stagC(){this.faction="U",this.rarity="C",this.name="Stag of Lys",this.jr1=this.boof5916,this.jr2=this.jr1,this.tribe.push("ST"),this.mPlayer=1;const t=this.boof246;this.bonus={exist:this.ddp9(0,0,0,t)},this.text=`At the end of your turn, gain ${t} health.`}stagT(t){a.player.healPlayer(t.ownerPlayerA,this.boof246)}tinkC(){this.faction="A",this.rarity="H",this.name="War Tinker",this.jr1=this.level,this.jr2=this.boof4812,this.tribe.push("GN"),this.mPlayer=-1,this.bonus={exist:this.ddp6()},this.text=`At the end of the enemy player's turn, replace ${this.name} with a copy of a random Robot from your deck.`}tinkT(t){const i=d.target("DK");i.player=a.player.toTarget(t.ownerPlayerA),i.tribe="RB";const e=a.target.deckByTarget(i),s=e.length;if(s>0){const l=e[a.randInt(0,s)][0],u=a.field.jr5(t.creatId);a.field.birthCreature(l,"R",u.owner,u.lane)}}}class bt extends E{lookup(t){return{["DCS"]:{c:()=>this.delphC(),t:e=>this.delphT(e)},["GMP"]:{c:()=>this.gmpC(),t:e=>this.gmpT(e)},["LBL"]:{c:()=>this.lbcC(),t:e=>this.lbcT(e)},["SBF"]:{c:()=>this.sfangC(),t:e=>this.sfangT(e)},["SSE"]:{c:()=>this.sseC(),t:e=>this.sseT(e)},["SPD"]:{c:()=>this.spdC(),t:e=>this.spdT(e)},["SPM"]:{c:()=>this.spmC(),t:e=>this.spmT(e)},["TBA"]:{c:()=>this.tbaC(),t:e=>this.tbaT(e)},["VCG"]:{c:()=>this.vgC(),t:e=>this.vgT(e)},["WBG"]:{c:()=>this.woeC(),t:e=>this.woeT(e)},["ZSH"]:{c:()=>this.zyxC(),t:e=>this.zyxT(e)}}[t]}bothTurns=!1;constructor(t){super(t),this.lookup(this.cardCode()).c()}jr3(t,i){const e=super.jr3(t,i);e.jr4("TS",this.code);const s=ut.extractCardCode(this.code);return(s==="ZSH"||s==="SBF")&&(e.extraBattles=1),e}ddf8(t){return t.trigger.type==="TS"?this.bothTurns?!0:t.event.playerA===t.ownerPlayerA:!1}jr8(t){this.lookup(this.cardCode()).t(t),a.batch.triggerDone()}delphC(){this.faction="A",this.rarity="L",this.name="Delpha, Chronosculptor",this.jr1=this.boof7914,this.jr2=this.jr1,this.tribe.push("HM"),this.level>1&&(this.hints=["OL"],this.bonus={exist:this.ddp9(0,9,4,0)},this.text=`At the start of your turn, level a ${this.level===2?"level 1 ":""}card in your hand at random.`)}delphT(t){if(this.level>1){const i=a.state.getPlayer(t.ownerPlayerA),e=i.hand.map((l,u)=>{const p=a.cards.getCard(l);return{idx:u,lvl:p.level,nxt:p.canLevel()?p.levelUpCard():""}}).filter(l=>l.nxt&&(this.level===3||l.lvl===1)),s=e.length;if(s>0){const l=e[a.randInt(0,s)];i.hand[l.idx]=l.nxt}}}gmpC(){this.faction="A",this.rarity="L",this.name="Ghox, Metamind Paragon",this.jr1=this.boof4814,this.jr2=this.boof61218,this.tribe.push("MM"),this.hints=["OL"];const t=this.level===1?"":"s";this.bonus={exist:this.ddp9(0,0,0,0,this.level*.5)},this.text=`At the start of your turn, draw ${this.level} card${t}.`}gmpT(t){a.player.drawCard(t.ownerPlayerA,this.level)}lbcC(){this.faction="U",this.rarity="R",this.name="Lightbringer Cleric",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("TK"),this.hints=["OL"],this.bonus={exist:this.ddp9(0,0,0,this.boof3610)},this.text=`At the start of your turn, you gain ${this.boof137} to ${this.boof5914-1} health.`}lbcT(t){a.player.healPlayer(t.ownerPlayerA,a.randInt(this.boof137,this.boof5914))}sfangC(){this.faction="T",this.rarity="H",this.name="Saberfang",this.jr1=this.boof246,this.jr2=1,this.initAggro=!0,this.tribe.push("CT"),this.hints=["OL","ATH"],this.text=`${this.name} battles an additional time on your turn.`}sfangT(t){const i=a.field.jr5(t.creatId);i.extraBattles+=1}sseC(){this.faction="U",this.rarity="L",this.name="Scatterspore Eidolon",this.jr1=8,this.jr2=this.jr1,this.tribe.push("PL"),this.hints=["OL","EMO","DL"];const t=this.boof357,i=B.minionName(this.level);this.bonus={exist:this.ddp9(1,t*2,t,0)},this.text=`At the start of your turn, Spawn a ${t}/${t} ${i}.`}sseT(t){const i=this.lValS(["SXD","SXP","SXT"])+this.level.toString();a.field.birthCreature(i,"S",t.ownerPlayerA)}spdC(){this.faction="U",this.rarity="R",this.name="Shardplate Delver",this.jr1=this.boof4612,this.jr2=this.jr1,this.tribe.push("DN"),this.hints=["OL"];const t=this.boof246;this.bonus={exist:this.ddp9(0,t*2,t,0)},this.text=`At the start of your turn, ${this.name} gets ${a.log.jr9(t,t)}.`}spdT(t){const i=this.boof246;a.field.jr5(t.creatId).buff(i,i)}spmC(){this.faction="U",this.rarity="L",this.name="Shardplate Mutant",this.jr1=this.boof91421,this.jr2=this.jr1,this.tribe.push("IN"),this.hints=["OP"],this.text="At the start of your turn, randomly discard down to two cards in your hand."}spmT(t){const i=a.state.getPlayer(t.ownerPlayerA);if(i.hand.length>2){let e=i.hand.slice(),s=[];for(;e.length>2;)s.push(e.splice(a.randInt(0,e.length),1)[0]);i.discard.push(...s),i.hand=e}}tbaC(){this.faction="U",this.rarity="L",this.name="Talisin, Bard of Abundance",this.jr1=this.lValN([8,12,16]),this.jr2=this.lValN([10,14,20]),this.tribe.push("SY"),this.bothTurns=this.lValB([!0,!0,!1]),this.hints=["OL"],this.level===3&&(this.bonus={exist:this.ddp6()}),this.text=`At the start of ${this.bothTurns?"your":"each player's"} turn, ${this.bothTurns?"you":"that player"} may play an additional card.`}tbaT(t){a.state.gs.turn.regularPlays+=1}vgC(){this.faction="T",this.rarity="C",this.name="Volcanic Giant",this.jr1=this.boof51015,this.jr2=this.jr1,this.tribe.push("ER","GT"),this.hints=["OL"],this.bonus={exist:this.ddp9(0,0,0,this.boof3610)},this.text=`At the start of your turn, deals ${this.boof137} to ${this.boof5914-1} damage to the enemy player.`}vgT(t){const i=a.randInt(this.boof137,this.boof5914);a.player.ddf3(!t.ownerPlayerA,i,this.code)}woeC(){this.faction="N",this.rarity="L",this.name="Woebringer",this.jr1=this.lValN([7,10,18]),this.jr2=this.boof5815,this.tribe.push("AB"),this.text=`At the start of your turn, destroy the ${this.level===3?"enemy ":""}creature with the lowest attack. If there is a tie, one is chosen at random.`}woeT(t){const i=d.crTarg();this.level===3&&(i.player=a.player.toTarget(!t.ownerPlayerA));const e=a.field.creatByTarget(i);let s=99999,l=[];e.forEach(p=>{p.attack===s?l.push(p):p.attack0){const p=l[a.randInt(0,u)];a.death.destroy(p,this.code)}}zyxC(){this.faction="T",this.rarity="L",this.name="Zyx, Storm Herald",this.jr1=this.boof4712,this.jr2=this.lValN([6,9,20]),this.initMobile=1,this.tribe.push("LT","AS"),this.hints=["OL","ATH","LKV"],this.text="Zyx battles an additional time on your turn."}zyxT(t){const i=a.field.jr5(t.creatId);i.extraBattles+=1}}class ir extends E{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tuskin Sporelord",this.jr1=this.lValN([2,6,10]),this.jr2=this.lValN([10,14,18]),this.tribe.push("TK"),this.text=`Activate: Put a copy of friendly ${a.log.levelGateText(this.level,!0)}Plant into an available lane.`,this.bonus={exist:this.ddp6(this.level)/2}}canActivate(t){return this.emptySloots(t.id).length>0&&this.buddies(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{const e=a.field.jr5(i[1]);a.field.birthCreature(i[2],"P",e.owner,t.lane),e.endActivation()}}getCardActions(t,i){if(t.actionKey==="ACTV"){const e=i??a.field.jr5(t.param),s=this.buddies(e.id);return s.push(a.action.cancelAction()),s}else if(t.actionKey==="CARD"){const e=a.field.ddf6(t),s=a.deTil(t.param),l=this.emptySloots(s[1],e.code);return l.push(a.action.cancelAction()),l}return super.getCardActions(t,i)}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=t;return d.ddp4(t,e.playerA,e.lane,i[2])}}}emptySloots(t,i=""){const e=d.emptyPlayerActTarg("F","CARD",this.code,a.enTil("P2",t,i));return a.target.toActions(e)}buddies(t){const i=d.crFriendActTarg("CARD",this.code,a.enTil("P1",t));return i.tribe="PL",i.level=a.target.ddf2(this.level),a.target.toActions(i)}}class De extends Q{constructor(t){super(t),this.faction="A",t==="PRI"+"1"?(this.rarity="R",this.name="Perilous Insight",this.maxLevel=1,this.overload=!0):(this.rarity="C",this.name="Metasight",this.maxLevel=2,this.isFree=this.level===2),this.text="Discard and level up two cards."}playTargets(){const t=super.playTargets();return t.push(this.targParty("P1")),t}handleAction(t){if(t.positionthis.confC(),z:(e,s)=>this.confZ(e,s),e:(e,s,l)=>this.confE(e,s,l)},["CSG"]:{c:()=>this.cystgC(),z:(e,s)=>this.cystgZ(e,s),e:(e,s,l)=>this.cystgE(e,s,l)},["GRN"]:{c:()=>this.grenC(),z:(e,s)=>this.grenZ(e,s),e:(e,s,l)=>this.grenE(e,s,l)},["TWG"]:{c:()=>this.twstrC(),z:(e,s)=>this.twstrZ(e,s),e:(e,s,l)=>this.twstrE(e,s,l)}}[t]}cardCast(t,i,e){this.lookup(t).z(i,e)}playTarg;constructor(t){super(t),this.playTarg=d.crActTarg("CARD",this.code,""),this.lookup(this.cardCode()).c()}playTargets(){const t=super.playTargets();return this.playTarg.param="P1",this.playTarg.notMe="",a.field.creatByTarget(this.playTarg).length>1&&t.push(this.playTarg),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")a.action.ddf5(this.getCardActions(t));else{this.logSpell();const e=a.field.ddf6(t),s=a.field.jr5(i[1]);this.cardCast(this.cardCode(),s,e),a.turn.spellCast()}}getCardActions(t){const i=a.field.ddf6(t);return this.playTarg.notMe=i.id,this.playTarg.param=a.enTil("P2",i.id),a.target.toActions([this.playTarg,a.target.buttonTarget("CANC")])}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=a.field.ddf6(t),s=a.field.jr5(i[1]);return this.lookup(this.cardCode()).e(t,s,e)}}confC(){this.faction="T",this.rarity="C",this.name="Conflagrate",this.text=`Deal ${this.boof369} to two enemy creatures.`,this.playTarg.player="E"}confZ(t,i){const e=Date.now(),s=this.boof369;t.hurtDirect(s,this.code,e),i.hurtDirect(s,this.code,e)}confE(t,i,e){const s=this.boof369,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{dmg:s}),d.ddp1(e.owner,e.lane,{dmg:s})],l}cystgC(){this.faction="A",this.rarity="C",this.name="Cypien Steelgraft",this.text=`Two friendly creatures get Armor ${this.boof246}.`,this.playTarg.player="F",this.playTarg.canArmor=!0}cystgZ(t,i){const e=this.boof246;t.addArmor(e),i.addArmor(e)}cystgE(t,i,e){const s=this.boof246,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{arm:s}),d.ddp1(e.owner,e.lane,{arm:s})],l}grenC(){this.faction="N",this.rarity="C",this.name="Ghastly Renewal",this.text=`Give two friendly creatures Regenerate ${this.boof246}.`,this.playTarg.player="F",this.playTarg.canRegen=!0}grenZ(t,i){const e=this.boof246;t.addRegen(e),i.addRegen(e)}grenE(t,i,e){const s=this.boof246,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{rgn:s}),d.ddp1(e.owner,e.lane,{rgn:s})],l}get tsboof(){return this.level+2}twstrC(){this.faction="U",this.rarity="C",this.name="Twinstrength";const t=this.tsboof;this.text=`Two friendly creatures get ${a.log.jr9(t,t)}.`,this.playTarg.player="F"}twstrZ(t,i){const e=this.tsboof;t.buff(e,e),i.buff(e,e)}twstrE(t,i,e){const s=this.tsboof,l=d.actionEval(t,"ST");return l.vectors=[d.ddp1(i.owner,i.lane,{att:s,hlt:s}),d.ddp1(e.owner,e.lane,{att:s,hlt:s})],l}}class rr extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Umbruk Icecrusher",this.jr1=this.boof61014,this.jr2=this.boof246,this.tribe.push("DN"),this.hints=["OL","ALU","ATH","LKV"],this.bonus={exist:this.ddp9(0,5,this.jr1+2,0)},this.text=`When ${this.name} ${a.log.dbdtap()}, deal that much damage to that player.~Allied Uterra: This gets ${a.log.jr9(2,2,!0)}, and Breakthrough.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e.jr4("DM",this.code),e}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId}return!1}jr8(t){if(t.trigger.type==="FR"){if(a.turn.allied("U")){const i=a.field.jr5(t.creatId);i.breakthrough=!0,i.buff(2,2)}a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event;a.player.ddf3(i.target,i.dmg,this.code),a.batch.triggerDone()}}}class ar extends E{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Umbruk Lasher",this.jr1=this.boof71014,this.jr2=this.jr1-1,this.initBT=!0,this.tribe.push("DN"),this.hints=["OL","LKV","ATH","ALT"],this.text=`Allied Tempys: When ${this.name} ${a.log.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`,this.bonus={exist:this.ddp9(0,this.jr1,0,0)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("FR",this.code),e}handleAction(t){a.field.ddf6(t).hurtDirect(parseInt(t.param),this.code),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.creatureTarg&&i.creatureSrc&&i.source.id===t.creatId&&i.source.owner===a.state.ddf9()}return!1}jr8(t){if(t.trigger.type==="FR"){if(a.turn.allied("T")){const i=a.field.jr5(t.creatId),e=i.jr4("DM",this.code);e.interactive=!0,i.changed=!0}a.batch.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,e=a.target.toActions(d.crEnemyActTarg("CARD",this.code,i.dmg.toString()));e.length>0?(e.push(a.action.noneEndTrigger()),a.action.ddf5(e)):a.batch.triggerDone()}}ddf7(t){return d.ddp2(t,t.playerA,t.lane,{dmg:parseInt(t.param)})}}class se extends E{lookup(t){return{["CBB"]:{c:()=>this.cindC(),f:e=>this.cindF(e),e:e=>this.cindE(e)},["EBW"]:{c:()=>this.ebwC(),f:e=>this.ebwF(e),e:e=>this.ebwE(e)},["IBR"]:{c:()=>this.ibrfC(),f:e=>this.ibrfF(e),e:e=>this.ibrfE(e)},["SBI"]:{c:()=>this.sbiC(),f:e=>this.sbiF(e),e:e=>this.sbiE(e)}}[t]}targAction(t,i){this.lookup(t).f(i)}targEval(t,i){return this.lookup(t).e(i)}enemy=!1;ftext="";constructor(t){super(t),this.hints=[d.underHint(this.level)],this.lookup(this.cardCode()).c(),this.text=`Forge: If you are rank ${this.level+1} or higher, `+this.ftext,this.ftext=""}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}handleAction(t){const i=a.field.ddf6(t);this.targAction(this.cardCode(),i),a.action.actionDone(!0)}jr8(t){if(a.field.jr5(t.creatId).rank>this.level){const e=d.crActTarg("CARD",this.code,t.creatId);this.enemy&&(e.player="E");const s=a.target.toActions(e);s.length>0?a.action.ddf5(s):a.batch.triggerDone()}else a.batch.triggerDone()}ddf7(t){return this.targEval(this.cardCode(),t)}ebwC(){this.faction="N",this.rarity="C",this.name="Ebonbound Warlord",this.jr1=this.boof3714,this.jr2=this.jr1+4,this.tribe.push("VP"),this.hints.push("ENS"),this.enemy=!0;const t=this.boof369n;this.ftext=`give an enemy creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,-2*t,-t,0)}}ebwF(t){const i=this.boof369n;t.buff(i,i)}ebwE(t){const i=this.boof369n;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}sbiC(){this.faction="U",this.rarity="C",this.name="Shardbound Invoker",this.jr1=this.boof4714,this.jr2=this.jr1+1,this.tribe.push("TK");const t=this.boof359;this.ftext=`give a creature ${a.log.jr9(t,t)}.`,this.bonus={play:this.ddp9(0,t*2,t,0)}}sbiF(t){const i=this.boof359;t.buff(i,i)}sbiE(t){const i=this.boof359;return d.actionEvalBuffN(t,t.playerA,t.lane,i,i)}cindC(){this.faction="T",this.rarity="C",this.name="Cinderbound Barbarian",this.jr1=this.boof3612,this.jr2=this.jr1,this.tribe.push("FR","AS"),this.hints.push("ENS");const t=this.boof6912;this.enemy=!0,this.ftext=`deal ${t} damage to an enemy creature.`,this.bonus={play:this.ddp9(0,t,0,0)}}cindF(t){t.hurtDirect(this.boof6912,this.code)}cindE(t){return d.ddp2(t,t.playerA,t.lane,{dmg:this.boof6912})}ibrfC(){this.faction="A",this.rarity="C",this.name="Ironbound Reinforcements",this.jr1=this.lValN([3,6,8]),this.jr2=this.jr1*2,this.tribe.push("GN");const t=this.boof5812;this.ftext=`give a creature ${a.log.jr9(t,0)}.`,this.bonus={play:this.ddp9(0,t,t,0)}}ibrfF(t){t.buff(this.boof5812,0)}ibrfE(t){return d.actionEvalBuffN(t,t.playerA,t.lane,this.boof5812)}}class sr extends E{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Uranti Elementalist",this.jr1=this.boof4712,this.jr2=this.jr1-1,this.tribe.push("YT"),this.hints=["FRO","EMA"],this.text=`Forge: You may move another friendly creature to an available lane adjacent to ${this.name}.`,this.bonus={play:.7}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}jr8(t){const i=a.field.jr5(t.creatId);if(this.emptySloots(i).length>0){const e=d.crFriendNotMeActTarg("CARD",i.id,this.code,a.enTil("P1",i.id)),s=a.target.toActions(e);s.length>0?(s.push(a.action.noneEndTrigger()),a.action.ddf5(s)):a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){const i=a.deTil(t.param);i[0]==="P1"?a.action.ddf5(this.getCardActions(t)):(a.field.jr5(i[1]).move(t.lane),a.action.actionDone(!0))}emptySloots(t,i=""){return a.action.emptyAdjacents(t,a.enTil("P2",i))}getCardActions(t,i){const e=a.deTil(t.param),s=a.field.ddf6(t),l=a.field.jr5(e[1]),u=this.emptySloots(l,s.id);return u.push(a.action.cancelAction()),u}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=a.field.jr5(i[1]),l=d.ddp1(s.owner,s.lane);return l.moveTo=t.lane,e.vectors.push(l),e}}}class nr extends E{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Uranti Heartseeker",this.jr1=this.boof4915,this.jr2=this.jr1,this.initDefend=!0,this.tribe.push("YT"),this.text=`Activate: Deal ${this.jr1} damage to an enemy creature or player with exactly ${this.jr1} health.`}canActivate(t){return this.findVictims(t.id).length>0}startActivation(t){a.action.ddf5(this.getCardActions(d.ddf4(),t))}handleAction(t){if(t.zone==="F")a.field.ddf6(t).hurtDirect(this.jr1,this.code);else{const e=t;a.player.ddf3(e.playerA,this.jr1,this.code)}a.field.jr5(t.param).endActivation()}findVictims(t){const i=this.jr1,e=d.crEnemyTarg(),l=a.field.creatByTarget(e).filter(p=>p.health===i).map(p=>d.fieldSelectAction("CARD",p.lane,p.owner)),u=a.player.toPlayer("E");return u.health===i&&l.push(d.playerSelectAction("CARD",u.isPlayerA)),l.forEach(p=>{p.hostCard=this.code,p.param=t}),l}ddf7(t){if(t.actionKey==="ACTV")return d.ddp5(t);{const i=this.jr1,e=d.actionEval(t,"ST");if(t.zone==="P")e.vectors.push(d.evalVectorPlayerDmg(t.playerA,i)),e.bonus=9999;else{const s=t;e.vectors.push(d.ddp1(s.playerA,s.lane,{dmg:i}))}return e}}getCardActions(t,i){const e=i??a.field.jr5(t.param),s=this.findVictims(e.id);return s.push(a.action.cancelAction()),s}}class or extends E{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Vaerus, Herald of Fury",this.jr1=15,this.jr2=12,this.initMobile=2,this.tribe.push("DG"),this.hints=["OL","FRS"],this.text="Each friendly creature battles an additional time on each of your turns.",this.bonus={exist:this.ddp9(0,0,30,0)}}jr3(t,i){const e=super.jr3(t,i);return e.jr4("EF",this.code),e.jr4("TS",this.code),e}ddf8(t){if(t.event.code==="ENT"){const i=t.event;return t.ownerPlayerA===i.creature.owner&&t.ownerPlayerA===a.state.ddf9()}else if(t.event.code==="TRS")return t.event.playerA===t.ownerPlayerA;return!1}giveXtra(t,i){t.hasMod(i)||(t.extraBattles+=1,t.addMod(d.mod("TK",!0,i)))}jr8(t){if(t.event.code==="ENT"){const i=t.event;i.creature.id===t.creatId?a.field.ddf1().forEach(e=>{this.giveXtra(e,t.creatId)}):at.itBirthedFirst(i.creature.id,t.creatId)&&this.giveXtra(i.creature,t.creatId)}else t.event.code==="TRS"&&a.field.ddf1().forEach(i=>{i.extraBattles+=1,i.hasMod(t.creatId)||i.addMod(d.mod("TK",!0,t.creatId))});a.batch.triggerDone()}}class F extends E{constructor(t){super(t),this.cardConstruct(this.cardCode())}cardConstruct(t){({["AEN"]:()=>this.anvenf(),["AGU"]:()=>this.avguard(),["BTH"]:()=>this.batthid(),["BBB"]:()=>this.bart(),["BLW"]:()=>this.blitwi(),["BWG"]:()=>this.brambleguard(),["CHY"]:()=>this.cavernhyd(),["CDC"]:()=>this.cindcol(),["CNM"]:()=>this.cindmy(),["CTG"]:()=>this.citg(),["CWK"]:()=>this.crag(),["DBP"]:()=>this.prowler(),["DMR"]:()=>this.raptor(),["DBR"]:()=>this.bearride(),["DTD"]:()=>this.dmaw(),["DSZ"]:()=>this.duskzomb(),["FWB"]:()=>this.fangbear(),["FWR"]:()=>this.ravager(),["FFG"]:()=>this.ffang(),["FMS"]:()=>this.firemane(),["FPR"]:()=>this.flop(),["FGA"]:()=>this.falpha(),["FGB"]:()=>this.fbeta(),["FGO"]:()=>this.fomega(),["FPM"]:()=>this.minot(),["FPS"]:()=>this.forgeplate(),["GGE"]:()=>this.geist(),["GGH"]:()=>this.ghast(),["GGS"]:()=>this.ggs(),["GCL"]:()=>this.glacial(),["IWC"]:()=>this.warcharger(),["LWY"]:()=>this.lwyrm(),["LHY"]:()=>this.lyshyd(),["KDC"]:()=>this.kadc(),["MRF"]:()=>this.marrow(),["MMI"]:()=>this.mmin(),["MMO"]:()=>this.mmop(),["NGW"]:()=>this.narg(),["NCW"]:()=>this.necrotic(),["NXC"]:()=>this.nexcore(),["NAM"]:()=>this.nyam(),["OBD"]:()=>this.battledroid(),["OSP"]:()=>this.oss(),["OSL"]:()=>this.ogsl(),["PRG"]:()=>this.perd(),["RHY"]:()=>this.ravh(),["RHC"]:()=>this.rime(),["RSP"]:()=>this.runprim(),["SCS"]:()=>this.scorp(),["SCD"]:()=>this.scout(),["SFT"]:()=>this.scrap(),["SBA"]:()=>this.sparkblade(),["SKB"]:()=>this.sparkbot(),["SBR"]:()=>this.sparkass(),["STM"]:()=>this.sparkman(),["SSN"]:()=>this.sfsent(),["SGI"]:()=>this.stonefist(),["SCL"]:()=>this.stormcall(),["SML"]:()=>this.lurker(),["TGS"]:()=>this.tsprout(),["TGN"]:()=>this.tgnome(),["TWS"]:()=>this.tscout(),["TWT"]:()=>this.tund(),["URD"]:()=>this.unrelenting(),["VBK"]:()=>this.vblock(),["VTC"]:()=>this.vtech(),["WTW"]:()=>this.waterwalk(),["WPD"]:()=>this.windprime(),["XCR"]:()=>this.xithcrush(),["XHU"]:()=>this.hulk(),["YWC"]:()=>this.yetiwar(),["ZIN"]:()=>this.zombinf()})[t]()}sist(){this.rarity="R",this.level===1?this.hints=["LV"]:this.consistent=!0}anvenf(){this.faction="A",this.rarity="C",this.name="Anvillon Enforcer",this.jr1=this.boof5711,this.jr2=this.jr1-1,this.initArmor=this.boof246,this.tribe.push("RB")}avguard(){this.faction="T",this.rarity="R",this.name="Avalanche Guardian",this.jr1=this.boof5915,this.jr2=this.lValN([8,15,23]),this.initMobile=1,this.initDefend=!0,this.tribe.push("IC","EL")}bart(){this.faction="U",this.name="Big Bad Bartok",this.jr1=this.level+8,this.jr2=this.jr1,this.consistent=!0,this.hints=["DL"],this.tribe.push("TG")}batthid(){this.faction="U",this.name="Batterhide",this.jr1=this.boof3814,this.jr2=this.jr1+3,this.sist(),this.initBT=!0,this.tribe.push("DN")}battledroid(){this.faction="A",this.rarity="H",this.name="Oreian Battledroid",this.jr1=this.lValN([5,7,17]),this.jr2=1,this.initArmor=this.jr1,this.tribe.push("RB")}bearride(){this.faction="U",this.rarity="C",this.name="Deepwood Bear Rider",this.jr1=this.lValN([5,16,18]),this.jr2=this.lValN([2,8,10]),this.tribe.push("LP")}blitwi(){this.faction="N",this.name="Blight Witch",this.jr1=this.lValN([2,5,9]),this.jr2=this.boof71117,this.sist(),this.initRegen=this.boof234,this.tribe.push("ZB")}brambleguard(){this.faction="U",this.rarity="C",this.name="Bramblewood Guardian",this.jr1=this.boof2612,this.jr2=this.lValN([9,14,24]),this.tribe.push("PL")}cavernhyd(){this.faction="U",this.rarity="C",this.name="Cavern Hydra",this.jr1=this.boof4711,this.jr2=this.boof71015,this.initRegen=this.boof135,this.tribe.push("HY")}cindcol(){this.faction="T",this.rarity="C",this.name="Cinder Colossus",this.jr1=this.lValN([3,13,24]),this.jr2=this.lValN([4,14,27]),this.initDefend=!0,this.level===1&&(this.hints=["LV"]),this.tribe.push("ER","EL")}cindmy(){this.faction="T",this.rarity="C",this.name="Cinder Mystic",this.jr1=this.lValN([4,11,21]),this.jr2=this.boof3714,this.tribe.push("FR","AS")}citg(){this.faction="A",this.rarity="C",this.name="Citadel Guard",this.jr1=this.lValN([8,12,25]),this.jr2=this.lValN([9,13,30]),this.initDefend=!0,this.tribe.push("RB")}crag(){this.faction="T",this.rarity="C",this.name="Crag Walker",this.jr1=this.lValN([7,12,18]),this.jr2=this.boof246,this.initMobile=1,this.tribe.push("DN")}dmaw(){this.faction="N",this.rarity="L",this.name="Duskmaw, Twilight Drake",this.jr1=this.boof61017,this.jr2=this.boof5915,this.initMobile=1,this.tribe.push("ST","DG")}duskzomb(){this.faction="N",this.rarity="C",this.name="Duskspire Zombie",this.jr1=this.lValN([2,5,16]),this.jr2=this.lValN([5,8,19]),this.initRegen=4,this.tribe.push("ZB")}falpha(){this.faction="A",this.rarity="C",this.name="Forge Guardian Alpha",this.jr1=this.lValN([4,8,20]),this.jr2=this.lValN([8,14,26]),this.initDefend=!0,this.tribe.push("RB","GD")}fangbear(){this.faction="U",this.rarity="C",this.name="Fangwood Bear",this.jr1=this.boof61016,this.jr2=this.jr1,this.tribe.push("BR")}fbeta(){this.faction="A",this.rarity="R",this.name="Forge Guardian Beta",this.jr1=this.lValN([5,8,20]),this.jr2=this.lValN([3,6,18]),this.initArmor=this.boof124,this.tribe.push("RB","GD")}ffang(){this.faction="U",this.rarity="C",this.name="Featherfang",this.jr1=this.boof61218,this.jr2=this.boof4812,this.tribe.push("DN")}firemane(){this.faction="T",this.rarity="C",this.name="Firemane Steed",this.jr1=this.lValN([3,6,16]),this.jr2=this.lValN([6,9,19]),this.initMobile=2,this.tribe.push("FR","EL")}flop(){this.faction="T",this.rarity="C",this.name="Flowstone Primordial",this.jr1=this.lValN([6,7,15]),this.jr2=this.jr1+1,this.tribe.push("FR","EL")}fomega(){this.faction="A",this.rarity="L",this.name="Forge Guardian Omega",this.jr1=this.boof255080,this.jr2=this.jr1,this.initMobile=this.boof124,this.initArmor=this.initMobile*10,this.initBT=!0,this.initAggro=!0,this.consistent=!0,this.tribe.push("RB","GD")}forgeplate(){this.faction="A",this.rarity="C",this.name="Forgeplate Sentry",this.jr1=this.boof4915,this.jr2=this.jr1,this.initArmor=this.boof135,this.tribe.push("RB")}ggs(){this.faction="N",this.rarity="C",this.name="Grimgaunt Spectre",this.jr1=this.lValN([3,11,14]),this.jr2=this.jr1,this.initMobile=1,this.hints=["LV"],this.tribe.push("GG")}geist(){this.faction="N",this.rarity="C",this.name="Grave Geist",this.jr1=this.boof71118,this.jr2=this.boof4711,this.tribe.push("ST")}ghast(){this.faction="N",this.rarity="C",this.name="Grave Ghast",this.jr2=this.boof71013,this.jr1=this.jr2-2,this.initRegen=this.boof246,this.tribe.push("ZB")}glacial(){this.faction="T",this.rarity="C",this.name="Glacial Colossus",this.jr1=this.boof61016,this.jr2=this.lValN([8,13,19]),this.tribe.push("IC","EL"),this.initDefend=!0}hulk(){this.faction="N",this.rarity="C",this.name="Xithian Hulk",this.jr1=this.boof4814,this.jr2=this.jr1+3,this.tribe.push("AB")}kadc(){this.faction="T",this.rarity="C",this.name="Kadras Colossus",this.jr1=this.lValN([6,11,13]),this.jr2=this.jr1,this.tribe.push("GT"),this.hints=["DL"]}lurker(){this.faction="U",this.rarity="C",this.name="Swampmoss Lurker",this.jr1=this.lValN([8,13,22]),this.jr2=this.lValN([4,6,15]),this.tribe.push("DN")}lwyrm(){this.faction="T",this.rarity="C",this.name="Lightning Wyrm",this.jr1=this.boof4711,this.jr2=this.boof258,this.tribe.push("LT","EL"),this.initAggro=!0}lyshyd(){this.faction="U",this.rarity="C",this.name="Lysian Hydra",this.jr1=this.boof5914,this.jr2=this.jr1+1,this.initRegen=this.level,this.tribe.push("HY")}marrow(){this.faction="N",this.rarity="C",this.name="Marrow Fiend",this.jr1=this.boof81117,this.jr2=this.lValN([1,5,13]),this.tribe.push("SK")}minot(){this.faction="A",this.name="Forgeplate Minotaur",this.jr1=this.lValN([2,8,16]),this.jr2=this.lValN([4,9,17]),this.sist(),this.initArmor=this.level,this.tribe.push("RB")}mmin(){this.faction="A",this.rarity="C",this.name="Metamind Infiltrator",this.jr1=this.boof5917,this.jr2=this.jr1-1,this.tribe.push("MM")}mmop(){this.faction="A",this.rarity="C",this.name="Metamind Operator",this.jr1=this.boof4610,this.jr2=this.lValN([10,14,18]),this.tribe.push("MM")}narg(){this.faction="T",this.rarity="C",this.name="Nargath Warrior",this.jr1=this.boof51014,this.jr2=this.jr1+1,this.tribe.push("ER","AS")}necrotic(){this.faction="N",this.rarity="C",this.name="Necrotic Wurm",this.jr1=this.lValN([4,7,18]),this.jr2=this.lValN([5,8,19]),this.tribe.push("WR")}nexcore(){this.faction="A",this.rarity="C",this.name="Nexus Core",this.jr1=0,this.jr2=this.lValN([15,25,40]),this.tribe.push("RB"),this.initDefend=!0}nyam(){this.faction="N",this.rarity="C",this.name="Nyrali Ambusher",this.jr1=this.boof71117,this.jr2=this.lValN([3,6,13]),this.tribe.push("OZ")}ogsl(){this.faction="U",this.rarity="C",this.name="Overgrown Spineleaf",this.jr1=this.lValN([6,12,16]),this.jr2=this.boof4812,this.tribe.push("PL")}oss(){this.faction="N",this.rarity="R",this.name="Ossuary Spirit",this.jr1=this.lValN([1,3,6]),this.jr2=this.boof91420,this.initRegen=this.jr1+2,this.tribe.push("ST")}perd(){this.faction="N",this.rarity="C",this.name="Perdition Guard",this.jr1=this.lValN([3,12,15]),this.jr2=this.jr1-1,this.tribe.push("NG")}prowler(){this.faction="U",this.rarity="C",this.name="Deepbranch Prowler",this.jr1=this.lValN([8,9,10]),this.jr2=this.jr1,this.tribe.push("CT"),this.hints=["DL"],this.initBT=!0}raptor(){this.faction="U",this.rarity="C",this.name="Deepmoss Raptor",this.jr1=this.lValN([2,13,16]),this.jr2=this.jr1,this.hints=["LV","ST"],this.tribe.push("DN")}ravager(){this.faction="U",this.rarity="C",this.name="Fangwood Ravager",this.jr1=this.boof5917,this.jr2=this.jr1,this.tribe.push("BE")}ravh(){this.faction="U",this.rarity="C",this.name="Ravenous Hydra",this.jr1=this.boof5813,this.jr2=this.jr1+this.level,this.initRegen=this.level,this.initBT=!0,this.tribe.push("HY")}rime(){this.faction="T",this.rarity="C",this.name="Rimehorn Charger",this.jr1=this.lValN([5,8,10]),this.jr2=this.jr1+3,this.initMobile=1,this.hints=["DL"],this.tribe.push("RM")}runprim(){this.faction="T",this.name="Runestorm Primordial",this.jr1=this.boof3714,this.jr2=this.jr1-1,this.sist(),this.initAggro=!0,this.tribe.push("LT","EL")}scorp(){this.faction="N",this.rarity="C",this.name="Scavenger Scorpion",this.jr1=this.lValN([6,9,11]),this.jr2=this.jr1,this.initRegen=this.level,this.hints=["DL"],this.tribe.push("AB")}scout(){this.faction="A",this.rarity="H",this.name="Scout Drone",this.jr1=this.boof246,this.jr2=this.jr1,this.isFree=this.level>1,this.hints=[this.level===1?"LV":"DL"],this.tribe.push("RB")}scrap(){this.faction="A",this.rarity="H",this.name="Scrapforge Titan",this.jr1=this.lValN([1,5,20]),this.jr2=this.jr1,this.initArmor=this.lValN([1,5,10]),this.level===1&&(this.hints=["LV","ST"],this.bonus={play:1}),this.tribe.push("RB")}sfsent(){this.faction="A",this.rarity="C",this.name="Spiritforge Sentinel",this.jr1=this.lValN([3,6,9]),this.jr2=this.jr1*2,this.initArmor=this.lValN([1,2,6]),this.tribe.push("RB")}sparkbot(){this.faction="A",this.rarity="C",this.name="Spark Bot",this.jr1=this.boof5914,this.jr2=this.lValN([6,11,16]),this.tribe.push("RB")}sparkblade(){this.faction="A",this.rarity="C",this.name="Sparkblade Assassin",this.jr1=this.lValN([4,12,14]),this.jr2=this.lValN([5,13,15]),this.tribe.push("HM")}sparkass(){this.faction="T",this.rarity="C",this.name="Sparkbrand Asir",this.jr1=this.lValN([2,7,9]),this.jr2=this.lValN([6,11,13]),this.initAggro=!0,this.tribe.push("LT","AS")}sparkman(){this.faction="T",this.rarity="R",this.name="Sparktail Manticore",this.jr1=this.boof369,this.jr2=this.boof71116,this.initAggro=!0,this.initMobile=1,this.tribe.push("MT")}stonefist(){this.faction="T",this.rarity="C",this.name="Stonefist Giant",this.jr1=this.lValN([3,7,16]),this.jr2=this.lValN([6,10,24]),this.tribe.push("ER","EL")}stormcall(){this.faction="T",this.rarity="C",this.name="Storm Caller",this.jr1=this.lValN([8,11,14]),this.jr2=this.jr1-2,this.tribe.push("WN","AS")}tgnome(){this.faction="A",this.rarity="C",this.name="Technognome",this.jr1=this.lValN([3,9,19]),this.jr2=this.jr1,this.level===1&&(this.hints=["LV"]),this.tribe.push("GN")}tscout(){this.faction="A",this.rarity="C",this.name="Tower Scout",this.jr1=this.boof5915,this.jr2=this.jr1,this.initMobile=1,this.tribe.push("HM")}tund(){this.faction="A",this.rarity="C",this.name="Tundra Watcher",this.jr1=this.lValN([5,10,12]),this.jr2=this.lValN([8,11,13]),this.hints=["DL"],this.tribe.push("RB")}tsprout(){this.faction="U",this.rarity="C",this.name="Tanglesprout",this.jr1=this.boof7911,this.jr2=this.jr1+1,this.hints=["DL"],this.tribe.push("PL")}unrelenting(){this.faction="N",this.rarity="H",this.name="Unrelenting Dead",this.jr1=this.boof4814,this.jr2=this.jr1,this.initRegen=this.jr1,this.tribe.push("ZB")}vblock(){this.faction="A",this.rarity="R",this.name="Vault Blockade",this.jr1=0,this.jr2=this.boof135,this.initArmor=this.boof101520,this.initDefend=!0,this.tribe.push("RB")}vtech(){this.faction="A",this.rarity="C",this.name="Vault Technician",this.jr1=this.boof61218,this.jr2=this.lValN([3,9,15]),this.tribe.push("HM")}warcharger(){this.faction="A",this.rarity="C",this.name="Ionic Warcharger",this.jr1=this.boof4915,this.jr2=this.lValN([7,12,18]),this.initMobile=1,this.tribe.push("RB")}waterwalk(){this.faction="T",this.rarity="C",this.name="Water Walker",this.jr1=this.lValN([5,12,14]),this.jr2=this.lValN([2,9,11]),this.tribe.push("IC","AS")}windprime(){this.faction="T",this.rarity="C",this.name="Wind Primordial",this.jr2=this.boof4814,this.jr1=this.jr2+2,this.initMobile=this.level,this.tribe.push("WN","EL")}xithcrush(){this.faction="N",this.rarity="C",this.name="Xithian Crusher",this.jr1=this.lValN([4,10,16]),this.jr2=this.jr1+2,this.tribe.push("AB")}yetiwar(){this.faction="T",this.rarity="C",this.name="Yeti Warcaller",this.jr1=this.boof248,this.jr2=this.lValN([10,15,23]),this.tribe.push("YT")}zombinf(){this.faction="N",this.rarity="C",this.name="Zombie Infantry",this.jr1=this.boof61015,this.jr2=this.jr1-1,this.tribe.push("ZB")}}class hr extends Q{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Varna's Pact";const i=this.lValS(["a","two","three"]),e=this.level===1?"":"s",s=this.level===1?"was":"were";this.text=`Put ${i} random creature${e} that ${s} destroyed this game into ${i} lane${e}.`}playTargets(){const t=super.playTargets();return t.push(this.fieldTarget("P1",[])),t}handleAction(t){const i=a.deTil(t.param);if(i[0]==="P1")this.level===1?this.endSpell([t.lane],t.playerA):a.action.ddf5(this.getCardActions(t));else if(i[0]==="P2"){const e=[t.lane,parseInt(i[1])];this.level===2?this.endSpell(e,t.playerA):a.action.ddf5(this.getCardActions(t))}else this.endSpell([t.lane,parseInt(i[1]),parseInt(i[2])],t.playerA)}endSpell(t,i){this.logSpell();const e=Date.now();t.forEach(s=>{const l=a.death.gravedigger();l&&a.field.birthCreature(l,"R",i,s,e)}),a.turn.spellCast()}fieldTarget(t,i){const e=d.actionTarget("TF","CARD",this.code,a.enTil(t,...i));return e.player="F",e.lanes=a.field.laneIdx.filter(s=>!i.includes(s)),e}getCardActions(t,i){const e=a.deTil(t.param);let s;if(e[0]==="P1")s=this.fieldTarget("P2",[t.lane]);else{const l=[t.lane,parseInt(e[1])];s=this.fieldTarget("P3",l)}return a.target.toActions(s)}ddf7(t){const e=a.deTil(t.param)[0],s=d.ddp4(t,t.playerA,t.lane,`${"XHU"}1`);return s.final=this.level===1&&e==="P1"||this.level===2&&e==="P2"||this.level===3&&e==="P3",s.hints=["RE"],s}}class lr extends Kt{jr3(t,i){const e=super.jr3(t,i);return e.jr4("LG",this.code),e}ddf8(t){const i=t.event;return t.trigger.type==="LG"&&t.ownerPlayerA===i.playerA}jr8(t){const i=t.event,e=this.boof124*i.healAmt;a.field.jr5(t.creatId).buff(e,e),a.batch.triggerDone()}}class cr extends E{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Wildwood Sower",this.jr1=this.boof3612,this.jr2=this.lValN([6,11,18]),this.tribe.push("HM"),this.hints=["EMO"];const i=B.minionBuff(this.level);this.text=`When you play a spell, you may put a ${i}/${i} ${B.minionName(this.level)} into an available lane.`,this.bonus={exist:this.ddp9(1,i*2,i,0)*.5}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("PC",this.code);return s.interactive=!0,e}handleAction(t){a.field.birthCreature(B.minionCode(this.level),"P",t.playerA,t.lane),a.action.actionDone(!0)}ddf8(t){if(t.trigger.type==="PC"){const i=t.event;return i.playerA===t.ownerPlayerA&&a.cards.getCard(i.cardCode).type==="S"}return!1}jr8(t){const i=d.emptyPlayerActTarg("F","CARD",this.code,""),e=a.target.toActions(i);e.length===0?a.batch.triggerDone():(e.push(a.action.noneEndTrigger()),a.action.ddf5(e))}ddf7(t){return d.ddp4(t,t.playerA,t.lane,B.minionCode(this.level))}}class dr extends E{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Windcaller Shaman",this.jr1=this.boof3713,this.jr2=this.jr1+4,this.tribe.push("WN","AS"),this.hints=["FRO","EMA"],this.text=`Forge: You may move another friendly ${a.log.levelGateText(this.level,!0)}creature to an available lane adjacent to ${this.name}.`,this.bonus={play:this.lValN([.25,.5,1])}}jr3(t,i){const e=super.jr3(t,i),s=e.jr4("FR",this.code);return s.interactive=!0,e}jr8(t){const i=a.field.jr5(t.creatId);if(this.emptySloots(i).length>0){const e=d.crFriendNotMeActTarg("CARD",i.id,this.code,a.enTil("P1",i.id));e.level=a.target.ddf2(this.level);const s=a.target.toActions(e);s.length>0?(s.push(a.action.noneEndTrigger()),a.action.ddf5(s)):a.batch.triggerDone()}else a.batch.triggerDone()}handleAction(t){const i=a.deTil(t.param);i[0]==="P1"?a.action.ddf5(this.getCardActions(t)):(a.field.jr5(i[1]).move(t.lane),a.action.actionDone(!0))}emptySloots(t,i=""){return a.action.emptyAdjacents(t,a.enTil("P2",i))}getCardActions(t,i){const e=a.deTil(t.param),s=a.field.ddf6(t),l=a.field.jr5(e[1]),u=this.emptySloots(l,s.id);return u.push(a.action.cancelAction()),u}ddf7(t){const i=a.deTil(t.param);if(i[0]==="P1")return d.ddp5(t);{const e=d.actionEval(t,"ST"),s=a.field.jr5(i[1]),l=d.ddp1(s.owner,s.lane);return l.moveTo=t.lane,e.vectors.push(l),e}}}class ur extends E{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Xithian Rotfiend",this.jr1=this.lValN([7,12,20]),this.jr2=this.jr1+1,this.tribe.push("AB"),this.hints=["OL"];const i=-this.boof135;this.text=`When ${this.name} becomes opposed, it gets ${a.log.jr9(i,i)}.`}jr3(t,i){const e=super.jr3(t,i);return e.jr4("EF",this.code),e.jr4("MV",this.code),e}ddf8(t){if(t.trigger.type==="EF"||t.trigger.type==="MV"){const i=t.event;return t.trigger.creatId===i.creature.id&&t.trigger.type==="MV"||i.creature.owner!==t.ownerPlayerA}return!1}jr8(t){let i=!1;const e=a.field.jr5(t.creatId),s=t.event;if((e.id===s.creature.id&&e.opposed||s.creature.lane===a.field.oppositeLane(e.lane))&&(i=!0),i){const l=-this.boof135;e.buff(l,l)}a.batch.triggerDone()}}class fr extends E{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Zombie Titan",this.jr1=this.boof4712,this.jr2=this.jr1,this.tribe.push("ZB");const i=this.boof234;this.text=`While ${this.name} is in a side lane, it gets ${a.log.jr9(i,i,!0)} and Regenerate ${this.level}.`,this.bonus={play:this.ddp9(0,i*2+this.level,i,0)},this.hints=["SL"]}jr3(t,i){const e=super.jr3(t,i),s=e.addEffect("PS",this.code);return s.area="C",e}enforceEffect(t,i){if(i.lane===1||i.lane===5){const e=this.boof234;[d.mod("AT",e,i.id),d.mod("HL",e,i.id),d.mod("MH",e,i.id),d.mod("RG",this.level,i.id)].forEach(l=>{i.addModSafe(l)})}else i.removeModSafe(i.id)}}class gr{cardCache={};mapper={["AAK"]:We,["ABB"]:ze,["AGC"]:_,["AGK"]:H,["AGP"]:K,["AGW"]:P,["ASG"]:P,["AFO"]:qt,["ATG"]:Ct,["ART"]:Ct,["ATP"]:Qt,["AGM"]:It,["ALG"]:Yt,["AHL"]:hi,["ALS"]:Yt,["ATZ"]:P,["ARB"]:Ct,["AEN"]:F,["APM"]:Ze,["AQE"]:P,["AGD"]:Ke,["AFS"]:Lt,["ABR"]:yt,["AFR"]:H,["AMY"]:yt,["ABL"]:P,["ATT"]:at,["AGU"]:F,["AIV"]:ft,["BTH"]:F,["BTI"]:_,["BTN"]:Yt,["BBB"]:F,["BLH"]:Ct,["BSP"]:ft,["BWK"]:It,["BLW"]:F,["BSR"]:_,["BMY"]:Ye,["BSW"]:W,["BWW"]:_t,["BTM"]:P,["BOS"]:B,["BAW"]:_,["BWG"]:F,["BTR"]:H,["BWD"]:Xt,["BSG"]:qe,["BSS"]:H,["BTS"]:Xt,["BST"]:zt,["BWT"]:Xe,["BRF"]:It,["BWH"]:je,["BRN"]:Wt,["BZD"]:H,["BFM"]:H,["BSM"]:Je,["CDT"]:It,["CMF"]:ce,["CTL"]:K,["CCS"]:W,["CHY"]:F,["CHV"]:Qe,["CRS"]:qt,["COD"]:K,["CTI"]:H,["CHA"]:_,["CHH"]:H,["CHR"]:te,["CBB"]:se,["CDC"]:F,["CFB"]:yt,["CNM"]:F,["CSW"]:H,["CTG"]:F,["CCT"]:de,["CFG"]:ae,["CGF"]:st,["CGL"]:W,["CSU"]:P,["CCR"]:_,["CSB"]:st,["CWK"]:F,["CRC"]:ft,["CYC"]:Ct,["COZ"]:B,["CYS"]:st,["CTW"]:P,["CTV"]:P,["CAG"]:P,["CBS"]:P,["CIN"]:Kt,["CSH"]:W,["CSG"]:ae,["DFR"]:H,["DHW"]:Ct,["DSS"]:re,["DCR"]:K,["DSK"]:st,["DBA"]:H,["DBP"]:F,["DMR"]:F,["DBR"]:F,["DCS"]:bt,["DGZ"]:K,["DNK"]:ti,["DBN"]:H,["DDS"]:ei,["DIS"]:Gt,["DSV"]:ii,["DDD"]:H,["DZA"]:B,["DZD"]:te,["DBT"]:P,["DFB"]:mt,["DMW"]:Lt,["DCH"]:Gt,["DTD"]:F,["DSZ"]:F,["DYB"]:P,["DBQ"]:ri,["DYS"]:ai,["DYL"]:si,["EBW"]:se,["ESK"]:ft,["EHW"]:ni,["ETN"]:P,["EWE"]:ee,["ENP"]:P,["ESU"]:Gt,["ENR"]:P,["EPD"]:K,["EPH"]:li,["EPS"]:yt,["ESG"]:ci,["ESC"]:Xt,["ESP"]:di,["EWT"]:H,["EHN"]:Xt,["EFM"]:yt,["EFP"]:ui,["EXD"]:P,["FWB"]:F,["FWR"]:F,["FFG"]:F,["FST"]:st,["FWK"]:st,["FIN"]:P,["FRR"]:K,["FVA"]:P,["FWG"]:B,["FWC"]:ft,["FFU"]:W,["FLH"]:ce,["FMS"]:F,["FSM"]:K,["FBC"]:yt,["FBI"]:Ct,["FFS"]:W,["FLN"]:P,["FRI"]:_,["FSS"]:re,["FLS"]:Ct,["FSH"]:W,["FFD"]:st,["FRV"]:_,["FSP"]:at,["FPR"]:F,["FFL"]:P,["FGA"]:F,["FGB"]:F,["FGD"]:at,["FGG"]:Lt,["FGO"]:F,["FOL"]:qt,["FPM"]:F,["FPS"]:F,["FFM"]:ee,["FMD"]:fi,["FME"]:ft,["FSK"]:gi,["FWT"]:H,["FZS"]:P,["FUN"]:B,["GOS"]:mi,["GHS"]:Lt,["GHB"]:de,["GHR"]:pi,["GRN"]:ae,["GTH"]:P,["GSC"]:It,["GMP"]:bt,["GTT"]:yi,["GCL"]:F,["GCR"]:P,["GLF"]:_,["GRW"]:_,["GSW"]:H,["GVS"]:st,["GSS"]:H,["GBG"]:st,["GGE"]:F,["GGH"]:F,["GRP"]:bi,["GGD"]:mt,["GGR"]:mt,["GGP"]:mt,["GGS"]:F,["GRM"]:K,["GHT"]:_,["GMR"]:st,["HMF"]:at,["HTR"]:_t,["HAR"]:P,["HFA"]:Jt,["HOD"]:at,["HWM"]:Kt,["HOX"]:Gt,["HGS"]:vi,["HTP"]:Ai,["IBF"]:K,["ITO"]:Gt,["IVS"]:K,["IWC"]:F,["IHA"]:It,["IBR"]:se,["IMD"]:te,["IMA"]:H,["IZL"]:ki,["IZR"]:Ti,["IZK"]:Ct,["IFL"]:Wt,["IFR"]:P,["JPK"]:P,["KDC"]:F,["KAW"]:Ct,["KOD"]:W,["KIW"]:Ci,["KTS"]:ie,["KKK"]:_t,["LOD"]:K,["LFA"]:Si,["LKP"]:wi,["LGT"]:H,["LBR"]:P,["LSK"]:Wt,["LWY"]:F,["LBD"]:H,["LSS"]:re,["LBL"]:bt,["LSP"]:Kt,["LUC"]:ee,["LMV"]:H,["LHY"]:F,["LYR"]:Wt,["LYS"]:P,["MMH"]:_,["MRF"]:F,["MOE"]:H,["MXW"]:_,["MSP"]:Gt,["MMA"]:H,["MMX"]:st,["MMI"]:F,["MMO"]:F,["MMV"]:ft,["MPH"]:P,["MSC"]:P,["MTS"]:De,["MTT"]:Ei,["MML"]:Di,["MMW"]:xi,["MDE"]:we,["MBP"]:W,["MND"]:W,["NNS"]:P,["NGB"]:_,["NGW"]:F,["NSL"]:P,["NCF"]:P,["NCS"]:W,["NCW"]:F,["NCV"]:P,["NSW"]:Fi,["NDR"]:Pi,["NEM"]:Gt,["NSH"]:K,["NXA"]:Bi,["NXC"]:F,["NXG"]:W,["NXP"]:Se,["NXT"]:Yt,["NGT"]:mt,["NGQ"]:Ni,["NSD"]:B,["NCL"]:K,["NFF"]:W,["NAM"]:F,["NOZ"]:st,["NSY"]:H,["ONN"]:Hi,["OXA"]:Mi,["OXM"]:H,["OXP"]:Ri,["OOZ"]:B,["OBB"]:Li,["OEX"]:P,["OWH"]:Ii,["OBD"]:F,["OFM"]:H,["OJC"]:at,["OPK"]:H,["OSV"]:zt,["OWW"]:Lt,["OHV"]:W,["ODC"]:Gi,["OSP"]:F,["OSL"]:F,["OWF"]:K,["OXS"]:$i,["PHM"]:H,["PPM"]:W,["PSM"]:H,["PLW"]:K,["PRG"]:F,["PRI"]:De,["PHS"]:_,["PTB"]:K,["PSC"]:W,["PSH"]:ft,["PTR"]:P,["PSG"]:P,["PMS"]:P,["POX"]:st,["PYG"]:de,["PYS"]:K,["RBH"]:Vi,["ROK"]:K,["RPT"]:B,["RHY"]:F,["RTS"]:yt,["RHU"]:zt,["RSC"]:ie,["RLW"]:at,["RFL"]:Oi,["RHC"]:F,["ROG"]:P,["RWC"]:Xt,["RFA"]:Jt,["RSE"]:Ui,["RBG"]:fe,["RGG"]:ft,["RSZ"]:st,["RSP"]:F,["RHW"]:at,["SBF"]:bt,["SAP"]:P,["SPL"]:B,["SVO"]:P,["SSE"]:bt,["SXP"]:B,["SXD"]:B,["SXT"]:B,["STS"]:K,["SCS"]:F,["SMD"]:H,["SFS"]:Wi,["SCD"]:F,["SFT"]:F,["SOC"]:P,["SOA"]:P,["SOD"]:P,["SOK"]:Wt,["SOT"]:P,["SDL"]:B,["SAD"]:zi,["SHG"]:P,["SBI"]:se,["SCC"]:ie,["SPD"]:bt,["SPM"]:bt,["STD"]:_,["SHS"]:It,["SGF"]:W,["SKG"]:Se,["SSR"]:ft,["SNB"]:P,["SNP"]:K,["SRD"]:K,["SSH"]:Qt,["SRM"]:W,["SRH"]:mt,["SDN"]:H,["SHV"]:P,["SRP"]:P,["SGG"]:H,["SBA"]:F,["SKB"]:F,["SBR"]:F,["SKS"]:zt,["STM"]:F,["SBD"]:H,["SCV"]:Zi,["SFM"]:st,["SSN"]:F,["SSM"]:ft,["SLH"]:Ki,["SPN"]:B,["SSI"]:Kt,["SND"]:ie,["SRV"]:fe,["STR"]:P,["SPU"]:B,["XYR"]:B,["SPH"]:Yi,["SSA"]:W,["STO"]:P,["SDR"]:at,["SOL"]:Ee,["SOV"]:P,["SHK"]:Wt,["SWR"]:Xi,["SER"]:qi,["SFA"]:Jt,["STG"]:ji,["SSS"]:re,["SSK"]:H,["SWG"]:zt,["SWM"]:W,["STN"]:P,["SGI"]:F,["SBG"]:Ji,["SCL"]:F,["SGA"]:Jt,["STP"]:P,["SSG"]:ft,["SVH"]:yt,["SIN"]:P,["SYL"]:H,["SEV"]:_,["SML"]:F,["SYO"]:_i,["TST"]:K,["TBA"]:bt,["TGL"]:P,["TGS"]:F,["TPT"]:P,["TDW"]:at,["TNL"]:tr,["TEX"]:qt,["TGN"]:F,["TSM"]:qt,["TUP"]:P,["TOT"]:P,["TAB"]:we,["TGI"]:H,["TDS"]:te,["TSP"]:er,["TPG"]:Qt,["TMG"]:Qt,["TBB"]:ce,["TOB"]:P,["TWS"]:F,["TVG"]:oi,["TXS"]:P,["TFK"]:B,["TFD"]:B,["TFF"]:B,["TCG"]:P,["TWT"]:F,["TRN"]:K,["TGK"]:fe,["TSL"]:ir,["TTF"]:B,["TWG"]:ae,["UGM"]:ft,["UGL"]:H,["UIC"]:rr,["ULR"]:ar,["URD"]:F,["UBL"]:P,["UCM"]:W,["UEM"]:sr,["UHS"]:nr,["UIM"]:W,["UWL"]:H,["UWS"]:H,["UIW"]:H,["UTM"]:H,["UTR"]:at,["URB"]:yt,["UPM"]:Lt,["VRP"]:hr,["VBK"]:F,["VTC"]:F,["VTW"]:zt,["VGN"]:st,["VND"]:H,["VNF"]:_,["VNS"]:H,["VSK"]:P,["VCH"]:K,["VGR"]:P,["VOB"]:P,["VCG"]:bt,["VES"]:yt,["VYE"]:P,["WBY"]:_,["WBU"]:_,["WMR"]:W,["WMM"]:P,["WTK"]:Ee,["WTW"]:F,["WTA"]:lr,["WWP"]:H,["WWR"]:W,["WOD"]:K,["WFM"]:Lt,["WWS"]:cr,["WBH"]:ee,["WCS"]:dr,["WPD"]:F,["WFB"]:H,["WFS"]:W,["WBG"]:bt,["XCR"]:F,["XDH"]:_,["XHS"]:st,["XHU"]:F,["XRF"]:ur,["XSH"]:W,["XDV"]:_t,["XRW"]:P,["YWC"]:F,["YNS"]:mt,["ZPM"]:W,["ZTR"]:B,["ZTU"]:st,["ZIN"]:F,["ZBS"]:B,["ZST"]:B,["ZMT"]:fr,["ZMB"]:B,["ZSH"]:bt};makeCard(t){try{return t==="SOV3"?new or(t):t==="SOC3"?new H(t):t==="LOD3"?new _e(t):t==="GOS3"?new Qi(t):new this.mapper[ut.extractCardCode(t)](t)}catch(i){throw console.error("Make card screwed up on code: "+t),i}}getCard(t){return this.cardCache[t]||(this.cardCache[t]=this.makeCard(t)),this.cardCache[t]}}class mr{guts="";txt(t){return this.guts+=t,this}plr(t){const i=a.player.toBool(t);return this.guts+="^p"+(i?"a":"b"),this}crd(t){return this.guts+="^c"+t,this}go(){a.log.parse(this)}}class pr{loglist;you=!0;localPlayerKey="";oppPlayerKey="";localPlayerSpan="";oppPlayerSpan="";constructor(){this.loglist=document.getElementById("loglist")}setup(){this.you=a.state.gs.isLocalA,this.localPlayerKey=this.you?"^pa":"^pb",this.oppPlayerKey=this.you?"^pb":"^pa",this.localPlayerSpan=this.span(a.player.toPlayer(this.you).name,"green"),this.oppPlayerSpan=this.span(a.player.toPlayer(!this.you).name,"red")}addLi(t){const i=document.createElement("li");i.innerHTML=t,this.loglist.appendChild(i),i.scrollIntoView({behavior:"smooth",block:"end"})}span(t,i,e=""){const s=e.length>0?` onclick="sfapi.details('${e}')"`:"";return`${t}`}add(t){this.addLi(t)}clearAll(){this.loglist.innerHTML=""}new(){return new mr}factMap={["A"]:"all",["N"]:"nek",["T"]:"tem",["U"]:"ute"};parseCards(t){let i=!0;for(;i;){const e=t.indexOf("^c");if(e===-1)i=!1;else{const s=t.slice(e+2,e+6);if(s==="POIS")t=t.replaceAll("^c"+s,this.span("Poison","green"));else{const l=a.cards.getCard(s);t=t.replaceAll("^c"+s,this.span(`${l.name} ${l.level}`,this.factMap[l.faction],s))}}}return t}parse(t){const e=t.guts.replaceAll(this.localPlayerKey,this.localPlayerSpan).replaceAll(this.oppPlayerKey,this.oppPlayerSpan),s=this.parseCards(e);this.add(s)}cardText(t){let i;if(t.type==="C"){const e=t,s=[];e.initRegen>0&&s.push("Regenerate "+e.initRegen),e.initArmor>0&&s.push("Armor "+e.initArmor),e.initMobile>0&&s.push("Mobility "+e.initMobile),e.initBT&&s.push("Breakthrough"),e.initDefend&&s.push("Defender"),e.initAggro&&s.push("Aggressive"),e.consistent&&s.push("Consistent"),s.length>0&&s.push(""),i=s.join(". ")+t.text}else i=t.text;return(t.isFree?"Free. ":"")+(t.overload?"Overload. ":"")+i}cardTextSplit(t){const i=[];if(t.isFree&&i.push("Free"),t.consistent&&i.push("Consistent"),t.overload&&i.push("Overload"),t.type==="C"){const e=t;e.initRegen>0&&i.push("Regenerate "+e.initRegen),e.initArmor>0&&i.push("Armor "+e.initArmor),e.initMobile>0&&i.push("Mobility "+e.initMobile),e.initBT&&i.push("Breakthrough"),e.initDefend&&i.push("Defender"),e.initAggro&&i.push("Aggressive")}if(t.text.length>0&&i.push(...t.text.split("~")),t.level===1){const e=t.cardCode(),s=Te.find(l=>l[0]===e);if(s){let l;const u=s[1];u.length===2&&u[0]===u[1]?l="2x "+a.cards.getCard(`${u[0]}1`).name:l=u.map(p=>a.cards.getCard(`${p}1`).name).join(", "),i.push("Solbind: "+l)}}return i}factionText(t){switch(t){case "A":return"Alloyin";case "N":return"Nekrium";case "T":return"Tempys";case "U":return"Uterra";case "X":return""}}cardTypeText(t){return t==="C"?"Creature":"Spell"}rarityText(t){switch(t){case "C":return"Common";case "R":return"Rare";case "H":return"Heroic";case "L":return"Legendary";case "T":return"Token"}}levelGateText(t,i=!1){const e=i?" ":"";return t===1?`level 1${e}`:t===2?`level 2 or lower${e}`:""}jr9(t,i,e=!1){return t!==0&&i!==0?`${this.bufferson(t,!0)}${e?",":" and"} ${this.bufferson(i,!1)}`:t!==0?this.bufferson(t,!0):this.bufferson(i,!1)}bufferson(t,i){return`${t>0?"+":""}${t} ${i?"attack":"health"}`}dbdtac(t=-1){return`deals battle damage to a ${t===-1?"":this.levelGateText(t,!0)}creature`}dbdtap(){return"deals battle damage to a player"}daluac(t=!1){return(t?"D":"d")+"iscard and level up a card"}forglied(t){return t==="X"?"Forge":`Allied ${this.factionText(t)}`}fastName(t){return t.length===3&&(t=`${t}1`),a.cards.getCard(t).name}actionText(t){switch(t.actionKey){case "ACTV":return"Activate";case "CARD":return`Card (${this.fastName(t.hostCard)})`;case "FITE":return"Fight";case "FORG":const i=t;return`Forge (${this.fastName(i.hostCard)}) Lane ${6-i.lane}`;case "HDSC":return`Hand Discard (${this.fastName(t.hostCard)})`;case "HPLY":const e=t;return`Hand Pick (${this.fastName(e.card)})`;case "MEND":return"Move End";case "MOVE":return"Move Start";case "NOTR":return"Pick None";case "ENDT":return"Donethanks";default:return t.actionKey}}tribeText(t){switch(t){case "AN":return"Any";case "AB":return"Abomination";case "AG":return"Angel";case "AS":return"Asir";case "BR":return"Bear";case "BE":return"Beast";case "CT":return"Cat";case "CR":return"Chrysalis";case "CY":return"Cyborg";case "DF":return"Darkforged";case "DM":return"Demon";case "DN":return"Dinosaur";case "DG":return"Dragon";case "DK":return"Drakin";case "DY":return"Dryad";case "ER":return"Earth";case "EL":return"Elemental";case "EN":return"Energeist";case "FY":return"Fairy";case "FR":return"Fire";case "FB":return"Forgeborn";case "FT":return"Frost";case "GT":return"Giant";case "GN":return"Gnome";case "GL":return"Golem";case "GG":return"Grimgaunt";case "GD":return"Guardian";case "HM":return"Human";case "HY":return"Hydra";case "IC":return"Ice";case "IN":return"Insect";case "LT":return"Lightning";case "LP":return"Lupin";case "MT":return"Manticore";case "MC":return"Mech";case "MM":return"Metamind";case "NG":return"Naga";case "OZ":return"Ooze";case "PX":return"Phoenix";case "PL":return"Plant";case "RM":return"Ram";case "RB":return"Robot";case "SY":return"Satyr";case "SE":return"Seraph";case "SH":return"Shaman";case "SS":return"Shapeshifter";case "SK":return"Skeleton";case "SN":return"Snake";case "SP":return"Spider";case "ST":return"Spirit";case "TG":return"Tigrin";case "TK":return"Tuskin";case "VP":return"Vampire";case "WD":return"Wanderer";case "WN":return"Wind";case "WF":return"Wolf";case "WR":return"Wurm";case "YT":return"Yeti";case "ZB":return"Zombie"}}}class yr{get stack(){return a.state.gs.modeStack}setMode(t){this.deetMode(t)||t==="X"?this.stack.push(t):(a.state.gs.modeStack=[t],t==="G"?(a.canvases.get("game-ui").clear(),a.drawing.setBackground("playmat")):t==="R"||t==="P"||t==="I"?(a.canvases.get("game-ui").clear(),a.drawing.setBackground("blueface")):t==="M"&&(a.drawing.clearAll(),a.drawing.setBackground("mainmenu")))}popMode(){this.stack.pop()}get mode(){const t=this.stack;return t[t.length-1]}get isDetailMode(){return this.deetMode(this.mode)}get baseMode(){return this.stack[0]}deetMode(t){return t==="C"||t==="D"}}class br{ddf8(t){return t.trigger.type==="FR"?this.forgeTriggerTest(t,!1):t.trigger.type==="VN"?this.vengeanceTriggerTest(t):t.trigger.type==="FK"?this.flankTriggerTest(t):t.trigger.type==="AS"?this.forgeTriggerTest(t,!0):t.trigger.type==="UP"?this.upgradeTriggerTest(t):t.trigger.type==="DM"&&t.event.code==="DMG"||t.trigger.type==="EF"&&t.event.code==="ENT"||t.trigger.type==="DS"&&t.event.code==="DIE"||t.trigger.type==="PC"&&t.event.code==="PLC"||t.trigger.type==="MV"&&t.event.code==="MOV"||t.trigger.type==="RP"&&t.event.code==="RPL"||t.trigger.type==="LG"&&t.event.code==="PHL"||t.trigger.type==="TS"&&t.event.code==="TRS"||t.trigger.type==="TE"&&t.event.code==="TRE"||t.trigger.type==="PT"&&t.event.code==="PTN"||t.trigger.type==="RU"&&t.event.code==="RKU"?this.generalTriggerTest(t):!1}resolve(t){t.host==="C"?(t.trigger.interactive&&(a.state.gs.batch.iatLane=a.field.jr5(t.creatId).lane),a.cards.getCard(t.trigger.logicCode).jr8(t)):t.host==="P"?console.error("player hosted trigger encountered. No code!"):t.host==="H"?console.error("hand card hosted trigger encountered. No code!"):console.error("Encountered trigger reaction with mystery host ",t)}forgeTriggerTest(t,i){if(t.event.code==="ENT"){const e=t.event;if(e.forged){const s=a.field.jr5(t.creatId),l=s.id===e.creature.id&&s.status==="A";return i&&l?!s.opposed:l}}return!1}upgradeTriggerTest(t){if(t.event.code==="RPL"){const i=t.event,e=a.field.searchById(t.creatId);if(e)return e.id===i.creature.id;console.warn("Venegeance trigger test could not find its creature",t)}return!1}vengeanceTriggerTest(t){if(t.event.code==="DIE"){const i=t.event,e=a.field.searchById(t.creatId);if(e)return e.status==="D"&&e.id===i.creature.id;console.warn("Venegeance trigger test could not find its creature",t)}return!1}flankTriggerTest(t){if(t.event.code==="MOV"){const i=t.event;if(!i.creature)throw new Error("Creature Moved event not provided creature payload");const e=a.field.jr5(t.creatId);return e.status==="A"&&e.id===i.creature.id}return!1}generalTriggerTest(t){return a.cards.getCard(t.trigger.logicCode).ddf8(t)}}class vr{deathCheck(){const t=Date.now();a.field.qActiveCreats().forEach(s=>{s.health<1&&(a.log.new().crd(s.code).txt(" died.").go(),this.smite(s,t))});const i=a.player.toPlayer(!0),e=a.player.toPlayer(!1);(i.health<1||e.health<1)&&(i.healthe.creatId===t.id)&&(a.state.gs.deathOrder=a.state.gs.deathOrder.filter(e=>e.creatId!==t.id))}findDeathTime(t){const i=a.state.gs.deathOrder.filter(e=>e.creatId===t).map(e=>e.time);if(i.length!==0)return Math.min(...i)}destroy(t,i,e=void 0){t.status==="A"?(a.log.new().crd(t.code).txt(" was destroyed by ").crd(i).txt(".").go(),this.smite(t,e)):(console.warn(`Attempted to destroy creature that was not active. Targ creat ${t.code}; Killer creat ${i}`),console.trace())}gravedigger(t="X"){if(t==="X"){const i=a.state.gs.graveyard.length;return i===0?"":a.state.gs.graveyard[a.randInt(0,i)].cardCode}else{const i=a.player.toBool(t),e=a.state.gs.graveyard.filter(l=>l.owner===i),s=e.length;return s===0?"":e[a.randInt(0,s)].cardCode}}smite(t,i=void 0){t.status="D",a.state.gs.deathOrder.push({creatId:t.id,time:i||Date.now()}),a.state.gs.graveyard.push({cardCode:t.code,owner:t.owner}),a.batch.addEvents(d.creatureEvent("DIE",t)),a.effect.positionChange(t.owner),a.state.gs.turn.creaturesKilled+=1}}class Ar{startBatch(){this.deathCheck=!1,this.type==="C0"?this.type="C1":this.type==="C1"?this.type="C2":this.type==="C2"&&(this.type="N0");const t=this.type;let i;if(t==="N0")i=a.state.gs.batch.events.slice(),a.state.gs.batch.events=[];else{const s=a.state.gs.batch.events.filter(u=>u.code==="DIE"),l=a.state.gs.batch.events.filter(u=>u.code!=="DIE");t==="C1"?(i=l,a.state.gs.batch.events=s):(i=s,a.state.gs.batch.events=l)}const e=this.generateTriggers(i);a.state.gs.batch.triggerActions=this.sortTriggers(e),a.phase.whatNext()}generateTriggers(t){let i;const e=t.map(s=>{s.code==="TRS"&&(i=s);const l=a.state.gs.field.map(p=>p.triggers.map(y=>{const A=d.triggerReaction(s,y,p.owner,"C");return A.creatId=p.id,A.cardCode=p.code,A}).filter(y=>a.trigger.ddf8(y))).flat(),u=[!0,!1].map(p=>a.player.toPlayer(p).triggers.map(A=>d.triggerReaction(s,A,p,"P")).filter(A=>a.trigger.ddf8(A))).flat();return l.concat(u)}).flat();return i&&this.handleTurnStart(i),e}sortTriggers(t){const i=a.state.ddf9(),e=t.filter(u=>!u.trigger.interactive&&u.ownerPlayerA===i),s=t.filter(u=>!u.trigger.interactive&&u.ownerPlayerA!==i);return t.filter(u=>u.trigger.interactive&&u.ownerPlayerA===i).concat(s,e)}handleTurnStart(t){const i=a.state.ddf9();a.field.qPlayerCreats(i).filter(s=>s.sleeping).forEach(s=>{s.sleeping=!1});const e=Date.now();a.field.qActiveCreats().forEach(s=>{s.owner===t.playerA&&(s.activationAvailable=!0,s.mobilityAvailable=!0,s.sleeping=!1),s.armorDmg=0,s.poison>0&&s.hurtDirect(s.poison,"POIS",e),s.regen>0&&s.heal(s.regen),a.death.deathProdder(s,e)})}getNextTrigger(){const t=a.state.gs.batch.triggerActions;if(t.length!==0)return t[t.length-1]}triggerDone(){const t=a.state.gs.batch.triggerActions;t.length===0?console.error("batch.triggerDone() was called when there is no trigger actions"):(t.pop(),a.state.gs.batch.iatLane=0),a.phase.whatNext()}addEvents(...t){a.state.gs.batch.events.push(...t)}get deathCheck(){return a.state.gs.batch.deathCheck}set deathCheck(t){a.state.gs.batch.deathCheck=t}get type(){return a.state.gs.batch.type}set type(t){a.state.gs.batch.type=t}get iaTrigLane(){return a.state.gs.batch.iatLane}}class kr{chirpy=!1;chirp(t){}enterMainPhase(){a.state.setPhase("MN");const t=a.state.getActivePlayer(),i=this.getMainPhaseActions(t);a.action.ddf5(i)}passTheTurn(){a.state.gs.activePlayer=!a.state.gs.activePlayer,a.state.setPhase("WT"),a.state.gs.aiMode&&(a.state.gs.aiActive=!a.state.gs.aiActive,this.startTurn())}startTurn(){a.log.new().txt("------").go(),a.log.new().plr(a.state.ddf9()).txt(" starts turn.").go(),a.state.resetTurnData(),a.state.setPhase("ST"),a.batch.addEvents(d.playerEvent("TRS",a.state.ddf9())),this.expireMods(),this.whatNext()}async whatNext(){if(a.state.gs.winFlag!==0){this.chirp("NEXT! found win state"),a.action.actionHistory=[],a.state.gs.aiActive=!1,a.state.gs.ui.animating=!1,await a.drawing.drawAll();return}if(await a.drawing.drawAll(),a.action.actionHistory.length>0)this.chirp("NEXT! action restore"),a.action.ddf5();else if(a.batch.getNextTrigger())this.chirp("NEXT! next trigger"),a.trigger.resolve(a.batch.getNextTrigger());else if(!a.batch.deathCheck)this.chirp("NEXT! death check"),a.death.deathCheck(),this.whatNext();else if(a.state.gs.batch.events.length>0)this.chirp("NEXT! batch start"),a.batch.startBatch();else switch(this.chirp("NEXT! enter phase handler "+a.state.gs.phase),a.state.gs.field=a.state.gs.field.filter(t=>t.status==="A"),a.state.gs.deathOrder=[],a.state.gs.birthOrder=[],a.state.gs.phase){case "MN":this.enterMainPhase();break;case "ET":a.state.setPhase("PT"),a.batch.addEvents(d.playerEvent("PTN",a.state.ddf9())),a.phase.expireMods(),this.whatNext();break;case "PT":this.passTheTurn();break;case "WT":console.error("Hit unhandled waiting phase"),a.state.setPhase("MN"),this.whatNext();break;case "ST":a.state.setPhase("MN"),a.ai.cheater()?a.sleep(500).then(()=>this.whatNext()):this.whatNext();break}}expireMods(){const t=a.state.gs.phase,i=a.field.creatByTarget(d.crTarg());let e=[];t==="PT"?i.forEach(s=>{s.mods.forEach(l=>{l.expiry==="EN"?l.expiry="ET":l.expiry==="ET"&&e.push([s,l])})}):t==="ST"&&i.forEach(s=>{s.mods.forEach(l=>{l.expiry==="SN"?l.expiry="ST":l.expiry==="ST"&&e.push([s,l])})}),e.length>0&&(e.forEach(s=>s[0].expireMod(s[1])),a.effect.enforceAllNonPositionCreatureEffects())}getMainPhaseActions(t){const i=this.getHandActions(t),e=this.getFieldActions(t);let s=!a.state.gs.turn.mainBattle,l="M";return s||(s=a.field.ddf1().some(p=>p.extraBattles>0&&p.isActive&&!p.defender),l="E"),s&&i.push({actionKey:"FITE",zone:"B",param:l,hostCard:""}),s||i.push({actionKey:"ENDT",zone:"B",param:"",hostCard:""}),[i,e].flat()}getHandActions(t){const i=[...new Set(t.hand)],e=[],s=[];i.forEach(y=>{a.cards.getCard(y).isFree?e.push(y):s.push(y)});const l=e.map(y=>[y,"FREE"]);a.state.gs.turn.freeCards.forEach(y=>{a.target.cardByTarget(s,y.condition).forEach(T=>{l.push([T[0],y.id]),s.splice(s.indexOf(T[0]),1)})}),l.push(...s.map(y=>[y,""]));const u=a.state.gs.turn.regularPlays>0;let p=t.hand.map((y,A)=>[y,A]);return u||(p=p.filter(y=>!s.includes(y[0]))),p.map(y=>{const A=l.find(T=>T[0]===y[0]);return A||console.error("No cost found for card"+y[0]),d.handSelectAction("HPLY",y[0],A[1],y[1])})}getFieldActions(t){const i=a.field.qPlayerCreats(t.isPlayerA),e=i.filter(l=>a.field.canMove(l).length>0).map(l=>d.fieldSelectAction("MOVE",l.lane,l.owner)),s=i.filter(l=>l.isActive&&l.activationAvailable?a.cards.getCard(l.code).canActivate(l):!1).map(l=>{const u=d.fieldSelectAction("ACTV",l.lane,l.owner);return u.hostCard=l.code,u.param=l.id,u});return e.forEach(l=>{const u=s.findIndex(p=>p.lane===l.lane);u>-1&&(s.splice(u,1),l.param="ACTV")}),e.concat(s)}}var z=(o=>(o[o.Left=0]="Left",o[o.Both=1]="Both",o[o.Right=2]="Right",o))(z||{});class ge{action;hitTest(t,i,e){}enabled=!0;mouse=0;validButton(t){return this.mouse===1||this.mouse===t}static arrayHit(t,i,e,s){let l,u=0;const p=t.length;for(;l===void 0&&u=t&&this.originY<=i&&this.endY>=i?this.action:void 0}}class vt extends U{constructor(t,i,e,s,l=0){super({zone:"N",actionKey:"BNDL",hostCard:"",param:""},t,i,e,s,l)}childs=[];addChild(t){this.childs.push(t)}clear(){this.childs=[]}hitTest(t,i,e){if(super.hitTest(t,i,e))return ge.arrayHit(this.childs,t,i,e)}}class Tr{registry;constructor(){this.registry=[]}find(t){const i=this.registry.find(e=>e.action===t);if(i)return i;throw console.trace(),new Error("Attempted to find non-existing clicker")}entoggle(t,i){const e=this.find(t);e.enabled=i}add(t){this.registry.push(t)}get(t){return this.find(t)}remove(t){const i=this.registry.findIndex(e=>e.action===t);i>-1&&this.registry.splice(i,1)}removeAll(){this.registry=[]}enable(t){this.entoggle(t,!0)}disable(t){this.entoggle(t,!1)}hitTest(t,i,e){if(a.state.gs.ui.animating)return;let s,l;this.scaleFactor===1?(s=t,l=i):(s=Math.round(t*this.scaleFactor),l=Math.round(i*this.scaleFactor));let u,p=a.state.clickMode;return p==="M"?u=e:p==="T"?u=0:u=2,ge.arrayHit(this.registry,s,l,u)}updateScale(t){t===1?this.scaleFactor=1:this.scaleFactor=1/t}scaleFactor=1}class Cr{forgeCard(t,i){const e=this.cardPlayed(i),s=a.state.getActivePlayer();a.log.new().txt("Forged ").crd(e.code).txt(".").go(),a.field.birthCreature(e,"F",s.isPlayerA,t.lane),a.action.actionDone()}levelAndDiscard(t){const i=a.cards.getCard(t.card),e=a.state.getActivePlayer();return e.hand.splice(t.position,1),i.overload||e.discard.push(i.levelUpCard()),i}cardPlayed(t,i=!1){const e=this.levelAndDiscard(t),s=a.state.getActivePlayer();if(t.cost==="")a.state.gs.turn.regularPlays-=1;else if(t.cost!=="FREE"){const l=a.state.gs.turn.freeCards.findIndex(u=>u.id===t.cost);l>-1?a.state.gs.turn.freeCards.splice(l,1):console.error("Could not find free card rule!")}if(a.state.gs.turn.cardsPlayed+=1,!i){const l=d.playCardEvent(t.card,s.isPlayerA);a.batch.addEvents(l)}return e}spellCast(){this.cardPlayed(a.action.cardBeingPlayed),a.action.actionDone()}endTurn(){const t=a.state.getActivePlayer();t.discard.push(...t.hand),t.hand=[],t.turn++;const i=t.turn>4;a.batch.addEvents(d.playerEvent("TRE",t.isPlayerA)),i&&(t.turn=1,t.rank++,a.batch.addEvents(d.playerEvent("RKU",t.isPlayerA)),t.deck.push(...t.discard),t.discard=[],a.pack.shuffleDeck(t.isPlayerA)),a.field.qActiveCreats().forEach(e=>{e.extraBattles=0}),a.player.drawCard(t,5),a.state.setPhase("ET"),a.action.actionDone()}mobility(t){const i=a.field.jr5(t.param);i.mobilityAvailable=!1,i.move(t.lane),a.action.actionDone()}allied(t,i){const e=i??a.state.getActivePlayer(),s=d.target("TH");return s.player=a.player.toTarget(e),s.faction=t,a.target.deckByTarget(s).length>0}freeCard(t){const i=d.freeCard(t);return a.state.gs.turn.freeCards.push(i),i}}class Sr{laneIdx=[1,2,3,4,5];jr5(t){const i=this.searchById(t);if(i)return i;throw console.error("naughty creature id",t),new Error("Could not find creature by id")}creatByLane(t,i){const e=this.searchByLane(t,i);if(e)return e;throw console.error("naughty creature lane ",t,i),new Error("Could not find creature by lane")}ddf6(t){const i=this.searchByFSA(t);if(i)return i;throw console.error("naughty FSA",t),new Error("Could not find creature by FSA")}searchById(t){return a.state.gs.field.find(i=>i.id===t)}searchByLane(t,i){return a.state.gs.field.find(e=>e.lane===t&&e.owner===i&&e.status==="A")}searchByFSA(t){return this.searchByLane(t.lane,t.playerA)}creatByTarget(t){let i=a.state.gs.field;if(t){if(t.player!=="X"){const e=a.player.toBool(t.player);i=i.filter(s=>s.owner===e)}if(t.creatStatus!=="A"){const e=this.creatStatusTargetToCS(t.creatStatus);i=i.filter(s=>s.status===e)}if(!a.isUn(t.lanes)){const e=a.target.lanesToArr(t.lanes);i=i.filter(s=>e.includes(s.lane))}if(a.isUn(t.maxAttack)||(i=i.filter(e=>e.attack<=t.maxAttack)),t.notMe&&(i=i.filter(e=>e.id!==t.notMe)),t.victims){const e=a.deTil(t.victims);i=i.filter(s=>e.includes(s.id))}if(t.tribe!=="AN"&&(i=i.filter(e=>e.isTribe(t.tribe))),t.canLevel&&(i=i.filter(e=>a.cards.getCard(e.code).canLevel())),t.level!=="LA"){const e=a.target.levelTargetToLevel(t.level);i=i.filter(s=>e.includes(s.level))}t.cardCode&&(i=i.filter(e=>a.cards.getCard(e.code).cardCode()===t.cardCode)),t.canDefender&&(i=i.filter(e=>!e.negateDefender)),t.hasDefender&&(i=i.filter(e=>e.defender)),t.canArmor&&(i=i.filter(e=>!e.negateArmor)),t.hasArmor&&(i=i.filter(e=>e.armor>0)),t.canMove&&(i=i.filter(e=>!e.negateMobility)),t.hasMobility&&(i=i.filter(e=>e.mobility>0)),t.hasPoison&&(i=i.filter(e=>e.poison>0)),t.canRegen&&(i=i.filter(e=>!e.negateRegen)),t.hasRegen&&(i=i.filter(e=>e.regen>0)),t.faction!=="X"&&(i=i.filter(e=>e.faction===t.faction))}return i}cst2cs={["A"]:()=>{throw new Error("goof passed any to field state target mapper")},["V"]:()=>"A",["D"]:()=>"D",["R"]:()=>"R"};creatStatusTargetToCS(t){return this.cst2cs[t]()}emptyLanes(t){return this.laneIdx.filter(i=>!a.state.gs.field.find(s=>s.owner===t&&s.lane===i&&s.status==="A"))}oppositeLane(t){return 6-t}adjacentPositions(t){return[[2],[1,3],[2,4],[3,5],[4]][t-1]}canMove(t){return t.mobility>0&&t.mobilityAvailable&&(!t.sleeping||t.aggressive)?this.emptyLanes(t.owner).filter(i=>Math.abs(t.lane-i)<=t.mobility):[]}birthCreature(t,i,e,s=0,l=void 0){if(i==="S"){const T=this.emptyLanes(e);if(T.length===0)return;s=T[a.randInt(0,T.length)]}else if(i==="P"&&!this.emptyLanes(e).includes(s))return;const p=(typeof t=="string"?a.cards.getCard(t):t).jr3(e,s),y=a.state.gs.field;if(i==="F"||i==="R"){const T=a.field.searchByLane(s,e);T&&(a.log.new().crd(T.code).txt(" was replaced.").go(),T.status="R",a.batch.addEvents(d.replacedEvent(p,T)))}y.push(p);const A=d.enterFieldEvent(p);return A.forged=i==="F",a.state.gs.birthOrder.push({creatId:p.id,time:l||Date.now()}),a.batch.addEvents(A),p.enforceEffects("PH"),a.effect.positionChange(e),p}findBirthTime(t){const i=a.state.gs.birthOrder.filter(e=>e.creatId===t).map(e=>e.time);if(i.length!==0)return i.length>1&&console.warn("wery curious, more than one birth record for creat "+t),i[0]}qActiveCreats(){return this.creatByTarget(d.crTarg())}qPlayerCreats(t){const i=d.crTarg();return i.player=a.player.toTarget(t),this.creatByTarget(i)}ddf1(){return this.creatByTarget(d.crFriendTarg())}qEnemyCreats(){return this.creatByTarget(d.crEnemyTarg())}}class wr{creatFightState(t,i){return t?i===1||t.defender||t.sleeping&&!t.aggressive?1:i===0?2:t.extraBattles>0?(t.extraBattles-=1,2):1:0}dukeItOut(t,i,e,s){if(t>0){let l=0;if(i>0){const u=t===2&&e.breakthrough;l=s.hurtBattle(e.attack,e,u)}else t===2&&(l=e.attack);l>0&&a.player.hurtPlayerBattle(!e.owner,l,e)}}fight(t){a.log.add("FIGHT!");let i=2,e=1;t&&(a.state.gs.turn.mainBattle=!0,i=0,e=0);const s=a.state.ddf9(),l=[],u=[];a.field.laneIdx.forEach(p=>{const y=a.field.searchByLane(p,s),A=a.field.searchByLane(6-p,!s),T=this.creatFightState(y,i),D=this.creatFightState(A,e);(T===2||D===2)&&(u.push([T,D,y,A],[D,T,A,y]),T===2&&(a.state.gs.turn.friendlyFightStarters++,l.push([p,s])),D===2&&l.push([a.field.oppositeLane(p),!s]))}),this.barking&&l.length>0&&a.dogBark(),a.drawing.drawCombat(l).then(()=>{u.forEach(p=>this.dukeItOut(...p)),a.effect.playerHealthChange(),a.death.deathCheck(),a.batch.type="C0",a.action.actionDone()})}barking=!0}class Er{positionChange(t){a.field.creatByTarget().forEach(i=>{i.enforceEffects("PS",t)})}defenderChange(t){a.field.qActiveCreats().forEach(e=>{e.effects.filter(s=>s.watch==="DF").filter(s=>s.area==="C"&&e.owner===t||s.area==="A").forEach(s=>a.cards.getCard(s.logicCode).enforceEffect(s,e))})}playerHealthChange(){a.field.qActiveCreats().forEach(t=>{t.enforceEffects("PH")})}enforceAllNonPositionCreatureEffects(){a.field.qActiveCreats().forEach(i=>{i.enforceEffects("AT"),i.enforceEffects("AR"),i.enforceEffects("CH"),i.enforceEffects("DF",i.owner)})}}class Dr{}class xr{pt2pb={["X"]:()=>{throw new Error("goof passed any to player target boolean-o-fier")},["A"]:()=>!0,["B"]:()=>!1,["F"]:()=>a.state.ddf9(),["E"]:()=>!a.state.ddf9()};toPlayer(t){return typeof t=="boolean"?a.state.getPlayer(t):typeof t=="string"?a.state.getPlayer(this.pt2pb[t]()):t}toBool(t){return typeof t=="boolean"?t:typeof t=="string"?this.pt2pb[t]():t.isPlayerA}toTarget(t){return typeof t=="string"?t:(typeof t=="boolean"?t:t.isPlayerA)?"A":"B"}hurtPlayer(t,i){return i<1?0:(t.health-=i,i)}ddf3(t,i,e){const s=this.toPlayer(t),l=this.hurtPlayer(s,i);l>0&&(a.log.new().crd(e).txt(` dealt ${l} dmg to `).plr(s).txt(".").go(),a.batch.addEvents(d.damageEvent(!1,l,!1,!1,s.isPlayerA,void 0)),a.effect.playerHealthChange())}hurtPlayerBattle(t,i,e){const s=this.toPlayer(t),l=this.hurtPlayer(s,i);l>0&&(a.log.new().crd(e.code).txt(` dealt ${l} battle dmg to `).plr(s).txt(".").go(),a.batch.addEvents(d.damageEvent(!0,l,!0,!1,s.isPlayerA,e)))}healPlayer(t,i){const e=this.toPlayer(t);e.health+=i,a.log.new().plr(e).txt(` gained ${i} health.`).go(),a.batch.addEvents(d.playerHealEvent("PHL",e.isPlayerA,i)),a.effect.playerHealthChange()}drawCard(t,i){const e=this.toPlayer(t);for(let s=0;s{const s=this.actionTargGuts(e);return s.forEach(l=>{l.hostCard=e.hostCard,l.param=e.param}),s}).flat()}actionTargGuts(t){if(t.target==="TH")return this.deckByTarget(t).map(i=>d.handSelectAction(t.actionKey,i[0],"",i[1]));if(t.target==="TF"){if(t.field==="O")return a.field.creatByTarget(t).map(i=>d.fieldSelectAction(t.actionKey,i.lane,i.owner));{const i=t.player==="X"?[!0,!1]:[a.player.toBool(t.player)],e=a.isUn(t.lanes)?a.field.laneIdx:this.lanesToArr(t.lanes);if(t.field==="A")return i.map(s=>e.map(l=>d.fieldSelectAction(t.actionKey,l,s))).flat();if(t.field==="E")return i.map(s=>a.field.emptyLanes(s).filter(l=>e.includes(l)).map(l=>d.fieldSelectAction(t.actionKey,l,s))).flat()}}if(t.target==="TP")return t.player==="X"?[d.playerSelectAction(t.actionKey,!0),d.playerSelectAction(t.actionKey,!1)]:[d.playerSelectAction(t.actionKey,a.player.toBool(t.player))];if(t.target==="TB")return[{actionKey:t.actionKey,zone:"B",hostCard:t.hostCard,param:""}];if(t.target==="TR")return[{actionKey:t.actionKey,zone:"R",hostCard:t.hostCard,param:""}];if(t.target==="TD")return[];throw new Error("Target encountered that doesnt have mappings to actions: "+t.target)}cardByTarget(t,i){let e=t.map((s,l)=>[s,l]);if(i){if(a.isUn(i.deckPositionSkip)||(e=e.filter(s=>s[1]!==i.deckPositionSkip)),i.faction!=="X"&&(e=e.filter(s=>a.cards.getCard(s[0]).faction===i.faction)),i.tribe!=="AN"&&(e=e.filter(s=>{const l=a.cards.getCard(s[0]);return l.type==="C"?l.isTribe(i.tribe):!1})),i.canLevel&&(e=e.filter(s=>a.cards.getCard(s[0]).canLevel())),i.level!=="LA"){const s=a.target.levelTargetToLevel(i.level);e=e.filter(l=>{const u=parseInt(l[0].substring(3,4));return s.includes(u)})}if(i.card!=="A"){const s=i.card==="C"?"C":"S";e=e.filter(l=>a.cards.getCard(l[0]).type===s)}i.cardCode&&(e=e.filter(s=>a.cards.getCard(s[0]).cardCode()===i.cardCode))}return e}deckByTarget(t){const i=a.player.toPlayer(t.player);let e;if(t.target==="TH")e=i.hand;else if(t.target==="TD")e=i.discard;else if(t.target==="DK")e=i.deck;else throw new Error("bad target passed to deckByTarget: "+t.target);return this.cardByTarget(e,t)}buttonTarget(t,i="",e=""){return d.actionTarget("TB",t,i,e)}boardTarget(t,i){return d.actionTarget("TR",t,i,"")}ddf2(t){return t===1?"L1":t===2?"LN":"LA"}lt2l={["LA"]:()=>[1,2,3,4],["L1"]:()=>[1],["L2"]:()=>[2],["L3"]:()=>[3],["LN"]:()=>[1,2]};levelTargetToLevel(t){return this.lt2l[t]()}levelTargetTest(t,i){return this.levelTargetToLevel(t).includes(i)}levelTestCommon(t,i){return this.levelTargetTest(this.ddf2(i),t)}lanesToArr(t){return Array.isArray(t)?t:[t]}}class Pr{handleAction(t){if(t.actionKey==="DEET"){a.details.init(t.param);return}if(t.actionKey==="HPLY"){this.playCardSelect(t);return}if(t.actionKey==="FORG"){a.turn.forgeCard(t,this.cardBeingPlayed);return}if(t.actionKey==="FITE"){a.fight.fight(t.param==="M");return}if(t.actionKey==="ENDT"){a.turn.endTurn();return}if(t.actionKey==="MOVE"){this.mobilitySelect(t);return}if(t.actionKey==="MEND"){a.turn.mobility(t);return}if(t.actionKey==="HDSC"){const i=this.cardBeingPlayed;i.cost="",a.turn.cardPlayed(i,!0),this.actionDone();return}if(t.actionKey==="ACTV"){const i=a.field.jr5(t.param);a.cards.getCard(i.code).startActivation(i);return}if(t.actionKey==="NOTR"){t.param==="PM"&&a.mode.popMode(),this.actionDone(!0);return}if(t.actionKey==="CARD"){a.cards.getCard(t.hostCard).handleAction(t);return}if(t.actionKey==="CANC"||t.actionKey==="CNCL"){t.param==="PM"&&a.mode.popMode(),this.actionHistory.pop(),this.ddf5();return}if(t.actionKey==="DTUP"){a.details.updateDetails(t),a.drawing.drawAll();return}if(t.actionKey==="VWDK"){a.deck.handleShowDeck(t);return}if(t.actionKey==="SCRK"){a.deck.handleDeckScroll(t);return}if(t.actionKey==="SCRH"){t.param==="R"?a.state.gs.ui.handScrollLeft+=1:a.state.gs.ui.handScrollLeft-=1,a.drawing.drawAll();return}if(t.actionKey==="DRFT"){a.draft.resumeDraft(t.param);return}if(t.actionKey==="SCRD"){t.param==="U"?a.draft.paginating=!1:a.draft.paginating=!0,a.drawing.drawAll();return}if(t.actionKey==="UIBT"){a.menu.handleUIButton(t);return}if(t.actionKey==="MENU"){a.menu.handleMainMenuButton(t);return}if(t.actionKey==="MNBT"){a.menu.handleMenuButton(t);return}if(t.actionKey==="DSET"){this.ddf5(a.menu.generateDeckPickerActions(parseInt(t.param)));return}if(t.actionKey==="DECK"){a.menu.handleDeckPick(t);return}}ddf5(t){let i;if(t){const e=this.generateDetailActions();i=t.concat(e),this.actionHistory.push(i)}else i=this.actionHistory[this.actionHistory.length-1];a.state.gs.aiActive?a.ai.processAction(i):a.drawing.drawAll()}currPlayHandAction;get cardBeingPlayed(){if(this.currPlayHandAction)return this.currPlayHandAction;throw new Error("Attempted to read current card being played, nothing exists")}actionHistory=[];get activeActions(){const t=this.actionHistory.length;return t===0?[]:this.actionHistory[t-1]}actionDone(t=!1){this.currPlayHandAction=void 0,this.actionHistory=[],a.clickers.removeAll(),a.drawing.drawActions([]),t?a.batch.triggerDone():a.phase.whatNext()}playCardSelect(t){this.currPlayHandAction=t;const i=this.getPlayCardActions(t);this.ddf5(i)}getPlayCardActions(t){if(t.actionKey!=="HPLY")throw new Error("Unexpected action passed to getPlayCardActions: "+t.actionKey);const e=a.cards.getCard(t.card).playTargets();a.state.getRegularPlays()>0&&e.push(a.target.buttonTarget("HDSC",t.card));const s=a.target.toActions(e);return s.push(d.handSelectAction("CANC",t.card,"",t.position)),s}mobilitySelect(t){const i=this.getMoveCardActions(t);this.ddf5(i)}getMoveCardActions(t){if(t.actionKey!=="MOVE")throw new Error("Unexpected action passed to getMoveCardActions: "+t.actionKey);const i=a.field.ddf6(t);let e=[];if(t.param==="ACTV"){const s=d.actionTarget("TB","ACTV",i.code,i.id);e=a.target.toActions(s)}return e.push(d.fieldSelectAction("CANC",t.lane,t.playerA)),a.field.canMove(i).map(s=>{const l=d.fieldSelectAction("MEND",s,t.playerA);return l.param=i.id,l}).concat(e)}noneEndTrigger(){return a.target.toActions(a.target.buttonTarget("NOTR"))[0]}cancelAction(){return a.target.toActions(a.target.buttonTarget("CANC"))[0]}emptyAdjacents(t,i){const e=i||t.id,s=d.emptyPlayerActTarg("F","CARD",t.code,e);return s.lanes=t.adjacent,a.target.toActions(s)}generateDetailActions(){const t=a.mode.mode;if(a.state.gs.aiActive)return[];if(t==="G"){const i=a.state.getLocalPlayer().hand.map((s,l)=>{const u=d.handSelectAction("DEET",s,"",l);return u.param=s,u}),e=a.field.qActiveCreats().map(s=>{const l=d.fieldSelectAction("DEET",s.lane,s.owner);return l.param=s.code,l});return i.concat(e)}else if(t==="R"){const i=a.draft.currentPack.map((s,l)=>{const u=d.draftSelectAction("DEET",l,!0);return u.param=`${s}1`,u}),e=a.draft.picksAsDeck().map((s,l)=>{const u=d.draftSelectAction("DEET",l,!1);return u.param=`${s.card}1`,u});return i.concat(e)}return[]}}class Br{_state=new Ue;get gs(){return this._state}resetTurnData(){this.gs.turn=d.freshTurn(),this.gs.firstTurn&&(this.gs.firstTurn=!1,this.gs.turn.regularPlays=1)}getPlayer(t){return t?this._state.playerA:this._state.playerB}getActivePlayer(){return this.getPlayer(this._state.activePlayer)}ddf9(){return this._state.activePlayer}getLocalPlayer(){return this.getPlayer(this._state.isLocalA)}setPhase(t){this.gs.phase=t}getRegularPlays(){return this.gs.turn.regularPlays}getCardsPlayed(){return this.gs.turn.cardsPlayed}writeStorage(t,i){localStorage.setItem(t,i)}readStorage(t){return localStorage.getItem(t)}strRead(t,i){const e=this.readStorage(t);return e===null?i:e}boolRead(t,i){const e=this.readStorage(t);return e===null?i:e==="Y"}boolWrite(t,i){this.writeStorage(t,i?"Y":"N")}restoreOptions(){const t=this.gs.options;t.bark=this.boolRead("bark",!0),t.bigCards=this.boolRead("bigCards",!0),t.cheater=this.boolRead("cheater",!1),t.highHealth=this.boolRead("highHealth",!1),t.fatPacks=this.boolRead("fatPacks",!1),t.legDraft=this.boolRead("legDraft",!1),t.scale=this.strRead("scale","100")}toggleOption(t){this.gs.options[t]=!this.gs.options[t],this.boolWrite(t,this.gs.options[t])}setClickMode(t){this.gs.clickMode=t}get clickMode(){return this.gs.clickMode}}class Nr{friends;friendText;get browseStack(){return a.state.gs.ui.detailStack}n(t,i){return`${t}${i}`}allLevelFriendo(t,i){const e=Array.isArray(i)?i:[i];[1,2,3].forEach(s=>{this.friends[this.n(t,s)]=e.map(l=>this.n(l,s))})}plont(t){this.friends[this.n(t,1)]=[this.n("SDL",1)],this.friends[this.n(t,2)]=[this.n("SPL",2)],this.friends[this.n(t,3)]=[this.n("TFK",3)]}constructor(){const t=this.n("FWC",1);this.friends={[this.n("CGL",1)]:[this.n("CGF",1)],[this.n("DTD",1)]:[this.n("TOT",1)],[t]:[this.n("FWG",1)],[this.n("MPH",1)]:[t],[this.n("MPH",2)]:[t],[this.n("MPH",3)]:[t],[this.n("NGQ",4)]:[this.n("NSD",4)],[this.n("RHU",1)]:[this.n("RSC",1)],[this.n("SSE",1)]:[this.n("SXD",1)],[this.n("SSE",2)]:[this.n("SXP",2)],[this.n("SSE",3)]:[this.n("SXT",3)],[this.n("TGK",1)]:[this.n("SXD",1)],[this.n("TGK",2)]:[this.n("SPL",2)],[this.n("TGK",3)]:[this.n("TTF",3)],[this.n("TSL",1)]:[this.n("FUN",1)],[this.n("ZTU",2)]:[this.n("ZTR",2)]},this.allLevelFriendo("BLH","LWY"),this.allLevelFriendo("BTM","BOS"),this.allLevelFriendo("BWD","TFD"),this.plont("BTS"),this.allLevelFriendo("BWT","DNK"),this.allLevelFriendo("CSB","ZBS"),this.allLevelFriendo("CYS","COZ"),this.allLevelFriendo("DSK","SPN"),this.allLevelFriendo("DNK","BWT"),this.allLevelFriendo("DZD","DZA"),this.allLevelFriendo("DBQ","BRF"),this.allLevelFriendo("EPH","EPS"),this.allLevelFriendo("FST","ZST"),this.allLevelFriendo("FWK","ZMB"),this.allLevelFriendo("FGD",["FGA","FGB","FGG","FGO"]),this.allLevelFriendo("FGG","FGO"),this.allLevelFriendo("FMD","FME"),this.plont("GMR"),this.allLevelFriendo("IZL",["IFL","IFR","IZR"]),this.allLevelFriendo("IZR",["IFL","IFR","IZL"]),this.allLevelFriendo("IZK",["IFL","IFR","IZL","IZR"]),this.allLevelFriendo("NSW","SPN"),this.allLevelFriendo("NSH","NDR"),this.allLevelFriendo("NGQ","NSD"),this.allLevelFriendo("NFF","TFF"),this.allLevelFriendo("NOZ","OOZ"),this.plont("PTB"),this.allLevelFriendo("RWC","RPT"),this.plont("STS"),this.allLevelFriendo("SND","SPU"),this.allLevelFriendo("TNL","ZMB"),this.plont("WWS"),this.allLevelFriendo("YNS","XYR"),this.friendText={["BOS"]:[51,""],["BWT"]:[68,"Bron"],["BRF"]:[18,""],["CGF"]:[65,"Fiend"],["COZ"]:[31,""],["DNK"]:[8,""],["DZA"]:[59,"Dozer"],["EPS"]:[49,"Soldier"],["FWG"]:[44,""],["FWC"]:[28,"Chrysalis"],["FGA"]:[65,"Alpha"],["FGB"]:[77,"Beta"],["FGG"]:[53,"Gamma"],["FGO"]:[57,"Omega"],["FME"]:[78,"Egg"],["FUN"]:[49,""],["IZL"]:[42,"Av Flame"],["IZR"]:[44,"Av Frost"],["IFL"]:[65,"Flame"],["IFR"]:[67,"Frost"],["LWY"]:[65,"Wyrm"],["NDR"]:[3,""],["NSD"]:[40,""],["OOZ"]:[31,""],["RPT"]:[51,""],["RSC"]:[60,"Scout"],["SPL"]:[51,""],["SXP"]:[51,""],["SXD"]:[40,""],["SXT"]:[38,""],["SDL"]:[40,""],["SPN"]:[66,""],["SPU"]:[66,""],["XYR"]:[66,""],["TOT"]:[40,"Tendrils"],["TFK"]:[38,""],["TFD"]:[38,""],["TFF"]:[38,""],["TTF"]:[38,""],["ZTR"]:[32,"Returned"],["ZBS"]:[52,""],["ZST"]:[52,""],["ZMB"]:[52,""]}}get currentCard(){const t=this.browseStack;return t[t.length-1]}get friendos(){return this.friends[this.currentCard]??[]}get canGoBack(){return this.browseStack.length>1}init(t){if(a.state.gs.ui.detailStack=[t],a.mode.mode!=="C"){a.mode.setMode("C");const i=d.basicAction("CNCL");i.zone=a.mode.baseMode==="G"?"B":"N",i.param="PM",a.action.ddf5([i])}else a.drawing.drawAll()}changeLevel(t){const i=this.browseStack,e=i.length-1,s=i[e];i[e]=this.n(ut.extractCardCode(s),t)}goBack(){this.browseStack.pop()}goToFriend(t){this.browseStack.push(t)}friendTxt(t){const i=this.friendText[t];return i||[3,"I am error"]}goBackAction(){const t=d.basicAction("DTUP");return t.param="DB",t}levelAction(t){const i=d.basicAction("DTUP");return i.param=a.enTil("DL",t),i}friendAction(t){const i=d.basicAction("DTUP");return i.param=a.enTil("DF",t),i}updateDetails(t){const i=a.deTil(t.param),e=i[0];e==="DB"?this.goBack():e==="DF"?this.goToFriend(i[1]):e==="DL"?this.changeLevel(parseInt(i[1])):console.error("Unknown detail arg",t)}}class Hr{async drawAll(){const t=a.mode.mode;a.clickers.removeAll(),this.clearDetails(),t==="G"?(this.clearDeck(),await Promise.all([this.drawHand(a.state.getLocalPlayer()),this.drawPlayers(),this.drawField(),this.drawActions(a.action.activeActions)]),a.state.gs.winFlag!==0?await this.drawGameOver():await this.drawCommonButtons(!0,!0,!0)):t==="C"?await this.drawDetails(a.action.activeActions):t==="D"?await this.drawDeck(a.action.activeActions):t==="R"?await this.drawDraft(a.action.activeActions):t==="P"?await this.drawDeckPick(a.action.activeActions):t==="I"?await this.drawInfoMenu():t==="X"?await this.drawExit(a.action.activeActions):await this.drawMenu()}async drawGameOver(){await new be().drawGameOver()}async drawHand(t){await new Ne().drawCards(t)}async drawField(){await new ye().drawCards()}async drawPlayers(){await new be().drawAllPlayers()}async drawDeck(t){const i=t.find(s=>s.zone==="B");i&&await new pe().drawActions([i]);const e=new Ur;await e.drawCards(),await e.drawActions(t),await this.drawCommonButtons(!0,!0,!1)}async drawActions(t){const i=new pe;if(a.state.gs.aiActive)await i.drawActions([]);else{a.canvases.get("effects").clear();const s=new Ne,l=new ye,u=new be;await Promise.all([s.drawActions(t),l.drawActions(t),i.drawActions(t),u.drawActions(t)])}}async drawCombat(t){if(t.length===0)return;a.state.gs.ui.animating=!0,a.canvases.get("effects").clear(),await new ye().drawFight(t),a.state.gs.ui.animating=!1}async drawDraft(t){a.canvases.get("effects").clear();const e=new zr,s=a.canvases.get("game-ui");s.clear(),a.clickers.removeAll(),await e.drawPack(t,s),await e.drawList(t,s),await this.drawCommonButtons(!0,!0,!1)}async drawMenu(){const t=new Kr,i=a.canvases.get("game-ui");i.clear(),a.clickers.removeAll(),await t.drawMenu(i)}async drawInfoMenu(){const t=new Zr,i=a.canvases.get("game-ui");i.clear(),a.clickers.removeAll(),await t.drawMenu(i)}async drawDeckPick(t){const i=new Re,e=a.canvases.get("game-ui");e.clear(),a.clickers.removeAll(),await i.drawSets(t,e),await i.drawList(t,e)}clearDetails(){a.canvases.get("card").clear()}clearDeck(){a.canvases.get("decklist").clear()}async drawDetails(t){await this.drawActions(t),await this.drawCommonButtons(!0,!0,!1),a.canvases.get("card").clear();const e=new Wr,s=t.find(l=>l.actionKey==="CNCL");s?await e.drawDetails(s):console.error("Attempted to show details view with no cancel action")}async drawCommonButtons(t,i,e){let s=979;const l=723,u=new me,p=a.canvases.get("game-ui");if(e&&p.clear(),t&&(await u.makeIconButton(p,s,l,"EX"),s-=50),i){const y=a.state.clickMode;y!=="M"&&await u.makeIconButton(p,s,l,y==="I"?"TM":"DM")}}async drawExit(t){a.canvases.get("decklist").clear();const e=a.canvases.get("effects"),s=new jt;await s.drawButton(e,151,488,t[1],"Quit Game",24,!1),await s.drawButton(e,478,488,t[0],"Resume",52,!1)}setBackground(t){const i="hide";this.allBackgrounds.forEach(e=>{const s=document.getElementById(e);t===e?s.classList.remove(i):s.classList.add(i)})}changeScale(t){this.clearAll();let i=a.state.gs.options.scale;i===t&&(i="100");const e=t==="100"?1:.90625;a.clickers.updateScale(e);const s=`uiSize${i}`,l=`uiSize${t}`;this.allCanvases.forEach(y=>{a.canvases.get(y).dom.classList.replace(s,l)}),this.allBackgrounds.forEach(y=>{document.getElementById(y).classList.replace(s,l)}),document.getElementById("solforge").classList.replace(`gameSize${i}`,`gameSize${t}`),document.getElementById("log").classList.replace(`logSize${i}`,`logSize${t}`),a.state.gs.options.scale=t,a.state.writeStorage("scale",t)}clearAll(){this.allCanvases.forEach(t=>{a.canvases.get(t).clear()})}allCanvases=["game-ui","field","player","hand","effects","decklist","card"];allBackgrounds=["playmat","blueface","mainmenu"]}class Ht{paStats;pbStats;constructor(t,i){this.paStats=t,this.pbStats=i}allStats(){return[this.paStats,this.pbStats]}playerStats(t){return t?this.paStats:this.pbStats}deltaStats(t){const i=this.playerStats(t),e=this.playerStats(!t);return Ht.deltafier(i,e)}static deltafier(t,i){const e=Ht.blankStats(!0);return e.creatCount=t.creatCount-i.creatCount,e.creatValue=t.creatValue-i.creatValue,e.threatValue=t.threatValue-i.threatValue,e.playerHealth=t.playerHealth-i.playerHealth,e}static blankStats(t){return{side:t,creatCount:0,creatValue:0,threatValue:0,playerHealth:0}}}class At{guts;constructor(t){this.guts=t}static fromState(){const t=a.field.qActiveCreats(),i=[!0,!1],e=i.map(l=>a.field.laneIdx.map(u=>{const p=t.find(y=>y.owner===l&&y.lane===u);return p?d.evalVectorCreature(p):d.evalVectorEmpty(l,u)})).flat(),s=i.map(l=>{const u=a.player.toPlayer(l),p=d.evalVectorPlayer(l);return p.health=u.health,p});return e.push(...s),new At(e)}static ddp9(t,i,e,s,l=0){return t/2+l+i/10+(s+e)/3}static creatValueFormula(t){return t.health+Math.max(0,t.attack)+t.bonus+t.regen+t.armor-t.poison}clone(){return new At(structuredClone(this.guts))}boardStats(){const t=[!0,!1].map(i=>this.guts.filter(e=>e.playerA===i)).map(i=>{const e=Ht.blankStats(i[0].playerA),s=i.filter(l=>l.type==="C");return e.creatCount=s.length,e.playerHealth=i[5].health,e.creatValue=this.creatSum(s,At.creatValueFormula),e.threatValue=this.creatSum(s,l=>{if(l.defender)return 0;{const u=this.guts[this.findLaneIndex(6-l.lane,!l.playerA)];let p=0;if(u.type==="E"?p=l.attack:l.breakthrough&&(p=l.attack-u.health),p<1)return 0;if(p<6)return p;{let y=!0,A=0,T=5,D=1;const N=5;for(;y;)p>T+N?(A+=D*N,T+=N,D++):(A+=D*(p-T),y=!1);return p+(l.sleeping&&!l.aggressive?A/2:A)}}}),e});return new Ht(t[0],t[1])}weighState(t,i,e){const s=this.boardStats(),l=s.playerStats(!e).playerHealth;if(l<1&&li(e)).reduce((e,s)=>e+s,0)}findLaneIndex(t,i){return t+(i?-1:4)}findVectorIdx(t){return t.shape==="B"?this.findLaneIndex(t.lane,t.playerA):t.playerA?10:11}getBaseVector(t){return this.guts[this.findVectorIdx(t)]}replaceBaseVector(t){const i=this.findVectorIdx(t);this.guts[i]=t}applyVectors(t){t.forEach(e=>{switch(e.type){case "M":if(e.shape==="B")if(e.destroy)this.replaceBaseVector(d.evalVectorEmpty(e.playerA,e.lane));else{const l=this.getBaseVector(e);if(l.type!=="E"){if(e.moveTo){const u=d.evalVectorEmpty(e.playerA,e.lane);l.lane=e.moveTo,this.replaceBaseVector(l),this.replaceBaseVector(u)}else if(this.applyCreatVector(l,e),e.dirDmg){const u=Math.min(e.dirDmg,l.armor-l.armorDmg);l.armorDmg+=u,l.health-=e.dirDmg-u}}}else{const l=this.getBaseVector(e);l.health+=e.health,e.dirDmg&&(l.health-=e.dirDmg)}break;case "R":const s=d.evalVectorEmpty(e.playerA,e.lane);this.applyCreatVector(s,e),s.type="C",this.replaceBaseVector(s);break;case "P":break;default:console.warn("BoardEval is applying vectors, encountered unexpected vector type:",e)}}),this.guts.filter(e=>e.shape==="B"&&e.health<1).forEach(e=>this.replaceBaseVector(d.evalVectorEmpty(e.playerA,e.lane)))}battleState(t){return t.type==="E"?0:t.defender||t.sleeping&&!t.aggressive?1:2}battleVector(t,i,e,s){const l=[];if(t>0){let u=0;const p=Math.max(e.attack,0);if(i>0){const y=t===2&&e.breakthrough,A=Math.max(Math.min(p,s.armor-s.armorDmg),0);let T=p-A;if(y&&T>s.health&&(u=T-s.health,T=s.health),A>0||T>0){const D=d.ddp1(s.playerA,s.lane);D.health=-T,D.armorDmg=A,l.push(D)}}else t===2&&(u=p);u>0&&l.push(d.evalVectorPlayerLife(s.playerA,-u))}return l}applyCombat(){const t=a.field.laneIdx.map(i=>{const e=this.guts[i-1],s=this.guts[10-i],l=this.battleState(e),u=this.battleState(s);return l===2||u===2?this.battleVector(l,u,e,s).concat(this.battleVector(u,l,s,e)):[]}).flat();this.applyVectors(t)}applyTurnEnd(t,i){const e=!t,s=!i,l=this.guts.filter(u=>u.shape==="B"&&(e||u.playerA===s)&&u.poison>0).map(u=>{const p=u.regen-Math.max(0,u.poison-u.armor),y=d.ddp1(u.playerA,u.lane);return y.health=p,y}).filter(u=>u.health!==0);this.applyVectors(l)}applyCreatVector(t,i){t.health+=i.health,t.attack+=this.doubleOrNossing(t.attack,i.attack),t.armor+=i.armor,t.armorDmg+=i.armorDmg,t.poison+=this.doubleOrNossing(t.poison,i.poison),t.regen+=i.regen,t.aggressive=i.aggressive,t.breakthrough=i.breakthrough,t.defender=i.defender,t.negateDefender=i.negateDefender}doubleOrNossing(t,i){if(i>=Rt&&i0||e.freeCards.length>0)&&(i-=L.Horrid);break;case "NT":break;case "PS":break;case "NO":break;default:console.error("Final type with no weighting switch: "+t.type),i=-2}return i+t.bonus}weighPlacement(t){let i=0;const e=t.action,s=a.field.searchByFSA(e),l=a.field.searchByLane(a.field.oppositeLane(e.lane),!e.playerA),u=t.hints.includes("RD");if(s){const y=s.aiHints().includes("RT");y&&u?i+=L.Grand:y||u?i+=L.Noice:t.hints.includes("RE")||(a.state.gs.turn.mainBattle?i+=L.Bad:i+=L.Never)}else u&&(i+=L.Bad);return i+=this.weighOpposition(t,l),i+=this.weighLanePlacement(t,e.lane,e.playerA),t.hints.includes("SD")&&(i+=this.weighSacrificeDemand(t)),i+=this.weighRank(t),i}weighStatChange(t){let i=0;return t.hints.includes("SD")&&(i+=this.weighSacrificeDemand(t)),i}weighDestroy(t){let i=0;const e=t.action;return a.field.ddf6(e).owner===this.aiPlayer?t.hints.includes("ST")?i+=L.Noice:i+=L.Horrid:i+=L.Noice,i}weighDmg(t){return 0}weighDiscard(t){let i=0,e;t.action.actionKey==="HDSC"?(a.state.gs.turn.mainBattle||(i+=L.Horrid),e=t.action.hostCard):(i+=L.Noice,e=t.action.card);const l=a.cards.getCard(e).aiHints();return l.includes("LV")?i+=L.Noice:l.includes("DL")&&(i+=L.Horrid),i}weighMove(t){let i=0;const e=t.action,s=a.field.jr5(e.param),l=s.owner===this.aiPlayer?1:-1,u=this.weighLanePlacement(t,s.lane,s.owner),y=this.weighLanePlacement(t,e.lane,s.owner)-u,A=a.field.searchByLane(a.field.oppositeLane(s.lane),!s.owner),T=this.weighOpposition(t,A),D=a.field.searchByLane(a.field.oppositeLane(e.lane),!s.owner),V=this.weighOpposition(t,D)-T;let j=0;D&&(t.hints.includes("FH")?j=L.Noice:t.hints.includes("FK")&&a.target.levelTestCommon(D.level,s.level)&&(j=L.Grand*2));const Y=(y+V+j)*l;return i+Y}weighLanePlacement(t,i,e){let s=0;const l=t.hints.includes("NX"),u=t.hints.includes("SL"),p=t.hints.includes("LJ");if(l?i===3?s+=L.Noice:s+=L.Bad:u&&(i===1||i===5?s+=L.Noice:s+=L.Bad),p){const y=d.crTarg();y.player=a.player.toTarget(e),y.lanes=a.field.adjacentPositions(i);const A=a.field.creatByTarget(y).length;A>0&&(s+=L.Noice*A)}return s}weighOpposition(t,i){let e=0;const s=t.hints.includes("OL"),l=t.hints.includes("OP");if(i){const u=i.aiHints(),p=u.includes("OL"),y=u.includes("OP");l?p?e+=L.Grand:y||(e+=L.Noice):s&&(y?e+=L.Horrid:p||(e+=L.Bad))}else l?e+=L.Bad:s&&(e+=L.Grand);return e}weighSacrificeDemand(t){let i=L.Never;const e=s=>{i{s.hints.includes("ST")?e(L.Grand*2):At.ddp9(1,At.creatValueFormula(s),s.attack,0)<2?e(L.Grand):e(L.Horrid)}),i}weighRank(t){let i=0,e=0;t.hints.every(u=>u==="UL1"?(e=1,!1):u==="UL2"?(e=2,!1):u==="UL3"?(e=3,!1):!0);const s=t.hints.includes("DL"),l=t.hints.includes("RH");if(l||s||e>0){const u=a.player.toPlayer(this.aiPlayer).rank;e>0&&(u>e?i+=L.Noice:i+=L.Horrid),s&&u===1&&(i+=L.Horrid*2),l&&(i+=L.Noice*(u-1))}return i}logHint(t){}logHintStarter(t,i){this.logHint(`Eval start - ${a.log.actionText(t)} / ${i}`)}}class Rr{logChains=!1;aiPlayer=!1;actEval=new Mr(this.aiPlayer);whiffActions=["CANC","DEET","SCRH"];committedVectors=[];evaluateActions(t,i=""){const e=t.filter(s=>this.whiffActions.indexOf(s.actionKey)===-1);return e.forEach(s=>{switch(s.actionKey){case "ACTV":case "CARD":const l=a.cards.getCard(s.hostCard),u=l.ddf7(s);if(u.final)s.evals=[[u]];else{const et=l.getCardActions(s);s.evals=this.evalSmoosh(this.evaluateActions(et,i+"--"),u)}break;case "FORG":const p=s,y=d.ddp4(s,p.playerA,p.lane,p.hostCard,!0);s.evals=[[y]];break;case "HDSC":s.evals=[[d.actionEval(s,"DC")]];break;case "HPLY":const A=s,T=ut.extractCardCode(A.card);if(T==="MTS"||T==="MTT"||T==="PRI"||T==="OBB")s.evals=[[d.actionEval(s,"NR")]];else{const et=a.action.getPlayCardActions(A);s.evals=this.evalSmoosh(this.evaluateActions(et))}break;case "MEND":const D=d.actionEval(s,"MC"),N=a.field.jr5(s.param),V=s;D.hints=N.aiHints();const j=d.ddp1(N.owner,N.lane);j.moveTo=V.lane,D.vectors.push(j),s.evals=[[D]];break;case "MOVE":const Y=a.action.getMoveCardActions(s);s.evals=this.evalSmoosh(this.evaluateActions(Y));break;case "NOTR":s.evals=[[d.actionEval(s,"NO")]];break;case "FITE":s.evals=[[d.actionEval(s,"FT")]];break;case "ENDT":s.evals=[[d.actionEval(s,"DT")]];break;default:s.evals=[],console.error("Encountered action that AI could not evaluate:",s)}}),e}evalSmoosh(t,i){const e=t.map(s=>s.evals||[]).flat();return i?e.map(s=>[i,...s]):e}processAction(t){const i=this.evaluateActions(t),e=At.fromState(),s=e.boardStats();let l=-9999;const p=i.map(A=>{let T=-9999;return A.evals?.forEach(D=>{let N=0;D.forEach(tt=>{const Et=this.actEval.weighEval(tt);N+=Et});const V=e.clone(),j=D.map(tt=>tt.vectors).flat();V.applyVectors(j);const Y=V.boardStats(),et=!a.state.gs.turn.mainBattle;et&&V.applyCombat(),V.applyTurnEnd(et,this.aiPlayer);const J=V.weighState(s,Y,this.aiPlayer);N=Math.round((N+J.formula)*2)/2,N>T&&(T=N)}),T>l&&(l=T),{action:A,weight:T}}).filter(A=>A.weight===l),y=p[a.randInt(0,p.length)].action;a.sleep(500).then(()=>{a.action.handleAction(y)})}logChain(t){}jr7(t,i=3){return`${t}${i}`}jr6(t,i){const e=a.randInt(0,i.length),s=i[e];return i.splice(e,1),a.field.birthCreature(t,"F",this.aiPlayer,s)}cheater(){const t=a.state.gs;if(!(t.aiMode&&t.aiActive&&t.options.cheater))return!1;const i=a.player.toPlayer(this.aiPlayer),e=a.player.toPlayer(!this.aiPlayer),s=e.health-i.health;let l=0;s>85?l=3:s>65?l=2:s>45&&(l=1);const u=a.field.emptyLanes(this.aiPlayer);if(l===0||u.length===0)return!1;a.log.new().plr(this.aiPlayer).txt(" is a cheaty cheaterton.").go();let p=0;if(l===1){if(t.turn.regularPlays-=1,p=a.randInt(0,13),p===0)this.jr6(this.jr7("HTR"),u);else if(p===1)this.jr6(this.jr7("AGM"),u).addRegen(8);else if(p===2){const y=this.jr6(this.jr7("YNS"),u);y.buff(0,15),y.addRegen(4)}else if(p===3)this.jr6(this.jr7("TBA"),u);else if(p===4)this.jr6(this.jr7("DCS"),u);else if(p===5)this.jr6(this.jr7("GGP"),u).addRegen(8);else if(p===6){const y=this.jr6(this.jr7("WFM"),u);y.aggressive=!0}else if(p===7){const y=this.jr6(this.jr7("FFU"),u);y.aggressive=!0}else if(p===8){const y=this.jr6(this.jr7("URB"),u);y.aggressive=!0}else if(p===9){const y=this.jr6(this.jr7("KOD"),u);y.aggressive=!0,y.addRegen(6)}else if(p===10)this.jr6(this.jr7("AGK"),u).addArmor(3);else if(p===11){const y=this.jr6(this.jr7("PSC"),u);y.aggressive=!0}else if(p===12){const y=this.jr6(this.jr7("SAD"),u);y.aggressive=!0}}else if(l===2)if(t.turn.regularPlays-=1,p=a.randInt(0,17),p===0){const y=this.jr6(this.jr7("NDR"),u);y.aggressive=!0}else if(p===1){const y=this.jr6(this.jr7("CSW"),u);y.aggressive=!0}else if(p===2)this.jr6(this.jr7("GGD"),u).addRegen(6);else if(p===3)this.jr6(this.jr7("EFP"),u);else if(p===4)this.jr6(this.jr7("ZTU"),u);else if(p===5){const y=this.jr6(this.jr7("DDD"),u);y.aggressive=!0}else if(p===6)this.jr6(this.jr7("RBH"),u).addRegen(8);else if(p===7)this.jr6(this.jr7("SFT"),u);else if(p===8)this.jr6(this.jr7("GTT"),u);else if(p===9)this.jr6(this.jr7("SMD"),u);else if(u.length===5)this.jr6(this.jr7("DFB"),u),[1,2,3,4].forEach(y=>this.jr6(this.jr7("XHS"),u));else if(u.length===4)this.jr6(this.jr7("LMV"),u);else if(u.length===3)this.jr6(this.jr7("LHY"),u),this.jr6(this.jr7("SVH"),u),this.jr6(this.jr7("DBA"),u);else if(u.length===2)this.jr6(this.jr7("UTR"),u),this.jr6(this.jr7("TDS"),u);else if(i.turn===4)this.jr6(this.jr7("SSR"),u);else if(i.turn===1)this.jr6(this.jr7("ESK"),u);else{const y=this.jr6(this.jr7("XSH"),u);y.aggressive=!0}else if(l===3)if(p=a.randInt(0,20),p===0){const y=this.jr6(this.jr7("IHA",4),u);y.aggressive=!0}else if(p===1)this.jr6(this.jr7("CHR"),u);else if(p===2)this.jr6(this.jr7("FGO",1),u);else if(p===3)this.jr6(this.jr7("CHV",4),u);else if(p===4)this.jr6(this.jr7("KKK",4),u);else if(i.health<20){const y=this.jr6(this.jr7("ODC",4),u);y.aggressive=!0}else if(u.length===5){const y=a.randInt(0,4);if(y===0)[1,2,3,4,5].forEach(A=>this.jr6(this.jr7("UWL",2),u));else if(y===1)[1,2].forEach(A=>this.jr6(this.jr7("DFB"),u)),[1,2,3].forEach(A=>this.jr6(this.jr7("FFD"),u));else if(y===2)[1,2,3,4,5].forEach(A=>this.jr6(this.jr7("BWK"),u));else if(y===3){this.jr6(this.jr7("SBG"),u),this.jr6(this.jr7("EWE"),u);const A=this.jr6(this.jr7("BMY"),u);A.defender=!0,A.aggressive=!0}}else if(e.health>350)i.health<180&&a.player.healPlayer(i,180-i.health),this.jr6(this.jr7("AGD"),u);else if(e.health>250)this.jr6(this.jr7("FGO"),u);else if(u.length===4){const y=a.randInt(0,3);y===0?(this.jr6(this.jr7("AGK"),u),[1,2,3].forEach(A=>this.jr6(this.jr7("VBK"),u))):y===1?(this.jr6(this.jr7("TDS"),u),this.jr6(this.jr7("TDS"),u),this.jr6(this.jr7("UTR"),u)):y===2&&[1,2,3,4].forEach(A=>this.jr6(this.jr7("CDC"),u))}else if(u.length===3)if(a.randInt(0,2)){this.jr6(this.jr7("SDR"),u),this.jr6(this.jr7("SDR"),u);const y=this.jr6(this.jr7("UPM"),u);y.aggressive=!0}else{this.jr6(this.jr7("SDL"),u);const y=this.jr6(this.jr7("NFF"),u);y.aggressive=!0}else if(u.length===2)this.jr6(this.jr7("SPM"),u),this.jr6(this.jr7("SPM"),u);else{const y=this.jr6(this.jr7("NXC"),u);y.buff(10,0),y.aggressive=!0,y.addMobility(2),y.addRegen(5)}return i.health<30&&a.player.healPlayer(i,50-i.health),!0}}class Lr{get youi(){return a.state.gs.ui}initDeck(t,i){this.youi.deckContents=t,this.youi.deckScroll=0,this.youi.deckSummary=i,a.mode.setMode("D")}get canPageDown(){return this.youi.deckContents.length-this.youi.deckScroll>15}get canPageUp(){return this.youi.deckScroll>0}paginate(t){t?this.youi.deckScroll+=15:this.youi.deckScroll-=15}visibleContent(){const t=this.youi.deckScroll;return this.youi.deckContents.slice(t,t+15)}generateContent(t,i,e){const s=a.target.cardByTarget(t,e);if(s.sort((l,u)=>{const p=l[0],y=u[0];return y===p?0:p>y?1:-1}),i){const l=s.length;let u=0,p="",y=0;const A=[];for(;u0&&A.push({cardCode:p,sourceIdx:-1,cardCount:y}),p=s[u][0],y=1),u++;return l>0&&A.push({cardCode:p,sourceIdx:-1,cardCount:y}),A}else return s.map(l=>({cardCode:l[0],sourceIdx:l[1],cardCount:0}))}handleShowDeck(t){const i=a.state.getActivePlayer();this.showDeck(i,t.param==="VD")}handleDeckScroll(t){this.paginate(t.param==="D"),a.drawing.drawAll()}showPlayerDeck(t){this.showDeck(t,!1)}showPlayerDiscard(t){this.showDeck(t,!1)}showCustomDeck(t,i){this.initDeck(t,!1);const e=this.rightClickers();a.action.ddf5(i.concat(e))}showDeck(t,i){const e=a.player.toPlayer(t);this.initDeck(this.generateContent(i?e.discard:e.deck,!0),!0);const s=a.action.cancelAction();s.actionKey="CNCL",s.param="PM";const l=this.rightClickers();l.push(s),a.action.ddf5(l)}rightClickers(){return this.youi.deckContents.map((t,i)=>{const e=d.deckSelectAction("DEET",t.cardCode,i);return e.param=t.cardCode,e})}}class Ir{handleMainMenuButton(t){t.param==="D"?(a.mode.setMode("R"),a.state.gs.options.wasDrafting=!0,a.draft.startDraft(!1,!1)):t.param==="C"?(a.mode.setMode("P"),a.state.gs.options.wasDrafting=!1,a.action.ddf5(this.generateDeckPickerActions())):t.param==="I"?(a.mode.setMode("I"),a.drawing.drawAll()):window.open("deckbuilder.html")}handleMenuButton(t){if(t.param==="RP")if(a.log.clearAll(),a.state.gs.options.wasDrafting)a.draft.startDraft(!1,!0);else{const i=a.state.gs.options.wasRandCards?a.pack.treatsAbound(!0):a.pack.randomStockDeck();a.state.gs.newGame(a.state.gs.options.playerDeck,i.cards)}else if(t.param==="MM")a.mode.setMode("M"),a.log.clearAll(),a.drawing.drawAll();else if(t.param==="LK")a.pack.loadFromFile().then(i=>{Array.isArray(i)?this.launchConstructed(i):new Re().iAmError(i)});else if(t.param==="GP")a.state.toggleOption("fatPacks"),a.drawing.drawAll();else if(t.param==="LD")a.state.toggleOption("legDraft"),a.drawing.drawAll();else if(t.param==="HH")a.state.toggleOption("highHealth"),a.drawing.drawAll();else if(t.param==="CH")a.state.toggleOption("cheater"),a.drawing.drawAll();else if(t.param==="BB")a.state.toggleOption("bark"),a.drawing.drawAll();else if(t.param==="BC")a.state.toggleOption("bigCards"),a.drawing.drawAll();else if(t.param==="90"){const i=a.state.gs.options.scale==="90"?"100":"90";a.drawing.changeScale(i),a.drawing.drawAll()}else t.param==="RU"?window.open("https://grousewood-games.github.io/solforge/docs/rules"):t.param==="FQ"?window.open("https://grousewood-games.github.io/solforge/docs/faq"):console.error("missing handler for menu button param "+t.param)}handleUIButton(t){t.param==="DM"?(a.state.setClickMode("I"),a.drawing.drawAll()):t.param==="TM"?(a.state.setClickMode("T"),a.drawing.drawAll()):t.param==="EX"?(a.mode.setMode("X"),a.action.ddf5(this.generateExitActions())):console.error("missing handler for common button param "+t.param)}handleDeckPick(t){let i;if(t.param==="~random~")i=a.pack.randomStockDeck();else if(t.param==="~dogs~")i=a.pack.treatsAbound(!0);else{const e=a.deTil(t.param);i=a.pack.stockDeckByName(e[0],e[1])}a.state.gs.options.wasRandCards=t.param==="~dogs~",this.launchConstructed(i.cards)}generateDeckPickerActions(t=-1){const i=Zt.map((e,s)=>{const l=d.basicAction("DSET");return l.param=s.toString(),l});if(t>-1){const e=Zt[t],s=e.decks.map(l=>{const u=d.basicAction("DECK");return u.param=a.enTil(e.id,l.name),u});return i.concat(s)}return i}generateExitActions(){const t=d.basicAction("CANC");return t.param="PM",[t,d.menuButtonAction("MM")]}launchConstructed(t){a.state.gs.options.playerDeck=t;const i=a.state.gs.options.wasRandCards?a.pack.treatsAbound(!0):a.pack.randomStockDeck();a.mode.setMode("G"),a.state.gs.newGame(t,i.cards)}}class Gr{constructor(){this.loader=document.getElementById("fileupload"),this.loader.addEventListener("change",t=>this.loadInputHandler(t))}shuffleDeck(t){const i=a.player.toPlayer(t),e=[],s=[];if(i.deck.forEach(l=>{a.cards.getCard(l).consistent?e.push(l):s.push(l)}),e.length===0)this.shuffle(i.deck);else{this.shuffle(s);const l=20-e.length,u=e.concat(s.slice(0,l));this.shuffle(u),i.deck=s.slice(l).concat(u)}}shuffle(t){const i=t.length,e=(s,l)=>{const u=t[s];t[s]=t[l],t[l]=u};if(i>0){let s,l;const u=i*4;for(let p=0;pe.decks).flat(),i=a.randInt(0,t.length);return t[i]}stockDeckByName(t,i){let e;if(Zt.some(s=>s.id===t?s.decks.some(l=>{l.name===i&&(e=l)}):!1),e)return e;throw new Error("Stock Deck not found: Set: "+t+"; Name: "+i)}ripper(t,i,e){const s=[[15,8,5],[30,15,10]],l=this.getDeckCards([],[t]),u=[],p=s[e===15?0:1][i-1];for(;u.lengthD===T)||u.push(T)}const y=u.map(A=>({card:A,num:i}));return i===2&&e===15&&(y[0].num=1),y}deckify(t){const i=t.map(e=>{const s=Te.find(l=>l[0]===e);return s?s[1]:[]}).flat();return t.concat(i).map(e=>`${e}1`)}parseDeck(t){const i=t.map(e=>Array(e.num).fill(e.card)).flat();return this.deckify(i)}validDeck(t){const i={};t.forEach(A=>{i[A.card]?i[A.card]+=A.num:i[A.card]=A.num});const e=Object.entries(i).map(A=>({card:A[0],num:A[1]})),s=e.map(A=>A.num).reduce((A,T)=>A+T,0);if(s!==30)return"Deck must have 30 cards, found "+s;const l=[];let u="";if(e.some(A=>{const T=Pt.findIndex(D=>D.crd===A.card);return T===-1?(u=A.card,!0):(l.push(Pt[T].fct),!1)}))return`Invalid card code: '${u}'`;let p=0;if(e.some(A=>A.num>3?(u=A.card,p=A.num,!0):!1))return`${p} copies of '${u}' ${a.log.fastName(u)}`;const y=[...new Set(l)];return y.length>2?"Deck must have two or less factions, found: "+y.join():""}getDeckCards(t=[],i=[]){return t.length===0&&i.length===0?Pt.map(e=>e.crd):t.length>0&&i.length>0?Pt.filter(e=>t.includes(e.rty)&&i.includes(e.fct)).map(e=>e.crd):t.length>0?Pt.filter(e=>t.includes(e.rty)).map(e=>e.crd):Pt.filter(e=>i.includes(e.fct)).map(e=>e.crd)}getCardFaction(t){const i=Pt.find(e=>e.crd===t);return i?i.fct:"X"}getCardRarity(t){const i=Pt.find(e=>e.crd===t);return i?i.rty:"T"}cardStats(){ke.forEach(t=>{const i=`${a.log.factionText(t)} total: ${this.getDeckCards(void 0,[t]).length}; `,e=le.map(s=>`${a.log.rarityText(s)}: ${this.getDeckCards([s],[t]).length}`).join("; ");console.log(i+e)})}loadPromise=new xe;fileguts="";loader;async loadFromFile(){if(this.loadPromise=new xe,this.loader.click(),await this.loadPromise.getPromise(),this.fileguts==="")return"";if(this.fileguts.startsWith("!")){const s=this.fileguts.substring(1);return this.fileguts="",s}const t=JSON.parse(this.fileguts);this.fileguts="";const i=t.cards,e=this.validDeck(i);return e||i}readError(t){this.fileguts="!"+t,this.loadPromise.resolveMe()}loadInputHandler(t){const i=this.loader.files;if(i&&i.length>0){const s=i[0];var e=new FileReader;e.onload=l=>{try{var u=e.result;if(u){var p=JSON.parse(new TextDecoder("utf-8").decode(new Uint8Array(u)));p.cards&&Array.isArray(p.cards)&&!p.cards.some(y=>!(y&&typeof y.card=="string"&&Number.isInteger(y.num)))?(this.fileguts=JSON.stringify(p),this.loadPromise.resolveMe()):this.readError("File format is incorrect.")}else this.readError("File read was empty.")}catch(y){console.error(y),this.readError("Error occurred while reading file.")}};try{e.readAsArrayBuffer(s)}catch{this.readError("Could not read file.")}}else this.loadPromise.resolveMe()}}class xe{realPromise;resolveMe(){}rejectMe(){}getPromise(){return this.realPromise}constructor(){this.realPromise=new Promise((t,i)=>{this.resolveMe=t,this.rejectMe=i})}}class $r{rarityCache={["L"]:[],["H"]:[],["R"]:[],["C"]:[],["T"]:[]};faction1="X";faction2="X";factionLock=!1;picks=[];currentPack=[];paginating=!1;aiPicking=!1;packOdds=[];legMode=!1;startDraft(t,i){!t&&i?this.startDraft(!0,!1):(t||(a.state.gs.options.playerDeck=[]),this.aiPicking=t,this.legMode=a.state.gs.options.legDraft,this.paginating=!1,this.packOdds=a.state.gs.options.fatPacks?[9,31,40]:[5,25,40],le.forEach(e=>{this.rarityCache[e]=a.pack.getDeckCards([e])}),this.faction1="X",this.faction2="X",this.factionLock=!1,this.picks=[],this.resumeDraft(""))}resumeDraft(t){if(t){if(this.picks.push(t),this.picks.length===30){let s=this.picksAsDeck();this.aiPicking?a.state.gs.options.playerDeck.length>0&&(a.mode.setMode("G"),a.state.gs.newGame(a.state.gs.options.playerDeck,this.picksAsDeck())):(this.startDraft(!0,!1),a.state.gs.options.playerDeck=s,a.mode.setMode("G"),a.state.gs.newGame(s,this.picksAsDeck()));return}if(!this.factionLock){const s=a.pack.getCardFaction(t);this.faction1==="X"?this.faction1=s:s!==this.faction1&&(this.faction2=s,this.factionLock=!0,le.forEach(l=>{this.rarityCache[l]=a.pack.getDeckCards([l],[this.faction1,this.faction2])}))}}const i=this.generatePack().slice(-1*(6-this.picks.length%5)),e=this.fillPack(i);if(this.aiPicking)this.resumeDraft(e[e.length-1]);else{this.currentPack=e;const s=e.map((l,u)=>{const p=d.draftSelectAction("DRFT",u,!0);return p.param=l,p});a.action.ddf5(s)}}picksAsDeck(){const t=[];return this.picks.forEach(i=>{const e=t.findIndex(s=>s.card===i);e===-1?t.push({card:i,num:1}):t[e].num+=1}),t.sort((i,e)=>{const s=a.cards.getCard(i.card+"1"),l=a.cards.getCard(e.card+"1");return s.name.toLowerCase(){const s=this.rarityCache[e].length;let l=!0;for(;l;){const u=this.rarityCache[e][a.randInt(0,s)];i.includes(u)||(i.push(u),l=!1)}}),i}}class Fe{id;dom;context;width;height;constructor(t){if(this.id=t,this.dom=document.getElementById(t),!this.dom)throw new Error(`Could not find canvas id ${t}`);this.context=this.dom.getContext("2d"),this.width=this.dom.width,this.height=this.dom.height,this.context.textBaseline="top",this.context.shadowOffsetX=1,this.context.shadowOffsetY=1}show(){this.dom.hidden=!1}hide(){this.dom.hidden=!0}get visible(){return!this.dom.hidden}clear(){this.context.clearRect(0,0,this.width,this.height)}sprite(t,i,e){this.context.drawImage(t,i,e)}updateScale(t){this.context.scale(t,t)}}class Vr{registry;constructor(){this.registry={}}register(t){if(this.registry[t])throw new Error(`Double registration of canvas ${t}`);this.registry[t]=new Fe(t)}get(t){return this.registry[t]}}class gt{getCanv(t){return t instanceof Fe?t:a.canvases.get(t)}async drawSprite(t,i,e,s,l={}){const u=this.getCanv(t).context,p=await a.getSprite(a.imgRoot+i);let y=1;l&&(y=l.alpha??1),y<1&&(u.globalAlpha=y),u.drawImage(p,e,s,p.naturalWidth,p.naturalHeight),y<1&&(u.globalAlpha=1)}async drawText(t,i,e,s,l={}){const u=this.getCanv(t).context,p=l.fontSize??24;a.state.gs.pxRatio===2&&(s=this.retinaTextY(s,p)),u.fillStyle=l.colour||"#000000",u.font=`${p}px ${l.fontName||"cinzel"}`,u.shadowColor=l.shadow?"#000000":"#00000000",u.fillText(i,e,s),u.shadowColor="#00000000"}async spriteNumber(t,i,e,s,l,u){let p=e-this.numOffset(i,l);const y=[];i.toString().split("").forEach(A=>{y.push(this.drawSprite(t,this.numSpriteUrl(A,l,u),p,s)),p+=this.numSize(A,l)}),await Promise.all(y)}async drawHighlight(t,i,e,s,l,u="#00FF00"){const p=u.length===7?u.concat("aa"):u,y=this.getCanv(t);y.context.strokeStyle=p,y.context.beginPath(),y.context.rect(i,e,s,l),y.context.stroke()}hlColour(t){return t==="CANC"?"#FF0000":"#00FF00"}drawRarity(t,i,e,s){return this.drawSprite(t,`icons/rarity/new/${a.log.rarityText(i).toLowerCase()}.png`,e,s)}drawFaction(t,i,e,s){const l=i==="T"?2:0;return this.drawSprite(t,`icons/faction/${a.log.factionText(i).toLowerCase()}.png`,e+l,s+3)}retinaTextY(t,i){let e;return i<21?e=6:i<27?e=7:e=8,t-e}smallNumSize={"-":7,0:10,1:9,2:10,3:8,4:10,5:9,6:10,7:9,8:8,9:9};bigNumSize={"-":8,0:13,1:9,2:13,3:11,4:14,5:12,6:12,7:12,8:12,9:12};numSize(t,i){return i==="S"?this.smallNumSize[t]:this.bigNumSize[t]}numOffset(t,i){const e=t.toString().split("").reduce((s,l)=>s+this.numSize(l,i),0)-(i==="B"?2:1);return Math.floor(e/2)}numSpriteUrl(t,i,e){return`text/nums/${i}/${e}/${t}.png`}haze="#222222d8"}class jt extends gt{async drawButton(t,i,e,s,l,u=7,p=!1){let y,A;p?(y="ui/button/menu_on.png",A="#d7fc03"):(y="ui/button/menu_off.png",A="#00DEF7");const T=this.buttonBounds(i,e);await this.drawSprite(t,y,T[0],T[1]),await this.drawText(t,l,T[0]+7+u,T[1]+24,{colour:A,fontSize:30});const D=new U(s,...T,z.Both);a.clickers.add(D)}buttonBounds(t,i){return[t-7,i-7,232,69]}}class me extends gt{async makeIconButton(t,i,e,s){let u;u=`ui/button/ui_${s}.png`,await this.drawSprite(t,u,i,e);const p=d.basicAction("UIBT");p.param=s;const y=new U(p,i,e,40,40,z.Both);a.clickers.add(y)}async makeVScroller(t,i,e,s,l){const u=this.vScrollHilightBounds(i,e);await this.drawSprite(t,`ui/arrow/${s?"up":"down"}.png`,i,e);const p={zone:"N",actionKey:l,hostCard:"",param:s?"U":"D"},y=new U(p,...u,z.Both);a.clickers.add(y)}vScrollHilightBounds(t,i){return[t-3,i-3,40,27]}}class pe extends gt{async drawActions(t){if(a.mode.baseMode==="G"){const i=a.canvases.get("effects"),e=t.filter(s=>s.zone==="B");if(e.length>1&&console.error("Two button actions encountered in one batch",e),e.length===0||a.state.gs.aiActive||a.state.clickMode==="I"&&!a.mode.isDetailMode){const s=this.buttonBounds();await this.drawSprite(i,"ui/button/off.png",s[0],s[1])}else{const s=e[0],l=this.buttonBounds();await this.drawSprite(i,"ui/button/on.png",l[0],l[1]);let u;s.actionKey==="CARD"?u=s.param:u=s.actionKey,await this.drawSprite(i,`text/butt/${u}.png`,l[0]+23,l[1]+18);const p=this.highlightBounds(),y=new U(s,...p);s.actionKey==="CNCL"&&(y.mouse=z.Both),a.clickers.add(y)}}}buttonBounds(){return[856,406,160,63]}highlightBounds(){const t=this.buttonBounds(),i=5,e=[-1,-1,2,2];return t.map((s,l)=>s+i*e[l])}}class Ft extends gt{async drawCard(t,i,e,s){const l=this.getCanv(i),u=this.extractStats(t),p=u.cardClass;if(await this.drawSprite(l,p.image(!1),e+14,s+35),await this.drawSprite(l,this.frameImg(p.level,p.faction,p.type,!1),e,s),await this.drawSprite(l,`text/card/${p.cardCode()}.png`,e+12,s+16),u.isCreature){const y=s+178;await this.spriteNumber(l,u.att,e+24,y,"S","Y"),await this.spriteNumber(l,u.hlt,e+127,y,"S","Y")}if(u.sleeping&&await this.drawSprite(l,"icons/effects/defensive.png",e+5,s+40,{alpha:.7}),u.iconList.length>0){const y=e+57-17*(u.iconList.length-1);await Promise.all(u.iconList.map(async(A,T)=>this.drawIcon(l,y+T*35,s+140,A[0],A[1])))}}async drawBigCard(t,i,e,s){const l=this.extractStats(i);if(await this.drawSprite(t,i.image(!0),e+38,s+117),await this.drawSprite(t,this.frameImg(i.level,i.faction,i.type,!0),e,s),i.rarity!=="T"&&await this.drawRarity(t,i.rarity,e+309,s+394),l.isCreature){const u=s+555;await this.spriteNumber(t,l.att,e+44,u,"B","Y"),await this.spriteNumber(t,l.hlt,e+325,u,"B","Y")}}async drawIcon(t,i,e,s,l=0){const u=this.getCanv(t);if(await this.drawSprite(u,`icons/effects/${s}.png`,i,e),l>0){const p=s==="poison"?12:9;await this.spriteNumber(u,l,i+17,e+p,"S","B")}}extractStats(t){let i,e=!1,s=0,l=0,u=!1,p=0,y=!1,A=!1,T=!1,D=!1,N=0,V=0,j=0,Y=!1,et=!1;if(!(t instanceof ut))e=!0,s=t.attack,l=t.health,u=t.sleeping&&!t.aggressive,p=t.regen,y=t.breakthrough,A=t.defender,T=t.aggressive,N=t.armor,V=t.poison,j=t.mobility,D=t.changed,i=a.cards.getCard(t.code);else{if(t.type==="C"){e=!0;const tt=t;s=tt.jr1,l=tt.jr2,p=tt.initRegen,y=tt.initBT,A=tt.initDefend,T=tt.initAggro,N=tt.initArmor,j=tt.initMobile}Y=t.overload,et=t.consistent,i=t}const J=[];return Y&&J.push(["overload",0]),et&&J.push(["consistent",0]),p>0&&J.push(["regenerate",p]),y&&J.push(["breakthrough",0]),A&&J.push(["defender",0]),T&&J.push(["aggressive",0]),N>0&&J.push(["armor",N]),V>0&&J.push(["poison",V]),j>0&&J.push(["mobility",j]),D&&J.push(["changed",0]),{cardClass:i,isCreature:e,iconList:J,hlt:l,att:s,sleeping:u}}async drawHilight(t,i,e,s="#00FF00"){await super.drawHighlight(t,...this.highlightBounds(i,e),s)}cardBounds(t,i){return[t,i,150,205]}highlightBounds(t,i){const e=this.cardBounds(t,i),s=5,l=[-1,-1,2,2];return e.map((u,p)=>u+s*l[p])}frameImg(t,i,e,s){return`frames/${s?"big":"small"}/lvl${t}_${i}${e}.png`}levelImg(t){return`icons/frame/lvl${t}.png`}oldFrameImg(t){return`icons/frame/frame${t}.png`}factionImg(t){return`icons/faction/orb${t}.png`}}const Pe=30,oe=540,Be=5;class Ne extends gt{async drawCards(t){const i=a.canvases.get("hand");i.clear();const e=new Ft,s=e.highlightBounds(0,0)[2]+Be;let l=Pe;const u=this.paginatron(t);for(let p=u[0];p<=u[1];p++){const y=a.cards.getCard(t.hand[p]);await e.drawCard(y,i,l,oe),l+=s}}async drawActions(t){const i=a.state.clickMode!=="I",e=a.state.clickMode!=="T",s=a.canvases.get("effects"),l=new Ft,u=l.highlightBounds(0,0)[2]+Be,p=new vt(0,520,1e3,250),y=new vt(0,520,1e3,250,z.Right),A=this.paginatron(a.state.getActivePlayer());await Promise.all(t.filter(T=>T.zone==="H").map(async T=>{const D=T;if(D.position>=A[0]&&D.position<=A[1]){const N=Pe+(D.position-A[0])*u;if(e&&T.actionKey==="DEET"){const V=new U(T,...l.highlightBounds(N,oe),z.Right);y.addChild(V)}else if(i&&T.actionKey!=="DEET"){const V=new U(T,...l.highlightBounds(N,oe));p.addChild(V),await l.drawHilight(s,N,oe,this.hlColour(D.actionKey))}}})),i&&a.clickers.add(p),e&&a.clickers.add(y),A[0]>0&&await this.makeScroller(s,!1),A[1]0&&t.hand.length-i<5&&(i=Math.max(0,t.hand.length-5),a.state.gs.ui.handScrollLeft=i),[i,Math.min(i+4,t.hand.length-1),t.hand.length-1]}scrollHilightBounds(t,i){return[t-3,i-2,27,38]}async makeScroller(t,i){const e=i?894:856,s=726,l=this.scrollHilightBounds(e,s);await this.drawSprite(t,`ui/arrow/${i?"right":"left"}.png`,e,s),await this.drawHighlight(t,...l);const u={zone:"N",actionKey:"SCRH",hostCard:"",param:i?"R":"L"},p=new U(u,...l,z.Both);a.clickers.add(p)}}class ye extends gt{fieldBoundary=[17,62,821,443];async drawCards(t){const i=a.state.gs.isLocalA,e=a.canvases.get("field");e.clear();const s=new Ft,l=a.field.qActiveCreats().map(u=>{let p=0;t&&t.scrappers.some(A=>A[0]===u.lane&&A[1]===u.owner)&&(p=t.battlePhase);const y=this.coordCalc(u.lane,u.owner,i,p);return s.drawCard(u,e,...y)});if(await Promise.all(l),a.batch.iaTrigLane>0){const u=this.coordCalc(a.batch.iaTrigLane,a.state.ddf9(),i),p=s.cardBounds(...u);await this.drawSprite(e,"icons/rewards/gold.png",p[0]+p[2]/2-20,p[1]+p[3]+5)}}async drawActions(t){const i=a.state.clickMode!=="I",e=a.state.clickMode!=="T",s=a.state.gs.isLocalA,l=a.canvases.get("effects"),u=new Ft,p=new vt(...this.fieldBoundary),y=new vt(...this.fieldBoundary,z.Right);await Promise.all(t.filter(A=>A.zone==="F"||A.zone==="R").map(async A=>{if(A.zone==="R"&&i){const T=new U(A,...this.fieldBoundary);a.clickers.add(T),await this.drawHighlight(l,...this.fieldBoundary)}else{const T=A,D=this.coordCalc(T.lane,T.playerA,s);if(e&&A.actionKey==="DEET"){const N=new U(A,...u.highlightBounds(...D),z.Right);y.addChild(N)}else if(i&&A.actionKey!=="DEET"){const N=new U(A,...u.highlightBounds(...D));p.addChild(N),await u.drawHilight(l,...D,this.hlColour(T.actionKey))}}})),i&&p.childs.length>0&&a.clickers.add(p),e&&y.childs.length>0&&a.clickers.add(y)}async drawFight(t){if(t.length>0){const i={battlePhase:1,scrappers:t},e=72;await new pe().drawActions([]),await this.drawCards(i),await a.sleep(e),i.battlePhase=2,await this.drawCards(i),await a.sleep(e),i.battlePhase=3,await this.drawCards(i),await a.sleep(e),i.battlePhase=4,await this.drawCards(i),await a.sleep(e+70),i.battlePhase=3,await this.drawCards(i),await a.sleep(e),i.battlePhase=2,await this.drawCards(i),await a.sleep(e),i.battlePhase=1,await this.drawCards(i),await a.sleep(e)}}coordCalc(t,i,e,s=0){const l=e===i,u=166,p=5;let y,A,T;return[y,T,A]=l?[22,290,1]:[687,65,-1],[y+(t-1)*u*A,T+s*p*(-1*A)]}}class be extends gt{avatars=["barf","beee","behold","boof","crowley","darko","deert","eyebs","fine","furiousgeorge","ghoost","judge","kenta","nom","pupsky","skelly","stache"];async drawPlayer(t,i,e,s){const l=this.getCanv(i);await this.drawSprite(l,`avatar/${this.avatars[t.avatar]}.jpg`,e+46,s+48),await this.drawSprite(l,"ui/player_frame.png",e,s),await this.drawSprite(l,"ui/player_health.png",e+10,s+102),await this.spriteNumber(l,t.health,e+45,s+149,"B","G"),await this.drawText(l,`Turn: ${t.turn.toString()} Rank: ${t.rank.toString()}`,e+25,s+210,{colour:"#f5f242",fontSize:20}),await this.drawText(l,t.name,e+t.nameOffset,s+185,{colour:"#42a4f5",fontSize:20})}async drawAllPlayers(){const t=a.canvases.get("player");t.clear();const i=!a.state.gs.aiActive,e=a.state.getLocalPlayer(),s=a.state.getPlayer(!e.isPlayerA);if(await this.drawPlayer(e,t,...this.playerOrigin(!0)),await this.drawPlayer(s,t,...this.playerOrigin(!1)),e.isPlayerA===a.state.ddf9()){let l=862;const u=295,p=a.state.getRegularPlays(),y=Array(p).fill("blue").concat(a.state.gs.turn.freeCards.map(T=>T.sourceCard)),A=[];y.forEach(T=>{let D;if(T==="blue")D=T;else if(D="green",i){const N={actionKey:"DEET",zone:"N",hostCard:"",param:T},V=new U(N,l-1,u-1,28,41,z.Both);a.clickers.add(V)}A.push(this.drawSprite(t,`ui/${D}card.png`,l,u)),l+=30}),await Promise.all(A)}await this.drawDeckButton(t,e,!0,i),await this.drawDeckButton(t,e,!1,i)}async drawDeckButton(t,i,e,s){let l,u,p;if(e?(l=i.discard.length,u=935,p="T"):(l=i.deck.length,u=858,p="U"),await this.drawSprite(t,`ui/button/faction_${p}.png`,u,350),await this.spriteNumber(t,l,u+38,350+14,"S","Y"),l>0&&s){const A=d.basicAction("VWDK");A.param=e?"VD":"VR";const T=new U(A,u,350,77,44,z.Both);a.clickers.add(T)}}async drawActions(t){if(a.state.clickMode==="I")return;const i=a.canvases.get("effects"),e=a.state.gs.isLocalA;await Promise.all(t.filter(s=>s.zone==="P").map(s=>{const l=s,u=this.playerOrigin(l.playerA===e),p=this.highlightBounds(...u),y=new U(s,...p);return a.clickers.add(y),this.drawHighlight(i,...p)}))}playerOrigin(t){return[832,t?485:0]}playerBounds(t,i){return[t+18,i+18,170,170]}highlightBounds(t,i){return this.playerBounds(t,i)}async drawGameOver(){const t=a.canvases.get("field"),i=94,e=a.state.gs.isLocalA,s=a.state.gs.winFlag,l=e&&s===1||!e&&s===-1;await this.drawSprite(t,`ui/you-${l?"win":"lose"}.png`,i,89),a.clickers.removeAll();const u=new jt,p=a.canvases.get("effects");await u.drawButton(p,i+62,520,d.menuButtonAction("MM"),"Main Menu",20,!1),await u.drawButton(p,i+389,520,d.menuButtonAction("RP"),"Replay",55,!1)}}const He=15,Me=15,Or=5;class Ur extends gt{constructor(){super();const i=new Ft().highlightBounds(0,0);this.xOffset=i[2]+Or,this.yOffset=i[3]+25}xOffset;yOffset;async drawCards(){const t=a.canvases.get("decklist");t.clear(),t.context.fillStyle=this.haze,t.context.fillRect(0,0,849,a.gameHeight);const i=new Ft,s=a.deck.visibleContent().map((l,u)=>{const p=a.cards.getCard(l.cardCode),y=this.listXY(u);return i.drawCard(p,t,...y).then(()=>{if(l.cardCount>0)return this.drawCount(t,y[0]+62,y[1]+163,l.cardCount)})});await Promise.all(s)}async drawActions(t){const i=a.canvases.get("decklist"),e=new Ft,s=new me,l=a.state.clickMode!=="I",u=a.state.clickMode!=="T",p=a.deck.visibleContent(),y=a.state.gs.ui,A=y.deckScroll,T=A+15,D=y.deckSummary,N=D?z.Both:z.Right,V=new vt(...this.deckBoundary()),j=new vt(...this.deckBoundary(),N),Y=[];t.forEach(et=>{if(et.actionKey==="DEET"&&(u||D)){const J=et;if(J.position>=A&&J.positionEt.sourceIdx===J.position);if(tt>-1){const Et=this.listXY(tt-A),$t=new U(et,...e.highlightBounds(...Et));V.addChild($t),Y.push(e.drawHilight(i,...Et,this.hlColour(et.actionKey)))}}}),l&&V.childs.length>0&&a.clickers.add(V),(u||D)&&j.childs.length>0&&a.clickers.add(j),a.deck.canPageDown&&Y.push(s.makeVScroller(i,319,723,!1,"SCRK")),a.deck.canPageUp&&Y.push(s.makeVScroller(i,487,723,!0,"SCRK")),await Promise.all(Y)}async drawCount(t,i,e,s){await this.drawSprite(t,"ui/dullcard.png",i,e),await this.spriteNumber(t,s,i+13,e+13,"S","Y")}listXY(t){return[He+t%5*this.xOffset,Me+Math.floor(t/5)*this.yOffset]}deckBoundary(){return[He,Me,this.xOffset*5,this.yOffset*3]}}class Wr extends gt{async drawDetails(t){const i=[],e=a.canvases.get("card");e.clear(),e.context.fillStyle=this.haze,e.context.fillRect(0,0,849,a.gameHeight);const s=30,l=30,u=a.cards.getCard(a.details.currentCard),p=new Ft;a.state.gs.options.bigCards?i.push(p.drawBigCard(e,u,s,l)):i.push(p.drawCard(u,e,134,280));const y=435;let A=30;const T="#f5f242",D="#03fcfc",N=33,V=23,j=28;let Y=u.name;for(;Y.length>0;){A+=36;let it;if(Y.length{for(;it.length>0;){let kt;if(it.length1){const it=u.cardCode(),kt=tt===3?[19,147,270]:tt===2?[78,216]:[0,98,196,294];J.forEach((Vt,he)=>{i.push(this.drawLevelButton(e,it,Vt,40+kt[he],658,Vt===u.level))})}const Et=new jt;let $t=0;const ve=513,Ae=697,Le=74;a.mode.baseMode!=="G"&&(i.push(Et.drawButton(e,ve,Ae,t,"Close",65,!1)),$t++);const Xr=new U(t,s,l,377,603,z.Both);if(a.clickers.add(Xr),a.details.canGoBack){const it=a.details.goBackAction();i.push(Et.drawButton(e,ve,this.buttonY(Ae,$t,Le),it,"Back",72,!1)),$t++}a.details.friendos.forEach(it=>{const kt=a.cards.getCard(it),Vt=a.details.friendAction(it),he=a.details.friendTxt(kt.cardCode());i.push(Et.drawButton(e,ve,this.buttonY(Ae,$t,Le),Vt,he[1]||kt.name,he[0],!1)),$t++}),await Promise.all(i)}buttonY(t,i,e){return t-i*e}cardSummary(t){const i=a.log.factionText(t.faction),e=a.log.rarityText(t.rarity),s=a.log.cardTypeText(t.type);return`${i}, ${e} ${s}`}tribeSummary(t){return t.tribe.map(i=>a.log.tribeText(i)).join(" ")}async drawLevelButton(t,i,e,s,l,u){if(await this.drawSprite(t,`icons/frame/level${e}.png`,s,l),!u){const T=a.details.levelAction(e),D=new U(T,s-15,l-5,88,112,z.Both);a.clickers.add(D)}const y=a.cards.getCard(`${i}${e}`).levelSpice(),A=[[-16,55],[41,55],[25,62]];await Promise.all(y.map((T,D)=>{const N=s+A[D][0],V=l+A[D][1];if(T.icon==="A"||T.icon==="H"){let j,Y;return T.icon==="A"?(j="icons/frame/attack.png",Y=N+17):(j="icons/frame/health.png",Y=N+16),this.drawSprite(t,j,N-1,V-1).then(()=>this.spriteNumber(t,T.num,Y,V+10,"S","Y"))}else return Promise.resolve()}))}levelFun(t){return t.maxLevel===3?t.minLevel===1?[1,2,3]:[3]:t.maxLevel===t.minLevel?[t.minLevel]:t.maxLevel===4?[1,2,3,4]:[1,2]}}class zr extends gt{async drawPack(t,i){const e=new Ft,s=a.state.clickMode!=="I",l=a.state.clickMode!=="T",u=[],p=new vt(...this.packBoundary),y=new vt(...this.packBoundary,z.Right);t.filter(T=>T.pack).forEach(T=>{const D=this.coordCalcPack(T.index);if(T.actionKey==="DRFT"){const N=a.cards.getCard(T.param+"1");if(u.push(e.drawCard(N,i,...D).then(()=>this.drawRarity(i,N.rarity,D[0]+112,D[1]+4))),s){const V=new U(T,...e.highlightBounds(...D));p.addChild(V)}}else if(l){const N=new U(T,...e.highlightBounds(...D),z.Right);y.addChild(N)}}),s&&p.childs.length>0&&a.clickers.add(p),l&&y.childs.length>0&&a.clickers.add(y),await Promise.all(u)}async drawList(t,i){let e=170;const s=570,l=[],u=a.draft.picksAsDeck(),p=new vt(s,e,600,600,z.Both),y=t,A=15,T=a.draft.paginating;u.length>A&&await this.makeScroller(i,T),y.filter(D=>!D.pack).forEach(D=>{if(T===D.index>=A){const N=a.cards.getCard(D.param);l.push(this.drawFaction(i,N.faction,s,e),this.drawRarity(i,N.rarity,s+28,e),this.drawText(i,`${u[D.index].num}x ${N.name}`,s+65,e+7,{colour:"#f5f242"}));const V=new U(D,s,e-2,600,35,z.Both);p.addChild(V),e+=35}}),await Promise.all(l),a.clickers.add(p)}packBoundary=[17,190,537,480];coordCalcPack(t){const s=t%3,l=Math.floor(t/3);return[22+s*176,200+l*235]}async makeScroller(t,i){const e=new me,s=530,l=720;await e.makeVScroller(t,s,l,i,"SCRD")}}class Re extends gt{async drawSets(t,i){let e=200;const s=100,l=[],u=new vt(s,e,400,600);t.filter(D=>D.actionKey==="DSET").forEach(D=>{const N=Zt[parseInt(D.param)];l.push(this.drawText(i,N.name,s,e,{colour:"#f5f242"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const V=new U(D,s,e-2,400,35,z.Both);u.addChild(V),e+=45}),l.push(this.drawText(i,"Random Deck",s,e,{colour:"#ffa500"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const p=new U({actionKey:"DECK",zone:"N",param:"~random~",hostCard:""},s,e-2,400,35,z.Both);u.addChild(p),e+=45,l.push(this.drawText(i,"Random Cards",s,e,{colour:"#ffa500"}),this.drawSprite(i,"icons/chest_small.png",s-48,e-5));const y=new U({actionKey:"DECK",zone:"N",param:"~dogs~",hostCard:""},s,e-2,400,35,z.Both);u.addChild(y),a.clickers.add(u),await Promise.all(l);const A={actionKey:"MNBT",zone:"N",hostCard:"",param:"LK"};await new jt().drawButton(i,s-48,650,A,"LOAD FILE",32)}async drawList(t,i){let e=170;const s=570,l=[],u=new vt(s,e,600,600);t.filter(p=>p.actionKey==="DECK").forEach(p=>{const y=a.deTil(p.param),A=a.pack.stockDeckByName(y[0],y[1]);l.push(this.drawFaction(i,A.factions[0],s,e),this.drawText(i,A.name,s+65,e+7,{colour:"#f5f242"})),A.factions.length===2&&l.push(this.drawFaction(i,A.factions[1],s+28,e));const T=new U(p,s,e-2,600,35,z.Both);u.addChild(T),e+=35}),await Promise.all(l),a.clickers.add(u)}packBoundary=[17,190,537,480];coordCalcPack(t){const s=t%3,l=Math.floor(t/3);return[22+s*176,200+l*235]}iAmError(t){const i=a.canvases.get("game-ui");this.drawText(i,t,295,670,{colour:"#f5142e",fontSize:26})}}class Zr extends gt{async drawMenu(t){const i=new jt,e=80,s=45,l=34,u=240;let p=50,y=u;await this.textFun(p+28,y,"More Info",t),y+=s,await this.buttonMaker(t,i,p,y,"RU","RULES",66),y+=e,await this.buttonMaker(t,i,p,y,"FQ","INFO & FAQ",20),y+=e*3,await this.buttonMaker(t,i,p,y,"MM","MAIN MENU",20),p=404,y=u,await this.textFun(p+5,y,"Draft Modes",t),y+=s,await this.buttonMaker(t,i,p,y,"GP","GOOD PACKS",9,a.state.gs.options.fatPacks),y+=e,await this.buttonMaker(t,i,p,y,"LD","LEGENDARY",17,a.state.gs.options.legDraft),y+=e+l,await this.textFun(p+37,y,"UI Modes",t),y+=e-l,await this.buttonMaker(t,i,p,y,"90","90% SIZE",47,a.state.gs.options.scale==="90"),y+=e,await this.buttonMaker(t,i,p,y,"BC","BIG CARDS",29,a.state.gs.options.bigCards),p=757,y=u,await this.textFun(p+12,y,"Game Modes",t),y+=s,await this.buttonMaker(t,i,p,y,"HH","BIG HEALTH",20,a.state.gs.options.highHealth),y+=e,await this.buttonMaker(t,i,p,y,"CH","CHEATER",37,a.state.gs.options.cheater),y+=e,await this.buttonMaker(t,i,p,y,"BB","BATTLE BARK",13,a.state.gs.options.bark),await this.drawText(t,"v0.5.0",494,730,{fontSize:16,colour:"#7b68ee"})}async textFun(t,i,e,s){await this.drawText(s,e,t,i,{colour:"#f5f242",fontSize:30})}async buttonMaker(t,i,e,s,l,u,p=7,y=!1){const A={actionKey:"MNBT",zone:"N",hostCard:"",param:l};await i.drawButton(t,e,s,A,u,p,y)}}class Kr extends gt{async drawMenu(t){let e=22;await this.drawSprite(t,"ui/button/constructed.png",778,e);const s=new U(this.makeAction("C"),...this.buttHilightBounds(778,e),z.Both);a.clickers.add(s),e=148,await this.drawSprite(t,"ui/button/draft.png",778,e);const l=new U(this.makeAction("D"),...this.buttHilightBounds(778,e),z.Both);a.clickers.add(l),e=508,await this.drawSprite(t,"ui/button/deck.png",778,e);const u=new U(this.makeAction("B"),...this.buttHilightBounds(778,e),z.Both);a.clickers.add(u),e=634,await this.drawSprite(t,"ui/button/info.png",778,e);const p=new U(this.makeAction("I"),...this.buttHilightBounds(778,e),z.Both);a.clickers.add(p),await this.drawSprite(t,"gwg/gwg_red.png",58,0)}buttBounds(t,i){return[t,i,242,113]}buttHilightBounds(t,i){const s=[-3,-3,6,6];return this.buttBounds(t,i).map((l,u)=>l+s[u])}makeAction(t){return{zone:"N",actionKey:"MENU",hostCard:"",param:t}}}class Yr{gameWidth;gameHeight;spriteCache;action;ai;batch;canvases;cards;clickers;creat;death;deck;details;draft;drawing;effect;field;fight;log;menu;mode;pack;phase;player;state;target;trigger;turn;dogAudio;idnum=0;imgRoot;constructor(){this.spriteCache={},this.imgRoot="./img/",this.gameWidth=1024,this.gameHeight=768,this.action=new Pr,this.ai=new Rr,this.batch=new Ar,this.canvases=new Vr,this.cards=new gr,this.clickers=new Tr,this.creat=new Dr,this.death=new vr,this.deck=new Lr,this.details=new Nr,this.draft=new $r,this.drawing=new Hr,this.effect=new Er,this.field=new Sr,this.fight=new wr,this.log=new pr,this.menu=new Ir,this.mode=new yr,this.pack=new Gr,this.phase=new kr,this.player=new xr,this.state=new Br,this.target=new Fr,this.trigger=new br,this.turn=new Cr,this.dogAudio=document.getElementById("dogbark")}randInt(t,i){return Math.floor(Math.random()*(i-t))+t}isUn(t){return typeof t>"u"}async sleep(t){return new Promise(i=>{setTimeout(()=>{i()},t)})}async getSprite(t){return this.spriteCache[t]||(this.spriteCache[t]=this.imageLoader(t)),this.spriteCache[t]}async bulkLoadSprite(t){await Promise.all(t.map(i=>this.getSprite(`${this.imgRoot}${i}`)))}dogBark(){this.dogAudio.volume=.3,this.dogAudio.play()}genId(){return this.idnum+=1,"@"+this.idnum.toString(36)}resetIds(){this.idnum=0}enTil(...t){return t.join("~")}deTil(t){return t.split("~")}imageLoader(t){return new Promise(i=>{const e=new Image;e.onload=()=>{i(e)},e.src=t})}}const a=new Yr;window.onload=async()=>{await document.fonts.ready;let o=[];document.fonts.forEach(l=>{l.load(),o.push(l.loaded)}),await Promise.all(o),["game-ui","field","player","hand","effects","decklist","card"].forEach(l=>{a.canvases.register(l)});const i=a.canvases.get("effects");i.context.lineWidth=2;try{document.createEvent("TouchEvent"),a.state.setClickMode("T")}catch{}a.state.gs.pxRatio=window.devicePixelRatio;const e=l=>{const u=a.clickers.hitTest(l.pageX,l.pageY,l.button);u&&a.action.handleAction(u)},s=document.getElementById("solforge");s.addEventListener("click",e),s.addEventListener("contextmenu",l=>(l.preventDefault(),e(l),!1)),window.sfapi={details:l=>{a.details.init(l)}},a.state.restoreOptions(),a.state.gs.options.scale!=="100"&&a.drawing.changeScale(a.state.gs.options.scale),a.drawing.drawAll()}})();
Abraxas, Avatar of Kadras 0
Abyssal Brute0
Aegis Conscript 0
Aegis Knight 0
Aegis Pulse 0
Aegis Wings0
Aerial Surge 0
Aetherforge Oracle 0
Aetherguard 0
Aether Root 0
Aetherphage 0
Agamemnon 0
Alloyin General 0
Alloyin Highlander 0
Alloyin Strategist 0
Anatomize0
Anvillon Arbiter0
Anvillon Enforcer 0
Apocrymancer 0
Aquatic Embrace 0
Arboris, Grove Dragon 0
Arcflight Squadron 0
Ashurian Brawler 0
Ashurian Flamesculptor 0
Ashurian Mystic 0
Asir's Blessing 0
Ator, Thunder Titan0
Avalanche Guardian 0
Avalanche Invoker 0
Batterhide 0
Battletech Inventor0
Battle Techtician 0
Big Bad Bartok0
Binben, Lightning Herald 0
Blightskull Phantasm 0
Blight Walker 0
Blight Witch 0
Bonescythe Reaver 0
Borean Mystic 0
Borean Stormweaver 0
Borean Windweaver0
Botanimate 0
Brambleaxe Warrior 0
Bramblewood Guardian 0
Bramblewood Tracker 0
Branchweaver Druid 0
Brightsteel Gargoyle 0
Brightsteel Sentinal 0
Brighttusk Sower 0
Brimstone Tyrant0
Bron, Wild Tamer0
Bullwark Bash 0
Burnout 0
Byzerak Drake 0
Byzerak Frostmaiden 0
Byzerak Spitemage 0
Cadaverous Thicket 0
Calamity Fiend0
Call the Lightning 0
Catacomb Spider 0
Cavern Hydra 0
Cercee, Hand of Varna 0
Cerebral Scout 0
Chant of Dragonwatch0
Charnel Titan 0
Chistlehearth Archer 0
Chistlehearth Hunter 0
Chrogias 0
Cinderbound Barbarian 0
Cinder Colossus 0
Cinderfist Brawler 0
Cinder Mystic 0
Cindersmoke Wyvern 0
Citadel Guard 0
Cloudcleaver Titan 0
Conflagrate 0
Contagion Lord 0
Contagion Surge 0
Corpse Crawler 0
Corpulent Shambler 0
Crag Walker 0
Crucible Colossus 0
Crypt Conjurer 0
Crypt Slime0
Cull the Weak 0
Cultivate 0
Cypien Augmentation 0
Cypien Battlesuit 0
Cypien Infiltrator 0
Cypien Shieldwarden 0
Cypien Steelgraft 0
Darkfrost Reaper 0
Darkheart Wanderer 0
Darkshaper Savant 0
Death Current 0
Death Seeker 0
Deepbranch Ancient 0
Deepbranch Prowler 0
Deepmoss Raptor 0
Deepwood Bear Rider 0
Delpha, Chronosculptor 0
Digitize 0
Dirge Banshee0
Discordant Strike0
Disintigrate 0
Dissolve 0
Doomwing, Dire Drake 0
Dozer, the Dormant 0
Dreadbolt 0
Dr. Frankenbaum 0
Drix, the Mindwelder 0
Druid's Chant 0
Duskmaw, Twilight Drake0
Duskspire Zombie 0
Dryad's Boon 0
Dysian Broodqueen 0
Dysian Siphon 0
Dysian Sludge 0
Ebonbound Warlord 0
Ebonskull Knight 0
Echowisp 0
Electro Net 0
Emberwind Evoker 0
Energy Prison 0
Energy Surge 0
Enrage 0
Epidemic 0
Epoch Hawk0
Esperian Sage0
Esperian Scarab 0
Esperian Steelplate 0
Esperian Wartusk 0
Ether Hounds 0
Everflame Mystic 0
Everflame Phoenix 0
Explosive Demise 0
Fangwood Bear 0
Fangwood Ravager 0
Featherfang0
Fell Strider0
Fell Walker 0
Feral Instinct 0
Ferocious Roar 0
Fervent Assault 0
Firefist Uranti 0
Firelight Hunter0
Firemane Steed 0
Firestorm 0
Flameblade Champion 0
Flamebreak Invoker 0
Flamefury Shaman 0
Flame Lance 0
Flamerift Instigator 0
Flameshaper Savant 0
Flame Speaker 0
Flamestoke Shaman 0
Fleshfiend 0
Fleshreaver 0
Flowsteel Prototype 0
Flowstone Primordial 0
Forcefield 0
Forge Guardian Alpha 0
Forge Guardian Beta 0
Forge Guardian Delta 0
Forge Guardian Gamma 0
Forge Oracle 0
Forgeplate Minotaur 0
Forgeplate Sentry 0
Frostfang Maiden 0
Frostmane Dragon 0
Frostshatter Strike 0
Frostwild Tracker 0
Frozen Solid 0
Gauntlets of Sulgrim0
Gemheart Sprout 0
Gemhide Basher 0
Gemhide Ravager0
Ghastly Renewal 0
Ghastly Touch 0
Ghostscale Cobra 0
Ghox, Metamind Paragon 0
Glaceus, Tundra Tyrant 0
Glacial Colossus 0
Glacial Crush 0
Gloomfiend 0
Gloomreaper Witch 0
Gloomspire Wurm 0
Glowhive Siren 0
Glowstride Stag 0
Graveborn Glutton 0
Grave Geist 0
Grave Ghast 0
Grave Pact 0
Grimgaunt Devourer 0
Grimgaunt Doomrider 0
Grimgaunt Predator 0
Grimgaunt Spectre 0
Group Meal 0
Grove Huntress 0
Grove Matriarch 0
Hammerfang 0
Heart Tree 0
Heavy Artillery 0
Hellforged Avatar 0
Herald of Destruction 0
Hinterland Watchman 0
Howl of Xith0
Hungering Strike 0
Hunting Pack 0
Iceborn Fortitude 0
Ice Torrent 0
Infernal Visage0
Ionic Warcharger 0
Ironbeard, Hammer of Anvillon 0
Ironbound Reinforcements 0
Iron Maiden 0
Ironmind Acolyte 0
Iztek, Khan of Arrachtor 0
Jet Pack 0
Kadras Colossus 0
Kas, Arcweaver 0
Keeper of the Damned 0
Killion, Infinity Warden 0
Kitaru Sprite0
Korok, Khan of Kadras 0
Lash of Demara0
Lavafused Asir0
Leafkin Progenitor 0
Legion Titan 0
Lifeblood Dryad 0
Lifeshaper Savant 0
Lightbringer Cleric 0
Lightning Brand 0
Lightning Spark 0
Lightning Wyrm 0
Lightshield Patrol 0
Lug, Uranti Charger0
Lyria, Muse of Varna 0
Lysian Hydra 0
Lysian Rain0
Lysian Shard 0
Magma Hound 0
Marrow Fiend 0
Master of Elements 0
Matrix Warden 0
Mending Spring 0
Metamind Adept 0
Metamind Explorer 0
Metamind Infiltrator0
Metamind Operator 0
Metamind Overseer 0
Metamorphosis 0
Metasculpt 0
Metasight 0
Metatransfer 0
Mimicleaf 0
Mimicwurm 0
Misery Demon0
Mossbeard Patriarch 0
Munitions Drone 0
Nanoswarm 0
Nargath Bruiser 0
Nargath Warrior0
Natural Selection 0
Necroflay0
Necroslime 0
Necrotic Wurm 0
Necrovive 0
Nether Embrace 0
Nefrax, the Soulweaver 0
Nethershriek 0
Nexus Aeronaut 0
Nexus Core 0
Nexus Gunner 0
Nexus Pilot 0
Nexus Techtician 0
Nightgaunt 0
Nova, Grove Queen0
Noxious Cloud 0
Nuada, Faith's Flourish 0
Nyrali Ambusher 0
Nyrali Ooze 0
Nyrali Symbiote 0
Omnomnom 0
Onyxium Allomancer 0
Onyxium Marauder 0
Onyxium Phantasm 0
Oratek Battlebrand 0
Oratek Explosives 0
Oratek Warhammer 0
Oreian Battledroid 0
Oreian Fieldmarshal 0
Oreian Justicar 0
Oreian Peacekeeper 0
Oreian Scavenger0
Oreian Warwalker 0
Organ Harvester 0
Oros, Deepwood's Chosen 0
Ossuary Spirit 0
Overgrown Spineleaf 0
Overwhelming Force 0
Oxidon Spitter 0
Palladium Hindermind 0
Palladium Pulsemage 0
Palladium Simulacrum 0
Palladium Wave0
Perdition Guard0
Perilous Insight 0
Phalanx Squadron 0
Phytobomb 0
Poisoncoil 0
Portal Shade0
Power Torrent 0
Primal Surge 0
Primordial Slam 0
Progeny of Xith0
Pyre Giant 0
Pyre Song 0
Rageborn Hellion 0
Rage of Kadras 0
Ravenous Hydra 0
Razortooth Stalker 0
Restless Wanderers 0
Relic Hunter0
Riftlasher 0
Rimehorn Charger 0
Rite of the Grimgaunt 0
Roaming Warclaw0
Rootforged Avatar 0
Rumblestone Elemental0
Runebark Guardian 0
Runegrove Guardian 0
Runescarred Zombie 0
Runestorm Primordial 0
Ruthless Wanderers 0
Saberfang0
Sap 0
Savage Oath 0
Scatterspore Eidolon 0
Scatter the Seeds 0
Scavenger Scorpion 0
Scorchmane Dragon 0
Scourgeflame Sorcerer 0
Scout Drone 0
Scrapforge Titan 0
Scythe of Chiron0
Seal of Anvillon 0
Seal of Deepwood 0
Seal of Kadras 0
Seal of Tarsus 0
Seismic Adept 0
Shallow Grave 0
Shardbound Invoker 0
Shardclaw Crusher0
Shardplate Delver 0
Shardplate Mutant 0
Shardthief Druid 0
Shimmerfang Serpent 0
Sigmund Fraud 0
Skyknight Glider 0
Solstice Reveler 0
Sonic Burst 0
Sonic Pulse 0
Soothing Radiance 0
Soothsayer Hermit0
Sorrow Maiden0
Sorrow Harvester 0
Soul Drinker 0
Soul Harvest 0
Soulreap0
Soulscourge Grimgaunt0
Sparkblade Assassin 0
Spark Bot 0
Sparkbrand Asir 0
Sparksoul0
Sparktail Manticore0
Spiritbloom Dryad 0
Spiritcleave 0
Spiritflame Mystic 0
Spiritforge Sentinel 0
Spiritfrost Shaman 0
Spiritleash 0
Spirit Reaver 0
Spiritsteel Infiltrator0
Spiritstone Druid0
Spirit Torrent 0
Spite Hydra0
Spitesower Acolyte 0
Spore Torrent 0
Spring Dryad 0
Stag of Lys0
Staff of Vaerus0
Static Shock 0
Statis Warden 0
Steeleye Researcher0
Steelforged Avatar 0
Steelscale Dragon 0
Steelshaper Savant 0
Steelskin Spelunker 0
Steelwatch Guard0
Steelwelder Medic 0
Stone Brand 0
Stonefist Giant 0
Storm Bringer 0
Storm Caller 0
Stormforged Avatar 0
Stormspear0
Stouthide Stegadon 0
Stranglevine Hydra 0
Strength In Numbers 0
Stygian Lotus 0
Suruzal, Emissary of Varna 0
Swampmoss Lurker 0
Synapsis Oracle 0
Talin Stampede 0
Talisin, Bard of Abundance 0
Tangle 0
Tanglesprout 0
Tarsian Pact 0
Tarsus Deathweaver 0
Tarsus Necrolord0
Tech Explorer0
Technognome 0
Technosmith 0
Tech Upgrade 0
Thranik Ambusher0
Thundergale Invoker 0
Thundersaur 0
Thunderstomp0
Tomb Pillager 0
Toorgmai Guardian 0
Totembound Berserker0
Touch Of Blight 0
Tower Scout 0
Tower Vanguard 0
Toxic Spores 0
Tremorcharge 0
Tundra Watcher 0
Turnabout 0
Tuskin Grovekeeper0
Tuskin Sporelord 0
Twinstrength 0
Umbraglim Mantis 0
Umbruk Glider 0
Umbruk Icecrusher 0
Umbruk Lasher 0
Unrelenting Dead 0
Uranti Bolt 0
Uranti Cryomancer 0
Uranti Elementalist0
Uranti Heartseeker 0
Uranti Icemage 0
Uranti Warlord 0
Uranti Warstoker 0
Uriel Ironwing0
Uterradon Mauler 0
Uterradon Rex 0
Uterradon Ridgeback 0
Uterra Packmaster 0
Varna's Pact 0
Vault Blockade 0
Vault Technician 0
Vault Welder0
Vengeful Spirit 0
Venomdrinker0
Venomfang 0
Venomous Netherscale 0
Venomstrike0
Verdant Charge0
Verdant Grace 0
Violent Outburst0
Volcanic Giant 0
Vyric Ebonskull 0
Vyric's Embrace 0
Wallbreaker Yeti 0
Warbringer Uranti 0
War Merchant 0
War Tinker0
Warmonger Mod 0
Water Walker 0
Wegu, the Ancient0
Weirwood Patriarch 0
Weirwood Ranger 0
Whispers of Dendris0
Wildfire Maiden 0
Wildwood Sower 0
Windborn Hellion 0
Windcaller Shaman 0
Wind Primordial 0
Witherfrost Banshee 0
Witherfrost Succubus 0
Woebringer 0
Xithian Crusher 0
Xithian Direhound 0
Xithian Host 0
Xithian Hulk 0
Xithian Rotfiend 0
Xithian Shambler 0
Xrath, Dreadnight Of Varna 0
Xrath's Will 0
Yeti Warcaller 0
Yuru, the Necrosage 0
Zephyr Mage 0
Zimus, the Undying 0
Zombie Infantry 0
Zombie Titan 0
Zyx, Storm Herald