From b08779692a6737f03d111e77005ded7218e233f1 Mon Sep 17 00:00:00 2001 From: james-rae Date: Fri, 2 Feb 2024 19:10:36 -0500 Subject: [PATCH] :package: beta build v0.10.3 --- play/dist/solforge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/play/dist/solforge.js b/play/dist/solforge.js index 7e3ecd7..daf8be1 100644 --- a/play/dist/solforge.js +++ b/play/dist/solforge.js @@ -1,3 +1,3 @@ -(function(){"use strict";const je=["A","N","T","U"];const Re=["C","R","H","L"];const ee=[{c:"AAK",f:"T",r:"L",s:1,t:"C",ds:["AH"]},{c:"ABB",f:"N",r:"R",s:4,t:"C",dp:["SL"],ds:["RG","ZB"]},{c:"ABM",f:"N",r:"C",s:5,t:"C",dp:["AB"]},{c:"AGC",f:"A",r:"C",s:1,t:"C",ds:["AR"]},{c:"AGK",f:"A",r:"L",s:2.1,t:"C",dp:["AR"]},{c:"AGP",f:"A",r:"C",s:1.1,t:"S",ds:["AR"]},{c:"AGW",f:"A",r:"R",s:4,t:"S",dp:["AH"],ds:["AR","MV"]},{c:"ASG",f:"T",r:"R",s:1,t:"S",ds:["MV","SP","LV"]},{c:"AMS",f:"A",r:"H",s:5,t:"C",dp:["MM"],ds:["MV"]},{c:"AFO",f:"A",r:"C",s:2.1,t:"C",dp:["LV"],ds:["SP"]},{c:"ATG",f:"A",r:"C",s:2,t:"C",dp:["SP"],ds:["AR","RB"]},{c:"ATP",f:"U",r:"H",s:3,t:"C",dn:["SP","CD"]},{c:"ART",f:"U",r:"H",s:2.1,t:"C",dp:["MU","SP","PL"]},{c:"ATS",f:"T",r:"C",s:6,t:"C",ds:["SP","MV"]},{c:"AGM",f:"T",r:"L",s:2.2,t:"C",dp:["XA"],ds:["RG","AR","MV"]},{c:"ALG",f:"A",r:"R",s:1,t:"C",ds:["AH"]},{c:"AHL",f:"A",r:"H",s:1,t:"C",dp:["HL"],ds:["RB"]},{c:"ALS",f:"A",r:"H",s:2,t:"C",ds:["AH","MV"]},{c:"ASB",f:"A",r:"L",s:6,t:"C",dp:["MS","SB"]},{c:"AAA",f:"A",r:"L",s:5.1,t:"C",dp:["HL"],dn:["FC","AG","BN"]},{c:"ABE",f:"A",r:"H",s:5.1,t:"S",ds:["HL","TD"],dn:["GW"]},{c:"ATZ",f:"A",r:"C",s:4,t:"S",ds:["FR","AL","SP"]},{c:"AEC",f:"U",r:"L",s:5,t:"S",ds:["GW"]},{c:"ARB",f:"A",r:"H",s:4,t:"C",ds:["AR","RB"],dn:["TK","LZ"]},{c:"AEN",f:"A",r:"C",s:2,t:"C",dp:[],ds:["RB","AR"],dn:[]},{c:"APM",f:"A",r:"H",s:2,t:"C",dp:["MA","LV"],ds:["SP"]},{c:"AQE",f:"T",r:"C",s:1,t:"S",ds:["HR"]},{c:"AGD",f:"U",r:"L",s:1,t:"C",dp:["LG"],ds:["DR"]},{c:"AFS",f:"A",r:"L",s:1,t:"C",dp:["RB"],ds:["FR","VT"]},{c:"AWU",f:"T",r:"R",s:6,t:"C",dp:["MV"],ds:["BN"]},{c:"ASQ",f:"N",r:"L",s:6,t:"C",ds:["RV"]},{c:"AOP",f:"A",r:"R",s:7,t:"S",ds:["AH"]},{c:"AMD",f:"T",r:"H",s:5,t:"C",dp:["FC"],ds:["AG"]},{c:"ABR",f:"T",r:"C",s:2,t:"C",dp:["FC"]},{c:"AFR",f:"T",r:"H",s:3.1,t:"C",dp:["MT","SP"],ds:["CS"]},{c:"AMY",f:"T",r:"C",s:1,t:"C",dp:["FC"]},{c:"ABL",f:"T",r:"R",s:1,t:"S",ds:["FC"]},{c:"ATT",f:"T",r:"L",s:4.1,t:"C",ds:["FC","AG","AS"]},{c:"AMP",f:"A",r:"H",s:7,t:"C",ds:["RB","AR"]},{c:"AGU",f:"T",r:"R",s:2.1,t:"C",ds:["WL","MV"]},{c:"AIV",f:"T",r:"H",s:1,t:"C",dp:["MT"],ds:["RK"]},{c:"ATI",f:"T",r:"L",s:7.2,t:"C",dp:["SP"],ds:["FR","MV","DR"]},{c:"BRS",f:"A",r:"C",s:5,t:"C",dn:["FC","AG","BN"]},{c:"BTB",f:"A",r:"R",s:5,t:"C",dp:["AR"],ds:["RB","DI"]},{c:"BTH",f:"U",r:"R",s:3,t:"C",ds:["DI","CS"]},{c:"BTI",f:"A",r:"C",s:4,t:"C",ds:["MM","AL"]},{c:"BTN",f:"A",r:"H",s:1,t:"C",ds:["NX","AH"]},{c:"BBB",f:"U",r:"H",s:4,t:"C",ds:["CS","UD"]},{c:"BLH",f:"T",r:"L",s:2,t:"C",dp:["SP"],ds:["AG","TK","GW","SF"]},{c:"BFT",f:"N",r:"C",s:5,t:"S",dp:["UD"]},{c:"BZH",f:"T",r:"H",s:7.2,t:"S",ds:["BN"],dn:["MN"]},{c:"BSP",f:"N",r:"C",s:2.2,t:"C",ds:["RK"]},{c:"BWK",f:"N",r:"R",s:1,t:"C",ds:["RV","ZB"]},{c:"BLW",f:"N",r:"R",s:3,t:"C",ds:["ZB","CS"]},{c:"BTD",f:"T",r:"L",s:7,t:"C",ds:["MV","AG","DR","BN"]},{c:"BZS",f:"T",r:"C",s:5,t:"C",ds:["MV","FC"]},{c:"BBR",f:"A",r:"C",s:6,t:"S",ds:["AR","SV"]},{c:"BBD",f:"N",r:"C",s:6,t:"S",ds:["SV"]},{c:"BBL",f:"T",r:"C",s:6,t:"S",ds:["SV"]},{c:"BBN",f:"U",r:"C",s:6,t:"S",ds:["SV"]},{c:"BSR",f:"N",r:"R",s:1,t:"C",ds:["AB","RV"]},{c:"BMY",f:"T",r:"H",s:2.1,t:"C",ds:["MV"]},{c:"BSW",f:"T",r:"C",s:3,t:"C",ds:["MS"]},{c:"BWW",f:"T",r:"H",s:4,t:"C",ds:["MV"]},{c:"BTM",f:"U",r:"H",s:1,t:"S",ds:["PL","RV","RP"]},{c:"BLP",f:"U",r:"H",s:7.2,t:"S",ds:["PS"],dn:["MT"]},{c:"BAW",f:"U",r:"R",s:2,t:"C",ds:["FC"]},{c:"BWG",f:"U",r:"C",s:1,t:"C",ds:["PL"]},{c:"BTR",f:"U",r:"H",s:3.1,t:"C",dp:["MU"],ds:["CS","FR"]},{c:"BWD",f:"U",r:"C",s:2,t:"C",ds:["PL","GW","SF","TK"]},{c:"BOF",f:"N",r:"C",s:7,t:"C",dp:["AB"],ds:["LG","SV"]},{c:"BSG",f:"A",r:"L",s:1,t:"C",ds:["RB","MV","AR"]},{c:"BSS",f:"A",r:"L",s:1,t:"C",dp:["RB"],ds:["AR"]},{c:"BTS",f:"U",r:"C",s:1.1,t:"C",ds:["PL","TK","GW"]},{c:"BST",f:"T",r:"L",s:4,t:"C",dp:["RP"],ds:["MS"]},{c:"BWT",f:"U",r:"L",s:4.2,t:"C",dp:["DI"],ds:["RP","HR"]},{c:"BRH",f:"N",r:"R",s:5,t:"C",ds:["AB"]},{c:"BWH",f:"A",r:"R",s:1,t:"S",dp:["AR"]},{c:"BWN",f:"A",r:"H",s:7,t:"C",ds:["AR"]},{c:"BRN",f:"T",r:"R",s:3,t:"S",ds:["BN","TD"]},{c:"BZD",f:"N",r:"R",s:2,t:"C",dp:["QT"],ds:["DR","RG","MV"]},{c:"BFM",f:"N",r:"H",s:2.3,t:"C",dp:["QT"],ds:["MV","AL"]},{c:"BSM",f:"T",r:"H",s:2,t:"C",dp:["QN"],ds:["RV","AG"]},{c:"CKB",f:"N",r:"H",s:5,t:"C",ds:["RV"]},{c:"CDT",f:"U",r:"R",s:1,t:"C",ds:["PL","PS"]},{c:"CMF",f:"N",r:"R",s:4,t:"C",ds:["AS"]},{c:"CTL",f:"T",r:"L",s:1,t:"S",ds:["XA"]},{c:"CCS",f:"N",r:"C",s:3,t:"C",ds:["RG"]},{c:"CDM",f:"T",r:"H",s:7,t:"C",ds:["YT","BN"]},{c:"CHY",f:"U",r:"C",s:1,t:"C",ds:["RG"]},{c:"CSR",f:"U",r:"C",s:5,t:"C",ds:["PS"]},{c:"CSL",f:"N",r:"C",s:6,t:"C",ds:["RG"]},{c:"CGG",f:"N",r:"H",s:7.1,t:"C",dp:["HL"],ds:["TK","LZ"]},{c:"CHV",f:"N",r:"L",s:2,t:"C",dp:["FB"],ds:["MV","RV"]},{c:"CCC",f:"N",r:"H",s:7.3,t:"S",dp:["ZB"],ds:["SV","TK","FR"]},{c:"CRS",f:"A",r:"R",s:3,t:"C",dp:["MM"],ds:["LV"],dn:[]},{c:"COD",f:"T",r:"R",s:4,t:"S",dp:["UD"],dn:["GW"]},{c:"CHT",f:"T",r:"R",s:7,t:"S",dn:["GW"]},{c:"CTI",f:"N",r:"C",s:1.1,t:"C",dp:["AL"],ds:["AB"]},{c:"CHA",f:"U",r:"R",s:2.1,t:"C",dn:["MV"]},{c:"CHH",f:"U",r:"C",s:2,t:"C",dp:["GW"]},{c:"CHR",f:"U",r:"L",s:1,t:"C",ds:["PL","MS","LV","RG"]},{c:"CBB",f:"T",r:"C",s:3,t:"C",dp:["UD"]},{c:"CDC",f:"T",r:"C",s:2,t:"C",ds:["WL"]},{c:"CFB",f:"T",r:"H",s:1,t:"C",ds:["FC"]},{c:"CNM",f:"T",r:"C",s:2,t:"C"},{c:"CSW",f:"T",r:"L",s:2.3,t:"C",ds:["DR","MV"]},{c:"CTG",f:"A",r:"C",s:3,t:"C",ds:["RB","WL"]},{c:"CCT",f:"T",r:"R",s:2,t:"C",ds:["MV","FC"]},{c:"CFG",f:"T",r:"C",s:2,t:"S"},{c:"CGL",f:"N",r:"H",s:3,t:"C",dp:["AB"],ds:["FR"]},{c:"CSU",f:"N",r:"R",s:1,t:"S",ds:["FR"]},{c:"CCR",f:"N",r:"C",s:1,t:"C",dp:["SF"],ds:["AB","LZ"]},{c:"CSB",f:"N",r:"C",s:2,t:"C",ds:["ZB","TK","VG"]},{c:"CNT",f:"A",r:"R",s:5,t:"S",ds:["AL","AH"]},{c:"CWK",f:"T",r:"C",s:3,t:"C",ds:["DI","MV"]},{c:"CRC",f:"A",r:"R",s:2,t:"C",ds:["RB","RK","WL"]},{c:"CMR",f:"A",r:"L",s:7.1,t:"C",dp:["RP"],ds:["MM","AR","AL"]},{c:"CYC",f:"N",r:"H",s:2,t:"C",dp:["MN","SP"],ds:["BN","LG"]},{c:"CYS",f:"N",r:"C",s:4,t:"C",ds:["TK","VG"]},{c:"CYW",f:"N",r:"R",s:7,t:"S",ds:["LG","BN"]},{c:"CTW",f:"N",r:"C",s:1,t:"S",dp:["AL"],ds:["RV"]},{c:"CTV",f:"U",r:"H",s:1,t:"S",dp:["PL"],ds:["RP"]},{c:"CYR",f:"T",r:"H",s:7.1,t:"C",dn:["FC"],ds:["MV"]},{c:"CAG",f:"A",r:"R",s:1,t:"S",ds:["NX","FR","LV"]},{c:"CBS",f:"A",r:"C",s:2.1,t:"S",dp:["MA"],ds:["AH","AR"]},{c:"CEX",f:"A",r:"H",s:7.1,t:"S",ds:["AH","AR","HL"]},{c:"CIN",f:"A",r:"R",s:1.1,t:"C",dp:["AH"]},{c:"CSH",f:"A",r:"C",s:3,t:"C",ds:["AR"]},{c:"CSG",f:"A",r:"C",s:2,t:"S",ds:["AR"]},{c:"CTM",f:"N",r:"L",s:7.3,t:"C",dp:["AL"],ds:["SV"]},{c:"DFR",f:"N",r:"H",s:2,t:"C",dp:["AL"]},{c:"DHC",f:"N",r:"H",s:6,t:"C",ds:["SP","RG"]},{c:"DHW",f:"N",r:"R",s:1,t:"C",dp:["SP"],ds:["RG"]},{c:"DRS",f:"U",r:"C",s:6,t:"C",dp:["DF"],ds:["PL"]},{c:"DSS",f:"N",r:"R",s:1,t:"C",dp:["MN"],ds:["ZB"]},{c:"DSW",f:"N",r:"C",s:6,t:"C",dp:["DF"],ds:["LG","BN"]},{c:"DSE",f:"A",r:"C",s:6,t:"C",dp:["DF"],ds:["RB","AH"]},{c:"DSA",f:"T",r:"C",s:6,t:"C",dp:["DF"]},{c:"DCR",f:"N",r:"R",s:2,t:"S",ds:["RV"]},{c:"DSK",f:"N",r:"C",s:1,t:"C",ds:["TK","SF","VG"]},{c:"DPO",f:"N",r:"H",s:7.2,t:"S",dp:["AL"],ds:["TK","RV"],dn:["MA"]},{c:"DBA",f:"U",r:"H",s:1,t:"C",dp:["GW"]},{c:"DBP",f:"U",r:"C",s:1,t:"C",ds:["UD"]},{c:"DMR",f:"U",r:"C",s:2,t:"C",ds:["DI"]},{c:"DBR",f:"U",r:"C",s:1,t:"C"},{c:"DFS",f:"A",r:"C",s:7,t:"S",ds:["AR","TD"]},{c:"DCS",f:"A",r:"L",s:2,t:"C",ds:["LV"]},{c:"DPG",f:"U",r:"H",s:7,t:"C",ds:["PS"]},{c:"DWW",f:"N",r:"C",s:6,t:"C",dn:["AG"]},{c:"DDF",f:"U",r:"R",s:5,t:"S",ds:["RP","UD","TD"]},{c:"DGZ",f:"A",r:"R",s:2,t:"S",ds:["AL"],dn:["GW"]},{c:"DBN",f:"N",r:"C",s:4,t:"C",ds:["AL"]},{c:"DOV",f:"N",r:"R",s:7,t:"C",ds:["LG","BN"]},{c:"DDS",f:"A",r:"H",s:4.2,t:"S",dp:["QN"],ds:["AL"]},{c:"DIS",f:"T",r:"R",s:1,t:"S",ds:["BN"]},{c:"DSV",f:"U",r:"R",s:2,t:"S",dp:["PS"],ds:["FR"]},{c:"DDD",f:"N",r:"L",s:1,t:"C",ds:["MV","RV","DR"]},{c:"DPB",f:"A",r:"L",s:5.2,t:"C",ds:["RB","RP"]},{c:"DZD",f:"U",r:"L",s:3,t:"C",dp:["MS"],ds:["AG"]},{c:"DRE",f:"T",r:"L",s:5,t:"S",ds:["BN"]},{c:"DKS",f:"T",r:"R",s:7,t:"C",dn:["GW"]},{c:"DGS",f:"U",r:"H",s:6,t:"C",ds:["RV"],dn:["DR"]},{c:"DGW",f:"T",r:"L",s:5.2,t:"S",dp:["DR"],ds:["AG","TK"]},{c:"DRD",f:"N",r:"L",s:7,t:"C",dp:["LZ"],ds:["TK","AB"]},{c:"DBT",f:"N",r:"H",s:1,t:"S",ds:["RV"]},{c:"DTR",f:"U",r:"L",s:6,t:"C",dp:["MS","SQ"],ds:["FR","RG","PL"]},{c:"DFB",f:"N",r:"R",s:1,t:"C",dp:["AB"],ds:["BN","SF","LZ","SV"]},{c:"DMW",f:"A",r:"L",s:1.1,t:"C",dp:["MM","CD"],ds:["AH"]},{c:"DCH",f:"U",r:"C",s:1,t:"S",ds:["LG"]},{c:"DTD",f:"N",r:"L",s:4.2,t:"C",dp:["DR"],ds:["MV"]},{c:"DHM",f:"U",r:"R",s:6,t:"C",dp:["DF"],ds:["SB"]},{c:"DSZ",f:"N",r:"C",s:2,t:"C",ds:["ZB","RG"]},{c:"DYB",f:"U",r:"R",s:2,t:"S",dp:["GW","TK"]},{c:"DBQ",f:"N",r:"H",s:3,t:"C",dp:["QU"],ds:["TK","RV","PS"]},{c:"DYS",f:"N",r:"R",s:3,t:"S",dp:["QU"]},{c:"DYL",f:"U",r:"L",s:3,t:"C",dp:["QN","LG"],ds:["TK"]},{c:"EBW",f:"N",r:"C",s:3,t:"C",dp:["UD"]},{c:"ESD",f:"N",r:"L",s:7,t:"C",ds:["FR"]},{c:"ESK",f:"N",r:"H",s:2,t:"C",dp:["RK"],ds:["UD"]},{c:"EHW",f:"U",r:"L",s:1,t:"C",ds:["GW","TK"]},{c:"ETN",f:"A",r:"C",s:1,t:"S",ds:["AL"]},{c:"EWE",f:"T",r:"H",s:2,t:"C",dp:["MV"]},{c:"EVT",f:"U",r:"L",s:6.1,t:"S",dp:["MU"],ds:["TD"]},{c:"ENP",f:"A",r:"H",s:1,t:"S",ds:["FR","WL"]},{c:"ESU",f:"A",r:"R",s:1,t:"S",ds:["CD","TD","FR"]},{c:"ENR",f:"U",r:"C",s:1,t:"S"},{c:"EPD",f:"N",r:"H",s:1,t:"S",dn:["GW"]},{c:"EPH",f:"A",r:"L",s:4.2,t:"C",dp:["CD"],ds:["TK"]},{c:"ESG",f:"A",r:"H",s:4.1,t:"C",dp:["QU","LV"],ds:["TK","GW"]},{c:"ESC",f:"A",r:"H",s:2,t:"C",dp:["QU"],ds:["RB","TK","GW","AR"]},{c:"ESP",f:"U",r:"H",s:2.3,t:"C",dp:["QA"],ds:["AR","HR"]},{c:"EWT",f:"U",r:"R",s:2,t:"C",dp:["QA"],ds:["AR"]},{c:"EHN",f:"U",r:"C",s:1,t:"C",ds:["TK","GW"]},{c:"EWV",f:"U",r:"C",s:7,t:"S",ds:["TD","TK"]},{c:"EFA",f:"T",r:"R",s:5,t:"S",ds:["MV"]},{c:"EFM",f:"T",r:"L",s:2.1,t:"C",dp:["FC","SP"],ds:["FR"]},{c:"EFP",f:"T",r:"L",s:1,t:"C",dp:["RK"],ds:["MV","TK","VG"]},{c:"EFE",f:"U",r:"L",s:5.2,t:"C",ds:["PL","TK","GW","UD"]},{c:"EXD",f:"N",r:"H",s:1,t:"S",ds:["LG","BN","SF"]},{c:"FWB",f:"U",r:"C",s:2.3,t:"C"},{c:"FWR",f:"U",r:"C",s:1,t:"C"},{c:"FFG",f:"U",r:"C",s:4,t:"C",ds:["DI"]},{c:"FST",f:"N",r:"R",s:4,t:"C",ds:["ZB","TK","VG"]},{c:"FWK",f:"N",r:"C",s:1,t:"C",ds:["ZB","TK","VG"]},{c:"FIN",f:"U",r:"C",s:1,t:"S",ds:["FC"]},{c:"FRR",f:"U",r:"H",s:1,t:"S",dp:["GW"]},{c:"FVA",f:"T",r:"H",s:1,t:"S",ds:["MV"]},{c:"FSL",f:"N",r:"C",s:7,t:"C"},{c:"FFU",f:"T",r:"H",s:1,t:"C",ds:["YT"]},{c:"FLH",f:"T",r:"C",s:4,t:"C",ds:["AS"]},{c:"FMS",f:"T",r:"C",s:2,t:"C",ds:["MV"]},{c:"FSM",f:"T",r:"H",s:1,t:"S",ds:["MS"],dn:["GW"]},{c:"FOR",f:"T",r:"C",s:7,t:"S",ds:["TD","AH"]},{c:"FBC",f:"T",r:"L",s:1,t:"C",dp:["FC"],dn:["GW"]},{c:"FBI",f:"T",r:"H",s:2.2,t:"C",dp:["MT","SP"]},{c:"FFS",f:"T",r:"R",s:2,t:"C",ds:["AH"]},{c:"FJT",f:"T",r:"C",s:5,t:"S",dp:["UD"]},{c:"FLN",f:"T",r:"R",s:2,t:"S",ds:["BN"]},{c:"FRI",f:"T",r:"C",s:3,t:"C",dp:["WL"]},{c:"FSS",f:"T",r:"R",s:1,t:"C",dp:["MT"],ds:["BN"]},{c:"FLS",f:"T",r:"C",s:1,t:"C",dp:["SP"],ds:["BN"]},{c:"FSH",f:"T",r:"R",s:1,t:"C",ds:["AG","FC"]},{c:"FFD",f:"N",r:"H",s:1,t:"C",ds:["AB","TK","VG"]},{c:"FRV",f:"N",r:"H",s:3,t:"C",ds:["AB","RV","CS"]},{c:"FSC",f:"A",r:"C",s:6,t:"C",dp:["RB"],ds:["VG","AR"]},{c:"FSP",f:"A",r:"L",s:1,t:"C",ds:["UD"]},{c:"FPR",f:"T",r:"C",s:2.1,t:"C"},{c:"FFL",f:"A",r:"C",s:1,t:"S",ds:["AR"]},{c:"FGA",f:"A",r:"C",s:1,t:"C",ds:["RB","WL","VT"]},{c:"FGB",f:"A",r:"R",s:1,t:"C",ds:["RB","VT"]},{c:"FGD",f:"A",r:"H",s:3,t:"C",dp:["VT"],ds:["RB"]},{c:"FGG",f:"A",r:"H",s:1,t:"C",dp:["VT"],ds:["RB","TK"]},{c:"FOL",f:"A",r:"H",s:3.1,t:"C",dp:["MA"],ds:["CS"]},{c:"FPM",f:"A",r:"R",s:3,t:"C",ds:["RB","AR","CS"]},{c:"FPS",f:"A",r:"C",s:1,t:"C",ds:["RB","AR"]},{c:"FWS",f:"A",r:"H",s:6,t:"C",ds:["RB","AR"]},{c:"FLC",f:"A",r:"L",s:7.2,t:"C",ds:["AR"],dn:["SQ"]},{c:"FFM",f:"T",r:"H",s:3,t:"C",dp:["MV"]},{c:"FMD",f:"T",r:"L",s:3,t:"C",dp:["RK"],ds:["TK","GW","MV","DR"]},{c:"FSK",f:"T",r:"C",s:2.3,t:"S",ds:["AH"]},{c:"FKS",f:"T",r:"H",s:6,t:"C",dp:["SQ"],ds:["YT","BN"]},{c:"FWT",f:"U",r:"H",s:1,t:"C",ds:["UD","FR","GW"]},{c:"FZS",f:"T",r:"R",s:1,t:"S",ds:["RV"]},{c:"GOS",f:"A",r:"L",s:4,t:"S",dp:["AR"]},{c:"GHS",f:"U",r:"C",s:2.2,t:"C",dp:["GW"],ds:["PL","SQ","LG"]},{c:"GHB",f:"U",r:"R",s:1,t:"C",ds:["DI","RV"]},{c:"GHR",f:"U",r:"H",s:4.2,t:"C",dp:["QT"],ds:["FC","LG","MV","DI"]},{c:"GRN",f:"N",r:"C",s:2,t:"S",ds:["RG"]},{c:"GTH",f:"N",r:"C",s:1,t:"S"},{c:"GSC",f:"U",r:"C",s:1,t:"C",ds:["PS"]},{c:"GMP",f:"A",r:"L",s:1,t:"C",ds:["MM","CD"]},{c:"GTT",f:"T",r:"L",s:2,t:"C",dp:["RK"],ds:["RV"]},{c:"GCL",f:"T",r:"C",s:1,t:"C",ds:["WL"]},{c:"GCR",f:"T",r:"C",s:2,t:"S",ds:["FR","BN"],dn:["WL","SQ"]},{c:"GLF",f:"N",r:"C",s:2,t:"C",ds:["AB"]},{c:"GRW",f:"N",r:"C",s:1,t:"C",dp:["AL"],ds:["RV"]},{c:"GSW",f:"N",r:"C",s:2,t:"C"},{c:"GVS",f:"U",r:"C",s:2,t:"C",ds:["VG","LG"]},{c:"GSS",f:"U",r:"C",s:1,t:"C",ds:["LG"]},{c:"GPV",f:"U",r:"C",s:6,t:"C",ds:["PL"],dn:["MV"]},{c:"GBG",f:"N",r:"C",s:1,t:"C",ds:["AB","VG","BN"]},{c:"GGE",f:"N",r:"C",s:2,t:"C"},{c:"GGH",f:"N",r:"C",s:1,t:"C",ds:["ZB","RG"]},{c:"GRP",f:"N",r:"R",s:1,t:"S",dp:["SF"],ds:["RV","FR"]},{c:"GGB",f:"N",r:"H",s:6,t:"C",dp:["DF"]},{c:"GGD",f:"N",r:"L",s:1,t:"C",dp:["SV","SB"]},{c:"GGR",f:"N",r:"L",s:3,t:"C",ds:["SF","MV","SV"]},{c:"GGP",f:"N",r:"H",s:1,t:"C",dp:["RV"],ds:["MV","SV"]},{c:"GGS",f:"N",r:"C",s:1,t:"C",ds:["MV"]},{c:"GGW",f:"N",r:"H",s:6.1,t:"C",dp:["SV"]},{c:"GRM",f:"N",r:"R",s:2,t:"S",ds:["GW"],dn:["GW"]},{c:"GHT",f:"U",r:"C",s:1,t:"C"},{c:"GMR",f:"U",r:"C",s:1,t:"C",ds:["TK","VG","PL"]},{c:"GSF",f:"A",r:"H",s:7.3,t:"C",dp:["MM"],ds:["AR"]},{c:"GAS",f:"A",r:"H",s:7,t:"S",dp:["VT"],ds:["FR","TK","NX"]},{c:"HMF",f:"T",r:"H",s:3,t:"C",ds:["YT","MV"]},{c:"HOS",f:"U",r:"R",s:7,t:"C",dp:["TK","SB"]},{c:"HTR",f:"U",r:"L",s:1,t:"C",ds:["RG","SQ","PL"]},{c:"HAR",f:"A",r:"C",s:1,t:"C",ds:["AH"]},{c:"HFA",f:"N",r:"H",s:1,t:"C",dp:["MN"],ds:["AB","RG"]},{c:"HOD",f:"T",r:"R",s:3,t:"C",ds:["BN"],dn:["TK","LZ"]},{c:"HMO",f:"U",r:"C",s:7,t:"C",ds:["DI"]},{c:"HRM",f:"A",r:"H",s:6,t:"C",ds:["RB","AR"]},{c:"HWM",f:"A",r:"L",s:1,t:"C",dp:["AH"],ds:["MV","RG","AR"]},{c:"HVE",f:"U",r:"R",s:7,t:"C",ds:["PS"]},{c:"HOX",f:"N",r:"R",s:4,t:"S",dp:["UD"],ds:["BN","LG"]},{c:"HGS",f:"N",r:"R",s:1,t:"S",ds:["AH","AL"]},{c:"HTP",f:"U",r:"C",s:1,t:"C",ds:["TK","GW"]},{c:"IBF",f:"T",r:"R",s:1,t:"S",ds:["HR","GW"]},{c:"IGR",f:"T",r:"L",s:6.1,t:"S",ds:["TD","BN"]},{c:"ITO",f:"T",r:"R",s:2,t:"S",dp:["MT","SP"],ds:["FR","BN"]},{c:"ISB",f:"T",r:"C",s:7,t:"C"},{c:"IKA",f:"T",r:"L",s:6,t:"C",dp:["FB"],ds:["BN"]},{c:"IME",f:"N",r:"L",s:5,t:"S",ds:["TK","GW"]},{c:"IDF",f:"N",r:"H",s:7,t:"C",dp:["UD","LZ"],ds:["TK","ZB"]},{c:"IRT",f:"N",r:"L",s:6.1,t:"S",dp:["MN"],ds:["TD","RG","SL"]},{c:"IVS",f:"N",r:"C",s:4,t:"S",ds:["RG","SL"]},{c:"ICD",f:"N",r:"L",s:5,t:"C",dp:["RG"],ds:["VG","SV","MV"]},{c:"IWC",f:"A",r:"C",s:1,t:"C",ds:["RB","MV"]},{c:"IBA",f:"A",r:"L",s:7,t:"C",dp:["FB"],ds:["AR","AL"],dn:["TD"]},{c:"IHA",f:"A",r:"L",s:2,t:"C",dp:["FB"],ds:["AR","AL"]},{c:"IBR",f:"A",r:"C",s:3,t:"C",dp:["UD"],ds:["AH"]},{c:"IMD",f:"A",r:"L",s:3,t:"C",ds:["RB","BN","MS"]},{c:"IMA",f:"A",r:"L",s:2.3,t:"C",dp:["CD"],ds:["FR"]},{c:"IZK",f:"T",r:"L",s:3,t:"C",ds:["FC","RP","BN"]},{c:"JPK",f:"A",r:"C",s:1,t:"S",dp:["UD"],ds:["AH","MV","FC"]},{c:"KDC",f:"T",r:"C",s:3,t:"C"},{c:"KSB",f:"T",r:"C",s:6,t:"C",ds:["DI"]},{c:"KAW",f:"T",r:"L",s:1.1,t:"C",dp:["SP"],ds:["XA"]},{c:"KOD",f:"N",r:"L",s:1,t:"C",dp:["LZ"],ds:["ZB"]},{c:"KBE",f:"U",r:"H",s:5,t:"C",ds:["PS","MV"]},{c:"KIW",f:"A",r:"L",s:3,t:"C",dp:["LV","FB"]},{c:"KTS",f:"U",r:"H",s:4,t:"C",dp:["RP"],ds:["TK"]},{c:"KKK",f:"T",r:"L",s:2,t:"C",dp:["FB"],ds:["AG","FC"]},{c:"LOD",f:"U",r:"L",s:4,t:"S",ds:["PS"]},{c:"LFA",f:"T",r:"H",s:4,t:"C",ds:["FC","AH"]},{c:"LKP",f:"U",r:"L",s:1,t:"C",ds:["PL","TK"]},{c:"LGT",f:"N",r:"R",s:2.3,t:"C",dp:["SL"],ds:["ZB","RG"]},{c:"LLD",f:"N",r:"H",s:5,t:"C",ds:["TK"],dn:["FR"]},{c:"LLG",f:"U",r:"H",s:5,t:"C",ds:["TK"],dn:["MV"]},{c:"LLS",f:"A",r:"H",s:5,t:"C",ds:["RB","TK"],dn:["TK","LZ"]},{c:"LLT",f:"T",r:"H",s:5,t:"C",ds:["TK"],dn:["LG"]},{c:"LLV",f:"U",r:"H",s:7.1,t:"C",dp:["PS"],ds:["TK"]},{c:"LMD",f:"N",r:"L",s:7.1,t:"C",ds:["DR","TK","MV"]},{c:"LBD",f:"U",r:"H",s:1,t:"C",dp:["GW"]},{c:"LSS",f:"U",r:"R",s:1,t:"C",dp:["MU"],ds:["UD"]},{c:"LBL",f:"U",r:"R",s:1,t:"C",ds:["LG"]},{c:"LBC",f:"U",r:"H",s:7,t:"C",dp:["FC","MU"],ds:["LG"]},{c:"LBR",f:"T",r:"C",s:1,t:"S",dp:["FC"],ds:["AG"]},{c:"LSK",f:"T",r:"C",s:1,t:"S",ds:["BN"]},{c:"LTM",f:"T",r:"C",s:7,t:"C",ds:["AG"]},{c:"LWY",f:"T",r:"C",s:1,t:"C",ds:["AG"]},{c:"LSP",f:"A",r:"C",s:1,t:"C",dp:["AH"],ds:["AR"]},{c:"LVH",f:"U",r:"L",s:7,t:"C",dp:["MS","PS","SQ"],ds:["TK","GW"]},{c:"LTU",f:"U",r:"L",s:7,t:"C",ds:["TK","GW"]},{c:"LCE",f:"A",r:"L",s:5,t:"S",ds:["CD"]},{c:"LUC",f:"T",r:"L",s:4.2,t:"C",dp:["MV"],ds:["XA","YT"]},{c:"LMV",f:"N",r:"L",s:1,t:"C",ds:["TK","LZ","GW"]},{c:"LHY",f:"U",r:"C",s:2,t:"C",ds:["RG"]},{c:"LYR",f:"U",r:"C",s:4,t:"S",ds:["LG","HR"]},{c:"LYS",f:"U",r:"R",s:3,t:"S",ds:["TD"]},{c:"MMH",f:"T",r:"C",s:1,t:"C"},{c:"MHR",f:"U",r:"L",s:5.1,t:"C",dp:["PS"],ds:["YT"]},{c:"MRF",f:"N",r:"C",s:1,t:"C"},{c:"MMG",f:"A",r:"L",s:6,t:"C",dp:["RB"],ds:["TK","AR"]},{c:"MOE",f:"T",r:"H",s:1,t:"C",dp:["SP"],ds:["FR"]},{c:"MXW",f:"A",r:"C",s:1,t:"C",ds:["RB","AH"]},{c:"MSP",f:"U",r:"R",s:2,t:"S",ds:["LG"]},{c:"MDR",f:"A",r:"R",s:7,t:"C",ds:["NT","MM"]},{c:"MMA",f:"A",r:"C",s:1,t:"C",ds:["CD","MM"]},{c:"MMR",f:"A",r:"C",s:5,t:"C",dp:["MM"],ds:["CD"]},{c:"MMX",f:"A",r:"C",s:2,t:"C",ds:["MM","CD","VG"]},{c:"MMI",f:"A",r:"C",s:4,t:"C",ds:["MM"]},{c:"MMO",f:"A",r:"C",s:2,t:"C",ds:["MM"]},{c:"MMV",f:"A",r:"C",s:2.2,t:"C",ds:["MM","CD","RK"]},{c:"MPH",f:"U",r:"H",s:3,t:"S",ds:["RK","DR","RV","RP","TK","MV"]},{c:"MSC",f:"A",r:"H",s:1,t:"S",ds:["NT","FR"]},{c:"MTS",f:"A",r:"C",s:1.1,t:"S",ds:["LV","FR"]},{c:"MTT",f:"A",r:"C",s:2,t:"S",ds:["LV","AL"]},{c:"MML",f:"U",r:"H",s:2,t:"C",ds:["TK","GW","PL"]},{c:"MMW",f:"U",r:"L",s:2.2,t:"C",ds:["TK","GW"]},{c:"MBR",f:"A",r:"R",s:6,t:"C",dp:["MM"],ds:["CD"]},{c:"MDE",f:"N",r:"C",s:4,t:"C",ds:["AS","LG","BN"]},{c:"MBP",f:"U",r:"H",s:1,t:"C",ds:["HR","PL"]},{c:"MTD",f:"U",r:"R",s:6,t:"C",dp:["DI"]},{c:"MND",f:"A",r:"R",s:1,t:"C",ds:["RB","SQ","AH"]},{c:"MNM",f:"N",r:"L",s:7.2,t:"C",ds:["TK","GW"]},{c:"NNS",f:"A",r:"R",s:3,t:"S",ds:["NT","AL"]},{c:"NGB",f:"T",r:"C",s:1,t:"C",ds:["HR"]},{c:"NGW",f:"T",r:"C",s:4,t:"C"},{c:"NSL",f:"U",r:"R",s:1,t:"S",dp:["GW"],ds:["RV"]},{c:"NCF",f:"N",r:"C",s:4,t:"S",ds:["FR"]},{c:"NCM",f:"N",r:"H",s:5,t:"C",ds:["MS","TK","RG","GW"]},{c:"NCP",f:"N",r:"H",s:7,t:"C",dn:["CD"]},{c:"NCS",f:"N",r:"R",s:1,t:"C"},{c:"NCW",f:"N",r:"C",s:1,t:"C"},{c:"NCV",f:"N",r:"C",s:1,t:"S",ds:["RG"]},{c:"NSW",f:"N",r:"L",s:3,t:"C",dp:["SF"],ds:["SQ","TK","GW"]},{c:"NDY",f:"N",r:"R",s:6,t:"S",dn:["SV"]},{c:"NEM",f:"N",r:"C",s:1,t:"S",ds:["LG","BN"]},{c:"NSH",f:"N",r:"L",s:2.3,t:"S",ds:["DR","RV","MV"],dn:["GW"]},{c:"NXA",f:"A",r:"L",s:3.1,t:"C",ds:["NX","AH","AR","MV"]},{c:"NXB",f:"A",r:"L",s:6.1,t:"S",dp:["MA"],ds:["NX","AR","TD"]},{c:"NXC",f:"A",r:"C",s:1,t:"C",ds:["RB","WL"]},{c:"NXG",f:"A",r:"H",s:3,t:"C",dp:["NX"],ds:["AH"]},{c:"NXO",f:"A",r:"C",s:5,t:"C",dp:["NX"],ds:["LV"]},{c:"NXP",f:"A",r:"C",s:1,t:"C",dp:["NX"]},{c:"NXT",f:"A",r:"H",s:2,t:"C",dp:["NX"],ds:["AR"]},{c:"NGT",f:"N",r:"R",s:2,t:"C",ds:["RG","SV"]},{c:"NGQ",f:"U",r:"L",s:4.1,t:"C",dp:["RP","FB"],ds:["TK","GW","PL"]},{c:"NCL",f:"U",r:"R",s:1.1,t:"S",ds:["PS"],dn:["GW"]},{c:"NFF",f:"U",r:"L",s:2,t:"C",dp:["PL"],ds:["RP","SQ","TK"]},{c:"NUG",f:"T",r:"L",s:7.1,t:"C",ds:["YT"]},{c:"NAM",f:"N",r:"C",s:3,t:"C"},{c:"NOZ",f:"N",r:"R",s:2,t:"C",ds:["TK","VG"]},{c:"NSY",f:"N",r:"C",s:2.1,t:"C",ds:["RG"]},{c:"ONN",f:"N",r:"H",s:1.1,t:"S",dp:["ZB"]},{c:"OXA",f:"A",r:"H",s:2.3,t:"C",dp:["QN"],ds:["LV","SQ","RG"]},{c:"OXM",f:"A",r:"R",s:2,t:"C",dp:["QN"],ds:["RG","AR"]},{c:"OXP",f:"N",r:"H",s:2,t:"C",dp:["QA"],ds:["RG","AL","SQ"]},{c:"OBB",f:"T",r:"R",s:3,t:"S",dp:["QA"],ds:["LV"]},{c:"OEX",f:"A",r:"H",s:3,t:"S",dp:["QT"],ds:["FC","AH"],dn:["GW"]},{c:"OWH",f:"T",r:"H",s:3,t:"C",dp:["QA"],ds:["FC","MV","LV"]},{c:"ORC",f:"A",r:"C",s:7,t:"C",ds:["AH"]},{c:"OBD",f:"A",r:"H",s:1,t:"C",ds:["AR","RB"]},{c:"OFM",f:"A",r:"R",s:2.1,t:"C",ds:["AH"]},{c:"OJC",f:"A",r:"H",s:1.1,t:"C",ds:["AL"],dn:["TK","LZ"]},{c:"OPK",f:"A",r:"R",s:2,t:"C",ds:["RB","AR"]},{c:"OSV",f:"A",r:"H",s:4,t:"C",dp:["RP"],ds:["AR","RB"]},{c:"OSS",f:"A",r:"C",s:5,t:"S",dp:["UD"],ds:["AR"]},{c:"OWW",f:"A",r:"L",s:1,t:"C",ds:["RB"]},{c:"OHV",f:"N",r:"R",s:2,t:"C",ds:["AB","RV"]},{c:"ODC",f:"U",r:"L",s:2,t:"C",dp:["FB"],ds:["LG"]},{c:"OSP",f:"N",r:"R",s:2,t:"C",ds:["RG"]},{c:"OAP",f:"U",r:"L",s:6,t:"C",dp:["RK"],ds:["PS"]},{c:"OSL",f:"U",r:"C",s:3,t:"C",ds:["PL"]},{c:"OWF",f:"A",r:"H",s:2,t:"S",ds:["AH","GW"]},{c:"OXS",f:"U",r:"R",s:1,t:"C",ds:["DI"],dn:["AR"]},{c:"PHM",f:"A",r:"R",s:2,t:"C",ds:["AL"],dn:["GW"]},{c:"PPM",f:"A",r:"R",s:1,t:"C",ds:["AL","SQ"]},{c:"PSM",f:"A",r:"L",s:2.2,t:"C",dp:["NX"],ds:["MV","TK"]},{c:"PLW",f:"A",r:"R",s:4,t:"S",dp:["UD"],ds:["AL"],dn:["GW"]},{c:"POA",f:"A",r:"H",s:6.1,t:"C",dp:["MA"],ds:["AH"]},{c:"POD",f:"U",r:"H",s:6.1,t:"C",dp:["MU"],ds:["GW","TK"]},{c:"POK",f:"T",r:"H",s:6.1,t:"C",dp:["MT"],ds:["AH"]},{c:"POT",f:"N",r:"H",s:6.1,t:"C",dp:["MN"],dn:["GW"]},{c:"PRG",f:"N",r:"C",s:4,t:"C"},{c:"PRI",f:"A",r:"R",s:3,t:"S",dp:["LV"],ds:["TD"]},{c:"PHS",f:"A",r:"R",s:2.2,t:"C",dp:["AR"]},{c:"PHC",f:"T",r:"L",s:6.2,t:"S",ds:["MV","TK","BN"]},{c:"PTB",f:"U",r:"H",s:1,t:"S",ds:["PL","TK","GW"]},{c:"PLI",f:"N",r:"R",s:6,t:"C"},{c:"PSC",f:"U",r:"R",s:2,t:"C",ds:["PS","SQ"]},{c:"PSH",f:"N",r:"H",s:4,t:"C",ds:["RK","LZ","TK"]},{c:"PTR",f:"A",r:"R",s:2,t:"S",ds:["AH","FR"]},{c:"PSG",f:"U",r:"R",s:1,t:"S",ds:["FR"]},{c:"PVA",f:"U",r:"L",s:7.2,t:"C",ds:["TK","GW","LG","DI"]},{c:"PMI",f:"T",r:"H",s:5.1,t:"C",ds:["BN"]},{c:"PMS",f:"T",r:"C",s:1,t:"S",ds:["AH"]},{c:"POX",f:"N",r:"H",s:4.2,t:"C",dp:["UD"],ds:["TK","VG","AB"]},{c:"PMP",f:"A",r:"R",s:6,t:"S",dp:["HL"],ds:["AR","AH"]},{c:"PYG",f:"T",r:"H",s:1,t:"C",dp:["FC"],ds:["AG"]},{c:"PYM",f:"T",r:"R",s:6,t:"C",dn:["LG"],ds:["BN"]},{c:"PYS",f:"T",r:"C",s:1.1,t:"S",dp:["GW"],dn:["GW"]},{c:"QSW",f:"T",r:"L",s:7.3,t:"C",dp:["DI"],ds:["BN"]},{c:"RBH",f:"T",r:"L",s:1,t:"C",dp:["FC"]},{c:"ROK",f:"T",r:"L",s:3.1,t:"S",dp:["MT"],ds:["TD"]},{c:"REW",f:"U",r:"L",s:7.3,t:"C",ds:["TK","GW"]},{c:"RHY",f:"U",r:"C",s:3,t:"C",ds:["RG"]},{c:"RTS",f:"T",r:"C",s:2.2,t:"C",ds:["MV","FC","DI"]},{c:"RTW",f:"U",r:"H",s:7,t:"C",ds:["WD","TK"]},{c:"RHU",f:"A",r:"L",s:4.1,t:"C",ds:["RP","WL"]},{c:"RMB",f:"N",r:"L",s:6.2,t:"S",dp:["TD"],ds:["TK"]},{c:"RPR",f:"A",r:"H",s:7.2,t:"S",ds:["AL","NT"],dn:["MU"]},{c:"RLW",f:"U",r:"H",s:1,t:"C",dp:["WD"]},{c:"RFL",f:"T",r:"R",s:1,t:"C",dp:["FC"]},{c:"RHC",f:"T",r:"C",s:1,t:"C",ds:["MV"]},{c:"ROG",f:"N",r:"H",s:1,t:"S",ds:["SV"]},{c:"ROU",f:"N",r:"C",s:7,t:"S",ds:["RG","GW"]},{c:"ROE",f:"T",r:"H",s:7.3,t:"S",ds:["TK","AG","AH"]},{c:"RWC",f:"U",r:"C",s:4,t:"C",ds:["DI","TK","GW"]},{c:"RFA",f:"U",r:"H",s:1,t:"C",dp:["MU"]},{c:"RWD",f:"N",r:"C",s:5,t:"C",dp:["AL"],ds:["ZB"]},{c:"RSD",f:"U",r:"L",s:6.2,t:"C",ds:["SQ","GW","LG","DR"]},{c:"RSE",f:"T",r:"H",s:4.1,t:"C",dp:["FC"],ds:["AG"]},{c:"RBG",f:"U",r:"H",s:2,t:"C",dp:["LG"]},{c:"RGG",f:"U",r:"H",s:1,t:"C",dp:["RK"],ds:["PL"]},{c:"RSZ",f:"N",r:"R",s:1.1,t:"C",ds:["ZB","VG","SP"]},{c:"RSP",f:"T",r:"R",s:3,t:"C",ds:["CS","AG"]},{c:"RHW",f:"N",r:"C",s:3,t:"C",dp:["WD"]},{c:"SBF",f:"T",r:"H",s:4,t:"C",ds:["AG","XA"]},{c:"SAP",f:"A",r:"C",s:2,t:"S",ds:["AL"]},{c:"SVO",f:"U",r:"C",s:2.1,t:"S",dp:["MU"]},{c:"SSE",f:"U",r:"L",s:2.1,t:"C",ds:["PL","TK","GW"]},{c:"SST",f:"U",r:"C",s:7,t:"C",ds:["PL","TK","GW"]},{c:"STS",f:"U",r:"C",s:3,t:"S",ds:["PL","TK","GW"]},{c:"SCS",f:"N",r:"C",s:1,t:"C",ds:["AB","RG"]},{c:"SMD",f:"T",r:"L",s:1,t:"C",ds:["DR","MV"]},{c:"SFS",f:"N",r:"L",s:1,t:"C",ds:["ZB","SF","RV"]},{c:"SHY",f:"N",r:"C",s:5,t:"C",ds:["MS"]},{c:"SKN",f:"N",r:"C",s:7,t:"C",ds:["ZB"]},{c:"SCD",f:"A",r:"H",s:1,t:"C",ds:["RB","FR"]},{c:"SFT",f:"A",r:"H",s:1,t:"C",ds:["AR","RB"]},{c:"SOC",f:"N",r:"L",s:4,t:"S",ds:["AL"]},{c:"SOA",f:"A",r:"C",s:3,t:"S",dp:["CS"],ds:["AH"]},{c:"SOD",f:"U",r:"C",s:3,t:"S",dp:["CS"]},{c:"SOK",f:"T",r:"C",s:3,t:"S",dp:["CS"]},{c:"SOT",f:"N",r:"C",s:3,t:"S",dp:["CS"],ds:["BN"]},{c:"SAD",f:"T",r:"H",s:1,t:"C",ds:["FC"]},{c:"SCZ",f:"N",r:"R",s:6,t:"C",dp:["DF"],ds:["RG","ZB"]},{c:"SFE",f:"T",r:"H",s:6,t:"C",dp:["DF"],ds:["AG"]},{c:"SWS",f:"A",r:"H",s:6,t:"C",dp:["DF"],ds:["LV"]},{c:"SHA",f:"A",r:"R",s:6,t:"C",dp:["DF"],ds:["AR"]},{c:"SHG",f:"N",r:"L",s:2,t:"S",dp:["LZ"]},{c:"SBI",f:"U",r:"C",s:3,t:"C",dp:["UD"]},{c:"SCC",f:"U",r:"C",s:4,t:"C",dp:["RP"]},{c:"SPB",f:"U",r:"L",s:5,t:"C",dp:["HR"]},{c:"SPD",f:"U",r:"R",s:1,t:"C",dp:["SB"],ds:["DI"]},{c:"SPG",f:"U",r:"R",s:6.2,t:"S",ds:["SB"]},{c:"SPM",f:"U",r:"L",s:1,t:"C",dp:["UD"]},{c:"SPT",f:"U",r:"L",s:7.1,t:"C",ds:["PS"]},{c:"STD",f:"A",r:"H",s:2.2,t:"C",ds:["MM"],dn:["RG"]},{c:"STB",f:"T",r:"C",s:5,t:"S",ds:["BN"],dn:["AR"]},{c:"SHS",f:"U",r:"R",s:2.2,t:"C",dp:["AH"],ds:["PS"]},{c:"SSP",f:"U",r:"H",s:6,t:"C",dp:["DF"],ds:["PL","TK","GW"]},{c:"SGF",f:"N",r:"H",s:2.2,t:"C",dp:["SQ","SF"],ds:["AB","LG","BN"]},{c:"SKG",f:"A",r:"C",s:2,t:"C",ds:["NX","MV"]},{c:"SLS",f:"T",r:"L",s:7,t:"C",dp:["SQ"],ds:["SP","WL"],dn:["TD"]},{c:"SSD",f:"T",r:"L",s:5,t:"C",dp:["SQ"],ds:["DR"],dn:["GW"]},{c:"SDA",f:"U",r:"H",s:5,t:"C",ds:["TK","GW"]},{c:"SSR",f:"U",r:"L",s:2,t:"C",dp:["RK"],ds:["GW","FC"]},{c:"SNB",f:"A",r:"C",s:2.3,t:"S",ds:["AL"]},{c:"SNP",f:"A",r:"H",s:1,t:"S",ds:["AL"],dn:["GW"]},{c:"SRD",f:"U",r:"C",s:1,t:"S",ds:["HR","GW"]},{c:"SSH",f:"U",r:"H",s:4,t:"C"},{c:"SRM",f:"N",r:"H",s:4,t:"C",dp:["AL"],ds:["RV"]},{c:"SRH",f:"N",r:"C",s:2.3,t:"C",dp:["AB"],ds:["CD"]},{c:"SDN",f:"N",r:"L",s:1,t:"C",ds:["AL","MV"]},{c:"SHV",f:"N",r:"H",s:1,t:"S",dp:["SF"],ds:["FR"]},{c:"SRP",f:"N",r:"L",s:4,t:"S",dp:["AL"],ds:["RV","TK"]},{c:"SGG",f:"N",r:"H",s:4,t:"C",dp:["SV"]},{c:"SBA",f:"A",r:"C",s:1,t:"C"},{c:"SKB",f:"A",r:"C",s:1,t:"C",ds:["RB"]},{c:"SBR",f:"T",r:"C",s:2,t:"C",ds:["AG"]},{c:"SKS",f:"T",r:"C",s:4,t:"C",ds:["RP","AG"]},{c:"SEL",f:"T",r:"R",s:5,t:"C",ds:["WL"],dn:["SQ"]},{c:"STM",f:"T",r:"R",s:4,t:"C",ds:["MV","AG"]},{c:"SWA",f:"T",r:"H",s:6,t:"C",dp:["SP","MT"],ds:["MV","AH"]},{c:"SFG",f:"A",r:"L",s:6.2,t:"C",dp:["VT"],ds:["TK","RB"]},{c:"S01",f:"A",r:"L",s:7.3,t:"C",dp:["MS"],ds:["AR","AH"]},{c:"SPR",f:"N",r:"R",s:7,t:"C",ds:["SV","SB"]},{c:"SBD",f:"U",r:"C",s:2.1,t:"C",ds:["LG"]},{c:"SCV",f:"N",r:"R",s:3,t:"S",ds:["RV"]},{c:"SFM",f:"T",r:"H",s:1,t:"C",ds:["VG","MS"]},{c:"SSN",f:"A",r:"C",s:2.2,t:"C",ds:["AR","RB"]},{c:"SSM",f:"T",r:"C",s:2.2,t:"C",ds:["RK","BN"]},{c:"SLH",f:"N",r:"C",s:2,t:"S",dp:["SF"]},{c:"SRV",f:"N",r:"R",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"SSI",f:"A",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SND",f:"U",r:"R",s:4,t:"C",dp:["RP"],ds:["TK","GW"]},{c:"SNT",f:"N",r:"L",s:5.1,t:"C",dp:[],ds:[],dn:[]},{c:"STR",f:"N",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SPH",f:"N",r:"H",s:4.1,t:"C",dp:[],ds:[],dn:[]},{c:"SSA",f:"N",r:"H",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"STO",f:"U",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SDR",f:"U",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SOL",f:"U",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SOV",f:"T",r:"L",s:4,t:"S",dp:["XA"],ds:["DR","MV"]},{c:"SMS",f:"T",r:"C",s:7,t:"C",ds:["DI","BN"]},{c:"SHK",f:"T",r:"H",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"SIX",f:"A",r:"R",s:7,t:"C",ds:["MM","SP","WL"]},{c:"SWR",f:"A",r:"R",s:1,t:"C",ds:["MM","SP","WL"]},{c:"SMN",f:"T",r:"C",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"SER",f:"A",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SES",f:"A",r:"L",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"SFA",f:"A",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"STG",f:"A",r:"L",s:2,t:"C",dp:[],ds:["DR","RB"],dn:[]},{c:"SSS",f:"A",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SSK",f:"A",r:"C",s:3,t:"C",dp:[],ds:[],dn:[]},{c:"SNK",f:"A",r:"C",s:7,t:"C",dp:["LV"],ds:["WL"]},{c:"SWG",f:"A",r:"C",s:4,t:"C",dp:[],ds:["RB"],dn:[]},{c:"SWM",f:"A",r:"R",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"SIV",f:"U",r:"H",s:5.1,t:"S",dp:[],ds:[],dn:[]},{c:"STN",f:"T",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SGI",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SBG",f:"T",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SCL",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SGA",f:"T",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"STP",f:"T",r:"C",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"SSG",f:"U",r:"C",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SVH",f:"U",r:"C",s:2.3,t:"C",dp:[],ds:[],dn:[]},{c:"SIN",f:"U",r:"C",s:1.1,t:"S",dp:[],ds:[],dn:[]},{c:"SYL",f:"U",r:"H",s:2.2,t:"C",dp:[],ds:["PL"],dn:[]},{c:"SEV",f:"N",r:"L",s:3.1,t:"C",dp:[],ds:[],dn:[]},{c:"SMA",f:"U",r:"C",s:5,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SML",f:"U",r:"C",s:1,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SYO",f:"A",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TST",f:"T",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"TBA",f:"U",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TGL",f:"U",r:"R",s:3,t:"S",dp:[],ds:[],dn:[]},{c:"TGS",f:"U",r:"C",s:2,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TPT",f:"N",r:"C",s:2.1,t:"S",dp:[],ds:[],dn:[]},{c:"TDW",f:"N",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"TNL",f:"N",r:"L",s:4.1,t:"C",dp:[],ds:[],dn:[]},{c:"TEX",f:"A",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TGN",f:"A",r:"C",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TSM",f:"A",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TUP",f:"A",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TAB",f:"T",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TGI",f:"T",r:"R",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TDS",f:"U",r:"L",s:1.1,t:"C",dp:[],ds:["DI"],dn:[]},{c:"TSP",f:"T",r:"H",s:4.2,t:"S",dp:["DI"],ds:[],dn:[]},{c:"TNM",f:"U",r:"C",s:7,t:"C"},{c:"TPG",f:"N",r:"H",s:3.1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"TMG",f:"U",r:"R",s:3,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TMM",f:"U",r:"C",s:5,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TRA",f:"A",r:"R",s:5,t:"C",dp:[],ds:["MM"],dn:[]},{c:"TRS",f:"U",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TRV",f:"T",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TRW",f:"N",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TBB",f:"T",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TOB",f:"N",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TCN",f:"A",r:"C",s:7,t:"C",dp:["WL"],ds:["RB"]},{c:"TWS",f:"A",r:"C",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TVG",f:"A",r:"R",s:1.1,t:"C",dp:[],ds:["RB"],dn:[]},{c:"TXB",f:"U",r:"R",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"TXS",f:"U",r:"C",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TCG",f:"T",r:"C",s:2.1,t:"S",dp:[],ds:[],dn:[]},{c:"TMS",f:"U",r:"H",s:6,t:"C",dp:["SB"],dn:["BN"]},{c:"TBC",f:"T",r:"H",s:6.2,t:"S",ds:["AH","MS"]},{c:"TWT",f:"A",r:"C",s:3,t:"C",dp:[],ds:["RB"],dn:[]},{c:"TRN",f:"T",r:"H",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"TGK",f:"U",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TSL",f:"U",r:"H",s:3,t:"C",dp:["PL"],ds:["TK","GW"]},{c:"TWG",f:"U",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"UGM",f:"U",r:"C",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"USY",f:"T",r:"R",s:6,t:"C",dp:["DF"],ds:["YT","MV"]},{c:"UGL",f:"T",r:"R",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UIC",f:"T",r:"H",s:2.3,t:"C",dp:[],ds:["DI"],dn:[]},{c:"ULR",f:"U",r:"H",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"ULG",f:"N",r:"H",s:7,t:"S",dp:["LZ"],ds:["TK","TD"]},{c:"URD",f:"N",r:"H",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"USA",f:"T",r:"H",s:7,t:"C",ds:["WL","VG","FC"]},{c:"UBL",f:"T",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"UCM",f:"T",r:"R",s:1,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UEM",f:"T",r:"C",s:4,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UHS",f:"T",r:"H",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UIM",f:"T",r:"C",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"USS",f:"T",r:"H",s:7,t:"C",dp:["SQ"],ds:["TK","YT"]},{c:"UWL",f:"T",r:"H",s:2,t:"C",dp:["YT"]},{c:"UWS",f:"T",r:"R",s:2.3,t:"C",dp:["YT"],ds:[],dn:[]},{c:"UIW",f:"A",r:"L",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"URS",f:"U",r:"C",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"UTM",f:"U",r:"C",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UTR",f:"U",r:"H",s:2,t:"C",dp:["DI"],ds:[],dn:[]},{c:"URB",f:"U",r:"L",s:2.3,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UPM",f:"U",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VIC",f:"T",r:"L",s:6,t:"C",ds:["MV","FR"],dn:["TD"]},{c:"VIK",f:"N",r:"L",s:5.2,t:"C",dp:["FB"],ds:["TK","SV"]},{c:"VRP",f:"N",r:"L",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"VBK",f:"A",r:"R",s:2,t:"C",dp:[],ds:["RB"],dn:[]},{c:"VIN",f:"A",r:"C",s:6,t:"C",ds:["RB"]},{c:"VTC",f:"A",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VTW",f:"A",r:"R",s:4,t:"C",dp:[],ds:["RB"],dn:[]},{c:"VGN",f:"N",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VND",f:"U",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"VNF",f:"U",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"VNS",f:"U",r:"H",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"VSK",f:"U",r:"C",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"VCH",f:"U",r:"H",s:4.1,t:"S",dp:[],ds:[],dn:[]},{c:"VGR",f:"U",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"VSP",f:"U",r:"C",s:6,t:"S",ds:["LG"]},{c:"VTR",f:"U",r:"R",s:7,t:"S"},{c:"VGL",f:"N",r:"R",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"VGW",f:"U",r:"R",s:6,t:"C",dp:["HR"],ds:["GW"]},{c:"VOB",f:"T",r:"R",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"VCG",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VPR",f:"A",r:"L",s:7,t:"C",ds:["LV"]},{c:"VES",f:"N",r:"L",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"VYE",f:"N",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"WBY",f:"T",r:"R",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"WBU",f:"T",r:"C",s:1.1,t:"C",dp:[],ds:["YT"],dn:[]},{c:"WHR",f:"T",r:"R",s:7,t:"C",ds:["AG"],dn:["TD"]},{c:"WMC",f:"A",r:"H",s:5,t:"C",dp:[],ds:["RB"],dn:[]},{c:"WMR",f:"A",r:"H",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"WTK",f:"A",r:"H",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"WMM",f:"A",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WTW",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WGE",f:"U",r:"H",s:7.3,t:"S",ds:["FC","LG"]},{c:"WTA",f:"U",r:"L",s:4,t:"C",dp:["LG","SB"],ds:["PL"]},{c:"WWP",f:"U",r:"H",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WWR",f:"U",r:"C",s:3,t:"C",dp:[],ds:[],dn:[]},{c:"WOD",f:"U",r:"R",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"WFM",f:"T",r:"H",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WWS",f:"U",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WBH",f:"T",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WCS",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WPD",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WSE",f:"T",r:"L",s:5.1,t:"C",dp:[],ds:[],dn:[]},{c:"WPC",f:"A",r:"H",s:6.2,t:"S",ds:["TD"],dp:["NT"]},{c:"WFB",f:"N",r:"C",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WFS",f:"N",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WBG",f:"N",r:"L",s:1.1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XTE",f:"N",r:"L",s:6,t:"C",dp:["MN"],ds:["TK","LZ"]},{c:"XCR",f:"N",r:"C",s:2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XDH",f:"N",r:"R",s:3,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XHS",f:"N",r:"C",s:2.2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XHU",f:"N",r:"C",s:1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XRF",f:"N",r:"C",s:2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XSH",f:"N",r:"L",s:1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XTR",f:"N",r:"H",s:5.1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XDV",f:"N",r:"H",s:1,t:"C",dp:["ZB"],ds:[],dn:[]},{c:"XRW",f:"N",r:"H",s:2,t:"S",dp:["ZB"],ds:[],dn:[]},{c:"YWC",f:"T",r:"C",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"YNS",f:"N",r:"L",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"ZXR",f:"T",r:"H",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"ZPM",f:"T",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"ZTU",f:"N",r:"L",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZDK",f:"N",r:"H",s:6,t:"C",dp:["RG"],ds:["ZB"]},{c:"ZIN",f:"N",r:"C",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZMT",f:"N",r:"C",s:3,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZSH",f:"T",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]}],Di=[["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"]]];class xi{raw={["C"]:{["A"]:0,["N"]:0,["T"]:0,["U"]:0},["S"]:{["A"]:0,["N"]:0,["T"]:0,["U"]:0}};addStat(t,i){this.raw[t][i]++}g(t,i){return this.raw[t][i]}typeSum(t){return je.map(i=>this.g(t,i)).reduce((i,r)=>i+r,0)}getTotal(){const t=this.typeSum("C"),i=this.typeSum("S");return[t,i,t+i]}getFactTotal(t){const i=this.g("C",t),r=this.g("S",t);return[i,r,i+r]}}const s=(o,t)=>({card:o,num:t}),zi={name:"Official 2 - 3",id:"SBE1",decks:[{name:"Cruel Corrosion",factions:["A","N"],cards:[s("IHA",1),s("WBG",1),s("OXP",1),s("DFR",1),s("APM",1),s("SNP",1),s("GRM",2),s("ETN",2),s("DHW",2),s("OXM",2),s("AEN",2),s("ATG",2),s("CTI",2),s("CTW",2),s("FPS",2),s("GRW",2),s("MTT",2),s("SAP",2)]},{name:"Death March",factions:["N","T"],cards:[s("ZTU",1),s("VRP",1),s("GGP",1),s("EPD",1),s("DBT",1),s("BSM",1),s("TDW",2),s("NGT",2),s("UBL",2),s("FWK",2),s("BZD",2),s("CSB",2),s("SLH",2),s("MMH",2),s("LSK",2),s("GBG",2),s("CFG",2),s("DSK",2)]},{name:"Dinosaurs!",factions:["T","U"],cards:[s("TDS",1),s("SSR",1),s("FRR",1),s("ULR",1),s("UTR",1),s("BTM",1),s("UGL",2),s("EHN",2),s("SPD",2),s("GHB",2),s("FLN",2),s("SML",2),s("RFL",2),s("OXS",2),s("UTM",2),s("TWG",2),s("ENR",2),s("DBP",2)]},{name:"Wyvern's Wrath",factions:["T","U"],cards:[s("CSW",1),s("SMD",1),s("FRR",1),s("UIC",1),s("CFB",1),s("UGL",2),s("FSH",2),s("FLN",2),s("WPD",1),s("TWG",2),s("TCG",2),s("TGS",2),s("SML",2),s("SVH",1),s("SCL",2),s("RTS",1),s("FWB",2),s("ENR",2),s("ABR",2)]},{name:"Ironmind Intuition",factions:["A","N"],cards:[s("IMA",1),s("GMP",1),s("OXA",1),s("EPD",1),s("OJC",1),s("ESU",2),s("OXM",2),s("MMA",2),s("SAP",1),s("AFO",2),s("GBG",2),s("CTW",2),s("SRH",1),s("TSM",2),s("SLH",1),s("MTT",1),s("DCR",1),s("DFB",1),s("BSR",1),s("LGT",1),s("XRF",2),s("MMX",1)]},{name:"Nethershriek Negation",factions:["N","T"],cards:[s("SBG",1),s("NSH",1),s("FFU",1),s("EWE",1),s("BFM",1),s("WBH",1),s("UWS",1),s("TGI",2),s("RFL",2),s("GRM",1),s("ASG",1),s("YWC",2),s("XRF",2),s("WPD",2),s("WCS",2),s("WBU",2),s("TCG",1),s("FSK",1),s("SLH",2),s("CFG",1),s("RTS",2)]},{name:"Ridgeback's Rage",factions:["A","U"],cards:[s("URB",1),s("AGK",1),s("ESP",1),s("FRR",1),s("NXT",1),s("ALG",1),s("FGB",1),s("PHS",2),s("TUP",1),s("EWT",2),s("PTR",1),s("VBK",1),s("AGC",1),s("AEN",2),s("ETN",1),s("FPS",2),s("MXW",2),s("GHT",1),s("TWG",2),s("SNB",1),s("SML",1),s("JPK",1),s("ENR",1),s("IWC",1)]},{name:"Spare Parts",factions:["N"],cards:[s("SEV",1),s("SHG",1),s("TPG",1),s("CGL",1),s("FRV",1),s("HFA",2),s("XDH",1),s("GRM",1),s("SCV",1),s("DFB",2),s("EBW",2),s("GBG",2),s("GLF",2),s("XHS",2),s("SOT",1),s("XRF",2),s("SCS",1),s("ZMT",1),s("SLH",1),s("VYE",1),s("XCR",2),s("XHU",1)]},{name:"Future Forged",factions:["A"],cards:[s("NXA",1),s("IMD",1),s("FOL",1),s("SFA",2),s("SFT",1),s("SCD",1),s("CAG",1),s("ESU",1),s("NNS",1),s("FPM",1),s("PRI",1),s("SSS",1),s("CTG",1),s("TSM",2),s("IWC",1),s("MMA",2),s("TGN",2),s("MTT",1),s("SKG",1),s("AFO",1),s("MMV",1),s("TWS",1),s("SBA",2),s("SSK",1),s("JPK",1)]},{name:"Burning Rage",factions:["T"],cards:[s("ROK",1),s("KKK",1),s("MOE",1),s("AFR",1),s("FBI",1),s("FSS",2),s("FLN",2),s("CCT",2),s("BRN",2),s("WPD",2),s("SSM",2),s("SOK",1),s("RTS",2),s("FSK",2),s("CWK",2),s("CFG",2),s("BSW",2),s("FMS",2)]},{name:"Awakened Fury",factions:["U"],cards:[s("DZD",1),s("SSE",1),s("BTR",1),s("TSL",1),s("MPH",1),s("CDT",1),s("DYB",1),s("BTH",2),s("TMG",2),s("BWD",2),s("RHY",2),s("SBD",2),s("GMR",2),s("STS",1),s("OSL",2),s("SBI",2),s("LYS",2),s("TGS",2),s("SOD",2)]},{name:"Titan's Assault",factions:["N","T"],cards:[s("ATT",1),s("TNL",1),s("RSE",1),s("SPH",1),s("SCV",2),s("ABB",2),s("TBB",2),s("BRN",2),s("FLN",2),s("CMF",2),s("XDH",2),s("FST",2),s("TAB",2),s("MDE",2),s("FSK",2),s("FLH",2),s("CBB",2)]},{name:"Verdant Fortress",factions:["A","U"],cards:[s("NGQ",1),s("RHU",1),s("VCH",1),s("ESG",1),s("PLW",2),s("NNS",2),s("SND",2),s("WOD",2),s("IBR",2),s("BWD",2),s("SBI",2),s("RWC",2),s("TEX",2),s("SER",2),s("SWG",2),s("SCC",2),s("DYB",2)]},{name:"Umbruk Uprising",factions:["T","U"],cards:[s("LUC",1),s("BWT",1),s("GHR",1),s("TSP",1),s("WBH",1),s("COD",1),s("SDR",1),s("ZPM",1),s("OXS",1),s("WOD",1),s("RWC",2),s("SSG",2),s("VGR",2),s("CFG",2),s("UEM",2),s("FFG",2),s("UGL",2),s("DMR",2),s("RTS",2),s("CWK",2)]},{name:"Onyxium Twilight",factions:["A","N"],cards:[s("EPH",1),s("DTD",1),s("POX",1),s("DDS",1),s("OHV",1),s("PHS",1),s("DFB",1),s("TDW",1),s("CAG",1),s("ALG",1),s("TUP",2),s("CTW",2),s("XCR",2),s("SSK",2),s("SRH",2),s("ATG",2),s("MTT",2),s("SLH",2),s("GLF",2),s("AFO",2)]}]},Zi={name:"Official 5 - 7",id:"SBE2",decks:[{name:"Blistering Chaos",factions:["T","U"],cards:[s("WSE",1),s("MHR",1),s("PMI",1),s("SIV",1),s("BRN",1),s("HOD",1),s("CHA",1),s("LYS",1),s("TRS",2),s("PSC",2),s("FLN",2),s("EFA",2),s("SHS",2),s("TXB",2),s("VNF",2),s("CFG",2),s("FSK",2),s("CBB",2),s("VND",2)]},{name:"Dark Retribution",factions:["A","N"],cards:[s("AAA",1),s("SNT",1),s("ABE",1),s("XTR",1),s("CNT",1),s("HOX",1),s("PLW",1),s("AGW",1),s("OHV",2),s("OXM",2),s("XDH",2),s("VGL",2),s("ETN",2),s("MTT",2),s("VYE",2),s("DSK",2),s("BFT",2),s("ATZ",2),s("IBR",2)]},{name:"Iron Tide",factions:["A","U"],cards:[s("EFE",1),s("DPB",1),s("HWM",1),s("HTR",1),s("OJC",1),s("RBG",1),s("EWT",1),s("CIN",1),s("TGK",2),s("CAG",2),s("TGN",3),s("SCC",3),s("URS",3),s("LSP",3),s("TSM",3),s("TMM",3)]},{name:"Dragon Forge",factions:["N","T"],cards:[s("DGW",1),s("VIK",1),s("DDD",1),s("SMD",1),s("FFM",1),s("SHV",1),s("GRP",1),s("TGI",1),s("SLH",1),s("WBH",2),s("BZD",2),s("EFA",2),s("WFB",3),s("BZS",3),s("CCR",3),s("DSK",3),s("RHC",3)]},{name:"Call of Deepwood",factions:["U"],cards:[s("EVT",1),s("POD",1),s("RFA",1),s("TMS",1),s("LSS",1),s("DYB",1),s("TRS",1),s("VGW",1),s("UTM",2),s("RHY",2),s("SMA",2),s("TMM",2),s("BBN",2),s("GHS",2),s("SBI",2),s("BTS",2),s("STS",2),s("SVO",2),s("GMR",2)]},{name:"Kadras' Fury",factions:["T"],cards:[s("IGR",1),s("POK",1),s("SWA",1),s("SGA",1),s("FLN",1),s("TRV",1),s("FSS",1),s("AWU",1),s("STB",2),s("CFG",2),s("BBL",2),s("KSB",2),s("NGW",2),s("ATS",2),s("ABR",2),s("BSW",2),s("TCG",2),s("CBB",2),s("WPD",2)]},{name:"Tarsus Unleashed",factions:["N"],cards:[s("IRT",1),s("POT",1),s("ZDK",1),s("HFA",1),s("GRM",1),s("DSS",1),s("TRW",1),s("ABB",1),s("XCR",2),s("CSB",2),s("SHY",2),s("BBD",2),s("EBW",2),s("NSY",2),s("TPT",2),s("XRF",2),s("GGS",2),s("ZMT",2),s("IVS",2)]},{name:"Might of Anvillon",factions:["A"],cards:[s("NXB",1),s("FWS",1),s("POA",1),s("SFA",1),s("SSS",1),s("TRA",1),s("BTB",1),s("BWH",1),s("TWT",2),s("TEX",2),s("IBR",2),s("VIN",2),s("BBR",2),s("NXP",2),s("CBS",2),s("FPS",2),s("ATG",2),s("SNB",2),s("SSK",2)]},{name:"Nature's Defenses",factions:["T","U"],cards:[s("RSD",1),s("PHC",1),s("SPG",1),s("TBC",1),s("GHR",1),s("NGB",1),s("DDF",1),s("VGW",3),s("UEM",3),s("FSK",2),s("TMM",2),s("VSP",2),s("BZS",2),s("SPD",3),s("RTS",3),s("TGK",3)]},{name:"Unlikely Alliance",factions:["A","N"],cards:[s("RMB",1),s("SFG",1),s("GGW",1),s("WPC",1),s("SBA",2),s("IBR",1),s("BSR",1),s("MMV",1),s("CRC",1),s("BSP",1),s("NNS",1),s("XDH",2),s("EBW",2),s("SLH",2),s("CTG",3),s("XRF",3),s("OHV",3),s("TSM",3)]},{name:"Toxic Shards",factions:["U"],cards:[s("SPT",1),s("MHR",1),s("KBE",1),s("DPG",1),s("LLV",1),s("HVE",2),s("PSC",2),s("VND",2),s("DSV",2),s("TXB",2),s("CSR",3),s("GSC",3),s("GVS",3),s("LHY",3),s("TGS",3)]},{name:"Winds of Fury",factions:["T"],cards:[s("NUG",1),s("FMD",1),s("CYR",1),s("FFM",1),s("AIV",1),s("WBH",2),s("UBL",2),s("FZS",2),s("EFA",2),s("WBY",2),s("KSB",3),s("SCL",3),s("TCG",3),s("CWK",3),s("ISB",3)]},{name:"Ghastly Echoes",factions:["N"],cards:[s("LMD",1),s("XTE",1),s("CGG",1),s("EPD",1),s("NCP",1),s("NOZ",2),s("OSP",2),s("PLI",2),s("GRP",2),s("DOV",2),s("CYS",3),s("IVS",3),s("MRF",3),s("GRW",3),s("FSL",3)]},{name:"Cypien Technology",factions:["A"],cards:[s("CMR",1),s("RHU",1),s("CEX",1),s("FOL",1),s("AHL",1),s("SSI",2),s("CAG",2),s("CIN",2),s("CNT",2),s("PHS",2),s("MXW",3),s("LSP",3),s("SSN",3),s("TWT",3),s("CSH",3)]}]},Yi={name:"Starters & Early Tournies",id:"T1309",decks:[{name:"Alloyin Starter",factions:["A"],cards:[s("SYO",1),s("BSS",1),s("SFT",2),s("SNP",2),s("TSM",2),s("SSS",2),s("ALG",2),s("MXW",3),s("TUP",3),s("FPS",3),s("MND",3),s("IWC",3),s("SKB",3)]},{name:"Nekrium Starter",factions:["N"],cards:[s("SFS",1),s("GGD",1),s("FFD",3),s("EPD",2),s("CCR",2),s("HGS",2),s("DSS",2),s("BWK",2),s("GBG",3),s("DSK",3),s("GRP",3),s("VGN",3),s("XHU",3)]},{name:"Tempys Starter",factions:["T"],cards:[s("FBC",1),s("RBH",1),s("CFB",3),s("FSM",2),s("FSH",2),s("FSS",2),s("PMS",2),s("RFL",2),s("UBL",3),s("WPD",3),s("SGI",3),s("AMY",3),s("WCS",3)]},{name:"Uterra Starter",factions:["U"],cards:[s("UPM",1),s("EHW",1),s("FRR",3),s("SPD",2),s("HTP",2),s("LSS",2),s("SDR",2),s("SRD",2),s("FWR",3),s("DBP",3),s("GHT",3),s("GSS",3),s("TXS",3)]},{name:"Axel: Lifegain",factions:["T","U"],cards:[s("AGD",3),s("EHW",3),s("FRR",3),s("FIN",1),s("UPM",1),s("LKP",2),s("BTM",2),s("LBL",3),s("GSS",3),s("RFA",3),s("GHB",3),s("EFP",3)]},{name:"Bryan: Knightbots",factions:["A","U"],cards:[s("AGK",3),s("AFS",3),s("BSG",2),s("BSS",3),s("JPK",3),s("VBK",2),s("FRR",3),s("TDS",3),s("WWP",3),s("MXW",2),s("OJC",3)]},{name:"Derk: Metaminds",factions:["A"],cards:[s("OJC",3),s("DMW",3),s("MMV",3),s("JPK",3),s("MMO",3),s("GMP",3),s("ALS",3),s("MMA",3),s("SFA",3),s("BTN",3)]},{name:"Foxhull: Grow Wide",factions:["U"],cards:[s("DBP",3),s("EHW",2),s("FRR",3),s("FWT",3),s("UPM",3),s("LKP",2),s("BTM",3),s("HTR",2),s("LBD",2),s("RFA",3),s("GHB",2),s("SDR",2)]},{name:"Hectares: Dino Attack",factions:["A","U"],cards:[s("ALS",3),s("TDS",3),s("FRR",3),s("WWP",3),s("SML",2),s("BSG",3),s("JPK",2),s("ODC",3),s("NXT",2),s("WMM",3),s("GHB",3)]},{name:"Klaven: Mono-N",factions:["N"],cards:[s("SCS",3),s("ROG",1),s("GGP",1),s("GGD",3),s("WFS",1),s("DSS",3),s("ZTU",1),s("GBG",3),s("HFA",3),s("EXD",1),s("EPD",1),s("BSR",1),s("MRF",2),s("HGS",3),s("GTH",3)]},{name:"Phoenyx: Free Spell Dmg",factions:["T","U"],cards:[s("SHK",3),s("MOE",3),s("FRR",3),s("LSK",3),s("FFU",3),s("UBL",3),s("WWS",3),s("FSS",3),s("ENR",3),s("MMH",3)]},{name:"Technogeek5000: Grow Wide",factions:["N","U"],cards:[s("DBP",2),s("EHW",2),s("FRR",3),s("HTP",2),s("UPM",3),s("LKP",2),s("GHT",3),s("GGP",2),s("LBD",1),s("EPD",2),s("DBT",2),s("SPD",3),s("SDR",3)]},{name:"Thematik: Level Up",factions:["A","T"],cards:[s("IWC",3),s("FSS",3),s("ETN",1),s("WPD",2),s("FSM",1),s("AHL",1),s("UBL",3),s("SMD",2),s("BTN",3),s("LSK",1),s("MMH",3),s("FFU",1),s("TSM",3),s("ALG",3)]},{name:"TinyGrimes: NT Shapers",factions:["N","T"],cards:[s("DSS",3),s("FSS",3),s("EPD",2),s("GTH",3),s("FSM",1),s("MOE",1),s("UBL",3),s("GGP",3),s("GBG",1),s("LSK",3),s("HGS",1),s("CTW",1),s("SHK",3),s("GGD",1),s("DBT",1)]}]},Ki={name:"The Forge",id:"TG10",decks:[{name:"DarkSoulSP: Grim Debuff",factions:["N","U"],cards:[s("BWK",3),s("TDS",2),s("FRR",3),s("WWP",3),s("GGP",3),s("GGD",3),s("DBT",1),s("WFS",3),s("CTW",3),s("EPD",3),s("GHB",3)]},{name:"ErrorAsh: Burn",factions:["N","T"],cards:[s("UBL",2),s("EFM",2),s("FBI",3),s("ESK",3),s("FLN",3),s("EFP",3),s("MOE",3),s("FSS",3),s("SHK",3),s("EPD",3),s("CHV",2)]},{name:"ErrorAsh: Farmer Tarsus",factions:["N","U"],cards:[s("WWS",3),s("DYB",3),s("FRR",3),s("SYL",3),s("EPD",3),s("SSE",2),s("NSH",2),s("TDW",3),s("NFF",2),s("CHR",2),s("LKP",2),s("EXD",2)]},{name:"ErrorAsh: Necro Mobiltiy",factions:["N","T"],cards:[s("NSH",2),s("SMD",2),s("DDD",3),s("TDW",3),s("VRP",3),s("WCS",3),s("BSM",3),s("SHG",2),s("TGI",2),s("EPD",3),s("FVA",2),s("DBT",1),s("TRN",1)]},{name:"Hans: Yetis",factions:["T","U"],cards:[s("UWL",3),s("FFU",3),s("WBY",3),s("UIM",3),s("WBU",3),s("SSR",1),s("TRN",1),s("GTT",1),s("GCR",3),s("FRR",3),s("UBL",3),s("WWP",3)]},{name:"MingisTheKing: Mobility",factions:["N","T"],cards:[s("DDD",3),s("DBT",3),s("EPD",3),s("EFP",3),s("GGP",3),s("LSK",3),s("SHK",3),s("UBL",3),s("WCS",3),s("ZTU",3)]},{name:"Noetherian: Shambler",factions:["N","U"],cards:[s("XSH",3),s("SPM",3),s("FRR",3),s("ODC",3),s("SSE",3),s("ESK",3),s("TGS",3),s("XRF",3),s("VRP",3),s("URB",3)]},{name:"Noetherian: Tempo",factions:["T","U"],cards:[s("RBH",3),s("TDS",3),s("FRR",3),s("WWP",3),s("EFP",3),s("AMY",2),s("FVA",2),s("ENR",3),s("ZSH",3),s("EHW",3),s("GHB",2)]},{name:"Piquadore: Zombies",factions:["N","T"],cards:[s("BWK",2),s("KOD",2),s("CYC",3),s("GRM",3),s("VYE",3),s("XRW",3),s("MOE",2),s("ZTU",3),s("BSM",3),s("EPD",3),s("DSS",3)]},{name:"Stautmeister: Yeti Mobility",factions:["T","U"],cards:[s("AGM",3),s("TDS",2),s("FRR",3),s("WWP",3),s("CSW",3),s("FLN",3),s("EFP",2),s("UWL",3),s("WBY",2),s("WCS",2),s("EHW",2),s("SHS",2)]},{name:"Technonaut: Steelscale",factions:["A","T"],cards:[s("UHS",2),s("FLN",3),s("STG",3),s("CRC",3),s("SHK",3),s("EFP",2),s("WMR",2),s("WMM",3),s("JPK",3),s("SMD",3),s("FVA",3)]},{name:"Technonaut: Woebringer",factions:["N","T"],cards:[s("LSK",2),s("WBG",3),s("EPD",3),s("DDD",3),s("SHK",3),s("EFP",3),s("ZTU",2),s("GGD",2),s("GGP",3),s("CTW",3),s("DBT",3)]},{name:"Zrandles: Metaminds",factions:["A","N"],cards:[s("DMW",3),s("GMP",3),s("MMA",3),s("MMV",2),s("TDW",3),s("VRP",3),s("EPD",3),s("SHG",2),s("OJC",2),s("ESK",2),s("CHV",2),s("CTW",2)]},{name:"Zrandles: Tempo",factions:["N","T"],cards:[s("CTW",1),s("GCR",1),s("CFG",1),s("FZS",1),s("FBI",3),s("MOE",3),s("EFP",3),s("LSK",3),s("FLN",3),s("SHK",3),s("RTS",3),s("GGP",3),s("UBL",2)]}]},Xi={name:"Team A1",id:"A1FU",decks:[{name:"Phytogaunt",factions:["N","U"],cards:[s("DTD",3),s("EPD",2),s("XTE",3),s("GGD",3),s("GGP",3),s("GGR",3),s("ROG",1),s("ESK",3),s("GGW",3),s("POT",3),s("PTB",3)]},{name:"ANfinity",factions:["A","N"],cards:[s("IMA",3),s("AAA",2),s("MMA",3),s("KIW",3),s("ESU",3),s("ABE",3),s("AFO",1),s("XDH",2),s("GBG",1),s("SHV",2),s("SCV",2),s("LCE",2),s("MTS",1),s("PRI",1),s("WPC",1)]},{name:"Icefinity",factions:["A","T"],cards:[s("IMA",3),s("AAA",1),s("MMA",2),s("MOE",3),s("ESU",3),s("ABE",3),s("NNS",1),s("IGR",2),s("SHK",1),s("OBB",2),s("LCE",2),s("ITO",1),s("PRI",3),s("BRN",3)]},{name:"Drain Tank",factions:["A","N"],cards:[s("DTD",3),s("SRP",2),s("LLS",3),s("ESK",3),s("CYC",3),s("BRS",3),s("PLI",1),s("SOC",2),s("EPD",2),s("ABE",2),s("HOX",2),s("DCR",2),s("VYE",2)]},{name:"Big Animals",factions:["N","U"],cards:[s("DTD",3),s("MHR",2),s("DZD",3),s("SPB",3),s("SHY",3),s("URB",3),s("VIK",1),s("ESK",3),s("DYS",3),s("LYS",3),s("IME",3)]},{name:"Explosive Dragon Rage",factions:["A","T"],cards:[s("FMD",3),s("SGA",2),s("AFR",3),s("FBI",3),s("POK",3),s("SHK",3),s("ROK",3),s("IGR",1),s("OEX",3),s("BWW",2),s("STB",2),s("BRN",2)]},{name:"Angry Tree",factions:["N","U"],cards:[s("DTD",3),s("EPD",2),s("CYC",3),s("SPB",3),s("IME",3),s("SOC",3),s("ODC",2),s("ESK",2),s("WTA",3),s("VYE",3),s("HOX",3)]},{name:"Commando",factions:["A","N"],cards:[s("GSF",3),s("SIX",2),s("GMP",3),s("DMW",3),s("IMA",3),s("MMA",3),s("MBR",3),s("POA",3),s("WMM",2),s("EXD",2),s("SFA",3)]},{name:"Our Robot Overlords",factions:["A","T"],cards:[s("AGK",3),s("AFS",3),s("ATT",3),s("BTB",3),s("BSS",3),s("FWS",3),s("FLC",3),s("GOS",3),s("RHU",3),s("WMC",3)]},{name:"Random Aggression",factions:["T","U"],cards:[s("SMA",3),s("EHW",3),s("KSB",3),s("FSH",3),s("RTW",3),s("SDR",3),s("LBD",3),s("KKK",3),s("FRR",3),s("SIV",3)]},{name:"The Crux of it All",factions:["A","N"],cards:[s("CMR",3),s("VPR",3),s("LLD",3),s("DCR",3),s("SCV",3),s("IBA",2),s("SRM",2),s("SRP",1),s("MMR",2),s("LCE",1),s("NXA",2),s("IMD",1),s("OJC",2),s("WPC",2)]}]},qi={name:"Fandom Wiki",id:"FDWK",decks:[{name:"Castles",factions:["A","U"],cards:[s("TDS",3),s("TMS",3),s("DTR",3),s("HTR",3),s("RSD",3),s("SPB",3),s("MHR",3),s("RHU",3),s("AEC",3),s("FRR",3)]},{name:"Runebark's Revenge",factions:["U"],cards:[s("RBG",3),s("EVT",3),s("EFE",3),s("SBI",3),s("RSD",3),s("SPB",3),s("ODC",3),s("GSS",3),s("BTR",3),s("POD",3)]},{name:"Don't Wake Boris",factions:["T","U"],cards:[s("AGD",3),s("EVT",3),s("EFE",3),s("DGW",3),s("LYS",3),s("SBD",3),s("ODC",3),s("GSS",3),s("BRN",3),s("POD",3)]},{name:"Shrink N' Squat",factions:["A","N"],cards:[s("DDS",3),s("ESK",3),s("EPD",3),s("GRW",3),s("GGP",3),s("HRM",3),s("PPM",3),s("SRM",3),s("MMG",3),s("WFS",3)]},{name:"Healthy Mystic",factions:["T","U"],cards:[s("LYR",3),s("PYM",3),s("EFE",3),s("TGS",3),s("LYS",3),s("SBD",3),s("TMG",3),s("TMM",3),s("SSH",3),s("SSE",3)]},{name:"Varna Control",factions:["A","N"],cards:[s("VIK",3),s("KIW",3),s("LCE",3),s("ABE",3),s("ZTU",3),s("SES",3),s("DCR",3),s("SCV",3),s("ESU",3),s("BRS",2),s("HOX",1)]},{name:"Barry's Buddies",factions:["A","T"],cards:[s("AAA",3),s("BRS",3),s("SMD",3),s("GOS",3),s("PMP",3),s("AGW",3),s("NNS",3),s("PLW",3),s("OBB",3),s("ABE",3)]},{name:"Heraldbomb",factions:["T","U"],cards:[s("UWL",3),s("HOD",3),s("PTB",3),s("BTM",3),s("LYS",3),s("DDF",3),s("MHR",3),s("WSE",3),s("SPB",3),s("WWP",3)]},{name:"Heartseeker",factions:["A","T"],cards:[s("UWL",3),s("FFU",3),s("FKS",3),s("OEX",3),s("POK",3),s("ROK",3),s("UHS",3),s("WBU",3),s("UCM",2),s("WSE",2),s("KKK",2)]},{name:"Punchy",factions:["A","U"],cards:[s("ODC",3),s("DBP",3),s("URB",3),s("RHU",3),s("CEX",3),s("GOS",3),s("LYS",3),s("PMP",3),s("WMM",3),s("ABE",3)]},{name:"Sea of Sludge",factions:["N","U"],cards:[s("ODC",3),s("WTA",3),s("GSS",3),s("DYL",3),s("AGD",3),s("GGW",3),s("CYC",3),s("VYE",3),s("DCR",3),s("SCV",3)]},{name:"Poison Control",factions:["A","U"],cards:[s("MHR",3),s("LOD",3),s("VNS",3),s("ESG",3),s("LCE",3),s("ESU",3),s("IMA",3),s("DSV",3),s("GSS",2),s("CSR",1),s("ABE",3)]},{name:"Original Fangsters",factions:["A","N"],cards:[s("VES",3),s("XTE",3),s("GGP",3),s("RHU",3),s("WBG",3),s("ABE",3),s("DDS",3),s("SOC",3),s("JPK",3),s("EPD",3)]},{name:"Hatorade",factions:["A","U"],cards:[s("MHR",3),s("ARB",3),s("DDF",3),s("IHA",3),s("LLG",3),s("NXA",3),s("OJC",3),s("RHU",3),s("SPB",3),s("LYS",3)]},{name:"Wegu Control",factions:["A","U"],cards:[s("MHR",3),s("CHR",3),s("KIW",3),s("ESG",3),s("WTA",3),s("ODC",3),s("GSS",3),s("OAP",2),s("NGQ",1),s("DDF",2),s("WPC",1),s("ABE",3)]}]},ji={name:"Battlebranded",id:"BTLB",decks:[{name:"Bucket of Spite",factions:["N","T"],cards:[s("SMD",2),s("SPH",3),s("BSM",3),s("EBW",3),s("UWL",3),s("BSW",2),s("BWW",1),s("FMD",3),s("BST",3),s("EPD",3),s("GGD",2),s("HOX",1),s("SOC",1)]},{name:"Overoverloaded",factions:["A","N"],cards:[s("XDH",3),s("RMB",3),s("ABE",3),s("IMA",3),s("EPD",3),s("TPG",3),s("ESU",3),s("KIW",2),s("LCE",2),s("ESK",2),s("STR",1),s("CYC",1),s("PRI",1)]},{name:"Dysian Forest",factions:["N","U"],cards:[s("POX",3),s("DBQ",3),s("TDS",3),s("NGQ",3),s("WWP",3),s("DTD",3),s("LBD",3),s("SSH",2),s("LYS",3),s("DYS",2),s("FRR",1),s("HOX",1)]},{name:"Statis Shenanigans",factions:["A","T"],cards:[s("OBB",3),s("SHK",3),s("ABE",3),s("IMA",3),s("SIX",3),s("GCR",2),s("ESU",3),s("NNS",2),s("LCE",3),s("OJC",2),s("BRS",1),s("VIC",1),s("PRI",1)]},{name:"Masochist Zoo",factions:["N","U"],cards:[s("DZD",3),s("TDW",3),s("LLD",3),s("LLG",3),s("RWC",3),s("BWT",3),s("DYS",2),s("SPB",3),s("SHY",3),s("IME",2),s("TDS",2)]},{name:"Pummelled by Gauntlets",factions:["A","N"],cards:[s("AGK",3),s("FWS",3),s("LLD",3),s("LLS",3),s("NXA",3),s("RHU",3),s("ARB",2),s("GOS",2),s("OJC",2),s("ESK",2),s("PMP",2),s("SOC",2)]},{name:"Nuada's Greenhouse",factions:["T","U"],cards:[s("NFF",3),s("NGQ",3),s("LKP",3),s("SYL",3),s("ATT",3),s("BWW",3),s("GMR",2),s("FRR",2),s("SSH",1),s("URB",2),s("BRN",2),s("SSE",3)]},{name:"Abominable Slaughter",factions:["N","T"],cards:[s("CGL",3),s("XDH",3),s("LLD",3),s("POX",3),s("ABM",3),s("ZXR",3),s("BWW",3),s("FMD",3),s("BST",2),s("ROK",3),s("HOX",1)]},{name:"Outraged Ingir",factions:["A","T"],cards:[s("OBB",3),s("FMD",3),s("IKA",3),s("BST",3),s("NXA",3),s("KKK",2),s("RHU",3),s("ROK",3),s("BWW",3),s("WSE",1),s("OEX",3)]},{name:"Lord of the Necros",factions:["N","T"],cards:[s("TPG",3),s("BSM",3),s("EBW",3),s("FST",3),s("TNL",3),s("BWW",3),s("XRW",3),s("CSB",3),s("GGD",3),s("SOC",3)]},{name:"Thar' Be Omegas",factions:["A","U"],cards:[s("AFS",3),s("BSS",3),s("ARB",3),s("FGA",3),s("FGB",3),s("FGG",3),s("FGD",3),s("TBA",3),s("SSH",3),s("NNS",3)]},{name:"Skillshriek",factions:["N","U"],cards:[s("POX",3),s("SEV",3),s("LLD",3),s("SPB",3),s("NSH",3),s("TDW",3),s("XDH",2),s("SBI",2),s("ATP",2),s("FRR",2),s("AEC",2),s("IME",2)]},{name:"Kitfinity",factions:["A","N"],cards:[s("XDH",3),s("MMX",3),s("GMP",2),s("IMA",3),s("VRP",3),s("SEV",3),s("ESU",3),s("KIW",3),s("SHG",2),s("SHV",2),s("SCV",1),s("CYC",1),s("AFO",1)]},{name:"There Can Be Only One",factions:["A","U"],cards:[s("AHL",3),s("WMM",3),s("ESU",3),s("PRI",3),s("JPK",3),s("MPH",3),s("LYS",3),s("BTM",2),s("FIN",1),s("SOD",3),s("VGR",3)]}]},Qi={name:"Misc. Web Decks",id:"WEB1",decks:[{name:"Steelscale Debuff",factions:["A","N"],cards:[s("STG",3),s("CTG",3),s("VTW",3),s("IME",3),s("NNS",3),s("PLW",3),s("SOC",3),s("SES",2),s("IMD",1),s("DFR",1),s("EXD",1),s("HOX",2),s("SHV",1),s("WMM",1)]},{name:"The Fun Train",factions:["T","U"],cards:[s("AMD",3),s("ATT",3),s("BWW",3),s("EFM",3),s("SPB",3),s("URB",3),s("AEC",3),s("BRN",3),s("LYS",3),s("SOV",2),s("TGL",1)]},{name:"Snouty's Sludges",factions:["N","U"],cards:[s("DYL",3),s("ODC",3),s("SOL",3),s("RSD",3),s("PVA",2),s("SFS",3),s("GRP",3),s("NCM",3),s("LBD",3),s("DYS",3),s("WGE",1)]},{name:"Metabuse",factions:["A","N"],cards:[s("POX",3),s("WMC",3),s("SEV",3),s("CKB",3),s("ARB",3),s("LLD",3),s("LLS",3),s("XDH",3),s("IME",3),s("GRM",2),s("HOX",1)]},{name:"Immortal Dino",factions:["N","U"],cards:[s("BTR",3),s("BWT",3),s("RWC",3),s("TDS",3),s("UTR",3),s("SEV",2),s("SMA",2),s("LSS",3),s("TDW",2),s("HOX",2),s("SOC",2),s("VRP",2)]},{name:"Redacted",factions:["A","U"],cards:[s("MDR",3),s("RHU",3),s("TBA",3),s("SPM",3),s("CTG",3),s("NXO",3),s("AFO",2),s("SVO",2),s("AGW",2),s("FRR",2),s("SBI",3),s("LLV",1)]},{name:"Ebonflame Thunderskull",factions:["N","T"],cards:[s("ATT",3),s("EFM",3),s("VES",3),s("ESK",3),s("BWW",3),s("SOV",3),s("NSH",3),s("DCR",2),s("SCV",2),s("DBT",2),s("IME",3)]},{name:"Binben the Math Nut",factions:["A","T"],cards:[s("BLH",3),s("KIW",3),s("GMP",3),s("SHK",3),s("OBB",3),s("BRN",3),s("STP",3),s("ESU",2),s("GOS",2),s("FLN",2),s("MTT",2),s("GCR",1)]},{name:"For Ever More the Oil's Chore",factions:["U"],cards:[s("VNS",3),s("VNF",3),s("SHS",3),s("STO",3),s("DSV",3),s("PSC",2),s("ODC",2),s("WWP",2),s("SBI",2),s("TDS",2),s("DZD",2),s("FRR",2),s("LYS",1)]},{name:"Aegis Boon",factions:["A","U"],cards:[s("AGK",3),s("ALS",3),s("BSG",3),s("IHA",3),s("NXT",3),s("OBD",3),s("FRR",3),s("DYB",2),s("WWP",3),s("SYL",2),s("TDS",2)]},{name:"Thanksgiving Dinner",factions:["N","T"],cards:[s("BTD",3),s("CSW",3),s("GBG",3),s("ICD",3),s("CDM",2),s("GGR",2),s("EFP",2),s("SOC",2),s("DCR",2),s("FSL",1),s("DRD",1),s("NCM",1),s("XSH",1),s("GRM",1),s("TBC",1),s("EXD",1),s("HGS",1)]},{name:"Warden of Ice",factions:["A","T"],cards:[s("GTT",3),s("SHK",3),s("GMP",3),s("MTT",3),s("SIX",3),s("GCR",3),s("ESU",3),s("CAG",2),s("UBL",3),s("AFO",2),s("ENP",2)]},{name:"Magmifly",factions:["T"],cards:[s("SLS",3),s("STM",3),s("LUC",3),s("POK",3),s("AWU",3),s("BTD",3),s("BMY",2),s("AGU",2),s("SWA",2),s("TST",2),s("ROK",2),s("BRN",2)]}]},Ji={name:"Fundecks 1",id:"FUN1",decks:[{name:"Frankenbomb",factions:["N"],cards:[s("DFB",3),s("BSR",3),s("HGS",3),s("HFA",3),s("FFD",3),s("XSH",3),s("XHU",3),s("WBG",3),s("GBG",3),s("CTI",3)]},{name:"Hangry Beasts",factions:["T","U"],cards:[s("TBA",3),s("SVH",3),s("MBP",2),s("FSH",3),s("RBH",3),s("FBC",3),s("LBR",2),s("CFB",3),s("AAK",3),s("KKK",2),s("FRR",1),s("FIN",1),s("IBF",1)]},{name:"Metamind Zapper",factions:["A","T"],cards:[s("MMA",3),s("DMW",3),s("GMP",3),s("SYO",3),s("KAW",3),s("SHK",3),s("CTL",2),s("CAG",2),s("MSC",2),s("MTS",2),s("ASG",2),s("ESU",2)]},{name:"Plant Party",factions:["N","U"],cards:[s("CTV",3),s("TDW",3),s("BTS",3),s("CHR",3),s("GMR",3),s("KOD",2),s("LKP",2),s("SHV",2),s("DBA",2),s("CCR",2),s("PTB",2),s("FIN",1),s("DBT",2)]},{name:"Voltron",factions:["A"],cards:[s("FGA",3),s("FGB",3),s("FGD",3),s("FGG",3),s("AFS",3),s("BSS",3),s("PRI",3),s("TUP",2),s("JPK",2),s("BWH",2),s("SFT",3)]},{name:"Do Fear the Reaper",factions:["A","N"],cards:[s("CTI",3),s("DFR",3),s("GRW",3),s("LGT",3),s("OXM",3),s("OXP",3),s("PHM",3),s("CTW",2),s("NNS",2),s("OXA",2),s("SDN",3)]},{name:"Muadib",factions:["N","U"],cards:[s("DBA",3),s("DYL",3),s("GSW",3),s("LBD",3),s("MMW",3),s("NCW",3),s("SRV",3),s("LBL",2),s("MSP",2),s("VYE",2),s("SBD",3)]},{name:"Triassic Park",factions:["T","U"],cards:[s("URB",3),s("UTR",3),s("UTM",3),s("ULR",3),s("UIC",3),s("UGL",3),s("RTS",3),s("BRN",2),s("LBR",2),s("IBF",2),s("GHB",3)]},{name:"Whacky Whinds",factions:["N","T"],cards:[s("DDD",3),s("WBH",3),s("HMF",3),s("WCS",3),s("GGP",3),s("SAD",3),s("SDN",3),s("EWE",3),s("SBG",3),s("ZSH",3)]},{name:"WWP 4 Victory",factions:["A","U"],cards:[s("WWP",3),s("EHN",2),s("SDR",2),s("HTR",2),s("MML",2),s("HTP",2),s("SHS",3),s("MND",2),s("NXC",2),s("CDT",2),s("PTB",2),s("SVO",2),s("MPH",2),s("SYO",2)]},{name:"Braaiins",factions:["N"],cards:[s("XDV",3),s("XRW",3),s("ONN",2),s("SLH",2),s("FWK",2),s("BWK",2),s("URD",2),s("TPG",2),s("DSS",2),s("KOD",2),s("ZMT",2),s("RSZ",2),s("BLW",2),s("CSB",2)]},{name:"Wanderin'",factions:["N","U"],cards:[s("LYS",3),s("STR",2),s("MBP",2),s("OSL",2),s("RLW",3),s("SSR",1),s("SVO",2),s("SSE",2),s("RHW",3),s("SYL",2),s("TGS",2),s("TMG",3),s("XDH",3)]},{name:"Walls",factions:["A","T"],cards:[s("CDC",3),s("CTG",3),s("CRC",3),s("DCS",3),s("FRI",3),s("FGA",2),s("OBB",3),s("FVA",2),s("TGN",2),s("OWH",3),s("STN",3)]},{name:"Snakes in a Lane",factions:["A","U"],cards:[s("AFO",3),s("DSV",3),s("PSC",3),s("SHS",3),s("STO",3),s("NCL",2),s("VNF",3),s("LYS",2),s("SVO",1),s("VNS",3),s("TXS",2),s("ART",2)]},{name:"Benny & Izzy",factions:["A","T"],cards:[s("BRN",3),s("EFM",2),s("IZK",3),s("JPK",1),s("MTT",1),s("NNS",1),s("OBB",2),s("OWF",2),s("OEX",3),s("PRI",2),s("PTR",1),s("TST",1),s("FLS",2),s("BLH",3),s("SHK",3)]}]},_i={name:"Fundecks 2",id:"FUN2",decks:[{name:"Ride the Lightning",factions:["T","U"],cards:[s("HOS",3),s("BLH",3),s("USS",3),s("LSK",3),s("SHK",3),s("CTL",3),s("LWY",3),s("KAW",3),s("RSP",3),s("DYB",2),s("SVO",1)]},{name:"Caught in a Web",factions:["A","N"],cards:[s("ASQ",3),s("IRT",3),s("OXA",2),s("OXM",3),s("DFS",3),s("HRM",3),s("ESD",3),s("ULG",3),s("DDS",3),s("CCS",2),s("DWW",2)]},{name:"Rando Calrissian",factions:["T","U"],cards:[s("CDM",3),s("BZS",3),s("PMI",3),s("IKA",3),s("ROE",3),s("PHC",3),s("DIS",3),s("DRE",3),s("SIV",3),s("HTP",3)]},{name:"Beards of Glory",factions:["A","U"],cards:[s("IBA",3),s("IHA",3),s("MBP",3),s("ESC",3),s("EWT",3),s("ESG",3),s("DBA",3),s("TGN",3),s("BLP",2),s("RPR",2),s("JPK",2)]},{name:"None More Verdant",factions:["U"],cards:[s("VCH",2),s("VSP",2),s("VGR",2),s("POD",2),s("MBP",2),s("EFE",3),s("VGW",3),s("WOD",1),s("SVO",1),s("RBG",3),s("RSD",3),s("SRD",2),s("ART",2),s("LYR",2)]},{name:"Exploding Cat",factions:["A","T"],cards:[s("SBF",3),s("OEX",3),s("ATI",3),s("KAW",3),s("ZSH",3),s("RSP",3),s("WMM",2),s("OWF",2),s("DFS",2),s("CHT",2),s("OBB",2),s("ABL",2)]},{name:"No, Not the Bees!",factions:["T","U"],cards:[s("LVH",3),s("HVE",3),s("SIV",3),s("TRS",3),s("KBE",3),s("SHK",3),s("LBR",3),s("RSP",3),s("VCH",2),s("VGR",2),s("CTL",2)]},{name:"Armored Column",factions:["A","U"],cards:[s("ESP",2),s("BTB",3),s("FLC",3),s("CEX",3),s("FRR",2),s("SSN",2),s("FSC",3),s("NXB",3),s("BWH",3),s("AMP",3),s("WMC",1),s("NXT",2)]},{name:"Angered Alyssa",factions:["A","T"],cards:[s("ASB",3),s("SHK",3),s("FSM",3),s("BST",3),s("SFM",3),s("BSW",3),s("VOB",3),s("TBC",3),s("SCD",3),s("MTT",2),s("ASG",1)]},{name:"Big Dawg Iniog",factions:["N","U"],cards:[s("ICD",3),s("DHC",3),s("ZDK",3),s("CCS",2),s("NCM",3),s("VCH",2),s("HTR",2),s("IRT",3),s("NGT",3),s("ROU",2),s("TOB",2),s("SPG",2)]},{name:"Rumblestone Clown Show",factions:["A","T"],cards:[s("RSE",3),s("OWF",3),s("AGP",3),s("DFS",3),s("FSM",3),s("IBF",3),s("TST",3),s("BWN",2),s("DKS",2),s("CHT",2),s("COD",1),s("LFA",2)]},{name:"Kills Bugs Dead",factions:["T","U"],cards:[s("TSP",3),s("SMS",3),s("BTD",3),s("HMO",3),s("QSW",3),s("UTR",3),s("VTR",3),s("GHB",3),s("STM",3),s("DKS",2),s("VCH",1)]},{name:"Aeon Buzzard",factions:["A","T"],cards:[s("EPH",3),s("BWN",3),s("TBB",3),s("CDM",2),s("SAD",3),s("LCE",2),s("MBR",3),s("COD",1),s("MMR",3),s("MMX",3),s("BZH",2),s("STD",2)]},{name:"Unholy Matrimony",factions:["N"],cards:[s("DFB",3),s("BOF",3),s("CGL",3),s("SGF",2),s("POX",3),s("ULG",3),s("IME",3),s("SHG",2),s("IRT",2),s("SHV",3),s("DRD",3)]},{name:"Dance of the Dryads",factions:["T","U"],cards:[s("NGQ",2),s("HOS",3),s("SDR",3),s("LBD",3),s("KTS",3),s("MPH",3),s("SSR",3),s("PYS",2),s("SVO",2),s("SBD",2),s("DYB",2),s("SND",2)]}]},tr={name:"Fundecks 3",id:"FUN3",decks:[{name:"Ashy Larry",factions:["A","T"],cards:[s("AMD",3),s("LFA",3),s("SSI",3),s("SAD",3),s("HMF",3),s("AMY",3),s("ABR",2),s("UEM",2),s("WFM",2),s("DCS",2),s("PHM",2),s("OBB",2)]},{name:"Wander These Lands",factions:["N","U"],cards:[s("LYS",3),s("CYW",1),s("RTW",3),s("RLW",3),s("SVO",2),s("DYS",2),s("RHW",3),s("GHB",2),s("ROU",2),s("IME",3),s("VCH",1),s("ULG",3),s("AEC",2)]},{name:"Blob Convention",factions:["A","N"],cards:[s("S01",3),s("NCM",3),s("NCS",3),s("CYS",3),s("FSL",3),s("NCP",3),s("NOZ",3),s("SLH",3),s("GRP",2),s("SHV",2),s("GRM",2)]},{name:"We Shall Not Cease",factions:["N","T"],cards:[s("CGG",3),s("FSM",3),s("EXD",3),s("GRP",3),s("SHV",3),s("HOX",2),s("SCV",1),s("VYE",3),s("COD",1),s("DCR",2),s("BRN",2),s("DBT",2),s("TOB",1),s("VOB",1)]},{name:"What Tek Iz This?",factions:["T","U"],cards:[s("IZK",3),s("VIC",3),s("IGR",3),s("SSH",3),s("DGW",3),s("BRN",3),s("LYS",3),s("ROK",3),s("DDF",3),s("EWV",3)]},{name:"Tromping Tuskins",factions:["A","U"],cards:[s("LBC",3),s("LBL",3),s("CTV",3),s("TGK",3),s("EWT",3),s("NFF",2),s("TSL",2),s("CSG",2),s("VPR",2),s("MXW",2),s("AOP",2),s("HRM",2),s("ESC",1)]},{name:"Enhanced Voltron",factions:["A"],cards:[s("FGA",3),s("FGB",3),s("FGD",3),s("FGG",3),s("SFG",3),s("GAS",3),s("WTK",3),s("MMG",3),s("HRM",3),s("LCE",2),s("PLW",1)]},{name:"Lazarus (Big Skills)",factions:["N","T"],cards:[s("TDW",3),s("NSH",3),s("PHC",3),s("PSH",3),s("IME",3),s("ULG",3),s("SHG",3),s("VIK",3),s("IDF",2),s("GRP",2),s("ASG",1),s("COD",1)]},{name:"Dogs! Dogs! Dogs!",factions:["T","U"],cards:[s("LTU",3),s("SDA",3),s("EHN",3),s("EWV",3),s("HTP",2),s("DYB",2),s("SVO",1),s("VCH",1),s("WHR",3),s("MMH",2),s("DBR",2),s("SIN",2),s("PYS",1),s("VTR",2)]},{name:"The Cackler",factions:["A","N"],cards:[s("CKB",3),s("ARB",3),s("GMP",3),s("LCE",2),s("PRI",2),s("RPR",3),s("DPO",3),s("SAP",3),s("DDS",3),s("OXP",3),s("ABE",2)]},{name:"Nugalug",factions:["N","T"],cards:[s("NUG",3),s("LUC",3),s("EWE",3),s("SBG",3),s("AWU",3),s("SPH",3),s("ROU",3),s("FFM",3),s("BZD",3),s("BFM",3)]},{name:"Blessed Shrine",factions:["A","T"],cards:[s("SLS",3),s("CTG",3),s("USS",3),s("MMG",3),s("CRC",3),s("STN",3),s("NXC",3),s("MND",2),s("SSD",2),s("USA",2),s("SES",1),s("OBB",2)]},{name:"The Dixie Pig",factions:["T","U"],cards:[s("SSD",3),s("WSE",3),s("NCL",3),s("STN",3),s("PYS",3),s("BSW",3),s("FKS",3),s("UCM",2),s("UHS",2),s("HTR",2),s("TBC",2),s("GHS",1)]},{name:"Wafer Thin Mint",factions:["N","T"],cards:[s("LFA",2),s("EXD",3),s("GBG",3),s("USA",3),s("PMS",3),s("STN",1),s("VOB",1),s("FSK",3),s("WFM",3),s("FFS",3),s("TBC",2),s("FOR",3)]},{name:"Cyrus the Virus",factions:["N","U"],cards:[s("CTM",3),s("PTB",3),s("POT",3),s("GRM",3),s("MNM",3),s("LMD",3),s("MPH",3),s("SOC",3),s("SRP",3),s("HGS",3)]}]},er={name:"Fundecks 4",id:"FUN4",decks:[{name:"Pain Forest",factions:["T","U"],cards:[s("TDS",3),s("TMS",3),s("DTR",3),s("HTR",3),s("EFE",3),s("SFM",3),s("SHK",3),s("VCH",2),s("BSW",2),s("UCM",2),s("MSP",1),s("VSP",1),s("IBF",1)]},{name:"Disrespect the Weak",factions:["A","N"],cards:[s("UIW",3),s("SRM",3),s("OXP",3),s("OXM",3),s("SRP",3),s("WFS",2),s("GRW",2),s("DGZ",2),s("VPR",2),s("DDS",2),s("PHM",2),s("OFM",2),s("LMV",1)]},{name:"I Love the Dead",factions:["N","U"],cards:[s("YNS",3),s("NSW",3),s("STS",2),s("SIV",2),s("SLH",3),s("CCR",3),s("GGW",3),s("REW",3),s("SST",2),s("MML",2),s("DYS",2),s("TPT",2)]},{name:"Silly Ol' Steelscale",factions:["A","T"],cards:[s("STG",3),s("DGW",3),s("FKS",3),s("FSK",3),s("USA",3),s("CEX",3),s("OBB",3),s("BWH",2),s("DRE",1),s("FVA",1),s("AGW",2),s("SOK",2),s("NNS",1)]},{name:"Poison Crush",factions:["T","U"],cards:[s("WBY",3),s("LOD",3),s("SPT",3),s("VND",3),s("DPG",3),s("FZS",3),s("GCR",3),s("UBL",2),s("MPH",3),s("FKS",2),s("STB",2)]},{name:"Dragons, Eh",factions:["N","T"],cards:[s("DGW",3),s("SMD",3),s("ATI",3),s("LMD",3),s("DDD",3),s("CSW",3),s("DTD",3),s("VIC",3),s("BTD",3),s("SOV",3)]},{name:"Hail Hydra",factions:["A","U"],cards:[s("ESG",3),s("DBA",3),s("CHY",3),s("LHY",3),s("RHY",3),s("SVH",3),s("SVO",2),s("EVT",3),s("AEC",2),s("AGW",2),s("SPG",1),s("VCH",2)]},{name:"Coral, Get to the Sides!",factions:["N"],cards:[s("IRT",3),s("IVS",3),s("ZMT",3),s("ZDK",3),s("XDV",3),s("TNL",3),s("ABB",3),s("SNT",3),s("XRW",3),s("CCC",3)]},{name:"The Bear and the Maiden Fair",factions:["T","U"],cards:[s("DZD",3),s("FWB",3),s("DBR",3),s("FFM",3),s("AMD",3),s("WFM",3),s("SHK",3),s("SIV",3),s("AIV",2),s("NCL",2),s("SOV",1),s("EFA",1)]},{name:"Bionic Darkforged",factions:["A","U"],cards:[s("SWS",3),s("DSE",3),s("DRS",3),s("SSP",3),s("DHM",3),s("SHA",3),s("ESC",3),s("LBD",3),s("AGP",2),s("CTV",2),s("SVO",1),s("NNS",1)]},{name:"Caustic Darkforged",factions:["N","T"],cards:[s("DSW",3),s("GGB",3),s("SFE",3),s("DSA",3),s("SCZ",3),s("USY",3),s("ZXR",3),s("SPH",3),s("BZH",2),s("IBF",1),s("VGL",2),s("CYW",1)]},{name:"Thralled Darkforged",factions:["A","N"],cards:[s("SWS",3),s("GGB",3),s("DSW",3),s("DSE",3),s("SCZ",3),s("SHA",3),s("PSH",3),s("STD",3),s("DDS",2),s("AOP",1),s("BFT",2),s("TPT",1)]},{name:"Roasted Darkforged",factions:["T","U"],cards:[s("DSA",3),s("DRS",3),s("SFE",3),s("SSP",3),s("DHM",3),s("USY",3),s("CDM",3),s("GHR",3),s("MPH",2),s("ENR",1),s("PYS",2),s("STB",1)]},{name:"Punchy Darkforged",factions:["A","T"],cards:[s("SWS",3),s("DSE",3),s("SFE",3),s("DSA",3),s("SHA",3),s("USY",3),s("WMR",3),s("AMD",3),s("OWF",2),s("SOA",1),s("UBL",2),s("SOK",1)]},{name:"Mouldy Darkforged",factions:["N","U"],cards:[s("DSW",3),s("GGB",3),s("DRS",3),s("SSP",3),s("DHM",3),s("SCZ",3),s("DBA",3),s("GGW",3),s("ROG",2),s("SIN",2),s("SLH",1),s("DYB",1)]}]},He=[Yi,zi,Zi,Ki,Xi,ji,qi,Qi,Ji,_i,tr,er];He.forEach(o=>{o.decks.forEach(t=>{t.cards.map(i=>i.num).reduce((i,r)=>i+r,0)!==30&&console.warn("Pre-con deck with not 30 cards: "+o.name+" -- "+t.name)})});const xt=()=>{p.dirt()};class Qe{state;constructor(t){this.state=t}getState(){return this.state}get adjacent(){return p.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,xt()}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 breakthrough(){return this.state.breakthrough||this.modBool("BT")}set breakthrough(t){const i=this.state;i.breakthrough=t,xt(),Z.addFactBoard("U",i.id,i.lane,i.owner)}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,xt()}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,xt(),this.enforceEffects("DF",this.owner))}get effects(){return this.state.effects}get extraBattles(){return this.state.extraBattles}set extraBattles(t){this.state.extraBattles=t}get faction(){return W.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 W.getCard(this.code).isTribe(t)}get lane(){return this.state.lane}get level(){return this.state.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){const i=this.state;i.negateArmor=t,xt(),this.enforceEffects("AR"),Z.addFactBoard("U",i.id,i.lane,i.owner)}get negateDefender(){return this.state.negateDefender||this.modBool("ND")}negDefend(t){const i=this.state;i.negateDefender||(i.negateDefender=!0,xt(),this.enforceEffects("DF",this.owner),Z.addFactBoard(t,i.id,i.lane,i.owner))}get negateMobility(){return this.state.negateMobility||this.modBool("NM")}set negateMobility(t){const i=this.state;i.negateMobility=t,xt(),Z.addFactBoard("U",i.id,i.lane,i.owner)}get negateRegen(){return this.state.negateRegen}set negateRegen(t){this.state.negateRegen=t,xt()}get opposed(){return p.searchByLane(p.oppositeLane(this.lane),!this.owner)}get owner(){return this.state.owner}get poison(){return this.state.poison+this.modSum("PN")}get rank(){return k.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,r,n=void 0){this.state.status==="A"&&(t!==0&&(this.state.attack+=t,this.enforceEffects("AT"),xt()),i!==0&&(this.state.health+=i,this.state.maxHealth+=i,this.enforceEffects("CH"),Bt.deathProdder(this,n),xt(),i>0&&x.addEvents(I.creatHeal(this,i))),Z.addFactBoard(r,this.id,this.lane,this.owner))}addArmor(t){if(!this.negateArmor&&this.state.status==="A"){const i=this.state.armor+t;this.state.armor=Math.max(0,i),this.enforceEffects("AR"),xt(),Z.addFactBoard("A",this.id,this.lane,this.owner)}}addMobility(t,i){if(!this.negateMobility&&this.state.status==="A"){const r=this.state.mobility+t;this.state.mobility=Math.max(0,r),xt(),Z.addFactBoard(i,this.id,this.lane,this.owner)}}addPoison(t){if(this.state.status==="A"){const i=this.state.poison+t;this.state.poison=Math.max(0,i),xt(),Z.addFactBoard("U",this.id,this.lane,this.owner)}}addRegen(t,i){if(!this.negateRegen&&this.state.status==="A"){const r=this.state.regen+t;this.state.regen=Math.max(0,r),xt(),Z.addFactBoard(i,this.id,this.lane,this.owner)}}heal(t,i=!0){if(t<1||this.state.status!=="A")return 0;const r=Math.min(this.health+t,this.maxHealth)-this.health;return r<1?0:(this.state.health+=r,xt(),this.enforceEffects("CH"),x.addEvents(I.creatHeal(this,r)),i&&Z.addFactBoard("U",this.id,this.lane,this.owner),r)}setHealth(t){this.state.health=t,xt()}hurt(t,i=!1){if(t<1)return[0,0];const r=Math.max(Math.min(t,this.armor-this.armorDmg),0);let n=t-r,c=this.health-n;this.state.armorDmg+=r;let f=0;return i&&c<0&&(f=n-this.health,n=this.health),n>0&&(xt(),this.state.health-=n,this.enforceEffects("CH")),[n,f]}hurtBattle(t,i,r=!1){const n=this.hurt(t,r);return n[0]>0&&x.addEvents(I.damage(!0,n[0],this.health,!0,!0,this,i)),n[1]}hurtDirect(t,i,r,n=void 0){const c=this.hurt(t,!1);return c[0]>0&&(y.lawg(i,` dealt ${t} dmg to `,this.code,"."),Z.addFactBoard(r,this.id,this.lane,this.owner),x.addEvents(I.damage(!1,c[0],this.health,!1,!0,this,void 0)),Bt.deathProdder(this,n)),c[0]}modEffectPropagator(t){t.type==="AT"?this.enforceEffects("AT"):t.type==="HL"?(this.enforceEffects("CH"),Bt.deathProdder(this)):t.type==="AR"||t.type==="NA"?this.enforceEffects("AR"):(t.type==="DF"||t.type==="ND")&&this.enforceEffects("DF",this.owner)}modSum(t){return b.modSum(this.mods,t)}modBool(t){return b.modBool(this.mods,t)}hasMod(t){return b.hasModG(this.mods,t)}addMod(t,i){this.mods.push(t),this.modEffectPropagator(t),xt(),t.type!=="MH"&&Z.addFactBoard(i,this.id,this.lane,this.owner)}anim8(t){Z.addFactBoard(t,this.id,this.lane,this.owner)}addModSafe(t){b.hasMod(this.mods,t)||this.addMod(t,"X")}removeMod(t,i=!0){const r=this.state.mods.filter(n=>n.granter===t);r.length>0&&(xt(),this.state.mods=this.state.mods.filter(n=>n.granter!==t),r.forEach(n=>{i&&this.modEffectPropagator(n),n.type==="AR"&&(this.state.armorDmg=Math.max(0,this.state.armorDmg-n.value))}))}removeModSafe(t,i=!0){this.hasMod(t)&&this.removeMod(t,i)}expireMod(t){this.state.mods.splice(b.modIdx(this.state.mods,t),1)}bonusTotal(){let t=ft.sumNuggets(this.triggers);return this.state.bonus&&(t=ft.addNuggets(t,this.state.bonus)),t}threatTotal(){const t=this.triggers.map(i=>i.bonus?.threat).filter(Boolean);return this.state.bonus?.threat&&t.push(this.state.bonus.threat),t}endActivation(){this.modBool("EA")?this.removeMod(this.id):this.state.activationAvailable=!1,Bt.deathCheck(),T.actionDone()}move(t,i){this.state.status==="A"&&(Z.addFactBoard(i,this.id,this.lane,this.owner),Z.addLaneMove(this.id,this.lane,t,this.owner),xt(),this.state.lane=t,Be.positionChange(this.owner),x.addEvents(I.creature("MOV",this)))}addEffect(t,i){const r=b.effect(t,i);return this.effects.push(r),r}enforceEffects(t,i=!1){this.effects.filter(r=>r.watch===t).filter(r=>r.area==="A"||r.area==="C"&&this.owner===i).forEach(r=>W.getCard(r.logicCode).enforceEffect(this))}jr4(t,i=""){i===""&&(i=this.code);const r=b.trigger(t,i);return r.creatId=this.id,this.triggers.push(r),xt(),r}removeTrigger(t){const i=b.trigIdx(this.triggers,t);i>-1?(this.triggers.splice(i,1),t.changes&&xt()):console.error("Wery curious, could not find trigger to remove",t)}wipeAll(){this.preWipe();const t=this.state;t.hints=[],t.armor=0,t.mobility=0,t.poison=0,t.regen=0,t.aggressive=!1,t.defender=!1,t.breakthrough=!1,t.defender=!1,t.negateDefender=!1,t.negateArmor=!1,t.bonus=void 0,t.changed=!0,t.negateActivate=!0,k.removeModSafe(!0,t.id),k.removeModSafe(!1,t.id),p.creatByTarget(b.crTarg()).forEach(i=>{i.removeModSafe(t.id),i.enforceEffects("PS",t.owner)}),this.enforceEffects("AT"),this.enforceEffects("AR"),this.enforceEffects("CH"),Be.defenderChange(t.owner),this.anim8("A"),xt()}preWipe(){this.state.mods=[],this.state.triggers=[],this.state.effects=[]}get hints(){return this.state.hints}aiHints(){return this.hints}}class b{static creatureState(t,i){return{activationAvailable:!0,aggressive:!1,armor:0,armorDmg:0,attack:0,bonus:void 0,breakthrough:!1,changed:!1,code:"",defender:!1,effects:[],extraBattles:0,health:0,hints:[],id:"",lane:i,level:0,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:E.genId(),condition:b.target("TH"),sourceCard:t}}static mod(t,i,r=""){return{type:t,value:typeof i=="boolean"?i?1:0:i,granter:r,expiry:"NN"}}static modT(t,i,r=""){const n=b.mod(t,i,r);return n.expiry="ET",n}static trigger(t,i){return{id:E.genId(),type:t,logicCode:i,creatId:"",customCode:"",interactive:!1,changes:!1,bonus:void 0,batch:!1}}static triggerReaction(t,i,r,n){return{event:t,owner:r,creatId:"",cardCode:"",trigger:i,host:n,draw:!0}}static basicAction(t){return{zone:"N",key:t,host:"",param:""}}static fieldSelectAction(t,i=-1,r=!0){return{zone:"F",key:t,playerA:r,lane:i,host:"",param:""}}static deckSelectAction(t,i,r){return{zone:"N",key:t,card:i,position:r,host:"",param:""}}static handSelectAction(t,i="",r="",n=-1){return{zone:"H",key:t,card:i,cost:r,position:n,host:"",param:"",canPlay:!1,lvlOnly:!1}}static playerSelectAction(t,i){return{zone:"P",key:t,playerA:i,host:"",param:""}}static draftSelectAction(t,i,r){return{zone:"N",key:t,index:i,pack:r,host:"",param:""}}static menuButtonAction(t){return{zone:"N",key:"MNBT",host:"",param:t}}static actionifier(t,i,r,n){const c=t;return c.key=i,c.host=r,c.param=n,c}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,r,n){return b.actionifier(b.target(t),i,r,n)}static crTarg(){const t=b.target("TF");return t.field="O",t.creatStatus="V",t}static crActTarg(t,i,r){return b.actionifier(b.crTarg(),t,i,r)}static crNotMeTarg(t){const i=b.target("TF");return i.field="O",i.creatStatus="V",i.notMe=t,i}static crNotMeActTarg(t,i,r,n){return b.actionifier(b.crNotMeTarg(i),t,r,n)}static crFriendTarg(){const t=b.crTarg();return t.player="F",t}static crFriendActTarg(t,i,r){return b.actionifier(b.crFriendTarg(),t,i,r)}static crFriendNotMeTarg(t){const i=b.crNotMeTarg(t);return i.player="F",i}static crFriendNotMeActTarg(t,i,r,n){return b.actionifier(b.crFriendNotMeTarg(i),t,r,n)}static crEnemyTarg(){const t=b.crTarg();return t.player="E",t}static crEnemyActTarg(t,i,r){return b.actionifier(b.crEnemyTarg(),t,i,r)}static playerTarg(t){const i=b.target("TP");return i.player=k.toTarget(t),i}static playerActTarg(t,i,r,n){return b.actionifier(b.playerTarg(t),i,r,n)}static lvlHandActTarg(t,i){const r=this.actionTarget("TH","CARD",t,i);return r.player="F",r.canLevel=!0,r.hint=["CD"],r}static emptyTarg(){const t=b.target("TF");return t.field="E",t}static emptyActTarg(t,i,r){return b.actionifier(b.emptyTarg(),t,i,r)}static emptyPlayerTarg(t){const i=b.emptyTarg();return i.player=k.toTarget(t),i}static emptyPlayerActTarg(t,i,r,n){return b.actionifier(b.emptyPlayerTarg(t),i,r,n)}static modSum(t,i){return t.filter(r=>r.type===i).map(r=>r.value).reduce((r,n)=>r+n,0)}static modBool(t,i){return t.some(r=>r.type===i&&r.value===1)}static hasModG(t,i){return t.findIndex(r=>r.granter===i)>-1}static hasMod(t,i){return b.modIdx(t,i)>-1}static modIdx(t,i){return t.findIndex(r=>r.granter===i.granter&&r.type===i.type)}static trigIdx(t,i){return t.findIndex(r=>r.id===i.id)}}class Wt{constructor(t){this.code=t,this.level=parseInt(t.substring(3))}code;consistent=!1;faction="X";cardCode(){return Wt.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`}free=!1;level;maxLevel=3;minLevel=1;name="";overload=!1;rarity="T";spice;text="";get type(){return "C"}hints;addSp(t,i){}aiHints(){return this.hints??[]}canLevel(){return this.level{c+=n[m]*r[0][m],f+=n[m]*r[1][m]}),[c,f]}rawNug(t,i,r,n,c=0,f=void 0){return ft.rawNugget(t,i,r,n,c,f)}buffNug(t,i,r=void 0){return this.rawNug(0,i+t,t,0,0,r)}playerNug(t,i=void 0){return this.rawNug(0,0,0,t,0,i)}spawnNug(t,i=void 0){const r=ft.cardCreatValueFormula(t);return this.rawNug(1,r,t.iAttack,0,0,i)}statSpawnNug(t,i,r=void 0){const n=this.buffNug(t,i,r);return n.count=1,n}avgSpawnNug(t){const i=this.avgCreatureStats(t);return this.statSpawnNug(i[0],i[1])}regnNug(t,i=void 0){return this.rawNug(0,ft.calcCreatValueFormula(0,0,0,0,t,!1,0),0,0,0,i)}multNug(t,i){return t.attack*=i,t.value*=i,t.count*=i,t.pHealth*=i,t}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 boof3915(){return this.lValN([3,9,15])}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 P extends Wt{constructor(t){super(t)}iHealth=0;iAttack=0;iAggro=!1;iArmor=0;iBT=!1;iDefend=!1;iMobile=0;iRegen=0;tribe=[];isTribe(t){return(Array.isArray(t)?t:[t]).every(r=>this.tribe.includes(r))}jr3(t,i){const r=b.creatureState(t,i);return r.id=E.genId(),r.code=this.code,r.level=this.level,r.health=this.iHealth,r.attack=this.iAttack,r.maxHealth=r.health,r.regen=this.iRegen,r.breakthrough=this.iBT,r.defender=this.iDefend,r.aggressive=this.iAggro,r.armor=this.iArmor,r.mobility=this.iMobile,r.hints=this.aiHints(),r.bonus=this.bonus,new Qe(r)}playTargets(){const t=b.actionTarget("TF","FORG",this.code,"");return t.player="F",[t]}canActivate(t){return!1}startActivation(t){console.error("encountered activation request for creature with no activate",t)}get formation(){return!1}addExtraActivate(t){t.addMod(b.modT("EA",!0,t.id),"X")}}class vt extends Wt{constructor(t){super(t)}get type(){return "S"}logSpell(t=void 0,i=void 0){if(nt.simOn)return;const r=["Casted ",this.code];t&&(r.push(" on ",t.code),i&&r.push(" and ",i.code)),r.push("."),y.lawg(...r)}}class Te{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),r=this.playerStats(!t);return Te.deltafier(i,r)}static deltafier(t,i){const r=Te.blankStats(!0);return r.creatCount=t.creatCount-i.creatCount,r.creatValue=t.creatValue-i.creatValue,r.threatValue=t.threatValue-i.threatValue,r.playerHealth=t.playerHealth-i.playerHealth,r.bonus=t.bonus-i.bonus,r}static blankStats(t){return{side:t,creatCount:0,creatValue:0,threatValue:0,playerHealth:0,bonus:0}}}class ft{static dcWeight=.4;fromState(t=!1){const i=p.qActiveCreats(),n=[!0,!1].map(c=>{const f=Te.blankStats(c),m=k.toPlayer(c);f.playerHealth=ft.playerFormula(m.health,k.totalArmor(m),k.totalPoison(m),m.effects.length);const C=ft.sumNuggets(m.triggers);f.playerHealth+=C.pHealth,f.creatCount=C.count,f.creatValue=C.value,f.threatValue=C.attack,f.bonus=C.bonus;const D=i.filter(B=>B.owner===c);return D.forEach(B=>{const G=B.bonusTotal();f.playerHealth+=G.pHealth,f.bonus+=G.bonus,f.creatCount+=1+G.count,f.creatValue+=ft.creatValueFormula(B)+G.value,f.threatValue+=ft.threatFormula(B,i)+G.attack}),t&&c&&(D.forEach(B=>{f.bonus+=ft.threatEOT(B,m.turn,i)}),L.regularPlays>2&&(f.bonus+=(L.regularPlays-2)*(Math.min(m.rank,3)*2))),f});return new Te(n[0],n[1])}static ddp9(t,i,r,n,c=0){const f=t/4,m=i/10,C=r/12,D=n/8;return f+m+C+D+c}static creatValueFormula(t){return ft.calcCreatValueFormula(t.attack,t.health,t.armor,t.mobility,t.regen,t.breakthrough,t.poison)}static cardCreatValueFormula(t){return ft.calcCreatValueFormula(t.iAttack,t.iHealth,t.iArmor,t.iMobile,t.iRegen,t.iBT,0)}static calcCreatValueFormula(t,i,r,n,c,f,m){const C=f?1:0;return i+Math.max(0,t)+(r+Math.min(n,3)+C+c-m)*1.5}static playerFormula(t,i,r,n){return t+(i-r)*2+n*4}static threatFormula(t,i){let r=0,n=0;if(t.defender)r=t.attack;else{const c=ft.oppFinder(t,i);c?(t.breakthrough&&(n=Math.max(t.attack-c.health,0)),r=t.attack-n):n=t.attack,n>0&&(n+=ft.scalingBonus(n))}return Math.max(r,0)+Math.max(n,0)}static threatEOT(t,i,r){let n=0;return t.threatTotal().forEach(f=>{f==="TP"?t.attack>0&&S.isUn(ft.oppFinder(t,r))&&(t.defender?n+=t.level/2:n+=t.level):f==="TS"?n+=t.level*2*(t.health/(t.maxHealth||1)):f==="TX"||f==="TW"?n+=t.level*(f==="TX"?1.5:.5):f==="TH"&&i>1?n+=t.level*(i/4):f==="TL"&&i===4&&(n-=t.level)}),n}static oppFinder(t,i){const r=6-t.lane;return i.find(n=>n.owner!==t.owner&&n.lane===r)}static rawNugget(t,i,r,n,c=0,f=void 0){return{count:t,value:i,attack:r,pHealth:n,bonus:c,threat:f}}static addNuggets(t,i){return ft.rawNugget(t.count+i.count,t.value+i.value,t.attack+i.attack,t.pHealth+i.pHealth,t.bonus+i.bonus)}static sumNuggets(t){let i=ft.rawNugget(0,0,0,0,0);return t.forEach(r=>{r.bonus&&(i=ft.addNuggets(i,r.bonus))}),i}static scalingBonus(t){let i=7;if(t<=i)return 0;let r=!0,n=0,c=1;const f=7;for(;r;)t>i+f?(n+=c*f,i+=f,c++):(n+=c*(t-i),r=!1);return n}weighState(t,i,r){const n=t.deltaStats(r),c=i.deltaStats(r),f=Te.deltafier(c,n),m=f.playerHealth<0?-1:1,C=ft.scalingBonus(f.playerHealth*m)*m+f.playerHealth;return ft.ddp9(f.creatCount,f.creatValue,f.threatValue,C,f.bonus)}}class ir{aiPlayer;constructor(t){this.aiPlayer=t}jr7(t,i=3){return`${t}${i}`}jr6(t,i){const r=S.randInt(0,i.length),n=i[r];return i.splice(r,1),p.birth(t,"F",this.aiPlayer,n,"X")}cheatin(){const t=k.toPlayer(this.aiPlayer),i=k.toPlayer(!this.aiPlayer),r=i.health-t.health;let n=0;r>85?n=3:r>65?n=2:r>45&&(n=1);const c=p.emptyLanes(this.aiPlayer);if(n===0||c.length===0)return!1;y.lawg(this.aiPlayer," is a cheaty cheaterton.");let f=0;if(n===1){if(L.regularPlays-=1,f=S.randInt(0,13),f===0)this.jr6(this.jr7("HTR"),c);else if(f===1)this.jr6(this.jr7("AGM"),c).addRegen(8,"T");else if(f===2){const m=this.jr6(this.jr7("YNS"),c);m.buff(0,15,"N"),m.addRegen(4,"N")}else if(f===3)this.jr6(this.jr7("TBA"),c);else if(f===4)this.jr6(this.jr7("DCS"),c);else if(f===5)this.jr6(this.jr7("GGP"),c).addRegen(8,"N");else if(f===6){const m=this.jr6(this.jr7("WFM"),c);m.aggressive=!0}else if(f===7){const m=this.jr6(this.jr7("FFU"),c);m.aggressive=!0}else if(f===8){const m=this.jr6(this.jr7("URB"),c);m.aggressive=!0}else if(f===9){const m=this.jr6(this.jr7("KOD"),c);m.aggressive=!0,m.addRegen(6,"N")}else if(f===10)this.jr6(this.jr7("AGK"),c).addArmor(3);else if(f===11){const m=this.jr6(this.jr7("PSC"),c);m.aggressive=!0}else if(f===12){const m=this.jr6(this.jr7("SAD"),c);m.aggressive=!0}}else if(n===2)if(L.regularPlays-=1,f=S.randInt(0,17),f===0){const m=this.jr6(this.jr7("NDR"),c);m.aggressive=!0}else if(f===1){const m=this.jr6(this.jr7("CSW"),c);m.aggressive=!0}else if(f===2)this.jr6(this.jr7("GGD"),c).addRegen(6,"N");else if(f===3)this.jr6(this.jr7("EFP"),c);else if(f===4)this.jr6(this.jr7("ZTU"),c);else if(f===5){const m=this.jr6(this.jr7("DDD"),c);m.aggressive=!0}else if(f===6)this.jr6(this.jr7("RBH"),c).addRegen(8,"T");else if(f===7)this.jr6(this.jr7("SFT"),c);else if(f===8)this.jr6(this.jr7("GTT"),c);else if(f===9)this.jr6(this.jr7("SMD"),c);else if(c.length===5)this.jr6(this.jr7("DFB"),c),[1,2,3,4].forEach(m=>this.jr6(this.jr7("XHS"),c));else if(c.length===4)this.jr6(this.jr7("LMV"),c);else if(c.length===3)this.jr6(this.jr7("LHY"),c),this.jr6(this.jr7("SVH"),c),this.jr6(this.jr7("DBA"),c);else if(c.length===2)this.jr6(this.jr7("UTR"),c),this.jr6(this.jr7("TDS"),c);else if(t.turn===4)this.jr6(this.jr7("SSR"),c);else if(t.turn===1)this.jr6(this.jr7("ESK"),c);else{const m=this.jr6(this.jr7("XSH"),c);m.aggressive=!0}else if(n===3)if(f=S.randInt(0,20),f===0){const m=this.jr6(this.jr7("IHA",4),c);m.aggressive=!0}else if(f===1)this.jr6(this.jr7("CHR"),c);else if(f===2)this.jr6(this.jr7("FGO",1),c);else if(f===3)this.jr6(this.jr7("CHV",4),c);else if(f===4)this.jr6(this.jr7("KKK",4),c);else if(t.health<20){const m=this.jr6(this.jr7("ODC",4),c);m.aggressive=!0}else if(c.length===5){const m=S.randInt(0,4);if(m===0)[1,2,3,4,5].forEach(C=>this.jr6(this.jr7("UWL",2),c));else if(m===1)[1,2].forEach(C=>this.jr6(this.jr7("DFB"),c)),[1,2,3].forEach(C=>this.jr6(this.jr7("FFD"),c));else if(m===2)[1,2,3,4,5].forEach(C=>this.jr6(this.jr7("BWK"),c));else if(m===3){this.jr6(this.jr7("SBG"),c),this.jr6(this.jr7("EWE"),c);const C=this.jr6(this.jr7("BMY"),c);C.defender=!0,C.aggressive=!0}}else if(i.health>350)t.health<180&&(k.heal(t,180-t.health,"POZ1"),Z.addHeal(t.isPlayerA)),this.jr6(this.jr7("AGD"),c);else if(i.health>250)this.jr6(this.jr7("FGO"),c);else if(c.length===4){const m=S.randInt(0,3);m===0?(this.jr6(this.jr7("AGK"),c),[1,2,3].forEach(C=>this.jr6(this.jr7("VBK"),c))):m===1?(this.jr6(this.jr7("TDS"),c),this.jr6(this.jr7("TDS"),c),this.jr6(this.jr7("UTR"),c)):m===2&&[1,2,3,4].forEach(C=>this.jr6(this.jr7("CDC"),c))}else if(c.length===3)if(S.randInt(0,2)){this.jr6(this.jr7("SDR"),c),this.jr6(this.jr7("SDR"),c);const m=this.jr6(this.jr7("UPM"),c);m.aggressive=!0}else{this.jr6(this.jr7("SDL"),c);const m=this.jr6(this.jr7("NFF"),c);m.aggressive=!0}else if(c.length===2)this.jr6(this.jr7("SPM"),c),this.jr6(this.jr7("SPM"),c);else{const m=this.jr6(this.jr7("NXC"),c);m.buff(10,0,"A"),m.aggressive=!0,m.addMobility(2,"A"),m.addRegen(5,"A")}return t.health<30&&(k.heal(t,50-t.health,"POZ1"),Z.addHeal(t.isPlayerA)),!0}}var at=(o=>(o[o.Left=0]="Left",o[o.Both=1]="Both",o[o.Right=2]="Right",o[o.ForceRight=3]="ForceRight",o))(at||{});class ci{action;hitTest(t,i,r){}enabled=!0;mouse=0;validButton(t){return this.mouse===1||this.mouse===t}static arrayHit(t,i,r,n){let c,f=0;const m=t.length;for(;c===void 0&&f=t&&this.originY<=i&&this.endY>=i?this.action:void 0}}const rr={zone:"N",key:"BNDL",host:"",param:""};class Xt extends ht{constructor(t,i,r,n,c=0){super(rr,t,i,r,n,c)}static fromBox(t,i=0){return new Xt(t[0],t[1],t[2],t[3],i)}childs=[];addChild(t){this.childs.push(t)}clear(){this.childs=[]}hitTest(t,i,r){if(super.hitTest(t,i,r))return ci.arrayHit(this.childs,t,i,r)}}class Ne{realPromise;resolveMe(t){}rejectMe(){}getPromise(){return this.realPromise}constructor(){this.realPromise=new Promise((t,i)=>{this.resolveMe=t,this.rejectMe=i})}}const ui=25,di=9999,sr=-9999,ar=-999999,nr=["CANC","DEET","SCRH"],or=["HPLY","ACTV","MOVE"];class hr{dumb=!1;inPhase=!0;log=!1;simOff=!0;simOn=!1;boulos(t){this.simOff=!t,this.simOn=t}promStack=[];peekStack=[];peeking=!1;slowpoke=0;endCount=0;aiPlayer=!1;brdEval;rootBoardStats;turnSims=0;turnTime=0;kickOut=!1;kickTimer=0;constructor(){this.brdEval=new ft,this.rootBoardStats=new Te(Te.blankStats(!0),Te.blankStats(!1))}setLog(t){this.log=t}lNum(t){return t<-899999?"NUNS":t<-8999?"LOSS":t>8888?"KILL":t.toFixed(1)}popProm(t){this.promStack.pop().resolveMe(t)}popPeeker(t){this.peekStack.pop().resolveMe(t)}hitMainPhase(){this.dumb&&this.simOn&&this.inPhase&&L.mainBattle&&(this.inPhase=!1)}simEndpoint(t){if(this.endCount++,this.promStack.length===0)y.debug("Tried to end a sim, but no promise to unlock."),console.trace();else{let i;if(t==="T"){const r=this.brdEval.fromState(!0);i=this.brdEval.weighState(this.rootBoardStats,r,this.aiPlayer)}else t==="W"?i=di:t==="L"?i=sr:i=ar;this.popProm(i)}}async processAction(t,i,r=!1){const n=this.simOff;let c=0,f=this.actionPruner(t);if(f=this.noHandDoubles(f),this.peeking){this.popPeeker(f);return}if(n&&this.dumb&&i&&(this.dumb=!1,y.debug("Smart Again.",!1)),this.dumb&&!this.inPhase){let B=f.filter(G=>G.key==="FITE"||G.key==="ENDT");B.length>0&&(f=B)}if(n){Ct.hwhipe();const B=f.map((q,pt)=>Ct.drawAiGear(pt,!1));await Promise.all(B),await $e.drawActions([]),await S.sleep(ui),this.kickOut=!1,this.boulos(!0),this.slowpoke=Date.now(),this.rootBoardStats=this.brdEval.fromState(),this.endCount=0;const G=await this.peeker(f),R=[];let X=0,V=0,_=[];G.forEach(q=>{X+=q.peek.length,q.free&&(q.free==="FREE"?V++:_.includes(q.free)||(V++,_.push(q.free))),q.wasPeek&&q.peek.some(pt=>this.hasHint(pt,"DF"))&&R.push(q.root)}),R.length>0?(f=R,this.dumb=!0,y.debug("Do firsts; dumb mode. Action count "+f.length,!1)):r?(this.dumb=!0,y.debug("Forced dumb mode.",!1)):L.regularPlays+V>3?(this.dumb=!0,y.debug("4+ plays; dumb mode. Peek was "+X,!1)):k.getActive().hand.length>7?(this.dumb=!0,y.debug("8+ in hand; dumb mode. Peek was "+X,!1)):X>29&&S.options.debug&&this.peekerReport(G)}if(f.length===0){n&&(console.error("Root eval set consisted of 0 valid actions"),y.debug("!! Zero Action Root !!")),this.simEndpoint("D");return}let m=-99999;const C=[];let D=!0;if(n)if(f.length===1)C.push({a:f[0],weight:99}),D=!1;else{const B=f.findIndex(G=>G.key==="HPLY"&&G.card==="ESU2"||G.card==="ESU3");B>-1&&(C.push({a:f[B],weight:99}),D=!1)}if(D){We.saveState();let B=!0;for(let G=0;G4e4&&(this.kickOut=!0),V===di&&(B=!1),V+=this.hintWeight(R),V>m&&(m=V),We.restoreState(),n&&(C.push({a:R,weight:V}),await Ct.drawAiGear(G,!0),c++,await S.sleep(ui))}We.popState()}if(n)if(this.boulos(!1),this.kickOut)y.lawg("🤖: High complexity encountered. Recombobulating."),this.processAction(t,i,!0);else{const B=m-(i?.4:.2);let G=C.filter(q=>q.weight>B);G.length>1&&G.findIndex(q=>q.a.key==="ENDT")>-1&&(G=G.filter(q=>q.a.key!=="ENDT"));let R;if(B>di-100){const q=G.find(pt=>pt.a.key==="FITE");q?R=q.a:R=G[S.randInt(0,G.length)].a}else R=G[S.randInt(0,G.length)].a;const X=Date.now()-this.slowpoke,V=Math.max(1,350-X),_=X-ui*c;this.turnSims+=this.endCount,this.turnTime+=_,S.options.debug&&(i?(y.debug("▪"),y.debug("🧠 Main Choices 🧠"),C.sort((q,pt)=>pt.weight-q.weight).forEach(q=>{const pt=this.dazzler(q,R,B);let Mt="",ye;const kt=q.a.key;kt==="HPLY"?(Mt=q.a.card,ye="Play "):kt==="MOVE"||kt==="ACTV"?(Mt=q.a.host,ye=kt==="MOVE"?"Move ":"Actv "):kt==="FITE"||kt==="ENDT"?ye=kt==="FITE"?"Fite ":"Done ":ye=kt+" ??? ",y.lawg(ye,Mt," : "+this.lNum(q.weight)+pt)}),y.debug("🧠 ~~~~~~~~~~~~~~ 🧠"),y.debug("▪")):R.key==="FORG"&&(y.debug("🧠 Lane Choices 🧠"),C.filter(q=>q.a.key==="FORG").sort((q,pt)=>pt.weight-q.weight).forEach(q=>{y.lawg("Lane "+q.a.lane+" : "+this.lNum(q.weight)+this.dazzler(q,R,B))}),y.debug("🧠 ~~~~~~~~~~~~~~ 🧠"),y.debug("▪"))),S.sleep(V).then(()=>{T.handleAction(R)})}else this.popProm(m)}dazzler(t,i,r){return t.a===i?" 🏆":t.weight>r?" 🌻":""}actionPruner(t){let i=t.filter(r=>nr.indexOf(r.key)===-1);return L.mainBattle?i=i.filter(r=>r.key!=="HDSC"):i=i.filter(r=>!this.hasHint(r,"BB")),i=i.filter(r=>{if(this.hasHint(r,"HR")){if(r.zone==="P")return r.playerA!==this.aiPlayer;{const n=p.ddf6(r);return n.owner===this.aiPlayer?n.aiHints().includes("MC"):!0}}else return!0}),i=i.filter(r=>{if(this.hasHint(r,"KL")){const n=p.ddf6(r);return n.owner===this.aiPlayer?n.aiHints().includes("ST"):!0}else return!0}),i=i.filter(r=>this.hasHint(r,"BF")?r.playerA===this.aiPlayer:!0),i=i.filter(r=>this.hasHint(r,"DB")?r.playerA!==this.aiPlayer:!0),i=i.filter(r=>{if(this.hasHint(r,"PN")){if(r.zone==="P")return r.playerA!==this.aiPlayer;{const n=r,c=p.ddf6(n);return c.owner===this.aiPlayer?c.aiHints().includes("MC"):!0}}else return!0}),i=i.filter(r=>{const n=r.key==="FORG";if(n||this.hasHint(r,"FL")){const c=r,f=p.searchByFSA(c);return f&&(L.mainBattle?L.newPre:L.newPost).includes(f.id)?f.aiHints().includes("RT")?!0:n?W.getCard(c.host).aiHints().includes("RD"):!1:!0}else return!0}),i}noHandDoubles(t){const i=[],r=[],n=[];return t.forEach(c=>{c.key==="HPLY"?i.push(c):r.push(c)}),i.forEach(c=>{const f=c.card;n.includes(f)||(n.push(f),r.push(c))}),r}async peeker(t){this.peeking=!0;const i=[],r=[];t.forEach(n=>{or.includes(n.key)?r.push(n):i.push({root:n,peek:[n],wasPeek:!1,free:""})}),We.saveState();for(let n=0;n0){let C="";if(c.key==="HPLY"){const D=c;D.cost!==""&&(C=D.cost)}i.push({root:c,peek:m,wasPeek:!0,free:C})}We.restoreState()}return We.popState(),this.peeking=!1,i}peekerReport(t){let i=0,r=0,n=0,c=[],f=[];t.forEach(m=>{const C=m.peek.length;if(C>0){const D=m.root.key;if(D==="HPLY")if(m.peek[0].key==="FORG")r+=C;else{const B=y.fastName(m.root.card)+": "+C;c.push(B)}else if(D==="MOVE")n+=C;else if(D==="ACTV"){const B=y.fastName(m.root.host)+": "+C;f.push(B)}else i+=C}}),y.debug("High complexity hit: Root: "+t.length),r>0&&y.debug("Forges: "+r),n>0&&y.debug("Mobility: "+n),c.forEach(m=>y.debug(m)),f.forEach(m=>y.debug(m)),i>0&&y.debug("Other: "+i)}hintWeight(t){let i=!1,r=!1,n="",c=0;if(t.key==="HPLY"?n=t.card:t.key==="HDSC"?(r=!0,n=t.host):this.hasHint(t,"CD")&&(n=t.card,i=!0),n){const f=W.getCard(n);if(f.level0&&(r?c-=m:c+=m)}}return c}levelBonusFormula(t,i){let r=0;const n=t.aiHints();return n.includes("LG")?(r+=1,n.includes("LM")&&(r+=.8)):n.includes("LB")?r-=1.3:i&&(r+=.4),r}hintAdjuster(t){let i=0;const n=t.aiHints().find(c=>c.startsWith("ZZ"));return n&&(i=.5*parseInt(n.slice(2))),i}hasHint(t,i){return!t.hint||t.hint.length===0?!1:t.hint.includes(i)}logStats(t,i){const n=["Crt Cnt","Crt Val","Threat","P Health"].map((c,f)=>`${c}: ${this.numNum(i[f])}`).join(", ");console.log(t+n)}numNum(t){return t.length>6?t.charAt(0)==="-"?"NUNS":"KILL":t.padEnd(4)}cheater(){return E.aiMode&&E.aiActive&&S.options.cheater?new ir(this.aiPlayer).cheatin():!1}peekAllCards(){const t=k.toPlayer(this.aiPlayer),i=t.deck.concat(t.hand,t.discard).sort();console.log(i.map(r=>y.fastName(r)).join(` +(function(){"use strict";const je=["A","N","T","U"];const Re=["C","R","H","L"];const ee=[{c:"AAK",f:"T",r:"L",s:1,t:"C",ds:["AH"]},{c:"ABB",f:"N",r:"R",s:4,t:"C",dp:["SL"],ds:["RG","ZB"]},{c:"ABM",f:"N",r:"C",s:5,t:"C",dp:["AB"]},{c:"AGC",f:"A",r:"C",s:1,t:"C",ds:["AR"]},{c:"AGK",f:"A",r:"L",s:2.1,t:"C",dp:["AR"]},{c:"AGP",f:"A",r:"C",s:1.1,t:"S",ds:["AR"]},{c:"AGW",f:"A",r:"R",s:4,t:"S",dp:["AH"],ds:["AR","MV"]},{c:"ASG",f:"T",r:"R",s:1,t:"S",ds:["MV","SP","LV"]},{c:"AMS",f:"A",r:"H",s:5,t:"C",dp:["MM"],ds:["MV"]},{c:"AFO",f:"A",r:"C",s:2.1,t:"C",dp:["LV"],ds:["SP"]},{c:"ATG",f:"A",r:"C",s:2,t:"C",dp:["SP"],ds:["AR","RB"]},{c:"ATP",f:"U",r:"H",s:3,t:"C",dn:["SP","CD"]},{c:"ART",f:"U",r:"H",s:2.1,t:"C",dp:["MU","SP","PL"]},{c:"ATS",f:"T",r:"C",s:6,t:"C",ds:["SP","MV"]},{c:"AGM",f:"T",r:"L",s:2.2,t:"C",dp:["XA"],ds:["RG","AR","MV"]},{c:"ALG",f:"A",r:"R",s:1,t:"C",ds:["AH"]},{c:"AHL",f:"A",r:"H",s:1,t:"C",dp:["HL"],ds:["RB"]},{c:"ALS",f:"A",r:"H",s:2,t:"C",ds:["AH","MV"]},{c:"ASB",f:"A",r:"L",s:6,t:"C",dp:["MS","SB"]},{c:"AAA",f:"A",r:"L",s:5.1,t:"C",dp:["HL"],dn:["FC","AG","BN"]},{c:"ABE",f:"A",r:"H",s:5.1,t:"S",ds:["HL","TD"],dn:["GW"]},{c:"ATZ",f:"A",r:"C",s:4,t:"S",ds:["FR","AL","SP"]},{c:"AEC",f:"U",r:"L",s:5,t:"S",ds:["GW"]},{c:"ARB",f:"A",r:"H",s:4,t:"C",ds:["AR","RB"],dn:["TK","LZ"]},{c:"AEN",f:"A",r:"C",s:2,t:"C",dp:[],ds:["RB","AR"],dn:[]},{c:"APM",f:"A",r:"H",s:2,t:"C",dp:["MA","LV"],ds:["SP"]},{c:"AQE",f:"T",r:"C",s:1,t:"S",ds:["HR"]},{c:"AGD",f:"U",r:"L",s:1,t:"C",dp:["LG"],ds:["DR"]},{c:"AFS",f:"A",r:"L",s:1,t:"C",dp:["RB"],ds:["FR","VT"]},{c:"AWU",f:"T",r:"R",s:6,t:"C",dp:["MV"],ds:["BN"]},{c:"ASQ",f:"N",r:"L",s:6,t:"C",ds:["RV"]},{c:"AOP",f:"A",r:"R",s:7,t:"S",ds:["AH"]},{c:"AMD",f:"T",r:"H",s:5,t:"C",dp:["FC"],ds:["AG"]},{c:"ABR",f:"T",r:"C",s:2,t:"C",dp:["FC"]},{c:"AFR",f:"T",r:"H",s:3.1,t:"C",dp:["MT","SP"],ds:["CS"]},{c:"AMY",f:"T",r:"C",s:1,t:"C",dp:["FC"]},{c:"ABL",f:"T",r:"R",s:1,t:"S",ds:["FC"]},{c:"ATT",f:"T",r:"L",s:4.1,t:"C",ds:["FC","AG","AS"]},{c:"AMP",f:"A",r:"H",s:7,t:"C",ds:["RB","AR"]},{c:"AGU",f:"T",r:"R",s:2.1,t:"C",ds:["WL","MV"]},{c:"AIV",f:"T",r:"H",s:1,t:"C",dp:["MT"],ds:["RK"]},{c:"ATI",f:"T",r:"L",s:7.2,t:"C",dp:["SP"],ds:["FR","MV","DR"]},{c:"BRS",f:"A",r:"C",s:5,t:"C",dn:["FC","AG","BN"]},{c:"BTB",f:"A",r:"R",s:5,t:"C",dp:["AR"],ds:["RB","DI"]},{c:"BTH",f:"U",r:"R",s:3,t:"C",ds:["DI","CS"]},{c:"BTI",f:"A",r:"C",s:4,t:"C",ds:["MM","AL"]},{c:"BTN",f:"A",r:"H",s:1,t:"C",ds:["NX","AH"]},{c:"BBB",f:"U",r:"H",s:4,t:"C",ds:["CS","UD"]},{c:"BLH",f:"T",r:"L",s:2,t:"C",dp:["SP"],ds:["AG","TK","GW","SF"]},{c:"BFT",f:"N",r:"C",s:5,t:"S",dp:["UD"]},{c:"BZH",f:"T",r:"H",s:7.2,t:"S",ds:["BN"],dn:["MN"]},{c:"BSP",f:"N",r:"C",s:2.2,t:"C",ds:["RK"]},{c:"BWK",f:"N",r:"R",s:1,t:"C",ds:["RV","ZB"]},{c:"BLW",f:"N",r:"R",s:3,t:"C",ds:["ZB","CS"]},{c:"BTD",f:"T",r:"L",s:7,t:"C",ds:["MV","AG","DR","BN"]},{c:"BZS",f:"T",r:"C",s:5,t:"C",ds:["MV","FC"]},{c:"BBR",f:"A",r:"C",s:6,t:"S",ds:["AR","SV"]},{c:"BBD",f:"N",r:"C",s:6,t:"S",ds:["SV"]},{c:"BBL",f:"T",r:"C",s:6,t:"S",ds:["SV"]},{c:"BBN",f:"U",r:"C",s:6,t:"S",ds:["SV"]},{c:"BSR",f:"N",r:"R",s:1,t:"C",ds:["AB","RV"]},{c:"BMY",f:"T",r:"H",s:2.1,t:"C",ds:["MV"]},{c:"BSW",f:"T",r:"C",s:3,t:"C",ds:["MS"]},{c:"BWW",f:"T",r:"H",s:4,t:"C",ds:["MV"]},{c:"BTM",f:"U",r:"H",s:1,t:"S",ds:["PL","RV","RP"]},{c:"BLP",f:"U",r:"H",s:7.2,t:"S",ds:["PS"],dn:["MT"]},{c:"BAW",f:"U",r:"R",s:2,t:"C",ds:["FC"]},{c:"BWG",f:"U",r:"C",s:1,t:"C",ds:["PL"]},{c:"BTR",f:"U",r:"H",s:3.1,t:"C",dp:["MU"],ds:["CS","FR"]},{c:"BWD",f:"U",r:"C",s:2,t:"C",ds:["PL","GW","SF","TK"]},{c:"BOF",f:"N",r:"C",s:7,t:"C",dp:["AB"],ds:["LG","SV"]},{c:"BSG",f:"A",r:"L",s:1,t:"C",ds:["RB","MV","AR"]},{c:"BSS",f:"A",r:"L",s:1,t:"C",dp:["RB"],ds:["AR"]},{c:"BTS",f:"U",r:"C",s:1.1,t:"C",ds:["PL","TK","GW"]},{c:"BST",f:"T",r:"L",s:4,t:"C",dp:["RP"],ds:["MS"]},{c:"BWT",f:"U",r:"L",s:4.2,t:"C",dp:["DI"],ds:["RP","HR"]},{c:"BRH",f:"N",r:"R",s:5,t:"C",ds:["AB"]},{c:"BWH",f:"A",r:"R",s:1,t:"S",dp:["AR"]},{c:"BWN",f:"A",r:"H",s:7,t:"C",ds:["AR"]},{c:"BRN",f:"T",r:"R",s:3,t:"S",ds:["BN","TD"]},{c:"BZD",f:"N",r:"R",s:2,t:"C",dp:["QT"],ds:["DR","RG","MV"]},{c:"BFM",f:"N",r:"H",s:2.3,t:"C",dp:["QT"],ds:["MV","AL"]},{c:"BSM",f:"T",r:"H",s:2,t:"C",dp:["QN"],ds:["RV","AG"]},{c:"CKB",f:"N",r:"H",s:5,t:"C",ds:["RV"]},{c:"CDT",f:"U",r:"R",s:1,t:"C",ds:["PL","PS"]},{c:"CMF",f:"N",r:"R",s:4,t:"C",ds:["AS"]},{c:"CTL",f:"T",r:"L",s:1,t:"S",ds:["XA"]},{c:"CCS",f:"N",r:"C",s:3,t:"C",ds:["RG"]},{c:"CDM",f:"T",r:"H",s:7,t:"C",ds:["YT","BN"]},{c:"CHY",f:"U",r:"C",s:1,t:"C",ds:["RG"]},{c:"CSR",f:"U",r:"C",s:5,t:"C",ds:["PS"]},{c:"CSL",f:"N",r:"C",s:6,t:"C",ds:["RG"]},{c:"CGG",f:"N",r:"H",s:7.1,t:"C",dp:["HL"],ds:["TK","LZ"]},{c:"CHV",f:"N",r:"L",s:2,t:"C",dp:["FB"],ds:["MV","RV"]},{c:"CCC",f:"N",r:"H",s:7.3,t:"S",dp:["ZB"],ds:["SV","TK","FR"]},{c:"CRS",f:"A",r:"R",s:3,t:"C",dp:["MM"],ds:["LV"],dn:[]},{c:"COD",f:"T",r:"R",s:4,t:"S",dp:["UD"],dn:["GW"]},{c:"CHT",f:"T",r:"R",s:7,t:"S",dn:["GW"]},{c:"CTI",f:"N",r:"C",s:1.1,t:"C",dp:["AL"],ds:["AB"]},{c:"CHA",f:"U",r:"R",s:2.1,t:"C",dn:["MV"]},{c:"CHH",f:"U",r:"C",s:2,t:"C",dp:["GW"]},{c:"CHR",f:"U",r:"L",s:1,t:"C",ds:["PL","MS","LV","RG"]},{c:"CBB",f:"T",r:"C",s:3,t:"C",dp:["UD"]},{c:"CDC",f:"T",r:"C",s:2,t:"C",ds:["WL"]},{c:"CFB",f:"T",r:"H",s:1,t:"C",ds:["FC"]},{c:"CNM",f:"T",r:"C",s:2,t:"C"},{c:"CSW",f:"T",r:"L",s:2.3,t:"C",ds:["DR","MV"]},{c:"CTG",f:"A",r:"C",s:3,t:"C",ds:["RB","WL"]},{c:"CCT",f:"T",r:"R",s:2,t:"C",ds:["MV","FC"]},{c:"CFG",f:"T",r:"C",s:2,t:"S"},{c:"CGL",f:"N",r:"H",s:3,t:"C",dp:["AB"],ds:["FR"]},{c:"CSU",f:"N",r:"R",s:1,t:"S",ds:["FR"]},{c:"CCR",f:"N",r:"C",s:1,t:"C",dp:["SF"],ds:["AB","LZ"]},{c:"CSB",f:"N",r:"C",s:2,t:"C",ds:["ZB","TK","VG"]},{c:"CNT",f:"A",r:"R",s:5,t:"S",ds:["AL","AH"]},{c:"CWK",f:"T",r:"C",s:3,t:"C",ds:["DI","MV"]},{c:"CRC",f:"A",r:"R",s:2,t:"C",ds:["RB","RK","WL"]},{c:"CMR",f:"A",r:"L",s:7.1,t:"C",dp:["RP"],ds:["MM","AR","AL"]},{c:"CYC",f:"N",r:"H",s:2,t:"C",dp:["MN","SP"],ds:["BN","LG"]},{c:"CYS",f:"N",r:"C",s:4,t:"C",ds:["TK","VG"]},{c:"CYW",f:"N",r:"R",s:7,t:"S",ds:["LG","BN"]},{c:"CTW",f:"N",r:"C",s:1,t:"S",dp:["AL"],ds:["RV"]},{c:"CTV",f:"U",r:"H",s:1,t:"S",dp:["PL"],ds:["RP"]},{c:"CYR",f:"T",r:"H",s:7.1,t:"C",dn:["FC"],ds:["MV"]},{c:"CAG",f:"A",r:"R",s:1,t:"S",ds:["NX","FR","LV"]},{c:"CBS",f:"A",r:"C",s:2.1,t:"S",dp:["MA"],ds:["AH","AR"]},{c:"CEX",f:"A",r:"H",s:7.1,t:"S",ds:["AH","AR","HL"]},{c:"CIN",f:"A",r:"R",s:1.1,t:"C",dp:["AH"]},{c:"CSH",f:"A",r:"C",s:3,t:"C",ds:["AR"]},{c:"CSG",f:"A",r:"C",s:2,t:"S",ds:["AR"]},{c:"CTM",f:"N",r:"L",s:7.3,t:"C",dp:["AL"],ds:["SV"]},{c:"DFR",f:"N",r:"H",s:2,t:"C",dp:["AL"]},{c:"DHC",f:"N",r:"H",s:6,t:"C",ds:["SP","RG"]},{c:"DHW",f:"N",r:"R",s:1,t:"C",dp:["SP"],ds:["RG"]},{c:"DRS",f:"U",r:"C",s:6,t:"C",dp:["DF"],ds:["PL"]},{c:"DSS",f:"N",r:"R",s:1,t:"C",dp:["MN"],ds:["ZB"]},{c:"DSW",f:"N",r:"C",s:6,t:"C",dp:["DF"],ds:["LG","BN"]},{c:"DSE",f:"A",r:"C",s:6,t:"C",dp:["DF"],ds:["RB","AH"]},{c:"DSA",f:"T",r:"C",s:6,t:"C",dp:["DF"]},{c:"DCR",f:"N",r:"R",s:2,t:"S",ds:["RV"]},{c:"DSK",f:"N",r:"C",s:1,t:"C",ds:["TK","SF","VG"]},{c:"DPO",f:"N",r:"H",s:7.2,t:"S",dp:["AL"],ds:["TK","RV"],dn:["MA"]},{c:"DBA",f:"U",r:"H",s:1,t:"C",dp:["GW"]},{c:"DBP",f:"U",r:"C",s:1,t:"C",ds:["UD"]},{c:"DMR",f:"U",r:"C",s:2,t:"C",ds:["DI"]},{c:"DBR",f:"U",r:"C",s:1,t:"C"},{c:"DFS",f:"A",r:"C",s:7,t:"S",ds:["AR","TD"]},{c:"DCS",f:"A",r:"L",s:2,t:"C",ds:["LV"]},{c:"DPG",f:"U",r:"H",s:7,t:"C",ds:["PS"]},{c:"DWW",f:"N",r:"C",s:6,t:"C",dn:["AG"]},{c:"DDF",f:"U",r:"R",s:5,t:"S",ds:["RP","UD","TD"]},{c:"DGZ",f:"A",r:"R",s:2,t:"S",ds:["AL"],dn:["GW"]},{c:"DBN",f:"N",r:"C",s:4,t:"C",ds:["AL"]},{c:"DOV",f:"N",r:"R",s:7,t:"C",ds:["LG","BN"]},{c:"DDS",f:"A",r:"H",s:4.2,t:"S",dp:["QN"],ds:["AL"]},{c:"DIS",f:"T",r:"R",s:1,t:"S",ds:["BN"]},{c:"DSV",f:"U",r:"R",s:2,t:"S",dp:["PS"],ds:["FR"]},{c:"DDD",f:"N",r:"L",s:1,t:"C",ds:["MV","RV","DR"]},{c:"DPB",f:"A",r:"L",s:5.2,t:"C",ds:["RB","RP"]},{c:"DZD",f:"U",r:"L",s:3,t:"C",dp:["MS"],ds:["AG"]},{c:"DRE",f:"T",r:"L",s:5,t:"S",ds:["BN"]},{c:"DKS",f:"T",r:"R",s:7,t:"C",dn:["GW"]},{c:"DGS",f:"U",r:"H",s:6,t:"C",ds:["RV"],dn:["DR"]},{c:"DGW",f:"T",r:"L",s:5.2,t:"S",dp:["DR"],ds:["AG","TK"]},{c:"DRD",f:"N",r:"L",s:7,t:"C",dp:["LZ"],ds:["TK","AB"]},{c:"DBT",f:"N",r:"H",s:1,t:"S",ds:["RV"]},{c:"DTR",f:"U",r:"L",s:6,t:"C",dp:["MS","SQ"],ds:["FR","RG","PL"]},{c:"DFB",f:"N",r:"R",s:1,t:"C",dp:["AB"],ds:["BN","SF","LZ","SV"]},{c:"DMW",f:"A",r:"L",s:1.1,t:"C",dp:["MM","CD"],ds:["AH"]},{c:"DCH",f:"U",r:"C",s:1,t:"S",ds:["LG"]},{c:"DTD",f:"N",r:"L",s:4.2,t:"C",dp:["DR"],ds:["MV"]},{c:"DHM",f:"U",r:"R",s:6,t:"C",dp:["DF"],ds:["SB"]},{c:"DSZ",f:"N",r:"C",s:2,t:"C",ds:["ZB","RG"]},{c:"DYB",f:"U",r:"R",s:2,t:"S",dp:["GW","TK"]},{c:"DBQ",f:"N",r:"H",s:3,t:"C",dp:["QU"],ds:["TK","RV","PS"]},{c:"DYS",f:"N",r:"R",s:3,t:"S",dp:["QU"]},{c:"DYL",f:"U",r:"L",s:3,t:"C",dp:["QN","LG"],ds:["TK"]},{c:"EBW",f:"N",r:"C",s:3,t:"C",dp:["UD"]},{c:"ESD",f:"N",r:"L",s:7,t:"C",ds:["FR"]},{c:"ESK",f:"N",r:"H",s:2,t:"C",dp:["RK"],ds:["UD"]},{c:"EHW",f:"U",r:"L",s:1,t:"C",ds:["GW","TK"]},{c:"ETN",f:"A",r:"C",s:1,t:"S",ds:["AL"]},{c:"EWE",f:"T",r:"H",s:2,t:"C",dp:["MV"]},{c:"EVT",f:"U",r:"L",s:6.1,t:"S",dp:["MU"],ds:["TD"]},{c:"ENP",f:"A",r:"H",s:1,t:"S",ds:["FR","WL"]},{c:"ESU",f:"A",r:"R",s:1,t:"S",ds:["CD","TD","FR"]},{c:"ENR",f:"U",r:"C",s:1,t:"S"},{c:"EPD",f:"N",r:"H",s:1,t:"S",dn:["GW"]},{c:"EPH",f:"A",r:"L",s:4.2,t:"C",dp:["CD"],ds:["TK"]},{c:"ESG",f:"A",r:"H",s:4.1,t:"C",dp:["QU","LV"],ds:["TK","GW"]},{c:"ESC",f:"A",r:"H",s:2,t:"C",dp:["QU"],ds:["RB","TK","GW","AR"]},{c:"ESP",f:"U",r:"H",s:2.3,t:"C",dp:["QA"],ds:["AR","HR"]},{c:"EWT",f:"U",r:"R",s:2,t:"C",dp:["QA"],ds:["AR"]},{c:"EHN",f:"U",r:"C",s:1,t:"C",ds:["TK","GW"]},{c:"EWV",f:"U",r:"C",s:7,t:"S",ds:["TD","TK"]},{c:"EFA",f:"T",r:"R",s:5,t:"S",ds:["MV"]},{c:"EFM",f:"T",r:"L",s:2.1,t:"C",dp:["FC","SP"],ds:["FR"]},{c:"EFP",f:"T",r:"L",s:1,t:"C",dp:["RK"],ds:["MV","TK","VG"]},{c:"EFE",f:"U",r:"L",s:5.2,t:"C",ds:["PL","TK","GW","UD"]},{c:"EXD",f:"N",r:"H",s:1,t:"S",ds:["LG","BN","SF"]},{c:"FWB",f:"U",r:"C",s:2.3,t:"C"},{c:"FWR",f:"U",r:"C",s:1,t:"C"},{c:"FFG",f:"U",r:"C",s:4,t:"C",ds:["DI"]},{c:"FST",f:"N",r:"R",s:4,t:"C",ds:["ZB","TK","VG"]},{c:"FWK",f:"N",r:"C",s:1,t:"C",ds:["ZB","TK","VG"]},{c:"FIN",f:"U",r:"C",s:1,t:"S",ds:["FC"]},{c:"FRR",f:"U",r:"H",s:1,t:"S",dp:["GW"]},{c:"FVA",f:"T",r:"H",s:1,t:"S",ds:["MV"]},{c:"FSL",f:"N",r:"C",s:7,t:"C"},{c:"FFU",f:"T",r:"H",s:1,t:"C",ds:["YT"]},{c:"FLH",f:"T",r:"C",s:4,t:"C",ds:["AS"]},{c:"FMS",f:"T",r:"C",s:2,t:"C",ds:["MV"]},{c:"FSM",f:"T",r:"H",s:1,t:"S",ds:["MS"],dn:["GW"]},{c:"FOR",f:"T",r:"C",s:7,t:"S",ds:["TD","AH"]},{c:"FBC",f:"T",r:"L",s:1,t:"C",dp:["FC"],dn:["GW"]},{c:"FBI",f:"T",r:"H",s:2.2,t:"C",dp:["MT","SP"]},{c:"FFS",f:"T",r:"R",s:2,t:"C",ds:["AH"]},{c:"FJT",f:"T",r:"C",s:5,t:"S",dp:["UD"]},{c:"FLN",f:"T",r:"R",s:2,t:"S",ds:["BN"]},{c:"FRI",f:"T",r:"C",s:3,t:"C",dp:["WL"]},{c:"FSS",f:"T",r:"R",s:1,t:"C",dp:["MT"],ds:["BN"]},{c:"FLS",f:"T",r:"C",s:1,t:"C",dp:["SP"],ds:["BN"]},{c:"FSH",f:"T",r:"R",s:1,t:"C",ds:["AG","FC"]},{c:"FFD",f:"N",r:"H",s:1,t:"C",ds:["AB","TK","VG"]},{c:"FRV",f:"N",r:"H",s:3,t:"C",ds:["AB","RV","CS"]},{c:"FSC",f:"A",r:"C",s:6,t:"C",dp:["RB"],ds:["VG","AR"]},{c:"FSP",f:"A",r:"L",s:1,t:"C",ds:["UD"]},{c:"FPR",f:"T",r:"C",s:2.1,t:"C"},{c:"FFL",f:"A",r:"C",s:1,t:"S",ds:["AR"]},{c:"FGA",f:"A",r:"C",s:1,t:"C",ds:["RB","WL","VT"]},{c:"FGB",f:"A",r:"R",s:1,t:"C",ds:["RB","VT"]},{c:"FGD",f:"A",r:"H",s:3,t:"C",dp:["VT"],ds:["RB"]},{c:"FGG",f:"A",r:"H",s:1,t:"C",dp:["VT"],ds:["RB","TK"]},{c:"FOL",f:"A",r:"H",s:3.1,t:"C",dp:["MA"],ds:["CS"]},{c:"FPM",f:"A",r:"R",s:3,t:"C",ds:["RB","AR","CS"]},{c:"FPS",f:"A",r:"C",s:1,t:"C",ds:["RB","AR"]},{c:"FWS",f:"A",r:"H",s:6,t:"C",ds:["RB","AR"]},{c:"FLC",f:"A",r:"L",s:7.2,t:"C",ds:["AR"],dn:["SQ"]},{c:"FFM",f:"T",r:"H",s:3,t:"C",dp:["MV"]},{c:"FMD",f:"T",r:"L",s:3,t:"C",dp:["RK"],ds:["TK","GW","MV","DR"]},{c:"FSK",f:"T",r:"C",s:2.3,t:"S",ds:["AH"]},{c:"FKS",f:"T",r:"H",s:6,t:"C",dp:["SQ"],ds:["YT","BN"]},{c:"FWT",f:"U",r:"H",s:1,t:"C",ds:["UD","FR","GW"]},{c:"FZS",f:"T",r:"R",s:1,t:"S",ds:["RV"]},{c:"GOS",f:"A",r:"L",s:4,t:"S",dp:["AR"]},{c:"GHS",f:"U",r:"C",s:2.2,t:"C",dp:["GW"],ds:["PL","SQ","LG"]},{c:"GHB",f:"U",r:"R",s:1,t:"C",ds:["DI","RV"]},{c:"GHR",f:"U",r:"H",s:4.2,t:"C",dp:["QT"],ds:["FC","LG","MV","DI"]},{c:"GRN",f:"N",r:"C",s:2,t:"S",ds:["RG"]},{c:"GTH",f:"N",r:"C",s:1,t:"S"},{c:"GSC",f:"U",r:"C",s:1,t:"C",ds:["PS"]},{c:"GMP",f:"A",r:"L",s:1,t:"C",ds:["MM","CD"]},{c:"GTT",f:"T",r:"L",s:2,t:"C",dp:["RK"],ds:["RV"]},{c:"GCL",f:"T",r:"C",s:1,t:"C",ds:["WL"]},{c:"GCR",f:"T",r:"C",s:2,t:"S",ds:["FR","BN"],dn:["WL","SQ"]},{c:"GLF",f:"N",r:"C",s:2,t:"C",ds:["AB"]},{c:"GRW",f:"N",r:"C",s:1,t:"C",dp:["AL"],ds:["RV"]},{c:"GSW",f:"N",r:"C",s:2,t:"C"},{c:"GVS",f:"U",r:"C",s:2,t:"C",ds:["VG","LG"]},{c:"GSS",f:"U",r:"C",s:1,t:"C",ds:["LG"]},{c:"GPV",f:"U",r:"C",s:6,t:"C",ds:["PL"],dn:["MV"]},{c:"GBG",f:"N",r:"C",s:1,t:"C",ds:["AB","VG","BN"]},{c:"GGE",f:"N",r:"C",s:2,t:"C"},{c:"GGH",f:"N",r:"C",s:1,t:"C",ds:["ZB","RG"]},{c:"GRP",f:"N",r:"R",s:1,t:"S",dp:["SF"],ds:["RV","FR"]},{c:"GGB",f:"N",r:"H",s:6,t:"C",dp:["DF"]},{c:"GGD",f:"N",r:"L",s:1,t:"C",dp:["SV","SB"]},{c:"GGR",f:"N",r:"L",s:3,t:"C",ds:["SF","MV","SV"]},{c:"GGP",f:"N",r:"H",s:1,t:"C",dp:["RV"],ds:["MV","SV"]},{c:"GGS",f:"N",r:"C",s:1,t:"C",ds:["MV"]},{c:"GGW",f:"N",r:"H",s:6.1,t:"C",dp:["SV"]},{c:"GRM",f:"N",r:"R",s:2,t:"S",ds:["GW"],dn:["GW"]},{c:"GHT",f:"U",r:"C",s:1,t:"C"},{c:"GMR",f:"U",r:"C",s:1,t:"C",ds:["TK","VG","PL"]},{c:"GSF",f:"A",r:"H",s:7.3,t:"C",dp:["MM"],ds:["AR"]},{c:"GAS",f:"A",r:"H",s:7,t:"S",dp:["VT"],ds:["FR","TK","NX"]},{c:"HMF",f:"T",r:"H",s:3,t:"C",ds:["YT","MV"]},{c:"HOS",f:"U",r:"R",s:7,t:"C",dp:["TK","SB"]},{c:"HTR",f:"U",r:"L",s:1,t:"C",ds:["RG","SQ","PL"]},{c:"HAR",f:"A",r:"C",s:1,t:"C",ds:["AH"]},{c:"HFA",f:"N",r:"H",s:1,t:"C",dp:["MN"],ds:["AB","RG"]},{c:"HOD",f:"T",r:"R",s:3,t:"C",ds:["BN"],dn:["TK","LZ"]},{c:"HMO",f:"U",r:"C",s:7,t:"C",ds:["DI"]},{c:"HRM",f:"A",r:"H",s:6,t:"C",ds:["RB","AR"]},{c:"HWM",f:"A",r:"L",s:1,t:"C",dp:["AH"],ds:["MV","RG","AR"]},{c:"HVE",f:"U",r:"R",s:7,t:"C",ds:["PS"]},{c:"HOX",f:"N",r:"R",s:4,t:"S",dp:["UD"],ds:["BN","LG"]},{c:"HGS",f:"N",r:"R",s:1,t:"S",ds:["AH","AL"]},{c:"HTP",f:"U",r:"C",s:1,t:"C",ds:["TK","GW"]},{c:"IBF",f:"T",r:"R",s:1,t:"S",ds:["HR","GW"]},{c:"IGR",f:"T",r:"L",s:6.1,t:"S",ds:["TD","BN"]},{c:"ITO",f:"T",r:"R",s:2,t:"S",dp:["MT","SP"],ds:["FR","BN"]},{c:"ISB",f:"T",r:"C",s:7,t:"C"},{c:"IKA",f:"T",r:"L",s:6,t:"C",dp:["FB"],ds:["BN"]},{c:"IME",f:"N",r:"L",s:5,t:"S",ds:["TK","GW"]},{c:"IDF",f:"N",r:"H",s:7,t:"C",dp:["UD","LZ"],ds:["TK","ZB"]},{c:"IRT",f:"N",r:"L",s:6.1,t:"S",dp:["MN"],ds:["TD","RG","SL"]},{c:"IVS",f:"N",r:"C",s:4,t:"S",ds:["RG","SL"]},{c:"ICD",f:"N",r:"L",s:5,t:"C",dp:["RG"],ds:["VG","SV","MV"]},{c:"IWC",f:"A",r:"C",s:1,t:"C",ds:["RB","MV"]},{c:"IBA",f:"A",r:"L",s:7,t:"C",dp:["FB"],ds:["AR","AL"],dn:["TD"]},{c:"IHA",f:"A",r:"L",s:2,t:"C",dp:["FB"],ds:["AR","AL"]},{c:"IBR",f:"A",r:"C",s:3,t:"C",dp:["UD"],ds:["AH"]},{c:"IMD",f:"A",r:"L",s:3,t:"C",ds:["RB","BN","MS"]},{c:"IMA",f:"A",r:"L",s:2.3,t:"C",dp:["CD"],ds:["FR"]},{c:"IZK",f:"T",r:"L",s:3,t:"C",ds:["FC","RP","BN"]},{c:"JPK",f:"A",r:"C",s:1,t:"S",dp:["UD"],ds:["AH","MV","FC"]},{c:"KDC",f:"T",r:"C",s:3,t:"C"},{c:"KSB",f:"T",r:"C",s:6,t:"C",ds:["DI"]},{c:"KAW",f:"T",r:"L",s:1.1,t:"C",dp:["SP"],ds:["XA"]},{c:"KOD",f:"N",r:"L",s:1,t:"C",dp:["LZ"],ds:["ZB"]},{c:"KBE",f:"U",r:"H",s:5,t:"C",ds:["PS","MV"]},{c:"KIW",f:"A",r:"L",s:3,t:"C",dp:["LV","FB"]},{c:"KTS",f:"U",r:"H",s:4,t:"C",dp:["RP"],ds:["TK"]},{c:"KKK",f:"T",r:"L",s:2,t:"C",dp:["FB"],ds:["AG","FC"]},{c:"LOD",f:"U",r:"L",s:4,t:"S",ds:["PS"]},{c:"LFA",f:"T",r:"H",s:4,t:"C",ds:["FC","AH"]},{c:"LKP",f:"U",r:"L",s:1,t:"C",ds:["PL","TK"]},{c:"LGT",f:"N",r:"R",s:2.3,t:"C",dp:["SL"],ds:["ZB","RG"]},{c:"LLD",f:"N",r:"H",s:5,t:"C",ds:["TK"],dn:["FR"]},{c:"LLG",f:"U",r:"H",s:5,t:"C",ds:["TK"],dn:["MV"]},{c:"LLS",f:"A",r:"H",s:5,t:"C",ds:["RB","TK"],dn:["TK","LZ"]},{c:"LLT",f:"T",r:"H",s:5,t:"C",ds:["TK"],dn:["LG"]},{c:"LLV",f:"U",r:"H",s:7.1,t:"C",dp:["PS"],ds:["TK"]},{c:"LMD",f:"N",r:"L",s:7.1,t:"C",ds:["DR","TK","MV"]},{c:"LBD",f:"U",r:"H",s:1,t:"C",dp:["GW"]},{c:"LSS",f:"U",r:"R",s:1,t:"C",dp:["MU"],ds:["UD"]},{c:"LBL",f:"U",r:"R",s:1,t:"C",ds:["LG"]},{c:"LBC",f:"U",r:"H",s:7,t:"C",dp:["FC","MU"],ds:["LG"]},{c:"LBR",f:"T",r:"C",s:1,t:"S",dp:["FC"],ds:["AG"]},{c:"LSK",f:"T",r:"C",s:1,t:"S",ds:["BN"]},{c:"LTM",f:"T",r:"C",s:7,t:"C",ds:["AG"]},{c:"LWY",f:"T",r:"C",s:1,t:"C",ds:["AG"]},{c:"LSP",f:"A",r:"C",s:1,t:"C",dp:["AH"],ds:["AR"]},{c:"LVH",f:"U",r:"L",s:7,t:"C",dp:["MS","PS","SQ"],ds:["TK","GW"]},{c:"LTU",f:"U",r:"L",s:7,t:"C",ds:["TK","GW"]},{c:"LCE",f:"A",r:"L",s:5,t:"S",ds:["CD"]},{c:"LUC",f:"T",r:"L",s:4.2,t:"C",dp:["MV"],ds:["XA","YT"]},{c:"LMV",f:"N",r:"L",s:1,t:"C",ds:["TK","LZ","GW"]},{c:"LHY",f:"U",r:"C",s:2,t:"C",ds:["RG"]},{c:"LYR",f:"U",r:"C",s:4,t:"S",ds:["LG","HR"]},{c:"LYS",f:"U",r:"R",s:3,t:"S",ds:["TD"]},{c:"MMH",f:"T",r:"C",s:1,t:"C"},{c:"MHR",f:"U",r:"L",s:5.1,t:"C",dp:["PS"],ds:["YT"]},{c:"MRF",f:"N",r:"C",s:1,t:"C"},{c:"MMG",f:"A",r:"L",s:6,t:"C",dp:["RB"],ds:["TK","AR"]},{c:"MOE",f:"T",r:"H",s:1,t:"C",dp:["SP"],ds:["FR"]},{c:"MXW",f:"A",r:"C",s:1,t:"C",ds:["RB","AH"]},{c:"MSP",f:"U",r:"R",s:2,t:"S",ds:["LG"]},{c:"MDR",f:"A",r:"R",s:7,t:"C",ds:["NT","MM"]},{c:"MMA",f:"A",r:"C",s:1,t:"C",ds:["CD","MM"]},{c:"MMR",f:"A",r:"C",s:5,t:"C",dp:["MM"],ds:["CD"]},{c:"MMX",f:"A",r:"C",s:2,t:"C",ds:["MM","CD","VG"]},{c:"MMI",f:"A",r:"C",s:4,t:"C",ds:["MM"]},{c:"MMO",f:"A",r:"C",s:2,t:"C",ds:["MM"]},{c:"MMV",f:"A",r:"C",s:2.2,t:"C",ds:["MM","CD","RK"]},{c:"MPH",f:"U",r:"H",s:3,t:"S",ds:["RK","DR","RV","RP","TK","MV"]},{c:"MSC",f:"A",r:"H",s:1,t:"S",ds:["NT","FR"]},{c:"MTS",f:"A",r:"C",s:1.1,t:"S",ds:["LV","FR"]},{c:"MTT",f:"A",r:"C",s:2,t:"S",ds:["LV","AL"]},{c:"MML",f:"U",r:"H",s:2,t:"C",ds:["TK","GW","PL"]},{c:"MMW",f:"U",r:"L",s:2.2,t:"C",ds:["TK","GW"]},{c:"MBR",f:"A",r:"R",s:6,t:"C",dp:["MM"],ds:["CD"]},{c:"MDE",f:"N",r:"C",s:4,t:"C",ds:["AS","LG","BN"]},{c:"MBP",f:"U",r:"H",s:1,t:"C",ds:["HR","PL"]},{c:"MTD",f:"U",r:"R",s:6,t:"C",dp:["DI"]},{c:"MND",f:"A",r:"R",s:1,t:"C",ds:["RB","SQ","AH"]},{c:"MNM",f:"N",r:"L",s:7.2,t:"C",ds:["TK","GW"]},{c:"NNS",f:"A",r:"R",s:3,t:"S",ds:["NT","AL"]},{c:"NGB",f:"T",r:"C",s:1,t:"C",ds:["HR"]},{c:"NGW",f:"T",r:"C",s:4,t:"C"},{c:"NSL",f:"U",r:"R",s:1,t:"S",dp:["GW"],ds:["RV"]},{c:"NCF",f:"N",r:"C",s:4,t:"S",ds:["FR"]},{c:"NCM",f:"N",r:"H",s:5,t:"C",ds:["MS","TK","RG","GW"]},{c:"NCP",f:"N",r:"H",s:7,t:"C",dn:["CD"]},{c:"NCS",f:"N",r:"R",s:1,t:"C"},{c:"NCW",f:"N",r:"C",s:1,t:"C"},{c:"NCV",f:"N",r:"C",s:1,t:"S",ds:["RG"]},{c:"NSW",f:"N",r:"L",s:3,t:"C",dp:["SF"],ds:["SQ","TK","GW"]},{c:"NDY",f:"N",r:"R",s:6,t:"S",dn:["SV"]},{c:"NEM",f:"N",r:"C",s:1,t:"S",ds:["LG","BN"]},{c:"NSH",f:"N",r:"L",s:2.3,t:"S",ds:["DR","RV","MV"],dn:["GW"]},{c:"NXA",f:"A",r:"L",s:3.1,t:"C",ds:["NX","AH","AR","MV"]},{c:"NXB",f:"A",r:"L",s:6.1,t:"S",dp:["MA"],ds:["NX","AR","TD"]},{c:"NXC",f:"A",r:"C",s:1,t:"C",ds:["RB","WL"]},{c:"NXG",f:"A",r:"H",s:3,t:"C",dp:["NX"],ds:["AH"]},{c:"NXO",f:"A",r:"C",s:5,t:"C",dp:["NX"],ds:["LV"]},{c:"NXP",f:"A",r:"C",s:1,t:"C",dp:["NX"]},{c:"NXT",f:"A",r:"H",s:2,t:"C",dp:["NX"],ds:["AR"]},{c:"NGT",f:"N",r:"R",s:2,t:"C",ds:["RG","SV"]},{c:"NGQ",f:"U",r:"L",s:4.1,t:"C",dp:["RP","FB"],ds:["TK","GW","PL"]},{c:"NCL",f:"U",r:"R",s:1.1,t:"S",ds:["PS"],dn:["GW"]},{c:"NFF",f:"U",r:"L",s:2,t:"C",dp:["PL"],ds:["RP","SQ","TK"]},{c:"NUG",f:"T",r:"L",s:7.1,t:"C",ds:["YT"]},{c:"NAM",f:"N",r:"C",s:3,t:"C"},{c:"NOZ",f:"N",r:"R",s:2,t:"C",ds:["TK","VG"]},{c:"NSY",f:"N",r:"C",s:2.1,t:"C",ds:["RG"]},{c:"ONN",f:"N",r:"H",s:1.1,t:"S",dp:["ZB"]},{c:"OXA",f:"A",r:"H",s:2.3,t:"C",dp:["QN"],ds:["LV","SQ","RG"]},{c:"OXM",f:"A",r:"R",s:2,t:"C",dp:["QN"],ds:["RG","AR"]},{c:"OXP",f:"N",r:"H",s:2,t:"C",dp:["QA"],ds:["RG","AL","SQ"]},{c:"OBB",f:"T",r:"R",s:3,t:"S",dp:["QA"],ds:["LV"]},{c:"OEX",f:"A",r:"H",s:3,t:"S",dp:["QT"],ds:["FC","AH"],dn:["GW"]},{c:"OWH",f:"T",r:"H",s:3,t:"C",dp:["QA"],ds:["FC","MV","LV"]},{c:"ORC",f:"A",r:"C",s:7,t:"C",ds:["AH"]},{c:"OBD",f:"A",r:"H",s:1,t:"C",ds:["AR","RB"]},{c:"OFM",f:"A",r:"R",s:2.1,t:"C",ds:["AH"]},{c:"OJC",f:"A",r:"H",s:1.1,t:"C",ds:["AL"],dn:["TK","LZ"]},{c:"OPK",f:"A",r:"R",s:2,t:"C",ds:["RB","AR"]},{c:"OSV",f:"A",r:"H",s:4,t:"C",dp:["RP"],ds:["AR","RB"]},{c:"OSS",f:"A",r:"C",s:5,t:"S",dp:["UD"],ds:["AR"]},{c:"OWW",f:"A",r:"L",s:1,t:"C",ds:["RB"]},{c:"OHV",f:"N",r:"R",s:2,t:"C",ds:["AB","RV"]},{c:"ODC",f:"U",r:"L",s:2,t:"C",dp:["FB"],ds:["LG"]},{c:"OSP",f:"N",r:"R",s:2,t:"C",ds:["RG"]},{c:"OAP",f:"U",r:"L",s:6,t:"C",dp:["RK"],ds:["PS"]},{c:"OSL",f:"U",r:"C",s:3,t:"C",ds:["PL"]},{c:"OWF",f:"A",r:"H",s:2,t:"S",ds:["AH","GW"]},{c:"OXS",f:"U",r:"R",s:1,t:"C",ds:["DI"],dn:["AR"]},{c:"PHM",f:"A",r:"R",s:2,t:"C",ds:["AL"],dn:["GW"]},{c:"PPM",f:"A",r:"R",s:1,t:"C",ds:["AL","SQ"]},{c:"PSM",f:"A",r:"L",s:2.2,t:"C",dp:["NX"],ds:["MV","TK"]},{c:"PLW",f:"A",r:"R",s:4,t:"S",dp:["UD"],ds:["AL"],dn:["GW"]},{c:"POA",f:"A",r:"H",s:6.1,t:"C",dp:["MA"],ds:["AH"]},{c:"POD",f:"U",r:"H",s:6.1,t:"C",dp:["MU"],ds:["GW","TK"]},{c:"POK",f:"T",r:"H",s:6.1,t:"C",dp:["MT"],ds:["AH"]},{c:"POT",f:"N",r:"H",s:6.1,t:"C",dp:["MN"],dn:["GW"]},{c:"PRG",f:"N",r:"C",s:4,t:"C"},{c:"PRI",f:"A",r:"R",s:3,t:"S",dp:["LV"],ds:["TD"]},{c:"PHS",f:"A",r:"R",s:2.2,t:"C",dp:["AR"]},{c:"PHC",f:"T",r:"L",s:6.2,t:"S",ds:["MV","TK","BN"]},{c:"PTB",f:"U",r:"H",s:1,t:"S",ds:["PL","TK","GW"]},{c:"PLI",f:"N",r:"R",s:6,t:"C"},{c:"PSC",f:"U",r:"R",s:2,t:"C",ds:["PS","SQ"]},{c:"PSH",f:"N",r:"H",s:4,t:"C",ds:["RK","LZ","TK"]},{c:"PTR",f:"A",r:"R",s:2,t:"S",ds:["AH","FR"]},{c:"PSG",f:"U",r:"R",s:1,t:"S",ds:["FR"]},{c:"PVA",f:"U",r:"L",s:7.2,t:"C",ds:["TK","GW","LG","DI"]},{c:"PMI",f:"T",r:"H",s:5.1,t:"C",ds:["BN"]},{c:"PMS",f:"T",r:"C",s:1,t:"S",ds:["AH"]},{c:"POX",f:"N",r:"H",s:4.2,t:"C",dp:["UD"],ds:["TK","VG","AB"]},{c:"PMP",f:"A",r:"R",s:6,t:"S",dp:["HL"],ds:["AR","AH"]},{c:"PYG",f:"T",r:"H",s:1,t:"C",dp:["FC"],ds:["AG"]},{c:"PYM",f:"T",r:"R",s:6,t:"C",dn:["LG"],ds:["BN"]},{c:"PYS",f:"T",r:"C",s:1.1,t:"S",dp:["GW"],dn:["GW"]},{c:"QSW",f:"T",r:"L",s:7.3,t:"C",dp:["DI"],ds:["BN"]},{c:"RBH",f:"T",r:"L",s:1,t:"C",dp:["FC"]},{c:"ROK",f:"T",r:"L",s:3.1,t:"S",dp:["MT"],ds:["TD"]},{c:"REW",f:"U",r:"L",s:7.3,t:"C",ds:["TK","GW"]},{c:"RHY",f:"U",r:"C",s:3,t:"C",ds:["RG"]},{c:"RTS",f:"T",r:"C",s:2.2,t:"C",ds:["MV","FC","DI"]},{c:"RTW",f:"U",r:"H",s:7,t:"C",ds:["WD","TK"]},{c:"RHU",f:"A",r:"L",s:4.1,t:"C",ds:["RP","WL"]},{c:"RMB",f:"N",r:"L",s:6.2,t:"S",dp:["TD"],ds:["TK"]},{c:"RPR",f:"A",r:"H",s:7.2,t:"S",ds:["AL","NT"],dn:["MU"]},{c:"RLW",f:"U",r:"H",s:1,t:"C",dp:["WD"]},{c:"RFL",f:"T",r:"R",s:1,t:"C",dp:["FC"]},{c:"RHC",f:"T",r:"C",s:1,t:"C",ds:["MV"]},{c:"ROG",f:"N",r:"H",s:1,t:"S",ds:["SV"]},{c:"ROU",f:"N",r:"C",s:7,t:"S",ds:["RG","GW"]},{c:"ROE",f:"T",r:"H",s:7.3,t:"S",ds:["TK","AG","AH"]},{c:"RWC",f:"U",r:"C",s:4,t:"C",ds:["DI","TK","GW"]},{c:"RFA",f:"U",r:"H",s:1,t:"C",dp:["MU"]},{c:"RWD",f:"N",r:"C",s:5,t:"C",dp:["AL"],ds:["ZB"]},{c:"RSD",f:"U",r:"L",s:6.2,t:"C",ds:["SQ","GW","LG","DR"]},{c:"RSE",f:"T",r:"H",s:4.1,t:"C",dp:["FC"],ds:["AG"]},{c:"RBG",f:"U",r:"H",s:2,t:"C",dp:["LG"]},{c:"RGG",f:"U",r:"H",s:1,t:"C",dp:["RK"],ds:["PL"]},{c:"RSZ",f:"N",r:"R",s:1.1,t:"C",ds:["ZB","VG","SP"]},{c:"RSP",f:"T",r:"R",s:3,t:"C",ds:["CS","AG"]},{c:"RHW",f:"N",r:"C",s:3,t:"C",dp:["WD"]},{c:"SBF",f:"T",r:"H",s:4,t:"C",ds:["AG","XA"]},{c:"SAP",f:"A",r:"C",s:2,t:"S",ds:["AL"]},{c:"SVO",f:"U",r:"C",s:2.1,t:"S",dp:["MU"]},{c:"SSE",f:"U",r:"L",s:2.1,t:"C",ds:["PL","TK","GW"]},{c:"SST",f:"U",r:"C",s:7,t:"C",ds:["PL","TK","GW"]},{c:"STS",f:"U",r:"C",s:3,t:"S",ds:["PL","TK","GW"]},{c:"SCS",f:"N",r:"C",s:1,t:"C",ds:["AB","RG"]},{c:"SMD",f:"T",r:"L",s:1,t:"C",ds:["DR","MV"]},{c:"SFS",f:"N",r:"L",s:1,t:"C",ds:["ZB","SF","RV"]},{c:"SHY",f:"N",r:"C",s:5,t:"C",ds:["MS"]},{c:"SKN",f:"N",r:"C",s:7,t:"C",ds:["ZB"]},{c:"SCD",f:"A",r:"H",s:1,t:"C",ds:["RB","FR"]},{c:"SFT",f:"A",r:"H",s:1,t:"C",ds:["AR","RB"]},{c:"SOC",f:"N",r:"L",s:4,t:"S",ds:["AL"]},{c:"SOA",f:"A",r:"C",s:3,t:"S",dp:["CS"],ds:["AH"]},{c:"SOD",f:"U",r:"C",s:3,t:"S",dp:["CS"]},{c:"SOK",f:"T",r:"C",s:3,t:"S",dp:["CS"]},{c:"SOT",f:"N",r:"C",s:3,t:"S",dp:["CS"],ds:["BN"]},{c:"SAD",f:"T",r:"H",s:1,t:"C",ds:["FC"]},{c:"SCZ",f:"N",r:"R",s:6,t:"C",dp:["DF"],ds:["RG","ZB"]},{c:"SFE",f:"T",r:"H",s:6,t:"C",dp:["DF"],ds:["AG"]},{c:"SWS",f:"A",r:"H",s:6,t:"C",dp:["DF"],ds:["LV"]},{c:"SHA",f:"A",r:"R",s:6,t:"C",dp:["DF"],ds:["AR"]},{c:"SHG",f:"N",r:"L",s:2,t:"S",dp:["LZ"]},{c:"SBI",f:"U",r:"C",s:3,t:"C",dp:["UD"]},{c:"SCC",f:"U",r:"C",s:4,t:"C",dp:["RP"]},{c:"SPB",f:"U",r:"L",s:5,t:"C",dp:["HR"]},{c:"SPD",f:"U",r:"R",s:1,t:"C",dp:["SB"],ds:["DI"]},{c:"SPG",f:"U",r:"R",s:6.2,t:"S",ds:["SB"]},{c:"SPM",f:"U",r:"L",s:1,t:"C",dp:["UD"]},{c:"SPT",f:"U",r:"L",s:7.1,t:"C",ds:["PS"]},{c:"STD",f:"A",r:"H",s:2.2,t:"C",ds:["MM"],dn:["RG"]},{c:"STB",f:"T",r:"C",s:5,t:"S",ds:["BN"],dn:["AR"]},{c:"SHS",f:"U",r:"R",s:2.2,t:"C",dp:["AH"],ds:["PS"]},{c:"SSP",f:"U",r:"H",s:6,t:"C",dp:["DF"],ds:["PL","TK","GW"]},{c:"SGF",f:"N",r:"H",s:2.2,t:"C",dp:["SQ","SF"],ds:["AB","LG","BN"]},{c:"SKG",f:"A",r:"C",s:2,t:"C",ds:["NX","MV"]},{c:"SLS",f:"T",r:"L",s:7,t:"C",dp:["SQ"],ds:["SP","WL"],dn:["TD"]},{c:"SSD",f:"T",r:"L",s:5,t:"C",dp:["SQ"],ds:["DR"],dn:["GW"]},{c:"SDA",f:"U",r:"H",s:5,t:"C",ds:["TK","GW"]},{c:"SSR",f:"U",r:"L",s:2,t:"C",dp:["RK"],ds:["GW","FC"]},{c:"SNB",f:"A",r:"C",s:2.3,t:"S",ds:["AL"]},{c:"SNP",f:"A",r:"H",s:1,t:"S",ds:["AL"],dn:["GW"]},{c:"SRD",f:"U",r:"C",s:1,t:"S",ds:["HR","GW"]},{c:"SSH",f:"U",r:"H",s:4,t:"C"},{c:"SRM",f:"N",r:"H",s:4,t:"C",dp:["AL"],ds:["RV"]},{c:"SRH",f:"N",r:"C",s:2.3,t:"C",dp:["AB"],ds:["CD"]},{c:"SDN",f:"N",r:"L",s:1,t:"C",ds:["AL","MV"]},{c:"SHV",f:"N",r:"H",s:1,t:"S",dp:["SF"],ds:["FR"]},{c:"SRP",f:"N",r:"L",s:4,t:"S",dp:["AL"],ds:["RV","TK"]},{c:"SGG",f:"N",r:"H",s:4,t:"C",dp:["SV"]},{c:"SBA",f:"A",r:"C",s:1,t:"C"},{c:"SKB",f:"A",r:"C",s:1,t:"C",ds:["RB"]},{c:"SBR",f:"T",r:"C",s:2,t:"C",ds:["AG"]},{c:"SKS",f:"T",r:"C",s:4,t:"C",ds:["RP","AG"]},{c:"SEL",f:"T",r:"R",s:5,t:"C",ds:["WL"],dn:["SQ"]},{c:"STM",f:"T",r:"R",s:4,t:"C",ds:["MV","AG"]},{c:"SWA",f:"T",r:"H",s:6,t:"C",dp:["SP","MT"],ds:["MV","AH"]},{c:"SFG",f:"A",r:"L",s:6.2,t:"C",dp:["VT"],ds:["TK","RB"]},{c:"S01",f:"A",r:"L",s:7.3,t:"C",dp:["MS"],ds:["AR","AH"]},{c:"SPR",f:"N",r:"R",s:7,t:"C",ds:["SV","SB"]},{c:"SBD",f:"U",r:"C",s:2.1,t:"C",ds:["LG"]},{c:"SCV",f:"N",r:"R",s:3,t:"S",ds:["RV"]},{c:"SFM",f:"T",r:"H",s:1,t:"C",ds:["VG","MS"]},{c:"SSN",f:"A",r:"C",s:2.2,t:"C",ds:["AR","RB"]},{c:"SSM",f:"T",r:"C",s:2.2,t:"C",ds:["RK","BN"]},{c:"SLH",f:"N",r:"C",s:2,t:"S",dp:["SF"]},{c:"SRV",f:"N",r:"R",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"SSI",f:"A",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SND",f:"U",r:"R",s:4,t:"C",dp:["RP"],ds:["TK","GW"]},{c:"SNT",f:"N",r:"L",s:5.1,t:"C",dp:[],ds:[],dn:[]},{c:"STR",f:"N",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SPH",f:"N",r:"H",s:4.1,t:"C",dp:[],ds:[],dn:[]},{c:"SSA",f:"N",r:"H",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"STO",f:"U",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SDR",f:"U",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SOL",f:"U",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SOV",f:"T",r:"L",s:4,t:"S",dp:["XA"],ds:["DR","MV"]},{c:"SMS",f:"T",r:"C",s:7,t:"C",ds:["DI","BN"]},{c:"SHK",f:"T",r:"H",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"SIX",f:"A",r:"R",s:7,t:"C",ds:["MM","SP","WL"]},{c:"SWR",f:"A",r:"R",s:1,t:"C",ds:["MM","SP","WL"]},{c:"SMN",f:"T",r:"C",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"SER",f:"A",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"SES",f:"A",r:"L",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"SFA",f:"A",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"STG",f:"A",r:"L",s:2,t:"C",dp:[],ds:["DR","RB"],dn:[]},{c:"SSS",f:"A",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SSK",f:"A",r:"C",s:3,t:"C",dp:[],ds:[],dn:[]},{c:"SNK",f:"A",r:"C",s:7,t:"C",dp:["LV"],ds:["WL"]},{c:"SWG",f:"A",r:"C",s:4,t:"C",dp:[],ds:["RB"],dn:[]},{c:"SWM",f:"A",r:"R",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"SIV",f:"U",r:"H",s:5.1,t:"S",dp:[],ds:[],dn:[]},{c:"STN",f:"T",r:"R",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"SGI",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SBG",f:"T",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SCL",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"SGA",f:"T",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"STP",f:"T",r:"C",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"SSG",f:"U",r:"C",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SVH",f:"U",r:"C",s:2.3,t:"C",dp:[],ds:[],dn:[]},{c:"SIN",f:"U",r:"C",s:1.1,t:"S",dp:[],ds:[],dn:[]},{c:"SYL",f:"U",r:"H",s:2.2,t:"C",dp:[],ds:["PL"],dn:[]},{c:"SEV",f:"N",r:"L",s:3.1,t:"C",dp:[],ds:[],dn:[]},{c:"SMA",f:"U",r:"C",s:5,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SML",f:"U",r:"C",s:1,t:"C",dp:[],ds:["DI"],dn:[]},{c:"SYO",f:"A",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TST",f:"T",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"TBA",f:"U",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TGL",f:"U",r:"R",s:3,t:"S",dp:[],ds:[],dn:[]},{c:"TGS",f:"U",r:"C",s:2,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TPT",f:"N",r:"C",s:2.1,t:"S",dp:[],ds:[],dn:[]},{c:"TDW",f:"N",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"TNL",f:"N",r:"L",s:4.1,t:"C",dp:[],ds:[],dn:[]},{c:"TEX",f:"A",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TGN",f:"A",r:"C",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TSM",f:"A",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"TUP",f:"A",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TAB",f:"T",r:"C",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TGI",f:"T",r:"R",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TDS",f:"U",r:"L",s:1.1,t:"C",dp:[],ds:["DI"],dn:[]},{c:"TSP",f:"T",r:"H",s:4.2,t:"S",dp:["DI"],ds:[],dn:[]},{c:"TNM",f:"U",r:"C",s:7,t:"C"},{c:"TPG",f:"N",r:"H",s:3.1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"TMG",f:"U",r:"R",s:3,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TMM",f:"U",r:"C",s:5,t:"C",dp:[],ds:["PL"],dn:[]},{c:"TRA",f:"A",r:"R",s:5,t:"C",dp:[],ds:["MM"],dn:[]},{c:"TRS",f:"U",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TRV",f:"T",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TRW",f:"N",r:"R",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"TBB",f:"T",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TOB",f:"N",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TCN",f:"A",r:"C",s:7,t:"C",dp:["WL"],ds:["RB"]},{c:"TWS",f:"A",r:"C",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"TVG",f:"A",r:"R",s:1.1,t:"C",dp:[],ds:["RB"],dn:[]},{c:"TXB",f:"U",r:"R",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"TXS",f:"U",r:"C",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"TCG",f:"T",r:"C",s:2.1,t:"S",dp:[],ds:[],dn:[]},{c:"TMS",f:"U",r:"H",s:6,t:"C",dp:["SB"],dn:["BN"]},{c:"TBC",f:"T",r:"H",s:6.2,t:"S",ds:["AH","MS"]},{c:"TWT",f:"A",r:"C",s:3,t:"C",dp:[],ds:["RB"],dn:[]},{c:"TRN",f:"T",r:"H",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"TGK",f:"U",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"TSL",f:"U",r:"H",s:3,t:"C",dp:["PL"],ds:["TK","GW"]},{c:"TWG",f:"U",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"UGM",f:"U",r:"C",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"USY",f:"T",r:"R",s:6,t:"C",dp:["DF"],ds:["YT","MV"]},{c:"UGL",f:"T",r:"R",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UIC",f:"T",r:"H",s:2.3,t:"C",dp:[],ds:["DI"],dn:[]},{c:"ULR",f:"U",r:"H",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"ULG",f:"N",r:"H",s:7,t:"S",dp:["LZ"],ds:["TK","TD"]},{c:"URD",f:"N",r:"H",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"USA",f:"T",r:"H",s:7,t:"C",ds:["WL","VG","FC"]},{c:"UBL",f:"T",r:"R",s:1,t:"S",dp:[],ds:[],dn:[]},{c:"UCM",f:"T",r:"R",s:1,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UEM",f:"T",r:"C",s:4,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UHS",f:"T",r:"H",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"UIM",f:"T",r:"C",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"USS",f:"T",r:"H",s:7,t:"C",dp:["SQ"],ds:["TK","YT"]},{c:"UWL",f:"T",r:"H",s:2,t:"C",dp:["YT"]},{c:"UWS",f:"T",r:"R",s:2.3,t:"C",dp:["YT"],ds:[],dn:[]},{c:"UIW",f:"A",r:"L",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"URS",f:"U",r:"C",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"UTM",f:"U",r:"C",s:2,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UTR",f:"U",r:"H",s:2,t:"C",dp:["DI"],ds:[],dn:[]},{c:"URB",f:"U",r:"L",s:2.3,t:"C",dp:[],ds:["DI"],dn:[]},{c:"UPM",f:"U",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VIC",f:"T",r:"L",s:6,t:"C",ds:["MV","FR"],dn:["TD"]},{c:"VIK",f:"N",r:"L",s:5.2,t:"C",dp:["FB"],ds:["TK","SV"]},{c:"VRP",f:"N",r:"L",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"VBK",f:"A",r:"R",s:2,t:"C",dp:[],ds:["RB"],dn:[]},{c:"VIN",f:"A",r:"C",s:6,t:"C",ds:["RB"]},{c:"VTC",f:"A",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VTW",f:"A",r:"R",s:4,t:"C",dp:[],ds:["RB"],dn:[]},{c:"VGN",f:"N",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VND",f:"U",r:"R",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"VNF",f:"U",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"VNS",f:"U",r:"H",s:2,t:"C",dp:[],ds:[],dn:[]},{c:"VSK",f:"U",r:"C",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"VCH",f:"U",r:"H",s:4.1,t:"S",dp:[],ds:[],dn:[]},{c:"VGR",f:"U",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"VSP",f:"U",r:"C",s:6,t:"S",ds:["LG"]},{c:"VTR",f:"U",r:"R",s:7,t:"S"},{c:"VGL",f:"N",r:"R",s:5,t:"S",dp:[],ds:[],dn:[]},{c:"VGW",f:"U",r:"R",s:6,t:"C",dp:["HR"],ds:["GW"]},{c:"VOB",f:"T",r:"R",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"VCG",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"VPR",f:"A",r:"L",s:7,t:"C",ds:["LV"]},{c:"VES",f:"N",r:"L",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"VYE",f:"N",r:"C",s:2,t:"S",dp:[],ds:[],dn:[]},{c:"WBY",f:"T",r:"R",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"WBU",f:"T",r:"C",s:1.1,t:"C",dp:[],ds:["YT"],dn:[]},{c:"WHR",f:"T",r:"R",s:7,t:"C",ds:["AG"],dn:["TD"]},{c:"WMC",f:"A",r:"H",s:5,t:"C",dp:[],ds:["RB"],dn:[]},{c:"WMR",f:"A",r:"H",s:2.1,t:"C",dp:[],ds:[],dn:[]},{c:"WTK",f:"A",r:"H",s:4,t:"C",dp:[],ds:[],dn:[]},{c:"WMM",f:"A",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WTW",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WGE",f:"U",r:"H",s:7.3,t:"S",ds:["FC","LG"]},{c:"WTA",f:"U",r:"L",s:4,t:"C",dp:["LG","SB"],ds:["PL"]},{c:"WWP",f:"U",r:"H",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WWR",f:"U",r:"C",s:3,t:"C",dp:[],ds:[],dn:[]},{c:"WOD",f:"U",r:"R",s:4,t:"S",dp:[],ds:[],dn:[]},{c:"WFM",f:"T",r:"H",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WWS",f:"U",r:"R",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WBH",f:"T",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WCS",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WPD",f:"T",r:"C",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WSE",f:"T",r:"L",s:5.1,t:"C",dp:[],ds:[],dn:[]},{c:"WPC",f:"A",r:"H",s:6.2,t:"S",ds:["TD"],dp:["NT"]},{c:"WFB",f:"N",r:"C",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"WFS",f:"N",r:"H",s:1,t:"C",dp:[],ds:[],dn:[]},{c:"WBG",f:"N",r:"L",s:1.1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XTE",f:"N",r:"L",s:6,t:"C",dp:["MN"],ds:["TK","LZ"]},{c:"XCR",f:"N",r:"C",s:2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XDH",f:"N",r:"R",s:3,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XHS",f:"N",r:"C",s:2.2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XHU",f:"N",r:"C",s:1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XRF",f:"N",r:"C",s:2,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XSH",f:"N",r:"L",s:1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XTR",f:"N",r:"H",s:5.1,t:"C",dp:[],ds:["AB"],dn:[]},{c:"XDV",f:"N",r:"H",s:1,t:"C",dp:["ZB"],ds:[],dn:[]},{c:"XRW",f:"N",r:"H",s:2,t:"S",dp:["ZB"],ds:[],dn:[]},{c:"YWC",f:"T",r:"C",s:2,t:"C",dp:[],ds:["YT"],dn:[]},{c:"YNS",f:"N",r:"L",s:2.2,t:"C",dp:[],ds:[],dn:[]},{c:"ZXR",f:"T",r:"H",s:5,t:"C",dp:[],ds:[],dn:[]},{c:"ZPM",f:"T",r:"R",s:1.1,t:"C",dp:[],ds:[],dn:[]},{c:"ZTU",f:"N",r:"L",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZDK",f:"N",r:"H",s:6,t:"C",dp:["RG"],ds:["ZB"]},{c:"ZIN",f:"N",r:"C",s:1,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZMT",f:"N",r:"C",s:3,t:"C",dp:[],ds:["ZB"],dn:[]},{c:"ZSH",f:"T",r:"L",s:1,t:"C",dp:[],ds:[],dn:[]}],Di=[["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"]]];class xi{raw={["C"]:{["A"]:0,["N"]:0,["T"]:0,["U"]:0},["S"]:{["A"]:0,["N"]:0,["T"]:0,["U"]:0}};addStat(t,i){this.raw[t][i]++}g(t,i){return this.raw[t][i]}typeSum(t){return je.map(i=>this.g(t,i)).reduce((i,r)=>i+r,0)}getTotal(){const t=this.typeSum("C"),i=this.typeSum("S");return[t,i,t+i]}getFactTotal(t){const i=this.g("C",t),r=this.g("S",t);return[i,r,i+r]}}const s=(o,t)=>({card:o,num:t}),zi={name:"Official 2 - 3",id:"SBE1",decks:[{name:"Cruel Corrosion",factions:["A","N"],cards:[s("IHA",1),s("WBG",1),s("OXP",1),s("DFR",1),s("APM",1),s("SNP",1),s("GRM",2),s("ETN",2),s("DHW",2),s("OXM",2),s("AEN",2),s("ATG",2),s("CTI",2),s("CTW",2),s("FPS",2),s("GRW",2),s("MTT",2),s("SAP",2)]},{name:"Death March",factions:["N","T"],cards:[s("ZTU",1),s("VRP",1),s("GGP",1),s("EPD",1),s("DBT",1),s("BSM",1),s("TDW",2),s("NGT",2),s("UBL",2),s("FWK",2),s("BZD",2),s("CSB",2),s("SLH",2),s("MMH",2),s("LSK",2),s("GBG",2),s("CFG",2),s("DSK",2)]},{name:"Dinosaurs!",factions:["T","U"],cards:[s("TDS",1),s("SSR",1),s("FRR",1),s("ULR",1),s("UTR",1),s("BTM",1),s("UGL",2),s("EHN",2),s("SPD",2),s("GHB",2),s("FLN",2),s("SML",2),s("RFL",2),s("OXS",2),s("UTM",2),s("TWG",2),s("ENR",2),s("DBP",2)]},{name:"Wyvern's Wrath",factions:["T","U"],cards:[s("CSW",1),s("SMD",1),s("FRR",1),s("UIC",1),s("CFB",1),s("UGL",2),s("FSH",2),s("FLN",2),s("WPD",1),s("TWG",2),s("TCG",2),s("TGS",2),s("SML",2),s("SVH",1),s("SCL",2),s("RTS",1),s("FWB",2),s("ENR",2),s("ABR",2)]},{name:"Ironmind Intuition",factions:["A","N"],cards:[s("IMA",1),s("GMP",1),s("OXA",1),s("EPD",1),s("OJC",1),s("ESU",2),s("OXM",2),s("MMA",2),s("SAP",1),s("AFO",2),s("GBG",2),s("CTW",2),s("SRH",1),s("TSM",2),s("SLH",1),s("MTT",1),s("DCR",1),s("DFB",1),s("BSR",1),s("LGT",1),s("XRF",2),s("MMX",1)]},{name:"Nethershriek Negation",factions:["N","T"],cards:[s("SBG",1),s("NSH",1),s("FFU",1),s("EWE",1),s("BFM",1),s("WBH",1),s("UWS",1),s("TGI",2),s("RFL",2),s("GRM",1),s("ASG",1),s("YWC",2),s("XRF",2),s("WPD",2),s("WCS",2),s("WBU",2),s("TCG",1),s("FSK",1),s("SLH",2),s("CFG",1),s("RTS",2)]},{name:"Ridgeback's Rage",factions:["A","U"],cards:[s("URB",1),s("AGK",1),s("ESP",1),s("FRR",1),s("NXT",1),s("ALG",1),s("FGB",1),s("PHS",2),s("TUP",1),s("EWT",2),s("PTR",1),s("VBK",1),s("AGC",1),s("AEN",2),s("ETN",1),s("FPS",2),s("MXW",2),s("GHT",1),s("TWG",2),s("SNB",1),s("SML",1),s("JPK",1),s("ENR",1),s("IWC",1)]},{name:"Spare Parts",factions:["N"],cards:[s("SEV",1),s("SHG",1),s("TPG",1),s("CGL",1),s("FRV",1),s("HFA",2),s("XDH",1),s("GRM",1),s("SCV",1),s("DFB",2),s("EBW",2),s("GBG",2),s("GLF",2),s("XHS",2),s("SOT",1),s("XRF",2),s("SCS",1),s("ZMT",1),s("SLH",1),s("VYE",1),s("XCR",2),s("XHU",1)]},{name:"Future Forged",factions:["A"],cards:[s("NXA",1),s("IMD",1),s("FOL",1),s("SFA",2),s("SFT",1),s("SCD",1),s("CAG",1),s("ESU",1),s("NNS",1),s("FPM",1),s("PRI",1),s("SSS",1),s("CTG",1),s("TSM",2),s("IWC",1),s("MMA",2),s("TGN",2),s("MTT",1),s("SKG",1),s("AFO",1),s("MMV",1),s("TWS",1),s("SBA",2),s("SSK",1),s("JPK",1)]},{name:"Burning Rage",factions:["T"],cards:[s("ROK",1),s("KKK",1),s("MOE",1),s("AFR",1),s("FBI",1),s("FSS",2),s("FLN",2),s("CCT",2),s("BRN",2),s("WPD",2),s("SSM",2),s("SOK",1),s("RTS",2),s("FSK",2),s("CWK",2),s("CFG",2),s("BSW",2),s("FMS",2)]},{name:"Awakened Fury",factions:["U"],cards:[s("DZD",1),s("SSE",1),s("BTR",1),s("TSL",1),s("MPH",1),s("CDT",1),s("DYB",1),s("BTH",2),s("TMG",2),s("BWD",2),s("RHY",2),s("SBD",2),s("GMR",2),s("STS",1),s("OSL",2),s("SBI",2),s("LYS",2),s("TGS",2),s("SOD",2)]},{name:"Titan's Assault",factions:["N","T"],cards:[s("ATT",1),s("TNL",1),s("RSE",1),s("SPH",1),s("SCV",2),s("ABB",2),s("TBB",2),s("BRN",2),s("FLN",2),s("CMF",2),s("XDH",2),s("FST",2),s("TAB",2),s("MDE",2),s("FSK",2),s("FLH",2),s("CBB",2)]},{name:"Verdant Fortress",factions:["A","U"],cards:[s("NGQ",1),s("RHU",1),s("VCH",1),s("ESG",1),s("PLW",2),s("NNS",2),s("SND",2),s("WOD",2),s("IBR",2),s("BWD",2),s("SBI",2),s("RWC",2),s("TEX",2),s("SER",2),s("SWG",2),s("SCC",2),s("DYB",2)]},{name:"Umbruk Uprising",factions:["T","U"],cards:[s("LUC",1),s("BWT",1),s("GHR",1),s("TSP",1),s("WBH",1),s("COD",1),s("SDR",1),s("ZPM",1),s("OXS",1),s("WOD",1),s("RWC",2),s("SSG",2),s("VGR",2),s("CFG",2),s("UEM",2),s("FFG",2),s("UGL",2),s("DMR",2),s("RTS",2),s("CWK",2)]},{name:"Onyxium Twilight",factions:["A","N"],cards:[s("EPH",1),s("DTD",1),s("POX",1),s("DDS",1),s("OHV",1),s("PHS",1),s("DFB",1),s("TDW",1),s("CAG",1),s("ALG",1),s("TUP",2),s("CTW",2),s("XCR",2),s("SSK",2),s("SRH",2),s("ATG",2),s("MTT",2),s("SLH",2),s("GLF",2),s("AFO",2)]}]},Zi={name:"Official 5 - 7",id:"SBE2",decks:[{name:"Blistering Chaos",factions:["T","U"],cards:[s("WSE",1),s("MHR",1),s("PMI",1),s("SIV",1),s("BRN",1),s("HOD",1),s("CHA",1),s("LYS",1),s("TRS",2),s("PSC",2),s("FLN",2),s("EFA",2),s("SHS",2),s("TXB",2),s("VNF",2),s("CFG",2),s("FSK",2),s("CBB",2),s("VND",2)]},{name:"Dark Retribution",factions:["A","N"],cards:[s("AAA",1),s("SNT",1),s("ABE",1),s("XTR",1),s("CNT",1),s("HOX",1),s("PLW",1),s("AGW",1),s("OHV",2),s("OXM",2),s("XDH",2),s("VGL",2),s("ETN",2),s("MTT",2),s("VYE",2),s("DSK",2),s("BFT",2),s("ATZ",2),s("IBR",2)]},{name:"Iron Tide",factions:["A","U"],cards:[s("EFE",1),s("DPB",1),s("HWM",1),s("HTR",1),s("OJC",1),s("RBG",1),s("EWT",1),s("CIN",1),s("TGK",2),s("CAG",2),s("TGN",3),s("SCC",3),s("URS",3),s("LSP",3),s("TSM",3),s("TMM",3)]},{name:"Dragon Forge",factions:["N","T"],cards:[s("DGW",1),s("VIK",1),s("DDD",1),s("SMD",1),s("FFM",1),s("SHV",1),s("GRP",1),s("TGI",1),s("SLH",1),s("WBH",2),s("BZD",2),s("EFA",2),s("WFB",3),s("BZS",3),s("CCR",3),s("DSK",3),s("RHC",3)]},{name:"Call of Deepwood",factions:["U"],cards:[s("EVT",1),s("POD",1),s("RFA",1),s("TMS",1),s("LSS",1),s("DYB",1),s("TRS",1),s("VGW",1),s("UTM",2),s("RHY",2),s("SMA",2),s("TMM",2),s("BBN",2),s("GHS",2),s("SBI",2),s("BTS",2),s("STS",2),s("SVO",2),s("GMR",2)]},{name:"Kadras' Fury",factions:["T"],cards:[s("IGR",1),s("POK",1),s("SWA",1),s("SGA",1),s("FLN",1),s("TRV",1),s("FSS",1),s("AWU",1),s("STB",2),s("CFG",2),s("BBL",2),s("KSB",2),s("NGW",2),s("ATS",2),s("ABR",2),s("BSW",2),s("TCG",2),s("CBB",2),s("WPD",2)]},{name:"Tarsus Unleashed",factions:["N"],cards:[s("IRT",1),s("POT",1),s("ZDK",1),s("HFA",1),s("GRM",1),s("DSS",1),s("TRW",1),s("ABB",1),s("XCR",2),s("CSB",2),s("SHY",2),s("BBD",2),s("EBW",2),s("NSY",2),s("TPT",2),s("XRF",2),s("GGS",2),s("ZMT",2),s("IVS",2)]},{name:"Might of Anvillon",factions:["A"],cards:[s("NXB",1),s("FWS",1),s("POA",1),s("SFA",1),s("SSS",1),s("TRA",1),s("BTB",1),s("BWH",1),s("TWT",2),s("TEX",2),s("IBR",2),s("VIN",2),s("BBR",2),s("NXP",2),s("CBS",2),s("FPS",2),s("ATG",2),s("SNB",2),s("SSK",2)]},{name:"Nature's Defenses",factions:["T","U"],cards:[s("RSD",1),s("PHC",1),s("SPG",1),s("TBC",1),s("GHR",1),s("NGB",1),s("DDF",1),s("VGW",3),s("UEM",3),s("FSK",2),s("TMM",2),s("VSP",2),s("BZS",2),s("SPD",3),s("RTS",3),s("TGK",3)]},{name:"Unlikely Alliance",factions:["A","N"],cards:[s("RMB",1),s("SFG",1),s("GGW",1),s("WPC",1),s("SBA",2),s("IBR",1),s("BSR",1),s("MMV",1),s("CRC",1),s("BSP",1),s("NNS",1),s("XDH",2),s("EBW",2),s("SLH",2),s("CTG",3),s("XRF",3),s("OHV",3),s("TSM",3)]},{name:"Toxic Shards",factions:["U"],cards:[s("SPT",1),s("MHR",1),s("KBE",1),s("DPG",1),s("LLV",1),s("HVE",2),s("PSC",2),s("VND",2),s("DSV",2),s("TXB",2),s("CSR",3),s("GSC",3),s("GVS",3),s("LHY",3),s("TGS",3)]},{name:"Winds of Fury",factions:["T"],cards:[s("NUG",1),s("FMD",1),s("CYR",1),s("FFM",1),s("AIV",1),s("WBH",2),s("UBL",2),s("FZS",2),s("EFA",2),s("WBY",2),s("KSB",3),s("SCL",3),s("TCG",3),s("CWK",3),s("ISB",3)]},{name:"Ghastly Echoes",factions:["N"],cards:[s("LMD",1),s("XTE",1),s("CGG",1),s("EPD",1),s("NCP",1),s("NOZ",2),s("OSP",2),s("PLI",2),s("GRP",2),s("DOV",2),s("CYS",3),s("IVS",3),s("MRF",3),s("GRW",3),s("FSL",3)]},{name:"Cypien Technology",factions:["A"],cards:[s("CMR",1),s("RHU",1),s("CEX",1),s("FOL",1),s("AHL",1),s("SSI",2),s("CAG",2),s("CIN",2),s("CNT",2),s("PHS",2),s("MXW",3),s("LSP",3),s("SSN",3),s("TWT",3),s("CSH",3)]}]},Yi={name:"Starters & Early Tournies",id:"T1309",decks:[{name:"Alloyin Starter",factions:["A"],cards:[s("SYO",1),s("BSS",1),s("SFT",2),s("SNP",2),s("TSM",2),s("SSS",2),s("ALG",2),s("MXW",3),s("TUP",3),s("FPS",3),s("MND",3),s("IWC",3),s("SKB",3)]},{name:"Nekrium Starter",factions:["N"],cards:[s("SFS",1),s("GGD",1),s("FFD",3),s("EPD",2),s("CCR",2),s("HGS",2),s("DSS",2),s("BWK",2),s("GBG",3),s("DSK",3),s("GRP",3),s("VGN",3),s("XHU",3)]},{name:"Tempys Starter",factions:["T"],cards:[s("FBC",1),s("RBH",1),s("CFB",3),s("FSM",2),s("FSH",2),s("FSS",2),s("PMS",2),s("RFL",2),s("UBL",3),s("WPD",3),s("SGI",3),s("AMY",3),s("WCS",3)]},{name:"Uterra Starter",factions:["U"],cards:[s("UPM",1),s("EHW",1),s("FRR",3),s("SPD",2),s("HTP",2),s("LSS",2),s("SDR",2),s("SRD",2),s("FWR",3),s("DBP",3),s("GHT",3),s("GSS",3),s("TXS",3)]},{name:"Axel: Lifegain",factions:["T","U"],cards:[s("AGD",3),s("EHW",3),s("FRR",3),s("FIN",1),s("UPM",1),s("LKP",2),s("BTM",2),s("LBL",3),s("GSS",3),s("RFA",3),s("GHB",3),s("EFP",3)]},{name:"Bryan: Knightbots",factions:["A","U"],cards:[s("AGK",3),s("AFS",3),s("BSG",2),s("BSS",3),s("JPK",3),s("VBK",2),s("FRR",3),s("TDS",3),s("WWP",3),s("MXW",2),s("OJC",3)]},{name:"Derk: Metaminds",factions:["A"],cards:[s("OJC",3),s("DMW",3),s("MMV",3),s("JPK",3),s("MMO",3),s("GMP",3),s("ALS",3),s("MMA",3),s("SFA",3),s("BTN",3)]},{name:"Foxhull: Grow Wide",factions:["U"],cards:[s("DBP",3),s("EHW",2),s("FRR",3),s("FWT",3),s("UPM",3),s("LKP",2),s("BTM",3),s("HTR",2),s("LBD",2),s("RFA",3),s("GHB",2),s("SDR",2)]},{name:"Hectares: Dino Attack",factions:["A","U"],cards:[s("ALS",3),s("TDS",3),s("FRR",3),s("WWP",3),s("SML",2),s("BSG",3),s("JPK",2),s("ODC",3),s("NXT",2),s("WMM",3),s("GHB",3)]},{name:"Klaven: Mono-N",factions:["N"],cards:[s("SCS",3),s("ROG",1),s("GGP",1),s("GGD",3),s("WFS",1),s("DSS",3),s("ZTU",1),s("GBG",3),s("HFA",3),s("EXD",1),s("EPD",1),s("BSR",1),s("MRF",2),s("HGS",3),s("GTH",3)]},{name:"Phoenyx: Free Spell Dmg",factions:["T","U"],cards:[s("SHK",3),s("MOE",3),s("FRR",3),s("LSK",3),s("FFU",3),s("UBL",3),s("WWS",3),s("FSS",3),s("ENR",3),s("MMH",3)]},{name:"Technogeek5000: Grow Wide",factions:["N","U"],cards:[s("DBP",2),s("EHW",2),s("FRR",3),s("HTP",2),s("UPM",3),s("LKP",2),s("GHT",3),s("GGP",2),s("LBD",1),s("EPD",2),s("DBT",2),s("SPD",3),s("SDR",3)]},{name:"Thematik: Level Up",factions:["A","T"],cards:[s("IWC",3),s("FSS",3),s("ETN",1),s("WPD",2),s("FSM",1),s("AHL",1),s("UBL",3),s("SMD",2),s("BTN",3),s("LSK",1),s("MMH",3),s("FFU",1),s("TSM",3),s("ALG",3)]},{name:"TinyGrimes: NT Shapers",factions:["N","T"],cards:[s("DSS",3),s("FSS",3),s("EPD",2),s("GTH",3),s("FSM",1),s("MOE",1),s("UBL",3),s("GGP",3),s("GBG",1),s("LSK",3),s("HGS",1),s("CTW",1),s("SHK",3),s("GGD",1),s("DBT",1)]}]},Ki={name:"The Forge",id:"TG10",decks:[{name:"DarkSoulSP: Grim Debuff",factions:["N","U"],cards:[s("BWK",3),s("TDS",2),s("FRR",3),s("WWP",3),s("GGP",3),s("GGD",3),s("DBT",1),s("WFS",3),s("CTW",3),s("EPD",3),s("GHB",3)]},{name:"ErrorAsh: Burn",factions:["N","T"],cards:[s("UBL",2),s("EFM",2),s("FBI",3),s("ESK",3),s("FLN",3),s("EFP",3),s("MOE",3),s("FSS",3),s("SHK",3),s("EPD",3),s("CHV",2)]},{name:"ErrorAsh: Farmer Tarsus",factions:["N","U"],cards:[s("WWS",3),s("DYB",3),s("FRR",3),s("SYL",3),s("EPD",3),s("SSE",2),s("NSH",2),s("TDW",3),s("NFF",2),s("CHR",2),s("LKP",2),s("EXD",2)]},{name:"ErrorAsh: Necro Mobiltiy",factions:["N","T"],cards:[s("NSH",2),s("SMD",2),s("DDD",3),s("TDW",3),s("VRP",3),s("WCS",3),s("BSM",3),s("SHG",2),s("TGI",2),s("EPD",3),s("FVA",2),s("DBT",1),s("TRN",1)]},{name:"Hans: Yetis",factions:["T","U"],cards:[s("UWL",3),s("FFU",3),s("WBY",3),s("UIM",3),s("WBU",3),s("SSR",1),s("TRN",1),s("GTT",1),s("GCR",3),s("FRR",3),s("UBL",3),s("WWP",3)]},{name:"MingisTheKing: Mobility",factions:["N","T"],cards:[s("DDD",3),s("DBT",3),s("EPD",3),s("EFP",3),s("GGP",3),s("LSK",3),s("SHK",3),s("UBL",3),s("WCS",3),s("ZTU",3)]},{name:"Noetherian: Shambler",factions:["N","U"],cards:[s("XSH",3),s("SPM",3),s("FRR",3),s("ODC",3),s("SSE",3),s("ESK",3),s("TGS",3),s("XRF",3),s("VRP",3),s("URB",3)]},{name:"Noetherian: Tempo",factions:["T","U"],cards:[s("RBH",3),s("TDS",3),s("FRR",3),s("WWP",3),s("EFP",3),s("AMY",2),s("FVA",2),s("ENR",3),s("ZSH",3),s("EHW",3),s("GHB",2)]},{name:"Piquadore: Zombies",factions:["N","T"],cards:[s("BWK",2),s("KOD",2),s("CYC",3),s("GRM",3),s("VYE",3),s("XRW",3),s("MOE",2),s("ZTU",3),s("BSM",3),s("EPD",3),s("DSS",3)]},{name:"Stautmeister: Yeti Mobility",factions:["T","U"],cards:[s("AGM",3),s("TDS",2),s("FRR",3),s("WWP",3),s("CSW",3),s("FLN",3),s("EFP",2),s("UWL",3),s("WBY",2),s("WCS",2),s("EHW",2),s("SHS",2)]},{name:"Technonaut: Steelscale",factions:["A","T"],cards:[s("UHS",2),s("FLN",3),s("STG",3),s("CRC",3),s("SHK",3),s("EFP",2),s("WMR",2),s("WMM",3),s("JPK",3),s("SMD",3),s("FVA",3)]},{name:"Technonaut: Woebringer",factions:["N","T"],cards:[s("LSK",2),s("WBG",3),s("EPD",3),s("DDD",3),s("SHK",3),s("EFP",3),s("ZTU",2),s("GGD",2),s("GGP",3),s("CTW",3),s("DBT",3)]},{name:"Zrandles: Metaminds",factions:["A","N"],cards:[s("DMW",3),s("GMP",3),s("MMA",3),s("MMV",2),s("TDW",3),s("VRP",3),s("EPD",3),s("SHG",2),s("OJC",2),s("ESK",2),s("CHV",2),s("CTW",2)]},{name:"Zrandles: Tempo",factions:["N","T"],cards:[s("CTW",1),s("GCR",1),s("CFG",1),s("FZS",1),s("FBI",3),s("MOE",3),s("EFP",3),s("LSK",3),s("FLN",3),s("SHK",3),s("RTS",3),s("GGP",3),s("UBL",2)]}]},Xi={name:"Team A1",id:"A1FU",decks:[{name:"Phytogaunt",factions:["N","U"],cards:[s("DTD",3),s("EPD",2),s("XTE",3),s("GGD",3),s("GGP",3),s("GGR",3),s("ROG",1),s("ESK",3),s("GGW",3),s("POT",3),s("PTB",3)]},{name:"ANfinity",factions:["A","N"],cards:[s("IMA",3),s("AAA",2),s("MMA",3),s("KIW",3),s("ESU",3),s("ABE",3),s("AFO",1),s("XDH",2),s("GBG",1),s("SHV",2),s("SCV",2),s("LCE",2),s("MTS",1),s("PRI",1),s("WPC",1)]},{name:"Icefinity",factions:["A","T"],cards:[s("IMA",3),s("AAA",1),s("MMA",2),s("MOE",3),s("ESU",3),s("ABE",3),s("NNS",1),s("IGR",2),s("SHK",1),s("OBB",2),s("LCE",2),s("ITO",1),s("PRI",3),s("BRN",3)]},{name:"Drain Tank",factions:["A","N"],cards:[s("DTD",3),s("SRP",2),s("LLS",3),s("ESK",3),s("CYC",3),s("BRS",3),s("PLI",1),s("SOC",2),s("EPD",2),s("ABE",2),s("HOX",2),s("DCR",2),s("VYE",2)]},{name:"Big Animals",factions:["N","U"],cards:[s("DTD",3),s("MHR",2),s("DZD",3),s("SPB",3),s("SHY",3),s("URB",3),s("VIK",1),s("ESK",3),s("DYS",3),s("LYS",3),s("IME",3)]},{name:"Explosive Dragon Rage",factions:["A","T"],cards:[s("FMD",3),s("SGA",2),s("AFR",3),s("FBI",3),s("POK",3),s("SHK",3),s("ROK",3),s("IGR",1),s("OEX",3),s("BWW",2),s("STB",2),s("BRN",2)]},{name:"Angry Tree",factions:["N","U"],cards:[s("DTD",3),s("EPD",2),s("CYC",3),s("SPB",3),s("IME",3),s("SOC",3),s("ODC",2),s("ESK",2),s("WTA",3),s("VYE",3),s("HOX",3)]},{name:"Commando",factions:["A","N"],cards:[s("GSF",3),s("SIX",2),s("GMP",3),s("DMW",3),s("IMA",3),s("MMA",3),s("MBR",3),s("POA",3),s("WMM",2),s("EXD",2),s("SFA",3)]},{name:"Our Robot Overlords",factions:["A","T"],cards:[s("AGK",3),s("AFS",3),s("ATT",3),s("BTB",3),s("BSS",3),s("FWS",3),s("FLC",3),s("GOS",3),s("RHU",3),s("WMC",3)]},{name:"Random Aggression",factions:["T","U"],cards:[s("SMA",3),s("EHW",3),s("KSB",3),s("FSH",3),s("RTW",3),s("SDR",3),s("LBD",3),s("KKK",3),s("FRR",3),s("SIV",3)]},{name:"The Crux of it All",factions:["A","N"],cards:[s("CMR",3),s("VPR",3),s("LLD",3),s("DCR",3),s("SCV",3),s("IBA",2),s("SRM",2),s("SRP",1),s("MMR",2),s("LCE",1),s("NXA",2),s("IMD",1),s("OJC",2),s("WPC",2)]}]},qi={name:"Fandom Wiki",id:"FDWK",decks:[{name:"Castles",factions:["A","U"],cards:[s("TDS",3),s("TMS",3),s("DTR",3),s("HTR",3),s("RSD",3),s("SPB",3),s("MHR",3),s("RHU",3),s("AEC",3),s("FRR",3)]},{name:"Runebark's Revenge",factions:["U"],cards:[s("RBG",3),s("EVT",3),s("EFE",3),s("SBI",3),s("RSD",3),s("SPB",3),s("ODC",3),s("GSS",3),s("BTR",3),s("POD",3)]},{name:"Don't Wake Boris",factions:["T","U"],cards:[s("AGD",3),s("EVT",3),s("EFE",3),s("DGW",3),s("LYS",3),s("SBD",3),s("ODC",3),s("GSS",3),s("BRN",3),s("POD",3)]},{name:"Shrink N' Squat",factions:["A","N"],cards:[s("DDS",3),s("ESK",3),s("EPD",3),s("GRW",3),s("GGP",3),s("HRM",3),s("PPM",3),s("SRM",3),s("MMG",3),s("WFS",3)]},{name:"Healthy Mystic",factions:["T","U"],cards:[s("LYR",3),s("PYM",3),s("EFE",3),s("TGS",3),s("LYS",3),s("SBD",3),s("TMG",3),s("TMM",3),s("SSH",3),s("SSE",3)]},{name:"Varna Control",factions:["A","N"],cards:[s("VIK",3),s("KIW",3),s("LCE",3),s("ABE",3),s("ZTU",3),s("SES",3),s("DCR",3),s("SCV",3),s("ESU",3),s("BRS",2),s("HOX",1)]},{name:"Barry's Buddies",factions:["A","T"],cards:[s("AAA",3),s("BRS",3),s("SMD",3),s("GOS",3),s("PMP",3),s("AGW",3),s("NNS",3),s("PLW",3),s("OBB",3),s("ABE",3)]},{name:"Heraldbomb",factions:["T","U"],cards:[s("UWL",3),s("HOD",3),s("PTB",3),s("BTM",3),s("LYS",3),s("DDF",3),s("MHR",3),s("WSE",3),s("SPB",3),s("WWP",3)]},{name:"Heartseeker",factions:["A","T"],cards:[s("UWL",3),s("FFU",3),s("FKS",3),s("OEX",3),s("POK",3),s("ROK",3),s("UHS",3),s("WBU",3),s("UCM",2),s("WSE",2),s("KKK",2)]},{name:"Punchy",factions:["A","U"],cards:[s("ODC",3),s("DBP",3),s("URB",3),s("RHU",3),s("CEX",3),s("GOS",3),s("LYS",3),s("PMP",3),s("WMM",3),s("ABE",3)]},{name:"Sea of Sludge",factions:["N","U"],cards:[s("ODC",3),s("WTA",3),s("GSS",3),s("DYL",3),s("AGD",3),s("GGW",3),s("CYC",3),s("VYE",3),s("DCR",3),s("SCV",3)]},{name:"Poison Control",factions:["A","U"],cards:[s("MHR",3),s("LOD",3),s("VNS",3),s("ESG",3),s("LCE",3),s("ESU",3),s("IMA",3),s("DSV",3),s("GSS",2),s("CSR",1),s("ABE",3)]},{name:"Original Fangsters",factions:["A","N"],cards:[s("VES",3),s("XTE",3),s("GGP",3),s("RHU",3),s("WBG",3),s("ABE",3),s("DDS",3),s("SOC",3),s("JPK",3),s("EPD",3)]},{name:"Hatorade",factions:["A","U"],cards:[s("MHR",3),s("ARB",3),s("DDF",3),s("IHA",3),s("LLG",3),s("NXA",3),s("OJC",3),s("RHU",3),s("SPB",3),s("LYS",3)]},{name:"Wegu Control",factions:["A","U"],cards:[s("MHR",3),s("CHR",3),s("KIW",3),s("ESG",3),s("WTA",3),s("ODC",3),s("GSS",3),s("OAP",2),s("NGQ",1),s("DDF",2),s("WPC",1),s("ABE",3)]}]},ji={name:"Battlebranded",id:"BTLB",decks:[{name:"Bucket of Spite",factions:["N","T"],cards:[s("SMD",2),s("SPH",3),s("BSM",3),s("EBW",3),s("UWL",3),s("BSW",2),s("BWW",1),s("FMD",3),s("BST",3),s("EPD",3),s("GGD",2),s("HOX",1),s("SOC",1)]},{name:"Overoverloaded",factions:["A","N"],cards:[s("XDH",3),s("RMB",3),s("ABE",3),s("IMA",3),s("EPD",3),s("TPG",3),s("ESU",3),s("KIW",2),s("LCE",2),s("ESK",2),s("STR",1),s("CYC",1),s("PRI",1)]},{name:"Dysian Forest",factions:["N","U"],cards:[s("POX",3),s("DBQ",3),s("TDS",3),s("NGQ",3),s("WWP",3),s("DTD",3),s("LBD",3),s("SSH",2),s("LYS",3),s("DYS",2),s("FRR",1),s("HOX",1)]},{name:"Statis Shenanigans",factions:["A","T"],cards:[s("OBB",3),s("SHK",3),s("ABE",3),s("IMA",3),s("SIX",3),s("GCR",2),s("ESU",3),s("NNS",2),s("LCE",3),s("OJC",2),s("BRS",1),s("VIC",1),s("PRI",1)]},{name:"Masochist Zoo",factions:["N","U"],cards:[s("DZD",3),s("TDW",3),s("LLD",3),s("LLG",3),s("RWC",3),s("BWT",3),s("DYS",2),s("SPB",3),s("SHY",3),s("IME",2),s("TDS",2)]},{name:"Pummelled by Gauntlets",factions:["A","N"],cards:[s("AGK",3),s("FWS",3),s("LLD",3),s("LLS",3),s("NXA",3),s("RHU",3),s("ARB",2),s("GOS",2),s("OJC",2),s("ESK",2),s("PMP",2),s("SOC",2)]},{name:"Nuada's Greenhouse",factions:["T","U"],cards:[s("NFF",3),s("NGQ",3),s("LKP",3),s("SYL",3),s("ATT",3),s("BWW",3),s("GMR",2),s("FRR",2),s("SSH",1),s("URB",2),s("BRN",2),s("SSE",3)]},{name:"Abominable Slaughter",factions:["N","T"],cards:[s("CGL",3),s("XDH",3),s("LLD",3),s("POX",3),s("ABM",3),s("ZXR",3),s("BWW",3),s("FMD",3),s("BST",2),s("ROK",3),s("HOX",1)]},{name:"Outraged Ingir",factions:["A","T"],cards:[s("OBB",3),s("FMD",3),s("IKA",3),s("BST",3),s("NXA",3),s("KKK",2),s("RHU",3),s("ROK",3),s("BWW",3),s("WSE",1),s("OEX",3)]},{name:"Lord of the Necros",factions:["N","T"],cards:[s("TPG",3),s("BSM",3),s("EBW",3),s("FST",3),s("TNL",3),s("BWW",3),s("XRW",3),s("CSB",3),s("GGD",3),s("SOC",3)]},{name:"Thar' Be Omegas",factions:["A","U"],cards:[s("AFS",3),s("BSS",3),s("ARB",3),s("FGA",3),s("FGB",3),s("FGG",3),s("FGD",3),s("TBA",3),s("SSH",3),s("NNS",3)]},{name:"Skillshriek",factions:["N","U"],cards:[s("POX",3),s("SEV",3),s("LLD",3),s("SPB",3),s("NSH",3),s("TDW",3),s("XDH",2),s("SBI",2),s("ATP",2),s("FRR",2),s("AEC",2),s("IME",2)]},{name:"Kitfinity",factions:["A","N"],cards:[s("XDH",3),s("MMX",3),s("GMP",2),s("IMA",3),s("VRP",3),s("SEV",3),s("ESU",3),s("KIW",3),s("SHG",2),s("SHV",2),s("SCV",1),s("CYC",1),s("AFO",1)]},{name:"There Can Be Only One",factions:["A","U"],cards:[s("AHL",3),s("WMM",3),s("ESU",3),s("PRI",3),s("JPK",3),s("MPH",3),s("LYS",3),s("BTM",2),s("FIN",1),s("SOD",3),s("VGR",3)]}]},Qi={name:"Misc. Web Decks",id:"WEB1",decks:[{name:"Steelscale Debuff",factions:["A","N"],cards:[s("STG",3),s("CTG",3),s("VTW",3),s("IME",3),s("NNS",3),s("PLW",3),s("SOC",3),s("SES",2),s("IMD",1),s("DFR",1),s("EXD",1),s("HOX",2),s("SHV",1),s("WMM",1)]},{name:"The Fun Train",factions:["T","U"],cards:[s("AMD",3),s("ATT",3),s("BWW",3),s("EFM",3),s("SPB",3),s("URB",3),s("AEC",3),s("BRN",3),s("LYS",3),s("SOV",2),s("TGL",1)]},{name:"Snouty's Sludges",factions:["N","U"],cards:[s("DYL",3),s("ODC",3),s("SOL",3),s("RSD",3),s("PVA",2),s("SFS",3),s("GRP",3),s("NCM",3),s("LBD",3),s("DYS",3),s("WGE",1)]},{name:"Metabuse",factions:["A","N"],cards:[s("POX",3),s("WMC",3),s("SEV",3),s("CKB",3),s("ARB",3),s("LLD",3),s("LLS",3),s("XDH",3),s("IME",3),s("GRM",2),s("HOX",1)]},{name:"Immortal Dino",factions:["N","U"],cards:[s("BTR",3),s("BWT",3),s("RWC",3),s("TDS",3),s("UTR",3),s("SEV",2),s("SMA",2),s("LSS",3),s("TDW",2),s("HOX",2),s("SOC",2),s("VRP",2)]},{name:"Redacted",factions:["A","U"],cards:[s("MDR",3),s("RHU",3),s("TBA",3),s("SPM",3),s("CTG",3),s("NXO",3),s("AFO",2),s("SVO",2),s("AGW",2),s("FRR",2),s("SBI",3),s("LLV",1)]},{name:"Ebonflame Thunderskull",factions:["N","T"],cards:[s("ATT",3),s("EFM",3),s("VES",3),s("ESK",3),s("BWW",3),s("SOV",3),s("NSH",3),s("DCR",2),s("SCV",2),s("DBT",2),s("IME",3)]},{name:"Binben the Math Nut",factions:["A","T"],cards:[s("BLH",3),s("KIW",3),s("GMP",3),s("SHK",3),s("OBB",3),s("BRN",3),s("STP",3),s("ESU",2),s("GOS",2),s("FLN",2),s("MTT",2),s("GCR",1)]},{name:"For Ever More the Oil's Chore",factions:["U"],cards:[s("VNS",3),s("VNF",3),s("SHS",3),s("STO",3),s("DSV",3),s("PSC",2),s("ODC",2),s("WWP",2),s("SBI",2),s("TDS",2),s("DZD",2),s("FRR",2),s("LYS",1)]},{name:"Aegis Boon",factions:["A","U"],cards:[s("AGK",3),s("ALS",3),s("BSG",3),s("IHA",3),s("NXT",3),s("OBD",3),s("FRR",3),s("DYB",2),s("WWP",3),s("SYL",2),s("TDS",2)]},{name:"Thanksgiving Dinner",factions:["N","T"],cards:[s("BTD",3),s("CSW",3),s("GBG",3),s("ICD",3),s("CDM",2),s("GGR",2),s("EFP",2),s("SOC",2),s("DCR",2),s("FSL",1),s("DRD",1),s("NCM",1),s("XSH",1),s("GRM",1),s("TBC",1),s("EXD",1),s("HGS",1)]},{name:"Warden of Ice",factions:["A","T"],cards:[s("GTT",3),s("SHK",3),s("GMP",3),s("MTT",3),s("SIX",3),s("GCR",3),s("ESU",3),s("CAG",2),s("UBL",3),s("AFO",2),s("ENP",2)]},{name:"Magmifly",factions:["T"],cards:[s("SLS",3),s("STM",3),s("LUC",3),s("POK",3),s("AWU",3),s("BTD",3),s("BMY",2),s("AGU",2),s("SWA",2),s("TST",2),s("ROK",2),s("BRN",2)]}]},Ji={name:"Fundecks 1",id:"FUN1",decks:[{name:"Frankenbomb",factions:["N"],cards:[s("DFB",3),s("BSR",3),s("HGS",3),s("HFA",3),s("FFD",3),s("XSH",3),s("XHU",3),s("WBG",3),s("GBG",3),s("CTI",3)]},{name:"Hangry Beasts",factions:["T","U"],cards:[s("TBA",3),s("SVH",3),s("MBP",2),s("FSH",3),s("RBH",3),s("FBC",3),s("LBR",2),s("CFB",3),s("AAK",3),s("KKK",2),s("FRR",1),s("FIN",1),s("IBF",1)]},{name:"Metamind Zapper",factions:["A","T"],cards:[s("MMA",3),s("DMW",3),s("GMP",3),s("SYO",3),s("KAW",3),s("SHK",3),s("CTL",2),s("CAG",2),s("MSC",2),s("MTS",2),s("ASG",2),s("ESU",2)]},{name:"Plant Party",factions:["N","U"],cards:[s("CTV",3),s("TDW",3),s("BTS",3),s("CHR",3),s("GMR",3),s("KOD",2),s("LKP",2),s("SHV",2),s("DBA",2),s("CCR",2),s("PTB",2),s("FIN",1),s("DBT",2)]},{name:"Voltron",factions:["A"],cards:[s("FGA",3),s("FGB",3),s("FGD",3),s("FGG",3),s("AFS",3),s("BSS",3),s("PRI",3),s("TUP",2),s("JPK",2),s("BWH",2),s("SFT",3)]},{name:"Do Fear the Reaper",factions:["A","N"],cards:[s("CTI",3),s("DFR",3),s("GRW",3),s("LGT",3),s("OXM",3),s("OXP",3),s("PHM",3),s("CTW",2),s("NNS",2),s("OXA",2),s("SDN",3)]},{name:"Muadib",factions:["N","U"],cards:[s("DBA",3),s("DYL",3),s("GSW",3),s("LBD",3),s("MMW",3),s("NCW",3),s("SRV",3),s("LBL",2),s("MSP",2),s("VYE",2),s("SBD",3)]},{name:"Triassic Park",factions:["T","U"],cards:[s("URB",3),s("UTR",3),s("UTM",3),s("ULR",3),s("UIC",3),s("UGL",3),s("RTS",3),s("BRN",2),s("LBR",2),s("IBF",2),s("GHB",3)]},{name:"Whacky Whinds",factions:["N","T"],cards:[s("DDD",3),s("WBH",3),s("HMF",3),s("WCS",3),s("GGP",3),s("SAD",3),s("SDN",3),s("EWE",3),s("SBG",3),s("ZSH",3)]},{name:"WWP 4 Victory",factions:["A","U"],cards:[s("WWP",3),s("EHN",2),s("SDR",2),s("HTR",2),s("MML",2),s("HTP",2),s("SHS",3),s("MND",2),s("NXC",2),s("CDT",2),s("PTB",2),s("SVO",2),s("MPH",2),s("SYO",2)]},{name:"Braaiins",factions:["N"],cards:[s("XDV",3),s("XRW",3),s("ONN",2),s("SLH",2),s("FWK",2),s("BWK",2),s("URD",2),s("TPG",2),s("DSS",2),s("KOD",2),s("ZMT",2),s("RSZ",2),s("BLW",2),s("CSB",2)]},{name:"Wanderin'",factions:["N","U"],cards:[s("LYS",3),s("STR",2),s("MBP",2),s("OSL",2),s("RLW",3),s("SSR",1),s("SVO",2),s("SSE",2),s("RHW",3),s("SYL",2),s("TGS",2),s("TMG",3),s("XDH",3)]},{name:"Walls",factions:["A","T"],cards:[s("CDC",3),s("CTG",3),s("CRC",3),s("DCS",3),s("FRI",3),s("FGA",2),s("OBB",3),s("FVA",2),s("TGN",2),s("OWH",3),s("STN",3)]},{name:"Snakes in a Lane",factions:["A","U"],cards:[s("AFO",3),s("DSV",3),s("PSC",3),s("SHS",3),s("STO",3),s("NCL",2),s("VNF",3),s("LYS",2),s("SVO",1),s("VNS",3),s("TXS",2),s("ART",2)]},{name:"Benny & Izzy",factions:["A","T"],cards:[s("BRN",3),s("EFM",2),s("IZK",3),s("JPK",1),s("MTT",1),s("NNS",1),s("OBB",2),s("OWF",2),s("OEX",3),s("PRI",2),s("PTR",1),s("TST",1),s("FLS",2),s("BLH",3),s("SHK",3)]}]},_i={name:"Fundecks 2",id:"FUN2",decks:[{name:"Ride the Lightning",factions:["T","U"],cards:[s("HOS",3),s("BLH",3),s("USS",3),s("LSK",3),s("SHK",3),s("CTL",3),s("LWY",3),s("KAW",3),s("RSP",3),s("DYB",2),s("SVO",1)]},{name:"Caught in a Web",factions:["A","N"],cards:[s("ASQ",3),s("IRT",3),s("OXA",2),s("OXM",3),s("DFS",3),s("HRM",3),s("ESD",3),s("ULG",3),s("DDS",3),s("CCS",2),s("DWW",2)]},{name:"Rando Calrissian",factions:["T","U"],cards:[s("CDM",3),s("BZS",3),s("PMI",3),s("IKA",3),s("ROE",3),s("PHC",3),s("DIS",3),s("DRE",3),s("SIV",3),s("HTP",3)]},{name:"Beards of Glory",factions:["A","U"],cards:[s("IBA",3),s("IHA",3),s("MBP",3),s("ESC",3),s("EWT",3),s("ESG",3),s("DBA",3),s("TGN",3),s("BLP",2),s("RPR",2),s("JPK",2)]},{name:"None More Verdant",factions:["U"],cards:[s("VCH",2),s("VSP",2),s("VGR",2),s("POD",2),s("MBP",2),s("EFE",3),s("VGW",3),s("WOD",1),s("SVO",1),s("RBG",3),s("RSD",3),s("SRD",2),s("ART",2),s("LYR",2)]},{name:"Exploding Cat",factions:["A","T"],cards:[s("SBF",3),s("OEX",3),s("ATI",3),s("KAW",3),s("ZSH",3),s("RSP",3),s("WMM",2),s("OWF",2),s("DFS",2),s("CHT",2),s("OBB",2),s("ABL",2)]},{name:"No, Not the Bees!",factions:["T","U"],cards:[s("LVH",3),s("HVE",3),s("SIV",3),s("TRS",3),s("KBE",3),s("SHK",3),s("LBR",3),s("RSP",3),s("VCH",2),s("VGR",2),s("CTL",2)]},{name:"Armored Column",factions:["A","U"],cards:[s("ESP",2),s("BTB",3),s("FLC",3),s("CEX",3),s("FRR",2),s("SSN",2),s("FSC",3),s("NXB",3),s("BWH",3),s("AMP",3),s("WMC",1),s("NXT",2)]},{name:"Angered Alyssa",factions:["A","T"],cards:[s("ASB",3),s("SHK",3),s("FSM",3),s("BST",3),s("SFM",3),s("BSW",3),s("VOB",3),s("TBC",3),s("SCD",3),s("MTT",2),s("ASG",1)]},{name:"Big Dawg Iniog",factions:["N","U"],cards:[s("ICD",3),s("DHC",3),s("ZDK",3),s("CCS",2),s("NCM",3),s("VCH",2),s("HTR",2),s("IRT",3),s("NGT",3),s("ROU",2),s("TOB",2),s("SPG",2)]},{name:"Rumblestone Clown Show",factions:["A","T"],cards:[s("RSE",3),s("OWF",3),s("AGP",3),s("DFS",3),s("FSM",3),s("IBF",3),s("TST",3),s("BWN",2),s("DKS",2),s("CHT",2),s("COD",1),s("LFA",2)]},{name:"Kills Bugs Dead",factions:["T","U"],cards:[s("TSP",3),s("SMS",3),s("BTD",3),s("HMO",3),s("QSW",3),s("UTR",3),s("VTR",3),s("GHB",3),s("STM",3),s("DKS",2),s("VCH",1)]},{name:"Aeon Buzzard",factions:["A","T"],cards:[s("EPH",3),s("BWN",3),s("TBB",3),s("CDM",2),s("SAD",3),s("LCE",2),s("MBR",3),s("COD",1),s("MMR",3),s("MMX",3),s("BZH",2),s("STD",2)]},{name:"Unholy Matrimony",factions:["N"],cards:[s("DFB",3),s("BOF",3),s("CGL",3),s("SGF",2),s("POX",3),s("ULG",3),s("IME",3),s("SHG",2),s("IRT",2),s("SHV",3),s("DRD",3)]},{name:"Dance of the Dryads",factions:["T","U"],cards:[s("NGQ",2),s("HOS",3),s("SDR",3),s("LBD",3),s("KTS",3),s("MPH",3),s("SSR",3),s("PYS",2),s("SVO",2),s("SBD",2),s("DYB",2),s("SND",2)]}]},tr={name:"Fundecks 3",id:"FUN3",decks:[{name:"Ashy Larry",factions:["A","T"],cards:[s("AMD",3),s("LFA",3),s("SSI",3),s("SAD",3),s("HMF",3),s("AMY",3),s("ABR",2),s("UEM",2),s("WFM",2),s("DCS",2),s("PHM",2),s("OBB",2)]},{name:"Wander These Lands",factions:["N","U"],cards:[s("LYS",3),s("CYW",1),s("RTW",3),s("RLW",3),s("SVO",2),s("DYS",2),s("RHW",3),s("GHB",2),s("ROU",2),s("IME",3),s("VCH",1),s("ULG",3),s("AEC",2)]},{name:"Blob Convention",factions:["A","N"],cards:[s("S01",3),s("NCM",3),s("NCS",3),s("CYS",3),s("FSL",3),s("NCP",3),s("NOZ",3),s("SLH",3),s("GRP",2),s("SHV",2),s("GRM",2)]},{name:"We Shall Not Cease",factions:["N","T"],cards:[s("CGG",3),s("FSM",3),s("EXD",3),s("GRP",3),s("SHV",3),s("HOX",2),s("SCV",1),s("VYE",3),s("COD",1),s("DCR",2),s("BRN",2),s("DBT",2),s("TOB",1),s("VOB",1)]},{name:"What Tek Iz This?",factions:["T","U"],cards:[s("IZK",3),s("VIC",3),s("IGR",3),s("SSH",3),s("DGW",3),s("BRN",3),s("LYS",3),s("ROK",3),s("DDF",3),s("EWV",3)]},{name:"Tromping Tuskins",factions:["A","U"],cards:[s("LBC",3),s("LBL",3),s("CTV",3),s("TGK",3),s("EWT",3),s("NFF",2),s("TSL",2),s("CSG",2),s("VPR",2),s("MXW",2),s("AOP",2),s("HRM",2),s("ESC",1)]},{name:"Enhanced Voltron",factions:["A"],cards:[s("FGA",3),s("FGB",3),s("FGD",3),s("FGG",3),s("SFG",3),s("GAS",3),s("WTK",3),s("MMG",3),s("HRM",3),s("LCE",2),s("PLW",1)]},{name:"Lazarus (Big Skills)",factions:["N","T"],cards:[s("TDW",3),s("NSH",3),s("PHC",3),s("PSH",3),s("IME",3),s("ULG",3),s("SHG",3),s("VIK",3),s("IDF",2),s("GRP",2),s("ASG",1),s("COD",1)]},{name:"Dogs! Dogs! Dogs!",factions:["T","U"],cards:[s("LTU",3),s("SDA",3),s("EHN",3),s("EWV",3),s("HTP",2),s("DYB",2),s("SVO",1),s("VCH",1),s("WHR",3),s("MMH",2),s("DBR",2),s("SIN",2),s("PYS",1),s("VTR",2)]},{name:"The Cackler",factions:["A","N"],cards:[s("CKB",3),s("ARB",3),s("GMP",3),s("LCE",2),s("PRI",2),s("RPR",3),s("DPO",3),s("SAP",3),s("DDS",3),s("OXP",3),s("ABE",2)]},{name:"Nugalug",factions:["N","T"],cards:[s("NUG",3),s("LUC",3),s("EWE",3),s("SBG",3),s("AWU",3),s("SPH",3),s("ROU",3),s("FFM",3),s("BZD",3),s("BFM",3)]},{name:"Blessed Shrine",factions:["A","T"],cards:[s("SLS",3),s("CTG",3),s("USS",3),s("MMG",3),s("CRC",3),s("STN",3),s("NXC",3),s("MND",2),s("SSD",2),s("USA",2),s("SES",1),s("OBB",2)]},{name:"The Dixie Pig",factions:["T","U"],cards:[s("SSD",3),s("WSE",3),s("NCL",3),s("STN",3),s("PYS",3),s("BSW",3),s("FKS",3),s("UCM",2),s("UHS",2),s("HTR",2),s("TBC",2),s("GHS",1)]},{name:"Wafer Thin Mint",factions:["N","T"],cards:[s("LFA",2),s("EXD",3),s("GBG",3),s("USA",3),s("PMS",3),s("STN",1),s("VOB",1),s("FSK",3),s("WFM",3),s("FFS",3),s("TBC",2),s("FOR",3)]},{name:"Cyrus the Virus",factions:["N","U"],cards:[s("CTM",3),s("PTB",3),s("POT",3),s("GRM",3),s("MNM",3),s("LMD",3),s("MPH",3),s("SOC",3),s("SRP",3),s("HGS",3)]}]},er={name:"Fundecks 4",id:"FUN4",decks:[{name:"Pain Forest",factions:["T","U"],cards:[s("TDS",3),s("TMS",3),s("DTR",3),s("HTR",3),s("EFE",3),s("SFM",3),s("SHK",3),s("VCH",2),s("BSW",2),s("UCM",2),s("MSP",1),s("VSP",1),s("IBF",1)]},{name:"Disrespect the Weak",factions:["A","N"],cards:[s("UIW",3),s("SRM",3),s("OXP",3),s("OXM",3),s("SRP",3),s("WFS",2),s("GRW",2),s("DGZ",2),s("VPR",2),s("DDS",2),s("PHM",2),s("OFM",2),s("LMV",1)]},{name:"I Love the Dead",factions:["N","U"],cards:[s("YNS",3),s("NSW",3),s("STS",2),s("SIV",2),s("SLH",3),s("CCR",3),s("GGW",3),s("REW",3),s("SST",2),s("MML",2),s("DYS",2),s("TPT",2)]},{name:"Silly Ol' Steelscale",factions:["A","T"],cards:[s("STG",3),s("DGW",3),s("FKS",3),s("FSK",3),s("USA",3),s("CEX",3),s("OBB",3),s("BWH",2),s("DRE",1),s("FVA",1),s("AGW",2),s("SOK",2),s("NNS",1)]},{name:"Poison Crush",factions:["T","U"],cards:[s("WBY",3),s("LOD",3),s("SPT",3),s("VND",3),s("DPG",3),s("FZS",3),s("GCR",3),s("UBL",2),s("MPH",3),s("FKS",2),s("STB",2)]},{name:"Dragons, Eh",factions:["N","T"],cards:[s("DGW",3),s("SMD",3),s("ATI",3),s("LMD",3),s("DDD",3),s("CSW",3),s("DTD",3),s("VIC",3),s("BTD",3),s("SOV",3)]},{name:"Hail Hydra",factions:["A","U"],cards:[s("ESG",3),s("DBA",3),s("CHY",3),s("LHY",3),s("RHY",3),s("SVH",3),s("SVO",2),s("EVT",3),s("AEC",2),s("AGW",2),s("SPG",1),s("VCH",2)]},{name:"Coral, Get to the Sides!",factions:["N"],cards:[s("IRT",3),s("IVS",3),s("ZMT",3),s("ZDK",3),s("XDV",3),s("TNL",3),s("ABB",3),s("SNT",3),s("XRW",3),s("CCC",3)]},{name:"The Bear and the Maiden Fair",factions:["T","U"],cards:[s("DZD",3),s("FWB",3),s("DBR",3),s("FFM",3),s("AMD",3),s("WFM",3),s("SHK",3),s("SIV",3),s("AIV",2),s("NCL",2),s("SOV",1),s("EFA",1)]},{name:"Bionic Darkforged",factions:["A","U"],cards:[s("SWS",3),s("DSE",3),s("DRS",3),s("SSP",3),s("DHM",3),s("SHA",3),s("ESC",3),s("LBD",3),s("AGP",2),s("CTV",2),s("SVO",1),s("NNS",1)]},{name:"Caustic Darkforged",factions:["N","T"],cards:[s("DSW",3),s("GGB",3),s("SFE",3),s("DSA",3),s("SCZ",3),s("USY",3),s("ZXR",3),s("SPH",3),s("BZH",2),s("IBF",1),s("VGL",2),s("CYW",1)]},{name:"Thralled Darkforged",factions:["A","N"],cards:[s("SWS",3),s("GGB",3),s("DSW",3),s("DSE",3),s("SCZ",3),s("SHA",3),s("PSH",3),s("STD",3),s("DDS",2),s("AOP",1),s("BFT",2),s("TPT",1)]},{name:"Roasted Darkforged",factions:["T","U"],cards:[s("DSA",3),s("DRS",3),s("SFE",3),s("SSP",3),s("DHM",3),s("USY",3),s("CDM",3),s("GHR",3),s("MPH",2),s("ENR",1),s("PYS",2),s("STB",1)]},{name:"Punchy Darkforged",factions:["A","T"],cards:[s("SWS",3),s("DSE",3),s("SFE",3),s("DSA",3),s("SHA",3),s("USY",3),s("WMR",3),s("AMD",3),s("OWF",2),s("SOA",1),s("UBL",2),s("SOK",1)]},{name:"Mouldy Darkforged",factions:["N","U"],cards:[s("DSW",3),s("GGB",3),s("DRS",3),s("SSP",3),s("DHM",3),s("SCZ",3),s("DBA",3),s("GGW",3),s("ROG",2),s("SIN",2),s("SLH",1),s("DYB",1)]}]},He=[Yi,zi,Zi,Ki,Xi,ji,qi,Qi,Ji,_i,tr,er];He.forEach(o=>{o.decks.forEach(t=>{t.cards.map(i=>i.num).reduce((i,r)=>i+r,0)!==30&&console.warn("Pre-con deck with not 30 cards: "+o.name+" -- "+t.name)})});const xt=()=>{p.dirt()};class Qe{state;constructor(t){this.state=t}getState(){return this.state}get adjacent(){return p.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,xt()}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 breakthrough(){return this.state.breakthrough||this.modBool("BT")}set breakthrough(t){const i=this.state;i.breakthrough=t,xt(),Z.addFactBoard("U",i.id,i.lane,i.owner)}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,xt()}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,xt(),this.enforceEffects("DF",this.owner))}get effects(){return this.state.effects}get extraBattles(){return this.state.extraBattles}set extraBattles(t){this.state.extraBattles=t}get faction(){return W.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 W.getCard(this.code).isTribe(t)}get lane(){return this.state.lane}get level(){return this.state.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){const i=this.state;i.negateArmor=t,xt(),this.enforceEffects("AR"),Z.addFactBoard("U",i.id,i.lane,i.owner)}get negateDefender(){return this.state.negateDefender||this.modBool("ND")}negDefend(t){const i=this.state;i.negateDefender||(i.negateDefender=!0,xt(),this.enforceEffects("DF",this.owner),Z.addFactBoard(t,i.id,i.lane,i.owner))}get negateMobility(){return this.state.negateMobility||this.modBool("NM")}set negateMobility(t){const i=this.state;i.negateMobility=t,xt(),Z.addFactBoard("U",i.id,i.lane,i.owner)}get negateRegen(){return this.state.negateRegen}set negateRegen(t){this.state.negateRegen=t,xt()}get opposed(){return p.searchByLane(p.oppositeLane(this.lane),!this.owner)}get owner(){return this.state.owner}get poison(){return this.state.poison+this.modSum("PN")}get rank(){return k.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,r,n=void 0){this.state.status==="A"&&(t!==0&&(this.state.attack+=t,this.enforceEffects("AT"),xt()),i!==0&&(this.state.health+=i,this.state.maxHealth+=i,this.enforceEffects("CH"),Bt.deathProdder(this,n),xt(),i>0&&x.addEvents(I.creatHeal(this,i))),Z.addFactBoard(r,this.id,this.lane,this.owner))}addArmor(t){if(!this.negateArmor&&this.state.status==="A"){const i=this.state.armor+t;this.state.armor=Math.max(0,i),this.enforceEffects("AR"),xt(),Z.addFactBoard("A",this.id,this.lane,this.owner)}}addMobility(t,i){if(!this.negateMobility&&this.state.status==="A"){const r=this.state.mobility+t;this.state.mobility=Math.max(0,r),xt(),Z.addFactBoard(i,this.id,this.lane,this.owner)}}addPoison(t){if(this.state.status==="A"){const i=this.state.poison+t;this.state.poison=Math.max(0,i),xt(),Z.addFactBoard("U",this.id,this.lane,this.owner)}}addRegen(t,i){if(!this.negateRegen&&this.state.status==="A"){const r=this.state.regen+t;this.state.regen=Math.max(0,r),xt(),Z.addFactBoard(i,this.id,this.lane,this.owner)}}heal(t,i=!0){if(t<1||this.state.status!=="A")return 0;const r=Math.min(this.health+t,this.maxHealth)-this.health;return r<1?0:(this.state.health+=r,xt(),this.enforceEffects("CH"),x.addEvents(I.creatHeal(this,r)),i&&Z.addFactBoard("U",this.id,this.lane,this.owner),r)}setHealth(t){this.state.health=t,xt()}hurt(t,i=!1){if(t<1)return[0,0];const r=Math.max(Math.min(t,this.armor-this.armorDmg),0);let n=t-r,c=this.health-n;this.state.armorDmg+=r;let f=0;return i&&c<0&&(f=n-this.health,n=this.health),n>0&&(xt(),this.state.health-=n,this.enforceEffects("CH")),[n,f]}hurtBattle(t,i,r=!1){const n=this.hurt(t,r);return n[0]>0&&x.addEvents(I.damage(!0,n[0],this.health,!0,!0,this,i)),n[1]}hurtDirect(t,i,r,n=void 0){const c=this.hurt(t,!1);return c[0]>0&&(y.lawg(i,` dealt ${t} dmg to `,this.code,"."),Z.addFactBoard(r,this.id,this.lane,this.owner),x.addEvents(I.damage(!1,c[0],this.health,!1,!0,this,void 0)),Bt.deathProdder(this,n)),c[0]}modEffectPropagator(t){t.type==="AT"?this.enforceEffects("AT"):t.type==="HL"?(this.enforceEffects("CH"),Bt.deathProdder(this)):t.type==="AR"||t.type==="NA"?this.enforceEffects("AR"):(t.type==="DF"||t.type==="ND")&&this.enforceEffects("DF",this.owner)}modSum(t){return b.modSum(this.mods,t)}modBool(t){return b.modBool(this.mods,t)}hasMod(t){return b.hasModG(this.mods,t)}addMod(t,i){this.mods.push(t),this.modEffectPropagator(t),xt(),t.type!=="MH"&&Z.addFactBoard(i,this.id,this.lane,this.owner)}anim8(t){Z.addFactBoard(t,this.id,this.lane,this.owner)}addModSafe(t){b.hasMod(this.mods,t)||this.addMod(t,"X")}removeMod(t,i=!0){const r=this.state.mods.filter(n=>n.granter===t);r.length>0&&(xt(),this.state.mods=this.state.mods.filter(n=>n.granter!==t),r.forEach(n=>{i&&this.modEffectPropagator(n),n.type==="AR"&&(this.state.armorDmg=Math.max(0,this.state.armorDmg-n.value))}))}removeModSafe(t,i=!0){this.hasMod(t)&&this.removeMod(t,i)}expireMod(t){this.state.mods.splice(b.modIdx(this.state.mods,t),1)}bonusTotal(){let t=ft.sumNuggets(this.triggers);return this.state.bonus&&(t=ft.addNuggets(t,this.state.bonus)),t}threatTotal(){const t=this.triggers.map(i=>i.bonus?.threat).filter(Boolean);return this.state.bonus?.threat&&t.push(this.state.bonus.threat),t}endActivation(){this.modBool("EA")?this.removeMod(this.id):this.state.activationAvailable=!1,Bt.deathCheck(),T.actionDone()}move(t,i){this.state.status==="A"&&(Z.addFactBoard(i,this.id,this.lane,this.owner),Z.addLaneMove(this.id,this.lane,t,this.owner),xt(),this.state.lane=t,Be.positionChange(this.owner),x.addEvents(I.creature("MOV",this)))}addEffect(t,i){const r=b.effect(t,i);return this.effects.push(r),r}enforceEffects(t,i=!1){this.effects.filter(r=>r.watch===t).filter(r=>r.area==="A"||r.area==="C"&&this.owner===i).forEach(r=>W.getCard(r.logicCode).enforceEffect(this))}jr4(t,i=""){i===""&&(i=this.code);const r=b.trigger(t,i);return r.creatId=this.id,this.triggers.push(r),xt(),r}removeTrigger(t){const i=b.trigIdx(this.triggers,t);i>-1?(this.triggers.splice(i,1),t.changes&&xt()):console.error("Wery curious, could not find trigger to remove",t)}wipeAll(){this.preWipe();const t=this.state;t.hints=[],t.armor=0,t.mobility=0,t.poison=0,t.regen=0,t.aggressive=!1,t.defender=!1,t.breakthrough=!1,t.defender=!1,t.negateDefender=!1,t.negateArmor=!1,t.bonus=void 0,t.changed=!0,t.negateActivate=!0,k.removeModSafe(!0,t.id),k.removeModSafe(!1,t.id),p.creatByTarget(b.crTarg()).forEach(i=>{i.removeModSafe(t.id),i.enforceEffects("PS",t.owner)}),this.enforceEffects("AT"),this.enforceEffects("AR"),this.enforceEffects("CH"),Be.defenderChange(t.owner),this.anim8("A"),xt()}preWipe(){this.state.mods=[],this.state.triggers=[],this.state.effects=[]}get hints(){return this.state.hints}aiHints(){return this.hints}}class b{static creatureState(t,i){return{activationAvailable:!0,aggressive:!1,armor:0,armorDmg:0,attack:0,bonus:void 0,breakthrough:!1,changed:!1,code:"",defender:!1,effects:[],extraBattles:0,health:0,hints:[],id:"",lane:i,level:0,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:E.genId(),condition:b.target("TH"),sourceCard:t}}static mod(t,i,r=""){return{type:t,value:typeof i=="boolean"?i?1:0:i,granter:r,expiry:"NN"}}static modT(t,i,r=""){const n=b.mod(t,i,r);return n.expiry="ET",n}static trigger(t,i){return{id:E.genId(),type:t,logicCode:i,creatId:"",customCode:"",interactive:!1,changes:!1,bonus:void 0,batch:!1}}static triggerReaction(t,i,r,n){return{event:t,owner:r,creatId:"",cardCode:"",trigger:i,host:n,draw:!0}}static basicAction(t){return{zone:"N",key:t,host:"",param:""}}static fieldSelectAction(t,i=-1,r=!0){return{zone:"F",key:t,playerA:r,lane:i,host:"",param:""}}static deckSelectAction(t,i,r){return{zone:"N",key:t,card:i,position:r,host:"",param:""}}static handSelectAction(t,i="",r="",n=-1){return{zone:"H",key:t,card:i,cost:r,position:n,host:"",param:"",canPlay:!1,lvlOnly:!1}}static playerSelectAction(t,i){return{zone:"P",key:t,playerA:i,host:"",param:""}}static draftSelectAction(t,i,r){return{zone:"N",key:t,index:i,pack:r,host:"",param:""}}static menuButtonAction(t){return{zone:"N",key:"MNBT",host:"",param:t}}static actionifier(t,i,r,n){const c=t;return c.key=i,c.host=r,c.param=n,c}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,r,n){return b.actionifier(b.target(t),i,r,n)}static crTarg(){const t=b.target("TF");return t.field="O",t.creatStatus="V",t}static crActTarg(t,i,r){return b.actionifier(b.crTarg(),t,i,r)}static crNotMeTarg(t){const i=b.target("TF");return i.field="O",i.creatStatus="V",i.notMe=t,i}static crNotMeActTarg(t,i,r,n){return b.actionifier(b.crNotMeTarg(i),t,r,n)}static crFriendTarg(){const t=b.crTarg();return t.player="F",t}static crFriendActTarg(t,i,r){return b.actionifier(b.crFriendTarg(),t,i,r)}static crFriendNotMeTarg(t){const i=b.crNotMeTarg(t);return i.player="F",i}static crFriendNotMeActTarg(t,i,r,n){return b.actionifier(b.crFriendNotMeTarg(i),t,r,n)}static crEnemyTarg(){const t=b.crTarg();return t.player="E",t}static crEnemyActTarg(t,i,r){return b.actionifier(b.crEnemyTarg(),t,i,r)}static playerTarg(t){const i=b.target("TP");return i.player=k.toTarget(t),i}static playerActTarg(t,i,r,n){return b.actionifier(b.playerTarg(t),i,r,n)}static lvlHandActTarg(t,i){const r=this.actionTarget("TH","CARD",t,i);return r.player="F",r.canLevel=!0,r.hint=["CD"],r}static emptyTarg(){const t=b.target("TF");return t.field="E",t}static emptyActTarg(t,i,r){return b.actionifier(b.emptyTarg(),t,i,r)}static emptyPlayerTarg(t){const i=b.emptyTarg();return i.player=k.toTarget(t),i}static emptyPlayerActTarg(t,i,r,n){return b.actionifier(b.emptyPlayerTarg(t),i,r,n)}static modSum(t,i){return t.filter(r=>r.type===i).map(r=>r.value).reduce((r,n)=>r+n,0)}static modBool(t,i){return t.some(r=>r.type===i&&r.value===1)}static hasModG(t,i){return t.findIndex(r=>r.granter===i)>-1}static hasMod(t,i){return b.modIdx(t,i)>-1}static modIdx(t,i){return t.findIndex(r=>r.granter===i.granter&&r.type===i.type)}static trigIdx(t,i){return t.findIndex(r=>r.id===i.id)}}class Wt{constructor(t){this.code=t,this.level=parseInt(t.substring(3))}code;consistent=!1;faction="X";cardCode(){return Wt.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`}free=!1;level;maxLevel=3;minLevel=1;name="";overload=!1;rarity="T";spice;text="";get type(){return "C"}hints;addSp(t,i){}aiHints(){return this.hints??[]}canLevel(){return this.level{c+=n[m]*r[0][m],f+=n[m]*r[1][m]}),[c,f]}rawNug(t,i,r,n,c=0,f=void 0){return ft.rawNugget(t,i,r,n,c,f)}buffNug(t,i,r=void 0){return this.rawNug(0,i+t,t,0,0,r)}playerNug(t,i=void 0){return this.rawNug(0,0,0,t,0,i)}spawnNug(t,i=void 0){const r=ft.cardCreatValueFormula(t);return this.rawNug(1,r,t.iAttack,0,0,i)}statSpawnNug(t,i,r=void 0){const n=this.buffNug(t,i,r);return n.count=1,n}avgSpawnNug(t){const i=this.avgCreatureStats(t);return this.statSpawnNug(i[0],i[1])}regnNug(t,i=void 0){return this.rawNug(0,ft.calcCreatValueFormula(0,0,0,0,t,!1,0),0,0,0,i)}multNug(t,i){return t.attack*=i,t.value*=i,t.count*=i,t.pHealth*=i,t}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 boof2410(){return this.lValN([2,4,10])}get boof258(){return this.lValN([2,5,8])}get boof259(){return this.lValN([2,5,9])}get boof2510(){return this.lValN([2,5,10])}get boof2612(){return this.lValN([2,6,12])}get boof346(){return this.lValN([3,4,6])}get boof347(){return this.lValN([3,4,7])}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 boof368(){return this.lValN([3,6,8])}get boof369(){return this.level*3}get boof369n(){return this.level*-3}get boof3610(){return this.lValN([3,6,10])}get boof3612(){return this.lValN([3,6,12])}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 boof3915(){return this.lValN([3,9,15])}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 boof4810(){return this.lValN([4,8,10])}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 boof5610(){return this.lValN([5,6,10])}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 boof51016(){return this.lValN([5,10,16])}get boof51020(){return this.lValN([5,10,20])}get boof6810(){return this.lValN([6,8,10])}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 boof71217(){return this.lValN([7,12,17])}get boof71218(){return this.lValN([7,12,18])}get boof71220(){return this.lValN([7,12,20])}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 boof81218(){return this.lValN([8,12,18])}get boof81219(){return this.lValN([8,12,19])}get boof81220(){return this.lValN([8,12,20])}get boof81318(){return this.lValN([8,13,18])}get boof81420(){return this.lValN([8,14,20])}get boof91218(){return this.lValN([9,12,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 P extends Wt{constructor(t){super(t)}iHealth=0;iAttack=0;iAggro=!1;iArmor=0;iBT=!1;iDefend=!1;iMobile=0;iRegen=0;tribe=[];isTribe(t){return(Array.isArray(t)?t:[t]).every(r=>this.tribe.includes(r))}jr3(t,i){const r=b.creatureState(t,i);return r.id=E.genId(),r.code=this.code,r.level=this.level,r.health=this.iHealth,r.attack=this.iAttack,r.maxHealth=r.health,r.regen=this.iRegen,r.breakthrough=this.iBT,r.defender=this.iDefend,r.aggressive=this.iAggro,r.armor=this.iArmor,r.mobility=this.iMobile,r.hints=this.aiHints(),r.bonus=this.bonus,new Qe(r)}playTargets(){const t=b.actionTarget("TF","FORG",this.code,"");return t.player="F",[t]}canActivate(t){return!1}startActivation(t){console.error("encountered activation request for creature with no activate",t)}get formation(){return!1}addExtraActivate(t){t.addMod(b.modT("EA",!0,t.id),"X")}bFac(t){return t.draw?this.faction:"X"}}class vt extends Wt{constructor(t){super(t)}get type(){return "S"}logSpell(t=void 0,i=void 0){if(nt.simOn)return;const r=["Casted ",this.code];t&&(r.push(" on ",t.code),i&&r.push(" and ",i.code)),r.push("."),y.lawg(...r)}}class Te{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),r=this.playerStats(!t);return Te.deltafier(i,r)}static deltafier(t,i){const r=Te.blankStats(!0);return r.creatCount=t.creatCount-i.creatCount,r.creatValue=t.creatValue-i.creatValue,r.threatValue=t.threatValue-i.threatValue,r.playerHealth=t.playerHealth-i.playerHealth,r.bonus=t.bonus-i.bonus,r}static blankStats(t){return{side:t,creatCount:0,creatValue:0,threatValue:0,playerHealth:0,bonus:0}}}class ft{static dcWeight=.4;fromState(t=!1){const i=p.qActiveCreats(),n=[!0,!1].map(c=>{const f=Te.blankStats(c),m=k.toPlayer(c);f.playerHealth=ft.playerFormula(m.health,k.totalArmor(m),k.totalPoison(m),m.effects.length);const C=ft.sumNuggets(m.triggers);f.playerHealth+=C.pHealth,f.creatCount=C.count,f.creatValue=C.value,f.threatValue=C.attack,f.bonus=C.bonus;const D=i.filter(B=>B.owner===c);return D.forEach(B=>{const G=B.bonusTotal();f.playerHealth+=G.pHealth,f.bonus+=G.bonus,f.creatCount+=1+G.count,f.creatValue+=ft.creatValueFormula(B)+G.value,f.threatValue+=ft.threatFormula(B,i)+G.attack}),t&&c&&(D.forEach(B=>{f.bonus+=ft.threatEOT(B,m.turn,i)}),L.regularPlays>2&&(f.bonus+=(L.regularPlays-2)*(Math.min(m.rank,3)*2))),f});return new Te(n[0],n[1])}static ddp9(t,i,r,n,c=0){const f=t/4,m=i/10,C=r/12,D=n/8;return f+m+C+D+c}static creatValueFormula(t){return ft.calcCreatValueFormula(t.attack,t.health,t.armor,t.mobility,t.regen,t.breakthrough,t.poison)}static cardCreatValueFormula(t){return ft.calcCreatValueFormula(t.iAttack,t.iHealth,t.iArmor,t.iMobile,t.iRegen,t.iBT,0)}static calcCreatValueFormula(t,i,r,n,c,f,m){const C=f?1:0;return i+Math.max(0,t)+(r+Math.min(n,3)+C+c-m)*1.5}static playerFormula(t,i,r,n){return t+(i-r)*2+n*4}static threatFormula(t,i){let r=0,n=0;if(t.defender)r=t.attack;else{const c=ft.oppFinder(t,i);c?(t.breakthrough&&(n=Math.max(t.attack-c.health,0)),r=t.attack-n):n=t.attack,n>0&&(n+=ft.scalingBonus(n))}return Math.max(r,0)+Math.max(n,0)}static threatEOT(t,i,r){let n=0;return t.threatTotal().forEach(f=>{f==="TP"?t.attack>0&&S.isUn(ft.oppFinder(t,r))&&(t.defender?n+=t.level/2:n+=t.level):f==="TS"?n+=t.level*2*(t.health/(t.maxHealth||1)):f==="TX"||f==="TW"?n+=t.level*(f==="TX"?1.5:.5):f==="TH"&&i>1?n+=t.level*(i/4):f==="TL"&&i===4&&(n-=t.level)}),n}static oppFinder(t,i){const r=6-t.lane;return i.find(n=>n.owner!==t.owner&&n.lane===r)}static rawNugget(t,i,r,n,c=0,f=void 0){return{count:t,value:i,attack:r,pHealth:n,bonus:c,threat:f}}static addNuggets(t,i){return ft.rawNugget(t.count+i.count,t.value+i.value,t.attack+i.attack,t.pHealth+i.pHealth,t.bonus+i.bonus)}static sumNuggets(t){let i=ft.rawNugget(0,0,0,0,0);return t.forEach(r=>{r.bonus&&(i=ft.addNuggets(i,r.bonus))}),i}static scalingBonus(t){let i=7;if(t<=i)return 0;let r=!0,n=0,c=1;const f=7;for(;r;)t>i+f?(n+=c*f,i+=f,c++):(n+=c*(t-i),r=!1);return n}weighState(t,i,r){const n=t.deltaStats(r),c=i.deltaStats(r),f=Te.deltafier(c,n),m=f.playerHealth<0?-1:1,C=ft.scalingBonus(f.playerHealth*m)*m+f.playerHealth;return ft.ddp9(f.creatCount,f.creatValue,f.threatValue,C,f.bonus)}}class ir{aiPlayer;constructor(t){this.aiPlayer=t}jr7(t,i=3){return`${t}${i}`}jr6(t,i){const r=S.randInt(0,i.length),n=i[r];return i.splice(r,1),p.birth(t,"F",this.aiPlayer,n,"X")}cheatin(){const t=k.toPlayer(this.aiPlayer),i=k.toPlayer(!this.aiPlayer),r=i.health-t.health;let n=0;r>85?n=3:r>65?n=2:r>45&&(n=1);const c=p.emptyLanes(this.aiPlayer);if(n===0||c.length===0)return!1;y.lawg(this.aiPlayer," is a cheaty cheaterton.");let f=0;if(n===1){if(L.regularPlays-=1,f=S.randInt(0,13),f===0)this.jr6(this.jr7("HTR"),c);else if(f===1)this.jr6(this.jr7("AGM"),c).addRegen(8,"T");else if(f===2){const m=this.jr6(this.jr7("YNS"),c);m.buff(0,15,"N"),m.addRegen(4,"N")}else if(f===3)this.jr6(this.jr7("TBA"),c);else if(f===4)this.jr6(this.jr7("DCS"),c);else if(f===5)this.jr6(this.jr7("GGP"),c).addRegen(8,"N");else if(f===6){const m=this.jr6(this.jr7("WFM"),c);m.aggressive=!0}else if(f===7){const m=this.jr6(this.jr7("FFU"),c);m.aggressive=!0}else if(f===8){const m=this.jr6(this.jr7("URB"),c);m.aggressive=!0}else if(f===9){const m=this.jr6(this.jr7("KOD"),c);m.aggressive=!0,m.addRegen(6,"N")}else if(f===10)this.jr6(this.jr7("AGK"),c).addArmor(3);else if(f===11){const m=this.jr6(this.jr7("PSC"),c);m.aggressive=!0}else if(f===12){const m=this.jr6(this.jr7("SAD"),c);m.aggressive=!0}}else if(n===2)if(L.regularPlays-=1,f=S.randInt(0,17),f===0){const m=this.jr6(this.jr7("NDR"),c);m.aggressive=!0}else if(f===1){const m=this.jr6(this.jr7("CSW"),c);m.aggressive=!0}else if(f===2)this.jr6(this.jr7("GGD"),c).addRegen(6,"N");else if(f===3)this.jr6(this.jr7("EFP"),c);else if(f===4)this.jr6(this.jr7("ZTU"),c);else if(f===5){const m=this.jr6(this.jr7("DDD"),c);m.aggressive=!0}else if(f===6)this.jr6(this.jr7("RBH"),c).addRegen(8,"T");else if(f===7)this.jr6(this.jr7("SFT"),c);else if(f===8)this.jr6(this.jr7("GTT"),c);else if(f===9)this.jr6(this.jr7("SMD"),c);else if(c.length===5)this.jr6(this.jr7("DFB"),c),[1,2,3,4].forEach(m=>this.jr6(this.jr7("XHS"),c));else if(c.length===4)this.jr6(this.jr7("LMV"),c);else if(c.length===3)this.jr6(this.jr7("LHY"),c),this.jr6(this.jr7("SVH"),c),this.jr6(this.jr7("DBA"),c);else if(c.length===2)this.jr6(this.jr7("UTR"),c),this.jr6(this.jr7("TDS"),c);else if(t.turn===4)this.jr6(this.jr7("SSR"),c);else if(t.turn===1)this.jr6(this.jr7("ESK"),c);else{const m=this.jr6(this.jr7("XSH"),c);m.aggressive=!0}else if(n===3)if(f=S.randInt(0,20),f===0){const m=this.jr6(this.jr7("IHA",4),c);m.aggressive=!0}else if(f===1)this.jr6(this.jr7("CHR"),c);else if(f===2)this.jr6(this.jr7("FGO",1),c);else if(f===3)this.jr6(this.jr7("CHV",4),c);else if(f===4)this.jr6(this.jr7("KKK",4),c);else if(t.health<20){const m=this.jr6(this.jr7("ODC",4),c);m.aggressive=!0}else if(c.length===5){const m=S.randInt(0,4);if(m===0)[1,2,3,4,5].forEach(C=>this.jr6(this.jr7("UWL",2),c));else if(m===1)[1,2].forEach(C=>this.jr6(this.jr7("DFB"),c)),[1,2,3].forEach(C=>this.jr6(this.jr7("FFD"),c));else if(m===2)[1,2,3,4,5].forEach(C=>this.jr6(this.jr7("BWK"),c));else if(m===3){this.jr6(this.jr7("SBG"),c),this.jr6(this.jr7("EWE"),c);const C=this.jr6(this.jr7("BMY"),c);C.defender=!0,C.aggressive=!0}}else if(i.health>350)t.health<180&&(k.heal(t,180-t.health,"POZ1"),Z.addHeal(t.isPlayerA)),this.jr6(this.jr7("AGD"),c);else if(i.health>250)this.jr6(this.jr7("FGO"),c);else if(c.length===4){const m=S.randInt(0,3);m===0?(this.jr6(this.jr7("AGK"),c),[1,2,3].forEach(C=>this.jr6(this.jr7("VBK"),c))):m===1?(this.jr6(this.jr7("TDS"),c),this.jr6(this.jr7("TDS"),c),this.jr6(this.jr7("UTR"),c)):m===2&&[1,2,3,4].forEach(C=>this.jr6(this.jr7("CDC"),c))}else if(c.length===3)if(S.randInt(0,2)){this.jr6(this.jr7("SDR"),c),this.jr6(this.jr7("SDR"),c);const m=this.jr6(this.jr7("UPM"),c);m.aggressive=!0}else{this.jr6(this.jr7("SDL"),c);const m=this.jr6(this.jr7("NFF"),c);m.aggressive=!0}else if(c.length===2)this.jr6(this.jr7("SPM"),c),this.jr6(this.jr7("SPM"),c);else{const m=this.jr6(this.jr7("NXC"),c);m.buff(10,0,"A"),m.aggressive=!0,m.addMobility(2,"A"),m.addRegen(5,"A")}return t.health<30&&(k.heal(t,50-t.health,"POZ1"),Z.addHeal(t.isPlayerA)),!0}}var at=(o=>(o[o.Left=0]="Left",o[o.Both=1]="Both",o[o.Right=2]="Right",o[o.ForceRight=3]="ForceRight",o))(at||{});class ci{action;hitTest(t,i,r){}enabled=!0;mouse=0;validButton(t){return this.mouse===1||this.mouse===t}static arrayHit(t,i,r,n){let c,f=0;const m=t.length;for(;c===void 0&&f=t&&this.originY<=i&&this.endY>=i?this.action:void 0}}const rr={zone:"N",key:"BNDL",host:"",param:""};class Xt extends ht{constructor(t,i,r,n,c=0){super(rr,t,i,r,n,c)}static fromBox(t,i=0){return new Xt(t[0],t[1],t[2],t[3],i)}childs=[];addChild(t){this.childs.push(t)}clear(){this.childs=[]}hitTest(t,i,r){if(super.hitTest(t,i,r))return ci.arrayHit(this.childs,t,i,r)}}class Ne{realPromise;resolveMe(t){}rejectMe(){}getPromise(){return this.realPromise}constructor(){this.realPromise=new Promise((t,i)=>{this.resolveMe=t,this.rejectMe=i})}}const ui=25,di=9999,sr=-9999,ar=-999999,nr=["CANC","DEET","SCRH"],or=["HPLY","ACTV","MOVE"];class hr{dumb=!1;inPhase=!0;log=!1;simOff=!0;simOn=!1;boulos(t){this.simOff=!t,this.simOn=t}promStack=[];peekStack=[];peeking=!1;slowpoke=0;endCount=0;aiPlayer=!1;brdEval;rootBoardStats;turnSims=0;turnTime=0;kickOut=!1;kickTimer=0;constructor(){this.brdEval=new ft,this.rootBoardStats=new Te(Te.blankStats(!0),Te.blankStats(!1))}setLog(t){this.log=t}lNum(t){return t<-899999?"NUNS":t<-8999?"LOSS":t>8888?"KILL":t.toFixed(1)}popProm(t){this.promStack.pop().resolveMe(t)}popPeeker(t){this.peekStack.pop().resolveMe(t)}hitMainPhase(){this.dumb&&this.simOn&&this.inPhase&&L.mainBattle&&(this.inPhase=!1)}simEndpoint(t){if(this.endCount++,this.promStack.length===0)y.debug("Tried to end a sim, but no promise to unlock."),console.trace();else{let i;if(t==="T"){const r=this.brdEval.fromState(!0);i=this.brdEval.weighState(this.rootBoardStats,r,this.aiPlayer)}else t==="W"?i=di:t==="L"?i=sr:i=ar;this.popProm(i)}}async processAction(t,i,r=!1){const n=this.simOff;let c=0,f=this.actionPruner(t);if(f=this.noHandDoubles(f),this.peeking){this.popPeeker(f);return}if(n&&this.dumb&&i&&(this.dumb=!1,y.debug("Smart Again.",!1)),this.dumb&&!this.inPhase){let B=f.filter(G=>G.key==="FITE"||G.key==="ENDT");B.length>0&&(f=B)}if(n){Ct.hwhipe();const B=f.map((q,pt)=>Ct.drawAiGear(pt,!1));await Promise.all(B),await $e.drawActions([]),await S.sleep(ui),this.kickOut=!1,this.boulos(!0),this.slowpoke=Date.now(),this.rootBoardStats=this.brdEval.fromState(),this.endCount=0;const G=await this.peeker(f),R=[];let X=0,V=0,_=[];G.forEach(q=>{X+=q.peek.length,q.free&&(q.free==="FREE"?V++:_.includes(q.free)||(V++,_.push(q.free))),q.wasPeek&&q.peek.some(pt=>this.hasHint(pt,"DF"))&&R.push(q.root)}),R.length>0?(f=R,this.dumb=!0,y.debug("Do firsts; dumb mode. Action count "+f.length,!1)):r?(this.dumb=!0,y.debug("Forced dumb mode.",!1)):L.regularPlays+V>3?(this.dumb=!0,y.debug("4+ plays; dumb mode. Peek was "+X,!1)):k.getActive().hand.length>7?(this.dumb=!0,y.debug("8+ in hand; dumb mode. Peek was "+X,!1)):X>29&&S.options.debug&&this.peekerReport(G)}if(f.length===0){n&&(console.error("Root eval set consisted of 0 valid actions"),y.debug("!! Zero Action Root !!")),this.simEndpoint("D");return}let m=-99999;const C=[];let D=!0;if(n)if(f.length===1)C.push({a:f[0],weight:99}),D=!1;else{const B=f.findIndex(G=>G.key==="HPLY"&&G.card==="ESU2"||G.card==="ESU3");B>-1&&(C.push({a:f[B],weight:99}),D=!1)}if(D){We.saveState();let B=!0;for(let G=0;G4e4&&(this.kickOut=!0),V===di&&(B=!1),V+=this.hintWeight(R),V>m&&(m=V),We.restoreState(),n&&(C.push({a:R,weight:V}),await Ct.drawAiGear(G,!0),c++,await S.sleep(ui))}We.popState()}if(n)if(this.boulos(!1),this.kickOut)y.lawg("🤖: High complexity encountered. Recombobulating."),this.processAction(t,i,!0);else{const B=m-(i?.4:.2);let G=C.filter(q=>q.weight>B);G.length>1&&G.findIndex(q=>q.a.key==="ENDT")>-1&&(G=G.filter(q=>q.a.key!=="ENDT"));let R;if(B>di-100){const q=G.find(pt=>pt.a.key==="FITE");q?R=q.a:R=G[S.randInt(0,G.length)].a}else R=G[S.randInt(0,G.length)].a;const X=Date.now()-this.slowpoke,V=Math.max(1,350-X),_=X-ui*c;this.turnSims+=this.endCount,this.turnTime+=_,S.options.debug&&(i?(y.debug("▪"),y.debug("🧠 Main Choices 🧠"),C.sort((q,pt)=>pt.weight-q.weight).forEach(q=>{const pt=this.dazzler(q,R,B);let Mt="",ye;const kt=q.a.key;kt==="HPLY"?(Mt=q.a.card,ye="Play "):kt==="MOVE"||kt==="ACTV"?(Mt=q.a.host,ye=kt==="MOVE"?"Move ":"Actv "):kt==="FITE"||kt==="ENDT"?ye=kt==="FITE"?"Fite ":"Done ":ye=kt+" ??? ",y.lawg(ye,Mt," : "+this.lNum(q.weight)+pt)}),y.debug("🧠 ~~~~~~~~~~~~~~ 🧠"),y.debug("▪")):R.key==="FORG"&&(y.debug("🧠 Lane Choices 🧠"),C.filter(q=>q.a.key==="FORG").sort((q,pt)=>pt.weight-q.weight).forEach(q=>{y.lawg("Lane "+q.a.lane+" : "+this.lNum(q.weight)+this.dazzler(q,R,B))}),y.debug("🧠 ~~~~~~~~~~~~~~ 🧠"),y.debug("▪"))),S.sleep(V).then(()=>{T.handleAction(R)})}else this.popProm(m)}dazzler(t,i,r){return t.a===i?" 🏆":t.weight>r?" 🌻":""}actionPruner(t){let i=t.filter(r=>nr.indexOf(r.key)===-1);return L.mainBattle?i=i.filter(r=>r.key!=="HDSC"):i=i.filter(r=>!this.hasHint(r,"BB")),i=i.filter(r=>{if(this.hasHint(r,"HR")){if(r.zone==="P")return r.playerA!==this.aiPlayer;{const n=p.ddf6(r);return n.owner===this.aiPlayer?n.aiHints().includes("MC"):!0}}else return!0}),i=i.filter(r=>{if(this.hasHint(r,"KL")){const n=p.ddf6(r);return n.owner===this.aiPlayer?n.aiHints().includes("ST"):!0}else return!0}),i=i.filter(r=>this.hasHint(r,"BF")?r.playerA===this.aiPlayer:!0),i=i.filter(r=>this.hasHint(r,"DB")?r.playerA!==this.aiPlayer:!0),i=i.filter(r=>{if(this.hasHint(r,"PN")){if(r.zone==="P")return r.playerA!==this.aiPlayer;{const n=r,c=p.ddf6(n);return c.owner===this.aiPlayer?c.aiHints().includes("MC"):!0}}else return!0}),i=i.filter(r=>{const n=r.key==="FORG";if(n||this.hasHint(r,"FL")){const c=r,f=p.searchByFSA(c);return f&&(L.mainBattle?L.newPre:L.newPost).includes(f.id)?f.aiHints().includes("RT")?!0:n?W.getCard(c.host).aiHints().includes("RD"):!1:!0}else return!0}),i}noHandDoubles(t){const i=[],r=[],n=[];return t.forEach(c=>{c.key==="HPLY"?i.push(c):r.push(c)}),i.forEach(c=>{const f=c.card;n.includes(f)||(n.push(f),r.push(c))}),r}async peeker(t){this.peeking=!0;const i=[],r=[];t.forEach(n=>{or.includes(n.key)?r.push(n):i.push({root:n,peek:[n],wasPeek:!1,free:""})}),We.saveState();for(let n=0;n0){let C="";if(c.key==="HPLY"){const D=c;D.cost!==""&&(C=D.cost)}i.push({root:c,peek:m,wasPeek:!0,free:C})}We.restoreState()}return We.popState(),this.peeking=!1,i}peekerReport(t){let i=0,r=0,n=0,c=[],f=[];t.forEach(m=>{const C=m.peek.length;if(C>0){const D=m.root.key;if(D==="HPLY")if(m.peek[0].key==="FORG")r+=C;else{const B=y.fastName(m.root.card)+": "+C;c.push(B)}else if(D==="MOVE")n+=C;else if(D==="ACTV"){const B=y.fastName(m.root.host)+": "+C;f.push(B)}else i+=C}}),y.debug("High complexity hit: Root: "+t.length),r>0&&y.debug("Forges: "+r),n>0&&y.debug("Mobility: "+n),c.forEach(m=>y.debug(m)),f.forEach(m=>y.debug(m)),i>0&&y.debug("Other: "+i)}hintWeight(t){let i=!1,r=!1,n="",c=0;if(t.key==="HPLY"?n=t.card:t.key==="HDSC"?(r=!0,n=t.host):this.hasHint(t,"CD")&&(n=t.card,i=!0),n){const f=W.getCard(n);if(f.level0&&(r?c-=m:c+=m)}}return c}levelBonusFormula(t,i){let r=0;const n=t.aiHints();return n.includes("LG")?(r+=1,n.includes("LM")&&(r+=.8)):n.includes("LB")?r-=1.3:i&&(r+=.4),r}hintAdjuster(t){let i=0;const n=t.aiHints().find(c=>c.startsWith("ZZ"));return n&&(i=.5*parseInt(n.slice(2))),i}hasHint(t,i){return!t.hint||t.hint.length===0?!1:t.hint.includes(i)}logStats(t,i){const n=["Crt Cnt","Crt Val","Threat","P Health"].map((c,f)=>`${c}: ${this.numNum(i[f])}`).join(", ");console.log(t+n)}numNum(t){return t.length>6?t.charAt(0)==="-"?"NUNS":"KILL":t.padEnd(4)}cheater(){return E.aiMode&&E.aiActive&&S.options.cheater?new ir(this.aiPlayer).cheatin():!1}peekAllCards(){const t=k.toPlayer(this.aiPlayer),i=t.deck.concat(t.hand,t.discard).sort();console.log(i.map(r=>y.fastName(r)).join(` `))}peekDecks(){const t=k.toPlayer(!1),i=t.deck.map(f=>y.fastName(f)).sort(),r=t.hand.map(f=>y.fastName(f)).sort(),n=t.discard.map(f=>y.fastName(f)).sort(),c=["-- Deck --"].concat(i,"-- Hand --",r,"-- Discard --",n);console.log(c.join(` -`))}}const nt=new hr;class lr{getState(){const t={cCrd:this.currPlayCard,cCst:this.currPlayCost,cPos:this.currPlayPos,aa:this.actionHistory};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.currPlayCard=i.cCrd,this.currPlayCost=i.cCst,this.currPlayPos=i.cPos,this.actionHistory=i.aa}handleAction(t){if(t.key==="DEET"){ge.init(t.param);return}if(t.key==="HPLY"){this.playCardSelect(t);return}if(t.key==="FORG"){L.forgeCard(t,this.currPlayCard,this.currPlayCost,this.currPlayPos);return}if(t.key==="FITE"){Ii.fight(t.param==="M");return}if(t.key==="ENDT"){L.endTurn();return}if(t.key==="MOVE"){this.mobilitySelect(t);return}if(t.key==="MEND"){L.mobility(t);return}if(t.key==="HDSC"){this.currPlayCost="",L.cardPlayed(this.currPlayCard,this.currPlayCost,this.currPlayPos,!0),this.actionDone();return}if(t.key==="ACTV"){const i=p.jr5(t.param);W.getCard(i.code).startActivation(i);return}if(t.key==="NOTR"){t.param==="PM"&>.popMode(),this.actionDone(!0);return}if(t.key==="CARD"){W.getCard(t.host).handleAction(t);return}if(t.key==="CANC"||t.key==="CNCL"){t.param==="PM"&>.popMode(),this.actionHistory.pop(),this.ddf5();return}if(t.key==="USWP"){gt.popMode(),Qt.whatNext();return}if(t.key==="DTUP"){ge.updateDetails(t),ut.drawAll();return}if(t.key==="VWDK"){bt.handleShowDeck(t);return}if(t.key==="SCRK"){bt.handleDeckScroll(t);return}if(t.key==="SCRH"){const i=k.getLocal();t.param==="R"?E.ui.handScrollLeft=Math.min(i.hand.length-5,E.ui.handScrollLeft+5):E.ui.handScrollLeft=Math.max(0,E.ui.handScrollLeft-5),ut.dirtyA=!0,ne.dirty=!0,ut.drawAll();return}if(t.key==="DRFT"){At.resumeDraft(t.param);return}if(t.key==="SCRD"){At.paginate(t.param==="D"),ut.drawAll();return}if(t.key==="UIBT"){Ti.handleUIButton(t);return}if(t.key==="MENU"){Ti.handleMainMenuButton(t);return}if(t.key==="MNBT"){Ti.handleMenuButton(t);return}if(t.key==="DSET"){this.ddf5($t.generateDeckPickerActions(parseInt(t.param)));return}if(t.key==="DECK"){$t.handleDeckPick(t.param);return}if(t.key==="DPVW"){$t.previewDeckPick(t.param);return}if(t.key==="DBUG"){t.param==="AB"&&S.options.debug?y.clearAll():S.toggleDebug();return}}ddf5(t,i=!1){let r;if(t){const n=this.generateDetailActions();r=t.concat(n),this.actionHistory.push(r)}else r=this.actionHistory[this.actionHistory.length-1];E.aiActive?nt.processAction(r,i):(gt.mode==="G"&&(ut.dirtyA=!0),ut.drawAll())}currPlayCard="";currPlayCost="";currPlayPos=-1;shiftPlayCard(t){t0&&i.canLevel()&&r.push(w.buttonTarget("HDSC",t.card));const n=w.toActions(r);return n.push(b.handSelectAction("CANC",t.card,"",t.position)),n}mobilitySelect(t){const i=this.getMoveCardActions(t);this.ddf5(i)}getMoveCardActions(t){const i=p.ddf6(t);let r=[];if(t.param==="ACTV"){const n=b.actionTarget("TB","ACTV",i.code,i.id);r=w.toActions(n)}return r.push(b.fieldSelectAction("CANC",t.lane,t.playerA)),p.canMove(i).map(n=>{const c=b.fieldSelectAction("MEND",n,t.playerA);return c.param=i.id,c}).concat(r)}noneEndTrigger(){return w.toActions(w.buttonTarget("NOTR"))[0]}cancelAction(){return w.toActions(w.buttonTarget("CANC"))[0]}emptyAdjacents(t,i){const r=i||t.id,n=b.emptyPlayerActTarg("F","CARD",t.code,r);return n.lanes=t.adjacent,w.toActions(n)}generateDetailActions(){const t=gt.mode;if(E.aiActive)return[];if(t==="G"){const i=k.getLocal().hand.map((n,c)=>{const f=b.handSelectAction("DEET",n,"",c);return f.param=n,f}),r=p.qActiveCreats().map(n=>{const c=b.fieldSelectAction("DEET",n.lane,n.owner);return c.param=n.code,c});return i.concat(r)}else if(t==="D"){const i=At.currentPack.map((n,c)=>{const f=b.draftSelectAction("DEET",c,!0);return f.param=`${n}1`,f}),r=At.picksAsDeck.map((n,c)=>{const f=b.draftSelectAction("DEET",c,!1);return f.param=`${n.card}1`,f});return i.concat(r)}return[]}}const T=new lr,cr=16.6,ur=200,dr="!CF",fr="!RU",_e=35,gr=.11,Bi=40,fi=18,gi=18,Hi=32,Ni=40,mi=45,Oe=["L1","L2","L3","L4","L5","L6"],pi=["F1","F2","F3","F4"],yi=o=>Math.round(100*o)/100,mr=(o,t,i)=>Math.round((1-i)*o+i*t);class pr{active=!1;animBase=[];animOpac=[];animOver=[];animQ=[];blocker=new Ne;cardCache=new Map;easingCache=new Map;eCanvas;hcFrame;fct2anm=new Map;initBlock=new Ne;initialzed=!1;lastStep=-1;movingBoard=[];movingHand=[];on=!0;pathCache=new Map;rafStartTime=0;speedCache=new Map;spriteCache=new Map;spriteToSchema=new Map;constructor(){["F","F0","D"].concat(Oe,pi).forEach(t=>this.pathCache.set(t,[[],[]]))}actF(){return[this.animOpac,this.animBase,this.animOver].map(t=>t.filter(i=>i.active))}addArmorC(t){if(this.ok()){const i=new vn("M","M","F",t.id,18);i.setDelay(fi),i.preLoad("icons/effects/big/armor.png"),i.setField(t.lane,t.owner),i.nudge(40,76),i.dOrd=2,this.animQ.push(i)}}addArmorP(t){if(this.ok()){const i=new hi("M","I","P",t,this.speedCache.get("D"));i.preLoad("icons/effects/big/armor.png"),i.nudge(897,t===k.isLocalA?552:65),this.animQ.push(i)}}addCardFlash(t){if(this.ok()){const i=pe.fader("P",dr,t);i.x=861,i.y=200,this.animQ.push(i)}}addDeathBoard(t,i,r){if(this.ok()){const n=pe.fader("F",t,t);n.setField(i,r),this.animQ.push(n)}}addDirDmg(t){if(this.ok()){const i=new Ee("Z","P",t);i.nudge(834,t===k.isLocalA?486:-1),this.animQ.push(i)}}addFactBoard(t,i,r,n){if(this.ok()&&t!=="X"){const c=new Tn(this.fct2anm.get(t),"F",i);c.setField(r,n),c.nudge(20,30),c.budge(),this.animQ.push(c)}}addFight(t){if(this.ok()){const i=new li("F","F",t.id,t.id);i.endWrite=!0,i.setField(t.lane,t.owner);const r=this.pathCache.get("F");i.moveY=r[k.isLocalA===t.owner?1:0],this.animQ.push(i)}}addForgeMove(t,i,r,n,c=void 0){if(this.ok()){const f=k.isLocalA===n,m=(r-(i+1))*(f?1:-1),C=m===0?"F0":pi[Math.abs(m)-1],D=new li(C,"F",t,t);D.endWrite=!0,D.dOrd=2;const B=ne.fastCoord(i);f||(B[1]=-184),D.x=B[0],D.y=B[1];const G=this.pathCache.get(D.aId);if(D.moveY=G[f?1:0],m!==0){const R=this.pathCache.get(Oe[Math.abs(m)-1]);D.moveX=R[m>0?0:1]}if(this.animQ.push(D),c){const R=pe.fixed("F",c.id,c.id);R.steps=D.steps,R.dOrd=0,R.setField(c.lane,c.owner),this.animQ.push(R)}}}addHandDiscard(t,i,r){if(this.ok()){const n=this.pathCache.get("D")[0];let c;c=pe.fader("H",t,i),c.setHand(r),c.moveY=n,this.animQ.push(c)}}addHandFling(t,i,r){if(this.ok()){const n="L6",c=this.pathCache.get(n)[0],f=pe.fader("H",t,i);f.setHand(-1),f.x+=40+100*r,f.moveX=c,this.animQ.push(f)}}addHandMove(t,i,r,n,c){if(this.ok()){const f=Math.min(Math.max(n-r,-5),5),m=Oe[Math.abs(f)-1],D=this.pathCache.get(m)[f>0?0:1];let B;const G=n<0||n>4;G?B=pe.fader("H",t,i):(B=new li(m,"H",t,i),B.endWrite=!0,r>4?r=Math.min(r,n+5):r<0&&(r=Math.max(r,n-5))),B.setHand(r),B.moveX=D,c&&!G&&B.extend(15,!0,!1),this.animQ.push(B)}}addHeal(t){if(this.ok()){const i=new Ee("H","P",t);i.slow(4),i.nudge(859,t===k.isLocalA?517:30),this.animQ.push(i)}}addLaneMove(t,i,r,n){if(this.ok()){const c=(r-i)*(k.isLocalA===n?1:-1),f=new li(Oe[Math.abs(c)-1],"F",t,t);f.endWrite=!0,f.setField(i,n);const m=this.pathCache.get(f.aId);f.moveX=m[c>0?0:1],this.animQ.push(f)}}addLevel(t,i){if(this.ok()){const r=new Ee("V","H",t);r.slow(4),r.setHand(i),r.nudge(20,72),this.animQ.push(r)}}addOverload(t,i){if(this.ok()){const r=new Ee("O","H",t);r.slow(4),r.setHand(i),r.nudge(21,72),this.animQ.push(r)}}addPoison(t){if(this.ok()){const i=new hi("P","I","F",t.id,this.speedCache.get("D"));i.preLoad("icons/effects/big/poison.png"),i.setField(t.lane,t.owner),i.nudge(70,36),this.animQ.push(i)}}addRankup(t){if(this.ok()){const i=new Ee("R","P",fr);i.slow(4),i.nudge(890,t===k.isLocalA?466:-21),this.animQ.push(i)}}addRegen(t){if(this.ok()){const i=new hi("G","I","F",t.id,this.speedCache.get("D"));i.preLoad("icons/effects/big/regenerate.png"),i.setField(t.lane,t.owner),i.nudge(10,35),this.animQ.push(i)}}addSlash(t){if(this.ok()){const i=new Vi("B","F",t.id);i.slow(3),i.setDelay(fi),i.setField(t.lane,t.owner),i.nudge(8,44),this.animQ.push(i)}}addSwipe(t){if(this.ok()){const i=new Vi("W","P",t);i.slow(3),i.setDelay(fi),i.nudge(877,t===k.isLocalA?531:44),this.animQ.push(i)}}aniProm(){return this.active?this.blocker.getPromise():Promise.resolve()}async done(t){const i=t??this.actF().flat();await Promise.all(i.map(r=>r.onEnd())),this.eCanvas.clear(),this.active=!1,this.purge(),this.blocker.resolveMe()}async draw(t){if(t-this.lastStep===0){requestAnimationFrame(c=>this.rafNext(c));return}let r=!1;const n=[];for(let c=this.lastStep+1;c<=t;c++)this.actF().forEach(f=>{f.forEach(m=>{m.steps===c?(m.active=!1,n.push(m)):(c===t&&(r=!0),m.moveX.length>c&&(m.x+=m.moveX[c]),m.moveY.length>c&&(m.y+=m.moveY[c]))})});if(r){const c=this.actF();this.hcFrame.clear(),c[0].length>0&&(this.hcFrame.context.globalAlpha=this.easingCache.get("D")[t],await Promise.all(c[0].map(f=>f.draw(t))),this.hcFrame.context.globalAlpha=1),c[1].length>0&&await Promise.all(c[1].map(f=>f.draw(t))),c[2].length>0&&await Promise.all(c[2].map(f=>f.draw(t))),await Promise.all(n.map(f=>f.onEnd())),this.eCanvas.clear(),this.eCanvas.writeHC(this.hcFrame,0,0),this.lastStep=t,t>ur?this.done(n):requestAnimationFrame(f=>this.rafNext(f))}else this.done(n)}easingFade(t){const i=Array(t);let r=0;for(let n=0;nthis.fct2anm.set(kt[1],kt[0]));const i=[["A","effectA"],["B","slash"],["W","swipe"],["Z","boomer"],["H","heal"],["V","level"],["O","overload"],["N","effectN"],["R","rankup"],["T","effectT"],["U","effectU"]];(await Promise.all(i.map(kt=>S.imageLoader(`img/sprites/${kt[1]}.png`)))).forEach((kt,se)=>{this.spriteCache.set(i[se][0],kt)});const n=this.schemaBuilder(5,7,110,154,0),c=this.schemaBuilder(5,7,108,153,0),f=this.schemaBuilder(2,3,134,134,0),m=this.schemaBuilder(2,3,114,114,0),C=this.schemaBuilder(3,3,120,116,0),D=this.schemaBuilder(3,3,110,81,0),B=this.schemaBuilder(3,3,112,114,0),G=this.schemaBuilder(5,2,142,142,0),R=this.schemaBuilder(8,4,205,205,0);[["A",n],["N",n],["U",n],["T",c],["B",f],["W",m],["R",C],["V",D],["O",B],["H",G],["Z",R]].forEach(kt=>this.spriteToSchema.set(kt[0],kt[1])),[["D",_e],["F",Bi],["L1",gi],["L2",Hi],["L3",Ni],["L4",mi],["L5",mi],["L6",_e],["F0",gi],["F1",gi],["F2",Hi],["F3",Ni],["F4",mi]].forEach(kt=>this.speedCache.set(kt[0],kt[1])),this.easingCache.set("D",this.easingFade(_e));const _=(kt,se)=>{const wt=new Array(se.length),Vt=se.map(Yt=>mr(0,kt,Yt));return Vt.forEach((Yt,he)=>{he===0?wt[0]=Yt:wt[he]=Yt-Vt[he-1]}),wt},q=kt=>kt.map(se=>-se),pt=250;Oe.forEach((kt,se)=>{const wt=this.easingLine(this.speedCache.get(kt)),Vt=(se+1)*oe.fieldGap,Yt=_(Vt,wt);if(this.pathCache.set(kt,[Yt,q(Yt)]),se<5){const he=_(pt,wt);this.pathCache.set(pi[se],[he,q(he)])}se===0&&this.pathCache.set("F0",this.pathCache.get("F1"))});const Mt=_(15,this.easingFight(Bi));this.pathCache.set("F",[Mt,q(Mt)]);const ye=_(100,this.easingLine(_e));this.pathCache.set("D",[ye,[]]),this.initialzed=!0,this.initBlock.resolveMe()}}initProm(){return this.on?this.initBlock.getPromise():Promise.resolve()}ok(){return this.on&&nt.simOff}async prep(){if(!this.on||this.animQ.length===0)return 0;if(!this.initialzed)return this.animQ=[],0;this.active=!0;const t=new Map;this.animQ.forEach(n=>{t.has(n.targId)?t.get(n.targId).push(n):t.set(n.targId,[n])});const i=[];let r=0;t.forEach((n,c)=>{const f=n[0].target,m=new Set,C=n.filter(D=>m.has(D.aId)?!1:(m.add(D.aId),!0));if(r+=C.length,n.some(D=>D.type==="F"||D.type==="C"||D.type==="X"?(i.push(D),!0):!1),f==="F"||f==="H"){const D=n.find(B=>B.moveX.length>0||B.moveY.length>0);if(D){if(f==="F")this.movingBoard.push(c);else if(f==="H"){const B=S.deTil(c);S.txt2bool(B[0])&&this.movingHand.push(parseInt(B[1]))}n.length>1&&n.forEach(B=>{B!==D&&(B.moveX=D.moveX,B.moveY=D.moveY)})}}C.forEach(D=>{D.type==="S"?this.animOver.push(D):D.type==="F"||D.type==="I"?this.animOpac.push(D):(D.type==="C"||D.type==="X"||D.type==="M")&&this.animBase.push(D)}),this.animBase.sort((D,B)=>D.dOrd-B.dOrd)});for(let n=0;nthis.rafFirst(t)))}}const Z=new pr;class yr{type="N0";events=[];reactions=[];deathCheck=!0;iaTrigLane=0;getState(){const t={type:this.type,events:this.events,tA:this.reactions,dC:this.deathCheck,tL:this.iaTrigLane};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.type=i.type,this.events=i.events,this.reactions=i.tA,this.deathCheck=i.dC,this.iaTrigLane=i.tL}reset(){this.type="N0",this.events=[],this.reactions=[],this.deathCheck=!0}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=this.events.slice(),this.events=[];else{const n=this.events.filter(f=>f.code==="DIE"),c=this.events.filter(f=>f.code!=="DIE");t==="C1"?(i=c,this.events=n):(i=n,this.events=c)}const r=this.getReactions(i);this.reactions=this.sortReactions(r),Qt.whatNext()}getReactions(t){let i;const r=t.map(n=>{n.code==="TRS"&&(i=n);const c=p.field.map(m=>m.triggers.map(C=>{const D=b.triggerReaction(n,C,m.owner,"C");return D.creatId=m.id,D.cardCode=m.code,D}).filter(C=>vi.ddf8(C))).flat(),f=[!0,!1].map(m=>k.toPlayer(m).triggers.map(D=>b.triggerReaction(n,D,m,"P")).filter(D=>vi.ddf8(D))).flat();return c.concat(f)}).flat();return i&&this.handleTurnStart(i),r}sortReactions(t){const i=k.activeA;let r=t.filter(f=>!f.trigger.interactive&&f.owner===i),n=t.filter(f=>!f.trigger.interactive&&f.owner!==i);const c=t.filter(f=>f.trigger.interactive&&f.owner===i);return nt.simOff&&(r=this.animBatching(r),n=this.animBatching(n)),c.concat(n,r)}animBatching(t){const i=new Map;if(t.forEach(f=>{if(f.trigger.batch){const m=f.trigger.id;i.set(m,1+(i.get(m)??0))}}),i.size===0)return t;const r=[];if(i.forEach((f,m)=>{f>1&&r.push(m)}),r.length===0)return t;const n=t.filter(f=>!r.includes(f.trigger.id));return r.map(f=>t.filter(m=>m.trigger.id===f).map((m,C)=>(C>0&&(m.draw=!1),m))).flat().concat(n)}handleTurnStart(t){p.dirt();const i=E.tick();p.qActiveCreats().forEach(r=>{r.owner===t.playerA&&(r.activationAvailable=!0,r.mobilityAvailable=!0,r.sleeping=!1),r.armorDmg=0,r.poison>0&&r.hurtDirect(r.poison,"POIS","X",i)&&Z.addPoison(r),r.regen>0&&r.heal(r.regen,!1)>0&&Z.addRegen(r),Bt.deathProdder(r,i)}),[k.playerA,k.playerB].forEach(r=>{r.armorDmg=0;const n=k.totalPoison(r);n>0&&k.hurtDirect(r,n,"POIS")>0&&Z.addDirDmg(r.isPlayerA)})}getNextTrigger(){const t=this.reactions;if(t.length!==0)return t[t.length-1]}triggerDone(){this.reactions.length===0?console.error("batch.triggerDone() was called when there is no trigger actions"):(this.reactions.pop(),this.iaTrigLane=0),Qt.whatNext()}addEvents(...t){this.events.push(...t)}}const x=new yr;class br{registry;constructor(){this.registry={}}register(t){if(this.registry[t])throw new Error(`Double registration of canvas ${t}`);this.registry[t]=new rn(t)}get(t){return this.registry[t]}}const lt=new br;class Ar extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Abraxas, Avatar of Kadras",this.iAttack=this.boof4712,this.iHealth=this.lValN([7,11,21]),this.tribe.push("HY");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.`,this.bonus=this.buffNug(this.iAttack,0,"TX")}targ(t){const i=b.crFriendNotMeActTarg("CARD",t.id,this.code,t.id);return this.level<3&&(i.lanes=t.adjacent),i}canActivate(t){return p.creatByTarget(this.targ(t)).length>0}startActivation(t){let i;this.level===1?i=this.targ(t):(i=w.boardTarget("CARD",this.code),i.param=t.id),i.hint=["BB"],T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.applyMod(r)}else{this.logAct(!0);const r=this.targ(i);p.creatByTarget(r).forEach(n=>{this.applyMod(n)})}i.endActivation()}applyMod(t){this.modA(t,b.modT("AT",t.attack))}}class kr extends P{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Abyssal Brute",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.text=`When ${this.name} or another friendly creature enters a side lane, that creature gets ${y.jr9(this.level,this.level,!0)} and Regenerate ${this.level}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("EF");n.bonus=this.buffNug(this.level,this.level,"TW");const c=r.jr4("MV");return c.bonus=this.regnNug(this.level),r}ddf8(t){const i=I.toCreature(t.event);return(i.creature.lane===1||i.creature.lane===5)&&i.creature.owner===t.owner}jr8(t){const i=I.toCreature(t.event);this.buffD(i.creature,this.level),this.regn(i.creature,this.level),x.triggerDone()}}class Tr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Alloyin Highlander",this.iAttack=this.lValN([5,7,10]),this.iHealth=this.boof6914,this.tribe.push("HM"),this.text=`While ${this.name} is your only friendly creature, it gets ${y.jr9(this.boof4812,0)} and Armor ${this.boof248}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);i.player=k.toTarget(t.owner),p.creatByTarget(i).length===0?[b.mod("AT",this.boof4812,t.id),b.mod("AR",this.boof248,t.id)].forEach(n=>{t.addModSafe(n)}):t.removeModSafe(t.id)}}class vr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Ambriel Archangel",this.iAttack=this.lValN([5,10,16]),this.iHealth=this.iAttack+1,this.tribe.push("AG"),this.hints=["ZZ-3"];const i=this.boof101520;this.text=`While ${this.name} is your only friendly creature, you get Armor ${i}, and this gets Armor ${this.level+1} and Mobility 1.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=t.status==="A",r=b.crNotMeTarg(t.id);r.player=k.toTarget(t.owner);const n=p.creatByTarget(r);if(i&&n.length===0){const c=b.mod("AR",this.boof101520,t.id);k.addModSafe(t.owner,c);const f=b.mod("AR",this.level+1,t.id),m=b.mod("MB",1,t.id);t.addModSafe(f),t.addModSafe(m)}else k.removeModSafe(t.owner,t.id),t.removeModSafe(t.id)}}class Ve extends P{cons(t){({["LLD"]:()=>this.demC(),["LLG"]:()=>this.golC(),["LLS"]:()=>this.senC(),["LLT"]:()=>this.tyrC(),["LLV"]:()=>this.verC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;ddf8(t){return nt.simOff&&this.t(t)}jr8(t){const i=this.cardCode(),r=k.toPlayer(t.owner),n=r.hand.length;for(let c=n-1;c>-1;c--){const f=r.hand[c];f.startsWith(i)&&(y.lawg(f," Ambushed."),this.spawn(f,r.isPlayerA),L.levelAndDiscard(f,c,!1,"E"))}x.triggerDone()}ambT(){return`Spawn a ${this.name}. Then discard ${this.level===3?"":"and level up "} ${this.name}.`}demC(){this.faction="N",this.rarity="H",this.name="Leyline Demon",this.iAttack=this.lValN([3,9,14]),this.iHealth=this.iAttack+2,this.tribe.push("DM"),this.text="Ambush: When the enemy player plays a card, if it is their third card played that turn, "+this.ambT(),this.t=this.demT}demT(t){return t.event.code==="PLC"?t.owner!==t.event.playerA&&L.cardsPlayed===3:!1}golC(){this.faction="U",this.rarity="H",this.name="Leyline Golem",this.iAttack=this.lValN([5,12,18]),this.iHealth=this.iAttack-(this.level+1),this.tribe.push("GL"),this.text="Ambush: When an enemy creature moves on the enemy player's turn, "+this.ambT(),this.t=this.golT}golT(t){if(t.event.code==="MOV"){const i=I.toCreature(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner}else return!1}senC(){this.faction="A",this.rarity="H",this.name="Leyline Sentry",this.iAttack=this.lValN([2,7,9]),this.iHealth=this.iAttack+this.level+5,this.tribe.push("RB"),this.text="Ambush: When an enemy creature enters play on the enemy player's turn, if it wasn't Forged, "+this.ambT(),this.t=this.senT}senT(t){if(t.event.code==="ENT"){const i=I.toEnterField(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner&&!i.forged}else return!1}tyrC(){this.faction="T",this.rarity="H",this.name="Leyline Tyrant",this.iAttack=this.lValN([6,12,17]),this.iHealth=this.iAttack-2,this.tribe.push("GT"),this.text="Ambush: When an enemy player gains health on their turn, "+this.ambT(),this.t=this.tyrT}tyrT(t){return t.event.code==="PHL"?t.owner!==t.event.playerA&&k.activeA===t.event.playerA:!1}verC(){this.faction="U",this.rarity="H",this.name="Leyline Vermin",this.iAttack=this.boof61218,this.iHealth=this.boof358,this.tribe.push("IN"),this.text="Ambush: When an enemy creature with Poison is destroyed on the enemy player's turn, "+this.ambT(),this.t=this.verT}verT(t){if(t.event.code==="DIE"){const i=I.toCreature(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner&&i.creature.poison>0}else return!1}}class Sr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Apocrymancer",this.iAttack=this.boof3713,this.iHealth=this.iAttack+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 r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.rawNug(0,0,0,0,.5,"TW"),n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}ddf8(t){if(t.event.playerA===t.owner){const i=W.getCard(t.event.cardCode);if(i.type==="S"&&i.faction==="A")return!0}return!1}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class Cr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Arboris, Grove Dragon",this.iAttack=this.lValN([5,9,20]),this.iHealth=this.iAttack,this.tribe.push("DG");const i=this.boof;this.text=`While you have over 120 health, Arboris gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i);return r.addEffect("PH",this.code),r}enforceEffect(t){if(k.toPlayer(t.owner).health>120&&t.status==="A"){const r=this.boof;t.addModSafe(b.mod("HL",r,t.id)),t.addModSafe(b.mod("MH",r,t.id)),t.addModSafe(b.mod("AT",r,t.id))}else t.removeModSafe(t.id)}get boof(){return this.lValN([4,8,80])}}class wr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Ash Maiden",this.iAttack=this.lValN([3,6,8]),this.iHealth=this.iAttack*2,this.tribe.push("HM"),this.text=`When a friendly creature ${y.dbdtap()}, it gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level,"TP"),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner}jr8(t){const i=I.toDamage(t.event);this.logAct(!1,i.srcCreat),this.buffD(i.srcCreat,this.level),x.triggerDone()}}class ti extends P{constructor(t){super(t),this.rarity="H",this.iAttack=this.level+2,this.iHealth=this.iAttack;const i=this.cardCode();i==="SFA"?this.steel():i==="RFA"?this.root():i==="HFA"?this.hell():i==="SGA"&&this.storm(),this.text=`Forge: ${this.name} gets ${y.jr9(this.level,this.level)} for each ${y.factionText(this.faction)} card in your hand.`}hell(){this.faction="N",this.name="Hellforged Avatar",this.iRegen=this.level,this.tribe.push("AB")}root(){this.faction="U",this.name="Rootforged Avatar",this.iBT=!0,this.tribe.push("HM")}steel(){this.faction="A",this.name="Steelforged Avatar",this.iArmor=this.level,this.tribe.push("CY")}storm(){this.faction="T",this.name="Stormforged Avatar",this.iMobile=this.level,this.tribe.push("MT")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){const i=b.target("TH");i.player=k.toTarget(t.owner),i.faction=this.faction;const r=w.deckByTarget(i).length;if(r>0){const n=I.toEnterField(t.event);this.buffD(n.creature,r*this.level)}x.triggerDone()}}class K extends P{imgKey="";cons(t){({["BOS"]:()=>this.fixedSapling(3),["COZ"]:()=>this.cooze(),["DFM"]:()=>this.dfmimic(),["DZA"]:()=>this.dozer(),["EWF"]:()=>this.woof(),["FWG"]:()=>this.feywing(),["FRH"]:()=>this.hulk(),["FUN"]:()=>this.funguy(),["POZ"]:()=>this.purpz(),["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.cons(this.cardCode())}image(t){return this.rawImage(this.imgKey,t)}static fgoc(t){return "FGO"+t}fixedNekSpirit(t){this.faction="N",this.name="Spirit",this.tribe.push("ST"),this.iAttack=t,this.iHealth=t,this.imgKey=`${"SPN"}${this.level}`}nekSpirit(){this.fixedNekSpirit(this.boof51015)}yuruSpirit(){this.fixedNekSpirit(this.boof5814)}static purpOzC(t){return "POZ"+t}oozer(t){this.faction="N",this.name="Oozeling",this.tribe.push("OZ"),this.iHealth=this.iAttack,this.imgKey=t?"POZ":"OOZ"}purpz(){this.iAttack=this.boof135,this.oozer(!0)}nooze(){this.iAttack=this.boof4711,this.oozer(!1)}cooze(){this.iAttack=1,this.oozer(!1),this.hints=["RT"]}minion(){this.iAttack=K.minionBuff(this.level),this.plont(),this.name=K.minionName(this.level),this.hints=["RT"]}static tffc(t){return "TFF"+t}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.iHealth=this.iAttack,this.tribe.push("PL")}fixedSapling(t){this.iAttack=t,this.plont(),this.name=K.minionName(2),this.imgKey="SPL"}fixedSeedling(t){this.iAttack=t,this.plont(),this.name=K.minionName(1),this.imgKey="SDL",this.hints=["RT"]}fixedTreefolk(t){this.iAttack=t,this.plont(),this.name=K.minionName(3),this.imgKey="TFK"}tfFight(){this.iAttack=this.boof91421,this.plont(),this.name=K.minionName(3),this.imgKey="TFK"}static bee(t){return "KBE"+t}dfmimic(){this.faction="U",this.name="Darkforged Mimic",this.tribe.push("DF","PL"),this.iHealth=this.boof3711,this.iAttack=this.iHealth-1,this.imgKey="SSP"+this.level}dozer(){this.faction="U",this.name="Dozer, the Awakened",this.iAttack=this.level*3+6,this.iHealth=this.iAttack,this.iAggro=!0,this.iBT=!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.iAttack=9,this.iHealth=9,this.iMobile=1,this.tribe.push("DG")}funguy(){this.name="Funguy",this.iAttack=this.lValN([6,12,14]),this.plont(),this.minLevel=1,this.maxLevel=3,this.level===1?this.hints=["ZZ-1"]:this.level===2&&(this.hints=["LB"])}raptor(){this.faction="U",this.name="Raptor",this.iAttack=1,this.iHealth=1,this.tribe.push("DN"),this.hints=["RT"]}uspirit(){this.faction="U",this.name="Spirit",this.iAttack=this.boof4610,this.iHealth=this.lValN([3,4,6]),this.tribe.push("ST")}woof(){this.faction="U",this.name="Ether Wolf",this.tribe.push("ST","WF"),this.iHealth=5,this.iAttack=6,this.imgKey="EWV"}static zomc(t){return "ZMB"+t}zimus(){this.faction="N",this.name="Zimus, the Returned",this.tribe.push("ZB"),this.iAttack=10,this.iHealth=5,this.imgKey=`${"ZTU"}2`}zomb(t,i){this.faction="N",this.name="Zombie",this.tribe.push("ZB"),this.iAttack=t,this.iHealth=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)}hulk(){this.faction="T",this.name="Frost Hulk",this.iAttack=9,this.iHealth=9,this.tribe.push("IC","EL")}}class ct extends vt{cons(t){({["AGP"]:()=>this.apulseC(),["ABE"]:()=>this.edicC(),["CTL"]:()=>this.ctlC(),["CCC"]:()=>this.ccalC(),["COD"]:()=>this.chontC(),["CEX"]:()=>this.cypeC(),["DCR"]:()=>this.dcurC(),["DFS"]:()=>this.defsC(),["DGZ"]:()=>this.digiC(),["EPD"]:()=>this.epiC(),["EWV"]:()=>this.ewolC(),["FRR"]:()=>this.roarC(),["FSM"]:()=>this.fstormC(),["GRM"]:()=>this.mealC(),["IBF"]:()=>this.ibfC(),["IVS"]:()=>this.infvC(),["LOD"]:()=>this.lashC(),["NSH"]:()=>this.shriekC(),["NCL"]:()=>this.noxC(),["OWF"]:()=>this.oforceC(),["PLW"]:()=>this.palwC(),["PHC"]:()=>this.pcallC(),["PTB"]:()=>this.phyC(),["PYS"]:()=>this.pyreC(),["ROK"]:()=>this.rokC(),["ROU"]:()=>this.riteC(),["ROE"]:()=>this.roteC(),["STS"]:()=>this.stsC(),["SNP"]:()=>this.pulseC(),["SRD"]:()=>this.sradC(),["SIV"]:()=>this.beesC(),["TST"]:()=>this.talinC(),["TRN"]:()=>this.turnbC(),["VCH"]:()=>this.verdC(),["WOD"]:()=>this.wdenC(),["WPC"]:()=>this.wipeC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;z;image(t){const i=this.cardCode();return i==="NSH"||i==="PHC"?this.leveledImage(t):this.fixedImage(t)}canPlay(){return this.t()}playTargets(){return[w.boardTarget("CARD",this.code)]}handleAction(t){this.logSpell(),this.z(),T.spellCast()}acT(){return p.qActiveCreats().length>0}aoT(){return p.qActiveCreats().length<10}ecT(){return p.qEnemyCreats().length>0}fcT(){return p.ddf1().length>0}foT(){return p.ddf1().length<5}tpytar(){const t=b.crFriendTarg();return t.faction="T",p.creatByTarget(t)}apulseC(){this.faction="A",this.rarity="C",this.name="Aegis Pulse",this.text=`Each friendly creature gets Armor ${this.boof234}.`,this.t=this.fcT,this.z=this.apulseZ}apulseZ(){const t=this.boof234;p.ddf1().forEach(i=>{i.addArmor(t)})}aeSides(){return[p.qPlayerCreats(!0),p.qPlayerCreats(!1)]}edicC(){this.faction="A",this.rarity="H",this.name="Ambriel's Edict",this.maxLevel=1,this.overload=!0,this.text="If each player has at least one creature in play, destroy all but the highest attack creature that each player controls.~Then discard you hand.",this.t=this.edicT,this.z=this.edicZ}edicT(){return this.aeSides().every(t=>t.length>0)}edicZ(){const t=this.aeSides(),i=E.tick();let r=[];t.forEach(m=>{if(m.length>1){let C=[],D=-999999;m.forEach(B=>{B.attack>D?(D=B.attack,r.push(...C),C=[B]):B.attack===D?C.push(B):r.push(B)}),C.length>1&&(C.splice(S.randInt(0,C.length),1),r.push(...C))}}),r.forEach(m=>this.kill(m,i));const n=k.getActive(),c=T.playPosition(),f=n.hand.length;for(let m=f-1;m>-1;m--)m!==c&&(Dt.cardDiscard(n,m),T.shiftPlayCard(m))}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 ${y.jr9(this.ctlboof,0)} this turn. Those creatures`:"";this.text=`Each friendly creature${t} battles an additional time this turn.`,this.t=this.fcT,this.z=this.ctlZ}ctlZ(){const t=this.ctlboof;p.ddf1().forEach(i=>{this.modA(i,b.modT("AT",t)),this.wrang(i)})}ccalC(){this.faction="N",this.rarity="H",this.name="Cercee's Call",this.maxLevel=2,this.free=this.level===2,this.text="Spawn a copy of a friendly Zombie that was destroyed this turn.",this.t=this.ccalT,this.z=this.ccalZ}ccalZ(){const t=this.ccz(),i=t.length;i>0&&this.spawn(t[S.randInt(0,i)],k.activeA)}ccalT(){return this.ccz().length>0}ccz(){return(k.activeA?L.deathsA:L.deathsB).filter(i=>{const r=W.getCard(i);return r.type==="C"&&r.isTribe("ZB")})}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.",this.t=this.ecT,this.z=this.chontZ}chontZ(){const t=k.getActive().rank,i=E.tick();p.qEnemyCreats().forEach(r=>{this.smack(r,t,i)})}get cyb(){return this.lValN([5,6,10])}cypeC(){this.faction="A",this.rarity="H",this.name="Cypien Experimentation";const t=this.cyb;this.text=`Give a random friendly creature ${y.jr9(t,0)}. Give a random friendly creature Armor ${t}`,this.t=this.fcT,this.z=this.cypeZ}cypeZ(){const t=p.ddf1(),i=t.length;if(i>0){const r=this.cyb,n=t[S.randInt(0,i)],c=t[S.randInt(0,i)];this.logAct(!1,n,c),this.buffA(n,r),c.addArmor(r)}}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.`,this.t=this.dcurT,this.z=this.dcurZ}dcurZ(){const t=this.dctargs(),i=t.length;if(i>0){const r=S.randInt(0,i),n=E.tick();this.kill(t[r],n),this.level===3&&i>1&&(t.splice(r,1),this.kill(t[S.randInt(0,i-1)],n))}}dcurT(){return this.dctargs().length>0}dctargs(){const t=b.crEnemyTarg();return t.level=w.ddf2(this.level+1),p.creatByTarget(t)}defsC(){this.faction="A",this.rarity="C",this.name="Defense Spire",this.overload=!0,this.maxLevel=1,this.text="Each friendly creature gets Armor 6 this turn.",this.t=this.fcT,this.z=this.defsZ}defsZ(){p.ddf1().forEach(t=>{this.modA(t,b.modT("AR",6))})}digiC(){this.faction="A",this.rarity="R",this.name="Digitize",this.text=`Each enemy creature gets ${y.jr9(this.boof4812n,0)} this turn.`,this.t=this.ecT,this.z=this.digiZ}digiZ(){const t=this.boof4812n;p.qEnemyCreats().forEach(i=>{this.modA(i,b.modT("AT",t))})}epiC(){this.faction="N",this.rarity="H",this.name="Epidemic";const t=this.boof246n;this.text=`Each enemy creature gets ${y.jr9(t,t)}.`,this.t=this.ecT,this.z=this.epiZ}epiZ(){const t=this.boof246n,i=b.crEnemyTarg();p.creatByTarget(i).forEach(r=>{this.buffD(r,t)})}ewolC(){this.faction="U",this.rarity="C",this.name="Ether Wolves",this.maxLevel=1,this.overload=!0,this.hints=["ZZ-3"],this.text="Spawn two Ether Wolves.",this.t=this.foT,this.z=this.ewolZ}ewolZ(){const t=E.tick(),i="EWF"+"1",r=k.activeA;this.spawn(i,r,t),this.spawn(i,r,t)}roarC(){this.faction="U",this.rarity="H",this.name="Ferocious Roar";const t=this.boof235;this.text=`Each friendly creature gets ${y.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`,this.t=this.fcT,this.z=this.roarZ}roarZ(){const t=this.boof235;p.ddf1().forEach(i=>{this.buffD(i,t),this.level===3&&(i.breakthrough=!0)})}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.`,this.t=this.acT,this.z=this.fstormZ}fstormZ(){const t=this.fszap,i=E.tick();p.qActiveCreats().forEach(r=>{this.smack(r,t,i)})}mealC(){this.faction="N",this.rarity="R",this.name="Group Meal";const t=this.boof234;this.text=`Each enemy creature gets ${y.jr9(-1*t,0)}. Each friendly creature gets ${y.jr9(t,0)}.`,this.t=this.acT,this.z=this.mealZ}mealZ(){const t=this.boof234,i=k.activeA;p.qActiveCreats().forEach(r=>{const n=r.owner===i?t:-1*t;this.buffA(r,n)})}ibfC(){this.faction="T",this.rarity="R",this.name="Iceborn Fortitude",this.text=`Each friendly creature gets ${y.jr9(0,this.boof3510)}.`,this.t=this.fcT,this.z=this.ibfZ}ibfZ(){const t=this.boof3510,i=b.crFriendTarg();p.creatByTarget(i).forEach(r=>{this.buffH(r,t)})}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 ${y.jr9(t,t,!0)} and Regenerate ${this.level}.`,this.t=this.infvT,this.z=this.infvZ}infvZ(){const t=this.boof246;this.ivt().forEach(i=>{this.buffD(i,t),this.regn(i,this.level)})}infvT(){return this.ivt().length>0}ivt(){const t=b.crFriendTarg();return t.lanes=[1,5],p.creatByTarget(t)}lashC(){this.faction="U",this.rarity="L",this.name="Lash of Demara",this.text=`Each enemy creature gets Poison ${this.level+2}.`,this.t=this.ecT,this.z=this.lashZ}lashZ(){const t=this.level+2;p.qEnemyCreats().forEach(i=>{i.addPoison(t)})}shriekC(){this.faction="N",this.rarity="L",this.name="Nethershriek";const t=W.getCard(this.ndc());this.text=`Spawn a ${y.tokName(t)}.`,this.t=this.foT,this.z=this.shriekZ}shriekZ(){this.spawn(this.ndc(),k.activeA)}ndc(){return "NDR"+this.level}noxC(){this.faction="U",this.rarity="R",this.name="Noxious Cloud",this.text=`Each enemy creature gets Poison ${this.boof246}.`,this.t=this.ecT,this.z=this.noxZ}noxZ(){const t=this.boof246;p.qEnemyCreats().forEach(i=>{i.addPoison(t)})}oforceC(){this.faction="A",this.rarity="H",this.name="Overwhelming Force",this.text="Each friendly creature gets "+(this.level===3?"2x attack.":`${y.jr9(this.boof369,0)}.`),this.t=this.fcT,this.z=this.oforceZ}oforceZ(){if(this.level===3)p.ddf1().forEach(t=>{this.buffA(t,t.attack)});else{const t=this.boof369;p.ddf1().forEach(i=>{this.buffA(i,t)})}}palwC(){this.faction="A",this.rarity="R",this.name="Palladium Wave",this.maxLevel=1,this.text=`Each enemy creature gets ${y.jr9(-1,0).replaceAll("1","X")}, where X is two times your rank.`,this.t=this.ecT,this.z=this.palwZ}palwZ(){const t=-2*k.getActive().rank;p.qEnemyCreats().forEach(i=>{this.buffA(i,t)})}pcallC(){this.faction="T",this.rarity="L",this.name="Phoenix Call";const t=W.getCard(this.cpc());this.text=`Spawn a ${y.tokName(t)}.`,this.t=this.foT,this.z=this.pcallZ}pcallZ(){this.spawn(this.cpc(),k.activeA)}cpc(){return "CYP"+this.level}phyC(){this.faction="U",this.rarity="H",this.name="Phytobomb";const t=W.getCard(K.minionCode(this.level));this.text=`Put a ${y.tokName(t)} into each players available lanes.`,this.t=this.aoT,this.z=this.phyZ}phyZ(){const t=K.minionCode(this.level),i=E.tick();[!0,!1].forEach(r=>{p.emptyLanes(r).forEach(n=>{this.poot(t,r,n,i)})})}pyreC(){this.faction="T",this.rarity="C",this.name="Pyre Song",this.text=`Each friendly creature deals ${this.level} damage to each enemy creature.`,this.t=this.edicT,this.z=this.pyreZ}pyreZ(){const t=this.level,i=E.tick(),r=p.qEnemyCreats();p.ddf1().forEach(n=>{r.forEach(c=>{this.smack(c,t,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.",this.t=this.talinT,this.z=this.rokZ}rokZ(){const t=E.tick();this.tpytar().forEach(i=>{this.buffA(i,1);const r=i.opposed;r&&r.hurtDirect(i.attack,i.code,this.faction,t)})}riteC(){this.faction="N",this.rarity="C",this.name="Rite of Undeath",this.text=`Each friendly creature gets Regenerate ${this.boof468}.`,this.t=this.fcT,this.z=this.riteZ}riteZ(){const t=this.boof468;p.ddf1().forEach(i=>{this.regn(i,t)})}roteC(){this.faction="T",this.rarity="H",this.name="Ritual of the Elements",this.maxLevel=1,this.hints=["ZZ-1"],this.text="Spawn a Lava Golem, Frost Hulk, or Lightning Titan at random.",this.t=this.foT,this.z=this.roteZ}roteZ(){const t=["FRH"+"1","LVG"+"1","LTT"+"1"];this.spawn(t[S.randInt(0,3)],k.activeA)}stsC(){this.faction="U",this.rarity="C",this.name="Scatter the Seeds";const t=W.getCard(K.minionCode(this.level));this.text=`Spawn three ${y.tokName(t)}s.`,this.t=this.foT,this.z=this.stsZ}stsZ(){const t=K.minionCode(this.level),i=E.tick();[1,2,3].forEach(r=>{this.spawn(t,k.activeA,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 ${y.jr9(this.spboof,0)}.`,this.t=this.ecT,this.z=this.pulseZ}pulseZ(){const t=this.spboof;p.qEnemyCreats().forEach(i=>{this.buffA(i,t)})}sradC(){this.faction="U",this.rarity="C",this.name="Soothing Radiance",this.text=`Heal ${this.boof61224} damage from each friendly creature.`,this.t=this.fcT,this.z=this.sradZ}sradZ(){const t=this.boof61224;p.ddf1().forEach(i=>{i.heal(t)})}beesC(){this.faction="U",this.rarity="H",this.name="Stinging Invocation";const t=W.getCard(K.bee(this.level));this.text=`Spawn one to three ${y.tokName(t)}s.`,this.t=this.foT,this.z=this.beesZ}beesZ(){const t=K.bee(this.level),i=E.tick(),r=S.randInt(2,5);[1,2,3].every(n=>n{this.modA(i,b.modT("AT",t))})}talinT(){return this.tpytar().length>0}turnbC(){this.faction="T",this.rarity="H",this.name="Turnabout",this.free=this.level===3;const t=this.boof235;this.text=`Each creature gets ${y.jr9(t,-1*t)} this turn.`,this.t=this.acT,this.z=this.turnbZ}turnbZ(){const t=this.boof235,i=-1*t;p.qActiveCreats().forEach(r=>{this.modA(r,b.modT("AT",t)),this.modA(r,b.modT("HL",i)),this.modA(r,b.modT("MH",i))})}verdC(){this.faction="U",this.rarity="H",this.name="Verdant Charge";const t=this.verdb;this.text=`Each friendly creature gets ${y.jr9(t,t,!0)} and Regenerate ${t}.`,this.t=this.fcT,this.z=this.verdZ}verdZ(){const t=this.verdb;p.ddf1().forEach(i=>{this.buffD(i,t),this.regn(i,t)})}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 ${y.jr9(1,1).replaceAll("1","X")}, where X is your rank.`,this.t=this.fcT,this.z=this.wdenZ}wdenZ(){const t=k.getActive().rank;p.ddf1().forEach(i=>{this.buffD(i,t)})}wipeC(){this.faction="A",this.rarity="H",this.name="Wipe Clean",this.overload=!0,this.maxLevel=1,this.text="Remove all abilities from each creature and player.",this.t=()=>!0,this.z=this.wipeZ}wipeZ(){[!0,!1].forEach(i=>{const r=k.toPlayer(i);r.effects=[],r.mods=[],r.triggers=r.triggers.filter(n=>n.customCode==="AB"||n.type==="NT"),r.poison=0,r.armor=0});const t=p.qActiveCreats();t.forEach(i=>{i.preWipe()}),t.forEach(i=>{i.wipeAll()})}}class Dr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Borean Mystic",this.iAttack=this.boof4814,this.iHealth=this.boof71118,this.tribe.push("WN","AS"),this.text=`Activate: Move another friendly creature to an available lane adjacent to ${this.name}.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW")}canActivate(t){return this.emptySloots(t).length>0&&this.buddies(t.id).length>0}startActivation(t){const i=this.buddies(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[2]);this.logAct(!0,r),this.lurk(r,t.lane),p.jr5(i[1]).endActivation()}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",t.id,i))}buddies(t){return w.toActions(b.crFriendNotMeActTarg("CARD",t,this.code,S.enTil("P1",t)))}}class xr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Bron, Wild Tamer",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("TK"),this.hints=["RD"];const i=this.boof357;this.text=`Upgrade Dinosaur: Replace Bron with a level ${this.level} Dino Knight.~When this ${y.dbdtap()}, heal ${i} damage from each other friendly creature.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("UP");const n=r.jr4("DM");return n.bonus=this.buffNug(0,this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="UP"){const r=I.toReplaced(t.event).replCreat;r.isTribe("DN")&&this.replc("DNK"+this.level,r.owner,r.lane)}else if(t.trigger.type==="DM"){const i=this.boof357,r=b.crNotMeTarg(t.creatId);r.player=k.toTarget(t.owner),p.creatByTarget(r).forEach(c=>c.heal(i))}x.triggerDone()}}class Br extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Brightsteel Gargoyle",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.iMobile=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 r=super.jr3(t,i);return r.jr4("PT"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);this.modA(i,b.modT("AR",this.boof2510)),this.modA(i,b.modT("DF",!0)),x.triggerDone()}}class Hr extends vt{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Bulwark Bash",this.text=`Deal damage equal to ${this.level>1?this.level+"x ":""}the Armor on a friendly creature to an enemy creature.`}firstT(){if(this.enemyTargActions().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.hasArmor=!0,t}else return}playTargets(){return[this.firstT()]}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.enemyTargActions(p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logSpell(r),this.smack(p.ddf6(t),r.armor*this.level),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class Nr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Byzerak Spitemage",this.iAttack=this.boof369,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("HM"),this.text=`Allied Nekrium: When ${this.name} ${y.dbdtac(this.level)}, destroy it.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&i.isCreatSrc&&i.isCreatTarg&&i.srcId===t.creatId&&w.levelTestCommon(i.hurtCreat.level,this.level)}jr8(t){if(t.trigger.type==="FR"&&L.allied("N")){const i=p.creatByTr(t),r=i.jr4("DM");r.bonus=this.avgSpawnNug(),i.changed=!0,i.anim8("N")}else if(t.trigger.type==="DM"){const r=I.toDamage(t.event).hurtCreat;r.status==="A"&&Bt.destroy(r,this.code,"N")}x.triggerDone()}}class Fr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Cercee, Hand of Varna",this.iAttack=this.lValN([1,3,5,7]),this.iHealth=this.lValN([6,10,20,40]),this.tribe.push("FB"),this.hints=["ZZ-2"],this.iMobile=1,this.maxLevel=4;const i=this.level===4?`When ${this.name} ${y.dbdtap()}, deal damamge to that player equal to their health.~`:"";this.text=i+`When ${this.name} ${y.dbdtac(this.level)}, destroy that creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return this.level===4?n.bonus=this.rawNug(0,0,0,0,5,"TP"):n.bonus=this.avgSpawnNug(),r}ddf8(t){const i=I.toDamage(t.event);if(i.battle&&i.isCreatSrc&&i.srcId===t.creatId){if(this.level===4)return!0;if(i.isCreatTarg){const r=i.hurtCreat;return w.levelTestCommon(r.level,this.level)}}return!1}jr8(t){const i=I.toDamage(t.event);if(i.isCreatTarg){const r=i.hurtCreat;r.status==="A"&&this.kill(r)}else this.ouch(i.hurtPlayer,i.hurtPlayer.health),this.anim8(i.srcCreat);x.triggerDone()}}class ve extends vt{cons(t){({["ABL"]:()=>this.ablC(),["DYB"]:()=>this.drybC(),["FVA"]:()=>this.fervassC(),["ROG"]:()=>this.rotgC(),["SPG"]:()=>this.spgrC(),["TOB"]:()=>this.blightC(),["ULG"]:()=>this.ulegC(),["VOB"]:()=>this.vobC(),["WGE"]:()=>this.weguC()})[t]()}playTarg;xl=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode())}z;canPlay(){return p.creatByTarget(this.playTarg).length>0}playTargets(){return[this.playTarg]}handleAction(t){const i=p.ddf6(t);this.logSpell(this.xl?i:void 0),this.z(i),T.spellCast()}ddf8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="TOB"&&t.trigger.type==="DM"){const r=I.toDamage(t.event);if(r.battle&&r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId)return this.level===3?!0:W.getCard(r.hurtCreat.code).level<=this.level}else if((i==="ABL"||i==="VOB"||i==="WGE")&&t.trigger.type==="DM"){const r=t.event;return r.battle&&!r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId}else if(i==="DYB"&&t.trigger.type==="EF"){const r=I.toEnterField(t.event);return t.trigger.creatId!==r.creature.id&&r.creature.owner===t.owner}else{if(i==="SPG"&&t.trigger.type==="TS")return t.event.playerA===t.owner;if(i==="ROG"&&t.trigger.type==="DS"||i==="WGE"&&t.trigger.type==="PT"||i==="ULG"&&t.trigger.type==="VN"||i==="FVA"&&t.trigger.type==="FK")return!0}return!1}jr8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="TOB"){const r=t.event,n=p.jr5(r.target);n.status==="A"&&this.kill(n)}else if(i==="FVA"){const r=p.creatByTr(t),n=p.searchByLane(p.oppositeLane(r.lane),!r.owner);n&&n.hurtDirect(this.boof3612,r.code,this.faction)}else if(i==="ROG"||i==="DYB"||i==="ABL"){const r=p.creatByTr(t);r.status==="A"&&(this.logAct(!1,r),r.buff(this.level,this.level,t.draw?this.faction:"X"))}else if(i==="VOB"){const r=I.toDamage(t.event);this.smack(r.srcCreat,r.dmg)}else if(i==="SPG"){const r=p.creatByTr(t);this.logAct(!1,r),this.buffD(r,this.boof246)}else if(i==="WGE"){if(t.trigger.type==="DM")this.balm(t.owner,t.event.dmg);else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="ULG"){const r=this.spawn(p.creatByTr(t).code,t.owner);r&&this.logAct(!1,r)}else super.jr8(t);x.triggerDone()}ablC(){this.faction="T",this.rarity="R",this.name="Asir's Blessing",this.text=`Give a creature "When this creature ${y.dbdtap()}, it gets ${y.jr9(this.level,this.level)}."`,this.playTarg.hint=["BF"],this.z=this.ablZ}ablZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.buffNug(this.level,this.level,"TP"),this.anim8(t)}drybC(){this.faction="U",this.rarity="R",this.name="Dryad's Boon",this.text=`Give a creature ${y.jr9(this.level,this.level,!0)}, and "When another friendly creature enters play, this gets ${y.jr9(this.level,this.level)}."`,this.playTarg.hint=["BF"],this.z=this.drybZ}drybZ(t){this.buffD(t,this.level),t.changed=!0;const i=t.jr4("EF",this.code);i.bonus=this.buffNug(this.level,this.level,"TS"),i.batch=!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.`,this.z=this.fervassZ}fervassZ(t){t.changed=!0,this.wings(t,this.level);const i=t.jr4("FK",this.code);i.bonus=this.buffNug(this.boof3612,0)}rotgC(){this.faction="N",this.rarity="H",this.name="Rite of the Grimgaunt",this.playTarg.hint=["BF"],this.text=`Give a creature "When a creature is destroyed, this gets ${y.jr9(this.level,this.level)}."`,this.z=this.rotgZ}rotgZ(t){t.changed=!0;const i=t.jr4("DS",this.code);i.bonus=this.buffNug(this.level,this.level,"TS"),this.anim8(t)}spgrC(){this.faction="U",this.rarity="R",this.name="Shardplate Graft";const t=this.boof246;this.text=`Give a creature ${y.jr9(t,t,!0)}, and "At the start of your turn, this gets ${y.jr9(t,t)}."`,this.playTarg.hint=["BF"],this.z=this.spgrZ}spgrZ(t){const i=this.boof246;this.buffD(t,i),t.changed=!0;const r=t.jr4("TS",this.code);r.bonus=this.buffNug(i,i,"TS")}blightC(){this.faction="N",this.rarity="R",this.name="Touch Of Blight",this.text=`Give a creature "When this creature ${y.dbdtac(this.level)}, destroy that creature."`,this.playTarg.hint=["BF"],this.level<3&&(this.hints=["LG"]),this.z=this.blightZ}blightZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.avgSpawnNug(),this.anim8(t)}ulegC(){this.faction="N",this.rarity="H",this.name="Undying Legacy",this.text='Give a friendly creature "Vengeace: Spawn a copy of this."',this.playTarg.player="F",this.maxLevel=1,this.overload=!0,this.z=this.ulegZ}ulegZ(t){t.changed=!0;const i=t.jr4("VN",this.code),r=W.getCard(t.code);t.hints.push("ST"),i.bonus=this.spawnNug(r),this.anim8(t)}vobC(){this.faction="T",this.rarity="R",this.name="Violent Outburst",this.level===3?this.free=!0:this.hints=["LG"],this.text=`Give a ${y.levelGateText(this.level+1)}creature Aggressive and, "When this creature ${y.dbdtap()}, it also deals that much damage to itself."`,this.z=this.vobZ}vobZ(t){t.aggressive=!0;const i=t.jr4("DM",this.code);i.changes=!0,this.anim8(t)}weguC(){this.faction="U",this.rarity="H",this.name="Wegu's Embrace";const t=this.boof3510;this.text=`Give a friendly creature ${y.jr9(t,t)}, and "When this deals ${y.dbdtap()} this turn, you gain that much health."`,this.playTarg.player="F",this.z=this.weguZ}weguZ(t){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i;const n=t.jr4("PT",this.code);n.customCode=i,this.buffD(t,this.boof3510)}}class Tt extends P{cons(t){({["ASQ"]:()=>this.asqC(),["BSW"]:()=>this.bswC(),["CCS"]:()=>this.ccsC(),["CGL"]:()=>this.clordC(),["CSH"]:()=>this.cswC(),["FFU"]:()=>this.ffuC(),["FFS"]:()=>this.ffsC(),["FSH"]:()=>this.fssC(),["KOD"]:()=>this.kodC(),["LOD"]:()=>this.lashC(),["MBP"]:()=>this.mbpC(),["MND"]:()=>this.mndC(),["NCS"]:()=>this.ncsC(),["NFF"]:()=>this.nffC(),["OHV"]:()=>this.orghC(),["PPM"]:()=>this.ppmC(),["PSC"]:()=>this.pcoilC(),["SGF"]:()=>this.siggyC(),["SRM"]:()=>this.srmdC(),["SFG"]:()=>this.sfgdC(),["SSA"]:()=>this.ssaC(),["SWM"]:()=>this.swmC(),["UCM"]:()=>this.ucmC(),["UIM"]:()=>this.uimC(),["WMR"]:()=>this.warmC(),["WWR"]:()=>this.wwrC(),["WFS"]:()=>this.wfsC(),["XSH"]:()=>this.shambC(),["ZPM"]:()=>this.zpmC()})[t]()}xl=!0;constructor(t){super(t),this.cons(this.cardCode())}t;a;jr3(t,i){const r=super.jr3(t,i);return this.doubleActivator()&&(r.jr4("TS"),this.addExtraActivate(r)),r}canActivate(t){return w.toActions(this.t(t)).length>0}startActivation(t){const i=w.toActions([this.t(t),w.buttonTarget("CANC")]);T.ddf5(i)}handleAction(t){const i=p.ddf6(t),r=p.jr5(t.param);this.logAct(!0,this.xl?i:void 0),this.a(i,r),r.endActivation()}crTarg(t){return b.crActTarg("CARD",this.code,t.id)}nmCrTarg(t){const i=this.crTarg(t);return i.notMe=t.id,i}doubleActivator(){return this.code==="CGL"+"3"||this.code==="XSH"+"3"}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="KOD"&&(t.trigger.type==="PT"||t.trigger.type==="VN")?!0:t.trigger.type==="TS"&&this.doubleActivator()?t.event.playerA===t.owner:super.ddf8(t)}jr8(t){if(t.trigger.type==="VN")this.spawn(p.jr5(t.event.creatId).code,t.owner),x.triggerDone();else if(t.trigger.type==="PT"){const i=t.trigger.customCode,r=p.creatByTr(t);r.triggers.filter(c=>c.customCode===i).forEach(c=>r.removeTrigger(c)),x.triggerDone()}else t.trigger.type==="TS"&&(this.addExtraActivate(p.creatByTr(t)),x.triggerDone())}asqC(){this.faction="N",this.rarity="L",this.name="Ariadne, Spider Queen",this.iAttack=this.boof3712,this.iHealth=this.lValN([8,12,19]),this.tribe.push("SP"),this.xl=!1,this.text="Activate, destroy a Web: Ariadne gets +attack and +health equal to the destroyed Web.";const t=this.avgCreatureStats();this.bonus=this.multNug(this.buffNug(t[0],t[1],"TS"),.7),this.t=this.asqT,this.a=this.asqA}asqT(t){const i=this.crTarg(t);return i.tribe="WB",i}asqA(t,i){this.buffB(i,t.attack,t.health),this.kill(t)}bswC(){this.faction="T",this.rarity="C",this.name="Borean Stormweaver",this.iAttack=this.boof4816,this.iHealth=this.lValN([6,10,20]),this.tribe.push("GT"),this.xl=!1;const t=this.boof234;this.text=`Activate: Deal ${t} damage to a creature.`,this.bonus=this.buffNug(0,t,"TX"),this.t=this.bswT,this.a=this.bswA}bswT(t){const i=this.crTarg(t);return i.hint=["HR"],i}bswA(t,i){this.smack(t,this.boof234)}ccsC(){this.faction="N",this.rarity="C",this.name="Catacomb Spider",this.iAttack=this.boof4815,this.iHealth=this.lValN([5,10,16]),this.tribe.push("SP");const t=this.boof246;this.text=`Activate: Give another creature Regenerate ${t}.`,this.bonus=this.regnNug(t,"TW"),this.t=this.ccsT,this.a=this.ccsA}ccsT(t){const i=this.nmCrTarg(t);return i.canRegen=!0,i.hint=["BF"],i}ccsA(t,i){this.regn(t,this.boof246)}clordC(){this.faction="N",this.rarity="H",this.name="Contagion Lord",this.iAttack=this.boof4914,this.iHealth=this.iAttack+3,this.tribe.push("AB"),this.xl=!1,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."),this.bonus=this.multNug(this.avgSpawnNug(),.3),this.bonus.threat="TX",this.t=this.clordT,this.a=this.clordA}clordT(t){const i=this.crTarg(t);return i.player="F",i.tribe="AB",i}clordA(t,i){this.kill(t),L.freePlay(),this.anim8(i)}cswC(){this.faction="A",this.rarity="C",this.name="Cypien Shieldwarden",this.iAttack=this.boof4610,this.iHealth=this.boof61016,this.tribe.push("HM");const t=this.boof246;this.text=`Activate: Give a creature Armor ${t} this turn.`,this.bonus=this.regnNug(t,"TW"),this.t=this.cswT,this.a=this.cswA}cswT(t){const i=this.crTarg(t);return i.canArmor=!0,i.hint=["BF"],i}cswA(t,i){this.modA(t,b.modT("AR",this.boof246))}ffuC(){this.faction="T",this.rarity="H",this.name="Firefist Uranti",this.iAttack=this.boof357,this.iHealth=this.boof71116,this.tribe.push("FR","YT"),this.xl=!1,this.text=`Activate: Deal damage equal to ${this.name}'s attack to a creature.`,this.bonus=this.buffNug(0,this.iAttack,"TX"),this.t=this.ffuT,this.a=this.ffuA}ffuT(t){const i=this.crTarg(t);return i.hint=["HR"],t.attack<1&&(i.victims="???"),i}ffuA(t,i){this.smack(t,i.attack)}ffsC(){this.faction="T",this.rarity="R",this.name="Flamefury Shaman",this.iAttack=this.boof369,this.iHealth=this.boof81116,this.tribe.push("HM"),this.text=`Activate: Grant another creature ${y.jr9(this.iAttack,0)} this turn.`,this.bonus=this.buffNug(this.iAttack,0,"TW"),this.t=this.ffsT,this.a=this.ffsA}ffsT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}ffsA(t,i){this.modA(t,b.modT("AT",this.iAttack))}fssC(){this.faction="T",this.rarity="R",this.name="Flamestoke Shaman",this.iAttack=this.boof61218,this.iHealth=this.boof3712,this.tribe.push("HM"),this.text=`Activate: Grant an adjacent ${y.levelGateText(this.level)}creature Aggressive.`,this.bonus=this.regnNug(1,"TX"),this.t=this.fssT,this.a=this.fssA}fssT(t){const i=this.crTarg(t);return i.level=w.ddf2(this.level),i.lanes=t.adjacent,i.player="F",i}fssA(t,i){t.aggressive=!0,this.anim8(t)}kodC(){this.faction="N",this.rarity="L",this.name="Keeper of the Damned",this.iAttack=this.boof5815,this.iHealth=this.boof61017,this.tribe.push("ZB"),this.text=`Activate: another friendly ${y.levelGateText(this.level)}creature gets "Vengeance: Spawn this" this turn.`,this.bonus=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.kodT,this.a=this.kodA}kodT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.player="F",i}kodA(t,i){const r=t.jr4("VN",this.code);r.customCode=i.id,r.changes=!0;const n=t.jr4("PT",this.code);n.customCode=i.id,this.anim8(t)}lashC(){this.faction="U",this.rarity="L",this.name="Demara, Herald of Affliction",this.iAttack=14,this.iHealth=20,this.tribe.push("NG"),this.text="Activate: Give an enemy creature with Poison Defender.~Forge: Each enemy creature gets Poison 6.",this.bonus=this.rawNug(0,0,0,0,.1,"TW"),this.t=this.lashT,this.a=this.lashA}lashT(t){const i=this.crTarg(t);return i.player="E",i.hasPoison=!0,i.canDefender=!0,i}lashA(t,i){t.defender=!0,this.anim8(t)}mbpC(){this.faction="U",this.rarity="H",this.name="Mossbeard Patriarch",this.iAttack=this.boof137,this.iHealth=this.boof81220,this.tribe.push("PL");const t=this.boof468;this.text=`Activate: Give another creature ${y.jr9(0,t)}.`,this.bonus=this.buffNug(0,t,"TW"),this.t=this.mbpT,this.a=this.mbpA}mbpT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}mbpA(t,i){this.buffH(t,this.boof468)}mndC(){this.faction="A",this.rarity="R",this.name="Munitions Drone",this.iAttack=this.boof137,this.iHealth=this.boof6814,this.tribe.push("RB");const t=this.boof357;this.text=`Activate: Give another creature ${y.jr9(t,0)}.`,this.bonus=this.buffNug(t,0,"TX"),this.t=this.mndT,this.a=this.mndA}mndT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}mndA(t,i){this.buffA(t,this.boof357)}ncsC(){this.faction="N",this.rarity="R",this.name="Necroslime",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.xl=!1;const t=this.boof248;this.text=`Activate, deal 3 damage to another friendly creature: ${this.name} gets ${y.jr9(t,t)}.`,this.bonus=this.buffNug(t,t-3,"TS"),this.t=this.ncsT,this.a=this.ncsA}ncsT(t){const i=this.nmCrTarg(t);return i.player="F",i}ncsA(t,i){this.smack(t,3),this.buffD(i,this.boof248)}nffC(){this.faction="U",this.rarity="L",this.name="Nuada, Faith's Flourish",this.iAttack=this.boof246,this.iHealth=this.lValN([10,17,25]),this.iDefend=!0,this.tribe.push("TK"),this.xl=!1,this.hints=[this.lValH(["ZZ-1","ZZ-2","ZZ-2"])];const t=W.getCard(K.tffc(this.level));this.text=`Activate: Replace a friendly Plant with a ${y.tokName(t)}.`,this.bonus=this.multNug(this.spawnNug(t,"TX"),.5),this.t=this.nffT,this.a=this.nffA}nffT(t){const i=this.crTarg(t);return i.player="F",i.tribe="PL",i}nffA(t,i){this.replc(K.tffc(this.level),i.owner,t.lane)}orghC(){this.faction="N",this.rarity="R",this.name="Organ Harvester",this.iAttack=this.lValN([2,6,9]),this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.xl=!1,this.text=`Activate, destroy ${this.name}: Destroy a ${y.levelGateText(this.level)}creature.`,this.bonus=this.multNug(this.avgSpawnNug(),.4),this.bonus.threat="TX",this.t=this.orghT,this.a=this.orghA}orghT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.hint=["KL"],i}orghA(t,i){const r=E.tick();this.kill(t,r),this.kill(i,r)}ppmC(){this.faction="A",this.rarity="R",this.name="Palladium Pulsemage",this.iAttack=this.lValN([2,8,12]),this.iHealth=this.lValN([7,12,15]),this.tribe.push("HM"),this.text=`Activate: give a creature ${y.jr9(this.boof4812n,0)} this turn.`,this.bonus=this.buffNug(this.boof246,0,"TW"),this.t=this.ppmT,this.a=this.ppmA}ppmT(t){const i=this.crTarg(t);return i.hint=["DB","DF"],i}ppmA(t,i){this.modA(t,b.modT("AT",this.boof4812n))}pcoilC(){this.faction="U",this.rarity="R",this.name="Poisoncoil",this.iAttack=this.boof357,this.iHealth=this.boof71013,this.iDefend=!0,this.tribe.push("SN");const t=this.boof135;this.text=`Activate: Give another creature Poison ${t}.`,this.bonus=this.regnNug(t,"TX"),this.t=this.pcoilT,this.a=this.pcoilA}pcoilT(t){const i=this.nmCrTarg(t);return i.hint=["PN","DF"],i}pcoilA(t,i){t.addPoison(this.boof135)}siggyC(){this.faction="N",this.rarity="H",this.name="Sigmund Fraud",this.iAttack=this.boof357,this.iHealth=this.lValN([9,14,19]),this.iDefend=!0,this.tribe.push("AB"),this.xl=!1;const t=this.boof4812;this.text=`Activate, destroy another friendly creature: Deal ${t} damage to the enemy player and you gain ${t} health.`,this.bonus=this.playerNug(t,"TW"),this.t=this.siggyT,this.a=this.siggyA}siggyT(t){const i=this.nmCrTarg(t);return i.player="F",i}siggyA(t,i){this.kill(t);const r=this.boof4812;this.ouch(!i.owner,r),this.balm(i.owner,r),this.anim8(i)}srmdC(){this.faction="N",this.rarity="H",this.name="Sorrow Maiden",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.xl=!1,this.text=`Activate: Destroy an enemy creature with ${this.iAttack} or less attack.`,this.bonus=this.multNug(this.avgSpawnNug(),.4),this.bonus.threat="TX",this.t=this.srmdT,this.a=this.srmdA}srmdT(t){const i=this.crTarg(t);return i.player="E",i.maxAttack=this.iAttack,i}srmdA(t,i){this.kill(t)}sfgdC(){this.faction="A",this.rarity="L",this.name="Sparky, Forge Guard Dog",this.iAttack=this.lValN([4,10,14]),this.iHealth=this.lValN([5,11,16]),this.tribe.push("RB","GD"),this.xl=!1;const t=this.lValS(["level 2 Sparky","level 3 Sparky","25/25 Forge Guardian Omega"]);this.text=`Activate, destroy Sparky and another friendly ${this.level===3?"level 3 ":""}Sparky: Spawn a ${t}.`,this.bonus=this.playerNug(5,"TW"),this.t=this.sfgdT,this.a=this.sfgdA}sfgdT(t){const i=this.nmCrTarg(t);return i.cardCode="SFG",this.level===3&&(i.level="L3"),i}sfgdA(t,i){const r=E.tick();this.kill(t,r),this.kill(i,r);const n=this.lValS(["SFG"+"2","SFG"+"3","FGO"+"1"]);this.spawn(n,i.owner)}ssaC(){this.faction="N",this.rarity="H",this.name="Spitesower Acolyte",this.iAttack=this.boof234,this.iHealth=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 ${y.jr9(t,t)}.`,this.bonus=this.buffNug(-t,0,"TX"),this.t=this.ssaT,this.a=this.ssaA}ssaT(t){const i=this.crTarg(t);return i.hint=["DB","BB"],i}ssaA(t,i){const r=this.boof246n,n=E.tick();this.smack(i,-r,n),this.buffD(t,r,n)}swmC(){this.faction="A",this.rarity="R",this.name="Steelwelder Medic",this.iAttack=this.lValN([3,5,13]),this.iHealth=this.boof61014,this.tribe.push("HM"),this.text=`Activate: Give another creature Armor ${this.level}.`,this.bonus=this.regnNug(this.level,"TW"),this.t=this.swmT,this.a=this.swmA}swmT(t){const i=this.nmCrTarg(t);return i.canArmor=!0,i.hint=["BF","BB"],i}swmA(t,i){t.addArmor(this.level)}ucmC(){this.faction="T",this.rarity="R",this.name="Uranti Cryomancer",this.iAttack=this.boof247,this.iHealth=this.lValN([8,13,17]),this.tribe.push("IC","YT"),this.xl=!1;const t=this.boof135;this.text=`Activate: Deal ${t} damage to a creature.`,this.bonus=this.buffNug(0,t,"TW"),this.t=this.ucmT,this.a=this.ucmA}ucmT(t){const i=this.crTarg(t);return i.hint=["HR"],i}ucmA(t,i){this.smack(t,this.boof135)}uimC(){this.faction="T",this.rarity="C",this.name="Uranti Icemage",this.iAttack=this.lValN([2,5,9]),this.iHealth=this.lValN([8,13,20]),this.tribe.push("IC","YT"),this.text="Activate: Negate Defender from a creature this turn.",this.bonus=this.regnNug(1,"TW"),this.t=this.uimT,this.a=this.uimA}uimT(t){const i=this.crTarg(t);return i.hasDefender=!0,i.hint=["BB"],i}uimA(t,i){this.modA(t,b.modT("ND",!0))}warmC(){this.faction="A",this.rarity="H",this.name="War Merchant",this.iAttack=this.boof468,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("HM");const t=this.level===3?this.iAttack:0;this.text=`Activate: Give a creature in a center lane ${y.jr9(this.iAttack,t)}.`,this.bonus=this.multNug(this.buffNug(this.iAttack,t,"TX"),.5),this.t=this.warmT,this.a=this.warmA}warmT(t){const i=this.crTarg(t);return i.lanes=3,i.hint=["BF","BB"],i}warmA(t,i){this.buffB(t,this.iAttack,this.level===3?this.iAttack:0)}wwrC(){this.faction="U",this.rarity="C",this.name="Weirwood Ranger",this.iAttack=this.boof51015,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.text=`Activate: Give another creature ${y.jr9(this.level,this.level)}.`,this.bonus=this.buffNug(this.level,this.level,"TW"),this.t=this.wwrT,this.a=this.wwrA}wwrT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}wwrA(t,i){this.buffD(t,this.level)}wfsC(){this.faction="N",this.rarity="H",this.name="Witherfrost Succubus",this.iAttack=this.boof147,this.iHealth=this.boof61018,this.tribe.push("DM");const t=this.boof357;this.text=`Activate: Give a creature ${y.jr9(-t,-t)} this turn.`,this.bonus=this.buffNug(t,t,"TX"),this.t=this.wfsT,this.a=this.wfsA}wfsT(t){const i=this.crTarg(t);return i.hint=["DB","DF"],i}wfsA(t,i){const r=-this.boof357;this.modA(t,b.modT("AT",r)),this.modA(t,b.modT("HL",r)),this.modA(t,b.modT("MH",r))}shambC(){this.faction="N",this.rarity="L",this.name="Xithian Shambler",this.iAttack=this.boof369,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.xl=!1;let t="";this.level===3&&(t="~You may use this ability twice per turn."),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.bonus=this.rawNug(0,0,0,0,this.lValN([.6,1.2,2.2]),"TS"),this.t=this.shambT,this.a=this.shambA}shambT(t){const i=b.crFriendActTarg("CARD",this.code,t.id);return i.lanes=t.adjacent,i}shambA(t,i){const r=t.attack,n=t.health;this.kill(t),this.lurk(i,t.lane),this.buffB(i,r,n)}zpmC(){this.faction="T",this.rarity="R",this.name="Zephyr Mage",this.iAttack=this.boof4813,this.iHealth=this.boof61017,this.tribe.push("WN","AS"),this.text=`Activate: Give another ${y.levelGateText(this.level)}creature Mobility ${this.level}.`,this.bonus=this.regnNug(this.level,"TW"),this.t=this.zpmT,this.a=this.zpmA}zpmT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.canMove=!0,i.hint=["BF","BB"],i}zpmA(t,i){this.wings(t,this.level)}}class bi extends P{cons(t){({["CMF"]:()=>this.aconC(),["FLH"]:()=>this.flhC(),["TBB"]:()=>this.tbbC()})[t]()}playTarg;optional=!1;ftext="";constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode()),this.text="Assault: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("AS");return n.interactive=!0,r}handleAction(t){this.f(p.ddf6(t),p.jr5(t.param)),T.actionDone(!0)}jr8(t){const i=w.toActions(this.playTarg);i.length>0?(i.forEach(r=>{r.param=t.creatId}),this.optional&&i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}aconC(){this.faction="N",this.rarity="R",this.name="Calamity Fiend",this.iAttack=this.boof4814,this.iHealth=this.lValN([5,10,16]),this.tribe.push("DM");const t=-this.boof234;this.addSp("U",t),this.playTarg.player="E",this.ftext=`Give an enemy creature ${y.jr9(t,t)}.`,this.f=this.aconF}aconF(t,i){this.logAct(!1,t),this.buffD(t,-this.boof234)}flhC(){this.faction="T",this.rarity="C",this.name="Firelight Hunter",this.iAttack=this.boof468,this.iHealth=this.iAttack-2,this.tribe.push("HM"),this.playTarg.player="E",this.addSp("D",this.iAttack),this.ftext=`Deal ${this.iAttack} to an enemy creature.`,this.f=this.flhF}flhF(t,i){this.smack(t,this.iAttack)}tbbC(){this.faction="T",this.rarity="R",this.name="Totembound Berserker",this.iAttack=this.boof81318,this.iHealth=this.lValN([2,4,10]),this.tribe.push("GT"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.optional=!0,this.ftext=`You may move an enemy ${y.levelGateText(this.level)}creature to the space opposing ${this.name}.`,this.f=this.tbbF}tbbF(t,i){i.opposed||(this.logAct(!1,t),this.lurk(t,p.oppositeLane(i.lane)))}}class mt extends P{cons(t){({["ABM"]:()=>this.mawC(),["AGC"]:()=>this.aconC(),["BTI"]:()=>this.binvC(),["BSR"]:()=>this.bsrC(),["BAW"]:()=>this.bawC(),["CKB"]:()=>this.cacC(),["CHA"]:()=>this.chaC(),["CCR"]:()=>this.ccC(),["DRS"]:()=>this.drsC(),["DSE"]:()=>this.dseC(),["DSA"]:()=>this.dsaC(),["DGS"]:()=>this.drslC(),["FRI"]:()=>this.friC(),["FRV"]:()=>this.freavC(),["FLC"]:()=>this.flcC(),["GLF"]:()=>this.gfiendC(),["GRW"]:()=>this.grwC(),["GHT"]:()=>this.grhC(),["MMH"]:()=>this.houndC(),["MXW"]:()=>this.mtxC(),["NGB"]:()=>this.ngbC(),["POA"]:()=>this.poaC(),["PHS"]:()=>this.phxsC(),["RWD"]:()=>this.rotC(),["SHY"]:()=>this.schyC(),["STD"]:()=>this.stdC(),["SIX"]:()=>this.sdxC(),["SEV"]:()=>this.surzC(),["VNF"]:()=>this.vnfC(),["WBY"]:()=>this.wbyC(),["WBU"]:()=>this.wbuC(),["XDH"]:()=>this.dogsC()})[t]()}playTarg;optional=!1;notme=!1;ftext="";forges=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode()),this.forges&&(this.text="Forge: "+this.ftext),this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);if(this.forges){const n=r.jr4("FR");n.interactive=!0}return r}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="CKB"}handleAction(t){this.f(p.ddf6(t),p.jr5(t.param)),T.actionDone(!0)}jr8(t){const i=this.cardCode();if(t.trigger.type==="TS"&&i==="CKB"){this.logAct(!1),L.freePlay();const n=t.event,c=k.toPlayer(n.playerA),f=b.trigIdx(c.triggers,t.trigger);f>-1&&c.triggers.splice(f,1),x.triggerDone();return}if(i==="ABM"){const n=b.crFriendNotMeTarg(t.creatId);if(n.tribe="AB",p.creatByTarget(n).length===0){x.triggerDone();return}}if(i==="POA"&&!L.patron("A")){x.triggerDone();return}if((i==="DRS"||i==="DSE"||i==="DSA")&&this.dfbuff(t.creatId)===0){x.triggerDone();return}this.notme&&(this.playTarg.notMe=t.creatId);const r=w.toActions(this.playTarg);r.length>0?(r.forEach(n=>{n.param=t.creatId}),this.optional&&r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}dfbuff(t){const i=b.crFriendNotMeTarg(t);return i.tribe="DF",this.boof234*p.creatByTarget(i).length}mawC(){this.faction="N",this.rarity="C",this.name="Abyssal Maw",this.iAttack=this.boof4610,this.iHealth=this.iAttack,this.tribe.push("AB"),this.playTarg.player="E";const t=-this.boof359;this.ftext=`If there is another friendly Abomination, give an enemy creature ${y.jr9(t,t)}.`,this.f=this.mawF}mawF(t,i){this.logAct(!1,t),this.buffD(t,-this.boof359)}aconC(){this.faction="A",this.rarity="C",this.name="Aegis Conscript",this.iAttack=this.boof3612,this.iHealth=this.boof6915,this.tribe.push("HM"),this.playTarg.canArmor=!0,this.playTarg.player="F",this.ftext=`Give a friendly creature Armor ${this.boof124}.`,this.f=this.aconF}aconF(t,i){this.logAct(!1,t),t.addArmor(this.boof124)}binvC(){this.faction="A",this.rarity="C",this.name="Battletech Inventor",this.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("MM"),this.playTarg.player="E",this.ftext=`Give an enemy creature ${y.jr9(-this.iAttack,0)}.`,this.f=this.binvF}binvF(t,i){this.logAct(!1,t),this.buffA(t,-this.iAttack)}bsrC(){if(this.faction="N",this.rarity="R",this.name="Bonescythe Reaver",this.iAttack=this.boof5813,this.iHealth=this.boof3712,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.playTarg.level=w.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy an enemy ${y.levelGateText(t)}creature.`,this.optional=!0}else this.hints=["LG"];this.f=this.bsrF}bsrF(t,i){this.kill(t)}bawC(){this.faction="U",this.rarity="R",this.name="Brambleaxe Warrior",this.iAttack=this.boof61014,this.iHealth=this.iAttack-4,this.tribe.push("HM"),this.playTarg.hint=["BF"],this.ftext="Give a creature Breakthrough this turn.",this.f=this.bawF}bawF(t,i){this.logAct(!1,t),this.modA(t,b.modT("BT",!0))}cacC(){this.faction="N",this.rarity="H",this.name="Cacklebones",this.iAttack=this.boof5915,this.iHealth=this.iAttack-this.level,this.tribe.push("SK"),this.playTarg.level=w.ddf2(this.level),this.playTarg.player="E",this.ftext=`Destroy an enemy ${y.levelGateText(this.level)}creature. If you do, the enemy player may play an additional card next turn.`,this.optional=!0,this.f=this.cacF}cacF(t,i){this.kill(t),k.addTr(t.owner,b.trigger("TS",this.code))}chaC(){this.faction="U",this.rarity="R",this.name="Chistlehearth Archer",this.iAttack=this.boof2510,this.iHealth=this.iAttack+7,this.tribe.push("HM");const t=this.boof4816;this.playTarg.player="E",this.playTarg.hasMobility=!0,this.ftext=`Deal ${t} damage to an enemy creature with Mobility. Negate Mobility from that creature.`,this.f=this.chaF}chaF(t,i){this.smack(t,this.boof4816),t.negateMobility=!0}ccC(){this.faction="N",this.rarity="C",this.name="Corpse Crawler",this.iAttack=this.boof81220,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.hints=[this.lValH(["ZZ-1","ZZ-2","ZZ-5"])],this.playTarg.player="F",this.ftext="Destroy a friendly creature.",this.f=this.ccF}ccF(t,i){this.kill(t)}drsC(){this.faction="U",this.rarity="C",this.name="Darkroot Shambler",this.iHealth=this.lValN([2,6,7]),this.iAttack=this.iHealth*2,this.tribe.push("DF","PL"),this.level===2&&(this.hints=["LB"]),this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature ${y.jr9(0,t)} for each other friendly Darkforged.`,this.f=this.drsF}drsF(t,i){this.logAct(!1,t),this.buffH(t,this.dfbuff(i.id))}dseC(){this.faction="A",this.rarity="C",this.name="Darksteel Enforcer",this.iAttack=this.boof468,this.iHealth=this.iAttack+2,this.tribe.push("DF","RB"),this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature ${y.jr9(t,0)} for each other friendly Darkforged.`,this.f=this.dseF}dseF(t,i){this.logAct(!1,t),this.buffA(t,this.dfbuff(i.id))}dsaC(){this.faction="T",this.rarity="C",this.name="Darkstone Asir",this.iAttack=this.lValN([2,4,10]),this.iHealth=this.iAttack*2,this.tribe.push("DF","AS"),this.playTarg.player="E";const t=this.boof234;this.ftext=`Deal ${t} damage to an enemy creature for each other friendly Darkforged.`,this.f=this.dsaF}dsaF(t,i){this.smack(t,this.dfbuff(i.id))}drslC(){this.faction="U",this.rarity="H",this.name="Dragon Slayer",this.iAttack=this.boof81220,this.iHealth=this.boof4610,this.tribe.push("HM"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.playTarg.tribe="DG",this.ftext=`Destroy an enemy ${y.levelGateText(this.level)}Dragon.`,this.f=this.drslF}drslF(t,i){this.kill(t)}friC(){this.faction="T",this.rarity="C",this.name="Flamerift Instigator",this.iAttack=this.lValN([7,12,17]),this.iHealth=this.iAttack-5,this.tribe.push("GT"),this.ftext="Negate Defender from a creature.",this.f=this.friF}friF(t,i){this.logAct(!1,t),t.negDefend("T")}freavC(){if(this.faction="N",this.rarity="H",this.name="Fleshreaver",this.iAttack=this.boof6915,this.iHealth=this.boof235,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.consistent=!0,this.playTarg.level=w.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${y.levelGateText(t)}enemy creature.`,this.optional=!0}else this.hints=["LG"];this.f=this.freavF}freavF(t,i){this.kill(t)}flcC(){this.faction="A",this.rarity="L",this.name="Frontline Combatant",this.iAttack=this.boof4612,this.iHealth=this.iAttack,this.iArmor=this.iAttack,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="E",this.ftext=`You may have ${this.name} deal damage equal to its Armor to an enemy creature. If you do, that creature deals damage equal to its attack back to ${this.name}.`,this.f=this.flcF}flcF(t,i){const r=E.tick(),n=t.attack;this.smack(t,i.armor,r),i.hurtDirect(n,t.code,this.faction,r)}get fiendBof(){return this.lValN([-1,-2,-5])}gfiendC(){this.faction="N",this.rarity="C",this.name="Gloomfiend",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("AB"),this.playTarg.player="E";const t=this.fiendBof;this.ftext=`You may give an enemy creature ${y.jr9(t,t)}.`,this.optional=!0,this.f=this.gfiendF}gfiendF(t,i){this.logAct(!1,t),this.buffD(t,this.fiendBof)}grwC(){this.faction="N",this.rarity="C",this.name="Gloomreaper Witch",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("HM");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,this.f=this.grwF}grwF(t,i){this.kill(t)}grhC(){this.faction="U",this.rarity="C",this.name="Grove Huntress",this.iAttack=this.boof4711,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.playTarg.player="F";const t=this.boof135;this.ftext=`Give a friendly creature ${y.jr9(t,t)}.`,this.f=this.grhF}grhF(t,i){this.logAct(!1,t),this.buffD(t,this.boof135)}houndC(){this.faction="T",this.rarity="C",this.name="Magma Hound",this.iAttack=this.boof4813,this.iHealth=this.iAttack-1,this.tribe.push("ER","EL");const t=this.boof246;this.optional=!0,this.playTarg.player="E",this.ftext=`You may deal ${t} damage to an enemy creature.`,this.f=this.houndF}houndF(t,i){this.smack(t,this.boof246)}mtxC(){this.faction="A",this.rarity="C",this.name="Matrix Warden",this.iAttack=this.lValN([3,8,12]),this.iHealth=this.iAttack,this.tribe.push("RB");const t=this.boof3510;this.playTarg.player="F",this.ftext=`Give a friendly creature ${y.jr9(t,0)}.`,this.f=this.mtxF}mtxF(t,i){this.logAct(!1,t),this.buffA(t,this.boof3510)}ngbC(){this.faction="T",this.rarity="C",this.name="Nargath Bruiser",this.iAttack=this.boof5814,this.iHealth=this.iAttack-1,this.tribe.push("ER","AS");const t=this.boof248;this.playTarg.player="F",this.ftext=`Give a friendly creature ${y.jr9(0,t)}.`,this.f=this.ngbF}ngbF(t,i){this.logAct(!1,t),this.buffH(t,this.boof248)}poaC(){this.faction="A",this.rarity="H",this.name="Patron of Anvillon",this.iAttack=this.boof369,this.iHealth=this.boof71117,this.tribe.push("CY"),this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["BF"],this.ftext=`If you have three or more Alloyin cards in your hand, give a ${y.levelGateText(this.level)}creature 2x attack.`,this.f=this.poaF}poaF(t,i){this.logAct(!1,t),this.buffA(t,t.attack)}phxsC(){this.faction="A",this.rarity="R",this.name="Phalanx Squadron",this.iAttack=this.boof3714,this.iHealth=this.boof61117,this.tribe.push("HM"),this.playTarg.hasArmor=!0,this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature with Armor ${y.jr9(t,t)}.`,this.f=this.phxsF}phxsF(t,i){this.logAct(!1,t),this.buffD(t,this.boof234)}rotC(){this.faction="N",this.rarity="C",this.name="Rot Wanderer",this.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.playTarg.maxAttack=this.iAttack,this.playTarg.player="E",this.ftext=`Destroy an enemy creature with ${this.iAttack} or less attack.`,this.f=this.rotF}rotF(t,i){this.kill(t)}schyC(){this.faction="N",this.rarity="C",this.name="Scourge Hydra",this.iAttack=this.boof71117,this.iHealth=this.iAttack,this.tribe.push("HY"),this.playTarg.player="F",this.ftext="Deal 3 damage to a friendly creature.",this.f=this.schyF}schyF(t,i){this.smack(t,3)}stdC(){this.faction="A",this.rarity="H",this.name="Shardthief Druid",this.iAttack=this.boof5813,this.iHealth=this.boof81318,this.tribe.push("MM"),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.f=this.stdF}stdF(t,i){this.logAct(!1,t);const r=t.regen;t.negateRegen=!0,this.regn(i,r)}sdxC(){this.faction="A",this.rarity="R",this.name="Stasis Indexer",this.iAttack=this.boof369,this.iHealth=this.boof71118,this.tribe.push("MM"),this.playTarg.level=w.ddf2(this.level),this.playTarg.canDefender=!0,this.ftext=`Give a ${y.levelGateText(this.level)}creature Defender until the end of the enemy player's next turn.`,this.f=this.sdxF}sdxF(t,i){const r=b.mod("DF",!0);r.expiry="EN",this.modA(t,r)}surzC(){this.faction="N",this.rarity="L",this.name="Suruzal, Emissary of Varna",this.iAttack=this.boof4814,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="F",this.playTarg.level=w.ddf2(this.level),this.notme=!0,this.ftext=`You may destroy another friendly ${y.levelGateText(this.level)}creature. If you do, spawn a copy of it.`,this.f=this.surzF}surzF(t,i){const r=E.tick();this.kill(t,r),this.spawn(t.code,i.owner,r)}vnfC(){this.faction="U",this.rarity="R",this.name="Venomfang",this.iAttack=this.boof61014,this.iHealth=this.iAttack-2,this.tribe.push("SN");const t=this.boof246;this.playTarg.player="E",this.ftext=`Give an enemy creature Poison ${t}.`,this.f=this.vnfF}vnfF(t,i){this.logAct(!1,t),t.addPoison(this.boof246)}wbyC(){this.faction="T",this.rarity="R",this.name="Wallbreaker Yeti",this.iAttack=this.boof4712,this.iHealth=this.boof71116,this.tribe.push("ER","YT"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.playTarg.hasDefender=!0,this.ftext=`You may destroy a ${y.levelGateText(this.level)}enemy creature with Defender.`,this.optional=!0,this.f=this.wbyF}wbyF(t,i){this.kill(t)}wbuC(){this.faction="T",this.rarity="C",this.name="Warbringer Uranti",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("LT","YT");const t=this.boof4812;this.notme=!0,this.playTarg.player="F",this.addSp("A",t),this.ftext=`Give another friendly creature ${y.jr9(t,0)} this turn.`,this.f=this.wbuF}wbuF(t,i){this.logAct(!1,t),this.modA(t,b.modT("AT",this.boof4812))}dogsC(){this.faction="N",this.rarity="R",this.name="Xithian Direhound",this.iAttack=4,this.iHealth=4,this.tribe.push("AB"),this.overload=!0,this.maxLevel=1,this.optional=!0,this.playTarg.player="E",this.ftext=`You may give an enemy creature ${y.jr9(-4,-4)}.`,this.f=this.dogsF}dogsF(t,i){this.logAct(!1,t),this.buffD(t,-4)}}class $ extends vt{cons(t){({["AGW"]:()=>this.awingC(),["ASG"]:()=>this.asurgeC(),["ATZ"]:()=>this.anatC(),["AVB"]:()=>this.anvbC(),["AQE"]:()=>this.aqatC(),["AOP"]:()=>this.armoC(),["BFT"]:()=>this.bftC(),["BZH"]:()=>this.bzhC(),["BBR"]:()=>this.bbrC(),["BBD"]:()=>this.bbdC(),["BBL"]:()=>this.bblC(),["BBN"]:()=>this.bbnC(),["BTM"]:()=>this.botC(),["BLP"]:()=>this.btpC(),["CHT"]:()=>this.chatC(),["CSU"]:()=>this.csurgeC(),["CNT"]:()=>this.ctmsC(),["CTW"]:()=>this.cullC(),["CTV"]:()=>this.cultC(),["CAG"]:()=>this.cypaC(),["CBS"]:()=>this.cypbC(),["DPO"]:()=>this.dpsC(),["DDF"]:()=>this.dendC(),["DBT"]:()=>this.dreadC(),["DYF"]:()=>this.dyinC(),["ETN"]:()=>this.elnC(),["ENP"]:()=>this.enpC(),["ENR"]:()=>this.rageC(),["EFA"]:()=>this.efauC(),["EXD"]:()=>this.expdmC(),["FIN"]:()=>this.feralC(),["FOR"]:()=>this.fitrC(),["FJT"]:()=>this.fjetC(),["FLN"]:()=>this.flncC(),["FFL"]:()=>this.ffldC(),["FZS"]:()=>this.frozC(),["GTH"]:()=>this.ghastC(),["GCR"]:()=>this.crushC(),["HAR"]:()=>this.hartC(),["IFR"]:()=>this.izftC(),["JPK"]:()=>this.jpC(),["LBR"]:()=>this.lbrandC(),["LYS"]:()=>this.shartC(),["MMY"]:()=>this.maggyC(),["MPH"]:()=>this.morphC(),["MSC"]:()=>this.sculptC(),["NNS"]:()=>this.nanoC(),["NSL"]:()=>this.natselC(),["NCF"]:()=>this.nflayC(),["NCV"]:()=>this.nviveC(),["NDY"]:()=>this.ntdcC(),["OEX"]:()=>this.oexpC(),["OSS"]:()=>this.orssC(),["PTR"]:()=>this.pwtorC(),["PSG"]:()=>this.psurgeC(),["PMS"]:()=>this.pslamC(),["PMP"]:()=>this.pummC(),["RPR"]:()=>this.rpsC(),["SAP"]:()=>this.sapC(),["SVO"]:()=>this.soathC(),["SOC"]:()=>this.scythC(),["SOA"]:()=>this.soaC(),["SOD"]:()=>this.sodC(),["SOT"]:()=>this.sotC(),["SHG"]:()=>this.shgrC(),["SNB"]:()=>this.snbC(),["SHV"]:()=>this.sharvC(),["SRP"]:()=>this.sreapC(),["STR"]:()=>this.sttorC(),["STO"]:()=>this.sptorC(),["SOV"]:()=>this.sovC(),["STN"]:()=>this.stbrnC(),["STP"]:()=>this.ssperC(),["SIN"]:()=>this.sinC(),["TGL"]:()=>this.tanglC(),["TPT"]:()=>this.tpactC(),["TUP"]:()=>this.tugC(),["TOT"]:()=>this.totsC(),["TXB"]:()=>this.txbnC(),["TXS"]:()=>this.sporeC(),["TCG"]:()=>this.tremcC(),["URS"]:()=>this.urstC(),["VSK"]:()=>this.vensC(),["VGR"]:()=>this.vgraC(),["VSP"]:()=>this.vrdsC(),["VTR"]:()=>this.vrshC(),["VGL"]:()=>this.vglchC(),["VYE"]:()=>this.vembC(),["UBL"]:()=>this.uboltC(),["WMM"]:()=>this.warC(),["XRW"]:()=>this.xwillC()})[t]()}playTarg;xl=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode())}z;canPlay(){const t=this.cardCode();if(t==="NSL"&&p.ddf1().length<5)return!1;const i=t==="FOR"?this.fitTarg():this.playTarg;return p.creatByTarget(i).length>0}playTargets(){return this.cardCode()==="FOR"?[this.fitTarg()]:[this.playTarg]}handleAction(t){const i=p.ddf6(t);this.logSpell(this.xl?i:void 0),this.z(i),T.spellCast()}ddf8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="OEX"&&t.trigger.type==="DM"){const r=t.event;return r.battle&&!r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId}else if((i==="FZS"||i==="IFR")&&t.trigger.type==="DM"){const r=t.event;if(r.isCreatTarg&&r.target===t.creatId)return!0}else if(i==="NDY"&&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=Wt.extractCardCode(t.trigger.logicCode);if(i==="FZS"||i==="IFR"&&t.trigger.type==="DM"){const r=p.creatByTr(t);r.status==="A"&&this.kill(r)}else if(i==="SHG"){if(t.trigger.type==="VN")this.spawn(p.jr5(t.event.creatId).code,t.owner);else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="IFR"&&t.trigger.type==="PT"){const r=S.deTil(t.trigger.customCode),n=r[1],c=p.creatByTr(t);if(r[0]==="P2"){const f=b.trigIdx(c.triggers,t.trigger);c.triggers[f].customCode=S.enTil("P1",n)}else{const f=c.triggers.find(m=>m.customCode===n);f&&c.removeTrigger(f),c.removeTrigger(t.trigger)}}else if(i==="OEX"){if(t.trigger.type==="DM"){const r=t.event,n=p.qEnemyCreats(),c=n.length,f=E.tick();let m;c>0&&(this.level===1?m=[n[S.randInt(0,c)]]:this.level===2?(m=n.splice(S.randInt(0,c),1),n.length>0&&m.push(n[S.randInt(0,c-1)])):m=n,m.forEach(C=>C.hurtDirect(r.dmg,this.code,"T",f)))}else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="NDY"){const r=p.creatByTr(t);r.status==="A"&&(this.logAct(!1,r),this.buffD(r,this.ndcbuf))}else super.jr8(t);x.triggerDone()}rankT(){return`If you are rank ${this.level+1} or higher`}icaf(t){return`. If that creature is ${y.factionText(t)}, `}formFun(t){if(!(t.lane===1||t.lane===5)){const i=b.crTarg();i.player=k.toTarget(t.owner),i.lanes=t.adjacent;const r=p.creatByTarget(i);if(r.length===2)return r}return[]}awingC(){this.faction="A",this.rarity="R",this.name="Aegis Wings",this.text=`Give a creature ${y.jr9(this.boof369,0)}. Then if that creature has the highest attack, it also gets Mobility 1 and Armor ${this.boof246}.`,this.playTarg.hint=["BF"],this.z=this.awingZ}awingZ(t){this.buffA(t,this.boof369);const i=t.attack;p.qActiveCreats().every(r=>r.attack<=i)&&(this.wings(t,1),t.addArmor(this.boof246))}asurgeC(){this.faction="T",this.rarity="R",this.name="Aerial Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.canMove=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Mobility ${this.level}.`,this.z=this.asurgeZ}asurgeZ(t){this.wings(t,this.level)}anatC(){this.faction="A",this.rarity="C",this.name="Anatomize",this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(-this.boof4816,0)}.~You may play an additional ${this.name} this turn.`,this.z=this.anatZ}anatZ(t){this.buffA(t,-this.boof4816);const i=L.freeCard(this.code);i.condition.cardCode="ATZ"}anvbC(){this.faction="A",this.rarity="T",this.name="Anvilbreaker",this.free=!0,this.maxLevel=1,this.playTarg.player="E",this.text=`Give an enemy creature ${y.jr9(-2,0)}, then move it to another available lane at random.`,this.z=this.anvbZ}anvbZ(t){this.buffA(t,-2),p.fling(t,"A")}aqatC(){this.faction="T",this.rarity="C",this.name="Aquatic Embrace",this.text=`Give a creature ${y.jr9(0,this.boof51015)}.`,this.playTarg.hint=["BF"],this.z=this.aqatZ}aqatZ(t){this.buffH(t,this.boof51015)}armoC(){this.faction="A",this.rarity="R",this.name="Armory Outpost",this.playTarg.player="F";const t=y.jr9(this.boof4610,0);this.text=`Give a friendly creature ${t}. If it is in Formation, give the adjacent creatures ${t} as well.`,this.z=this.armoZ}armoZ(t){const i=this.boof4610;this.formFun(t).concat(t).forEach(r=>this.buffA(r,i))}bftC(){this.faction="N",this.rarity="C",this.name="Bitterfrost Totem";const t=this.boof4812n;this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(t,t)}. ${this.rankT()}, it gets an additional ${y.jr9(-2,-2)}.`,this.z=this.bftZ}bftZ(t){const i=this.boof4812n-(k.getActive().rank>this.level?2:0);this.buffD(t,i)}get bhos(){return this.lValN([6,9,20])}bzhC(){this.faction="T",this.rarity="H",this.name="Blazing Hostility";const t=this.bhos;this.playTarg.player="E",this.text=`Deal ${t} damage to an enemy creature${this.icaf("N")}deal ${t} damage to the enemy player as well.`,this.z=this.bzhZ}bzhZ(t){const i=this.bhos;this.smack(t,i),t.faction==="N"&&this.ouch(t.owner,i)}blod(){return L.deathsA.length>0||L.deathsB.length>0}bbrC(){this.faction="A",this.rarity="C",this.name="Blood Barrier";const t=this.boof234;this.text=`Give a creature Armor ${t}.~If a creature was destroyed this turn, it gets an additional Armor ${t}.`,this.playTarg.hint=["BF"],this.playTarg.canArmor=!0,this.z=this.bbrZ}bbrZ(t){const i=this.boof234;t.addArmor(i),this.blod()&&t.addArmor(i)}bbdC(){this.faction="N",this.rarity="C",this.name="Blood Bindings";const t=this.boof369n,i=y.jr9(t,t);this.text=`Give a creature ${i}.~If a creature was destroyed this turn, it gets an additional ${i}.`,this.playTarg.hint=["DB"],this.z=this.bbdZ}bbdZ(t){const i=this.boof369n;this.buffD(t,i),this.blod()&&this.buffD(t,i)}bblC(){this.faction="T",this.rarity="C",this.name="Blood Boil";const t=this.lValN([5,6,10]);this.text=`Deal ${t} damage to a creature.~If a creature was destroyed this turn, deal an additional ${t} damage to that creature.`,this.playTarg.hint=["HR"],this.z=this.bblZ}bblZ(t){const i=this.lValN([5,6,10]),r=E.tick();this.smack(t,i,r),this.blod()&&this.smack(t,i,r)}bbnC(){this.faction="U",this.rarity="C",this.name="Blood Boon";const t=this.lValN([3,4,7]),i=y.jr9(t,t);this.text=`Give a creature ${i}.~If a creature was destroyed this turn, it gets an additional ${i}.`,this.playTarg.hint=["BF"],this.z=this.bbnZ}bbnZ(t){const i=this.lValN([3,4,7]);this.buffD(t,i),this.blod()&&this.buffD(t,i)}botC(){this.faction="U",this.rarity="H",this.name="Botanimate",this.xl=!1,this.text=`Replace an enemy ${y.levelGateText(this.level)}creature with a 3/3 Sapling.`,this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.botZ}botZ(t){this.replc(`${"BOS"}${this.level}`,t.owner,t.lane)}btpC(){this.faction="U",this.rarity="H",this.name="Bottomless Puncture",this.playTarg.player="E",this.text=`Give an enemy creature Poison ${this.boof369}${this.icaf("T")}give the enemy player Poison ${this.level} as well.`,this.z=this.btpZ}btpZ(t){t.addPoison(this.boof369),t.faction==="T"&&k.addPoison(t.owner,this.level)}chatC(){this.faction="T",this.rarity="R",this.name="Chaos Twister",this.playTarg.player="E";const t=`eal ${this.twist} damage to `;this.text=`D${t}an enemy creature. If it is in Formation, d${t}the adjacent creatures as well.`,this.z=this.chatZ}chatZ(t){const i=this.twist,r=E.tick();this.formFun(t).concat(t).forEach(n=>this.smack(n,i,r))}get twist(){return this.lValN([6,8,10])}csurgeC(){this.faction="N",this.rarity="R",this.name="Contagion Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]);const t=this.boof123n;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["DB"],this.z=this.csurgeZ}csurgeZ(t){this.buffD(t,this.boof123n)}ctmsC(){this.faction="A",this.rarity="R",this.name="Countermeasure";const t=this.boof4816;this.text=`Give an enemy creature ${y.jr9(-t,0)}, or give a friendly creature ${y.jr9(t,0)}.`,this.z=this.ctmsZ}ctmsZ(t){const i=this.boof4816;t.owner===k.activeA?this.buffA(t,i):this.buffA(t,-i)}cullC(){this.faction="N",this.rarity="C",this.name="Cull the Weak",this.xl=!1;const t=this.boof4814;this.text=`Destroy a creature with ${t} or less attack.`,this.playTarg.maxAttack=t,this.playTarg.hint=["KL"],this.level<3&&(this.hints=["LG"]),this.z=this.cullZ}cullZ(t){this.kill(t)}cultC(){this.faction="U",this.rarity="H",this.name="Cultivate",this.xl=!1;const t=W.getCard(K.tffc(this.level));this.text=`Replace a friendly Plant with a ${y.tokName(t)}.`,this.playTarg.player="F",this.playTarg.tribe="PL",this.level<3&&(this.hints=["LG"]),this.z=this.cultZ}cultZ(t){this.replc(K.tffc(this.level),t.owner,t.lane)}cypaC(){this.faction="A",this.rarity="R",this.name="Cypien Augmentation",this.free=this.level>1,this.level===1&&(this.hints=["LG"]);const t=this.boof246;this.text=`Give a creature in a center lane ${y.jr9(t,t)}.`,this.playTarg.lanes=3,this.playTarg.hint=["BF"],this.z=this.cypaZ}cypaZ(t){this.buffD(t,this.boof246)}cypbC(){this.faction="A",this.rarity="C",this.name="Cypien Battlesuit",this.text=`Give an Alloyin creature ${y.jr9(this.boof51015,0)} and Armor ${this.boof124}.`,this.playTarg.hint=["BF"],this.playTarg.faction="A",this.z=this.cypbZ}cypbZ(t){this.buffA(t,this.boof51015),t.addArmor(this.boof124)}dpsC(){this.faction="N",this.rarity="H",this.name="Death's Possession";const t=this.boof4812;this.playTarg.maxAttack=t,this.text=`Destroy a creature with ${t} or less attack${this.icaf("A")}Spawn a copy of it.`,this.z=this.dpsZ}dpsZ(t){this.kill(t),t.faction==="A"&&this.spawn(t.code,k.activeA)}dendC(){this.faction="U",this.rarity="R",this.name="Dendrify",this.xl=!1,this.level===3&&(this.free=!0,this.overload=!0),this.text=`Replace a ${y.levelGateText(this.level+1)}creature with a 7/7 Treefolk.`,this.playTarg.level=w.ddf2(this.level+1),this.z=this.dendZ}dendZ(t){this.replc(`${"SXT"}${this.level}`,t.owner,t.lane)}dreadC(){this.faction="N",this.rarity="H",this.name="Dreadbolt",this.xl=!1,this.level<3&&(this.hints=["LG"]),this.text=`Destroy a ${y.levelGateText(this.level)}creature.`,this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.z=this.dreadZ}dreadZ(t){this.kill(t)}dyinC(){this.faction="U",this.rarity="T",this.name="Dysian Infusion",this.playTarg.hint=["BF"];const t=this.boof135,i=this.boof4710;this.text=`Give a creature ${y.jr9(i,i)} and Regenerate ${t}.`,this.z=this.dyinZ}dyinZ(t){this.buffD(t,this.boof4710),this.regn(t,this.boof135)}enpC(){this.faction="A",this.rarity="H",this.name="Energy Prison",this.free=this.level===3,this.text=`Give a ${y.levelGateText(this.level)}creature Defender.`,this.playTarg.canDefender=!0,this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.enpZ}enpZ(t){t.defender=!0,this.anim8(t)}elnC(){this.faction="A",this.rarity="C",this.name="Electro Net",this.text=`Give a creature ${y.jr9(-this.boof51015,0)}.`,this.playTarg.hint=["DB"],this.z=this.elnZ}elnZ(t){this.buffA(t,-this.boof51015)}rageC(){this.faction="U",this.rarity="C",this.name="Enrage";const t=this.boof3612;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["BF"],this.z=this.rageZ}rageZ(t){this.buffD(t,this.boof3612)}efauC(){this.faction="T",this.rarity="R",this.name="Everflame Aura",this.text=`Deal ${this.level+6} damage to an enemy creature, or give a friendly creature Mobility ${this.level}.`,this.z=this.efauZ}efauZ(t){t.owner===k.activeA?this.wings(t,this.level):this.smack(t,this.level+6)}expdmC(){this.faction="N",this.rarity="H",this.name="Explosive Demise",this.xl=!1,this.text=`Destroy a friendly ${y.levelGateText(this.level+1)}creature.~Deal damage equal to its attack to the enemy player.${this.level===3?"~You gain that much health.":""}`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.z=this.expdmZ}expdmZ(t){const i=t.attack;this.kill(t),this.ouch("E",i),this.level===3&&this.balm("F",i)}fitrC(){this.faction="T",this.rarity="C",this.name="Fit of Rage",this.maxLevel=1,this.overload=!0,this.playTarg.player="F",this.text="Give a friendly creature +attack equal to the creature opposing it this turn.",this.z=this.fitrZ}fitrZ(t){this.modA(t,b.modT("AT",t.opposed?.attack||0))}fitTarg(){const t=b.crActTarg("CARD",this.code,"");return t.lanes=p.ddf1().filter(i=>i.opposed).map(i=>i.lane),t}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 ${y.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.hint=["BF"],this.z=this.feralZ}feralZ(t){t.breakthrough=!0,this.buffD(t,this.fiboof)}fjetC(){this.faction="T",this.rarity="C",this.name="Flame Jet",this.playTarg.hint=["HR"],this.text=`Deal ${this.boof3915} damage to a creature. ${this.rankT()}, deal an additional 3 damage.`,this.z=this.fjetZ}fjetZ(t){this.smack(t,this.boof3915),k.getActive().rank>this.level&&this.smack(t,3)}flncC(){this.faction="T",this.rarity="R",this.name="Flame Lance",this.xl=!1;const t=this.boof579;this.text=`Deal ${t} damage to an enemy creature and ${t} damage to the enemy player.`,this.playTarg.player="E",this.z=this.flncZ}flncZ(t){const i=this.boof579;this.smack(t,i),this.ouch("E",i)}ffldC(){this.faction="A",this.rarity="C",this.name="Forcefield",this.playTarg.canArmor=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Armor ${this.boof51020} this turn.`,this.z=this.ffldZ}ffldZ(t){this.modA(t,b.modT("AR",this.boof51020))}frozC(){this.faction="T",this.rarity="R",this.name="Frozen Solid",this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.text=`Give a ${y.levelGateText(this.level)}creature "When this is dealt damage, destroy it".`,this.level<3&&(this.hints=["LG"]),this.z=this.frozZ}frozZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.avgSpawnNug(),this.anim8(t)}ghastC(){this.faction="N",this.rarity="C",this.name="Ghastly Touch";const t=-this.boof3612;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["DB"],this.z=this.ghastZ}ghastZ(t){this.buffD(t,-this.boof3612)}crushC(){this.faction="T",this.rarity="C",this.name="Glacial Crush",this.xl=!1,this.free=this.level>1,this.free||(this.hints=["LG"]),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.":""}`,this.z=this.crushZ}crushZ(t){const i=t.health;this.kill(t),this.level===3&&this.ouch(t.owner,i)}hartC(){this.faction="A",this.rarity="C",this.name="Heavy Artillery",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof51015,0)}.`,this.z=this.hartZ}hartZ(t){this.buffA(t,this.boof51015)}izftC(){this.faction="T",this.rarity="T",this.name="Iztek's Frost",this.free=this.level===3,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hint=["KL"],this.text=`Until the end of the next turn, give a ${y.levelGateText(this.level+1)}creature "When this is dealt damage, destroy it".`,this.level===1&&(this.hints=["LG"]),this.z=this.izftZ}izftZ(t){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i,r.bonus=this.avgSpawnNug();const n=t.jr4("PT",this.code);n.customCode=S.enTil("P2",i)}jpC(){this.faction="A",this.rarity="C",this.name="Jet Pack",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof369,0)} and Mobility 1.`,this.z=this.jpZ}jpZ(t){this.buffA(t,this.boof369),this.wings(t,1)}lbrandC(){this.faction="T",this.rarity="C",this.name="Lightning Brand",this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hint=["BF"],this.text=`Give a ${y.levelGateText(this.level+1)}creature ${y.jr9(this.boof124,0)} and Aggressive this turn.`,this.level===1&&(this.hints=["LG"]),this.z=this.lbrandZ}lbrandZ(t){this.modA(t,b.modT("AT",this.boof124)),this.modA(t,b.modT("AG",!0))}shartC(){this.faction="U",this.rarity="R",this.name="Lysian Shard",this.overload=!0,this.maxLevel=1,this.hints=["ZZ-1"],this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(6,6)}.`,this.z=this.shartZ}shartZ(t){this.buffD(t,6)}maggyC(){this.faction="T",this.rarity="T",this.name="Magmify",this.maxLevel=2,this.level===1?this.hints=["LG"]:this.free=!0,this.playTarg.player="F",this.text="Set a friendly creatures attack equal to its health.",this.z=this.maggyZ}maggyZ(t){const i=t.health-t.attack;i!==0&&this.buffA(t,i)}morphC(){this.faction="U",this.rarity="H",this.name="Metamorphosis",this.xl=!1,this.text=`Replace a ${y.levelGateText(this.level)}creature with a 0/3 Feywing Chrysalis.`,this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.morphZ}morphZ(t){this.replc(`${"FWC"}1`,t.owner,t.lane)}sculptC(){this.faction="A",this.rarity="H",this.name="Metasculpt",this.level===3?this.free=!0:this.hints=["LG"],this.playTarg.level=w.ddf2(this.level+1),this.text=`Remove all abilities from a ${y.levelGateText(this.level+1)}creature.`,this.playTarg.hint=["DB"],this.z=this.sculptZ}sculptZ(t){t.wipeAll()}nanoC(){this.faction="A",this.rarity="R",this.name="Nanoswarm",this.playTarg.level=w.ddf2(this.level),this.text=`Give a ${y.levelGateText(this.level)}creature ${y.jr9(-this.boof51015,0)} and remove all abilities from it.`,this.playTarg.hint=["DB"],this.level<3&&(this.hints=["LG"]),this.z=this.nanoZ}nanoZ(t){this.buffA(t,-this.boof51015),t.wipeAll()}natselC(){this.faction="U",this.rarity="R",this.name="Natural Selection",this.xl=!1,this.text=`If there is a friendly creature in each lane, destroy a ${y.levelGateText(this.level)}creature.`,this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.level<3&&(this.hints=["LG"]),this.z=this.natselZ}natselZ(t){this.kill(t)}nflayC(){this.faction="N",this.rarity="C",this.name="Necroflay";const t=-this.boof3711;this.text=`Give a creature ${y.jr9(t,t)}.~You may play an additional ${this.name} this turn.`,this.playTarg.hint=["DB"],this.z=this.nflayZ}nflayZ(t){this.buffD(t,-this.boof3711);const i=L.freeCard(this.code);i.condition.cardCode="NCF"}nviveC(){this.faction="N",this.rarity="C",this.name="Necrovive",this.playTarg.canRegen=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Regenerate ${this.boof3612}.`,this.z=this.nviveZ}nviveZ(t){this.regn(t,this.boof3612)}ntdcC(){this.faction="N",this.rarity="R",this.name="Nether Decay";const t=this.ndcbuf;this.text=`Give a creature "When a creature is destroyed, this gets ${y.jr9(t,t)}."`,this.playTarg.hint=["DB"],this.z=this.ntdcZ}ntdcZ(t){t.changed=!0;const i=t.jr4("DS",this.code),r=this.ndcbuf;i.bonus=this.buffNug(r,r)}get ndcbuf(){return-4-this.level}oexpC(){this.faction="A",this.rarity="H",this.name="Oratek Explosives",this.playTarg.player="F";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 ${y.jr9(5,0)}.~Allied Tempys: This turn, when that creature ${y.dbdtap()}, deal that much damage to ${t}.`,this.z=this.oexpZ}oexpZ(t){if(this.buffA(t,5),L.allied("T")){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i;const n=t.jr4("PT",this.code);n.customCode=i}}orssC(){this.faction="A",this.rarity="C",this.name="Oreian Steelskin",this.playTarg.canArmor=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Armor ${this.boof246}. ${this.rankT()}, it gets an additional Armor 1.`,this.z=this.orssZ}orssZ(t){const i=k.getActive().rank>this.level?1:0;t.addArmor(this.boof246+i)}pwtorC(){this.faction="A",this.rarity="R",this.name="Power Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof234,0)}.`,this.z=this.pwtorZ}pwtorZ(t){this.buffA(t,this.boof234)}psurgeC(){this.faction="U",this.rarity="R",this.name="Primal Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.level,this.level)}.`,this.z=this.psurgeZ}psurgeZ(t){this.buffD(t,this.level)}pslamC(){this.faction="T",this.rarity="C",this.name="Primordial Slam",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof71116,0)} this turn.`,this.z=this.pslamZ}pslamZ(t){this.modA(t,b.modT("AT",this.boof71116))}pummC(){this.faction="A",this.rarity="R",this.name="Pummel Pack";const t=this.boof236,i=`${y.jr9(t,0)} and Armor ${t}.`;this.text=`Give a friendly creature ${i}~If it is the only friendly creature, it gets an additional ${i}`,this.playTarg.player="F",this.z=this.pummZ}pummZ(t){const i=this.boof236;this.buffA(t,i),t.addArmor(i),p.ddf1().length===1&&(this.buffA(t,i),t.addArmor(i))}get dennis(){return this.lValN([-3,-9,-25])}rpsC(){this.faction="A",this.rarity="H",this.name="Repress",this.playTarg.player="E",this.text=`Give an enemy creature ${y.jr9(this.dennis,0)}.${this.icaf("U")}remove all abilities from it.`,this.z=this.rpsZ}rpsZ(t){this.buffA(t,this.dennis),t.faction==="U"&&t.wipeAll()}sapC(){this.faction="A",this.rarity="C",this.name="Sap",this.playTarg.level=w.ddf2(this.level),this.text=`Reduce a ${y.levelGateText(this.level)}creature's attack to 0.`,this.playTarg.hint=["DB"],this.level<3&&(this.hints=["LG"]),this.z=this.sapZ}sapZ(t){this.buffA(t,-t.attack)}soathC(){this.faction="U",this.rarity="C",this.name="Savage Oath",this.level===1&&(this.hints=["LG"]);const t=this.saboof;this.text=`Give an Uterra creature ${y.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.hint=["BF"],this.playTarg.faction="U",this.z=this.soathZ}soathZ(t){this.buffD(t,this.saboof),t.breakthrough=!0}get saboof(){return this.lValN([2,6,15])}scythC(){this.faction="N",this.rarity="L",this.name="Scythe of Chiron";const t=this.boof246;this.playTarg.player="F",this.text=`Each enemy creature gets ${y.jr9(-t,0)}. Give a friendly creature ${y.jr9(t,0)} for each enemy creature.`,this.z=this.scythZ}scythZ(t){const i=-this.boof246,r=p.qEnemyCreats();r.forEach(n=>{this.buffA(n,i)}),r.length>0&&this.buffA(t,-i*r.length)}soaC(){this.faction="A",this.rarity="C",this.name="Seal of Anvillon",this.level===1?this.hints=["LG"]:this.consistent=!0,this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.ubzap,0)}.`,this.z=this.soaZ}soaZ(t){this.buffA(t,this.ubzap)}sodC(){this.faction="U",this.rarity="C",this.name="Seal of Deepwood",this.level===1?this.hints=["LG"]:this.consistent=!0;const t=this.derpboof;this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(t,t)}.`,this.z=this.sodZ}sodZ(t){this.buffD(t,this.derpboof)}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=["LG"]:this.consistent=!0;const t=this.tars;this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(t,t)}.`,this.z=this.sotZ}sotZ(t){this.buffD(t,this.tars)}get tars(){return this.lValN([-2,-8,-16])}shgrC(){this.faction="N",this.rarity="L",this.name="Shallow Grave",this.free=this.level===3,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.text=`Give a ${y.levelGateText(this.level+1)}friendly creature "Vengeance: Spawn this" this turn.`,this.level===1&&(this.hints=["LG"]),this.z=this.shgrZ}shgrZ(t){const i=E.genId(),r=t.jr4("VN",this.code);r.customCode=i,r.changes=!0;const n=t.jr4("PT",this.code);n.customCode=i}sinC(){this.faction="U",this.rarity="C",this.name="Strength In Numbers",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.level,this.level)} for each friendly creature.`,this.z=this.sinZ}sinZ(t){this.buffD(t,this.level*p.ddf1().length)}get snbboof(){return-1*(this.level+7)}snbC(){this.faction="A",this.rarity="C",this.name="Sonic Burst",this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(this.snbboof,0)}.`,this.level<3&&(this.hints=["LB"]),this.z=this.snbZ}snbZ(t){this.buffA(t,this.snbboof)}sharvC(){this.faction="N",this.rarity="H",this.name="Soul Harvest",this.xl=!1;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",this.level<3&&(this.hints=["LG"]),this.z=this.sharvZ}sharvZ(t){if(this.kill(t),this.level===1){const i=L.freeCard(this.code);i.condition.level=w.ddf2(1)}else L.freePlay(this.level-1)}sreapC(){this.faction="N",this.rarity="L",this.name="Soulreap",this.xl=!1;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,this.level<3&&(this.hints=["LG"]),this.z=this.sreapZ}sreapZ(t){this.kill(t),this.spawn(t.code,!t.owner)}sttorC(){this.faction="N",this.rarity="R",this.name="Spirit Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.text=`Give a creature Regenerate ${this.boof234}.`,this.playTarg.hint=["BF"],this.playTarg.canRegen=!0,this.z=this.sttorZ}sttorZ(t){this.regn(t,this.boof234)}sptorC(){this.faction="U",this.rarity="R",this.name="Spore Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.text=`Give a creature Poison ${this.boof234}.`,this.playTarg.hint=["PN"],this.z=this.sptorZ}sptorZ(t){t.addPoison(this.boof234)}sovC(){this.faction="T",this.rarity="L",this.name="Staff of Vaerus",this.text=`Give a friendly ${y.levelGateText(this.level+1)}creature Mobility ${this.level}. That creature battles an additional time this turn.`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.z=this.sovZ}sovZ(t){this.wrang(t),this.wings(t,this.level)}stbrnC(){this.faction="T",this.rarity="R",this.name="Stone Brand";const t=this.boof579;this.text=`Give a creature with Defender ${y.jr9(t,t,!0)} and Negate Defender from it.`,this.playTarg.hint=["BF"],this.playTarg.hasDefender=!0,this.z=this.stbrnZ}stbrnZ(t){this.buffD(t,this.boof579),t.negDefend("T")}ssperC(){this.faction="T",this.rarity="C",this.name="Stormspear",this.xl=!1,this.playTarg.hint=["HR"],this.text=`Deal ${this.sspb} to a creature.~You may play an additional ${this.name} this turn.`,this.z=this.ssperZ}ssperZ(t){this.smack(t,this.sspb);const i=L.freeCard(this.code);i.condition.cardCode="STP"}get sspb(){return this.lValN([3,8,12])}tanglC(){this.faction="U",this.rarity="R",this.name="Tangle",this.xl=!1;let t="";this.level===3?t=" You gain health equal to that creature's attack.":this.playTarg.hint=["KL"],this.text=`Destroy a ${y.levelGateText(this.level+1)}creature with Mobility.${t}`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hasMobility=!0,this.level===1&&(this.hints=["LG"]),this.z=this.tanglZ}tanglZ(t){this.kill(t),this.level===3&&this.balm("F",t.attack)}tpactC(){this.faction="N",this.rarity="C",this.name="Tarsian Pact";const t=this.boof235;this.text=`Give a Nekrium creature ${y.jr9(t,t,!0)} and Regenerate ${t}.`,this.playTarg.hint=["BF"],this.playTarg.faction="N",this.z=this.tpactZ}tpactZ(t){const i=this.boof235;this.buffD(t,i),this.regn(t,i)}tugC(){this.faction="A",this.rarity="R",this.name="Tech Upgrade",this.playTarg.tribe="RB",this.playTarg.hint=["BF"],this.text=`Give a Robot ${y.jr9(this.boof4612,0)} and Armor ${this.boof236}.`,this.z=this.tugZ}tugZ(t){t.addArmor(this.boof236),this.buffA(t,this.boof4612)}totsC(){this.faction="N",this.rarity="T",this.name="Tendrils Of Twilight",this.free=!0;const t=-this.boof7911;this.text=`Give an enemy creature ${y.jr9(-1,-1)}.~If that creature is opposing a friendly Duskmaw, give that creature ${y.jr9(t,t)} instead.`,this.playTarg.player="E",this.z=this.totsZ}totsZ(t){const i=t.opposed;let r=!1;i&&(r=Wt.extractCardCode(i.code)==="DTD");const n=r?-this.boof7911:-1;this.buffD(t,n)}txbnC(){this.faction="U",this.rarity="R",this.name="Toxic Boon";const t=this.boof357;this.text=`Give an enemy creature Poison ${t}, or give a friendly creature ${y.jr9(t,t)}.`,this.z=this.txbnZ}txbnZ(t){const i=this.boof357;t.owner===k.activeA?this.buffD(t,i):t.addPoison(i)}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}.`,this.playTarg.hint=["PN"],this.z=this.sporeZ}sporeZ(t){t.addPoison(this.tspois)}tremcC(){this.faction="T",this.rarity="C",this.name="Tremorcharge",this.text=`Give a Tempys creature ${y.jr9(0,this.boof4812)} and Mobility ${this.level}.`,this.playTarg.faction="T",this.playTarg.hint=["BF"],this.z=this.tremcZ}tremcZ(t){this.buffH(t,this.boof4812),this.wings(t,this.level)}uboltC(){this.faction="T",this.rarity="R",this.name="Uranti Bolt",this.xl=!1,this.text=`Deal ${this.ubzap} damage to a creature.~It gets Defender until the end of the next turn.`,this.z=this.uboltZ}uboltZ(t){this.smack(t,this.ubzap);const i=b.mod("DF",!0);i.expiry="EN",this.modA(t,i)}get ubzap(){return this.lValN([3,10,20])}urstC(){this.faction="U",this.rarity="C",this.name="Ursine Strength";const t=this.boof3711;this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(t,t)}. ${this.rankT()}, it gets an additional ${y.jr9(2,2)}.`,this.z=this.urstZ}urstZ(t){const i=this.boof3711+(k.getActive().rank>this.level?2:0);this.buffD(t,i)}vensC(){this.faction="U",this.rarity="C",this.name="Venomstrike",this.playTarg.hint=["PN"],this.text=`Give a creature Poison ${this.boof468}.~You may play an additional ${this.name} this turn.`,this.z=this.vensZ}vensZ(t){t.addPoison(this.boof468);const i=L.freeCard(this.code);i.condition.cardCode="VSK"}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.`,this.z=this.vgraZ}vgraZ(t){t.heal(this.boof101520);const i=this.boof246;p.creatByTarget(b.crFriendNotMeTarg(t.id)).forEach(r=>{r.heal(i)})}vrdsC(){this.faction="U",this.rarity="C",this.name="Verdant Sphere";const t=this.boof5812;this.text=`Give a creature ${y.jr9(0,t)} and you gain ${t} health.`,this.playTarg.hint=["BF"],this.z=this.vrdsZ}vrdsZ(t){const i=this.boof5812;this.buffH(t,i),this.balm(k.getActive(),i)}vrshC(){this.faction="U",this.rarity="R",this.name="Victory Rush";const t=this.level+3,i=y.jr9(t,t);this.text=`Give a friendly creature ${i}. If a Raid occured this turn, give it an additional ${i}.`,this.playTarg.player="F",this.z=this.vrshZ}vrshZ(t){const i=(this.level+3)*(L.ffs>2?2:1);this.buffD(t,i)}vglchC(){this.faction="N",this.rarity="R",this.name="Vigor Leech";const t=this.boof369n;this.text=`Give an enemy creature ${y.jr9(t,t)}, or give a friendly creature Regenerate ${-t}.`,this.z=this.vglchZ}vglchZ(t){const i=this.boof369n;t.owner===k.activeA?this.regn(t,-i):this.buffD(t,i)}vembC(){this.faction="N",this.rarity="C",this.name="Vyric's Embrace",this.playTarg.hint=["DB"];const t=this.boof468,i=-t;this.text=`Give a creature ${y.jr9(i,i)}.~You gain ${t} health.`,this.z=this.vembZ}vembZ(t){const i=this.boof468;this.buffD(t,-i),this.balm(k.getActive(),i)}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.playTarg.hint=["BF"],this.text=`Give a ${y.levelGateText(i)}creature ${t}x attack.`,this.z=this.warZ}warZ(t){const i=this.level===3?2:1;this.buffA(t,t.attack*i)}xwillC(){this.faction="N",this.rarity="H",this.name="Xrath's Will",this.xl=!1;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,this.level<3&&(this.hints=["LG"]),this.z=this.xwillZ}xwillZ(t){this.kill(t);const i=L.freeCard(this.code);i.condition.tribe="ZB"}}class Pr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Crux, Metamind Rogue",this.iAttack=this.lValN([7,12,17]),this.iHealth=this.boof4812,this.tribe.push("MM"),this.hints=["RD"],this.text=`Forge: If Crux is your only friendly creature, it gets Armor ${this.level+2}.~Upgrade: Give an enemy creature ${y.jr9(-this.iHealth,0)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("UP");return n.interactive=!0,r}handleAction(t){const i=p.ddf6(t);this.buffA(i,-this.iHealth),this.logAct(!1,i),T.actionDone(!0)}jr8(t){if(t.trigger.type==="UP"){const i=w.toActions(b.crEnemyActTarg("CARD",this.code,""));i.length===0?x.triggerDone():T.ddf5(i)}else if(t.trigger.type==="FR"){const i=p.creatByTarget(b.crFriendTarg());i.length===1&&i[0].addArmor(this.level+2),x.triggerDone()}}}class Mr extends P{constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Cryophoenix",this.iAttack=this.boof3711,this.iHealth=this.iAttack+3,this.iMobile=this.lValN([0,0,1]),this.tribe.push("PX"),this.text=`When ${this.name} enters play or moves, deal damage equal to its attack to the opposing creature.~If there is no opposing creature, deal that damage to the enemy player instead.`}image(t){return this.rawImage(`${"PHC"}${this.level}`,t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FK");return n.bonus=this.playerNug(this.iAttack,"TX"),r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const r=I.toCreature(t.event).creature,n=r.opposed;n?this.smack(n,r.attack):(this.ouch(!r.owner,r.attack),this.anim8(r)),x.triggerDone()}}class Gt extends P{cons(t){({["BOF"]:()=>this.bofC(),["CTM"]:()=>this.ctmC(),["DFB"]:()=>this.dfbC(),["GGB"]:()=>this.ggbC(),["GGD"]:()=>this.ggdC(),["GGR"]:()=>this.ggdrC(),["GGP"]:()=>this.ggpC(),["GGW"]:()=>this.ggwC(),["MHR"]:()=>this.mhermC(),["NGT"]:()=>this.ngauntC(),["SRH"]:()=>this.sharvC(),["SPR"]:()=>this.sprC(),["YNS"]:()=>this.yuruC()})[t]()}trigB;bDraw=!1;constructor(t){super(t),this.cons(this.cardCode())}t;d;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DS");return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.t(t)}bFac(t){return t.draw?this.faction:"X"}truLive(t){return p.creatByTr(t).status==="A"}jr8(t){this.d(t),x.triggerDone()}friendTribeTest(t,i,r){return i.id===t.id||t.owner===i.owner&&t.isTribe(r)&&Gt.itDiedFirst(t.id,i.id)}bofC(){this.faction="N",this.rarity="C",this.name="Bride of Frankenbaum",this.iAttack=this.boof5813,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.hints=["ZZ-1"];const t=this.boof234;this.text=`When a friendly Abomination is destroyed, you gain ${t} health.`,this.trigB=this.playerNug(t*2,"TW"),this.bDraw=!0,this.t=this.dfbT,this.d=this.bofD}bofD(t){this.balm(t.owner,this.boof234,t.draw),t.draw&&this.anim8(p.creatByTr(t))}ctmC(){this.faction="N",this.rarity="L",this.name="Cyrus, the Merciless",this.iAttack=this.boof359,this.iHealth=this.iAttack+1,this.tribe.push("GG"),this.text=`Formation: Destroy each other creature with ${this.boof579} or less attack.~Whenever a creature is destroyed, Cyrus gets ${y.jr9(1,1)}.`,this.trigB=this.buffNug(2,2,"TS"),this.bDraw=!0,this.t=this.truLive,this.d=this.ctmR}ctmR(t){p.creatByTr(t).buff(1,1,this.bFac(t))}dfbC(){this.faction="N",this.rarity="R",this.name="Dr. Frankenbaum",this.iAttack=this.boof6914,this.iHealth=this.iAttack-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.trigB=this.playerNug(t*2,"TX"),this.bDraw=!0,this.t=this.dfbT,this.d=this.dfbD}dfbT(t){const i=I.toCreature(t.event).creature;return this.friendTribeTest(i,p.creatByTr(t),"AB")}dfbD(t){this.ouch(!t.owner,this.boof234,t.draw),t.draw&&this.anim8(p.creatByTr(t))}ggbC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Betrayer",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("DF","GG");const t=-this.level;this.text=`When a friendly Darkforged is destroyed, the creature opposing it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(this.level,this.level,"TW"),this.t=this.ggbT,this.d=this.ggbD}ggbT(t){const i=I.toCreature(t.event).creature;return this.friendTribeTest(i,p.creatByTr(t),"DF")?i.opposed:!1}ggbD(t){const i=I.toCreature(t.event).creature.opposed;i&&(this.buffD(i,-this.level),this.logAct(!1,i))}ggdC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Devourer",this.iAttack=this.boof579,this.iHealth=this.iAttack-2,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),2),this.bDraw=!0,this.t=this.truLive,this.d=this.ggdD}ggdD(t){p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}get doomb(){return this.lValN([1,1,2])}ggdrC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Doomrider",this.iAttack=this.boof4712,this.iHealth=this.iAttack+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 ${y.jr9(t,t)}. Then give the opposing creature ${y.jr9(-t,-t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.t=this.ggdrT,this.d=this.ggdrD}ggdrT(t){const r=I.toCreature(t.event).creature;return r.owner===t.owner&&r.id!==t.creatId?this.truLive(t)&&Gt.itDiedFirst(r.id,t.creatId):!1}ggdrD(t){const i=I.toCreature(t.event).creature;if(!p.searchByLane(i.lane,i.owner)){const n=p.creatByTr(t),c=this.doomb;this.lurk(n,i.lane),this.buffD(n,c);const f=n.opposed;f&&(this.logAct(!1,f),this.buffD(f,-c))}}ggpC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Predator",this.iAttack=this.boof5914,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("GG");const t=this.boof246;this.text=`When the opposing creature is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.t=this.ggpT,this.d=this.ggpD}ggpT(t){const i=I.toCreature(t.event);if(i.creature.owner!==t.owner){const r=p.creatByTr(t);return r.status==="A"&&p.oppositeLane(r.lane)===i.creature.lane}return!1}ggpD(t){this.buffD(p.creatByTr(t),this.boof246),this.logAct(!1)}ggwC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Warrior",this.iAttack=this.boof4710,this.iHealth=this.iAttack+1,this.tribe.push("GG");const t=this.boof234;this.text=`When an adjacent creature is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.bDraw=!0,this.t=this.ggwT,this.d=this.ggwD}ggwT(t){const i=I.toCreature(t.event);if(i.creature.owner===t.owner){const r=p.creatByTr(t);return r.status==="A"&&r.adjacent.includes(i.creature.lane)}return!1}ggwD(t){const i=this.boof234;p.creatByTr(t).buff(i,i,this.bFac(t)),this.logAct(!1)}mhermC(){this.faction="U",this.rarity="L",this.name="Malice Hermit",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("YT");const t=this.boof124;this.text=`Forge: Each other creature gets Poison ${t}.~When a creature with Poison is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.bDraw=!0,this.t=this.mhermT,this.d=this.mhermD}mhermT(t){return I.toCreature(t.event).creature.poison>0&&this.truLive(t)}mhermD(t){const i=I.toCreature(t.event);this.logAct(!1,i.creature);const r=this.boof124;p.creatByTr(t).buff(r,r,this.bFac(t))}ngauntC(){this.faction="N",this.rarity="R",this.name="Nightgaunt",this.iAttack=this.boof4815,this.iHealth=this.iAttack+1,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets Regenerate 1.`,this.trigB=this.regnNug(2,"TS"),this.bDraw=!0,this.t=this.truLive,this.d=this.ngauntD}ngauntD(t){p.creatByTr(t).addRegen(1,this.bFac(t))}sharvC(){this.faction="N",this.rarity="C",this.name="Sorrow Harvester",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("AB"),this.text="When a friendly Abomination is destroyed on your turn, draw a card.",this.trigB=this.rawNug(0,0,0,0,ft.dcWeight),this.bDraw=!0,this.t=this.sharvT,this.d=this.sharvD}sharvT(t){const r=I.toCreature(t.event).creature;return!!(r.owner===t.owner&&r.isTribe("AB")&&k.activeA===t.owner&&Gt.itDiedFirst(r.id,t.creatId))}sharvD(t){this.logAct(!1),k.drawCard(t.owner,1),t.draw&&this.anim8(t.creatId)}sprC(){this.faction="N",this.rarity="R",this.name="Spectral Rider",this.iAttack=this.lValN([6,8,13]),this.iHealth=this.iAttack-1,this.tribe.push("GG"),this.text=`When a friendly creature is destroyed, ${this.name} gets ${y.jr9(1,1)}.`,this.trigB=this.buffNug(2,2,"TS"),this.bDraw=!0,this.t=this.sprT,this.d=this.sprD}sprT(t){const i=I.toCreature(t.event);return t.owner===i.creature.owner&&this.truLive(t)}sprD(t){p.creatByTr(t).buff(1,1,this.bFac(t))}yuruC(){this.faction="N",this.rarity="L",this.name="Yuru, the Necrosage",this.iAttack=3,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("HM"),this.level===1&&(this.hints=["ZZ-1"]);const t=W.getCard(this.syc());this.text=`When an adjacent non-Spirit creature is destroyed, put a ${y.tokName(t)} into that lane.`,this.trigB=this.spawnNug(t,"TX"),this.t=this.yuruT,this.d=this.yuruD}yuruT(t){const i=p.creatByTr(t),n=I.toCreature(t.event).creature;return!!(n.owner===i.owner&&i.adjacent.includes(n.lane)&&!n.isTribe("ST")&&Gt.itDiedFirst(n.id,i.id))}yuruD(t){const i=I.toCreature(t.event);this.poot(this.syc(),t.owner,i.creature.lane)}syc(){return "XYR"+this.level}static itDiedFirst(t,i){if(t===i)return!0;let r=!1;const n=Bt.findDeathTime(i);if(S.isUn(n))r=!0;else{const c=Bt.findDeathTime(t);(S.isUn(c)||c<=n)&&(r=!0)}return r}}class Er extends Gt{get formation(){return!0}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FM"),r}jr8(t){if(t.trigger.type==="FM"){const i=b.crNotMeTarg(t.creatId);i.maxAttack=this.boof579;const r=p.creatByTarget(i);if(r.length>0){const n=E.tick();r.forEach(c=>this.kill(c,n))}x.triggerDone()}else super.jr8(t)}}class Le extends P{cons(t){({["ATP"]:()=>this.phagC(),["PLI"]:()=>this.pimpC(),["SSH"]:()=>this.sshmC(),["TPG"]:()=>this.pillC(),["TMG"]:()=>this.grootC(),["VIN"]:()=>this.vintC()})[t]()}forgTargets(){const t=this.t();return E.aiActive?bt.uniqueContent(t):t}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Forge: "+this.ftext,this.ftext=""}t;f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){const i=p.jr5(t.param);this.f(t.position,i),this.anim8(i),gt.popMode(),T.actionDone(!0)}jr8(t){const i=this.cardCode()==="VIN";if(i&&E.aiActive)x.triggerDone();else{const r=this.forgTargets();if(r.length>0){let n;i?n=[]:n=r.map(f=>{const m=b.deckSelectAction("CARD",f.cardCode,f.sourceIdx);return m.param=t.creatId,m.host=this.code,m});const c=T.noneEndTrigger();c.param="PM",n.push(c),bt.showCustomDeck(r,n)}else x.triggerDone()}}hdiscardF(t,i){const r=k.toPlayer(!i.owner),n=r.hand[t];Dt.cardDiscard(r,t),r.discard.push(n)}phagC(){this.faction="U",this.rarity="H",this.name="Aetherphage",this.iAttack=this.lValN([7,10,16]),this.iHealth=this.boof3612,this.tribe.push("IN"),this.ftext=`Look at the ${y.levelGateText(this.level)}spells in the enemy player's hand and choose one. The enemy player discards the chosen spell.`,this.t=this.phagT,this.f=this.hdiscardF}phagT(){const t=k.getInctive(),i=b.target("TH");return i.player=k.toTarget(t),i.level=w.ddf2(this.level),i.card="S",bt.generateContent(t.hand,!1,i)}pimpC(){this.faction="N",this.rarity="R",this.name="Plunder Imp",this.iAttack=this.boof61016,this.iHealth=this.iAttack-1,this.tribe.push("DM");const t=this.boof369;this.ftext=`Look at the creatures with ${t} or less attack in the enemy player's hand and choose one. The enemy player discards the chosen creature.`,this.t=this.pimpT,this.f=this.hdiscardF}pimpT(){const t=k.getInctive(),i=b.target("TH");return i.player=k.toTarget(t),i.maxAttack=this.boof369,i.card="C",bt.generateContent(t.hand,!1,i)}sshmC(){this.faction="U",this.rarity="H",this.name="Soothsayer Hermit",this.iAttack=this.boof61016,this.iHealth=this.iAttack-1,this.tribe.push("LP");let t="";this.level===3?t="level 3 or lower ":t=y.levelGateText(this.level),this.ftext=`You may put a ${t}creature from your discard pile into your hand.`,this.t=this.sshmT,this.f=this.sshmF}sshmT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.card="C",this.level===3?i.level="HR":i.level=w.ddf2(this.level),bt.generateContent(t.discard,!1,i)}sshmF(t,i){const r=k.toPlayer(i.owner),n=r.discard.splice(t,1);Dt.addCard(r,n[0],!0)}pillC(){this.faction="N",this.rarity="H",this.name="Tomb Pillager",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("ZB"),this.consistent=this.level>1,this.ftext="You may banish a Nekrium card from your discard pile.",this.t=this.pillT,this.f=this.pillF}pillT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.faction="N",bt.generateContent(t.discard,!1,i)}pillF(t,i){k.toPlayer(i.owner).discard.splice(t,1)}grootC(){this.faction="U",this.rarity="R",this.name="Toorgmai Guardian",this.iAttack=this.boof4711,this.iHealth=this.iAttack,this.tribe.push("PL");const t=this.boof358;this.ftext=`You may banish a Plant from your discard pile. If you do, ${this.name} gets ${y.jr9(t,t)}.`,this.t=this.grootT,this.f=this.grootF}grootT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.tribe="PL",bt.generateContent(t.discard,!1,i)}grootF(t,i){k.toPlayer(i.owner).discard.splice(t,1),this.buffD(i,this.boof358)}vintC(){this.faction="A",this.rarity="C",this.name="Vault Intruder",this.iAttack=this.lValN([7,12,18]),this.iHealth=this.boof5914,this.tribe.push("RB"),this.ftext="Look at the enemy player's hand.",this.t=this.vintT,this.f=(t,i)=>{}}vintT(){const t=k.getInctive(),i=b.target("TH");return i.player=k.toTarget(t),bt.generateContent(t.hand,!1,i)}}class Rr extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Darkheart Conjurer",this.iAttack=this.boof4813,this.iHealth=this.boof71116,this.tribe.push("HM"),this.text=`When you play a spell, give a friendly creature Regenerate ${this.boof135}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.regnNug(this.boof135,"TW"),r}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),this.regn(i,this.boof135),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,"");i.canRegen=!0;const r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class Lr extends Tt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){p.qEnemyCreats().forEach(i=>{i.addPoison(6)}),x.triggerDone()}}class Gr extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Demara's Pitguard",this.iAttack=this.boof6914,this.iHealth=this.iAttack+2,this.tribe.push("NG"),this.text=`The opposing creature has Poison ${this.boof248}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=t.status==="A",r=p.oppositeLane(t.lane);p.qPlayerCreats(!t.owner).forEach(n=>{n.lane===r&&i?n.addModSafe(b.mod("PN",this.boof248,t.id)):n.removeModSafe(t.id)})}}class Ir extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Demonweb Watcher",this.iAttack=this.boof4714,this.iHealth=this.lValN([7,12,18]),this.tribe.push("SP");const i=this.boof246n;this.text=`When an enemy creature with Aggressive deals battle damage, it gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&i.isCreatSrc&&i.srcCreat.owner!==t.owner&&i.srcCreat.aggressive}jr8(t){const i=I.toDamage(t.event);this.logAct(!1,i.srcCreat),this.buffD(i.srcCreat,this.boof246n),x.triggerDone()}}class Wr extends P{constructor(t){super(t),this.faction="U",this.rarity="T",this.name="Dino Knight",this.iAttack=this.lValN([8,12,18]),this.iHealth=this.iAttack,this.tribe.push("DN"),this.iAggro=!0,this.iBT=!0,this.maxLevel=this.level,this.minLevel=this.level;const i=this.boof357;this.text=`When this ${y.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 r=super.jr3(t,i),n=r.jr4("VN");n.bonus=this.buffNug(this.iAttack,this.iHealth);const c=r.jr4("DM");return c.bonus=this.buffNug(0,this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="VN"){const i=p.creatByTr(t);this.poot("BWT"+this.level,i.owner,i.lane),x.triggerDone()}else if(t.trigger.type==="DM"){const i=this.boof357,r=b.crNotMeTarg(t.creatId);r.player=k.toTarget(t.owner),p.creatByTarget(r).forEach(c=>c.heal(i)),x.triggerDone()}}}class $r extends vt{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Discordant Strike";const i=-this.boof4610;this.text=`Give an enemy creature ${y.jr9(i,0)}.~Allied Nekrium: Give an enemy creature ${y.jr9(0,i)}.`}playTargets(){return[b.crEnemyActTarg("CARD",this.code,"P1")]}canPlay(){return p.qEnemyCreats().length>0}handleAction(t){const i=S.deTil(t.param),r=-this.boof4610,n=p.ddf6(t);i[0]==="P1"?(this.logSpell(n),this.buffA(n,r),L.allied("N")?T.ddf5(w.toActions(b.crEnemyActTarg("CARD",this.code,"P2"))):T.spellCast()):(this.logSpell(n),n.buff(0,r,"N"),T.spellCast())}}class Ur extends vt{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Dissolve",this.free=this.level===3,this.level<3&&(this.hints=["LG"]),this.text=`Double the Poison on ${this.level===1?"an":"each"} enemy creature.`}canPlay(){return p.creatByTarget(this.poisTarg()).length>0}playTargets(){return this.level===1?[this.poisTarg()]:[w.boardTarget("CARD",this.code)]}handleAction(t){if(this.level===1){const i=p.ddf6(t);this.logSpell(i),i.addPoison(i.poison)}else this.logSpell(),p.creatByTarget(this.poisTarg()).forEach(r=>{r.addPoison(r.poison)});T.spellCast()}poisTarg(){const t=b.crEnemyActTarg("CARD",this.code,"");return t.hasPoison=!0,t}}class Or extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Doppelbot",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("RB");let i="";const r=this.lValN([0,5,10]);this.level>1&&(i=`, then give it ${y.jr9(r,0)}`),this.text=`Activate: Look at the creatures in the enemy player's hand and choose one. Replace ${this.name} with the chosen creature${i}.`;const n=this.avgCreatureStats();this.bonus=this.buffNug(r+n[0]-this.iAttack,n[1],"TW")}canActivate(t){return k.toPlayer(!t.owner).hand.some(r=>W.getCard(r).type==="C")}startActivation(t){let i;if(nt.simOn)i=[{cardCode:"VND"+this.level,sourceIdx:0,cardCount:0}];else{const n=k.getInctive(),c=b.target("TH");c.player=k.toTarget(n),c.card="C",i=bt.generateContent(n.hand,!1,c),E.aiActive&&(i=bt.uniqueContent(i))}const r=i.map(n=>{const c=b.deckSelectAction("CARD",n.cardCode,n.sourceIdx);return c.param=t.id,c.host=this.code,c});bt.showCustomDeck(i,r)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=this.replc(t.card,i.owner,i.lane);this.level>1&&r&&this.buffA(r,this.level===3?10:5),gt.popMode(),i.endActivation()}}class Vr extends vt{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Dragonwake",this.text=`Search your deck for a ${y.levelGateText(this.level+1)}Dragon and Spawn a copy of it. It gets Aggressive${this.level===3?".":' and "At the end of your turn, destroy this."'}`}canPlay(){return this.dragoons(!1).length>0}playTargets(){const t=w.boardTarget("CARD",this.code);return t.param="P1",[t]}dragoons(t){const i=k.getActive(),r=b.target("DK");r.player=k.toTarget(i),r.level=w.ddf2(this.level+1),r.tribe="DG";const n=bt.generateContent(i.deck,!1,r);return t?bt.uniqueContent(n):n}handleAction(t){if(t.param==="P1"){const i=this.dragoons(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else{const i=this.spawn(t.card,k.activeA);if(i){if(this.logSpell(i),i.aggressive=!0,this.level<3){const r=i.jr4("TE",this.code);r.creatId=i.id,r.changes=!0}}else this.logSpell();gt.popMode(),T.spellCast()}}ddf8(t){return!0}jr8(t){const i=p.creatByTr(t);i.status==="A"&&this.kill(i),x.triggerDone()}}class zr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Dread",this.iAttack=this.boof6912,this.iHealth=this.boof234,this.tribe.push("AB"),this.text=`When ${this.name} enters play, it has a 50% chance to get the ability "Vengeance: Spawn a level ${this.level} Dread".`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(t.event.code==="ENT"){if(S.randInt(0,2)===0){const i=I.toEnterField(t.event),r=i.creature.jr4("VN");r.changes=!0,r.bonus=this.buffNug(this.iAttack,this.iHealth),this.anim8(i.creature)}}else this.spawn(this,t.owner);x.triggerDone()}}class Zr extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Dysian Broodqueen",this.iAttack=this.boof248,this.iHealth=this.boof61117,this.tribe.push("NG");const i=W.getCard(this.bfc()),r=`Destroy an enemy ${y.levelGateText(this.level)}creature.`;this.text=`Activate, destroy another friendly creature: ${r}~Allied Uterra: Put a ${y.tokName(i)} into an available lane.`,this.bonus=this.multNug(this.avgSpawnNug(),.5),this.bonus.threat="TX"}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){const i=this.friends(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[1]==="P1"){const r=this.enemies(i[0],p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else if(i[1]==="P2"){this.logAct(!0);const r=E.tick();this.kill(p.jr5(i[2]),r),this.kill(p.ddf6(t),r),p.jr5(i[0]).endActivation()}else p.birth(this.bfc(),"P",t.playerA,t.lane,"U"),T.actionDone(!0)}jr8(t){if(L.allied("U")){const i=b.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}else x.triggerDone()}friends(t){const i=b.crFriendNotMeActTarg("CARD",t,this.code,S.enTil(t,"P1"));return w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t,"P2",i));return r.level=w.ddf2(this.level),w.toActions(r)}bfc(){return "BRF"+this.level}}class Yr extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Dysian Siphon";const i=this.boof357;this.text=`Give an enemy creature ${y.jr9(-i,-i)}.~Allied Uterra: Give a friendly creature ${y.jr9(i,i)}. `}canPlay(){return p.creatByTarget(this.firstT()).length>0}playTargets(){return[this.firstT()]}firstT(){return b.crEnemyActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=this.boof357,n=p.ddf6(t);if(i[0]==="P1"){const c=b.crFriendActTarg("CARD",this.code,S.enTil("P2",n.id)),f=w.toActions(c);L.allied("U")&&f.length>0?(f.push(T.cancelAction()),T.ddf5(f)):(this.logSpell(n),this.buffD(n,-r),T.spellCast())}else{const c=p.jr5(i[1]);this.logSpell(c,n),this.buffD(c,-r),n.buff(r,r,"U"),T.spellCast()}}}class Kr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Dysian Sludge",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("OZ");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 ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,n.customCode=r.id,r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=I.toEnterField(t.event);if(i.forged&&i.creature.id===t.trigger.customCode)if(k.getActive().health>120){const r=b.actionTarget("TF","CARD",this.code,"");r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>c!==i.creature.lane);const n=w.toActions(r);n.push(T.noneEndTrigger()),T.ddf5(n)}else x.triggerDone();else{const r=i.creature.opposed;if(r&&L.allied("N",i.creature.owner)){const n=-this.boof135;r.buff(n,n,"N")}x.triggerDone()}}handleAction(t){this.replc(this,t.playerA,t.lane),T.actionDone(!0)}}class Xr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Ebonskull Diabolist",this.iAttack=this.boof137,this.iHealth=this.boof4814,this.tribe.push("VP"),this.text=`Forge: At the start of your next turn, if ${this.name} is in play, you may play an additional card.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="FR"){const r=i.jr4("TS");r.changes=!0,r.bonus=this.avgSpawnNug(),r.bonus.threat="TX",x.triggerDone()}else if(t.event.code==="TRS"){const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.removeTrigger(i.triggers[r]),L.freePlay(),this.anim8(i),this.logAct(!1),x.triggerDone()}}}class qr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Echowisp",this.iAttack=this.lValN([7,8,10]),this.iHealth=this.boof135,this.tribe.push("ST"),this.level===3?this.text="Forge: Put a copy of Echowisp into each available lane.":this.text="Forge: You may put a copy of Echowisp into an adjacent lane."}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=this.level<3,r}jr8(t){if(this.level<3){const i=b.actionTarget("TF","CARD",this.code,"");i.player="F",i.lanes=p.creatByTr(t).adjacent,i.hint=["FL"];const r=w.toActions(i);r.push(T.noneEndTrigger()),T.ddf5(r)}else{const i=b.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId);let r=w.toActions(i);if(r.length>0){const n=E.tick();r.forEach(c=>this.poot(this,c.playerA,c.lane,n))}x.triggerDone()}}handleAction(t){this.poot(this,t.playerA,t.lane),T.actionDone(!0)}}class Fi extends P{cons(t){({["BTB"]:()=>this.bbtC(),["TVG"]:()=>this.tvgC()})[t]()}wipe=!1;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("AR",this.code);return n.area="A",r}enforceEffect(t){if(t.armor>0){const i=this.m(t);if(this.wipe){const r=t.mods.find(n=>n.granter===t.id);r&&r.value!==t.armor&&t.removeModSafe(t.id)}t.addModSafe(i)}else t.removeModSafe(t.id)}bbtC(){this.faction="A",this.rarity="R",this.name="Batterbot",this.iAttack=this.boof6914,this.iHealth=this.iAttack+2,this.tribe.push("RB","DN"),this.wipe=!0,this.text=`${this.name} gets +Attack equal to its Armor.`,this.m=this.bbtM}bbtM(t){return b.mod("AT",t.armor,t.id)}tvgC(){this.faction="A",this.rarity="R",this.name="Tower Vanguard",this.iAttack=this.lValN([3,6,11]),this.iHealth=this.lValN([7,13,21]),this.tribe.push("RB");const t=this.boof247;this.text=`While ${this.name} has Armor, it gets ${y.jr9(t,0)}.`,this.m=this.tvgM}tvgM(t){return b.mod("AT",this.boof247,t.id)}}class ze extends P{cons(t){({["CIN"]:()=>this.cyinC(),["HWM"]:()=>this.hlwmC(),["LSP"]:()=>this.lspC(),["SSI"]:()=>this.ssinC(),["WTA"]:()=>this.weguC()})[t]()}attThreshold=0;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i);return r.addEffect("AT",this.code),r}enforceEffect(t){this.attThreshold<=t.attack?this.m(t).forEach(i=>{t.addModSafe(i)}):t.removeModSafe(t.id)}cyinC(){this.faction="A",this.rarity="R",this.name="Cypien Infiltrator",this.iAttack=this.boof61117,this.iHealth=this.iAttack-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.`,this.m=this.cyinM}cyinM(t){return[b.mod("BT",!0,t.id)]}hlwmC(){this.faction="A",this.rarity="L",this.name="Hinterland Watchman",this.iAttack=this.lValN([4,7,15]),this.iHealth=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.m=this.hlwmM}hlwmM(t){const i=[b.mod("MB",3,t.id)];return this.level>1&&i.push(b.mod("AR",5,t.id)),this.level===3&&(i.push(b.mod("BT",!0,t.id)),i.push(b.mod("AG",!0,t.id)),i.push(b.mod("RG",5,t.id))),i}lspC(){this.faction="A",this.rarity="C",this.name="Lightshield Patrol",this.iAttack=this.lValN([4,7,15]),this.iHealth=this.boof51020,this.tribe.push("HM"),this.attThreshold=this.iHealth,this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Armor ${this.boof234}.`,this.m=this.lspM}lspM(t){return[b.mod("AR",this.boof234,t.id)]}ssinC(){this.faction="A",this.rarity="R",this.name="Spiritsteel Infiltrator",this.iAttack=this.boof4815,this.iHealth=this.iAttack+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}.`,this.m=this.ssinM}ssinM(t){return[b.mod("MB",this.level,t.id),b.mod("AR",this.boof246,t.id)]}weguC(){this.faction="U",this.rarity="L",this.name="Wegu, the Ancient",this.iAttack=0,this.iHealth=1,this.tribe.push("PL"),this.iDefend=!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 ${y.jr9(t,t)} for each health you gained.~While Wegu has ${this.attThreshold} or more attack, ${i}Negate Defender from it.`,this.m=this.weguM}weguM(t){const i=[b.mod("ND",!0,t.id)];return this.level===3&&i.push(b.mod("BT",!0,t.id)),i}}class Pi extends P{friendNotMe(t){const i=b.crNotMeTarg(t.id);return i.player=k.toTarget(t.owner),i}friendNone(t){const i=b.crTarg();return i.player=k.toTarget(t.owner),i.lanes=[],i}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforcementActive(t){return t.status==="A"}applyEffect(t,i,r){const n=this.friendNotMe(t),c=p.creatByTarget(n),f=p.creatByTarget(r);c.forEach(m=>{f.includes(m)?m.addModSafe(i):m.removeModSafe(t.id)})}}class we extends Pi{cons(t){({["BWW"]:()=>this.bwwC(),["HTR"]:()=>this.hrtC(),["KKK"]:()=>this.kkkC(),["LVG"]:()=>this.lvgC(),["LTT"]:()=>this.lntC(),["SFE"]:()=>this.sfeC(),["TCN"]:()=>this.tcanC(),["XDV"]:()=>this.xdvC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;m;enforceEffect(t){const i=this.m(t),r=this.enforcementActive(t)?this.t(t):this.friendNone(t);this.applyEffect(t,i,r)}bwwC(){this.faction="T",this.rarity="H",this.name="Borean Windweaver",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.iMobile=this.level,this.tribe.push("WN","AS"),this.text=`Each other friendly creature gets Mobility ${this.level}.`,this.t=this.friendNotMe,this.m=this.bwwM}bwwM(t){return b.mod("MB",this.level,t.id)}hrtC(){this.faction="U",this.rarity="L",this.name="Heart Tree",this.iAttack=0,this.iHealth=this.lValN([10,15,30]),this.iRegen=this.boof246,this.iDefend=!0,this.tribe.push("PL"),this.text=`Each other friendly creature gets Regenerate ${this.iRegen}.`,this.t=this.friendNotMe,this.m=this.hrtM}hrtM(t){return b.mod("RG",this.iRegen,t.id)}kkkC(){if(this.faction="T",this.rarity="L",this.name="Korok, Khan of Kadras",this.iAttack=this.lValN([4,7,12,18]),this.iHealth=this.lValN([7,12,18,26]),this.iAggro=!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.t=this.kkkT,this.m=this.kkkM}kkkM(t){return b.mod("AG",!0,t.id)}kkkT(t){const i=this.friendNotMe(t);return this.level===1?i.lanes=[]:i.level=w.ddf2(this.level-1),i}lvgC(){this.faction="T",this.rarity="T",this.name="Lava Golem",this.iAttack=4,this.iHealth=6,this.maxLevel=1,this.tribe.push("FR","EL"),this.text=`Friendly creature have ${y.jr9(4,0)}.`,this.t=this.friendNotMe,this.m=this.lvgM}lvgM(t){return b.mod("AT",4,t.id)}lntC(){this.faction="T",this.rarity="T",this.name="Lightning Titan",this.iAttack=6,this.iHealth=4,this.maxLevel=1,this.iAggro=!0,this.tribe.push("LT","EL"),this.text="Friendly creature have Aggressive.",this.t=this.friendNotMe,this.m=this.lntM}lntM(t){return b.mod("AG",!0,t.id)}sfeC(){this.faction="T",this.rarity="H",this.name="Shadowflame Elemental",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.iAggro=!0,this.tribe.push("DF","EL"),this.text="Each other friendly Darkforged gets Aggressive.",this.t=this.sfeT,this.m=this.sfeM}sfeM(t){return b.mod("AG",!0,t.id)}sfeT(t){const i=this.friendNotMe(t);return i.tribe="DF",i}tcanC(){this.faction="A",this.rarity="C",this.name="Tower Cannoneer",this.iAttack=this.lValN([6,12,14]),this.iHealth=this.iAttack-2,this.tribe.push("RB"),this.level===2&&(this.hints=["LB"]),this.text=`Each friendly Defender gets ${y.jr9(this.boof369,0)}`,this.t=this.tcanT,this.m=this.tcanM}tcanM(t){return b.mod("AT",this.boof369,t.id)}tcanT(t){const i=this.friendNotMe(t);return i.hasDefender=!0,i}xdvC(){this.faction="N",this.rarity="H",this.name="Xrath, Dreadnight Of Varna",this.iAttack=this.boof5914,this.iHealth=this.iAttack+1,this.iRegen=this.boof248,this.tribe.push("ZB"),this.text=`Each other friendly Zombie gets Regenerate ${this.iRegen}`,this.t=this.xdvT,this.m=this.xdvM}xdvM(t){return b.mod("RG",this.iRegen,t.id)}xdvT(t){const i=this.friendNotMe(t);return i.tribe="ZB",i}}class Mi extends P{cons(t){({["NXP"]:()=>this.nxpC(),["SKG"]:()=>this.skgC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){t.lane===3?this.m(t).forEach(i=>{t.addModSafe(i)}):t.removeModSafe(t.id)}nxpC(){this.faction="A",this.rarity="C",this.name="Nexus Pilot",this.iAttack=this.boof358,this.iHealth=this.boof4710,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets ${y.jr9(this.iAttack,this.iHealth)}.`,this.m=this.nxpM}nxpM(t){return[b.mod("AT",this.iAttack,t.id),b.mod("HL",this.iHealth,t.id),b.mod("MH",this.iHealth,t.id)]}skgC(){this.faction="A",this.rarity="C",this.name="Skyknight Glider",this.iAttack=this.boof5916,this.iHealth=this.iAttack+1,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets Mobility 2.`,this.m=this.skgM}skgM(t){return[b.mod("MB",2,t.id)]}}class ei extends P{cons(t){({["CCT"]:()=>this.cctC(),["GHB"]:()=>this.ghbC(),["ISB"]:()=>this.isbC(),["PYG"]:()=>this.pygC()})[t]()}eOpp=!1;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){!!t.opposed===this.eOpp?t.addModSafe(this.m(t)):t.removeModSafe(t.id)}cctC(){this.faction="T",this.rarity="R",this.name="Cloudcleaver Titan",this.iAttack=this.boof4812,this.iHealth=this.lValN([7,10,16]),this.tribe.push("WN","GT"),this.iMobile=this.level;const t=this.boof246;this.text=`While ${this.name} is unopposed, it gets ${y.jr9(t,0)}.`,this.m=this.cctM}cctM(t){return b.mod("AT",this.boof246,t.id)}ghbC(){this.faction="U",this.rarity="R",this.name="Gemhide Basher",this.iAttack=this.lValN([5,10,16]),this.iHealth=this.lValN([3,7,10]),this.tribe.push("DN"),this.eOpp=!0,this.text=`While ${this.name} is opposed, it gets Aggressive.`,this.m=this.ghbM}ghbM(t){return b.mod("AG",!0,t.id)}isbC(){this.faction="T",this.rarity="C",this.name="Iceshard Berserker",this.iAttack=this.boof358,this.iHealth=this.boof61016,this.tribe.push("IC","AS"),this.eOpp=!0,this.text=`While ${this.name} is opposed, it gets ${y.jr9(this.iHealth,0)}.`,this.m=this.isbM}isbM(t){return b.mod("AT",this.iHealth,t.id)}pygC(){this.faction="T",this.rarity="H",this.name="Pyre Giant",this.iAttack=this.boof468,this.iHealth=this.boof234,this.tribe.push("FR","GT"),this.iAggro=!0,this.text=`While ${this.name} is unopposed, it gets ${y.jr9(this.iAttack,0)}.`,this.m=this.pygM}pygM(t){return b.mod("AT",this.iAttack,t.id)}}class Ei extends P{cons(t){({["BRS"]:()=>this.barryC(),["CSR"]:()=>this.cvsC()})[t]()}mPlayer=0;targetPlayer(t){if(this.mPlayer===1)return t.owner;if(this.mPlayer===-1)return!t.owner;throw new Error("didnt write code OBDD")}constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=t.status==="A",r=this.targetPlayer(t);i?k.addModSafe(r,this.m(t)):k.removeModSafe(r,t.id)}barryC(){this.faction="A",this.rarity="C",this.name="Barrier Soldier",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("HM"),this.mPlayer=1,this.hints=[this.lValH(["ZZ-1","ZZ-3","ZZ-5"])],this.text=`You get Armor ${this.iHealth}.`,this.m=this.barryM}barryM(t){return b.mod("AR",this.iHealth,t.id)}cvsC(){this.faction="U",this.rarity="C",this.name="Cavern Serpent",this.iAttack=this.boof4914,this.iHealth=this.iAttack,this.tribe.push("SN"),this.mPlayer=-1,this.text=`The enemy player has Poison ${this.boof246}.`,this.m=this.cvsM}cvsM(t){return b.mod("PN",this.boof246,t.id)}}class Ze extends Pi{cons(t){({["ALG"]:()=>this.algnC(),["ALS"]:()=>this.alstC(),["BTN"]:()=>this.btcC(),["NXA"]:()=>this.aeroC(),["NXT"]:()=>this.ntcC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}m;nexus=!1;enforcementActive(t){return super.enforcementActive(t)?this.nexus?t.lane===3:!0:!1}enforceEffect(t){const i=this.m(t);let r;this.enforcementActive(t)?(r=this.friendNotMe(t),this.nexus?r.lanes=[1,2,4,5]:r.lanes=t.adjacent):r=this.friendNone(t),this.applyEffect(t,i,r)}algnC(){this.faction="A",this.rarity="R",this.name="Alloyin General",this.iAttack=this.boof246,this.iHealth=this.boof81318,this.tribe.push("HM"),this.text=`Adjacent creatures gets ${y.jr9(this.iAttack,0)}.`,this.m=this.algnM}algnM(t){return b.mod("AT",this.iAttack,t.id)}alstC(){this.faction="A",this.rarity="H",this.name="Alloyin Strategist",this.iAttack=this.boof4814,this.iHealth=this.iAttack+1,this.iMobile=this.level,this.tribe.push("HM");const t=this.boof246;this.text=`Adjacent creatures gets ${y.jr9(t,0)}.`,this.m=this.alstM}alstM(t){return b.mod("AT",this.boof246,t.id)}btcC(){this.faction="A",this.rarity="H",this.name="Battle Techtician",this.iAttack=this.boof3714,this.iHealth=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 ${y.jr9(t,0)}.`,this.m=this.btcM}btcM(t){return b.mod("AT",this.boof248,t.id)}aeroC(){this.faction="A",this.rarity="L",this.name="Nexus Aeronaut",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.iMobile=1;const t=this.boof236;this.nexus=!0,this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${y.jr9(t,0)}. Otherwise this gets Armor ${t}.`,this.m=this.aeroM}aeroM(t){return b.mod("AT",this.boof236,t.id)}ntcC(){this.faction="A",this.rarity="H",this.name="Nexus Techtician",this.iHealth=this.boof6916,this.iAttack=this.iHealth-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 ${t}.`,this.m=this.ntcM}ntcM(t){return b.mod("AR",this.boof235,t.id)}}class Ge extends P{cons(t){({["BWD"]:()=>this.bwdC(),["BTS"]:()=>this.btsC(),["ESC"]:()=>this.escarC(),["EHN"]:()=>this.ethhC(),["POD"]:()=>this.podC(),["RWC"]:()=>this.roamC()})[t]()}targAction(t){this.replc(this.spawnCode,t.playerA,t.lane)}adjacent=!1;optional=!1;needsEmpty=!1;spawnCode="";ftext="";allied="X";constructor(t){super(t),this.cons(this.cardCode());const i=y.forglied(this.allied);this.text=i+": "+this.ftext}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){if(this.cardCode()==="POD"&&!L.patron("U")){x.triggerDone();return}if(this.allied==="X"||L.allied(this.allied)){const i=p.creatByTr(t),r=b.emptyPlayerActTarg("F","CARD",this.code,t.creatId);this.needsEmpty||(r.field="A",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>c!==i.lane)),this.adjacent&&(r.lanes=i.adjacent);const n=w.toActions(r);n.length>0?(this.optional&&n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){this.targAction(t),T.actionDone(!0)}bwdC(){this.faction="U",this.rarity="C",this.name="Branchweaver Druid",this.iAttack=1,this.iHealth=1,this.tribe.push("HM"),this.hints=["RT"],this.spawnCode=`${"TFD"}${this.level}`,this.optional=!0;const t=W.getCard(this.spawnCode);this.ftext=`You may put a ${y.tokName(t)} into another lane.`}btsC(){this.faction="U",this.rarity="C",this.name="Brighttusk Sower",this.iAttack=this.lValN([6,8,10]),this.iHealth=this.iAttack,this.tribe.push("TK"),this.level===1&&(this.hints=["ZZ-1"]),this.spawnCode=K.minionCode(this.level),this.optional=!0,this.adjacent=!0;const t=W.getCard(this.spawnCode);this.ftext=`You may put a ${y.tokName(t)} into an adjacent lane.`}escarC(){this.faction="A",this.rarity="H",this.name="Esperian Scarab",this.iAttack=this.lValN([3,4,7]),this.iHealth=this.boof5711,this.iArmor=this.boof135,this.tribe.push("RB"),this.allied="U",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.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("ST","WF"),this.needsEmpty=!0,this.spawnCode=this.code,this.ftext="Put a copy of this into an available lane."}podC(){this.faction="U",this.rarity="H",this.name="Patron of Deepwood",this.iHealth=this.boof4713,this.iAttack=this.iHealth+3,this.tribe.push("ST"),this.spawnCode=this.code,this.optional=!0,this.adjacent=!0,this.ftext=`If you have three or more Uterra cards in your hand, you may put a copy of ${this.name} into an adjacent lane.`}roamC(){this.faction="U",this.rarity="C",this.name="Roaming Warclaw",this.iAttack=this.boof61016,this.iHealth=this.iAttack-3,this.tribe.push("DN"),this.spawnCode=`${"RPT"}${this.level}`,this.optional=!0,this.ftext="You may put a 1/1 Raptor into another lane."}}class jr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Epoch Hawk",this.iAttack=this.boof469,this.iHealth=this.boof71117,this.tribe.push("MC");const i=W.getCard(this.soldier);this.addSp("N",i.iAttack),this.text=`While you have 6 or more cards in hand, this gets "Activate: Put a ${y.tokName(i)} into an available lane."`,this.bonus=this.multNug(this.spawnNug(i,"TX"),.3)}canActivate(t){return k.toPlayer(t.owner).hand.length>5&&p.emptyLanes(t.owner).length>0}startActivation(t){const i=b.emptyPlayerActTarg(t.owner,"CARD",this.code,t.id),r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){this.logAct(!0),this.poot(this.soldier,t.playerA,t.lane),p.jr5(t.param).endActivation()}ddf8(t){return!0}jr8(t){const i=k.toPlayer(t.owner);k.drawCard(i,1);const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.triggers.splice(r,1),x.triggerDone()}get soldier(){return "EPS"+this.level}}class Qr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Esperian Sage",this.iAttack=this.boof3510,this.iHealth=this.boof124,this.tribe.push("HM"),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 r=super.jr3(t,i),n=r.jr4("FR");n.interactive=!0;const c=r.jr4("EF");return c.interactive=!0,r}handleAction(t){if(t.zone==="H")L.levelAndDiscardA(t),this.anim8(t.param);else{const i=t;p.birth(this.code,"R",i.playerA,i.lane,"U")}T.actionDone(!0)}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(t.trigger.type==="FR")if(L.allied("U")){const i=p.creatByTr(t),r=b.actionTarget("TF","CARD",this.code,t.creatId);r.player="F",r.lanes=p.laneIdx.filter(c=>c!==i.lane),r.hint=["FL"];const n=w.toActions(r);n.push(T.noneEndTrigger()),T.ddf5(n)}else x.triggerDone();else{const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}}}class Jr extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Esperian Steelplate",this.iAttack=this.boof369,this.iHealth=this.boof6916,this.tribe.push("IN");const i=this.boof358;this.addSp("H",i),this.text=`Activate: Heal ${i} damage from each other friendly creature.~Allied Alloyin: Armor ${this.boof247}.`,this.bonus=this.buffNug(0,i,"TW")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){const i=b.crFriendNotMeTarg(t.id);return p.creatByTarget(i).length>0}startActivation(t){const i=w.boardTarget("CARD",this.code);i.param=t.id,T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=this.boof358,n=b.crFriendNotMeTarg(i.id);p.creatByTarget(n).forEach(c=>{c.heal(r)}),i.endActivation()}jr8(t){L.allied("A")&&p.creatByTr(t).addArmor(this.boof247),x.triggerDone()}}class _r extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Everflame Phoenix",this.iAttack=this.lValN([7,0,22]),this.iHealth=this.lValN([6,1,15]),this.tribe.push("PX"),this.iMobile=this.lValN([1,0,2]),this.level===2?(this.iDefend=!0,this.text=`When you gain a rank, replace ${this.name} with a level 3 ${this.name}.`,this.hints=["LG"]):this.level===3&&(this.text=`Vengeance: Put a level 2 ${this.name} into this lane.`,this.hints=["ZZ-3"])}jr3(t,i){const r=super.jr3(t,i);if(this.level===2){const n=r.jr4("RU");n.bonus=this.buffNug(10,9,"TH")}else if(this.level===3){const n=r.jr4("VN");n.bonus=this.statSpawnNug(0,1)}return r}ddf8(t){return t.event.playerA===t.owner}jr8(t){if(t.trigger.type==="RU"){const i=p.creatByTr(t);this.replc(`${"EFP"}3`,i.owner,i.lane)}else if(t.trigger.type==="VN"){const r=I.toCreature(t.event).creature;this.replc(`${"EFP"}2`,r.owner,r.lane)}x.triggerDone()}}class ts extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Everflow Eidolon",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("PL"),this.text=`When ${this.name} gains health, you gain ${this.level===3?"2x ":""}that much health.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("HG");return n.bonus=this.playerNug(this.iHealth/2,"TW"),n.batch=!0,r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=this.level===3?2:1;this.balm(t.owner,t.event.healAmt*i,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class es extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Frostmane Dragon",this.iAttack=this.lValN([6,9,13]),this.iHealth=this.iAttack+1,this.tribe.push("IC","DG"),this.hints=["ZZ-1"],this.iMobile=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 r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){this.poot(`${"FME"}${this.level}`,t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);if(t.event.code==="ENT"){const r=i.jr4("TS");r.interactive=!0,r.changes=!0,r.bonus=this.rawNug(1,0,6,0,0,"TX"),this.anim8(i),x.triggerDone()}else if(t.event.code==="TRS"){const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.removeTrigger(i.triggers[r]);const n=b.emptyPlayerActTarg("F","CARD",this.code,""),c=w.toActions(n);c.length===0?x.triggerDone():(c.push(T.noneEndTrigger()),T.ddf5(c))}}}class is extends vt{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 ${y.jr9(i,0)} this turn.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.friends().length>0)return b.crEnemyActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.friends(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{this.logSpell(r);const n=this.boof4711;this.smack(p.jr5(i[1]),n),this.modA(r,b.modT("AT",n)),T.spellCast()}}friends(t=""){const i=b.crFriendActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class rs extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Frostspeaker Shaman",this.iAttack=this.boof248,this.iHealth=this.boof71116,this.iDefend=!0,this.tribe.push("IC","YT"),this.addSp("D",this.iAttack),this.text=`Activate: Deal ${this.iAttack} damage to an enemy creature or player.`,this.bonus=this.buffNug(this.iAttack,0,"TX")}canActivate(t){return!0}startActivation(t){const i=b.crEnemyActTarg("CARD",this.code,t.id),r=b.playerActTarg("E","CARD",this.code,t.id),n=w.toActions([i,r]);n.push(T.cancelAction()),T.ddf5(n)}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.smack(r,this.iAttack)}else{this.logAct(!0);const r=t;this.ouch(r.playerA,this.iAttack),this.anim8(i)}i.endActivation()}}class ss extends vt{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.`}firstT(){if(this.baddies().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.canArmor=!0,t}else return}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=T.cancelAction(),c=this.baddies(r.id);c.push(n),T.ddf5(c)}else{const n=p.jr5(i[1]);this.logSpell(n);const c=this.boof2510;n.addArmor(c),this.smack(r,n.armor),T.spellCast()}}baddies(t=""){return w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t)))}}class as extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Gemhide Ravager",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("DN"),this.text=`When ${this.name} ${y.dbdtap()}, you gain that much health.~Allied Tempys: Mobility ${this.level}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.playerNug(this.iAttack,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="FR")L.allied("T")&&p.creatByTr(t).addMobility(this.level,"T"),x.triggerDone();else if(t.trigger.type==="DM"){const i=t.event;this.balm(t.owner,i.dmg),this.anim8(t.creatId),x.triggerDone()}}}class ns extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Glaceus, Tundra Tyrant",this.iAttack=this.boof5916,this.iHealth=this.iAttack+2,this.tribe.push("IC","EL");const i=`Gain Rank: each enemy ${y.levelGateText(this.level)}creature gets "When this is dealt damage, destroy it."`,r=this.level===3?"At the start of each turn, deal 1 damage to each enemy creature.~":"";this.text=r+i}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RU");if(n.bonus=this.statSpawnNug(0,0,"TH"),this.level===3){const c=r.jr4("TS");c.bonus=this.buffNug(3,0,"TW")}return r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.isCreatTarg&&i.target===t.creatId)return!0}return t.trigger.type==="RU"?t.event.playerA===t.owner:t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="RU"){const i=b.crEnemyTarg();i.level=w.ddf2(this.level),p.creatByTarget(i).forEach(r=>{const n=r.jr4("DM",this.code);n.bonus=this.rawNug(0,0,0,0,-.5*this.level),n.changes=!0,this.anim8(r)})}else if(t.trigger.type==="TS"){const i=E.tick();p.qEnemyCreats().forEach(r=>{this.smack(r,1,i)})}else if(t.trigger.type==="DM"){const i=p.creatByTr(t);i.status==="A"&&this.kill(i)}x.triggerDone()}}class os extends P{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Grapplevine",this.iAttack=this.boof357,this.iHealth=this.lValN([9,12,18]),this.tribe.push("PL"),this.text="Negate Mobility from each creature.",this.level===3&&(this.hints=["ZZ+2"])}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=p.qActiveCreats();t.status==="A"?i.forEach(r=>{r.addModSafe(b.mod("NM",!0,t.id))}):i.forEach(r=>{r.removeModSafe(t.id)})}}class hs extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Grave Pact",this.free=this.level===3,this.free||(this.hints=["LG"]),this.text=`Destroy a friendly creature.~Destroy an ${y.levelGateText(this.level+1)}enemy creature.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.enemyTargActions().length>0)return b.crFriendActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.enemyTargActions(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{this.logSpell();const n=E.tick();this.kill(p.jr5(i[1]),n),this.kill(r,n),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return i.level=w.ddf2(this.level+1),w.toActions(i)}}class ls extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="G.S.F. Commando",this.iAttack=this.lValN([3,6,11]),this.iHealth=this.lValN([8,12,19]),this.iArmor=this.level,this.tribe.push("MM"),this.text=`Forge: ${this.name} gets Armor 1 for each other friendly Metamind.~Activate: Deal damage equal to ${this.level}x ${this.name}'s Armor to an enemy creature.`,this.bonus=this.buffNug(0,2*this.level,"TX")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.armor>0&&p.qEnemyCreats().length>0}startActivation(t){const i=b.crEnemyActTarg("CARD",this.code,t.id);T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){const i=p.jr5(t.param);this.smack(p.ddf6(t),i.armor*this.level),i.endActivation()}jr8(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="MM";const r=p.creatByTarget(i).length;r>0&&p.creatByTr(t).addArmor(r),x.triggerDone()}}class cs extends vt{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Guardians Assemble",this.free=this.level===3,this.free||(this.hints=["LG"]);const i=this.level===1?"Put a copy of a random Forge Guardian from your deck":"Search your deck for a Forge Guardian and put a copy";this.text=`${i} into the center lane.`}canPlay(){return this.voltrons(!1).length>0}playTargets(){const t=b.actionTarget("TF","CARD",this.code,"");return t.player="F",t.lanes=3,this.level>1&&(t.param="P1"),[t]}voltrons(t){const i=k.getActive(),r=b.target("DK");r.player=k.toTarget(i),r.tribe="GD";const n=bt.generateContent(i.deck,!1,r);return t?bt.uniqueContent(n):n}tron(t){this.replc(t,k.activeA,3)}handleAction(t){if(this.level===1){const i=this.voltrons(!1),r=i[S.randInt(0,i.length)].cardCode;this.logSpell(),this.tron(r),T.spellCast()}else if(t.param==="P1"){const i=this.voltrons(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else this.logSpell(),this.tron(t.card),gt.popMode(),T.spellCast()}}class us extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="H.E.R.M.E.S.",this.iAttack=this.boof6915,this.iHealth=this.iAttack,this.tribe.push("RB"),this.text=`At the end of your turn, each other friendly creature gets Defender and Armor ${this.boof124} until the end of the next turn.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TE",this.code);n.bonus=this.playerNug(0,"TX");const c=r.addEffect("PS",this.code);return c.area="C",r}ddf8(t){return!0}jr8(t){const i=p.creatByTr(t);this.enforceEffect(i),this.anim8(i),x.triggerDone()}enforceEffect(t){const i=this.boof124,r=b.crNotMeTarg(t.id);r.player=k.toTarget(t.owner);const n=p.creatByTarget(r),c=t.status==="A",f=k.activeA===t.owner,m=Qt.phase==="ET"||Qt.phase==="PT";c&&(f&&m||!f&&!m)?n.forEach(C=>{C.addModSafe(b.mod("AR",i,t.id)),C.addModSafe(b.mod("DF",!0,t.id))}):n.forEach(C=>{C.removeModSafe(t.id)})}}class ds extends vt{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.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.enemyTargActions().length>0)return b.crFriendActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.enemyTargActions(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[1]);this.logSpell(n,r);const c=this.boof359;this.buffA(n,c),this.buffA(r,-c),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class fs extends P{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Hunting Pack",this.iAttack=this.boof3612,this.iHealth=this.boof248,this.tribe.push("WF"),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 r=super.jr3(t,i),n=r.jr4("EF");return n.interactive=!0,r}handleAction(t){this.poot(this,t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(S.randInt(0,nt.simOn?4:2)===1){const r=b.emptyPlayerActTarg("F","CARD",this.code,""),n=b.actionTarget("TB","NOTR",this.code,""),c=w.toActions([r,n]);c.length===1?x.triggerDone():T.ddf5(c)}else x.triggerDone()}}class gs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Iniog, Carrion Demon",this.iAttack=this.lValN([0,12,20]),this.iHealth=this.boof3713,this.tribe.push("DM");let i;this.level===1?(this.iDefend=!0,i=5):(this.iMobile=1,this.iRegen=this.level===2?5:10,i=10,this.hints=["ZZ-5"]);let r;this.level===3?r="When this gains health, deal that much damage to the enemy player.~Vengeance: Put a level 1 Iniog into this lane.":r=`When a creature is destroyed, this gets Regenerate 1.~At the end of your turn, if this has Regenerate ${i} or higher, replace it with a level ${this.level+1} Iniog.`,this.text=r}jr3(t,i){const r=super.jr3(t,i);if(this.level===3){const n=r.jr4("HG");n.bonus=this.playerNug(4,"TX"),n.batch=!0;const c=r.jr4("VN");c.bonus=this.buffNug(0,3)}else{const n=r.jr4("DS");n.bonus=this.regnNug(2);const c=r.jr4("TE"),f=W.getCard(this.levelUpCard());c.bonus=this.multNug(this.buffNug(f.iAttack,f.iHealth,"TX"),.4)}return r}ddf8(t){return t.trigger.type==="TE"?t.event.playerA===t.owner:t.trigger.type==="HG"?t.event.creatId===t.creatId:t.trigger.type==="DS"}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="HG")this.ouch(!t.owner,t.event.healAmt,t.draw),t.draw&&this.anim8(i);else if(t.trigger.type==="VN")this.poot("ICD"+"1",i.owner,i.lane);else if(t.trigger.type==="DS")this.regn(i,1);else if(t.trigger.type==="TE"){const r=this.level===1?4:9;i.regen>r&&this.replc(this.levelUpCard(),i.owner,i.lane)}x.triggerDone()}}class ms extends P{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Flame",this.iAttack=this.lValN([7,12,20]),this.iHealth=this.boof6915,this.tribe.push("FR","EL"),this.iAggro=!0,this.text=`When Iztek ${y.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 r=super.jr3(t,i),n=r.jr4("PC");n.bonus=this.buffNug(0,this.iAttack);const c=r.jr4("DM");return c.bonus=this.buffNug(this.iAttack,0,"TP"),r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId}else if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.owner)return i.cardCode.slice(0,3)==="IFR"}return!1}jr8(t){const i=p.creatByTr(t);t.trigger.type==="DM"?(this.ouch(!t.owner,t.event.dmg),this.anim8(i)):t.trigger.type==="PC"&&this.replc(`${"IZR"}${this.level}`,i.owner,i.lane),x.triggerDone()}}class ps extends P{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Frost",this.iAttack=this.boof6915,this.iHealth=this.lValN([7,12,20]),this.tribe.push("IC","EL"),this.iAggro=!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.`,this.bonus=this.buffNug(i,0,"TW")}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.buffNug(0,this.iAttack,"TW"),r}canActivate(t){return!0}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["HR"];const r=w.toActions([i,w.buttonTarget("CANC")]);T.ddf5(r)}handleAction(t){this.logAct(!0),this.smack(p.ddf6(t),this.boof2510),p.jr5(t.param).endActivation()}ddf8(t){return t.event.playerA===t.owner&&t.event.cardCode.slice(0,3)==="IFL"}jr8(t){const i=p.creatByTr(t);this.replc(`${"IZL"}${this.level}`,i.owner,i.lane),x.triggerDone()}}class ys extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Killer Bee",this.iAttack=this.boof135,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("IN"),this.hints=[this.lValH(["ZZ+2","ZZ+2","ZZ+3"])];const i=this.lValS(["Poison 1","Poison 3","that much Poison"]);this.text=`When ${this.name} deals battle damage to a creature or player, they get ${i}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.regnNug(this.iAttack,"TP"),n.bonus.pHealth=this.iAttack,r}ddf8(t){return t.event.battle&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){const i=I.toDamage(t.event),r=this.lValN([1,3,i.dmg]);i.isCreatTarg?i.hurtCreat.addPoison(r):(k.addPoison(i.hurtPlayer,r),this.anim8(i.srcCreat)),x.triggerDone()}}class bs extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Killion, Infinity Warden",this.maxLevel=4,this.iAttack=this.lValN([6,9,16,22]),this.iHealth=this.lValN([3,7,14,20]),this.tribe.push("FB");let i;this.level<3?i=`a ${y.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 r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=this.level<4,r}handleAction(t){const i=k.getActive();if(t.zone==="N"){const r=W.getCard(i.discard[t.position]);i.discard[t.position]=r.levelUpCard(),gt.popMode(),this.anim8(t.param),T.actionDone(!0)}else Dt.levelInHand(i,t.position,W.getCard(t.card).levelUpCard()),this.anim8(t.param),this.discardLevel(!0,t.param)}jr8(t){if(this.level<3)this.discardLevel(!1,t.creatId);else if(this.level===3){const i=w.toActions(b.lvlHandActTarg(this.code,t.creatId));i.length>0?T.ddf5(i):this.discardLevel(!1,t.creatId)}else{const i=k.getActive();this.levelDeck(i.deck),this.levelDeck(i.discard),i.hand.forEach((r,n)=>{const c=W.getCard(r).levelUpCard();c!==r&&Dt.levelInHand(i,n,c)}),this.anim8(t.creatId),x.triggerDone()}}discardLevel(t,i){const r=k.getActive(),n=b.target("TD");n.player=k.toTarget(r),n.level=w.ddf2(this.level),n.canLevel=!0;let c=bt.generateContent(r.discard,!1,n);if(c.length>0){E.aiActive&&(c=bt.uniqueContent(c));const f=c.map(m=>{const C=b.deckSelectAction("CARD",m.cardCode,m.sourceIdx);return C.param=i,C.host=this.code,C.hint=["CD"],C});bt.showCustomDeck(c,f)}else t?T.actionDone(!0):x.triggerDone()}levelDeck(t){t.map(r=>W.getCard(r).levelUpCard()).forEach((r,n)=>t[n]=r)}}class As extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Lavafused Asir",this.iAttack=this.boof369,this.iHealth=this.iAttack*2,this.tribe.push("FR","AS"),this.text=`While a friendly creature is unopposed, gets ${y.jr9(this.iAttack,0)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=t.status!=="A",r=b.mod("AT",this.iAttack,t.id);p.qPlayerCreats(t.owner).forEach(n=>{n.opposed||i?n.removeModSafe(t.id):n.addModSafe(r)})}}class ks extends P{constructor(t){if(super(t),this.faction="U",this.rarity="L",this.name="Leafkin Progenitor",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("PL"),this.level===3)this.text=`Activate: Put a level 1 ${this.name} into an adjacent available lane.`,this.bonus=this.statSpawnNug(3,3,"TW");else{this.text=`Activate: Replace this with a level ${this.level+1} ${this.name}.`;const i=3*this.level;this.bonus=this.buffNug(i,i,"TX")}}canActivate(t){return this.level===3?T.emptyAdjacents(t,"").length>0:!0}startActivation(t){let i;if(this.level===3)i=T.emptyAdjacents(t,"");else{const r=b.fieldSelectAction("CARD",t.lane,t.owner);r.param=t.id,r.host=this.code,i=[r]}i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.level===3?this.poot(this.leafCode(1),t.playerA,t.lane):this.replc(this.leafCode(this.level+1),i.owner,i.lane),i.endActivation()}leafCode(t){return`${"LKP"}${t}`}}class Fe extends P{cons(t){({["AFO"]:()=>this.aetorC(),["CRS"]:()=>this.scootC(),["FOL"]:()=>this.forcC(),["NXO"]:()=>this.nexoC(),["SNK"]:()=>this.tinkC(),["TEX"]:()=>this.texC(),["TSM"]:()=>this.tsmithC()})[t]()}playTarg;optional=!1;constructor(t){super(t),this.playTarg=b.lvlHandActTarg(this.code,""),this.cons(this.cardCode()),this.text="Forge: "+this.text}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){if(this.cardCode()==="NXO"&&p.creatByTr(t).lane!==3){x.triggerDone();return}const i=w.toActions(this.playTarg);i.length>0?(i.forEach(r=>{r.param=t.creatId}),this.optional&&i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}aetorC(){this.faction="A",this.rarity="C",this.name="Aetherforge Oracle",this.iAttack=this.boof61218,this.iHealth=this.boof246,this.tribe.push("HM"),this.optional=!0,this.playTarg.card="S",this.text="You may discard and level up a spell."}scootC(){this.faction="A",this.rarity="R",this.name="Cerebral Scout",this.iAttack=this.boof51015,this.iHealth=this.boof3712,this.tribe.push("MM"),this.optional=!0,this.playTarg.tribe="MM",this.text="You may discard and level up a Metamind."}forcC(){this.faction="A",this.rarity="H",this.name="Forge Oracle",this.iAttack=this.lValN([1,10,20]),this.iHealth=this.iAttack,this.tribe.push("ST"),this.playTarg.faction="A",this.optional=!0,this.text="You may discard an Alloyin card and level it.",this.level===1?this.hints=["LG","RT"]:(this.consistent=!0,this.addSp("C",0),this.level===3&&(this.hints=["ZZ-2"]))}nexoC(){this.faction="A",this.rarity="C",this.name="Nexus Overwatch",this.iHealth=this.boof71014,this.iAttack=this.iHealth-1,this.tribe.push("HM"),this.optional=!0,this.text=`If ${this.name} is in the center lane, you may ${y.daluac()}.`}tinkC(){this.faction="A",this.rarity="C",this.name="Steelspark Tinkerer",this.iAttack=this.boof147,this.iHealth=this.lValN([9,12,21]),this.iDefend=!0,this.tribe.push("HM"),this.optional=!0,this.text=`You may ${y.daluac()}.`}texC(){this.faction="A",this.rarity="C",this.name="Tech Explorer",this.iAttack=this.lValN([1,8,18]),this.iHealth=this.iAttack+2,this.tribe.push("GN"),this.level===1&&(this.hints=["LG","RT"]),this.optional=!0,this.playTarg.card="C",this.text="You may discard and level up a creature."}tsmithC(){this.faction="A",this.rarity="C",this.name="Technosmith",this.iAttack=this.boof5915,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.optional=!0,this.text=`You may ${y.daluac()}.`}}class Ts extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Lightbringer Council",this.iAttack=this.lValN([4,8,10]),this.iHealth=this.boof71116,this.tribe.push("TK"),this.text=`When a friendly Uterra creature ${y.dbdtap()}, you gain ${this.iAttack} health.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.playerNug(this.iAttack,"TP"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner&&i.srcCreat.faction==="U"}jr8(t){this.balm(t.owner,this.iAttack,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class de extends P{cons(t){({["ASB"]:()=>this.asbC(),["CHR"]:()=>this.crgC(),["DZD"]:()=>this.dozC(),["DTR"]:()=>this.dtrC(),["FWS"]:()=>this.fwsC(),["IMD"]:()=>this.eddieC(),["LVH"]:()=>this.hiveC(),["NCM"]:()=>this.ncmbC(),["S01"]:()=>this.spcC(),["TDS"]:()=>this.tsrC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}d;cares=!0;trigB;bDraw=!0;deadOk=!1;bFac(t){return t.draw?this.faction:"X"}image(t){return this.cardCode()==="DZD"?this.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.cares){const n=r.jr4("DM");n.bonus=this.trigB,n.batch=this.bDraw}return r}ddf8(t){return t.event.isCreatTarg&&t.event.target===t.creatId&&(this.deadOk||p.creatByTr(t).status==="A")}jr8(t){const i=I.toDamage(t.event);this.d(t,i.hurtCreat,i),x.triggerDone()}asbC(){this.faction="A",this.rarity="L",this.name="Alyssa, Strifeborn",this.iAttack=this.lValN([2,4,10]),this.iHealth=this.lValN([12,16,24]),this.tribe.push("HM"),this.hints=["MC"],this.trigB=this.buffNug(this.iAttack,0,"TS"),this.text=`When ${this.name} is dealt non-battle damage and survives, it gets ${y.jr9(this.level,1)} for each damage dealt.`,this.d=this.asbD}asbD(t,i,r){!r.battle&&r.life>0&&i.buff(r.dmg*this.level,r.dmg,this.bFac(t))}crgC(){this.faction="U",this.rarity="L",this.name="Chrogias",this.iAttack=this.lValN([1,0,40]),this.iHealth=this.lValN([1,15,40]),this.tribe.push("PL"),this.deadOk=!0,this.level>1&&(this.hints=["MC"],this.text="When Chrogias is dealt damage, you gain that much health.",this.trigB=this.playerNug(5,"TW")),this.level===1?(this.hints=["LG","LM","RT"],this.cares=!1):this.level===2?(this.iRegen=2,this.iDefend=!0,this.hints?.push("LG")):this.level===3&&(this.iBT=!0,this.iRegen=5),this.d=this.crgD}crgD(t,i,r){this.balm(t.owner,r.dmg,t.draw),t.draw&&this.anim8(i)}dozC(){this.faction="U",this.rarity="L",this.name="Dozer, the Dormant",this.iAttack=0,this.iHealth=this.level*3+6,this.tribe.push("BR"),this.iDefend=!0,this.hints=["MC"],this.bDraw=!1,this.level===1&&this.hints.push("ZZ-2"),this.trigB=this.buffNug(this.iHealth,0,"TW"),this.trigB.bonus=.3;const t=W.getCard(this.dz());this.text=`When ${this.name} is dealt damage and survives, replace it with a ${y.tokName(t)}.`,this.d=this.dozD}dozD(t,i,r){if(i.health>0&&i.status==="A"){const n=this.replc(this.dz(),i.owner,i.lane);n&&n.setHealth(i.health)}}dz(){return "DZA"+this.level}dtrC(){this.faction="U",this.rarity="L",this.name="Dream Tree",this.iAttack=0,this.iHealth=this.lValN([7,11,20]),this.iDefend=!0,this.tribe.push("PL"),this.bDraw=!1,this.deadOk=!0,this.level===3&&(this.iRegen=5),this.hints=["MC"],this.trigB=this.avgSpawnNug(),this.trigB.threat="TX",this.text=`When ${this.name} is dealt damage and survives, if it is your turn, you may play an additional card this turn.`,this.d=this.dtrD}dtrD(t,i,r){i.owner===k.activeA&&r.life>0&&(this.logAct(!1),L.freePlay(),this.anim8(i))}fwsC(){this.faction="A",this.rarity="H",this.name="Forgewatch Sentry",this.iAttack=this.boof6912,this.iHealth=this.iAttack,this.iArmor=this.iAttack,this.tribe.push("RB"),this.bDraw=!1,this.trigB=this.rawNug(0,0,0,0,-1),this.text=`When ${this.name} is dealt damage, destroy it.`,this.d=this.fwsD}fwsD(t,i,r){i.status==="A"&&this.kill(i)}eddieC(){this.faction="A",this.rarity="L",this.name="Iron Maiden",this.iAttack=this.lValN([1,3,30]),this.iHealth=this.iAttack,this.tribe.push("RB"),this.deadOk=!0,this.consistent=this.level>1,this.level===3?(this.iBT=!0,this.hints=["MC"],this.text="When Iron Maiden is dealt damage, deal that much damage to the enemy player.",this.trigB=this.playerNug(16,"TW")):(this.cares=!1,this.hints=["LG","LM","RT"]),this.d=this.eddieD}eddieD(t,i,r){this.ouch(!t.owner,r.dmg,t.draw),t.draw&&this.anim8(i)}hiveC(){this.faction="U",this.rarity="L",this.name="Living Hive",this.iAttack=this.lValN([0,0,10]),this.iHealth=this.lValN([8,12,15]),this.tribe.push("IN","EL"),this.iDefend=this.level<3,this.deadOk=!0,this.bDraw=!1,this.hints=["MC"];const t=W.getCard(K.bee(this.level));this.text=`When ${this.name} is dealt damage, Spawn a level ${y.tokName(t)}.`,this.iDefend||(this.iBT=!0,this.text+=`~Forge: ${this.name} gets +X attack and +X health, where X is the total amount of Poison the enemy player has.`),this.trigB=this.spawnNug(t,"TX"),this.d=this.hiveD}hiveD(t,i,r){this.logAct(!1),this.spawn(K.bee(this.level),t.owner)}ncmbC(){this.faction="N",this.rarity="H",this.name="Necromoeba",this.iAttack=this.boof4710,this.iHealth=this.boof71117,this.tribe.push("OZ"),this.iRegen=3,this.deadOk=!0,this.bDraw=!1,this.hints=["MC"],this.level===1&&this.hints.push("ZZ-1");const t=W.getCard(K.purpOzC(this.level));this.text=`When ${this.name} is dealt damage, Spawn a ${y.tokName(t)}.`,this.trigB=this.spawnNug(t,"TW"),this.d=this.ncmbD}ncmbD(t,i,r){this.logAct(!1),this.spawn(K.purpOzC(this.level),t.owner)}spcC(){this.faction="A",this.rarity="L",this.name="Specimen 001",this.iAttack=this.boof234,this.iHealth=this.lValN([12,16,22]),this.tribe.push("OZ"),this.deadOk=!0,this.bDraw=!1,this.hints=["MC"],this.trigB=this.rawNug(0,ft.calcCreatValueFormula(this.iAttack,0,this.level,0,0,!1,0),0,0,0,"TX"),this.text=`When ${this.name} is dealt non-battle damage, each other friendly creature gets ${y.jr9(this.iAttack,0)} and Armor ${this.level}.`,this.d=this.spcD}spcD(t,i,r){if(!r.battle){const n=b.crNotMeTarg(i.id);n.player=k.toTarget(i.owner),p.creatByTarget(n).forEach(c=>{this.buffA(c,this.iAttack),c.addArmor(this.level)})}}tsrC(){this.faction="U",this.rarity="L",this.name="Thundersaur",this.iAttack=0,this.iHealth=this.level*12,this.tribe.push("DN"),this.iBT=!0,this.hints=["MC",this.level===2?"ZZ-3":"ZZ-1"],this.trigB=this.buffNug(this.iHealth/2,0,"TS"),this.text=`When ${this.name} is dealt damage, it gets +1 attack for each damage dealt.`,this.d=this.tsrD}tsrD(t,i,r){i.buff(r.dmg,0,this.bFac(t))}}class vs extends de{jr3(t,i){const r=super.jr3(t,i);return this.level===3&&r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=k.totalPoison(!t.owner);i>0&&this.buffD(p.creatByTr(t),i),x.triggerDone()}else super.jr8(t)}}class Ss extends Gt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=p.creatByTarget(b.crNotMeTarg(t.creatId)),r=this.boof124;i.forEach(n=>n.addPoison(r)),x.triggerDone()}else super.jr8(t)}}class Cs extends vt{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Metatransfer",this.text=`Give a creature ${y.jr9(-this.boof579,0)}.~Discard and level up a card.`}canPlay(){return p.qActiveCreats().length>0}playTargets(){const t=b.crActTarg("CARD",this.code,"P1");return t.hint=["DB"],[t]}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=p.ddf6(t),n=b.lvlHandActTarg(this.code,S.enTil("P2",r.id));n.deckPositionSkip=T.playPosition();const c=w.toActions(n);c.length===0?(this.logSpell(r),this.buffA(r,-this.boof579),T.spellCast()):(c.push(T.cancelAction()),T.ddf5(c))}else{const r=p.jr5(i[1]);this.logSpell(r),this.buffA(r,-this.boof579);const n=t;T.shiftPlayCard(n.position),L.levelAndDiscardA(n),T.spellCast()}}}class ws extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Mimicleaf",this.iAttack=this.lValN([2,5,11]),this.iHealth=this.iAttack,this.tribe.push("PL"),this.text=`Activate: Put a level ${this.level} ${this.name} into an adjacent available lane.`,this.bonus=this.statSpawnNug(this.iAttack,this.iHealth,"TW")}canActivate(t){return T.emptyAdjacents(t,"").length>0}startActivation(t){const i=T.emptyAdjacents(t,"");i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.poot(this,t.playerA,t.lane),i.endActivation()}}class Ds extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Mimicwurm",this.iAttack=7,this.iHealth=this.iAttack,this.tribe.push("WR"),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 r=super.jr3(t,i);if(this.level>1){const n=r.jr4("FR");n.interactive=!0}return r}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1")if(this.level===3){this.wurmsign(2,t);const r=[t.lane,parseInt(i[1])],n=this.fieldActions("P2",r);T.ddf5(n)}else this.wurmsign(1,t),T.actionDone(!0);else this.wurmsign(1,t),T.actionDone(!0)}jr8(t){const i=I.toCreature(t.event);T.ddf5(this.fieldActions("P1",[i.creature.lane]))}fieldActions(t,i){const r=b.actionTarget("TF","CARD",this.code,S.enTil(t,i[0]));r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>!i.includes(c));const n=w.toActions(r);return n.push(T.noneEndTrigger()),n}wurmsign(t,i){this.replc(this.wurmCode(t),i.playerA,i.lane)}wurmCode(t){return`${"MMW"}${t}`}}class Pe extends vt{cons(t){({["BRN"]:()=>this.boutC(),["IFL"]:()=>this.izfmC(),["LSK"]:()=>this.lspkC(),["LYR"]:()=>this.rainC(),["SOK"]:()=>this.sealkC(),["STB"]:()=>this.shatC(),["SHK"]:()=>this.shkC()})[t]()}hurts=!0;burner(t,i){i?this.smack(t,this.crisp):this.ouch(t,this.crisp)}burnText(t){return`Deal ${t} damage to a creature or player.`}constructor(t){super(t),this.cons(this.cardCode())}z;crisp=0;playTargets(){const t=this.hurts?["HR"]:["BF"],i=b.crActTarg("CARD",this.code,"");i.hint=t;const r=b.actionTarget("TP","CARD",this.code,"");return r.hint=t,[i,r]}handleAction(t){let i,r;t.zone==="P"?(this.logSpell(),i=!1,r=t.playerA):(r=p.ddf6(t),this.logSpell(this.hurts?void 0:r),i=!0),this.z(r,i),T.spellCast()}boutC(){this.faction="T",this.rarity="R",this.name="Burnout",this.overload=!0,this.maxLevel=1,this.crisp=8,this.text=this.burnText(8),this.z=this.burner}izfmC(){this.faction="T",this.rarity="T",this.name="Iztek's Flame",this.crisp=this.boof6915,this.text=this.burnText(this.crisp),this.z=this.burner}lspkC(){this.faction="T",this.rarity="C",this.name="Lightning Spark",this.crisp=this.boof6812,this.text=this.burnText(this.crisp),this.z=this.burner}rainC(){this.faction="U",this.rarity="C",this.name="Lysian Rain",this.hurts=!1;const t=this.boof7911;this.text=`Give a creature or player +${t} health.`,this.z=this.rainZ}rainZ(t,i){const r=this.boof7911;i?this.buffH(t,r):this.balm(t,r)}sealkC(){this.faction="T",this.rarity="C",this.name="Seal of Kadras",this.level<3&&(this.hints=["LG"]),this.consistent=this.level>1,this.crisp=this.sealzap,this.text=this.burnText(this.crisp),this.z=this.burner}get sealzap(){return this.lValN([1,2,25])}shatC(){this.faction="T",this.rarity="C",this.name="Shatterbolt",this.crisp=this.boof5914,this.text=`Negate Armor from a creature or player this turn, then deal ${this.crisp} damage to that creature or player.`,this.z=this.shatZ}shatZ(t,i){const r=b.modT("NA",!0);if(i){const n=t;this.modA(n,r),this.smack(n,this.crisp)}else{const n=k.toPlayer(t);k.addMod(n,r),this.ouch(n,this.crisp)}}shkC(){this.faction="T",this.rarity="H",this.name="Static Shock",this.crisp=this.boof124,this.hints=["ZZ+1"],this.text=`${this.burnText(this.crisp)} You may play an additional ${y.levelGateText(this.level)}spell this turn.`,this.z=this.shkZ}shkZ(t,i){this.burner(t,i);const r=L.freeCard(this.code);r.condition.level=w.ddf2(this.level),r.condition.card="S"}}class xs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Nefrax, the Soulweaver",this.iAttack=this.boof4712,this.iHealth=this.lValN([10,15,25]),this.tribe.push("HM"),this.hints=["ZZ-2"];const i=W.getCard(this.spc());this.text=`Activate: Put a ${y.tokName(i)} into an available lane.~Forge: Destroy a friendly creature.`,this.bonus=this.spawnNug(i,"TX")}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}canActivate(t){return this.empties(t).length>0}startActivation(t){const i=this.empties(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);i[0]==="P1"?(this.logAct(!0),this.poot(this.spc(),t.playerA,t.lane),p.jr5(i[1]).endActivation()):(this.kill(p.ddf6(t)),T.actionDone(!0))}jr8(t){const i=b.crFriendActTarg("CARD",this.code,""),r=w.toActions(i);T.ddf5(r)}spc(){return "SPN"+this.level}empties(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,S.enTil("P1",t.id));return w.toActions(i)}}class Bs extends P{constructor(t){super(t),this.faction="N",this.rarity="T",this.name="Netherdrake",this.iAttack=this.boof4815,this.iHealth=this.iAttack,this.iMobile=this.lValN([0,0,1]),this.tribe.push("DG"),this.text=`When this enters play or moves into a lane, destroy the opposing ${y.levelGateText(this.level)}creature.`}image(t){return this.rawImage(`${"NSH"}${this.level}`,t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FK");return n.bonus=this.multNug(this.avgSpawnNug(),.5),n.bonus.threat="TX",r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const r=I.toCreature(t.event).creature.opposed;r&&w.levelTestCommon(r.level,this.level)&&this.kill(r),x.triggerDone()}}class Hs extends Ze{enforceEffect(t){t.lane===3?t.removeModSafe(t.id):t.addModSafe(b.mod("AR",this.boof236,t.id)),super.enforceEffect(t)}}class Ns extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Nexus Gunner",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("HM"),this.text=`Activate: Give a creature ${y.jr9(this.iAttack,0)}. Use this ability only if ${this.name} is in the center lane.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.lane===3}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["BF","BB"];const r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){const i=p.ddf6(t);this.logAct(!0,i),this.buffA(i,this.iAttack),p.jr5(t.param).endActivation()}jr8(t){const i=p.creatByTr(t);if(i.lane===3){const r=i.jr4("NT");r.bonus=this.buffNug(this.iAttack/2,0,"TW")}x.triggerDone()}}class Fs extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Nova, Grove Queen",this.iAttack=this.lValN([3,5,10,14]),this.iHealth=this.lValN([7,10,15,19]),this.tribe.push("FB"),this.maxLevel=4;const i=this.nbuf,r=this.lValS(["an adjacent","each adjacent","each","each"]);this.text=`Forge: Put a 1/1 Seedling into ${r} available space.~When a friendly creature is replaced, Nova gets ${y.jr9(i,i)}.`}get nbuf(){return this.lValN([1,3,5,10])}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");this.level===1&&(n.interactive=!0);const c=r.jr4("RP"),f=this.nbuf;return c.bonus=this.buffNug(f,f,"TS"),r}ddf8(t){const i=I.toReplaced(t.event);return t.creatId!==i.replCreatId&&t.owner===i.replCreat.owner}jr8(t){const i=p.creatByTr(t);if(t.event.code==="RPL")this.buffD(i,this.nbuf),x.triggerDone();else{const r=p.emptyLanes(t.owner);if(this.level>1){const n=this.level===2?i.adjacent.filter(f=>r.includes(f)):r,c=E.tick();n.forEach(f=>{this.poot(this.seed,i.owner,f,c)}),x.triggerDone()}else{const n=i.adjacent.filter(c=>r.includes(c));if(n.length===0)x.triggerDone();else if(n.length===1)this.poot(this.seed,i.owner,n[0]),x.triggerDone();else{const c=T.emptyAdjacents(i,"");T.ddf5(c)}}}}handleAction(t){this.poot(this.seed,t.playerA,t.lane),T.actionDone(!0)}get seed(){return "NSD"+this.level}}class Ps extends vt{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Omnomnom";const i=this.boof246,r=i*-1;this.text=`Give a friendly Zombie ${y.jr9(i,i,!0)}, and Regenerate ${i}.~Then give an enemy non-Zombie ${y.jr9(r,r)}.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.nonZombies().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.tribe="ZB",t}else return}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=T.cancelAction(),c=this.nonZombies(r.id);c.push(n),T.ddf5(c)}else{const n=p.jr5(i[1]);this.logSpell(n,r);const c=this.boof246;this.buffD(n,c),this.regn(n,c),this.buffD(r,-c),T.spellCast()}}nonZombies(t=""){return w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t))).filter(i=>!p.ddf6(i).isTribe("ZB"))}}class Ms extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Onyxium Allomancer",this.iAttack=this.boof248,this.iHealth=this.boof61016,this.tribe.push("HM");const i=this.boof358;this.text=`Activate: Discard and level up a card.~Allied Nekrium: Regenerate ${i}.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0),L.levelAndDiscardA(t);const i=p.jr5(t.param);this.anim8(i),i.endActivation()}jr8(t){L.allied("N")&&p.creatByTr(t).addRegen(this.boof358,"N"),x.triggerDone()}}class Es extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Onyxium Phantasm",this.iAttack=this.boof246,this.iHealth=this.lValN([9,12,19]),this.iRegen=this.boof124,this.tribe.push("ST");const i=this.boof4812n;this.addSp("A",i),this.text=`Allied Alloyin: Activate: Give a creature ${y.jr9(i,0)}`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.hasMod(t.id)}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["DF","DB"];const r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){const i=p.ddf6(t);this.logAct(!0,i),this.buffA(i,this.boof4812n),p.jr5(t.param).endActivation()}jr8(t){if(L.allied("A")){const i=p.creatByTr(t);i.addMod(b.mod("AL",!0,i.id),"A"),i.changed=!0;const r=i.jr4("NT");r.bonus=this.buffNug(this.boof4812,0,"TX")}x.triggerDone()}}class Rs extends vt{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Oratek Battlebrand";const i=this.boof71013;this.addSp("D",i),this.text=`Deal ${i} damage to a creature.~Allied Alloyin: You may discard a card and level it.`}canPlay(){return p.qActiveCreats().length>0}playTargets(){const t=b.crActTarg("CARD",this.code,"");return t.hint=["HR"],[t]}handleAction(t){if(t.zone==="F")if(this.logSpell(),this.smack(p.ddf6(t),this.boof71013),L.allied("A")){const i=this.levelActs();i.length===1?T.spellCast():T.ddf5(i)}else T.spellCast();else if(t.zone==="H"){const i=t;T.shiftPlayCard(i.position),L.levelAndDiscardA(i),T.spellCast()}else t.zone==="B"&&t.param==="NOTR"?T.spellCast():super.handleAction(t)}levelActs(){const t=b.actionTarget("TB","CARD",this.code,"NOTR"),i=b.lvlHandActTarg(this.code,"");return i.deckPositionSkip=T.playPosition(),w.toActions([i,t])}}class Ls extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Oratek Warhammer",this.iAttack=this.boof3713,this.iHealth=this.lValN([8,12,19]),this.iMobile=this.level,this.tribe.push("FR","AS"),this.text=`Allied Alloyin: When ${this.name} ${y.dbdtap()} on your turn, you may discard and level up a card.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){L.levelAndDiscardA(t),p.jr5(t.param).anim8("A"),T.actionDone(!0)}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}jr8(t){if(t.trigger.type==="FR"){if(L.allied("A")){const i=p.creatByTr(t),r=i.jr4("DM");r.interactive=!0,r.bonus=this.rawNug(0,0,0,0,.5,"TP"),i.changed=!0,i.anim8("A")}x.triggerDone()}else if(t.trigger.type==="DM"){const i=w.toActions(b.lvlHandActTarg(this.code,t.creatId));i.length>0?(i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}}}class Ai extends P{hitCreature;constructor(t,i){super(t),this.hitCreature=i}trigB;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.trigB,r}ddf8(t){return t.event.battle&&t.event.isCreatTarg===this.hitCreature&&t.event.isCreatSrc&&t.event.srcId===t.creatId}}class Gs extends Ai{constructor(t){super(t,!1),this.faction="U",this.rarity="L",this.name="Oros, Deepwood's Chosen",this.iAttack=this.lValN([7,11,16,0]),this.iHealth=this.iAttack,this.iBT=!0,this.maxLevel=4,this.tribe.push("FB"),this.hints=["ZZ-2"];const i=`When Oros ${y.dbdtap()}, you gain that much health.`,r=this.level===4?"Oros gets +attack and +health equal to your health.~":"";this.text=r+i,this.trigB=this.playerNug(this.iAttack/2,"TP")}jr3(t,i){const r=super.jr3(t,i);return this.level===4&&r.addEffect("PH",this.code),r}jr8(t){const i=t.event;this.balm(t.owner,i.dmg),this.anim8(t.creatId),x.triggerDone()}enforceEffect(t){const i=k.toPlayer(t.owner).health;t.status==="A"&&(t.removeModSafe(t.id,!1),t.addMod(b.mod("HL",i,t.id),"X"),t.addMod(b.mod("MH",i,t.id),"X"),t.addMod(b.mod("AT",i,t.id),"X"))}}class Is extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Othra, Apex Predator",this.iAttack=this.lValN([8,0,10]),this.iHealth=this.lValN([6,12,50]),this.tribe.push("IN"),this.level===3?(this.iMobile=1,this.text="When Othra deals battle damage to a creature or player, they get Poison 10.",this.hints=["ZZ-5"]):(this.text=`Gain Rank: Replace this with a level ${this.level+1} Othra.`,this.level===2?this.iDefend=!0:this.hints=["ZZ-1"])}jr3(t,i){const r=super.jr3(t,i);if(this.level===3){const n=r.jr4("DM");n.bonus=this.regnNug(10,"TP")}else{const n=r.jr4("RU");n.bonus=this.regnNug(this.level,"TH")}return r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.isCreatSrc&&i.srcId===t.creatId}return t.trigger.type==="RU"?t.event.playerA===t.owner:!1}jr8(t){if(t.trigger.type==="RU"){const i=p.creatByTr(t);this.replc(this.levelUpCard(),i.owner,i.lane)}else if(t.trigger.type==="DM"){const i=I.toDamage(t.event);i.isCreatTarg?i.hurtCreat.addPoison(10):(k.addPoison(i.hurtPlayer,10),this.anim8(i.srcCreat))}x.triggerDone()}}class Ws extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Oxidon Spitter",this.iAttack=this.boof7914,this.iHealth=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 r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!this.l3,r}jr8(t){if(this.l3)p.creatByTarget(b.crEnemyTarg()).forEach(i=>{i.negateArmor=!0}),x.triggerDone();else{const i=b.crEnemyActTarg("CARD",this.code,""),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),i.negateArmor=!0,T.actionDone(!0)}}class fe extends P{cons(t){({["AFS"]:()=>this.afsC(),["DMW"]:()=>this.drixC(),["FGG"]:()=>this.fggC(),["GHS"]:()=>this.mvpC(),["MMG"]:()=>this.mmgC(),["OWW"]:()=>this.owwC(),["SST"]:()=>this.sstC(),["UPM"]:()=>this.upakC(),["WFM"]:()=>this.wfmC(),["XTE"]:()=>this.xerxC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}a;t;preFight=!1;prePlay=!1;canActivate(t){return this.t(t)}startActivation(t){const i=w.boardTarget("CARD",this.code);i.param=t.id,this.preFight&&(i.hint=["BB"]),this.prePlay&&(i.hint=["DF"]),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.a(i),i.endActivation()}afsC(){this.faction="A",this.rarity="L",this.name="Arcflight Squadron",this.iAttack=this.boof4710,this.iHealth=this.iAttack+2,this.tribe.push("RB"),this.hints=[this.level===1?"ZZ-3":"ZZ-2"],this.prePlay=!0,this.text=`Activate: You may play an additional ${y.levelGateText(this.level)}Robot this turn.`,this.bonus=this.avgSpawnNug(),this.bonus.threat="TX",this.t=this.afsT,this.a=this.afsA}afsT(t){return!0}afsA(t){const i=L.freeCard(this.code);i.condition.tribe="RB",i.condition.level=w.ddf2(this.level),this.anim8(t)}drixC(){this.faction="A",this.rarity="L",this.name="Drix, the Mindwelder",this.iAttack=this.boof3612,this.iHealth=this.lValN([6,12,21]),this.tribe.push("MM"),this.preFight=!0,this.addSp("A",this.level),this.text=`Activate, discard your hand: Each friendly Metamind gets ${y.jr9(this.level,0)} for each card discarded this way.`,this.bonus=this.buffNug(3*this.level,0,"TX"),this.t=this.drixT,this.a=this.drixA}drixT(t){return k.getActive().hand.length>0}drixA(t){const i=k.toPlayer(t.owner),r=i.hand.length*this.level;Dt.cardDiscardAll(i);const n=b.crFriendTarg();n.tribe="MM",p.creatByTarget(n).forEach(c=>{this.buffA(c,r)})}fggC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Gamma",this.iAttack=this.boof4816,this.iHealth=this.iAttack,this.tribe.push("RB","GD"),this.preFight=!0;const t=W.getCard(K.fgoc(this.level));this.addSp("N",t.iAttack),this.text=`Activate, destroy five friendly Robot Guardians: Put a ${y.tokName(t)} into this lane.`,this.bonus=this.rawNug(0,0,0,0,1,"TW"),this.t=this.fggT,this.a=this.fggA}fggT(t){return p.creatByTarget(this.fggTarg()).length===5}fggA(t){const i=t.lane,r=t.owner,n=E.tick();p.creatByTarget(this.fggTarg()).forEach(c=>this.kill(c,n)),this.poot(K.fgoc(this.level),r,i)}fggTarg(){const t=b.crFriendTarg();return t.tribe="GD",t}mvpC(){this.faction="U",this.rarity="C",this.name="Gemheart Sprout",this.iAttack=this.boof357,this.iHealth=this.iAttack+this.level,this.iDefend=!0,this.tribe.push("PL"),this.preFight=!0,this.addSp("L",this.level),this.text=`Activate: You gain health equal to ${this.level}x the number of friendly creatures.`,this.bonus=this.playerNug(this.level*3,"TW"),this.t=this.mvpT,this.a=this.mvpA}mvpT(t){return!0}mvpA(t){const i=p.ddf1().length;this.balm(t.owner,i*this.level),this.anim8(t)}mmgC(){this.faction="A",this.rarity="L",this.name="Marty McGear",this.iAttack=this.boof3612,this.iHealth=this.boof71117,this.tribe.push("GN"),this.hints=[this.lValH(["ZZ-2","ZZ-2","ZZ-5"])],this.addSp("A",this.level),this.addSp("M",this.level),this.text=`Activate: Spawn a copy of a random ${y.levelGateText(this.level)}Robot from your deck. That Robot gets ${y.jr9(this.level,0)} and Armor ${this.level}.`,this.bonus=this.avgSpawnNug(),this.bonus.threat="TX",this.t=this.mmgT,this.a=this.mmgA}mmgT(t){return p.ddf1().length<5&&this.mmgBots().length>0}mmgA(t){const i=this.mmgBots(),r=i[S.randInt(0,i.length)],n=this.spawn(r,t.owner);n&&(n.addArmor(this.level),this.buffA(n,this.level))}mmgBots(){const t=b.target("DK");return t.player="F",t.tribe="RB",t.level=w.ddf2(this.level),w.deckByTarget(t).map(r=>r[0])}owwC(){this.faction="A",this.rarity="L",this.name="Oreian Warwalker",this.iAttack=this.boof359,this.iHealth=this.boof61018,this.tribe.push("RB"),this.preFight=!0;const t=this.owwbuff+1;this.addSp("A",t),this.text=`Activate: ${this.name} gets ${t}x attack.`,this.bonus=this.buffNug(2*this.iAttack,0,"TX"),this.t=this.owwT,this.a=this.owwA}owwT(t){return!0}owwA(t){this.buffA(t,t.attack*this.owwbuff)}get owwbuff(){return this.lValN([1,1,2])}sstC(){this.faction="U",this.rarity="C",this.name="Scatterspore Tiller",this.iHealth=this.boof61014,this.iAttack=this.iHealth-1,this.tribe.push("PL");const t=W.getCard(K.minionCode(this.level));this.text=`Activate: Spawn a ${y.tokName(t)}`,this.bonus=this.spawnNug(t,"TW"),this.t=this.sstT,this.a=this.sstA}sstT(t){return p.ddf1().length<5}sstA(t){this.spawn(K.minionCode(this.level),t.owner)}upakC(){this.faction="U",this.rarity="L",this.name="Uterra Packmaster",this.iAttack=this.boof6914,this.iHealth=this.iAttack,this.tribe.push("HM"),this.preFight=!0;const t=this.boof124;this.addSp("U",t),this.text=`Activate: Each other friendly Uterra creature gets ${y.jr9(t,t)}.`,this.bonus=this.multNug(this.buffNug(t,t,"TX"),1.5),this.t=this.upakT,this.a=this.upakA}upakT(t){return p.creatByTarget(this.upakTarg(t.id)).length>0}upakA(t){const i=this.boof124;p.creatByTarget(this.upakTarg(t.id)).forEach(r=>{this.buffD(r,i)})}upakTarg(t){const i=b.crFriendNotMeTarg(t);return i.faction="U",i}wfmC(){this.faction="T",this.rarity="H",this.name="Wildfire Maiden",this.iAttack=this.boof4610,this.iHealth=this.boof5814,this.tribe.push("FR","AS"),this.text=`Activate, destroy ${this.name}: Deal damage equal to its attack to each enemy creature.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW"),this.t=this.wfmT,this.a=this.wfmA}wfmT(t){return!0}wfmA(t){const i=E.tick();p.creatByTarget(b.crEnemyTarg()).forEach(r=>{this.smack(r,t.attack,i)}),this.kill(t)}xerxC(){this.faction="N",this.rarity="L",this.name="Xerxes, the Executioner",this.iAttack=this.boof5915,this.iHealth=this.iAttack+2,this.tribe.push("GG");const t=-this.boof135;this.addSp("U",t),this.text=`Activate: Each non-Nekrium creature gets ${y.jr9(t,t)}.~If any enemy creatures are destroyed this way, Spawn one of them at random.`,this.bonus=this.buffNug(-t,-t,"TX"),this.t=this.xerxT,this.a=this.xerxA}xerxT(t){return this.xerxTargs().length>0}xerxA(t){const i=-this.boof135,r=[],n=E.tick();this.xerxTargs().forEach(f=>{this.buffD(f,i,n),f.owner!==t.owner&&f.health<1&&r.push(f)});const c=r.length;c>0&&this.spawn(r[S.randInt(0,c)].code,t.owner)}xerxTargs(){return p.qActiveCreats().filter(t=>t.faction!=="N")}}class Ri extends P{cons(t){({["MDE"]:()=>this.misdC(),["TAB"]:()=>this.thraC()})[t]()}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Assault: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);return r.jr4("AS"),r}jr8(t){this.f(t),x.triggerDone()}misdC(){this.faction="N",this.rarity="C",this.name="Misery Demon",this.iAttack=this.boof5915,this.iHealth=this.boof2510,this.tribe.push("DM");const t=this.level+3;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health.`,this.f=this.misdF}misdF(t){const i=this.level+3;this.ouch(!t.owner,i),this.balm(t.owner,i),this.anim8(t.creatId)}thraC(){this.faction="T",this.rarity="C",this.name="Thranik Ambusher",this.iAttack=this.boof5813,this.iHealth=this.iAttack,this.tribe.push("DK");const t=this.boof234;this.ftext=`${this.name} gets ${y.jr9(t,t)}.`,this.f=this.thraF}thraF(t){this.buffD(p.creatByTr(t),this.boof234)}}class yt extends P{cons(t){({["ATT"]:()=>this.atorC(),["BRH"]:()=>this.brhrC(),["BWN"]:()=>this.bulbC(),["CDM"]:()=>this.cmyC(),["CYR"]:()=>this.cycrC(),["DHM"]:()=>this.dhamC(),["FGD"]:()=>this.fgdC(),["FSP"]:()=>this.fspC(),["HMF"]:()=>this.hamfC(),["HOS"]:()=>this.hossC(),["HOD"]:()=>this.haroldC(),["IDF"]:()=>this.idfC(),["OJC"]:()=>this.ocarC(),["RLW"]:()=>this.restwandC(),["RHW"]:()=>this.ruthwandC(),["SCZ"]:()=>this.sczC(),["SHA"]:()=>this.smaC(),["SSP"]:()=>this.shspC(),["SDR"]:()=>this.spdryC(),["TDW"]:()=>this.tdwC(),["TNL"]:()=>this.tnlC(),["USY"]:()=>this.usyC(),["UTR"]:()=>this.urexC()})[t]()}iTrigger=!0;trigB;bDraw=!1;constructor(t){super(t),this.cons(this.cardCode())}t;b;jr3(t,i){const r=super.jr3(t,i);if(this.iTrigger){const n=r.jr4("EF");n.bonus=this.trigB,n.batch=this.bDraw}return r}ddf8(t){return this.t(t)}jr8(t){this.b(t),x.triggerDone()}bFac(t){return t.draw?this.faction:"X"}truLive(t){return p.creatByTr(t).status==="A"}efp(t){return I.toEnterField(t.event)}efc(t){return this.efp(t).creature}friendTimeT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&yt.itBirthedFirst(i.id,t.creatId)}friendGuts(t,i){return i.creatId!==t.creatId&&t.creature.owner===i.owner&&this.truLive(i)}donkforgeT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&i.isTribe("DF")&&this.truLive(t)}donkforgeB(t){this.logAct(!1),p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}dftxt(){this.text=`When another friendly Darkforged enters play, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),.5),this.bDraw=!0}atorC(){this.faction="T",this.rarity="L",this.name="Ator, Thunder Titan",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.tribe.push("GT"),this.text=`Each other friendly ${y.levelGateText(this.level)}creature gets Assault: Aggressive.`,this.trigB=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.atorT,this.b=this.atorB}atorT(t){const i=this.efp(t);return i.forged&&this.friendGuts(i,t)&&w.levelTargetTest(w.ddf2(this.level),i.creature.level)&&!i.creature.opposed&&!i.creature.getState().aggressive}atorB(t){const i=this.efc(t);i.aggressive=!0,this.anim8(i)}brhrC(){this.faction="N",this.rarity="R",this.name="Brood Horror",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("AB"),this.text=`When another friendly creature enters play, it gets ${y.jr9(this.level,this.level)}. Then ${this.name} gets ${y.jr9(-this.level,-this.level)}.`,this.t=this.friendTimeT,this.b=this.brhrB}brhrB(t){const i=this.efc(t);this.logAct(!1,i),this.buffD(i,this.level),this.buffD(p.creatByTr(t),-this.level)}bulbC(){this.faction="A",this.rarity="H",this.name="Bulwark Battalion",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("GN");const t=this.boof468;this.text=`When another friendly creature enters play, it gets Armor ${t} until the end of the turn.`,this.trigB=this.regnNug(t,"TW"),this.t=this.friendTimeT,this.b=this.bulbB}bulbB(t){const i=this.efc(t);this.logAct(!1,i),this.modA(i,b.modT("AR",this.boof468))}cmyC(){this.faction="T",this.rarity="H",this.name="Cauldron Mystic",this.iAttack=this.boof357,this.iHealth=this.boof71015,this.tribe.push("YT"),this.text=`When a friendly creature enters play, deal ${this.boof234} damage to an enemy creature or player at random.`,this.trigB=this.buffNug(0,this.iAttack,"TX"),this.t=this.cmyT,this.b=this.cmyB}cmyT(t){const i=this.efc(t);return i.owner===t.owner&&yt.itBirthedFirst(i.id,t.creatId)}cmyB(t){const i=p.qPlayerCreats(!t.owner),r=S.randInt(0,i.length+1);r===i.length?(this.ouch(!t.owner,this.boof234),this.anim8(t.creatId)):this.smack(i[r],this.boof234)}cycrC(){this.faction="T",this.rarity="H",this.name="Cyclone Rider",this.iAttack=this.lValN([8,10,16]),this.iHealth=this.iAttack/2,this.tribe.push("WN","AS"),this.level===1&&(this.hints=["ZZ-2"]),this.text=`When an enemy creature enters play, if it is unopposed, move ${this.name} to the lane opposing that creature.`,this.trigB=this.rawNug(0,0,0,0,.5),this.t=this.cycrT,this.b=this.cycrB}cycrT(t){const i=this.efc(t);return i.owner!==t.owner&&!i.opposed}cycrB(t){const i=this.efc(t);i.opposed||this.lurk(p.creatByTr(t),p.oppositeLane(i.lane))}dhamC(){this.faction="U",this.rarity="R",this.name="Dusk Hammer",this.iAttack=this.boof51015,this.iHealth=this.boof4812,this.iBT=!0,this.tribe.push("DF","TK"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}fgdC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Delta",this.iAttack=this.boof71117,this.iHealth=this.iAttack,this.tribe.push("RB","GD");const t=W.getCard(K.fgoc(this.level));this.text=`When ${this.name} enters play, if there is a friendly Alpha Beta, and Gamma, put a ${y.tokName(t)} in your discard pile.`,this.t=this.fgdT,this.b=this.fgdB}fgdT(t){return this.efc(t).id===t.creatId}fgdB(t){const i=p.qPlayerCreats(t.owner).map(r=>r.code.slice(0,3));if(i.includes("FGA")&&i.includes("FGB")&&i.includes("FGG")){const r=k.toPlayer(t.owner);r.discard.push(K.fgoc(this.level));const n=b.trigger("NT",this.code);n.bonus=this.rawNug(0,0,0,0,10),k.addTr(r,n),this.anim8(t.creatId)}}fspC(){if(this.faction="A",this.rarity="L",this.name="Flowsteel Prototype",this.iAttack=this.lValN([3,6,8]),this.iHealth=this.lValN([8,15,20]),this.tribe.push("SS"),this.iTrigger=this.level>1,this.iTrigger){this.text=`When you Forge a ${y.levelGateText(this.level-1)}creature, ${this.name} gets +attack equal to that creature's attack.`;const t=this.avgCreatureStats(this.level-1);this.trigB=this.buffNug(t[0],0,"TS")}this.t=this.fspT,this.b=this.fspB}fspT(t){const i=this.efp(t);return i.forged&&i.creature.owner===t.owner&&i.creature.level0&&this.lurk(p.creatByTr(t),i[S.randInt(0,r)])}hossC(){this.faction="U",this.rarity="R",this.name="Harbinger of Spring",this.iAttack=this.lValN([5,8,11]),this.iHealth=this.iAttack,this.tribe.push("DY");const t=this.boof234;this.text=`When another friendly creature enters play, if it wasn't Forged, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),1.5),this.bDraw=!0,this.t=this.hossT,this.b=this.hossB}hossT(t){const i=this.efp(t);return this.friendGuts(i,t)&&!i.forged}hossB(t){this.logAct(!1,this.efc(t));const i=this.boof234;p.creatByTr(t).buff(i,i,this.bFac(t))}haroldC(){this.faction="T",this.rarity="R",this.name="Herald of Destruction",this.iAttack=this.boof369,this.iHealth=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.trigB=this.playerNug(this.iAttack*.5,"TX"),this.bDraw=!0,this.t=this.haroldT,this.b=this.haroldB}haroldT(t){const i=this.efp(t);return i.creature.owner!==t.owner&&!i.forged&&this.truLive(t)}haroldB(t){const i=p.creatByTr(t);this.ouch(!i.owner,i.attack,t.draw),t.draw&&this.anim8(i)}idfC(){this.faction="N",this.rarity="H",this.name="Indomitable Fiend",this.iAttack=2,this.iHealth=2,this.maxLevel=1,this.tribe.push("ZB"),this.hints=["ST","ZZ+1"],this.text=`When ${this.name} enters play, if it wasn't Forged, it gets ${y.jr9(5,5)} for each player rank you are.`,this.t=this.idfT,this.b=this.idfB}idfT(t){const i=this.efp(t);return i.creature.id===t.creatId&&!i.forged}idfB(t){const i=5*k.toPlayer(t.owner).rank;this.buffD(this.efc(t),i)}ocarC(){this.faction="A",this.rarity="H",this.name="Oreian Justicar",this.iAttack=this.boof5814,this.iHealth=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 ${y.jr9(t,0)}.`,this.trigB=this.buffNug(-.5*t,0,"TX"),this.t=this.ocarT,this.b=this.ocarB}ocarT(t){const i=this.efp(t);return i.creature.owner!==t.owner&&!i.forged&&yt.itBirthedFirst(i.creature.id,t.creatId)}ocarB(t){this.buffA(this.efc(t),this.ocarbuff)}get ocarbuff(){return this.lValN([-5,-10,-20])}restwandC(){this.faction="U",this.rarity="H",this.name="Restless Wanderers",this.iAttack=this.boof51014,this.iHealth=this.boof3610,this.tribe.push("ST","WD");const t=this.boof369;this.text=`When another friendly Spirit Wanderer enters play, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),.5),this.t=this.restwandT,this.b=this.restwandB}restwandT(t){const i=this.efp(t);return i.creature.isTribe("WD")&&this.friendGuts(i,t)}restwandB(t){this.logAct(!1),this.buffD(p.creatByTr(t),this.boof369)}ruthwandC(){this.faction="N",this.rarity="C",this.name="Ruthless Wanderers",this.iAttack=this.boof3610,this.iHealth=this.boof51014,this.tribe.push("ST","WD");const t=this.boof369,i=-t;this.text=`When another friendly Spirit Wanderer enters play, the creature opposing this gets ${y.jr9(i,i)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TW"),.5),this.t=this.restwandT,this.b=this.ruthwandB}ruthwandB(t){const i=p.creatByTr(t).opposed;i&&(this.logAct(!1,i),this.buffD(i,-this.boof369))}sczC(){this.faction="N",this.rarity="R",this.name="Shadeclaw Zombie",this.iAttack=this.boof4812,this.iHealth=this.iAttack+this.level,this.iRegen=this.level,this.tribe.push("DF","ZB"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}smaC(){this.faction="A",this.rarity="R",this.name="Shadowmist Angel",this.iHealth=this.boof369,this.iAttack=this.iHealth*2,this.iArmor=this.level,this.tribe.push("DF","AG"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}shspC(){this.faction="U",this.rarity="H",this.name="Shroudthorn Splicer",this.iHealth=this.boof3711,this.iAttack=this.iHealth-1,this.tribe.push("DF","PL"),this.text=`When another friendly Darkforged enters play, if it was Forged, Spawn a ${this.iAttack}/${this.iHealth} Darkforged Mimic.`,this.trigB=this.statSpawnNug(this.iAttack,this.iHealth,"TX"),this.t=this.shspT,this.b=this.shspB}shspT(t){const i=this.efp(t);return i.forged&&i.creature.isTribe("DF")&&this.friendGuts(i,t)}shspB(t){this.spawn("DFM"+this.level,t.owner)}spdryC(){this.faction="U",this.rarity="R",this.name="Spring Dryad",this.iAttack=this.boof469,this.iHealth=this.iAttack,this.tribe.push("DY"),this.text=`When another friendly creature enters play, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),1.5),this.bDraw=!0,this.t=this.spdryT,this.b=this.spdryB}spdryT(t){return this.friendGuts(this.efp(t),t)}spdryB(t){this.logAct(!1,this.efc(t)),p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}tdwC(){this.faction="N",this.rarity="R",this.name="Tarsus Deathweaver",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof246;this.text=`When a friendly creature enters play, if it wasn't Forged, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TX"),this.t=this.tdwT,this.b=this.tdwB}tdwT(t){const i=this.efp(t);return i.creature.owner===t.owner&&!i.forged&&yt.itBirthedFirst(i.creature.id,t.creatId)}tdwB(t){this.buffD(this.efc(t),this.boof246)}tnlC(){this.faction="N",this.rarity="L",this.name="Tarsus Necrolord",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof124,i=W.getCard(K.zomc(this.level));this.text=`Forge: Spawn a ${y.tokName(i)} for each friendly creature that was destroyed this turn.~When a friendly Zombie enters play, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.bDraw=!0,this.t=this.tnlT,this.b=this.tnlB}tnlT(t){const i=this.efp(t);return i.creature.isTribe("ZB")&&this.friendGuts(i,t)}tnlB(t){const i=this.boof124;p.creatByTr(t).buff(i,i,this.bFac(t))}usyC(){this.faction="T",this.rarity="R",this.name="Umbraskin Yeti",this.iAttack=this.boof369,this.iHealth=this.iAttack*2,this.iMobile=this.level,this.tribe.push("DF","YT"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}urexC(){this.faction="U",this.rarity="H",this.name="Uterradon Rex",this.iAttack=this.boof4813,this.iHealth=this.boof71118,this.tribe.push("DN");const t=this.boof124;this.text=`When another friendly Dinosaur enters play, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TW"),this.t=this.urexT,this.b=this.urexB}urexT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&i.isTribe("DN")&&yt.itBirthedFirst(i.id,t.creatId)}urexB(t){this.buffD(this.efc(t),this.boof124)}static itBirthedFirst(t,i){if(t===i)return!0;let r=!1;const n=Bt.findDeathTime(i);if(S.isUn(n))r=!0;else{const c=p.findBirthTime(t);(S.isUn(c)||c<=n)&&(r=!0)}return r}}class De extends Ai{cons(t){({["AGM"]:()=>this.agamC(),["BWK"]:()=>this.blwalkC(),["BRF"]:()=>this.bfangC(),["CDT"]:()=>this.cadtC(),["FSL"]:()=>this.fslmC(),["GSC"]:()=>this.gcobC(),["IHA"]:()=>this.ibhaC(),["SHS"]:()=>this.shimfC()})[t]()}image(t){return this.rarity==="T"?this.fixedImage(t):this.leveledImage(t)}constructor(t){super(t,!0),this.cons(this.cardCode())}h;jr8(t){const i=I.toDamage(t.event);this.h(t,i,i.srcCreat,i.hurtCreat),x.triggerDone()}poos(t,i){t.status==="A"&&t.addPoison(i)}snek(t,i,r,n){this.poos(n,this.iAttack)}agamC(){this.faction="T",this.rarity="L",this.name="Agamemnon",this.iAttack=this.boof4814,this.iHealth=this.lValN([8,12,18]),this.level>1&&(this.iMobile=1,this.iAggro=this.level===3),this.tribe.push("GT"),this.text=`When ${this.name} ${y.dbdtac()} on your turn, this battles again.`,this.trigB=this.buffNug(this.iAttack/2,0),this.h=this.agamH}agamH(t,i,r,n){t.owner===k.activeA&&r.status==="A"&&this.wrang(r)}blwalkC(){this.faction="N",this.rarity="R",this.name="Blight Walker",this.iAttack=this.boof137,this.iHealth=this.lValN([5,10,17]),this.tribe.push("ZB"),this.text=`When ${this.name} ${y.dbdtac(this.level)}, destroy that creature.`,this.trigB=this.avgSpawnNug(),this.h=this.blwalkH}blwalkH(t,i,r,n){n.status==="A"&&w.levelTestCommon(n.level,this.level)&&this.kill(n)}bfangC(){this.faction="U",this.rarity="T",this.name="Broodfang",this.iAttack=this.level,this.iHealth=this.level,this.maxLevel=this.level,this.minLevel=this.level,this.tribe.push("SN"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}poisonText(t){return`When ${this.name} ${y.dbdtac()}, give that creature gets Poison ${t}.`}cadtC(){this.faction="U",this.rarity="R",this.name="Cadaverous Thicket",this.iAttack=this.boof135,this.iHealth=this.lValN([7,12,22]),this.tribe.push("PL"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}fslmC(){this.faction="N",this.rarity="C",this.name="Festering Slime",this.iAttack=this.level,this.iHealth=this.boof61218,this.tribe.push("OZ");const t=this.level+2;this.text=`When ${this.name} ${y.dbdtac()}, that creature gets ${y.jr9(-t,-t)}.`,this.trigB=this.buffNug(t,t),this.h=this.fslmH}fslmH(t,i,r,n){n.status==="A"&&this.buffD(n,this.lValN([-3,-4,-5]))}gcobC(){this.faction="U",this.rarity="C",this.name="Ghostscale Cobra",this.iAttack=this.boof4610,this.iHealth=this.boof135,this.tribe.push("SN"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}ibhaC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Hammer of Anvillon",this.iAttack=this.lValN([4,7,12,15]),this.iHealth=this.lValN([7,11,17,25]),this.iArmor=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 ${y.jr9(this.boof246n,0)}`;this.text=`When Ironbeard ${y.dbdtac()}, that creature${t}, and moves to an available enemy lane at random.`,this.trigB=this.buffNug(this.lValN([2,4,6,16]),0),this.h=this.ibhaH}ibhaH(t,i,r,n){if(n.status==="A"){const c=this.level===4?n.attack*-1:this.boof246n;this.buffA(n,c),p.fling(n,"A")}}shimfC(){this.faction="U",this.rarity="R",this.name="Shimmerfang Serpent",this.iAttack=this.boof357,this.iHealth=this.boof61016,this.tribe.push("SN"),this.text=`When ${this.name} ${y.dbdtac()}, that creatures gets that much Poison.`,this.trigB=this.regnNug(this.iAttack),this.h=this.shimfH}shimfH(t,i,r,n){this.poos(n,i.dmg)}}class ae extends Ai{cons(t){({["ABR"]:()=>this.ashbC(),["AMY"]:()=>this.ashmC(),["CFB"]:()=>this.cfbC(),["EPS"]:()=>this.epsdC(),["EFM"]:()=>this.efmC(),["FBC"]:()=>this.fbcC(),["RTS"]:()=>this.rzstC(),["RSE"]:()=>this.rselC(),["SVH"]:()=>this.strhyC(),["URB"]:()=>this.uridC(),["VES"]:()=>this.veskC()})[t]()}bothTurns=!0;constructor(t){super(t,!1),this.cons(this.cardCode())}h;jr8(t){const i=I.toDamage(t.event);i.srcCreat&&(this.bothTurns||i.srcCreat.owner===k.activeA)&&this.h(t,i,i.srcCreat),x.triggerDone()}ashyC(){this.faction="T",this.rarity="C",this.tribe.push("FR","AS");const t=this.boof124;this.text=`When ${this.name} ${y.dbdtap()}, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.ashyH}ashyH(t,i,r){this.buffD(r,this.boof124)}ashbC(){this.name="Ashurian Brawler",this.iAttack=this.boof7911,this.iHealth=this.iAttack,this.ashyC()}ashmC(){this.name="Ashurian Mystic",this.iAttack=this.boof3610,this.iHealth=this.boof5812,this.iAggro=!0,this.ashyC()}cfbC(){this.faction="T",this.rarity="H",this.name="Cinderfist Brawler",this.iAttack=this.boof71014,this.iHealth=this.boof357,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to that player again.`,this.trigB=this.playerNug(this.iAttack/2,"TP"),this.h=this.cfbH}cfbH(t,i,r){this.ouch(!r.owner,i.dmg),this.anim8(r)}epsdC(){this.faction="A",this.rarity="T",this.name="Epoch Soldier",this.minLevel=this.level,this.maxLevel=this.level,this.iAttack=this.boof4710,this.iHealth=this.iAttack,this.tribe.push("HM"),this.bothTurns=!1,this.text=`When ${this.name} ${y.dbdtap()} on your turn, draw a card at the end of the turn.`,this.trigB=this.rawNug(0,0,0,0,.2,"TP"),this.h=this.epsdH}epsdH(t,i,r){const n=b.trigger("TE","EPH"+this.level);n.changes=!0,n.customCode=this.code,n.bonus=this.rawNug(0,0,0,0,ft.dcWeight),k.addTr(t.owner,n),this.anim8(r)}efmC(){this.faction="T",this.rarity="L",this.name="Everflame Mystic",this.iAttack=this.boof5813,this.iHealth=this.iAttack+1,this.tribe.push("FR","AS"),this.bothTurns=!1,this.text=`When ${this.name} ${y.dbdtap()} on your turn, you may play ${this.lValS(["one","two","three"])} spells this turn.`,this.trigB=this.rawNug(0,0,0,0,this.level*.5,"TP"),this.h=this.efmH}efmH(t,i,r){for(let n=0;nthis.smack(c,i.dmg,n))}rzstC(){this.faction="T",this.rarity="C",this.name="Razortooth Stalker",this.iAttack=this.boof4812,this.iHealth=this.iAttack+1,this.iMobile=1,this.tribe.push("DN");const t=this.boof235;this.text=`When ${this.name} ${y.dbdtap()}, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.rzstH}rzstH(t,i,r){this.buffD(r,this.boof235)}rselC(){this.faction="T",this.rarity="H",this.name="Rumblestone Elemental",this.iAttack=this.boof246,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("ER","EL"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to itself as well.~Assault: Spawn a copy of ${this.name}. Then repeat this for each copy.`,this.trigB=this.rawNug(0,0,0,0,-.1),this.h=this.rselH}rselH(t,i,r){this.smack(r,i.dmg)}strhyC(){this.faction="U",this.rarity="C",this.name="Stranglevine Hydra",this.iAttack=this.boof5815,this.iHealth=this.iAttack+1,this.tribe.push("HY"),this.text=`When ${this.name} ${y.dbdtap()}, it gets Regenerate ${this.level}.`,this.trigB=this.regnNug(this.level,"TP"),this.h=this.strhyH}strhyH(t,i,r){this.regn(r,this.level)}uridC(){this.faction="U",this.rarity="L",this.name="Uterradon Ridgeback",this.iAttack=this.boof71117,this.iHealth=this.boof4713,this.iBT=!0,this.tribe.push("DN"),this.bothTurns=!1;const t=this.boof124;this.text=`When ${this.name} ${y.dbdtap()} on your turn, each friendly creature gets ${y.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.uridH}uridH(t,i,r){const n=this.boof124,c=this.level===3;p.ddf1().forEach(f=>{this.buffD(f,n),c&&(f.breakthrough=!0)})}veskC(){this.faction="N",this.rarity="L",this.name="Vyric Ebonskull",this.iAttack=this.boof3713,this.iHealth=this.boof71117,this.tribe.push("VP");let t="",i=.5;this.level===3&&(t=" Then Spawn a copy of that creature."),this.text=`When Vyric ${y.dbdtap()}, destroy an enemy ${y.levelGateText(this.level)}creature at random.`+t,this.trigB=this.multNug(this.avgSpawnNug(),i),this.trigB.threat="TP",this.h=this.veskH}veskH(t,i,r){const n=b.crTarg();n.player=k.toTarget(i.hurtPlayer),n.level=w.ddf2(this.level);const c=p.creatByTarget(n);if(c.length>0){const f=E.tick(),m=c[S.randInt(0,c.length)];this.kill(m,f),this.level===3&&this.spawn(m.code,r.owner,f)}}}class Y extends P{cons(t){({["AGK"]:()=>this.agknitC(),["AMS"]:()=>this.squadC(),["AFR"]:()=>this.afsC(),["ATI"]:()=>this.atiC(),["BZS"]:()=>this.bzshC(),["BTR"]:()=>this.bwtC(),["BSS"]:()=>this.bssC(),["BZD"]:()=>this.bzdrC(),["BFM"]:()=>this.bfmC(),["CTI"]:()=>this.charnC(),["CHH"]:()=>this.chihC(),["CSW"]:()=>this.chickenC(),["DFR"]:()=>this.dfrC(),["DSW"]:()=>this.dswC(),["DBA"]:()=>this.dbaC(),["DBN"]:()=>this.drbC(),["DDD"]:()=>this.dddC(),["EWT"]:()=>this.espwrC(),["FWT"]:()=>this.fwtC(),["GSW"]:()=>this.gwurmC(),["GSS"]:()=>this.gsC(),["IMA"]:()=>this.iracoC(),["KSB"]:()=>this.ksbC(),["LGT"]:()=>this.legtitC(),["LBD"]:()=>this.lbdC(),["LMV"]:()=>this.lyrC(),["MOE"]:()=>this.moeC(),["MMA"]:()=>this.mmaC(),["MMR"]:()=>this.mmrC(),["MBR"]:()=>this.mbrC(),["MTD"]:()=>this.mossC(),["NSY"]:()=>this.nysymC(),["OXM"]:()=>this.onxmarC(),["OFM"]:()=>this.ofmC(),["OPK"]:()=>this.orpC(),["PHM"]:()=>this.phmC(),["PSM"]:()=>this.palsC(),["POK"]:()=>this.pokC(),["POT"]:()=>this.potC(),["PMI"]:()=>this.prinvC(),["REW"]:()=>this.rewC(),["SMD"]:()=>this.scorchC(),["SOC"]:()=>this.scythC(),["SDN"]:()=>this.souldrC(),["SGG"]:()=>this.ssggC(),["SLG"]:()=>this.splgC(),["SBD"]:()=>this.sbdC(),["SSK"]:()=>this.sssC(),["SYL"]:()=>this.lotusC(),["TGI"]:()=>this.tgiC(),["TRA"]:()=>this.toraC(),["TRS"]:()=>this.torsC(),["TRV"]:()=>this.torvC(),["TRW"]:()=>this.torwC(),["UGL"]:()=>this.umglidC(),["UWL"]:()=>this.uwarC(),["UWS"]:()=>this.ustokeC(),["UIW"]:()=>this.uiwC(),["UTM"]:()=>this.umaulC(),["VIC"]:()=>this.vlfxC(),["VIK"]:()=>this.vikC(),["VND"]:()=>this.vdrkC(),["VNS"]:()=>this.vnsC(),["WMC"]:()=>this.warC(),["WWP"]:()=>this.wwpC(),["WFB"]:()=>this.wfbC(),["XTR"]:()=>this.xtmC(),["ZDK"]:()=>this.zdkC()})[t]()}f;ftext="";forges=!0;flanks;allied="X";constructor(t){super(t),this.cons(this.cardCode());let i="";this.flanks&&(i="Flank"),this.forges&&(i?i="Forge/"+i:i=y.forglied(this.allied)),i&&(this.text=i+": "+this.ftext),this.ftext=""}image(t){return this.rarity==="T"?super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.forges&&r.jr4("FR"),this.flanks){const n=r.jr4("FK");n.bonus=this.flanks}return r}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="MMR"}jr8(t){const i=this.cardCode();if(t.trigger.type==="TE"&&i==="MMR"){this.logAct(!1);const r=t.event,n=k.toPlayer(r.playerA);k.drawCard(n,this.level);const c=b.trigIdx(n.triggers,t.trigger);c>-1&&n.triggers.splice(c,1)}else this.f(t);x.triggerDone()}agknitC(){this.faction="A",this.rarity="L",this.name="Aegis Knight",this.iAttack=this.boof5814,this.iHealth=this.iAttack,this.tribe.push("HM"),this.iArmor=this.lValN([1,2,5]),this.ftext="Each friendly creature deals damage equal to its Armor to the opposing creature",this.f=this.agknitF}agknitF(t){const i=b.crFriendTarg();i.hasArmor=!0;const r=E.tick();p.creatByTarget(i).forEach(n=>{n.opposed&&n.opposed.hurtDirect(n.armor,n.code,this.faction,r)})}squadC(){this.faction="A",this.rarity="H",this.name="Aeromind Squadron",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("MM"),this.iMobile=1,this.ftext="Put a Metamind at random from your deck into your hand.",this.f=this.squadF}squadF(t){const i=k.toPlayer(t.owner),r=b.target("TH");r.player=k.toTarget(i),r.tribe="MM";const n=w.deckByTarget(r),c=n.length;if(c>0){const f=n[S.randInt(0,c)];i.deck.splice(f[1],1),Dt.addCard(i,f[0]),this.anim8(t.creatId)}}afsC(){this.faction="T",this.rarity="H",this.name="Ashurian Flamesculptor",this.iAttack=this.boof5915,this.iHealth=this.boof3610,this.tribe.push("FR","AS"),this.forges=this.level>1,this.consistent=this.forges,this.forges&&(this.ftext=`You may play an additional ${y.levelGateText(this.level-1)}Tempys spell this turn.`,this.addSp("C",0)),this.f=this.afsF}afsF(t){const i=L.freeCard(this.code);i.condition.card="S",i.condition.level=w.ddf2(this.level-1),i.condition.faction="T",this.anim8(t.creatId)}atiC(){this.faction="T",this.rarity="L",this.name="Avarice, the Insatiable",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.iMobile=1,this.tribe.push("DG");let t="";this.level<3&&(t="Discard down to one card at random. "),this.ftext=`${t}You may play an additional spell this turn.`,this.f=this.atiF}atiF(t){if(this.level<3){const r=k.toPlayer(t.owner);if(r.hand.length>1){let n=r.hand.slice();const c=S.randInt(0,n.length);for(let f=n.length-1;f>-1;f--)f!==c&&Dt.cardDiscard(r,f)}}const i=L.freeCard(this.code);i.condition.card="S",this.anim8(t.creatId)}bzshC(){this.faction="T",this.rarity="C",this.name="Blizzard Shaman",this.iAttack=this.boof61014,this.iHealth=this.iAttack+1,this.tribe.push("WN","AS"),this.ftext="Move another friendly creature at random to another available lane at random.",this.f=this.bzshF}bzshF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId)),r=i.length;if(r<4&&r>0){const n=i[S.randInt(0,r)];p.fling(n,"T"),this.logAct(!1,n)}}bwtC(){if(this.faction="U",this.rarity="H",this.name="Bramblewood Tracker",this.iAttack=this.boof3712,this.iHealth=this.iAttack+3,this.tribe.push("HM"),this.forges=this.level>1,this.forges){const t=this.level-1;this.ftext=`You may play an additional ${y.levelGateText(t)}Uterra creature this turn.`,this.consistent=!0,this.addSp("C",0)}else this.hints=["LG"];this.f=this.bwtF}bwtF(t){const i=L.freeCard(this.code);i.condition.card="C",i.condition.faction="U",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}bssC(){this.faction="A",this.rarity="L",this.name="Brightsteel Sentinal",this.iHealth=this.boof51015,this.iAttack=this.iHealth-1,this.tribe.push("RB"),this.addSp("M",this.iHealth),this.ftext=`Each friendly Robot gets Armor ${this.iHealth} this turn.`,this.f=this.bssF}bssF(t){const i=this.boof51015,r=b.crFriendTarg();r.tribe="RB",r.canArmor=!0,p.creatByTarget(r).forEach(c=>{this.modA(c,b.modT("AR",i))})}bzdrC(){this.faction="N",this.rarity="R",this.name="Byzerak Drake",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.iRegen=this.level,this.allied="T",this.tribe.push("DG"),this.addSp("R",this.level),this.ftext=`Mobility ${this.level}.`,this.f=this.bzdrF}bzdrF(t){L.allied(this.allied)&&p.creatByTr(t).addMobility(this.level,"T")}bfmC(){this.faction="N",this.rarity="H",this.name="Byzerak Frostmaiden",this.iAttack=this.boof135,this.iHealth=this.boof91420,this.tribe.push("HM");const t=this.boof246;this.flanks=this.buffNug(t*2,0,"TS"),this.ftext=`If ${this.name} is opposed, the opposing creature gets ${y.jr9(-1*t,0)} and this gets ${y.jr9(t,0)}.~Allied Tempys: Mobility ${this.level}.`,this.f=this.bfmF}bfmF(t){const r=I.toEnterField(t.event).creature;t.trigger.type==="FR"&&L.allied("T")&&r.addMobility(this.level,"T");const n=r.opposed;if(n){const c=this.boof246;this.buffA(n,-1*c),this.buffA(r,c)}}charnC(){this.faction="N",this.rarity="C",this.name="Charnel Titan",this.iAttack=this.boof359,this.iHealth=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 ${y.jr9(t,t)}.`,this.f=this.charnF}charnF(t){const i=this.boof357,r=b.crEnemyTarg();r.maxAttack=i,p.creatByTarget(r).length>0&&this.buffD(p.creatByTr(t),i)}chihC(){this.faction="U",this.rarity="C",this.name="Chistlehearth Hunter",this.iAttack=this.lValN([2,6,11]),this.iHealth=this.boof81217,this.tribe.push("HM"),this.ftext=`${this.name} gets ${y.jr9(1,0)} for each other friendly creature.`,this.f=this.chihF}chihF(t){const i=p.ddf1().length;i>1&&this.buffA(p.creatByTr(t),i-1)}chickenC(){this.faction="T",this.rarity="L",this.name="Cindersmoke Wyvern",this.iAttack=this.boof3610,this.iHealth=this.lValN([7,12,17]),this.tribe.push("DG"),this.iMobile=this.boof124,this.forges=!1,this.flanks=this.buffNug(this.iAttack,0,"TX"),this.ftext="Deal damage equal to its attack to the opposing creature. If unopposed, deal that damage to the enemy player instead.",this.f=this.chickenF}chickenF(t){const i=I.toCreature(t.event),r=i.creature.attack,n=i.creature.opposed;n?this.smack(n,r):(this.ouch(!t.owner,r),this.anim8(i.creature))}dfrC(){this.faction="N",this.rarity="H",this.name="Darkfrost Reaper",this.iAttack=this.boof6916,this.iHealth=this.boof3713,this.tribe.push("SK"),this.ftext="Destroy each creature with 1 or less attack.",this.f=this.dfrF}dfrF(t){const i=b.crTarg();i.maxAttack=1;const r=p.creatByTarget(i);if(r.length>0){const n=E.tick();r.forEach(c=>{this.kill(c,n)})}}dswC(){this.faction="N",this.rarity="C",this.name="Darkshard Witch",this.iAttack=this.boof51015,this.iHealth=this.iAttack-1,this.tribe.push("DF","HM");const t=this.boof234;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health for each other friendly Darkforged.`,this.f=this.dswF}dswF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="DF";const r=this.boof234*p.creatByTarget(i).length;r>0&&(this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(t.creatId))}dbaC(){this.faction="U",this.rarity="H",this.name="Deepbranch Ancient",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("HY"),this.ftext=`If there is a friendly creature in each lane, ${this.name} gets ${y.jr9(this.iAttack,this.iHealth)}.`,this.f=this.dbaF}dbaF(t){p.ddf1().length===5&&this.buffB(p.creatByTr(t),this.iAttack,this.iHealth)}drbC(){this.faction="N",this.rarity="C",this.name="Dirge Banshee",this.iAttack=this.boof248,this.iHealth=this.boof61016,this.tribe.push("ST");const t=this.boof246;this.flanks=this.buffNug(t*2,0),this.ftext=`If ${this.name} is opposed, the opposing creature gets ${y.jr9(-t,0)} and this gets ${y.jr9(t,0)}.`,this.f=this.drbF}drbF(t){const i=I.toEnterField(t.event),r=i.creature.opposed;if(r){const n=this.boof246;this.buffA(r,-n),this.buffA(i.creature,n)}}dddC(){this.faction="N",this.rarity="L",this.name="Doomwing, Dire Drake",this.iAttack=this.boof61018,this.iHealth=this.lValN([2,6,10]),this.iMobile=this.level,this.tribe.push("DG"),this.level>1&&(this.hints=[this.level===2?"ZZ-2":"ZZ-5"]),this.forges=!1,this.flanks=this.multNug(this.avgSpawnNug(),.5),this.flanks.threat="TX",this.ftext=`Destroy the opposing ${y.levelGateText(this.level)}creature.`,this.f=this.dddF}dddF(t){const r=I.toCreature(t.event).creature.opposed;r&&w.levelTestCommon(r.level,this.level)&&this.kill(r)}espwrC(){this.faction="U",this.rarity="R",this.name="Esperian Wartusk",this.iAttack=this.boof5916,this.iHealth=this.iAttack-1,this.iBT=!0,this.allied="A",this.tribe.push("TK");const t=this.boof124;this.ftext=`Armor ${t}.`,this.f=this.espwrF}espwrF(t){L.allied(this.allied)&&p.creatByTr(t).addArmor(this.boof124)}fwtC(){this.faction="U",this.rarity="H",this.name="Frostwild Tracker",this.iAttack=this.boof4712,this.iHealth=this.boof248,this.tribe.push("TG"),this.forges=this.level>1;const t=this.level-1;this.ftext=`You may play an additional ${y.levelGateText(t)}creature this turn.`,this.level===1&&(this.hints=["LG"]),this.f=this.fwtF}fwtF(t){const i=L.freeCard(this.code);i.condition.card="C",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}gwurmC(){this.faction="N",this.rarity="C",this.name="Gloomspire Wurm",this.iAttack=this.boof4813,this.iHealth=this.iAttack,this.tribe.push("WR"),this.ftext=`If there are no enemy creatures, ${this.name} gets ${y.jr9(4,4)}.`,this.f=this.gwurmF}gwurmF(t){p.qEnemyCreats().length===0&&this.buffD(p.creatByTr(t),4)}gsC(){this.faction="U",this.rarity="C",this.name="Glowstride Stag",this.iAttack=this.boof5812,this.iHealth=this.iAttack+this.level,this.tribe.push("ST");const t=this.boof51015;this.ftext=`You gain ${t} health.`,this.f=this.gsF}gsF(t){const i=this.boof51015;this.balm(t.owner,i),this.anim8(t.creatId)}iracoC(){this.faction="A",this.rarity="L",this.name="Ironmind Acolyte",this.iAttack=this.boof61015,this.iHealth=this.iAttack-2,this.tribe.push("GN"),this.ftext="If you have five or more cards in your hand, you may play an additional card this turn.",this.f=this.iracoF}iracoF(t){k.toPlayer(t.owner).hand.length>4&&(L.freePlay(),this.anim8(t.creatId))}ksbC(){this.faction="T",this.rarity="C",this.name="Kadrasian Stoneback",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("DN"),this.iMobile=1,this.iDefend=!0,this.forges=!1,this.flanks=this.regnNug(1),this.ftext=`Negate Defender from ${this.name} this turn.`,this.f=this.ksbF}ksbF(t){const i=I.toCreature(t.event);i.creature.hasMod(t.creatId)||this.modA(i.creature,b.modT("ND",!0,t.creatId))}legtitC(){this.faction="N",this.rarity="R",this.name="Legion Titan",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.ftext=`${this.name} gets ${y.jr9(this.level,this.level)} for each enemy creature with ${this.boof357} or less attack.`,this.f=this.legtitF}legtitF(t){const i=b.crEnemyTarg();i.maxAttack=this.boof357;const r=p.creatByTarget(i);r.length>0&&this.buffD(p.creatByTr(t),this.level*r.length)}lbdC(){this.faction="U",this.rarity="H",this.name="Lifeblood Dryad",this.iAttack=this.lValN([4,7,9]),this.iHealth=this.iAttack,this.tribe.push("DY");const t=this.boof236;this.ftext=`If there is a friendly creature in each lane, each other friendly creature gets ${y.jr9(t,t)}.`,this.f=this.lbdF}lbdF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length===4){const r=this.boof236;i.forEach(n=>this.buffD(n,r))}}lyrC(){this.faction="N",this.rarity="L",this.name="Lyria, Muse of Varna",this.iAttack=this.boof5815,this.iHealth=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=["LG"]),this.f=this.lyrF}lyrF(t){if(this.level===2){const i=Bt.gravedigger();i&&this.spawn(i,t.owner)}else if(this.level===3){const i=p.emptyLanes(t.owner),r=i.map(n=>Bt.gravedigger());if(i.length>0&&r[0]){const n=E.tick();i.forEach((c,f)=>{this.poot(r[f],t.owner,c,n)})}}}moeC(){this.faction="T",this.rarity="H",this.name="Master of Elements",this.iAttack=this.boof5917,this.iHealth=this.iAttack,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=`You may play an additional ${y.levelGateText(this.level-1)}spell this turn.`,this.f=this.moeF}moeF(t){const i=L.freeCard(this.code);i.condition.card="S",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}mmaC(){this.faction="A",this.rarity="C",this.name="Metamind Adept",this.iAttack=this.boof5915,this.iHealth=this.boof4813,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`Draw ${this.level} card${t}.`,this.f=this.mmaF}mmaF(t){k.drawCard(t.owner,this.level),this.anim8(t.creatId)}mmrC(){this.faction="A",this.rarity="C",this.name="Metamind Archivist",this.iAttack=this.boof3713,this.iHealth=this.iAttack+5,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`If there is another friendly Metamind, draw ${this.level} card${t} at the end of your turn.`,this.f=this.mmrF}mmrF(t){const i=b.crFriendNotMeTarg(t.creatId);if(i.tribe="MM",p.creatByTarget(i).length>0){const r=b.trigger("TE",this.code);r.changes=!0,r.bonus=this.rawNug(0,0,0,0,this.level*ft.dcWeight),k.addTr(t.owner,r),this.anim8(t.creatId)}}mbrC(){this.faction="A",this.rarity="R",this.name="Mind Breaker",this.iAttack=this.boof248,this.iHealth=this.lValN([8,14,20]),this.tribe.push("MM"),this.ftext="Draw a card for each friendly Metamind.",this.f=this.mbrF}mbrF(t){const i=b.crFriendTarg();i.tribe="MM",k.drawCard(t.owner,p.creatByTarget(i).length),this.anim8(t.creatId)}mossC(){this.faction="U",this.rarity="R",this.name="Mosstodon",this.iAttack=this.boof71117,this.iHealth=this.boof4713,this.tribe.push("DN"),this.ftext=`Each other friendly Dinosaur gets ${y.jr9(0,this.boof357)}.`,this.f=this.mossF}mossF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="DN";const r=p.creatByTarget(i);if(r.length>0){const n=this.boof357;r.forEach(c=>this.buffH(c,n))}}nysymC(){this.faction="N",this.rarity="C",this.name="Nyrali Symbiote",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("OZ");const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets Regenerate ${t}.`,this.f=this.nysymF}nysymF(t){const i=I.toEnterField(t.event);i.creature.opposed&&this.regn(i.creature,this.boof246)}ofmC(){this.faction="A",this.rarity="R",this.name="Oreian Fieldmarshal",this.iAttack=this.boof5914,this.iHealth=this.iAttack-2,this.tribe.push("HM");const t=this.boof135;this.ftext=`Each other friendly creature gets ${y.jr9(t,0)}.`,this.f=this.ofmF}ofmF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=this.boof135;i.forEach(n=>{this.buffA(n,r)})}}orpC(){this.faction="A",this.rarity="R",this.name="Oreian Peacekeeper",this.iAttack=this.boof4816,this.iHealth=this.boof248,this.tribe.push("RB"),this.ftext=`${this.name} gets Armor ${this.iAttack} this turn.`,this.f=this.orpF}orpF(t){this.modA(p.creatByTr(t),b.modT("AR",this.iAttack))}onxmarC(){this.faction="A",this.rarity="R",this.name="Onyxium Marauder",this.iAttack=this.boof4714,this.iHealth=this.lValN([6,9,17]),this.iArmor=this.level,this.allied="N",this.tribe.push("HM"),this.ftext=`Regenerate ${this.level}.`,this.f=this.onxmarF}onxmarF(t){L.allied(this.allied)&&p.creatByTr(t).addRegen(this.level,"N")}phmC(){this.faction="A",this.rarity="R",this.name="Palladium Hindermind",this.iAttack=this.boof2612,this.iHealth=this.boof61016,this.tribe.push("HM"),this.ftext=`Each enemy creature gets ${y.jr9(this.boof123n,0)}.`,this.f=this.phmF}phmF(t){const i=p.qEnemyCreats();if(i.length>0){const r=this.boof123n;i.forEach(n=>{this.buffA(n,r)})}}palsC(){this.faction="A",this.rarity="L",this.name="Palladium Simulacrum",this.iAttack=this.boof4816,this.iHealth=this.boof248,this.iMobile=this.level-1,this.tribe.push("SS"),this.flanks=this.multNug(this.statSpawnNug(this.iAttack,this.iHealth,"TW"),.5),this.ftext=`If ${this.name} is in the center lane, Spawn a copy.`,this.f=this.palsF}palsF(t){I.toEnterField(t.event).creature.lane===3&&this.spawn(this,t.owner)}pokC(){this.faction="T",this.rarity="H",this.name="Patron of Kadras",this.iAttack=this.boof4812,this.iHealth=this.iAttack+2,this.tribe.push("ER","EL"),this.ftext=`If you have three or more Tempys cards in your hand, each friendly creature gets ${y.jr9(this.iAttack,0)} this turn.`,this.f=this.pokF}pokF(t){L.patron("T")&&p.ddf1().forEach(i=>{this.modA(i,b.modT("AT",this.iAttack))})}potC(){this.faction="N",this.rarity="H",this.name="Patron of Tarsus",this.iAttack=this.boof5914,this.iHealth=this.boof4712,this.tribe.push("DM");const t=this.potbuf;this.ftext=`If you have three or more Nekrium cards in your hand, each enemy creature gets ${y.jr9(t,t)}.`,this.f=this.potF}potF(t){if(L.patron("N")){const i=p.qEnemyCreats();if(i.length>0){const r=this.potbuf;this.logAct(!1),i.forEach(n=>{this.buffD(n,r)})}}}get potbuf(){return this.lValN([-1,-3,-6])}prinvC(){this.faction="T",this.rarity="H",this.name="Primordial Invoker",this.iAttack=this.boof61016,this.iHealth=this.boof468,this.tribe.push("HM"),this.ftext=`Deal ${this.iHealth} damage divided at random between enemy creatures and the the enemy player.`,this.f=this.prinvF}prinvF(t){const i=p.creatByTarget(b.crEnemyTarg()),r=i.length;if(r===0)this.ouch(!t.owner,this.iHealth),this.anim8(t.creatId);else{const n=E.tick(),c=r+1,f=Array(c).fill(0);for(let m=0;m{f[C]>0&&this.smack(m,f[C],n)}),f[r]>0&&(this.ouch(!t.owner,f[r]),this.anim8(t.creatId))}}rewC(){this.faction="U",this.rarity="L",this.name="Ramble, Eternal Witness",this.iAttack=this.boof3712,this.iHealth=this.iAttack+3+this.level,this.tribe.push("HM"),this.level===3?this.ftext="Spawn a random creature from your deck.":this.ftext=`Shuffle the level ${this.level+1} version of this from your discard pile into your deck.`,this.f=this.rewF}rewF(t){if(this.level===3){const i=b.target("DK");i.player="F",i.card="C";const r=w.deckByTarget(i).map(n=>n[0]);r.length>0&&this.spawn(r[S.randInt(0,r.length)],t.owner)}else{const i=k.getActive(),r=this.levelUpCard();i.discard.splice(i.discard.lastIndexOf(r),1),i.deck.push(r),nt.simOff&&(Ot.shuffleDeck(i),this.anim8(t.creatId))}}scorchC(){this.faction="T",this.rarity="L",this.name="Scorchmane Dragon",this.iAttack=this.lValN([0,12,24]),this.iHealth=this.boof61224,this.tribe.push("DG"),this.iDefend=this.level===1,this.iMobile=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=["LG","LM"]),this.f=this.scorchF}scorchF(t){const i=I.toEnterField(t.event),r=!t.owner;if(this.level===2){const n=i.creature.opposed;n&&this.smack(n,5)}else if(this.level===3){const n=E.tick();p.qPlayerCreats(r).forEach(c=>this.smack(c,5,n)),this.ouch(r,5),this.anim8(i.creature)}}scythC(){this.faction="N",this.rarity="L",this.name="Chiron, Herald of Torment",this.iAttack=12,this.iHealth=6,this.tribe.push("DM"),this.ftext=`Each enemy creature gets ${y.jr9(-6,0)} and ${this.name} gets ${y.jr9(6,0)} for each enemy creature.`,this.f=this.scythF}scythF(t){const i=p.qEnemyCreats();i.forEach(r=>{this.buffA(r,-6)}),i.length>0&&this.buffA(p.creatByTr(t),6*i.length)}souldrC(){if(this.faction="N",this.rarity="L",this.name="Soul Drinker",this.iAttack=1,this.iHealth=this.boof4814,this.iMobile=this.level===3?1:0,this.tribe.push("VP"),this.level===3){const t=this.avgCreatureStats();this.flanks=this.buffNug(t[0]*2,0,"TS")}this.ftext=`The opposing creature's attack gets reduced to 0 and ${this.name} gains that much attack.`,this.f=this.souldrF}souldrF(t){const i=I.toEnterField(t.event),r=i.creature.opposed;if(r){const n=r.attack;this.buffA(i.creature,n),this.buffA(r,-1*n)}}ssggC(){this.faction="N",this.rarity="H",this.name="Soulscourge Grimgaunt",this.iAttack=this.level+1,this.iHealth=this.iAttack,this.tribe.push("GG"),this.ftext=`${this.name} gets ${y.jr9(this.iAttack,this.iHealth)} for each creature that was destroyed this turn.`,this.f=this.ssggF}ssggF(t){const i=this.iAttack*(L.deathsA.length+L.deathsB.length);i>0&&this.buffD(p.creatByTr(t),i)}splgC(){this.faction="N",this.rarity="T",this.name="Spiderling",this.iAttack=this.boof369,this.iHealth=this.iAttack+1,this.tribe.push("SP"),this.ftext=`Replace the opposing ${y.levelGateText(this.level)}creature with a Web.`,this.f=this.splgF}splgF(t){const i=I.toEnterField(t.event);if(i.creature.opposed){const r=i.creature.opposed;w.levelTestCommon(r.level,this.level)&&this.replc("WEB"+this.level,r.owner,r.lane)}}sbdC(){this.faction="U",this.rarity="C",this.name="Spiritbloom Dryad",this.iAttack=this.boof6812,this.iHealth=this.iAttack+this.level,this.tribe.push("DY"),this.ftext=`Each player gains ${this.boof468} health.`,this.f=this.sbdF}sbdF(t){const i=this.boof468;this.balm(!0,i),this.balm(!1,i),this.anim8(t.creatId)}sssC(){this.faction="A",this.rarity="C",this.name="Steelskin Spelunker",this.iAttack=this.boof5814,this.iHealth=this.boof61018,this.tribe.push("HM"),this.ftext=`If there is another friendly creature in the center lane, that creature gets Armor ${this.boof124}`,this.f=this.sssF}sssF(t){const i=p.searchByLane(3,t.owner);i&&i.id!==t.creatId&&!i.negateArmor&&i.addArmor(this.boof124)}lotusC(){this.faction="U",this.rarity="H",this.name="Stygian Lotus",this.iAttack=this.boof468,this.iHealth=this.iAttack-1,this.tribe.push("PL"),this.hints=["ZZ-1"],this.ftext=`If ${this.name} is opposed, spawn a copy of it. Then repeat this for each copy.`,this.f=this.lotusF}lotusF(t){if(I.toEnterField(t.event).creature.opposed){let r=!0;for(;r;){const n=p.emptyLanes(t.owner),c=n.length;if(c===0)r=!1;else{const f=n[S.randInt(0,c)];this.poot(this,t.owner,f).opposed||(r=!1)}}}}tgiC(){this.faction="T",this.rarity="R",this.name="Thundergale Invoker",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("WN","GT"),this.ftext=`Each creature adjacent to ${this.name} moves one lane away if possible.`,this.f=this.tgiF}tgiF(t){const i=p.creatByTr(t),r=i.lane,n=i.owner,c=[];if(r>2){const f=p.searchByLane(r-1,n);f&&(p.searchByLane(r-2,n)||(c.push(f),this.lurk(f,r-2)))}if(r<4){const f=p.searchByLane(r+1,n);f&&(p.searchByLane(r+2,n)||(c.push(f),this.lurk(f,r+2)))}c.length>0&&this.logAct(!1,...c)}tortex(t){return`Put a level ${this.level} ${t} into your hand.`}handhoss(t,i){const r=k.toPlayer(i.owner);Dt.addCard(r,t+this.level,!0),this.anim8(i.creatId)}toraC(){this.faction="A",this.rarity="R",this.name="Torrent Acolyte",this.iAttack=this.boof71117,this.iHealth=this.iAttack-4,this.tribe.push("MM"),this.forges=this.level>1,this.ftext=this.tortex("Power Torrent"),this.f=this.toraF}toraF(t){this.handhoss("PTR",t)}torsC(){this.faction="U",this.rarity="R",this.name="Torrent Soldier",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("IN"),this.forges=this.level>1,this.ftext=this.tortex("Spore Torrent"),this.f=this.torsF}torsF(t){this.handhoss("STO",t)}torvC(){this.faction="T",this.rarity="R",this.name="Torrent Valkyrie",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("IC","AS"),this.forges=this.level>1,this.ftext=this.tortex("Ice Torrent"),this.f=this.torvF}torvF(t){this.handhoss("ITO",t)}torwC(){this.faction="N",this.rarity="R",this.name="Torrent Witch",this.iAttack=this.boof4814,this.iHealth=this.iAttack+3,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=this.tortex("Spirit Torrent"),this.f=this.torwF}torwF(t){this.handhoss("STR",t)}umglidC(){this.faction="T",this.rarity="R",this.name="Umbruk Glider",this.iAttack=this.boof71117,this.iHealth=this.iAttack-4,this.iMobile=this.level,this.allied="U",this.tribe.push("DN"),this.ftext="Breakthrough.",this.f=this.umglidF}umglidF(t){if(L.allied(this.allied)){const i=p.creatByTr(t);i.breakthrough=!0,i.anim8("U")}}uwarC(){this.faction="T",this.rarity="H",this.name="Uranti Warlord",this.iAttack=this.boof3713,this.iHealth=this.boof71117,this.tribe.push("FR","YT"),this.ftext=`Each friendly Yeti deals ${this.iAttack} damage to the opposing creature.`,this.f=this.uwarF}uwarF(t){const i=b.crFriendTarg();i.tribe="YT";const r=E.tick();p.creatByTarget(i).forEach(n=>{const c=n.opposed;c&&c.hurtDirect(this.iAttack,n.code,this.faction,r)})}ustokeC(){this.faction="T",this.rarity="R",this.name="Uranti Warstoker",this.iAttack=this.boof6812,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.ftext=`Each other friendly Yeti gets ${y.jr9(this.stokeboof,0)} this turn.`,this.f=this.ustokeF}ustokeF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="YT";const r=this.stokeboof;p.creatByTarget(i).forEach(n=>{this.modA(n,b.modT("AT",r))})}get stokeboof(){return this.lValN([3,4,6])}uiwC(){this.faction="A",this.rarity="L",this.name="Uriel Ironwing",this.iAttack=this.lValN([6,8,13]),this.iHealth=this.boof81117,this.iMobile=this.level,this.tribe.push("AG"),this.hints=["ZZ-1"];const t=this.boof246n;this.flanks=this.buffNug(-t,0,"TX");let i="";this.level===3&&(i=" If that creature has 0 or less attack, destroy it.",this.flanks.count=1),this.ftext=`The opposing creature gets ${y.jr9(t,0)}.${i}`,this.f=this.uiwF}uiwF(t){const n=I.toEnterField(t.event).creature.opposed;n&&(this.buffA(n,this.boof246n),this.level===3&&n.attack<1&&this.kill(n))}umaulC(){this.faction="U",this.rarity="C",this.name="Uterradon Mauler",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets ${y.jr9(t,t)}.`,this.f=this.umaulF}umaulF(t){const i=I.toEnterField(t.event);i.creature.opposed&&this.buffD(i.creature,this.boof246)}vlfxC(){this.faction="T",this.rarity="L",this.name="Valifrax, Iztek's Champion",this.iAttack=this.boof4816,this.iHealth=this.iAttack+4,this.iMobile=1,this.tribe.push("FR","IC","DG"),this.forges=!1,this.flanks=this.rawNug(0,0,0,0,.5);const t=(i,r)=>`If there is ${r?"an":"no"} opposing creature, put a level ${this.level} Iztek's ${i} into your hand.`;this.ftext=`${t("Frost",!0)} ${t("Flame",!1)}`,this.f=this.vlfxF}vlfxF(t){const i=I.toCreature(t.event);this.handhoss(i.creature.opposed?"IFR":"IFL",t)}vikC(){this.faction="N",this.rarity="L",this.name="Varna, Immortal King",this.maxLevel=4,this.iAttack=this.lValN([4,6,12,18]),this.iHealth=this.lValN([8,13,22,30]),this.tribe.push("FB");let t="";this.level===4&&(t="Destroy each other creature. Then "),this.ftext=t+"Spawn a random friendly creature that was destroyed this turn.",this.f=this.vikF}vikF(t){if(this.level===4){const n=p.creatByTarget(b.crNotMeTarg(t.creatId));if(n.length>0){const c=E.tick();n.forEach(f=>this.kill(f,c))}}const i=t.owner?L.deathsA:L.deathsB,r=i.length;r>0&&this.spawn(i[S.randInt(0,r)],t.owner)}vdrkC(){this.faction="U",this.rarity="R",this.name="Venomdrinker",this.iAttack=this.lValN([5,9,13]),this.iHealth=this.iAttack,this.tribe.push("NG"),this.ftext=`${this.name} gets ${y.jr9(1,1).replaceAll("1","X")}, where X is the total amount of Poison on each enemy creature.`,this.f=this.vdrkF}vdrkF(t){const i=p.qEnemyCreats();let r=0;i.forEach(n=>{r+=n.poison}),r>0&&this.buffD(p.creatByTr(t),r)}vnsC(){this.faction="U",this.rarity="H",this.name="Venomous Netherscale",this.iAttack=this.boof4713,this.iHealth=this.iAttack+4,this.tribe.push("NG"),this.ftext=`Double the Poison on each enemy creature${this.level===3?" and the enemy player":""}.`,this.f=this.vnsF}vnsF(t){const i=b.crEnemyTarg();if(i.hasPoison=!0,p.creatByTarget(i).forEach(n=>{n.addPoison(n.poison)}),this.level===3){const n=k.toPlayer(!t.owner),c=k.totalPoison(n);c>0&&k.addPoison(n,c)}}warC(){this.faction="A",this.rarity="H",this.name="War Machine",this.iAttack=3,this.iHealth=3,this.tribe.push("RB"),this.maxLevel=1,this.overload=!0,this.ftext=`Each other friendly creature gets ${y.jr9(3,0)}.`,this.f=this.warF}warF(t){const i=b.crFriendNotMeTarg(t.creatId);p.creatByTarget(i).forEach(r=>this.buffA(r,3))}wwpC(){this.faction="U",this.rarity="H",this.name="Weirwood Patriarch",this.iAttack=this.boof5714,this.iHealth=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 ${y.jr9(t,t)}.`,this.f=this.wwpF}wwpF(t){const i=this.boof235,r=b.crFriendTarg();r.maxAttack=this.boof357,p.creatByTarget(r).forEach(n=>this.buffD(n,i))}wfbC(){this.faction="N",this.rarity="C",this.name="Witherfrost Banshee",this.iAttack=this.boof3612,this.iHealth=this.iAttack,this.tribe.push("ST");const t=this.boof247n;this.flanks=this.buffNug(-t,-t),this.ftext=`The opposing creature gets ${y.jr9(t,t)}.`,this.f=this.wfbF}wfbF(t){const r=I.toEnterField(t.event).creature.opposed;r&&this.buffD(r,this.boof247n)}xtmC(){this.faction="N",this.rarity="H",this.name="Xithian Tormentor",this.iAttack=this.lValN([6,12,22]),this.iHealth=this.lValN([10,16,28]),this.tribe.push("AB"),this.ftext="Destroy each other friendly creature.",this.f=this.xtmF}xtmF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=E.tick();i.forEach(n=>this.kill(n,r))}}zdkC(){this.faction="N",this.rarity="H",this.name="Zombie Dreadknight",this.iAttack=this.boof5814,this.iHealth=this.iAttack-2,this.tribe.push("ZB");const t=this.boof246;this.ftext=`Each friendly creature with Regenerate gets ${y.jr9(t,t)}.`,this.f=this.zdkF}zdkF(t){const i=this.boof246,r=b.crFriendTarg();r.hasRegen=!0,p.creatByTarget(r).forEach(n=>this.buffD(n,i))}}class Ie extends P{cons(t){({["AMP"]:()=>this.aprmC(),["DOV"]:()=>this.dovC(),["LMD"]:()=>this.lmdC(),["MDR"]:()=>this.metaC(),["NCP"]:()=>this.ncplC(),["ORC"]:()=>this.ordcC()})[t]()}get formation(){return!0}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Formation: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);return r.jr4("FM"),r}jr8(t){this.f(t,I.toEnterField(t.event)),x.triggerDone()}aprmC(){this.faction="A",this.rarity="H",this.name="Automation Prime",this.iHealth=this.boof468,this.iAttack=this.iHealth+4,this.tribe.push("RB"),this.ftext=`${this.name} gets Armor ${this.iHealth}.`,this.f=this.aprmR}aprmR(t,i){i.creature.addArmor(this.iHealth)}dovC(){this.faction="N",this.rarity="R",this.name="Disciple of Vyric",this.iAttack=this.boof6915,this.iHealth=this.iAttack-2,this.tribe.push("VP");const t=this.boof468;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health.`,this.f=this.dovR}dovR(t,i){const r=this.boof468;this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(i.creature)}lmdC(){this.faction="N",this.rarity="L",this.name="Lichmane Dragon",this.iAttack=this.boof6915,this.iHealth=this.iAttack+1,this.iMobile=1,this.tribe.push("ST","DG"),this.ftext="Spawn an enemy creature that was destroyed this game.",this.f=this.lmdR}lmdR(t,i){const r=Bt.gravedigger(k.toTarget(!t.owner));if(r){const n=this.spawn(r,t.owner);n&&this.logAct(!1,n)}}metaC(){this.faction="A",this.rarity="R",this.name="Metadata Redactor",this.iAttack=this.boof6915,this.iHealth=this.iAttack-1,this.tribe.push("MM"),this.ftext="Remove all abilities from each friendly adjacent creature.",this.f=this.metaR}metaR(t,i){const r=b.crTarg();r.player=k.toTarget(t.owner),r.lanes=i.creature.adjacent,p.creatByTarget(r).forEach(n=>n.wipeAll())}ncplC(){this.faction="N",this.rarity="H",this.name="Necroplasm",this.iAttack=this.lValN([5,8,9]),this.iHealth=this.lValN([7,13,19]),this.tribe.push("OZ"),this.ftext="The enemy player discards a card at random.",this.f=this.ncplR}ncplR(t,i){const r=k.toPlayer(!t.owner);if(r.hand.length>0){Dt.cardDiscard(r,S.randInt(0,r.hand.length));const n=b.trigger("NT",this.code);n.bonus=this.rawNug(0,0,0,0,.5),k.addTr(t.owner,n),this.anim8(t.creatId)}}ordcC(){this.faction="A",this.rarity="C",this.name="Ordnance Captain",this.iAttack=this.lValN([3,6,8]),this.iHealth=this.boof61014,this.tribe.push("HM"),this.ftext=`Each friendly creature gets ${y.jr9(this.boof235,0)}.`,this.f=this.ordcR}ordcR(t,i){const r=this.boof235;p.qPlayerCreats(t.owner).forEach(n=>this.buffA(n,r))}}class ii extends P{cons(t){({["PYM"]:()=>this.pymC(),["RBG"]:()=>this.rbgC(),["SRV"]:()=>this.sprvC(),["TGK"]:()=>this.tgkC()})[t]()}hPlayer=0;trigB;bDraw=!0;constructor(t){super(t),this.cons(this.cardCode())}g;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("LG",this.code);return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.validPlayer(t)&&p.creatByTr(t).status==="A"}jr8(t){this.g(t),x.triggerDone()}validPlayer(t){return this.hPlayer===0?!0:this.hPlayer===1?t.owner===t.event.playerA:t.owner!==t.event.playerA}pymC(){this.faction="T",this.rarity="R",this.name="Pyre Mystic",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("FR","AS"),this.hPlayer=-1;const t=this.lValS(["","2x ","3x "]);this.text=`When an enemy player gains health, deal ${t}that much damage to the enemy player.`,this.trigB=this.playerNug(this.boof369,"TW"),this.g=this.pymG}pymG(t){this.ouch(t.event.playerA,t.event.healAmt*this.level,t.draw),t.draw&&this.anim8(t.creatId)}rbgC(){this.faction="U",this.rarity="H",this.name="Runebark Guardian",this.iAttack=this.boof5916,this.iHealth=this.iAttack,this.tribe.push("HM"),this.hPlayer=1;const t=this.boof135;this.text=`When you gain health, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.g=this.rbgG}rbgG(t){const i=this.boof135;p.creatByTr(t).buff(i,i,t.draw?"U":"X")}sprvC(){this.faction="N",this.rarity="R",this.name="Spirit Reaver",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("DM"),this.hPlayer=-1;const t=this.boof234;this.text=`When an enemy player gains health, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.hints=["ZZ-1"],this.g=this.sprvG}sprvG(t){const i=this.boof234;p.creatByTr(t).buff(i,i,t.draw?"N":"X")}tgkC(){this.faction="U",this.rarity="R",this.name="Tuskin Grovekeeper",this.iAttack=this.boof6912,this.iHealth=this.iAttack,this.tribe.push("TK"),this.bDraw=!1,this.hPlayer=1,this.text=`When you gain health, Spawn a 3/3 ${K.minionName(this.level)}.`,this.trigB=this.rawNug(.5,3,3,0,0,"TW"),this.g=this.tgkG}tgkG(t){const i=this.lValS(["SXD","SPL","TTF"])+this.level;this.spawn(i,t.owner)}}class Ye extends P{cons(t){({["AWU"]:()=>this.awuC(),["EWE"]:()=>this.eweC(),["FFM"]:()=>this.ffmC(),["LUC"]:()=>this.lugC(),["WBH"]:()=>this.wbhC()})[t]()}mPlayer=0;trigB;bDraw=!0;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("MV");return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.validPlayer(t)&&p.creatByTr(t).status==="A"}jr8(t){this.m(t),x.triggerDone()}bFac(t){return t.draw?this.faction:"X"}validPlayer(t){if(this.mPlayer===0)return!0;const i=I.toCreature(t.event);return this.mPlayer===1?t.owner===i.creature.owner:t.owner!==i.creature.owner}awuC(){this.faction="T",this.rarity="R",this.name="Arc Wurm",this.iAttack=this.boof4813,this.iHealth=this.iAttack+3,this.tribe.push("LT","EL"),this.iMobile=1,this.mPlayer=1;const t=this.boof234;this.text=`When a friendly creature moves, deal ${t} damage to the enemy player.`,this.trigB=this.playerNug(t,"TW"),this.m=this.awuM}awuM(t){this.ouch(!t.owner,this.boof234,t.draw),t.draw&&this.anim8(t.creatId)}eweC(){this.faction="T",this.rarity="H",this.name="Emberwind Evoker",this.iAttack=this.boof4914,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.mPlayer=1,this.bDraw=!1;const t=this.boof124;this.text=`When a friendly creature moves, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TX"),this.m=this.eweM}eweM(t){this.buffD(I.toCreature(t.event).creature,this.boof124)}ffmC(){this.faction="T",this.rarity="H",this.name="Frostfang Maiden",this.iAttack=this.boof5814,this.iHealth=this.iAttack+this.level,this.tribe.push("HM"),this.iMobile=this.level,this.bDraw=!1,this.mPlayer=1;const t=this.ffbof;this.text=`When a friendly creature moves, deal ${t} to the creature opposing it.`,this.trigB=this.buffNug(t,0,"TX"),this.m=this.ffmM}ffmM(t){const i=I.toCreature(t.event).creature.opposed;i&&this.smack(i,this.ffbof)}get ffbof(){return this.level+2}lugC(){this.faction="T",this.rarity="L",this.name="Lug, Uranti Charger",this.iAttack=this.boof359,this.iHealth=this.lValN([9,13,19]),this.level===3&&(this.iMobile=1),this.tribe.push("YT"),this.mPlayer=1,this.text="When a friendly creature moves on your turn, Lug battles an additional time.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.m=this.lugM}lugM(t){if(t.owner===k.activeA){const i=p.creatByTr(t);i.extraBattles+=1,t.draw&&this.anim8(i)}}wbhC(){this.faction="T",this.rarity="R",this.name="Windborn Hellion",this.iAttack=this.boof4812,this.iHealth=this.boof81217,this.tribe.push("WN","EL"),this.mPlayer=1,this.text=`When a friendly creature moves, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.buffNug(this.level,this.level,"TS"),this.m=this.wbhM}wbhM(t){p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}}class _t extends P{cons(t){({["ATG"]:()=>this.agrdC(),["ART"]:()=>this.arootC(),["ATS"]:()=>this.atrapC(),["ARB"]:()=>this.arbysC(),["BLH"]:()=>this.bblhC(),["CYC"]:()=>this.ccC(),["DHW"]:()=>this.dhwC(),["FBI"]:()=>this.fbiC(),["FLS"]:()=>this.flspkC(),["IBA"]:()=>this.beardC(),["IZK"]:()=>this.izzyC(),["KAW"]:()=>this.kasC(),["SWA"]:()=>this.swaC()})[t]()}trigB;constructor(t){super(t),this.cons(this.cardCode())}t;p;jr3(t,i){const r=super.jr3(t,i);if(this.trigB){const n=r.jr4("PC");n.bonus=this.trigB}return r}ddf8(t){return t.event.code==="PLC"?this.t(t,t.event):t.event.code==="TRE"&&this.cardCode()==="BLH"}jr8(t){t.event.code==="PLC"?this.p(t,t.event):this.kill(p.creatByTr(t)),x.triggerDone()}spMyTurn(t,i){return i.playerA===t.owner&&W.getCard(i.cardCode).type==="S"}fSpMyTurn(t,i){if(i.playerA===t.owner){const r=W.getCard(i.cardCode);if(r.type==="S"&&r.faction===this.faction)return!0}return!1}enemyPlay(t,i){return i.playerA!==t.owner}isAct(t){return p.jr5(t).status==="A"}agrdC(){this.faction="A",this.rarity="C",this.name="Aetherguard",this.iAttack=this.boof6814,this.iHealth=this.iAttack-1,this.tribe.push("RB"),this.trigB=this.rawNug(0,ft.calcCreatValueFormula(0,0,this.level,0,0,!1,0),0,0),this.text=`When you play a spell, ${this.name} gets Armor ${this.level}.`,this.t=this.spMyTurn,this.p=this.agrdP}agrdP(t,i){p.creatByTr(t).addArmor(this.level)}arootC(){this.faction="U",this.rarity="H",this.name="Aether Root",this.iAttack=this.boof3610,this.iHealth=this.iAttack,this.tribe.push("PL"),this.hints=[this.lValH(["ZZ+1","ZZ+2","ZZ+3"])];const t=this.boof234;this.text=`When you play an Uterra spell, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.t=this.fSpMyTurn,this.p=this.arootP}arootP(t,i){this.buffD(p.creatByTr(t),this.boof234)}atrapC(){this.faction="T",this.rarity="C",this.name="Aethertap Shaman",this.iAttack=this.lValN([7,9,16]),this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.trigB=this.regnNug(1),this.text=`When you play a spell, ${this.name} gets Mobility 1 this turn.`,this.t=this.spMyTurn,this.p=this.atrapP}atrapP(t,i){this.modA(p.creatByTr(t),b.modT("MB",1))}arbysC(){this.faction="A",this.rarity="H",this.name="Anvillon Arbiter",this.iAttack=this.boof3714,this.iHealth=this.iAttack+3,this.iArmor=1,this.tribe.push("RB"),this.text="When the enemy player plays their second card in a turn, that player discards their hand.",this.trigB=this.rawNug(0,0,0,0,1,"TX"),this.t=this.enemyPlay,this.p=this.arbysP}arbysP(t,i){if(L.cardsPlayed>1&&this.isAct(t.creatId)){const r=k.getActive();r.hand.length>0&&(Dt.cardDiscardAll(r),this.anim8(t.creatId))}}bblhC(){this.faction="T",this.rarity="L",this.name="Binben, Lightning Herald",this.iAttack=this.boof61017,this.iHealth=this.boof468,this.tribe.push("LT","AS");const t=W.getCard(this.lwy());this.text=`When you play a spell, Spawn a ${y.tokName(t)}. At the end of your turn, destroy it.`,this.trigB=this.spawnNug(t,"TX"),this.t=this.spMyTurn,this.p=this.bblhP}bblhP(t,i){if(this.isAct(t.creatId)){const r=this.spawn(this.lwy(),t.owner);if(r){const n=r.jr4("TE",this.code);n.changes=!0}}}lwy(){return "LWY"+this.level}ccC(){this.faction="N",this.rarity="H",this.name="Crypt Conjurer",this.iAttack=this.boof258,this.iHealth=this.lValN([8,14,20]),this.tribe.push("VP"),this.text=`When you play a Nekrium spell, deal ${this.iAttack} damage to the enemy player and you gain ${this.iAttack} health.`,this.trigB=this.playerNug(2*this.iAttack,"TX"),this.t=this.fSpMyTurn,this.p=this.ccP}ccP(t,i){this.isAct(t.creatId)&&(this.ouch(!t.owner,this.iAttack),this.balm(t.owner,this.iAttack),this.anim8(t.creatId))}dhwC(){this.faction="N",this.rarity="R",this.name="Darkheart Wanderer",this.iAttack=this.boof3612,this.iHealth=this.boof81116,this.tribe.push("HM");const t=this.boof124;this.text=`When you play a spell, ${this.name} gets Regenerate ${t}.`,this.trigB=this.regnNug(t),this.t=this.spMyTurn,this.p=this.dhwP}dhwP(t,i){this.regn(p.creatByTr(t),this.boof124)}fbiC(){this.faction="T",this.rarity="H",this.name="Flamebreak Invoker",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("FR","GT"),this.text=`When you play a Tempys spell, deal ${this.level} damage to each enemy creature.`,this.trigB=this.buffNug(0,this.level*2,"TX"),this.t=this.fSpMyTurn,this.p=this.fbiP}fbiP(t,i){if(this.isAct(t.creatId)){const r=E.tick();p.qEnemyCreats().forEach(n=>{this.smack(n,this.level,r)})}}flspkC(){this.faction="T",this.rarity="C",this.name="Flame Speaker",this.iAttack=this.lValN([2,6,13]),this.iHealth=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.trigB=this.playerNug(t,"TX"),this.t=this.spMyTurn,this.p=this.flspkP}flspkP(t,i){this.isAct(t.creatId)&&(this.ouch(!t.owner,this.boof235),this.anim8(t.creatId))}beardC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Ascendant",this.iAttack=this.lValN([6,9,14,20]),this.iHealth=this.iAttack,this.iArmor=this.level,this.maxLevel=4,this.tribe.push("FB");let t="";this.level>1&&(t=" and Armor "+(this.level-1));let i=this.lValS([this.name,this.name,this.name+" and adjacent friendly creatures","friendly creatures"]);this.text=`When you play Anvilbreaker, ${i} gets ${y.jr9(this.level+1,0)}${t}.`,this.trigB=this.rawNug(0,0,0,0,this.level/2,"TX"),this.t=this.beardT,this.p=this.beardP}beardT(t,i){return i.playerA===t.owner&&i.cardCode==="AVB"+"1"}beardP(t,i){const r=this.level+1,n=this.level-1,c=p.creatByTr(t);if(this.buffA(c,r),n>0&&c.addArmor(1),this.level>2){const f=b.crFriendTarg();this.level===3?f.lanes=c.adjacent.concat(c.lane):f.notMe=c.id,p.creatByTarget(f).forEach(m=>{this.buffA(m,r),m.addArmor(n)})}}izzyC(){this.faction="T",this.rarity="L",this.name="Iztek, Khan of Arrachtor",this.iAttack=this.boof6915,this.iHealth=this.iAttack,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.`,this.trigB=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.izzyT,this.p=this.izzyP}izzyT(t,i){if(i.playerA===t.owner){const r=i.cardCode.slice(0,3);return r==="IFL"||r==="IFR"}return!1}izzyP(t,i){const r=p.creatByTr(t),n=i.cardCode.slice(0,3)==="IFL"?"IZL":"IZR";this.replc(`${n}${this.level}`,r.owner,r.lane)}kasC(){this.faction="T",this.rarity="L",this.name="Kas, Arcweaver",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("LT","AS"),this.text="When you play a spell, Kas battles an additional time this turn.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.t=this.spMyTurn,this.p=this.kasP}kasP(t,i){this.wrang(p.creatByTr(t))}swaC(){this.faction="T",this.rarity="H",this.name="Sparkweaver Acolyte",this.iAttack=this.boof4610,this.iHealth=this.boof61218,this.tribe.push("LT","AS"),this.text=`When you play a Tempys spell, ${this.name} gets ${y.jr9(this.iAttack,0)} this turn.`,this.trigB=this.multNug(this.buffNug(this.iAttack,0,"TW"),.5),this.t=this.fSpMyTurn,this.p=this.swaP}swaP(t,i){this.modA(p.creatByTr(t),b.modT("AT",this.iAttack))}}class ri extends P{cons(t){({["KTS"]:()=>this.kitC(),["RSC"]:()=>this.scootC(),["SCC"]:()=>this.shcrC(),["SND"]:()=>this.ssdC()})[t]()}trigB;constructor(t){super(t),this.cons(this.cardCode())}r;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RP");return n.bonus=this.trigB,r}ddf8(t){return t.creatId===t.event.replCreatId}jr8(t){this.r(t,I.toReplaced(t.event)),x.triggerDone()}kitC(){this.faction="U",this.rarity="H",this.name="Kitaru Sprite",this.iAttack=this.boof358,this.iHealth=this.boof71117,this.tribe.push("FY"),this.hints=["RT"],this.text=`When this is replaced, Spawn a ${this.name}.`,this.trigB=this.buffNug(0,this.iHealth,"TW"),this.r=this.kitR}kitR(t,i){this.spawn(this,t.owner)}scootC(){this.faction="A",this.rarity="T",this.name="Relic Scout",this.iAttack=this.level,this.iHealth=this.level,this.iArmor=this.level,this.free=!0,this.tribe.push("RB"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${y.jr9(this.level,this.level,!0)} and Armor ${this.level}.`,this.trigB=this.buffNug(this.level,ft.calcCreatValueFormula(this.level,this.level,this.level,0,0,!1,0)),this.r=this.scootR}scootR(t,i){this.buffD(i.creature,this.level),i.creature.addArmor(this.level)}shcrC(){this.faction="U",this.rarity="C",this.name="Shardclaw Crusher",this.iAttack=this.boof5812,this.iHealth=this.iAttack,this.tribe.push("IN"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.trigB=this.multNug(this.buffNug(this.iAttack,this.iAttack,"TX"),.5),this.r=this.shcrR}shcrR(t,i){this.buffD(i.creature,this.iAttack)}ssdC(){this.faction="U",this.rarity="R",this.name="Spiritstone Druid",this.iAttack=this.boof4610,this.iHealth=this.lValN([3,4,6]),this.tribe.push("TG"),this.hints=["RT"],this.text=`When ${this.name} is replaced, put a ${this.iAttack}/${this.iHealth} Spirit into each adjacent available lane.`,this.trigB=this.buffNug(this.iAttack,this.iHealth,"TW"),this.trigB.count=1,this.r=this.ssdR}ssdR(t,i){const r=i.replCreat.adjacent,n=p.emptyLanes(t.owner),c=E.tick();r.forEach(f=>{n.includes(f)&&this.poot("SPU"+this.level,t.owner,f,c)})}}class Me extends P{cons(t){({["BST"]:()=>this.brimC(),["OSV"]:()=>this.scavC(),["RHU"]:()=>this.tiaC(),["SKS"]:()=>this.spsoC(),["SWG"]:()=>this.stgrC(),["VTW"]:()=>this.weldC(),["WEB"]:()=>this.webC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}u;image(t){return this.rarity==="T"?super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);return r.jr4("UP"),r}jr8(t){this.u(t,I.toReplaced(t.event)),x.triggerDone()}brimC(){this.faction="T",this.rarity="L",this.name="Brimstone Tyrant",this.iAttack=this.boof6916,this.iHealth=this.iAttack,this.tribe.push("FR","EL"),this.hints=["RD"];const t=this.boof468;this.text=`Upgrade: Deal ${t} damage to each other creature.`,this.u=this.brimR}brimR(t,i){const r=E.tick(),n=this.boof468;p.creatByTarget(b.crNotMeTarg(t.creatId)).forEach(c=>this.smack(c,n,r))}scavC(){this.faction="A",this.rarity="H",this.name="Oreian Scavenger",this.iAttack=this.boof6916,this.iHealth=1,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets Armor ${this.iAttack}.`,this.u=this.scavR}scavR(t,i){i.creature.addArmor(this.iAttack)}tiaC(){this.faction="A",this.rarity="L",this.name="Relic Hunter",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.iBT=!0,this.tribe.push("HM"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets +attack and +health equal to the creature it replaced.`,this.u=this.tiaR}tiaR(t,i){this.buffB(i.creature,i.replCreat.attack,i.replCreat.health)}spsoC(){this.faction="T",this.rarity="C",this.name="Sparksoul",this.iAttack=this.boof6915,this.iHealth=this.iAttack-1,this.tribe.push("LT","EL"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets Aggressive.`,this.u=this.spsoR}spsoR(t,i){i.creature.aggressive=!0,this.anim8(i.creature)}stgrC(){this.faction="A",this.rarity="C",this.name="Steelwatch Guard",this.iAttack=this.boof4711,this.iHealth=this.iAttack,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.u=this.stgrR}stgrR(t,i){this.buffD(i.creature,this.iAttack)}weldC(){this.faction="A",this.rarity="R",this.name="Vault Welder",this.iAttack=this.boof71118,this.iHealth=this.lValN([9,14,22]),this.iDefend=!0,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: Negate Defender from ${this.name}.`,this.u=this.weldR}weldR(t,i){i.creature.negDefend("A")}webC(){this.faction="N",this.rarity="T",this.name="Web",this.iAttack=0,this.iHealth=1,this.iDefend=!0,this.tribe.push("WB"),this.text=`Upgrade: ${this.name} attack and health become equal to the creature it replaced.`,this.u=this.webR}webR(t,i){this.buffB(i.creature,i.replCreat.attack,i.replCreat.health-1)}}class Ht extends P{cons(t){({["CGG"]:()=>this.cggC(),["CGF"]:()=>this.cfiendC(),["CSB"]:()=>this.corpsC(),["CYS"]:()=>this.cslmC(),["DSK"]:()=>this.dskC(),["FST"]:()=>this.fstrC(),["FWK"]:()=>this.fwlkC(),["FFD"]:()=>this.ffC(),["FSC"]:()=>this.flwcC(),["GVS"]:()=>this.ghsC(),["GBG"]:()=>this.ggC(),["GMR"]:()=>this.gromC(),["MMX"]:()=>this.mmeC(),["NOZ"]:()=>this.nyozC(),["POX"]:()=>this.poxC(),["RSZ"]:()=>this.rszC(),["SFM"]:()=>this.spirmC(),["SNT"]:()=>this.sssC(),["USA"]:()=>this.usaC(),["VGN"]:()=>this.vgfsC(),["XHS"]:()=>this.xhostC(),["ZTU"]:()=>this.zimusC()})[t]()}vtext="";trigB;v;fixedImgCreat=!1;constructor(t){super(t),this.cons(this.cardCode()),this.trigB&&(this.text="Vengeance: "+this.vtext),this.vtext=""}image(t){return this.fixedImgCreat?this.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.trigB){const n=r.jr4("VN");n.bonus=this.trigB}return r}jr8(t){this.v(t,I.toCreature(t.event)),x.triggerDone()}cggC(){this.faction="N",this.rarity="H",this.name="Ceaseless Grimgaunt",this.iAttack=this.boof5813,this.iHealth=1,this.tribe.push("GG"),this.vtext=`If there are no friendly creatures in play, Spawn a level ${this.level} ${this.name}.`,this.hints=["ST"],this.trigB=this.rawNug(0,0,0,0,.5),this.v=this.cggV}cggV(t,i){p.qPlayerCreats(t.owner).length===0&&(this.logAct(!1),this.spawn(this,t.owner))}cfiendC(){this.faction="N",this.rarity="T",this.name="Contagion Fiend",this.iAttack=this.boof234,this.iHealth=this.boof5812,this.tribe.push("AB"),this.hints=["ST"],this.fixedImgCreat=!0;const t=-this.level;this.vtext=`Each enemy creature gets ${y.jr9(t,t)}.`;const i=this.boof246;this.trigB=this.buffNug(i,i),this.v=this.cfiendV}cfiendV(t,i){const r=-this.level,n=E.tick();p.qPlayerCreats(!t.owner).forEach(c=>this.buffD(c,r,n))}corpsC(){this.faction="N",this.rarity="C",this.name="Corpulent Shambler",this.iAttack=this.lValN([5,7,15]),this.iHealth=this.iAttack,this.tribe.push("ZB"),this.vtext="Put a 3/3 Zombie into this lane.",this.trigB=this.buffNug(3,3),this.v=this.corpsV}corpsV(t,i){const r=`${"ZBS"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}cslmC(){this.faction="N",this.rarity="C",this.name="Crypt Slime",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.vtext="Put a 1/1 Oozeling into this lane.",this.trigB=this.buffNug(1,1),this.v=this.cslmV}cslmV(t,i){const r=`${"COZ"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}dskC(){this.faction="N",this.rarity="C",this.name="Death Seeker",this.iAttack=1,this.iHealth=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.trigB=this.buffNug(t,t),this.v=this.dskV}dskV(t,i){const r=`${"SPN"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}fstrC(){this.faction="N",this.rarity="R",this.name="Fell Strider",this.iAttack=this.lValN([4,8,10]),this.iHealth=this.boof369,this.tribe.push("ZB");const t=W.getCard(this.fsz());this.vtext=`Spawn a ${y.tokName(t)}.`,this.trigB=this.multNug(this.buffNug(t.iAttack,t.iHealth),.5),this.v=this.fstrV}fstrV(t,i){this.spawn(this.fsz(),i.creature.owner)}fsz(){return "ZST"+this.level}fwlkC(){this.faction="N",this.rarity="C",this.name="Fell Walker",this.iAttack=this.boof359,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.hints=["ST"];const t=W.getCard(K.zomc(this.level));this.vtext=`Put a ${y.tokName(t)} into this lane.`,this.trigB=this.buffNug(t.iAttack,t.iHealth),this.v=this.fwlkV}fwlkV(t,i){this.poot(K.zomc(this.level),i.creature.owner,i.creature.lane)}ffC(){this.faction="N",this.rarity="H",this.name="Fleshfiend",this.iAttack=this.boof6812,this.iHealth=this.iAttack,this.tribe.push("AB"),this.vtext=`Put a level ${this.level-1} ${this.name} into this lane.`,this.level>1&&(this.trigB=this.buffNug(0,this.lValN([0,6,15]))),this.v=this.ffV}ffV(t,i){const r=`${"FFD"}${this.level-1}`;this.poot(r,i.creature.owner,i.creature.lane)}flwcC(){this.faction="A",this.rarity="C",this.name="Flowsteel Carrier",this.iAttack=this.boof5915,this.iHealth=this.boof358,this.tribe.push("RB"),this.vtext=`Give a friendly Robot at random Armor ${this.iHealth}.`,this.trigB=this.regnNug(this.iHealth),this.v=this.flwcV}flwcV(t,i){const r=b.crTarg();r.player=k.toTarget(t.owner),r.tribe="RB";const n=p.creatByTarget(r);if(n.length>0){const c=n[S.randInt(0,n.length)];c.addArmor(this.iHealth),this.logAct(!1,c)}}ghsC(){this.faction="U",this.rarity="C",this.name="Glowhive Siren",this.iAttack=this.boof3814,this.iHealth=this.boof61117,this.tribe.push("IN"),this.vtext=`You gain ${this.boof124} to ${this.gghigh-1} health.`,this.trigB=this.playerNug(this.boof258),this.v=this.ghsV}ghsV(t,i){const r=S.randInt(this.boof124,this.gghigh);this.balm(t.owner,r),this.anim8(i.creature)}get gghigh(){return this.lValN([5,9,13])}ggC(){this.faction="N",this.rarity="C",this.name="Graveborn Glutton",this.iAttack=this.boof61117,this.iHealth=this.boof3814,this.tribe.push("AB"),this.vtext=`Deal ${this.boof124} to ${this.gghigh-1} damage to the enemy player.`,this.trigB=this.playerNug(this.boof258),this.v=this.ggV}ggV(t,i){const r=S.randInt(this.boof124,this.gghigh);this.ouch(!t.owner,r),this.anim8(i.creature)}gromC(){this.faction="U",this.rarity="C",this.name="Grove Matriarch",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("PL");const t=K.minionBuff(this.level),i=K.minionName(this.level);this.vtext=`Put a ${t}/${t} ${i} into this lane.`,this.trigB=this.buffNug(t,t),this.v=this.gromV}gromV(t,i){const r=K.minionCode(this.level);this.poot(r,i.creature.owner,i.creature.lane)}mmeC(){this.faction="A",this.rarity="C",this.name="Metamind Explorer",this.iAttack=this.boof3713,this.iHealth=this.iAttack+2,this.tribe.push("MM"),this.vtext=`Draw ${this.level} cards.`,this.trigB=this.rawNug(0,0,0,0,this.level*ft.dcWeight),this.v=this.mmeV}mmeV(t,i){k.drawCard(t.owner,this.level),this.anim8(i.creature)}nyozC(){this.faction="N",this.rarity="R",this.name="Nyrali Ooze",this.iAttack=this.boof247,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.hints=["ST"];const t=this.level+this.iAttack+1;this.vtext=`Put a ${t}/${t} Oozeling into this lane.`,this.trigB=this.buffNug(t,t),this.v=this.nyozV}nyozV(t,i){const r=`${"OOZ"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}poxC(){if(this.faction="N",this.rarity="H",this.name="Progeny of Xith",this.iAttack=this.boof246,this.iHealth=this.iAttack,this.tribe.push("AB"),this.hints=["LB","ST"],this.vtext=`Spawn a level ${this.level+1} ${this.name}.`,this.level<3){const t=this.lValN([10,6,0]);this.trigB=this.buffNug(t,t)}this.v=this.poxV}poxV(t,i){const r=`${"POX"}${this.level+1}`;this.spawn(r,i.creature.owner)}rszC(){this.faction="N",this.rarity="R",this.name="Runescarred Zombie",this.iAttack=this.lValN([5,8,16]),this.iHealth=this.boof359,this.tribe.push("ZB"),this.vtext=`Put a ${y.levelGateText(this.level)}spell at random from your discard pile into your hand.`,this.trigB=this.rawNug(0,0,0,0,.5),this.v=this.rszV}rszV(t,i){const r=k.toPlayer(t.owner),n=b.target("TD");n.player=k.toTarget(r),n.card="S",n.level=w.ddf2(this.level);const c=w.deckByTarget(n);if(c.length>0){const f=c[S.randInt(0,c.length)];r.discard.splice(f[1],1),Dt.addCard(r,f[0],!0),this.anim8(i.creature)}}spirmC(){this.faction="T",this.rarity="H",this.name="Spiritflame Mystic",this.iAttack=this.boof6912,this.iHealth=this.iAttack-3,this.tribe.push("HM"),this.hints=["ST"],this.vtext=`Deal ${this.boof246} damage to each creature.`,this.trigB=this.rawNug(0,0,0,0,.2),this.v=this.spirmV}spirmV(t,i){const r=this.boof246,n=E.tick();p.qActiveCreats().forEach(c=>this.smack(c,r,n))}sssC(){this.faction="N",this.rarity="L",this.name="Spiritstone Sentry",this.iAttack=this.boof4610,this.iHealth=this.iAttack,this.tribe.push("ST"),this.vtext=`If ${this.name} was in a side lane, Spawn a ${this.name}.`,this.hints=["ST"],this.trigB=this.buffNug(this.iAttack,this.iAttack),this.v=this.sssV}sssV(t,i){(i.creature.lane===1||i.creature.lane===5)&&this.spawn(i.creature.code,t.owner)}usaC(){this.faction="T",this.rarity="H",this.name="Unstable Asir",this.iAttack=this.boof357,this.iHealth=this.boof61016,this.iDefend=!0,this.tribe.push("FR","AS"),this.hints=["ST"],this.vtext=`Deal damage equal to ${this.name}'s attack to the enemy player.`,this.trigB=this.playerNug(this.iAttack),this.v=this.usaV}usaV(t,i){i.creature.attack>0&&(this.ouch(!t.owner,i.creature.attack),this.anim8(i.creature))}vgfsC(){this.faction="N",this.rarity="C",this.name="Vengeful Spirit",this.iAttack=this.boof357,this.iHealth=this.iAttack-2,this.tribe.push("ST"),this.hints=["ST"];const t=this.boof369n;this.vtext=`Give the opposing creature ${y.jr9(t,t)}.`,this.trigB=this.buffNug(-t,-t),this.v=this.vgfsV}vgfsV(t,i){const r=i.creature.opposed;r&&this.buffD(r,this.boof369n)}xhostC(){this.faction="N",this.rarity="C",this.name="Xithian Host",this.iAttack=this.boof359,this.iHealth=this.boof135,this.tribe.push("AB"),this.hints=["ST"],this.vtext=`Deal ${this.iAttack} damage to the enemy player and you gain ${this.iAttack} health.`,this.trigB=this.playerNug(this.iAttack*2),this.v=this.xhostV}xhostV(t,i){const r=this.iAttack;this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(i.creature)}zimusC(){this.faction="N",this.rarity="L",this.name="Zimus, the Undying",this.iAttack=this.boof51014,this.iHealth=this.lValN([2,5,7]),this.tribe.push(this.level===1?"HM":"ZB"),this.vtext=`Spawn a Zimus, the ${this.level===2?"Returned":"Undying"}.`,this.level<3?(this.hints=["LG"],this.level===2?(this.trigB=this.buffNug(this.iAttack,this.iHealth),this.hints.push("ZZ-5")):this.hints.push("ZZ-1")):(this.hints=["ST","ZZ-5"],this.trigB=this.buffNug(this.iAttack,this.iHealth),this.trigB.bonus=1),this.v=this.zimusV}zimusV(t,i){let r;this.level===2?r=`${"ZTR"}2`:r=`${"ZTU"}3`,this.spawn(r,t.owner)}}class Li extends vt{cons(t){({["IRT"]:()=>this.infrC(),["NXB"]:()=>this.nexbC()})[t]()}constructor(t){super(t),this.overload=!0,this.maxLevel=1,this.cons(this.cardCode())}m;nexus=!1;playTargets(){return[b.playerActTarg("F","CARD",this.code,"")]}handleAction(t){this.logSpell();const i=k.toPlayer(t.playerA),r={effId:E.genId(),logicCode:this.code};i.effects.push(r),this.enforcePlayerEffect(r,i),T.spellCast()}enforcePlayerEffect(t,i){const r=this.m(t.effId),n=this.nexus?[3]:[1,5];p.qPlayerCreats(i.isPlayerA).forEach(c=>{c.faction===this.faction&&n.includes(c.lane)?c.addModSafe(r):c.removeModSafe(t.effId)})}infrC(){this.faction="N",this.rarity="L",this.name="Infernal Ritual",this.text='You get "Each friendly Nekrium creature in the side lanes get Regenerate 2".',this.m=this.infrM}infrM(t){return b.mod("RG",2,t)}nexbC(){this.faction="A",this.rarity="L",this.name="Nexus Bubble",this.nexus=!0,this.text='You get "Friendly Alloyin creatures in the center lane get Armor 3".',this.m=this.nexbM}nexbM(t){return b.mod("AR",3,t)}}class qt extends vt{cons(t){({["AEC"]:()=>this.anceC(),["CYW"]:()=>this.wailC(),["DIS"]:()=>this.disnC(),["DRE"]:()=>this.dracC(),["DCH"]:()=>this.dchantC(),["EVT"]:()=>this.endvC(),["ESU"]:()=>this.esrgC(),["HOX"]:()=>this.howlC(),["IGR"]:()=>this.icegC(),["ITO"]:()=>this.itorC(),["IME"]:()=>this.imecC(),["LCE"]:()=>this.lucidC(),["MSP"]:()=>this.mendC(),["NEM"]:()=>this.netherC()})[t]()}playTarg;constructor(t){super(t),this.playTarg="X",this.cons(this.cardCode())}p;playTargets(){return[b.playerActTarg(this.playTarg,"CARD",this.code,"")]}handleAction(t){this.logSpell();const i=k.toPlayer(t.playerA);this.p(i),T.spellCast()}ddf8(t){if(t.trigger.type==="TE")return t.event.playerA===t.owner;if(t.trigger.type==="PC"){const i=t.event,r=W.getCard(i.cardCode);return r.type==="S"&&r.faction==="T"&&i.playerA===t.owner}else if(t.trigger.type==="EF"){const i=I.toEnterField(t.event);return i.creature.faction==="U"&&i.creature.owner===t.owner}else return!1}jr8(t){const i=Wt.extractCardCode(t.trigger.logicCode),r=t.event;let n=!1;if(i==="LCE"){n=!0;const c=k.toPlayer(r.playerA),f=this.level===1?1:2;this.logAct(!1),k.drawCard(c,f)}else if(i==="IME"){n=!0;const c=Bt.gravedigger(k.toTarget(t.owner),w.ddf2(this.level+1));c&&this.spawn(c,r.playerA)}else if(i==="DRE"){n=!0;const c=this.level===1?11:21;this.ouch(!r.playerA,S.randInt(1,c))}else if(i==="IGR")this.ouch(!r.playerA,2);else if(i==="EVT"){const c=I.toEnterField(t.event);this.buffD(c.creature,1),this.logAct(!1,c.creature)}else if(i==="AEC"){n=!0;const c=p.qPlayerCreats(t.owner);if(c.length>0){const f=this.level===1?[1,2]:[2,4];c.forEach(m=>{this.logAct(!1,m),this.buffB(m,f[0],f[1])})}}else super.jr8(t);if(n&&this.level<3){const c=k.toPlayer(r.playerA),f=b.trigIdx(c.triggers,t.trigger);f>-1?t.trigger.customCode==="P2"?c.triggers[f].customCode="P1":c.triggers.splice(f,1):console.error("Wery curious, could not find player trigger ",t.trigger)}x.triggerDone()}echTxt(){return"At the end of "+(this.level===3?"each of your turns":"this turn and your next turn")+", "}echoZ(t){const i=b.trigger("TE",this.code);return this.level<3&&(i.customCode="P2"),i.changes=!0,k.addTr(t,i),i}anceC(){this.faction="U",this.rarity="L",this.name="Ancestral Echoes",this.playTarg="F";const t=this.level===1?[1,2]:[2,4];this.text=`${this.echTxt()}each friendly creature gets ${y.jr9(t[0],t[1])}.`,this.p=this.aeZ}aeZ(t){const i=this.echoZ(t),r=this.boof248;i.bonus=this.buffNug(r,r*2)}wailC(){this.faction="N",this.rarity="R",this.name="Crypt Wail",this.playTarg="E";const t=this.boof579;this.text=`Deal ${t} damage to the enemy player and gain ${t} health. If a Raid occured this turn, deal ${t*2} damage and gain ${t*2} health instead.`,this.p=this.wailZ}wailZ(t){const i=this.boof579*(L.ffs>2?2:1);this.ouch(t,i),this.balm(!t.isPlayerA,i)}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.`,this.p=this.disnZ}disnZ(t){this.ouch(t,S.randInt(1,this.dshigh))}get dshigh(){return this.lValN([9,16,26])}dracC(){this.faction="T",this.rarity="L",this.name="Draconic Echoes",this.playTarg="F";const t=this.level===1?"10":"20";this.text=`${this.echTxt()}deal 1 to ${t} damage to the enemy player.`,this.p=this.deZ}deZ(t){const i=this.echoZ(t);i.bonus=this.playerNug(this.lValN([4,9,25]))}dchantC(){this.faction="U",this.rarity="C",this.name="Druid's Chant",this.playTarg="F",this.text=`You gain ${this.boof81220} health.`,this.p=this.dchantZ}dchantZ(t){this.balm(t,this.boof81220)}endvC(){this.faction="U",this.rarity="L",this.name="Enduring Vitality",this.overload=!0,this.maxLevel=1,this.playTarg="F",this.text=`You get "When a friendly Uterra creature enters play, it gets ${y.jr9(1,1)}".`,this.p=this.endvZ}endvZ(t){const i=b.trigger("EF",this.code);i.bonus=this.buffNug(4,4),i.changes=!0,k.addTr(t,i)}esrgC(){this.faction="A",this.rarity="R",this.name="Energy Surge",this.overload=this.level===3,this.level===1?this.hints=["LG"]:this.free=!0,this.playTarg="F",this.text=`Draw ${this.level} card${this.free?"s":""}.`,this.p=this.esrgZ}esrgZ(t){k.drawCard(t,this.level)}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.",this.p=this.howlZ}howlZ(t){const i=k.getActive(),r=i.rank*3;this.ouch(t,r),this.balm(i,r)}icegC(){this.faction="T",this.rarity="L",this.name="Ice Grasp",this.overload=!0,this.maxLevel=1,this.playTarg="F",this.text='You get "When you play a Tempys spell, deal 2 damage to the enemy player".',this.p=this.icegZ}icegZ(t){const i=b.trigger("PC",this.code);i.bonus=this.playerNug(6),i.changes=!0,k.addTr(t,i)}itorC(){this.faction="T",this.rarity="R",this.name="Ice Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg="E",this.text=`Deal ${this.boof234} damage to the enemy player.`,this.p=this.itorZ}itorZ(t){this.ouch(t,this.boof234)}imecC(){this.faction="N",this.rarity="L",this.name="Immortal Echoes",this.playTarg="F";const t=`Spawn a random friendly ${y.levelGateText(this.level+1)}creature that was destroyed this game`;this.text=`${this.echTxt()}${t}.`,this.p=this.ieZ}ieZ(t){const i=this.echoZ(t),r=this.lValN([1,1,3]);i.bonus=this.multNug(this.avgSpawnNug(),r)}lucidC(){this.faction="A",this.rarity="L",this.name="Lucid Echoes",this.playTarg="F";const t=this.level===1?"draw 1 card":"draw 2 cards";this.text=`${this.echTxt()}${t}.`,this.p=this.leZ}leZ(t){const i=this.echoZ(t),r=this.boof124*ft.dcWeight;i.bonus=this.rawNug(0,0,0,0,r)}mendC(){this.faction="U",this.rarity="R",this.name="Mending Spring",this.playTarg="F",this.text=`You gain 1 to ${this.mendboof} Health.`,this.p=this.mendZ}mendZ(t){nt.simOn?this.boof61224:this.mendboof+1,this.balm(t,S.randInt(1,this.mendboof+1))}get mendboof(){return this.lValN([10,20,40])}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`,this.p=this.netherZ}netherZ(t){const i=this.boof4712;this.ouch(t,i),this.balm(!t.isPlayerA,i)}}class $s extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Primeval Ancient",this.iAttack=this.boof359,this.iHealth=this.boof71117,this.tribe.push("DN"),this.text=`At the end of your turn, you gain ${this.healy} life.~Forge: If there are no enemy creatures, spawn a copy of this.`}get healy(){return this.level+2}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("TE");return n.bonus=this.playerNug(this.healy,"TW"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){t.trigger.type==="FR"?p.qEnemyCreats().length===0&&this.spawn(this,t.owner):t.event.code==="TRE"&&(this.balm(t.owner,this.healy),this.anim8(t.creatId)),x.triggerDone()}}class Us extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Rageborn Hellion",this.iAttack=this.boof469,this.iHealth=this.iAttack*2,this.tribe.push("FR","EL"),this.text=`When a friendly creature ${y.dbdtap()}, ${this.name} gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM"),c=this.boof246;return n.bonus=this.buffNug(c,c,"TP"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner}jr8(t){p.creatByTr(t).buff(this.level,this.level,t.draw?"T":"X"),x.triggerDone()}}class xe extends P{cons(t){({["BTD"]:()=>this.btdC(),["DKS"]:()=>this.dksC(),["HMO"]:()=>this.hrdC(),["HVE"]:()=>this.hveC(),["LTU"]:()=>this.ltuC(),["QSW"]:()=>this.qswC(),["RTW"]:()=>this.rlwC(),["SMS"]:()=>this.smsC()})[t]()}trigB;rtext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Raid: "+this.rtext,this.rtext=""}r;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RD");return n.bonus=this.trigB,r}jr8(t){this.r(t),x.triggerDone()}btdC(){this.faction="T",this.rarity="L",this.name="Blitzmane, the Destroyer",this.iAttack=this.lValN([5,8,10]),this.iHealth=this.iAttack-1,this.iAggro=!0,this.iMobile=1,this.tribe.push("DG"),this.trigB=this.buffNug(0,this.iAttack,"TX"),this.rtext="Deal damage equal to Blitzmane's attack to the opposing creature. If unopposed, deal the damage to the enemy player instead.",this.r=this.btdR}btdR(t){const i=p.creatByTr(t);if(i.attack>0){const r=i.opposed;r?this.smack(r,i.attack):(this.ouch(!i.owner,i.attack),this.anim8(i))}}dksC(){this.faction="T",this.rarity="R",this.name="Dragonkeeper Shaman",this.iAttack=this.boof61016,this.iHealth=this.boof369,this.tribe.push("HM");const t=this.level+2;this.trigB=this.buffNug(0,t,"TX"),this.rtext=`Deal ${t} damage to each enemy creature.`,this.r=this.dksR}dksR(t){const i=p.qEnemyCreats();if(i.length>0){const r=E.tick(),n=this.level+2;i.forEach(c=>this.smack(c,n,r))}}hrdC(){this.faction="U",this.rarity="C",this.name="Herd Mother",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.level+2;this.trigB=this.buffNug(this.level,this.level),"TS",this.rtext=`${this.name} gets ${y.jr9(t,t)}.`,this.r=this.hrdR}hrdR(t){this.logAct(!1),this.buffD(p.creatByTr(t),this.level+2)}hveC(){this.faction="U",this.rarity="R",this.name="Hive Empress",this.iAttack=this.boof234,this.iHealth=this.boof61016,this.tribe.push("IN"),this.hints=[this.lValH(["ZZ+1","ZZ+2","ZZ+4"])],this.trigB=this.playerNug(this.iAttack,"TX"),this.rtext=`Give the enemy player Poison ${this.iAttack}.`,this.r=this.hveR}hveR(t){this.logAct(!1),k.addPoison(!t.owner,this.iAttack),this.anim8(t.creatId)}ltuC(){this.faction="U",this.rarity="L",this.name="Lorus, the Unrivaled",this.iAttack=this.boof2612,this.iHealth=this.boof71117,this.tribe.push("LP"),this.trigB=this.buffNug(3,3,"TX"),this.level===3?this.rtext=`Each other friendly creature gets ${y.jr9(3,3)}.`:this.rtext=`Replace this with a level ${this.level+1} ${this.name}.`,this.r=this.ltuR}ltuR(t){if(this.logAct(!1),this.level===3)p.creatByTarget(b.crFriendNotMeTarg(t.creatId)).forEach(i=>this.buffD(i,3));else{const i=p.creatByTr(t);this.replc(this.levelUpCard(),i.owner,i.lane)}}qswC(){this.faction="T",this.rarity="L",this.name="Quakeasaurus Wrecks",this.iAttack=this.boof5814,this.iHealth=this.iAttack+2,this.tribe.push("DN");const t=this.boof234;this.trigB=this.playerNug(t,"TX"),this.rtext=`Deal damage to a random enemy creature and to the enemy player equal to ${t}x the number of friendly Dinosaurs.`,this.r=this.qswR}qswR(t){const i=b.crFriendTarg();i.tribe="DN";const r=p.creatByTarget(i).length*this.boof234,n=p.qEnemyCreats();n.length>0&&this.smack(n[S.randInt(0,n.length)],r),this.ouch(!t.owner,r),this.anim8(t.creatId)}rlwC(){this.faction="U",this.rarity="H",this.name="Relentless Wanderers",this.iAttack=this.boof51015,this.iHealth=this.iAttack-this.level,this.tribe.push("ST","WD"),this.hints=[this.lValH(["ZZ-1","ZZ-3","ZZ-3"])],this.trigB=this.multNug(this.statSpawnNug(this.iAttack,this.iHealth,"TW"),.5),this.rtext=`Spawn a ${y.tokName(this)}.`,this.r=this.rlwR}rlwR(t){this.spawn(this,t.owner)&&this.logAct(!1)}smsC(){this.faction="T",this.rarity="C",this.name="Stampeding Mongosaur",this.iAttack=this.boof61015,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.lValN([6,8,10]);this.trigB=this.playerNug(t/2,"TW"),this.rtext=`Deal ${t} damage to the enemy player.`,this.r=this.smsR}smsR(t){this.ouch(!t.owner,this.lValN([6,8,10])),this.anim8(t.creatId)}}class te extends P{cons(t){({["AIV"]:()=>this.avinvC(),["BSP"]:()=>this.bskphC(),["CRC"]:()=>this.crucC(),["ESK"]:()=>this.ebknC(),["FWC"]:()=>this.fwcC(),["FME"]:()=>this.feggC(),["MMV"]:()=>this.mmovC(),["PSH"]:()=>this.porshC(),["RGG"]:()=>this.runegC(),["SSR"]:()=>this.solrevC(),["SSM"]:()=>this.spshamC(),["SSG"]:()=>this.snoutC(),["UGM"]:()=>this.mantisC()})[t]()}rtext="";trigB;constructor(t){super(t),this.cons(this.cardCode()),this.text="Gain Rank: "+this.rtext,this.rtext=""}r;image(t){return this.rarity==="T"?this.cardCode()==="FWC"?this.rawImage("MPH",t):super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RU");return n.bonus=this.trigB,r}ddf8(t){return t.event.playerA===t.owner}jr8(t){this.r(t),x.triggerDone()}avinvC(){this.faction="T",this.rarity="H",this.name="Avalanche Invoker",this.iAttack=this.boof6914,this.iHealth=this.iAttack+1,this.tribe.push("ER","AS");const t=this.boof3612;this.trigB=this.buffNug(t,0,"TH"),this.rtext=`Deal ${t} damage to each non-Tempys creature.`,this.r=this.avinvR}avinvR(t){const i=this.boof3612,r=E.tick();p.qActiveCreats().filter(n=>n.faction!=="T").forEach(n=>this.smack(n,i,r))}bskphC(){this.faction="N",this.rarity="C",this.name="Blightskull Phantasm",this.iAttack=this.boof5814,this.iHealth=this.boof61017,this.tribe.push("ST");const t=this.boof369n;this.trigB=this.buffNug(0,-t,"TH"),this.rtext=`The opposing creature gets ${y.jr9(t,t)}.`,this.r=this.bskphR}bskphR(t){const i=p.creatByTr(t).opposed;i&&this.buffD(i,this.boof369n)}crucC(){this.faction="A",this.rarity="R",this.name="Crucible Colossus",this.iAttack=this.boof61016,this.iHealth=this.iAttack+2,this.tribe.push("RB"),this.iDefend=!0,this.trigB=this.rawNug(0,0,0,0,.2,"TH"),this.rtext=`Negate Defender from ${this.name}.`,this.r=this.crucR}crucR(t){p.creatByTr(t).negDefend("A"),t.trigger.bonus.threat=void 0}ebknC(){this.faction="N",this.rarity="H",this.name="Ebonskull Knight",this.iAttack=this.lValN([9,13,18]),this.iHealth=this.iAttack-2,this.tribe.push("VP"),this.trigB=this.rawNug(0,0,0,0,-1,"TL"),this.rtext=`Destroy ${this.name}.`,this.r=this.ebknR}ebknR(t){this.kill(p.creatByTr(t))}fwcC(){this.faction="U",this.rarity="T",this.maxLevel=1,this.name="Feywing Chrysalis",this.iAttack=0,this.iHealth=3,this.tribe.push("CR"),this.iDefend=!0,this.trigB=this.buffNug(5,5,"TH"),this.rtext=`Replace ${this.name} with a 9/9 Feywing.`,this.r=this.fwcR}fwcR(t){const i=p.creatByTr(t);this.replc(`${"FWG"}1`,i.owner,i.lane)}feggC(){this.faction="T",this.rarity="T",this.minLevel=this.level,this.maxLevel=this.level,this.name="Frostmane Egg",this.iAttack=0,this.iHealth=6,this.tribe.push("DG"),this.iDefend=!0;const t=this.lValN([6,9,13]);this.trigB=this.buffNug(t,t,"TH"),this.rtext=`Replace ${this.name} with a level ${this.level} Frostmane Dragon.`,this.r=this.feggR}feggR(t){const i=p.creatByTr(t);this.replc(`${"FMD"}${this.level}`,i.owner,i.lane)}mmovC(){this.faction="A",this.rarity="C",this.name="Metamind Overseer",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("MM"),this.trigB=this.rawNug(0,0,0,0,ft.dcWeight*.6,"TH"),this.rtext="Draw 2 cards.",this.r=this.mmovR}mmovR(t){k.drawCard(t.owner,2),this.anim8(t.creatId)}porshC(){this.faction="N",this.rarity="H",this.name="Portal Shade",this.iAttack=this.boof5914,this.iHealth=this.boof71118,this.tribe.push("ST"),this.trigB=this.multNug(this.avgSpawnNug(),.4),this.trigB.threat="TH",this.rtext="Spawn a random creature that was destroyed this game.",this.r=this.porshR}porshR(t){const i=Bt.gravedigger();i&&this.spawn(i,t.owner)}runegC(){this.faction="U",this.rarity="H",this.name="Runegrove Guardian",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("PL"),this.trigB=this.buffNug(0,this.iAttack,"TH"),this.rtext=`${this.name} gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.r=this.runegR}runegR(t){this.buffD(p.creatByTr(t),this.iAttack)}solrevC(){this.faction="U",this.rarity="L",this.name="Solstice Reveler",this.iAttack=this.boof4816,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof248;this.trigB=this.buffNug(t,t,"TH");const i=this.level===3;let r="";i&&(r=", and Breakthrough"),this.rtext=`Each friendly creature gets ${y.jr9(t,t,i)}${r}.`,this.r=this.solrevR}solrevR(t){const i=this.boof248;p.ddf1().forEach(r=>{this.buffD(r,i),this.level===3&&(r.breakthrough=!0)})}spshamC(){this.faction="T",this.rarity="C",this.name="Spiritfrost Shaman",this.iAttack=this.boof71117,this.iHealth=this.boof4610,this.tribe.push("HM");const t=this.boof579;this.rtext=`Deal ${t} damage to the enemy player.`,this.trigB=this.playerNug(t,"TH"),this.r=this.spshamR}spshamR(t){this.ouch(!t.owner,this.boof579),this.anim8(t.creatId)}snoutC(){this.faction="U",this.rarity="C",this.name="Stouthide Stegadon",this.iAttack=this.boof4714,this.iHealth=this.boof71117,this.tribe.push("DN"),this.rtext=`Heal ${this.snoutbof} damage from ${this.name}.`,this.trigB=this.buffNug(0,this.iHealth),this.r=this.snoutR}snoutR(t){p.creatByTr(t).heal(this.snoutbof)}get snoutbof(){return this.level*10}mantisC(){this.faction="U",this.rarity="C",this.name="Umbraglim Mantis",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.tribe.push("IN");const t=this.mantbof;this.rtext=`You gain ${t} health.`,this.trigB=this.playerNug(t/3,"TH"),this.r=this.mantisR}mantisR(t){this.balm(t.owner,this.mantbof),this.anim8(t.creatId)}get mantbof(){return this.lValN([8,10,12])}}class Os extends vt{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Remembrance",this.text=`Banish a ${y.levelGateText(this.level)}creature from your discard pile, then Spawn a copy of it.`}canPlay(){return this.remCrds(!1).length>0}playTargets(){const t=w.boardTarget("CARD",this.code);return t.param="P1",[t]}remCrds(t){const i=k.getActive(),r=b.target("TD");r.player=k.toTarget(i),r.card="C",r.level=w.ddf2(this.level);const n=bt.generateContent(i.discard,!1,r);return t?bt.uniqueContent(n):n}handleAction(t){if(t.param==="P1"){const i=this.remCrds(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else{const i=t,r=k.getActive();r.discard.splice(i.position,1);const n=this.spawn(i.card,r.isPlayerA);this.logSpell(n),gt.popMode(),T.spellCast()}}}class Vs extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Riftlasher",this.iAttack=this.boof359,this.iHealth=this.boof61016,this.tribe.push("FR","EL"),this.text=`When ${this.name} ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.interactive=!0,n.bonus=this.buffNug(this.iAttack,0,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId&&t.owner===k.activeA}jr8(t){const i=w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil(t.creatId,t.event.dmg)));i.length>0?(i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}handleAction(t){const i=S.deTil(t.param);this.smack(p.ddf6(t),parseInt(i[1])),T.actionDone(!0)}}class zs extends ae{jr3(t,i){const r=super.jr3(t,i);return r.jr4("AS"),r}jr8(t){if(t.trigger.type==="AS"){let i=!0;for(;i;){const r=this.spawn(this,t.owner);r?r.opposed&&(i=!1):i=!1}x.triggerDone()}else super.jr8(t)}}class Zs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Scourgeflame Sorcerer",this.iAttack=this.boof358,this.iHealth=this.boof5914,this.tribe.push("ZB");let i=": ",r=1;this.level<3&&(i=", destroy another friendly creature: ",r=.5);const n=`Destroy an enemy ${y.levelGateText(this.level+1)}creature.`;this.text=`Activate${i}${n}`,this.bonus=this.multNug(this.avgSpawnNug(),r),this.bonus.threat="TX"}canActivate(t){return this.enemies(t).length>0?this.level===3?!0:this.friends(t).length>0:!1}startActivation(t){let i;this.level===3?i=this.enemies(t):i=this.friends(t),i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.jr5(i[0]),n=p.ddf6(t);if(i[1]==="P1"){const c=this.enemies(r,n.id);c.push(T.cancelAction()),T.ddf5(c)}else{this.logAct(!0);const c=E.tick();this.level<3&&this.kill(p.jr5(i[2]),c),this.kill(n,c),r.endActivation()}}friends(t){const i=b.crFriendNotMeActTarg("CARD",t.id,this.code,S.enTil(t.id,"P1"));return w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t.id,"P2",i));return r.level=w.ddf2(this.level+1),w.toActions(r)}}class Ys extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Scourge Knights",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("ZB");const i=this.boof246n;this.text=`Formation: Give an enemy creature ${y.jr9(i,i)}.`}get formation(){return!0}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FM");return n.interactive=!0,r}jr8(t){if(t.owner!==k.activeA){x.triggerDone();return}const i=b.crEnemyActTarg("CARD",this.code,""),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),this.buffD(i,this.boof246n),T.actionDone(!0)}}class Ks extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Seismic Adept",this.iAttack=this.boof4712,this.iHealth=this.boof61218,this.tribe.push("HM"),this.text="Activate: Move an enemy creature to another available enemy lane.",this.bonus=this.rawNug(0,0,0,0,this.level*.5,"TW")}canActivate(t){return this.enemies(t).length>0&&this.empties(t).length>0}startActivation(t){const i=this.enemies(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.jr5(i[1]);if(i[0]==="P1"){const n=this.empties(r,p.ddf6(t).id);n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[2]);this.logAct(!0,n),this.lurk(n,t.lane),r.endActivation()}}empties(t,i=""){const r=b.emptyPlayerActTarg("E","CARD",this.code,S.enTil("P2",t.id,i));return w.toActions(r)}enemies(t){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P1",t.id));return w.toActions(i)}}class Xs extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Shadowsmith",this.iAttack=this.boof3612,this.iHealth=this.boof6915,this.tribe.push("DF","HM"),this.text=`When ${this.name} or another friendly Darkforged enters play on your turn, you may discard and level up a card.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("EF");return n.bonus=this.rawNug(0,0,0,0,.5,"TW"),n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}ddf8(t){const i=I.toCreature(t.event);return i.creature.owner===t.owner&&t.owner===k.activeA&&i.creature.isTribe("DF")}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class si extends P{constructor(t){super(t),this.rarity="R",this.iAttack=this.boof4612,this.iHealth=this.boof61016;const i=this.cardCode();i==="SSS"?this.steel():i==="LSS"?this.life():i==="FSS"?this.flame():i==="DSS"&&this.dark(),this.level>1?this.text=`When you play a ${y.levelGateText(this.level-1)}${y.factionText(this.faction)} card, you may ${this.tuxt}.`:this.hints=["LG"],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 ${y.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 ${y.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 r=super.jr3(t,i);if(this.level>1){const n=r.jr4("PC");n.interactive=!0,n.bonus=this.rawNug(0,0,0,0,this.level*.5,"TX")}return r}ddf8(t){if(t.event.playerA===t.owner){const i=W.getCard(t.event.cardCode);if(i.level0?T.ddf5(r):x.triggerDone()}else{const i=p.qPlayerCreats(!t.owner);if(i.length>0){this.logAct(!1);const r=this.splat;i.forEach(n=>n.addPoison(r))}x.triggerDone()}}}class Qs extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Slumbering Shrine",this.iAttack=0,this.iHealth=this.lValN([14,20,30]),this.iDefend=!0,this.tribe.push("ER","EL"),this.text="When you play an spell, you may Negate Defender from a friendly creature."}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.rawNug(0,0,0,0,.5,"TX"),n.interactive=!0,r}handleAction(t){const i=p.ddf6(t);i.negDefend("T"),this.logAct(!1,i),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,""),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class Js extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Snowdrift Alpha",this.iAttack=this.boof61224,this.iHealth=this.boof4816,this.tribe.push("ST","WF"),this.hints=[this.lValH(["ZZ-2","ZZ-3","ZZ-5"])];const i=W.getCard(this.hc());this.text=`Activate: Put a ${y.tokName(i)} into an available lane.`,this.bonus=this.spawnNug(i,"TX")}hc(){return "HTP"+this.level}canActivate(t){return this.empties(t).length>0}startActivation(t){const i=this.empties(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0),this.poot(this.hc(),t.playerA,t.lane),p.jr5(t.param).endActivation()}empties(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,t.id);return w.toActions(i)}}class _s extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Sparkstone Elemental",this.iAttack=this.boof4815,this.iHealth=this.iAttack+3,this.tribe.push("LT","EL"),this.text="Negate Defender from each creature."}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){if(t.status==="A"){const r=b.mod("ND",!0,t.id);p.qActiveCreats().forEach(n=>n.addModSafe(r))}else p.qActiveCreats().forEach(r=>r.removeModSafe(t.id))}}class ta extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Spiritcleave",this.text=`Destroy a ${y.levelGateText(this.level+1)}creature with the highest health among all creatures.${this.level===3?"~You gain health equal to that creature's health.":""}`}canPlay(){return p.creatByTarget(this.firstT()).length>0}playTargets(){return[this.firstT()]}firstT(){let t=-1;const i=p.qActiveCreats();i.forEach(c=>{c.health>t&&(t=c.health)});const r=i.filter(c=>c.health===t).map(c=>c.id),n=b.crActTarg("CARD",this.code,"");return n.level=w.ddf2(this.level+1),n.victims=S.enTil(...r),this.level<3&&(n.hint=["KL"]),n}handleAction(t){this.logSpell();const i=p.ddf6(t);this.kill(i),this.level===3&&this.balm(k.activeA,i.health),T.spellCast()}}class ea extends vt{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 ${y.jr9(i,i)}.`}canPlay(){return p.ddf1().length>0&&p.qActiveCreats().length>1}playTargets(){return[b.crFriendActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=b.crNotMeActTarg("CARD",r.id,this.code,S.enTil("P2",r.id));n.hint=["BF"];const c=w.toActions(n);c.push(T.cancelAction()),T.ddf5(c)}else this.logSpell(r),this.kill(p.jr5(i[1])),this.buffD(r,this.boof5814),T.spellCast()}}class ia extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Spite Hydra",this.iAttack=this.boof5914,this.iHealth=this.iAttack,this.tribe.push("HY"),this.text=`When ${this.name} ${y.dbdtac()}, this gets ${y.jr9(this.level,this.level)}.~Allied Tempys: Activate: Deal ${this.level} damage to another creature. This gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level),r}zapTargs(t){const i=b.crNotMeActTarg("CARD",t,this.code,t);return i.hint=["HR"],w.toActions([i,w.buttonTarget("CANC")])}canActivate(t){return this.zapTargs(t.id).length>1&&t.hasMod(t.id)}startActivation(t){T.ddf5(this.zapTargs(t.id))}ddf8(t){return t.event.battle&&t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}handleAction(t){const i=p.jr5(t.param);this.logAct(!0),this.smack(p.ddf6(t),this.level),i.buff(this.level,this.level,"T"),i.endActivation()}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="FR"){if(L.allied("T")){i.addMod(b.mod("AL",!0,i.id),"T"),i.changed=!0;const r=i.jr4("NT");r.bonus=this.buffNug(this.boof246,this.level,"TS")}}else t.trigger.type==="DM"&&this.buffD(i,this.level);x.triggerDone()}}class ra extends P{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Statis Warden",this.iAttack=this.boof5915,this.iHealth=this.iAttack+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 r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.rawNug(0,0,0,0,.5),r}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i);const r=b.mod("DF",!0);r.expiry="EN",this.modA(i,r),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,t.creatId);i.canDefender=!0;const r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class sa extends P{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Steeleye Researcher",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("HM"),this.hints=["RD"],this.text=`Upgrade: You may ${y.daluac()}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("UP");return n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions(i);r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}}class aa extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steeleye Seer",this.iAttack=0,this.iHealth=this.lValN([8,12,18]),this.iDefend=!0,this.tribe.push("HM"),this.level===3?this.text="Activate: Level up a card in your hand. You may use this ability twice each turn.":this.text="Activate: Level a card in your hand, then discard it if its level is higher than your Rank.",this.bonus=this.rawNug(0,0,0,0,this.lValN([.8,1.7,3]),"TX")}jr3(t,i){const r=super.jr3(t,i);return this.level===3&&(r.jr4("TS"),this.addExtraActivate(r)),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){this.addExtraActivate(p.creatByTr(t)),x.triggerDone()}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=k.toPlayer(i.owner);this.level===3||r.rank>parseInt(t.card.slice(3))?Dt.levelInHand(r,t.position,W.getCard(t.card).levelUpCard()):L.levelAndDiscardA(t),this.anim8(i),i.endActivation()}}class na extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steelscale Dragon",this.iAttack=this.boof4812,this.iHealth=this.iAttack+2,this.tribe.push("RB","DG"),this.iMobile=this.level;const i=this.boof246;this.addSp("M",i),this.text=`While each other friendly creature has Defender, ${this.name} gets ${y.jr9(this.iAttack,0)}, Armor ${i}, and Breakthrough.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("DF",this.code);n.area="C";const c=r.addEffect("PS",this.code);return c.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);if(i.player=k.toTarget(t.owner),p.creatByTarget(i).some(n=>!n.defender))t.removeModSafe(t.id);else{const n=b.mod("AT",this.iAttack,t.id),c=b.mod("AR",this.boof246,t.id),f=b.mod("BT",!0,t.id);t.addModSafe(n),t.addModSafe(c),t.addModSafe(f)}}}class oa extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Storm Bringer",this.iAttack=this.boof5814,this.iHealth=this.boof61018,this.tribe.push("WN","EL");const i=this.boof246;this.addSp("D",i),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 r=this.boof246,n=super.jr3(t,i),c=n.jr4("TS");c.bonus=this.rawNug(0,0,r,0,.2);const f=n.jr4("FK");return f.bonus=this.buffNug(r,0,"TW"),n}ddf8(t){return!0}jr8(t){if(t.trigger.type==="TS")p.fling(p.creatByTr(t),"T"),x.triggerDone();else if(t.trigger.type==="FK"){const r=I.toCreature(t.event).creature.opposed;r&&this.smack(r,this.boof246),x.triggerDone()}else super.jr8(t)}}class ha extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Sulgrim, Herald of Force",this.iAttack=15,this.iHealth=15,this.tribe.push("GL"),this.addSp("M",6),this.bonus=this.buffNug(6,0,"TX"),this.text="Activate: Deal damage equal to a friendly creature's Armor to an enemy creature.~Forge: Each friendly creature gets Armor 6."}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){const i=this.friends(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[1]==="P1"){const n=this.enemies(i[0],r.id);n.push(T.cancelAction()),T.ddf5(n)}else if(i[1]==="P2"){const n=p.jr5(i[2]);this.logAct(!0,n),this.smack(r,n.armor),p.jr5(i[0]).endActivation()}}jr8(t){p.ddf1().forEach(i=>i.addArmor(6)),x.triggerDone()}friends(t){const i=b.crFriendActTarg("CARD",this.code,S.enTil(t,"P1"));return i.hasArmor=!0,w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t,"P2",i));return w.toActions(r)}}class la extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Synapsis Oracle",this.iAttack=this.boof358,this.iHealth=this.lValN([9,15,24]),this.tribe.push("HM");let i;this.level===3?(this.text="Activate: Level up a card in your hand.",i=1):(this.text=`Activate: ${y.daluac(!0)}.`,i=.5),this.bonus=this.rawNug(0,0,0,0,i,"TX")}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=k.toPlayer(i.owner);this.level===3?Dt.levelInHand(r,t.position,W.getCard(t.card).levelUpCard()):L.levelAndDiscardA(t),this.anim8(i),i.endActivation()}}class ca extends yt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=t.owner?L.deathsA.length:L.deathsB.length;if(i>0){const r=E.tick();for(let n=0;n0}playTargets(){return[b.crEnemyActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=this.boof5812,n=p.ddf6(t);i[0]==="P1"?(this.logSpell(),this.smack(n,r),this.dino()?T.ddf5(w.toActions(b.crEnemyActTarg("CARD",this.code,"P2"))):T.spellCast()):(this.smack(n,r),T.spellCast())}dino(){const t=b.crFriendTarg();return t.tribe="DN",p.creatByTarget(t).length>0}}class da extends P{constructor(t){super(t),this.rarity="C",this.faction="U",this.name="Toorgmai Mender",this.tribe.push("PL"),this.iAttack=this.lValN([2,5,9]),this.iHealth=this.iAttack+3,this.text=`Forge: Give a creature or player ${y.jr9(0,this.iHealth)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=b.crActTarg("CARD",this.code,"");i.hint=["BF"];const r=b.actionTarget("TP","CARD",this.code,t.creatId);r.hint=["BF"];const n=[i,r,w.buttonTarget("NOTR")],c=w.toActions(n);T.ddf5(c)}handleAction(t){if(t.zone==="P")this.balm(t.playerA,this.iHealth),this.anim8(t.param);else{const i=p.ddf6(t);this.logAct(!1,i),this.buffH(i,this.iHealth)}T.actionDone(!0)}}class fa extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tremorsaur",this.iAttack=0,this.iHealth=this.lValN([8,16,24]),this.tribe.push("DN"),this.text=`When you are dealt damage, ${this.name} gets +attack equal to ${this.level===3?"2x ":""}the damage dealt.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.boof3610,0,"TS"),n.batch=!0,r}ddf8(t){return!t.event.isCreatTarg&&t.event.target===t.owner}jr8(t){const i=this.level===3?2:1;p.creatByTr(t).buff(t.event.dmg*i,0,t.draw?"U":"X"),x.triggerDone()}}class ga extends vt{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Trial by Combat";const i=this.boof369;this.text=`Give a friendly creature ${y.jr9(i,0)} this turn. Then it and an enemy creature deal damage equal to their attacks to each other.`}canPlay(){return p.qEnemyCreats().length>0&&p.ddf1().length>0}playTargets(){return[b.crFriendActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",r.id)));n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[1]);this.modA(n,b.mod("AT",this.boof369));const c=E.tick();this.smack(r,n.attack,c),this.smack(n,r.attack,c),T.spellCast()}}}class Ke extends P{cons(t){({["IKA"]:()=>this.ikaC(),["RSD"]:()=>this.rsdC(),["SSD"]:()=>this.ssdC(),["SOL"]:()=>this.stagC(),["WTK"]:()=>this.tinkC()})[t]()}mPlayer=0;trigB;constructor(t){super(t),this.cons(this.cardCode())}t;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TE");return n.bonus=this.trigB,r}ddf8(t){return this.validPlayer(t)}jr8(t){this.t(t),x.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=t.event;return this.mPlayer===1?i.playerA===t.owner:i.playerA!==t.owner}ikaC(){this.faction="T",this.rarity="L",this.name="Ignir, Khan of Ashur",this.iAttack=this.lValN([4,8,14,24]),this.iHealth=this.iAttack,this.tribe.push("FB"),this.maxLevel=4;let t;this.level<3?(this.hints=["LG","ZZ-2"],t="an enemy creature or player at random."):this.level===3?t="an enemy creature at random and the enemy player.":t="each enemy creature and player.",this.mPlayer=1,this.trigB=this.buffNug(0,this.iAttack,"TX"),this.text=`At the end of your turn, deal ${this.iAttack} damage to `+t,this.t=this.ikaT}ikaT(t){const i=p.qEnemyCreats(),r=i.length>0;let n=this.level>2,c=-1;if(this.level===4&&r){const f=E.tick();i.forEach(m=>this.smack(m,this.iAttack,f))}if(this.level===3&&r&&(c=S.randInt(0,i.length)),this.level<3){const f=S.randInt(0,i.length+1);f===i.length?n=!0:c=f}c>-1&&this.smack(i[c],this.iAttack),n&&(this.ouch("E",this.iAttack),this.anim8(t.creatId))}rsdC(){this.faction="U",this.rarity="L",this.name="Rubyscale Dragon",this.iAttack=this.lValN([2,8,18]),this.iHealth=this.lValN([7,11,24]),this.tribe.push("DG"),this.level===1?(this.iDefend=!0,this.hints=["LG"]):(this.iMobile=1,this.level===3&&(this.hints=["ZZ-5"])),this.mPlayer=1;const t=this.lValN([1,2,5]);this.trigB=this.playerNug(t,"TX"),this.text=`At the end of your turn, you and each other friendly creature gets ${y.jr9(0,t)}.`,this.t=this.rsdT}rsdT(t){const i=this.lValN([1,2,5]);p.creatByTarget(b.crFriendNotMeTarg(t.creatId)).forEach(n=>this.buffH(n,i)),this.balm(t.owner,i),this.anim8(t.creatId)}ssdC(){this.faction="T",this.rarity="L",this.name="Smolderscale Dragon",this.iAttack=this.lValN([0,3,15]),this.iHealth=this.lValN([6,13,30]),this.tribe.push("DG"),this.level===3?this.iMobile=2:(this.hints=["LG"],this.iDefend=!0),this.mPlayer=1;const t=this.boof135;this.trigB=this.buffNug(t*2,0,"TX"),this.text=`At the end of your turn, deal ${t} damage to each enemy creature.`,this.t=this.ssdT}ssdT(t){const i=p.qEnemyCreats();if(i.length>0){const r=E.tick(),n=this.boof135;i.forEach(c=>this.smack(c,n,r))}}stagC(){this.faction="U",this.rarity="C",this.name="Stag of Lys",this.iAttack=this.boof5916,this.iHealth=this.iAttack,this.tribe.push("ST"),this.mPlayer=1;const t=this.boof246;this.trigB=this.playerNug(t,"TW"),this.text=`At the end of your turn, gain ${t} health.`,this.t=this.stagT}stagT(t){this.balm(t.owner,this.boof246),this.anim8(t.creatId)}tinkC(){this.faction="A",this.rarity="H",this.name="War Tinker",this.iAttack=this.level,this.iHealth=this.boof4812,this.tribe.push("GN"),this.mPlayer=-1,this.trigB=this.avgSpawnNug(),this.trigB.threat="TW",this.text=`At the end of the enemy player's turn, replace ${this.name} with a copy of a random Robot from your deck.`,this.t=this.tinkT}tinkT(t){const i=b.target("DK");i.player=k.toTarget(t.owner),i.tribe="RB";const r=w.deckByTarget(i),n=r.length;if(n>0){const c=r[S.randInt(0,n)][0],f=p.creatByTr(t);this.replc(c,f.owner,f.lane)}}}class jt extends P{cons(t){({["DCS"]:()=>this.delphC(),["GMP"]:()=>this.gmpC(),["LBL"]:()=>this.lbcC(),["MNM"]:()=>this.mnmC(),["NUG"]:()=>this.nugC(),["SBF"]:()=>this.sfangC(),["SSE"]:()=>this.sseC(),["SPD"]:()=>this.spdC(),["SPM"]:()=>this.spmC(),["TBA"]:()=>this.tbaC(),["USS"]:()=>this.ussC(),["VCG"]:()=>this.vgC(),["WBG"]:()=>this.woeC(),["ZSH"]:()=>this.zyxC()})[t]()}bothTurns=!1;trigB;constructor(t){super(t),this.cons(this.cardCode())}t;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TS");n.bonus=this.trigB;const c=Wt.extractCardCode(this.code);return(c==="ZSH"||c==="SBF")&&(r.extraBattles=1),r}ddf8(t){return this.bothTurns||t.event.playerA===t.owner}jr8(t){this.t(t),x.triggerDone()}delphC(){this.faction="A",this.rarity="L",this.name="Delpha, Chronosculptor",this.iAttack=this.boof7914,this.iHealth=this.iAttack,this.tribe.push("HM"),this.level>1&&(this.trigB=this.buffNug(5,4,"TX"),this.text=`At the start of your turn, level a ${this.level===2?"level 1 ":""}card in your hand at random.`),this.t=this.delphT}delphT(t){if(this.level>1){const i=k.toPlayer(t.owner),r=i.hand.map((c,f)=>{const m=W.getCard(c);return{idx:f,lvl:m.level,nxt:m.canLevel()?m.levelUpCard():""}}).filter(c=>c.nxt&&(this.level===3||c.lvl===1)),n=r.length;if(n>0){const c=r[S.randInt(0,n)];Dt.levelInHand(i,c.idx,c.nxt),this.anim8(t.creatId)}}}gmpC(){this.faction="A",this.rarity="L",this.name="Ghox, Metamind Paragon",this.iAttack=this.boof4814,this.iHealth=this.boof61218,this.tribe.push("MM");const t=this.level===1?"":"s";this.trigB=this.rawNug(0,0,0,0,this.level*ft.dcWeight,"TX"),this.text=`At the start of your turn, draw ${this.level} card${t}.`,this.t=this.gmpT}gmpT(t){k.drawCard(t.owner,this.level),this.anim8(t.creatId)}lbcC(){this.faction="U",this.rarity="R",this.name="Lightbringer Cleric",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("TK"),this.trigB=this.playerNug(this.boof3610,"TW"),this.text=`At the start of your turn, you gain ${this.boof137} to ${this.boof5914-1} health.`,this.t=this.lbcT}lbcT(t){this.balm(t.owner,S.randInt(this.boof137,this.boof5914)),this.anim8(t.creatId)}mnmC(){this.faction="N",this.rarity="L",this.name="Murderous Necromancer",this.iAttack=this.boof61017,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.trigB=this.avgSpawnNug(),this.trigB.threat="TX";let t;this.level===3?(t=" If that creature is opposed, destroy the creature opposing it.",this.hints=["ZZ-5"]):(t="",this.hints=["ZZ-3"]),this.text=`At the start of your turn, Spawn a random ${y.levelGateText(this.level)}creature that was destroyed this game.${t}`,this.t=this.mnmT}mnmT(t){const i=Bt.gravedigger("X",w.ddf2(this.level));if(i){const r=this.spawn(i,t.owner);if(r&&(this.logAct(!1,r),this.level===3)){const n=r.opposed;n&&this.kill(n)}}}nugC(){this.faction="T",this.rarity="L",this.name="Nug, Fury Fists",this.iAttack=this.boof71015,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.hints=["ZZ-3"],this.trigB=this.rawNug(0,0,0,0,1.5,"TX"),this.text="At the start of your turn, each other friendly creature deals battle damage equal to its attack to the creature opposing it.",this.t=this.nugT}nugT(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=E.tick();i.forEach(n=>{if(n.attack>0){const c=n.opposed;c&&c.hurtDirect(n.attack,n.code,this.faction,r)}})}}sfangC(){this.faction="T",this.rarity="H",this.name="Saberfang",this.iAttack=this.boof246,this.iHealth=1,this.iAggro=!0,this.tribe.push("CT"),this.trigB=this.buffNug(this.iAttack,0),this.text=`${this.name} battles an additional time on your turn.`,this.t=this.sfangT}sfangT(t){this.wrang(p.creatByTr(t))}sseC(){this.faction="U",this.rarity="L",this.name="Scatterspore Eidolon",this.iAttack=8,this.iHealth=this.iAttack,this.tribe.push("PL"),this.level<3&&(this.hints=["LB"]);const t=this.boof357,i=K.minionName(this.level);this.trigB=this.statSpawnNug(t,t,"TW"),this.text=`At the start of your turn, Spawn a ${t}/${t} ${i}.`,this.t=this.sseT}sseT(t){const i=this.lValS(["SXD","SXP","SXT"])+this.level.toString();this.spawn(i,t.owner)}spdC(){this.faction="U",this.rarity="R",this.name="Shardplate Delver",this.iAttack=this.boof4612,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.boof246;this.trigB=this.buffNug(t,t,"TS"),this.text=`At the start of your turn, ${this.name} gets ${y.jr9(t,t)}.`,this.t=this.spdT}spdT(t){this.buffD(p.creatByTr(t),this.boof246)}spmC(){this.faction="U",this.rarity="L",this.name="Shardplate Mutant",this.iAttack=this.boof91421,this.iHealth=this.iAttack,this.tribe.push("IN"),this.trigB=this.rawNug(0,0,0,0,this.lValN([-1.5,-2.1,-3])),this.text="At the start of your turn, randomly discard down to two cards in your hand.",this.t=this.spmT}spmT(t){const i=k.toPlayer(t.owner);if(i.hand.length>2){let r=i.hand.slice();const n=S.randInt(0,r.length);let c=-1;for(;c===-1;){const f=S.randInt(0,r.length);f!==n&&(c=f)}for(let f=r.length-1;f>-1;f--)f===n||f===c||Dt.cardDiscard(i,f);this.anim8(t.creatId)}}tbaC(){this.faction="U",this.rarity="L",this.name="Talisin, Bard of Abundance",this.iAttack=this.lValN([8,12,16]),this.iHealth=this.lValN([10,14,20]),this.tribe.push("SY"),this.bothTurns=this.lValB([!0,!0,!1]),this.level===3?this.trigB=this.multNug(this.avgSpawnNug(),.5):this.hints=["LG","ZZ-3"],this.text=`At the start of ${this.bothTurns?"each player's":"your"} turn, ${this.bothTurns?"that player":"you"} may play an additional card.`,this.t=this.tbaT}tbaT(t){L.freePlay(),this.anim8(t.creatId)}ussC(){this.faction="T",this.rarity="H",this.name="Uranti Stormshaper",this.iAttack=0,this.iHealth=this.lValN([9,12,18]),this.iDefend=!0,this.tribe.push("YT");const t=W.getCard("LWY"+this.level);this.trigB=this.spawnNug(t,"TX");const i=this.level===3?" into each available lane":"";this.text=`At the start of your turn, Spawn a ${y.tokName(t)}${i}.`,this.t=this.ussT}ussT(t){const i="LWY"+this.level;if(this.level===3){const r=p.emptyLanes(t.owner);if(r.length>0){const n=E.tick();r.forEach(c=>this.poot(i,t.owner,c,n))}}else this.spawn(i,t.owner)}vgC(){this.faction="T",this.rarity="C",this.name="Volcanic Giant",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("ER","GT"),this.trigB=this.playerNug(this.boof3610,"TW"),this.text=`At the start of your turn, deals ${this.boof137} to ${this.boof5914-1} damage to the enemy player.`,this.t=this.vgT}vgT(t){const i=S.randInt(this.boof137,this.boof5914);this.ouch(!t.owner,i),this.anim8(t.creatId)}woeC(){this.faction="N",this.rarity="L",this.name="Woebringer",this.iAttack=this.lValN([7,10,18]),this.iHealth=this.boof5815,this.tribe.push("AB"),this.trigB=this.playerNug(0,"TW"),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.`,this.t=this.woeT}woeT(t){const i=b.crTarg();this.level===3&&(i.player=k.toTarget(!t.owner));const r=p.creatByTarget(i);let n=99999,c=[];r.forEach(m=>{m.attack===n?c.push(m):m.attack0){const m=c[S.randInt(0,f)];this.kill(m)}}zyxC(){this.faction="T",this.rarity="L",this.name="Zyx, Storm Herald",this.iAttack=this.boof4712,this.iHealth=this.lValN([6,9,20]),this.iMobile=1,this.tribe.push("LT","AS"),this.text="Zyx battles an additional time on your turn.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.t=this.zyxT}zyxT(t){this.wrang(p.creatByTr(t))}}class ma extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tuskin Sporelord",this.iAttack=this.lValN([2,6,10]),this.iHealth=this.lValN([10,14,18]),this.tribe.push("TK"),this.text=`Activate: Put a copy of friendly ${y.levelGateText(this.level)}Plant into an available lane.`,this.bonus=this.multNug(this.avgSpawnNug(),.5),this.bonus.threat="TX"}canActivate(t){return this.emptySloots(t.id).length>0&&this.buddies(t.id).length>0}startActivation(t){const i=this.buddies(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(i[1],p.ddf6(t).code);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]),n=this.poot(i[2],r.owner,t.lane);this.logAct(!0,n),r.endActivation()}}emptySloots(t,i=""){const r=b.emptyPlayerActTarg("F","CARD",this.code,S.enTil("P2",t,i));return w.toActions(r)}buddies(t){const i=b.crFriendActTarg("CARD",this.code,S.enTil("P1",t));return i.tribe="PL",i.level=w.ddf2(this.level),w.toActions(i)}}class Gi extends vt{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.free=this.level===2),this.text="Discard and level up two cards."}canPlay(){const t=w.cardByTarget(k.getActive().deck,b.lvlHandActTarg(this.code,"")).length;return this.code==="MTS"+"1"?t>1:t>0}playTargets(){return[this.targParty("P1")]}handleAction(t){if(T.shiftPlayCard(t.position),t.param==="P1"){this.logSpell(),L.levelAndDiscardA(t);const i=this.targParty("P2"),r=w.toActions(i);r.length===0?T.spellCast():T.ddf5(r)}else L.levelAndDiscardA(t),T.spellCast()}targParty(t){const i=b.lvlHandActTarg(this.code,t);return i.deckPositionSkip=T.playPosition(),i}}class ai extends vt{cons(t){({["CFG"]:()=>this.confC(),["CSG"]:()=>this.cystgC(),["GRN"]:()=>this.grenC(),["TWG"]:()=>this.twstrC()})[t]()}cardTarg(t,i){const r=this.t(b.crActTarg("CARD",this.code,""));return r.param=t,r.notMe=i,r}xl=!0;constructor(t){super(t),this.cons(this.cardCode())}t;z;canPlay(){return p.creatByTarget(this.cardTarg("P1","")).length>1}playTargets(){return[this.cardTarg("P1","")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=S.enTil("P2",r.id),c=w.toActions([this.cardTarg(n,r.id),w.buttonTarget("CANC")]);T.ddf5(c)}else{const n=p.jr5(i[1]);this.xl?this.logSpell(n,r):this.logSpell(),this.z(n,r),T.spellCast()}}confC(){this.faction="T",this.rarity="C",this.name="Conflagrate",this.xl=!1,this.text=`Deal ${this.boof369} to two enemy creatures.`,this.t=this.confT,this.z=this.confZ}confZ(t,i){const r=E.tick(),n=this.boof369;this.smack(t,n,r),this.smack(i,n,r)}confT(t){return t.player="E",t}cystgC(){this.faction="A",this.rarity="C",this.name="Cypien Steelgraft",this.text=`Two friendly creatures get Armor ${this.boof246}.`,this.t=this.cystgT,this.z=this.cystgZ}cystgZ(t,i){const r=this.boof246;t.addArmor(r),i.addArmor(r)}cystgT(t){return t.player="F",t.canArmor=!0,t}grenC(){this.faction="N",this.rarity="C",this.name="Ghastly Renewal",this.text=`Give two friendly creatures Regenerate ${this.boof246}.`,this.t=this.grenT,this.z=this.grenZ}grenZ(t,i){const r=this.boof246;this.regn(t,r),this.regn(i,r)}grenT(t){return t.player="F",t.canRegen=!0,t}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 ${y.jr9(t,t)}.`,this.t=this.twstrT,this.z=this.twstrZ}twstrZ(t,i){const r=this.tsboof;this.buffD(t,r),this.buffD(i,r)}twstrT(t){return t.player="F",t}}class pa extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Umbruk Icecrusher",this.iAttack=this.boof61014,this.iHealth=this.boof246,this.tribe.push("DN"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to that player.~Allied Uterra: This gets ${y.jr9(2,2,!0)}, and Breakthrough.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.playerNug(this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="FR"){if(L.allied("U")){const i=p.creatByTr(t);i.breakthrough=!0,i.buff(2,2,"U")}}else t.trigger.type==="DM"&&(this.ouch(t.event.target,t.event.dmg),this.anim8(t.creatId));x.triggerDone()}}class ya extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Umbruk Lasher",this.iAttack=this.boof71014,this.iHealth=this.iAttack-1,this.iBT=!0,this.tribe.push("DN"),this.text=`Allied Tempys: When ${this.name} ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){p.ddf6(t).hurtDirect(parseInt(t.param),this.code,"T"),T.actionDone(!0)}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}jr8(t){if(t.trigger.type==="FR"){if(L.allied("T")){const i=p.creatByTr(t),r=i.jr4("DM");r.interactive=!0,r.bonus=this.buffNug(this.iAttack,0,"TP"),i.anim8("T"),i.changed=!0}x.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,r=w.toActions(b.crEnemyActTarg("CARD",this.code,i.dmg.toString()));r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}}}class ni extends P{cons(t){({["CBB"]:()=>this.cindC(),["EBW"]:()=>this.ebwC(),["IBR"]:()=>this.ibrfC(),["SBI"]:()=>this.sbiC()})[t]()}enemy=!1;ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text=`Forge: If you are rank ${this.level+1} or higher, `+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){this.f(p.ddf6(t)),T.actionDone(!0)}jr8(t){if(p.creatByTr(t).rank>this.level){const r=b.crActTarg("CARD",this.code,t.creatId);this.enemy?r.player="E":r.hint=["BF"];const n=w.toActions(r);n.length>0?T.ddf5(n):x.triggerDone()}else x.triggerDone()}ebwC(){this.faction="N",this.rarity="C",this.name="Ebonbound Warlord",this.iAttack=this.boof3714,this.iHealth=this.iAttack+4,this.tribe.push("VP"),this.enemy=!0;const t=this.boof369n;this.ftext=`give an enemy creature ${y.jr9(t,t)}.`,this.f=this.ebwF}ebwF(t){this.logAct(!1,t),this.buffD(t,this.boof369n)}sbiC(){this.faction="U",this.rarity="C",this.name="Shardbound Invoker",this.iAttack=this.boof4714,this.iHealth=this.iAttack+1,this.tribe.push("TK");const t=this.boof359;this.ftext=`give a creature ${y.jr9(t,t)}.`,this.f=this.sbiF}sbiF(t){this.logAct(!1,t),this.buffD(t,this.boof359)}cindC(){this.faction="T",this.rarity="C",this.name="Cinderbound Barbarian",this.iAttack=this.boof3612,this.iHealth=this.iAttack,this.tribe.push("FR","AS");const t=this.boof6912;this.enemy=!0,this.ftext=`deal ${t} damage to an enemy creature.`,this.f=this.cindF}cindF(t){this.smack(t,this.boof6912)}ibrfC(){this.faction="A",this.rarity="C",this.name="Ironbound Reinforcements",this.iAttack=this.lValN([3,6,8]),this.iHealth=this.iAttack*2,this.tribe.push("GN");const t=this.boof5812;this.ftext=`give a creature ${y.jr9(t,0)}.`,this.f=this.ibrfF}ibrfF(t){this.logAct(!1,t),this.buffA(t,this.boof5812)}}class ba extends P{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Uranti Elementalist",this.iAttack=this.boof4712,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.text=`Forge: You may move another friendly creature to an available lane adjacent to ${this.name}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=p.creatByTr(t);if(this.emptySloots(i).length>0){const r=b.crFriendNotMeActTarg("CARD",i.id,this.code,S.enTil("P1",i.id)),n=w.toActions(r);n.length>0?(n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logAct(!1,r),this.lurk(r,t.lane),T.actionDone(!0)}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",i))}}class Aa extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Uranti Heartseeker",this.iAttack=this.boof4915,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("YT"),this.addSp("D",this.iAttack),this.text=`Activate: Deal ${this.iAttack} damage to an enemy creature or player with exactly ${this.iAttack} health.`,this.bonus=this.buffNug(this.iAttack/2,0,"TW")}canActivate(t){return this.findVictims(t.id).length>0}startActivation(t){const i=this.findVictims(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.smack(r,this.iAttack)}else{this.logAct(!0);const r=t;this.ouch(r.playerA,this.iAttack),this.anim8(i)}i.endActivation()}findVictims(t){const i=this.iAttack,r=b.crEnemyTarg(),c=p.creatByTarget(r).filter(m=>m.health===i).map(m=>b.fieldSelectAction("CARD",m.lane,m.owner)),f=k.toPlayer("E");return f.health===i&&c.push(b.playerSelectAction("CARD",f.isPlayerA)),c.forEach(m=>{m.host=this.code,m.param=t}),c}}class ka extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Vaerus, Herald of Fury",this.iAttack=15,this.iHealth=12,this.iMobile=2,this.tribe.push("DG"),this.text="Each friendly creature battles an additional time on each of your turns."}jr3(t,i){const r=super.jr3(t,i);r.jr4("EF");const n=r.jr4("TS");return n.bonus=this.buffNug(20,0,"TX"),r}ddf8(t){if(t.event.code==="ENT"){const i=I.toCreature(t.event);return t.owner===i.creature.owner&&t.owner===k.activeA}else if(t.event.code==="TRS")return t.event.playerA===t.owner;return!1}giveXtra(t,i){t.hasMod(i)||(this.wrang(t),t.addMod(b.mod("TK",!0,i),"X"))}jr8(t){if(t.event.code==="ENT"){const i=I.toCreature(t.event);i.creature.id===t.creatId?p.ddf1().forEach(r=>{this.giveXtra(r,t.creatId)}):yt.itBirthedFirst(i.creature.id,t.creatId)&&this.giveXtra(i.creature,t.creatId)}else t.event.code==="TRS"&&p.ddf1().forEach(i=>{this.wrang(i),i.hasMod(t.creatId)||i.addMod(b.mod("TK",!0,t.creatId),"X")});x.triggerDone()}}class O extends P{constructor(t){super(t),this.cons(this.cardCode())}cons(t){({["AEN"]:()=>this.anvenf(),["AGU"]:()=>this.avguard(),["BTH"]:()=>this.batthid(),["BBB"]:()=>this.bart(),["BLW"]:()=>this.blitwi(),["BWG"]:()=>this.brambleguard(),["CHY"]:()=>this.cavernhyd(),["CSL"]:()=>this.cslime(),["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(),["LTM"]:()=>this.ltam(),["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(),["SMN"]:()=>this.steam(),["SGI"]:()=>this.stonefist(),["SCL"]:()=>this.stormcall(),["SMA"]:()=>this.ancient(),["SML"]:()=>this.lurker(),["TGS"]:()=>this.tsprout(),["TGN"]:()=>this.tgnome(),["TNM"]:()=>this.tiggy(),["TWS"]:()=>this.tscout(),["TWT"]:()=>this.tund(),["URD"]:()=>this.unrelenting(),["VBK"]:()=>this.vblock(),["VTC"]:()=>this.vtech(),["WHC"]:()=>this.wardog(),["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=["LG"]:this.consistent=!0}shite(){this.level<3&&(this.hints=["LB"])}ancient(){this.faction="U",this.rarity="C",this.name="Swampmoss Ancient",this.iAttack=this.lValN([7,12]),this.iHealth=this.iAttack,this.tribe.push("DN"),this.hints=[this.level===1?"ZZ-1":"ZZ-2"],this.maxLevel=2}anvenf(){this.faction="A",this.rarity="C",this.name="Anvillon Enforcer",this.iAttack=this.boof5711,this.iHealth=this.iAttack-1,this.iArmor=this.boof246,this.tribe.push("RB")}avguard(){this.faction="T",this.rarity="R",this.name="Avalanche Guardian",this.iAttack=this.boof5915,this.iHealth=this.lValN([8,15,23]),this.iMobile=1,this.iDefend=!0,this.tribe.push("IC","EL")}bart(){this.faction="U",this.rarity="H",this.name="Big Bad Bartok",this.iAttack=this.level+8,this.iHealth=this.iAttack,this.consistent=!0,this.shite(),this.tribe.push("TG")}batthid(){this.faction="U",this.name="Batterhide",this.iAttack=this.boof3814,this.iHealth=this.iAttack+3,this.sist(),this.iBT=!0,this.tribe.push("DN")}battledroid(){this.faction="A",this.rarity="H",this.name="Oreian Battledroid",this.iAttack=this.lValN([5,7,17]),this.iHealth=1,this.iArmor=this.iAttack,this.tribe.push("RB")}bearride(){this.faction="U",this.rarity="C",this.name="Deepwood Bear Rider",this.iAttack=this.lValN([5,16,18]),this.iHealth=this.lValN([2,8,10]),this.tribe.push("LP"),this.level===2&&(this.hints=["LB"])}blitwi(){this.faction="N",this.name="Blight Witch",this.iAttack=this.lValN([2,5,9]),this.iHealth=this.boof71117,this.sist(),this.iRegen=this.boof234,this.tribe.push("ZB")}brambleguard(){this.faction="U",this.rarity="C",this.name="Bramblewood Guardian",this.iAttack=this.boof2612,this.iHealth=this.lValN([9,14,24]),this.tribe.push("PL")}cavernhyd(){this.faction="U",this.rarity="C",this.name="Cavern Hydra",this.iAttack=this.boof4711,this.iHealth=this.boof71015,this.iRegen=this.boof135,this.tribe.push("HY")}cslime(){this.faction="N",this.rarity="C",this.name="Cavern Slime",this.iAttack=this.boof61218,this.iHealth=this.boof246,this.iRegen=this.iAttack,this.tribe.push("OZ"),this.hints=[this.lValH(["ZZ-2","ZZ-3","ZZ-5"])]}cindcol(){this.faction="T",this.rarity="C",this.name="Cinder Colossus",this.iAttack=this.lValN([3,13,24]),this.iHealth=this.lValN([4,14,27]),this.iDefend=!0,this.level===1&&(this.hints=["LG"]),this.tribe.push("ER","EL")}cindmy(){this.faction="T",this.rarity="C",this.name="Cinder Mystic",this.iAttack=this.lValN([4,11,21]),this.iHealth=this.boof3714,this.tribe.push("FR","AS")}citg(){this.faction="A",this.rarity="C",this.name="Citadel Guard",this.iAttack=this.lValN([8,12,25]),this.iHealth=this.lValN([9,13,30]),this.iDefend=!0,this.hints=[this.level===3?"ZZ-5":"ZZ-1"],this.tribe.push("RB")}crag(){this.faction="T",this.rarity="C",this.name="Crag Walker",this.iAttack=this.lValN([7,12,18]),this.iHealth=this.boof246,this.iMobile=1,this.tribe.push("DN")}dmaw(){this.faction="N",this.rarity="L",this.name="Duskmaw, Twilight Drake",this.iAttack=this.boof61017,this.iHealth=this.boof5915,this.iMobile=1,this.tribe.push("ST","DG")}duskzomb(){this.faction="N",this.rarity="C",this.name="Duskspire Zombie",this.iAttack=this.lValN([2,5,16]),this.iHealth=this.lValN([5,8,19]),this.iRegen=4,this.tribe.push("ZB")}falpha(){this.faction="A",this.rarity="C",this.name="Forge Guardian Alpha",this.iAttack=this.lValN([4,8,20]),this.iHealth=this.lValN([8,14,26]),this.iDefend=!0,this.tribe.push("RB","GD")}fangbear(){this.faction="U",this.rarity="C",this.name="Fangwood Bear",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("BR")}fbeta(){this.faction="A",this.rarity="R",this.name="Forge Guardian Beta",this.iAttack=this.lValN([5,8,20]),this.iHealth=this.lValN([3,6,18]),this.iArmor=this.boof124,this.tribe.push("RB","GD"),this.level===3&&(this.hints=["ZZ-3"])}ffang(){this.faction="U",this.rarity="C",this.name="Featherfang",this.iAttack=this.boof61218,this.iHealth=this.boof4812,this.tribe.push("DN")}firemane(){this.faction="T",this.rarity="C",this.name="Firemane Steed",this.iAttack=this.lValN([3,6,16]),this.iHealth=this.lValN([6,9,19]),this.iMobile=2,this.tribe.push("FR","EL")}flop(){this.faction="T",this.rarity="C",this.name="Flowstone Primordial",this.iAttack=this.lValN([6,7,15]),this.iHealth=this.iAttack+1,this.tribe.push("FR","EL")}fomega(){this.faction="A",this.rarity="L",this.name="Forge Guardian Omega",this.iAttack=this.boof255080,this.iHealth=this.iAttack,this.iMobile=this.boof124,this.iArmor=this.iMobile*10,this.iBT=!0,this.iAggro=!0,this.consistent=!0,this.tribe.push("RB","GD")}forgeplate(){this.faction="A",this.rarity="C",this.name="Forgeplate Sentry",this.iAttack=this.boof4915,this.iHealth=this.iAttack,this.iArmor=this.boof135,this.tribe.push("RB")}ggs(){this.faction="N",this.rarity="C",this.name="Grimgaunt Spectre",this.iAttack=this.lValN([3,11,14]),this.iHealth=this.iAttack,this.iMobile=1,this.level===1?this.hints=["LG"]:this.level===2&&(this.hints=["LB"]),this.tribe.push("GG")}geist(){this.faction="N",this.rarity="C",this.name="Grave Geist",this.iAttack=this.boof71118,this.iHealth=this.boof4711,this.tribe.push("ST")}ghast(){this.faction="N",this.rarity="C",this.name="Grave Ghast",this.iHealth=this.boof71013,this.iAttack=this.iHealth-2,this.iRegen=this.boof246,this.tribe.push("ZB")}glacial(){this.faction="T",this.rarity="C",this.name="Glacial Colossus",this.iAttack=this.boof61016,this.iHealth=this.lValN([8,13,19]),this.tribe.push("IC","EL"),this.iDefend=!0}hulk(){this.faction="N",this.rarity="C",this.name="Xithian Hulk",this.iAttack=this.boof4814,this.iHealth=this.iAttack+3,this.tribe.push("AB")}kadc(){this.faction="T",this.rarity="C",this.name="Kadras Colossus",this.iAttack=this.lValN([6,11,13]),this.iHealth=this.iAttack,this.tribe.push("GT"),this.shite(),this.level===1&&this.hints.push("ZZ+1")}ltam(){this.faction="T",this.rarity="C",this.name="Lightning Tamer",this.iAttack=this.lValN([6,8,10]),this.iHealth=1,this.tribe.push("LT","AS"),this.iAggro=!0}lurker(){this.faction="U",this.rarity="C",this.name="Swampmoss Lurker",this.iAttack=this.lValN([8,13,22]),this.iHealth=this.lValN([4,6,15]),this.tribe.push("DN"),this.level===3?this.hints=["ZZ-5"]:this.hints=["ZZ-1"]}lwyrm(){this.faction="T",this.rarity="C",this.name="Lightning Wyrm",this.iAttack=this.boof4711,this.iHealth=this.boof258,this.tribe.push("LT","EL"),this.iAggro=!0}lyshyd(){this.faction="U",this.rarity="C",this.name="Lysian Hydra",this.iAttack=this.boof5914,this.iHealth=this.iAttack+1,this.iRegen=this.level,this.tribe.push("HY")}marrow(){this.faction="N",this.rarity="C",this.name="Marrow Fiend",this.iAttack=this.boof81117,this.iHealth=this.lValN([1,5,13]),this.tribe.push("SK")}minot(){this.faction="A",this.name="Forgeplate Minotaur",this.iAttack=this.lValN([2,8,16]),this.iHealth=this.lValN([4,9,17]),this.sist(),this.iArmor=this.level,this.tribe.push("RB")}mmin(){this.faction="A",this.rarity="C",this.name="Metamind Infiltrator",this.iAttack=this.boof5917,this.iHealth=this.iAttack-1,this.tribe.push("MM")}mmop(){this.faction="A",this.rarity="C",this.name="Metamind Operator",this.iAttack=this.boof4610,this.iHealth=this.lValN([10,14,18]),this.tribe.push("MM")}narg(){this.faction="T",this.rarity="C",this.name="Nargath Warrior",this.iAttack=this.boof51014,this.iHealth=this.iAttack+1,this.tribe.push("ER","AS")}necrotic(){this.faction="N",this.rarity="C",this.name="Necrotic Wurm",this.iAttack=this.lValN([4,7,18]),this.iHealth=this.lValN([5,8,19]),this.tribe.push("WR")}nexcore(){this.faction="A",this.rarity="C",this.name="Nexus Core",this.iAttack=0,this.iHealth=this.lValN([15,25,40]),this.tribe.push("RB"),this.iDefend=!0}nyam(){this.faction="N",this.rarity="C",this.name="Nyrali Ambusher",this.iAttack=this.boof71117,this.iHealth=this.lValN([3,6,13]),this.tribe.push("OZ")}ogsl(){this.faction="U",this.rarity="C",this.name="Overgrown Spineleaf",this.iAttack=this.lValN([6,12,16]),this.iHealth=this.boof4812,this.tribe.push("PL")}oss(){this.faction="N",this.rarity="R",this.name="Ossuary Spirit",this.iAttack=this.lValN([1,3,6]),this.iHealth=this.boof91420,this.iRegen=this.iAttack+2,this.tribe.push("ST")}perd(){this.faction="N",this.rarity="C",this.name="Perdition Guard",this.iAttack=this.lValN([3,12,15]),this.iHealth=this.iAttack-1,this.tribe.push("NG"),this.level===1?this.hints=["LG","ZZ-1"]:this.level===2&&(this.hints=["LB"])}prowler(){this.faction="U",this.rarity="C",this.name="Deepbranch Prowler",this.iAttack=this.lValN([8,9,10]),this.iHealth=this.iAttack,this.tribe.push("CT"),this.shite(),this.iBT=!0}raptor(){this.faction="U",this.rarity="C",this.name="Deepmoss Raptor",this.iAttack=this.lValN([2,13,16]),this.iHealth=this.iAttack,this.level===1?this.hints=["LG","RT"]:this.level===2&&(this.hints=["LB"]),this.tribe.push("DN")}ravager(){this.faction="U",this.rarity="C",this.name="Fangwood Ravager",this.iAttack=this.boof5917,this.iHealth=this.iAttack,this.tribe.push("BE")}ravh(){this.faction="U",this.rarity="C",this.name="Ravenous Hydra",this.iAttack=this.boof5813,this.iHealth=this.iAttack+this.level,this.iRegen=this.level,this.iBT=!0,this.tribe.push("HY")}rime(){this.faction="T",this.rarity="C",this.name="Rimehorn Charger",this.iAttack=this.lValN([5,8,10]),this.iHealth=this.iAttack+3,this.iMobile=1,this.shite(),this.tribe.push("RM")}runprim(){this.faction="T",this.name="Runestorm Primordial",this.iAttack=this.boof3714,this.iHealth=this.iAttack-1,this.sist(),this.iAggro=!0,this.tribe.push("LT","EL")}scorp(){this.faction="N",this.rarity="C",this.name="Scavenger Scorpion",this.iAttack=this.lValN([6,9,11]),this.iHealth=this.iAttack,this.iRegen=this.level,this.shite(),this.tribe.push("AB")}scout(){this.faction="A",this.rarity="H",this.name="Scout Drone",this.iAttack=this.boof246,this.iHealth=this.iAttack,this.free=this.level>1,this.level<3&&(this.hints=[this.level===1?"LG":"LB"]),this.tribe.push("RB")}scrap(){this.faction="A",this.rarity="H",this.name="Scrapforge Titan",this.iAttack=this.lValN([1,5,20]),this.iHealth=this.iAttack,this.iArmor=this.lValN([1,5,10]),this.level===1&&(this.hints=["LG","LM","RT"]),this.tribe.push("RB")}sfsent(){this.faction="A",this.rarity="C",this.name="Spiritforge Sentinel",this.iAttack=this.lValN([3,6,9]),this.iHealth=this.iAttack*2,this.iArmor=this.lValN([1,2,6]),this.tribe.push("RB")}sparkbot(){this.faction="A",this.rarity="C",this.name="Spark Bot",this.iAttack=this.boof5914,this.iHealth=this.lValN([6,11,16]),this.tribe.push("RB")}sparkblade(){this.faction="A",this.rarity="C",this.name="Sparkblade Assassin",this.iAttack=this.lValN([4,12,14]),this.iHealth=this.lValN([5,13,15]),this.tribe.push("HM")}sparkass(){this.faction="T",this.rarity="C",this.name="Sparkbrand Asir",this.iAttack=this.lValN([2,7,9]),this.iHealth=this.lValN([6,11,13]),this.iAggro=!0,this.tribe.push("LT","AS")}sparkman(){this.faction="T",this.rarity="R",this.name="Sparktail Manticore",this.iAttack=this.boof369,this.iHealth=this.boof71116,this.iAggro=!0,this.iMobile=1,this.tribe.push("MT")}steam(){this.faction="T",this.rarity="C",this.name="Steam Sentinel",this.iAttack=this.lValN([8,14,20]),this.iHealth=this.boof61016,this.iDefend=!0,this.tribe.push("WT","EL")}stonefist(){this.faction="T",this.rarity="C",this.name="Stonefist Giant",this.iAttack=this.lValN([3,7,16]),this.iHealth=this.lValN([6,10,24]),this.tribe.push("ER","EL")}stormcall(){this.faction="T",this.rarity="C",this.name="Storm Caller",this.iAttack=this.lValN([8,11,14]),this.iHealth=this.iAttack-2,this.tribe.push("WN","AS")}tgnome(){this.faction="A",this.rarity="C",this.name="Technognome",this.iAttack=this.lValN([3,9,19]),this.iHealth=this.iAttack,this.level===1&&(this.hints=["LG"]),this.tribe.push("GN")}tiggy(){this.faction="U",this.rarity="C",this.name="Tigrin Nomad",this.iAttack=this.lValN([8,10,12]),this.iHealth=this.boof246,this.iBT=!0,this.shite(),this.tribe.push("TG")}tscout(){this.faction="A",this.rarity="C",this.name="Tower Scout",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("HM")}tund(){this.faction="A",this.rarity="C",this.name="Tundra Watcher",this.iAttack=this.lValN([5,10,12]),this.iHealth=this.lValN([8,11,13]),this.shite(),this.tribe.push("RB")}tsprout(){this.faction="U",this.rarity="C",this.name="Tanglesprout",this.iAttack=this.boof7911,this.iHealth=this.iAttack+1,this.shite(),this.tribe.push("PL")}unrelenting(){this.faction="N",this.rarity="H",this.name="Unrelenting Dead",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.iRegen=this.iAttack,this.tribe.push("ZB")}vblock(){this.faction="A",this.rarity="R",this.name="Vault Blockade",this.iAttack=0,this.iHealth=this.boof135,this.iArmor=this.boof101520,this.iDefend=!0,this.tribe.push("RB")}vtech(){this.faction="A",this.rarity="C",this.name="Vault Technician",this.iAttack=this.boof61218,this.iHealth=this.boof3915,this.tribe.push("HM")}warcharger(){this.faction="A",this.rarity="C",this.name="Ionic Warcharger",this.iAttack=this.boof4915,this.iHealth=this.lValN([7,12,18]),this.iMobile=1,this.tribe.push("RB")}wardog(){this.faction="T",this.rarity="T",this.name="Warhound Courser",this.iAttack=this.level,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("FR","EL"),this.free=!0}waterwalk(){this.faction="T",this.rarity="C",this.name="Water Walker",this.iAttack=this.lValN([5,12,14]),this.iHealth=this.lValN([2,9,11]),this.tribe.push("WT","AS")}windprime(){this.faction="T",this.rarity="C",this.name="Wind Primordial",this.iHealth=this.boof4814,this.iAttack=this.iHealth+2,this.iMobile=this.level,this.tribe.push("WN","EL")}xithcrush(){this.faction="N",this.rarity="C",this.name="Xithian Crusher",this.iAttack=this.lValN([4,10,16]),this.iHealth=this.iAttack+2,this.tribe.push("AB")}yetiwar(){this.faction="T",this.rarity="C",this.name="Yeti Warcaller",this.iAttack=this.boof248,this.iHealth=this.lValN([10,15,23]),this.tribe.push("YT")}zombinf(){this.faction="N",this.rarity="C",this.name="Zombie Infantry",this.iAttack=this.boof61015,this.iHealth=this.iAttack-1,this.tribe.push("ZB")}}class Ta extends vt{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Varna's Pact";const i=this.lValS(["a","two","three"]),r=this.level===1?"":"s",n=this.level===1?"was":"were";this.text=`Put ${i} random creature${r} that ${n} destroyed this game into ${i} lane${r}.`}playTargets(){return[this.fieldTarget("P1",[])]}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1")if(this.level===1)this.endSpell([t.lane],t.playerA);else{const r=this.fieldTarget("P2",[t.lane]);T.ddf5(w.toActions(r))}else if(i[0]==="P2"){const r=[t.lane,parseInt(i[1])];if(this.level===2)this.endSpell(r,t.playerA);else{const n=this.fieldTarget("P3",r);T.ddf5(w.toActions(n))}}else this.endSpell([t.lane,parseInt(i[1]),parseInt(i[2])],t.playerA)}endSpell(t,i){this.logSpell();const r=E.tick();t.forEach(n=>{const c=Bt.gravedigger();c&&this.replc(c,i,n,r)}),T.spellCast()}fieldTarget(t,i){const r=b.actionTarget("TF","CARD",this.code,S.enTil(t,...i));return r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(n=>!i.includes(n)),r}}class va extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Vigorwisp",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("ST"),this.text=`When ${this.name} gains health, heal that much damage from each other friendly creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("HG");return n.bonus=this.buffNug(0,this.boof369,"TW"),n.batch=!0,r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=b.crNotMeTarg(t.creatId);i.player=k.toTarget(t.owner),p.creatByTarget(i).forEach(r=>r.heal(t.event.healAmt,t.draw)),x.triggerDone()}}class Sa extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Voltaic Prophet",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("HM");const i="evel up each card in your hand",r=this.lValS(["You may discard and level up a card","Discard and l"+i,"L"+i]);this.text="Formation: "+r+"."}get formation(){return!0}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FM");return n.interactive=this.level===1,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){if(t.owner!==k.activeA){x.triggerDone();return}if(this.level===1){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}else{const i=k.getActive();this.logAct(!1);const r=i.hand.slice();if(this.level===2)for(let n=r.length-1;n>-1;n--)W.getCard(r[n]).canLevel()?L.levelAndDiscard(r[n],n,!1):Dt.cardDiscard(i,n);else r.forEach((n,c)=>{const f=W.getCard(n).levelUpCard();f!==n&&Dt.levelInHand(i,c,f)});this.anim8(t.creatId),x.triggerDone()}}}class Ca extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Warhound Raider",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("FR","AS"),this.text=`If there is a friendly Warhound Courser in play, ${this.name} has Aggressive.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);i.player=k.toTarget(t.owner),i.cardCode="WHC",p.creatByTarget(i).length===0?t.removeModSafe(t.id):t.addModSafe(b.mod("AG",!0,t.id))}}class wa extends ze{jr3(t,i){const r=super.jr3(t,i),n=r.jr4("LG"),c=this.boof124*5;return n.bonus=this.buffNug(c,c,"TS"),n.batch=!0,r}ddf8(t){return t.owner===t.event.playerA}jr8(t){const i=this.boof124*t.event.healAmt;p.creatByTr(t).buff(i,i,t.draw?"U":"X"),x.triggerDone()}}class Da extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Wildwood Sower",this.iAttack=this.boof3612,this.iHealth=this.lValN([6,11,18]),this.tribe.push("HM");const i=W.getCard(K.minionCode(this.level));this.text=`When you play a spell, you may put a ${y.tokName(i)} into an available lane.`,this.spB=this.spawnNug(i,"TW")}spB;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.spB,r}handleAction(t){this.poot(K.minionCode(this.level),t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,""),r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class xa extends P{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Windcaller Shaman",this.iAttack=this.boof3713,this.iHealth=this.iAttack+4,this.tribe.push("WN","AS"),this.text=`Forge: You may move another friendly ${y.levelGateText(this.level)}creature to an available lane adjacent to ${this.name}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=p.creatByTr(t);if(this.emptySloots(i).length>0){const r=b.crFriendNotMeActTarg("CARD",i.id,this.code,S.enTil("P1",i.id));r.level=w.ddf2(this.level);const n=w.toActions(r);n.length>0?(n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logAct(!1,r),this.lurk(r,t.lane),T.actionDone(!0)}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",i))}}class Ba extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Windspark Elemental",this.iAttack=this.boof258,this.iHealth=this.lValN([7,14,21]),this.tribe.push("LT","EL"),this.text=`When an enemy creature is delt non-battle damage, deal ${this.boof246} damage to the enemy player.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.playerNug(this.boof246,"TX"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return!i.battle&&i.isCreatTarg&&i.hurtCreat.owner!==t.owner}jr8(t){this.ouch(!t.owner,this.boof246,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class Ha extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Xithian Rotfiend",this.iAttack=this.lValN([7,12,20]),this.iHealth=this.iAttack+1,this.tribe.push("AB");const i=-this.boof135;this.text=`When ${this.name} becomes opposed, it gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("EF");const n=r.jr4("MV"),c=-this.boof135;return n.bonus=this.buffNug(c,c),r}ddf8(t){const i=I.toCreature(t.event);return t.trigger.creatId===i.creature.id&&t.trigger.type==="MV"||i.creature.owner!==t.owner}jr8(t){let i=!1;const r=p.creatByTr(t),n=I.toCreature(t.event);(r.id===n.creature.id&&r.opposed||n.creature.lane===p.oppositeLane(r.lane))&&(i=!0),i&&this.buffD(r,-this.boof135),x.triggerDone()}}class Na extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Zarox, the Raging",this.iAttack=this.lValN([2,4,10]),this.iHealth=this.lValN([8,12,18]),this.tribe.push("FR","EL"),this.text=`When Zaxox ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.~Allied Nekrium: When a creature is destroyed, Zarox gets ${y.jr9(this.boof124,0)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.interactive=!0,n.bonus=this.buffNug(this.lValN([3,6,14]),0,"TP"),r}handleAction(t){this.smack(p.ddf6(t),parseInt(t.param)),T.actionDone(!0)}ddf8(t){if(t.trigger.type==="DM"){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}else return!0}jr8(t){if(t.trigger.type==="FR"){if(L.allied("N")){const i=p.creatByTr(t),r=i.jr4("DS");r.bonus=this.buffNug(this.boof124,0,"TS"),r.batch=!0,i.changed=!0,i.anim8("N")}x.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,r=w.toActions(b.crEnemyActTarg("CARD",this.code,i.dmg.toString()));r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}else t.trigger.type==="DS"&&(this.logAct(!1),p.creatByTr(t).buff(this.boof124,0,t.draw?"N":"X"),x.triggerDone())}}class Fa extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Zombie Titan",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("ZB");const i=this.boof234;this.text=`While ${this.name} is in a side lane, it gets ${y.jr9(i,i,!0)} and Regenerate ${this.level}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){if(t.lane===1||t.lane===5){const i=this.boof234;[b.mod("AT",i,t.id),b.mod("HL",i,t.id),b.mod("MH",i,t.id),b.mod("RG",this.level,t.id)].forEach(n=>{t.addModSafe(n)})}else t.removeModSafe(t.id)}}class Pa{cardCache=new Map;mapper={["AAK"]:Ar,["ABB"]:kr,["ABM"]:mt,["AGC"]:mt,["AGK"]:Y,["AGP"]:ct,["AGW"]:$,["ASG"]:$,["AMS"]:Y,["AFO"]:Fe,["ATG"]:_t,["ATP"]:Le,["ART"]:_t,["ATS"]:_t,["AGM"]:De,["ALG"]:Ze,["AHL"]:Tr,["ALS"]:Ze,["ASB"]:de,["AAA"]:vr,["ABE"]:ct,["ATZ"]:$,["AEC"]:qt,["AVB"]:$,["ARB"]:_t,["AEN"]:O,["APM"]:Sr,["AQE"]:$,["AGD"]:Cr,["AFS"]:fe,["AWU"]:Ye,["ASQ"]:Tt,["AOP"]:$,["AMD"]:wr,["ABR"]:ae,["AFR"]:Y,["AMY"]:ae,["ABL"]:ve,["ATT"]:yt,["AMP"]:Ie,["AGU"]:O,["AIV"]:te,["ATI"]:Y,["BRS"]:Ei,["BTB"]:Fi,["BTH"]:O,["BTI"]:mt,["BTN"]:Ze,["BBB"]:O,["BLH"]:_t,["BFT"]:$,["BZH"]:$,["BSP"]:te,["BWK"]:De,["BLW"]:O,["BTD"]:xe,["BZS"]:Y,["BBR"]:$,["BBD"]:$,["BBL"]:$,["BBN"]:$,["BSR"]:mt,["BMY"]:Dr,["BSW"]:Tt,["BWW"]:we,["BTM"]:$,["BLP"]:$,["BOS"]:K,["BAW"]:mt,["BWG"]:O,["BTR"]:Y,["BWD"]:Ge,["BOF"]:Gt,["BSG"]:Br,["BSS"]:Y,["BTS"]:Ge,["BST"]:Me,["BWT"]:xr,["BRF"]:De,["BRH"]:yt,["BWH"]:Hr,["BWN"]:yt,["BRN"]:Pe,["BZD"]:Y,["BFM"]:Y,["BSM"]:Nr,["CKB"]:mt,["CDT"]:De,["CMF"]:bi,["CTL"]:ct,["CCS"]:Tt,["CDM"]:yt,["CHY"]:O,["CSR"]:Ei,["CSL"]:O,["CGG"]:Ht,["CHV"]:Fr,["CCC"]:ct,["CRS"]:Fe,["COD"]:ct,["CHT"]:$,["CTI"]:Y,["CHA"]:mt,["CHH"]:Y,["CHR"]:de,["CBB"]:ni,["CDC"]:O,["CFB"]:ae,["CNM"]:O,["CSW"]:Y,["CTG"]:O,["CCT"]:ei,["CFG"]:ai,["CGF"]:Ht,["CGL"]:Tt,["CSU"]:$,["CCR"]:mt,["CSB"]:Ht,["CNT"]:$,["CWK"]:O,["CRC"]:te,["CMR"]:Pr,["CYP"]:Mr,["CYC"]:_t,["COZ"]:K,["CYS"]:Ht,["CYW"]:qt,["CTW"]:$,["CTV"]:$,["CYR"]:yt,["CAG"]:$,["CBS"]:$,["CEX"]:ct,["CIN"]:ze,["CSH"]:Tt,["CSG"]:ai,["CTM"]:Er,["DFM"]:K,["DFR"]:Y,["DHC"]:Rr,["DHW"]:_t,["DRS"]:mt,["DSS"]:si,["DSW"]:Y,["DSE"]:mt,["DSA"]:mt,["DCR"]:ct,["DSK"]:Ht,["DPO"]:$,["DBA"]:Y,["DBP"]:O,["DMR"]:O,["DBR"]:O,["DFS"]:ct,["DCS"]:jt,["DPG"]:Gr,["DWW"]:Ir,["DDF"]:$,["DGZ"]:ct,["DNK"]:Wr,["DBN"]:Y,["DOV"]:Ie,["DDS"]:$r,["DIS"]:qt,["DSV"]:Ur,["DDD"]:Y,["DPB"]:Or,["DZA"]:K,["DZD"]:de,["DRE"]:qt,["DKS"]:xe,["DGS"]:mt,["DGW"]:Vr,["DRD"]:zr,["DBT"]:$,["DTR"]:de,["DFB"]:Gt,["DMW"]:fe,["DCH"]:qt,["DTD"]:O,["DHM"]:yt,["DSZ"]:O,["DYB"]:ve,["DBQ"]:Zr,["DYF"]:$,["DYS"]:Yr,["DYL"]:Kr,["EBW"]:ni,["ESD"]:Xr,["ESK"]:te,["EHW"]:qr,["ETN"]:$,["EWE"]:Ye,["EVT"]:qt,["ENP"]:$,["ESU"]:qt,["ENR"]:$,["EPD"]:ct,["EPH"]:jr,["EPS"]:ae,["ESG"]:Qr,["ESC"]:Ge,["ESP"]:Jr,["EWT"]:Y,["EHN"]:Ge,["EWF"]:K,["EWV"]:ct,["EFA"]:$,["EFM"]:ae,["EFP"]:_r,["EFE"]:ts,["EXD"]:$,["FWB"]:O,["FWR"]:O,["FFG"]:O,["FST"]:Ht,["FWK"]:Ht,["FIN"]:$,["FRR"]:ct,["FVA"]:ve,["FSL"]:De,["FWG"]:K,["FWC"]:te,["FFU"]:Tt,["FLH"]:bi,["FMS"]:O,["FSM"]:ct,["FOR"]:$,["FBC"]:ae,["FBI"]:_t,["FFS"]:Tt,["FLN"]:$,["FJT"]:$,["FRI"]:mt,["FSS"]:si,["FLS"]:_t,["FSH"]:Tt,["FFD"]:Ht,["FRV"]:mt,["FSC"]:Ht,["FSP"]:yt,["FPR"]:O,["FFL"]:$,["FGA"]:O,["FGB"]:O,["FGD"]:yt,["FGG"]:fe,["FGO"]:O,["FOL"]:Fe,["FPM"]:O,["FPS"]:O,["FWS"]:de,["FLC"]:mt,["FFM"]:Ye,["FRH"]:K,["FMD"]:es,["FME"]:te,["FSK"]:is,["FKS"]:rs,["FWT"]:Y,["FZS"]:$,["FUN"]:K,["GOS"]:ss,["GHS"]:fe,["GHB"]:ei,["GHR"]:as,["GRN"]:ai,["GTH"]:$,["GSC"]:De,["GMP"]:jt,["GTT"]:ns,["GCL"]:O,["GCR"]:$,["GLF"]:mt,["GRW"]:mt,["GSW"]:Y,["GVS"]:Ht,["GSS"]:Y,["GPV"]:os,["GBG"]:Ht,["GGE"]:O,["GGH"]:O,["GRP"]:hs,["GGB"]:Gt,["GGD"]:Gt,["GGR"]:Gt,["GGP"]:Gt,["GGS"]:O,["GGW"]:Gt,["GRM"]:ct,["GHT"]:mt,["GMR"]:Ht,["GSF"]:ls,["GAS"]:cs,["HMF"]:yt,["HOS"]:yt,["HTR"]:we,["HAR"]:$,["HFA"]:ti,["HOD"]:yt,["HMO"]:xe,["HRM"]:us,["HWM"]:ze,["HVE"]:xe,["HOX"]:qt,["HGS"]:ds,["HTP"]:fs,["IBF"]:ct,["IGR"]:qt,["ITO"]:qt,["ISB"]:ei,["IKA"]:Ke,["IME"]:qt,["IDF"]:yt,["IRT"]:Li,["IVS"]:ct,["ICD"]:gs,["IWC"]:O,["IBA"]:_t,["IHA"]:De,["IBR"]:ni,["IMD"]:de,["IMA"]:Y,["IZL"]:ms,["IZR"]:ps,["IZK"]:_t,["IFL"]:Pe,["IFR"]:$,["JPK"]:$,["KDC"]:O,["KSB"]:Y,["KAW"]:_t,["KOD"]:Tt,["KBE"]:ys,["KIW"]:bs,["KTS"]:ri,["KKK"]:we,["LOD"]:ct,["LFA"]:As,["LVG"]:we,["LKP"]:ks,["LGT"]:Y,["LLD"]:Ve,["LLG"]:Ve,["LLS"]:Ve,["LLT"]:Ve,["LLV"]:Ve,["LMD"]:Ie,["LBD"]:Y,["LSS"]:si,["LBL"]:jt,["LBC"]:Ts,["LBR"]:$,["LSK"]:Pe,["LTT"]:we,["LTM"]:O,["LWY"]:O,["LSP"]:ze,["LVH"]:vs,["LTU"]:xe,["LCE"]:qt,["LUC"]:Ye,["LMV"]:Y,["LHY"]:O,["LYR"]:Pe,["LYS"]:$,["MMH"]:mt,["MMY"]:$,["MHR"]:Ss,["MRF"]:O,["MMG"]:fe,["MOE"]:Y,["MXW"]:mt,["MSP"]:qt,["MDR"]:Ie,["MMA"]:Y,["MMR"]:Y,["MMX"]:Ht,["MMI"]:O,["MMO"]:O,["MMV"]:te,["MPH"]:$,["MSC"]:$,["MTS"]:Gi,["MTT"]:Cs,["MML"]:ws,["MMW"]:Ds,["MBR"]:Y,["MDE"]:Ri,["MBP"]:Tt,["MTD"]:Y,["MND"]:Tt,["MNM"]:jt,["NNS"]:$,["NGB"]:mt,["NGW"]:O,["NSL"]:$,["NCF"]:$,["NCM"]:de,["POZ"]:K,["NCP"]:Ie,["NCS"]:Tt,["NCW"]:O,["NCV"]:$,["NSW"]:xs,["NDY"]:$,["NDR"]:Bs,["NEM"]:qt,["NSH"]:ct,["NXA"]:Hs,["NXB"]:Li,["NXC"]:O,["NXG"]:Ns,["NXO"]:Fe,["NXP"]:Mi,["NXT"]:Ze,["NGT"]:Gt,["NGQ"]:Fs,["NSD"]:K,["NCL"]:ct,["NFF"]:Tt,["NUG"]:jt,["NAM"]:O,["NOZ"]:Ht,["NSY"]:Y,["ONN"]:Ps,["OXA"]:Ms,["OXM"]:Y,["OXP"]:Es,["OOZ"]:K,["OBB"]:Rs,["OEX"]:$,["OWH"]:Ls,["ORC"]:Ie,["OBD"]:O,["OFM"]:Y,["OJC"]:yt,["OPK"]:Y,["OSV"]:Me,["OSS"]:$,["OWW"]:fe,["OHV"]:Tt,["ODC"]:Gs,["OSP"]:O,["OAP"]:Is,["OSL"]:O,["OWF"]:ct,["OXS"]:Ws,["PHM"]:Y,["PPM"]:Tt,["PSM"]:Y,["PLW"]:ct,["POA"]:mt,["POD"]:Ge,["POK"]:Y,["POT"]:Y,["PRG"]:O,["PRI"]:Gi,["PHS"]:mt,["PHC"]:ct,["PTB"]:ct,["PLI"]:Le,["PSC"]:Tt,["PSH"]:te,["PTR"]:$,["PSG"]:$,["PVA"]:$s,["PMI"]:Y,["PMS"]:$,["POX"]:Ht,["PMP"]:$,["PYG"]:ei,["PYM"]:ii,["PYS"]:ct,["QSW"]:xe,["RBH"]:Us,["ROK"]:ct,["REW"]:Y,["RPT"]:K,["RHY"]:O,["RTS"]:ae,["RTW"]:xe,["RHU"]:Me,["RSC"]:ri,["RMB"]:Os,["RPR"]:$,["RLW"]:yt,["RFL"]:Vs,["RHC"]:O,["ROG"]:ve,["ROU"]:ct,["ROE"]:ct,["RWC"]:Ge,["RFA"]:ti,["RWD"]:mt,["RSD"]:Ke,["RSE"]:zs,["RBG"]:ii,["RGG"]:te,["RSZ"]:Ht,["RSP"]:O,["RHW"]:yt,["SBF"]:jt,["SAP"]:$,["SPL"]:K,["SVO"]:$,["SSE"]:jt,["SXP"]:K,["SXD"]:K,["SST"]:fe,["SXT"]:K,["STS"]:ct,["SCS"]:O,["SMD"]:Y,["SFS"]:Zs,["SHY"]:mt,["SKN"]:Ys,["SCD"]:O,["SFT"]:O,["SOC"]:$,["SOA"]:$,["SOD"]:$,["SOK"]:Pe,["SOT"]:$,["SDL"]:K,["SAD"]:Ks,["SCZ"]:yt,["SFE"]:we,["SWS"]:Xs,["SHA"]:yt,["SHG"]:$,["SBI"]:ni,["SCC"]:ri,["SPB"]:qs,["SPD"]:jt,["SPG"]:ve,["SPM"]:jt,["SPT"]:js,["STD"]:mt,["STB"]:Pe,["SHS"]:De,["SSP"]:yt,["SGF"]:Tt,["SKG"]:Mi,["SLS"]:Qs,["SSD"]:Ke,["SDA"]:Js,["SSR"]:te,["SNB"]:$,["SNP"]:ct,["SRD"]:ct,["SSH"]:Le,["SRM"]:Tt,["SRH"]:Gt,["SDN"]:Y,["SHV"]:$,["SRP"]:$,["SGG"]:Y,["SBA"]:O,["SKB"]:O,["SBR"]:O,["SKS"]:Me,["SEL"]:_s,["STM"]:O,["SWA"]:_t,["SFG"]:Tt,["S01"]:de,["SPR"]:Gt,["SLG"]:Y,["SBD"]:Y,["SCV"]:ta,["SFM"]:Ht,["SSN"]:O,["SSM"]:te,["SLH"]:ea,["SPN"]:K,["SSI"]:ze,["SND"]:ri,["SNT"]:Ht,["SRV"]:ii,["STR"]:$,["SPU"]:K,["XYR"]:K,["SPH"]:ia,["SSA"]:Tt,["STO"]:$,["SDR"]:yt,["SOL"]:Ke,["SOV"]:$,["SMS"]:xe,["SHK"]:Pe,["SIX"]:mt,["SWR"]:ra,["SMN"]:O,["SER"]:sa,["SES"]:aa,["SFA"]:ti,["STG"]:na,["SSS"]:si,["SSK"]:Y,["SNK"]:Fe,["SWG"]:Me,["SWM"]:Tt,["SIV"]:ct,["STN"]:$,["SGI"]:O,["SBG"]:oa,["SCL"]:O,["SGA"]:ti,["STP"]:$,["SSG"]:te,["SVH"]:ae,["SIN"]:$,["SYL"]:Y,["SEV"]:mt,["SMA"]:O,["SML"]:O,["SYO"]:la,["TST"]:ct,["TBA"]:jt,["TGL"]:$,["TGS"]:O,["TPT"]:$,["TDW"]:yt,["TNL"]:ca,["TEX"]:Fe,["TGN"]:O,["TSM"]:Fe,["TUP"]:$,["TOT"]:$,["TAB"]:Ri,["TGI"]:Y,["TDS"]:de,["TSP"]:ua,["TNM"]:O,["TPG"]:Le,["TMG"]:Le,["TMM"]:da,["TRA"]:Y,["TRS"]:Y,["TRV"]:Y,["TRW"]:Y,["TBB"]:bi,["TOB"]:ve,["TCN"]:we,["TWS"]:O,["TVG"]:Fi,["TXB"]:$,["TXS"]:$,["TFK"]:K,["TFD"]:K,["TFF"]:K,["TCG"]:$,["TMS"]:fa,["TBC"]:ga,["TWT"]:O,["TRN"]:ct,["TGK"]:ii,["TSL"]:ma,["TTF"]:K,["TWG"]:ai,["UGM"]:te,["USY"]:yt,["UGL"]:Y,["UIC"]:pa,["ULR"]:ya,["ULG"]:ve,["URD"]:O,["USA"]:Ht,["UBL"]:$,["UCM"]:Tt,["UEM"]:ba,["UHS"]:Aa,["UIM"]:Tt,["USS"]:jt,["UWL"]:Y,["UWS"]:Y,["UIW"]:Y,["URS"]:$,["UTM"]:Y,["UTR"]:yt,["URB"]:ae,["UPM"]:fe,["VIC"]:Y,["VIK"]:Y,["VRP"]:Ta,["VBK"]:O,["VIN"]:Le,["VTC"]:O,["VTW"]:Me,["VGN"]:Ht,["VND"]:Y,["VNF"]:mt,["VNS"]:Y,["VSK"]:$,["VCH"]:ct,["VGR"]:$,["VSP"]:$,["VTR"]:$,["VGL"]:$,["VGW"]:va,["VOB"]:ve,["VCG"]:jt,["VPR"]:Sa,["VES"]:ae,["VYE"]:$,["WBY"]:mt,["WBU"]:mt,["WHC"]:O,["WHR"]:Ca,["WMC"]:Y,["WMR"]:Tt,["WMM"]:$,["WTK"]:Ke,["WTW"]:O,["WEB"]:Me,["WGE"]:ve,["WTA"]:wa,["WWP"]:Y,["WWR"]:Tt,["WOD"]:ct,["WFM"]:fe,["WWS"]:Da,["WBH"]:Ye,["WCS"]:xa,["WPD"]:O,["WSE"]:Ba,["WPC"]:ct,["WFB"]:Y,["WFS"]:Tt,["WBG"]:jt,["XTE"]:fe,["XCR"]:O,["XDH"]:mt,["XHS"]:Ht,["XHU"]:O,["XRF"]:Ha,["XSH"]:Tt,["XTR"]:Y,["XDV"]:we,["XRW"]:$,["YWC"]:O,["YNS"]:Gt,["ZXR"]:Na,["ZPM"]:Tt,["ZTR"]:K,["ZTU"]:Ht,["ZIN"]:O,["ZDK"]:Y,["ZBS"]:K,["ZST"]:K,["ZMT"]:Fa,["ZMB"]:K,["ZSH"]:jt};makeCard(t){try{let i;if(t==="SOV3"?i=new ka(t):t==="SOC3"?i=new Y(t):t==="LOD3"?i=new Lr(t):t==="GOS3"?i=new ha(t):i=new this.mapper[Wt.extractCardCode(t)](t),i.type==="C"){const r=i;r.spice=[{icon:"A",num:r.iAttack},{icon:"H",num:r.iHealth}].concat(r.spice??[])}return i}catch(i){throw console.error("Make card screwed up on code: "+t),i}}getCard(t){let i=this.cardCache.get(t);return i||(i=this.makeCard(t),this.cardCache.set(t,i)),i}}const W=new Pa;class Ma{registry;constructor(){this.registry=[]}find(t){const i=this.registry.find(r=>r.action===t);if(i)return i;throw console.trace(),new Error("Attempted to find non-existing clicker")}entoggle(t,i){const r=this.find(t);r.enabled=i}add(t){this.registry.push(t)}get(t){return this.find(t)}remove(t){const i=this.registry.findIndex(r=>r.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,r){if(Z.active)return;let n,c;this.scaleFactor===1?(n=t,c=i):(n=Math.round(t*this.scaleFactor),c=Math.round(i*this.scaleFactor));let f,m=S.clickMode;return m==="M"?f=r:r===at.ForceRight?f=at.Right:m==="T"?f=at.Left:f=at.Right,ci.arrayHit(this.registry,n,c,f)}updateScale(t){t===1?this.scaleFactor=1:this.scaleFactor=1/t}scaleFactor=1}const it=new Ma;class Ea{memLoad=!0;step="O";vsAI=!0;p1=this.dud();p2=this.dud();initConstructed(){this.step="O",this.memLoad&&(this.memLoad=!1,this.p1.mode=S.readStringStorage("cMode"+"A","CP"),this.p2.mode=S.readStringStorage("cMode"+"B","CP"),this.p1.mode==="LK"&&(this.p1.mode="CP"),this.p2.mode==="LK"&&(this.p2.mode="CP"),this.vsAI=S.readBoolStorage("cAI",!0)),ut.drawAll()}handleMenuPick(t,i){let r=!0;if(t==="CI"||t==="CV")this.vsAI=t==="CI",S.writeBoolStorage("cAI",this.vsAI);else if(t==="CN")r=!1,this.ezDeck(this.p1)?this.ezDeck(this.p2)?this.launchConstructed():(this.step="B",T.ddf5(this.generateDeckPickerActions())):(this.step="A",T.ddf5(this.generateDeckPickerActions()));else{const n=i==="A"?this.p1:this.p2;t==="LK"?(r=!1,Ot.loadFromFile().then(c=>{typeof c=="string"?qe.iAmError(c):(n.deck=c,n.mode=t,n.bucket="File Upload",S.writeStorage("cMode"+i,t),ut.drawAll())})):(n.mode=t,S.writeStorage("cMode"+i,t))}r&&ut.drawAll()}ezDeck(t){return t.mode==="CP"?!1:(t.mode==="CR"?(t.deck=Ot.randomStockDeck(),t.bucket=Ot.bucketHunter(t.deck.name)):t.mode==="CX"&&(t.deck=Ot.treatsAbound(!0),t.bucket="Scramble"),!0)}handleDeckPick(t){const i=Ot.stockDeckByPram(t);this.step==="A"?(this.dekFun(this.p1,i),this.ezDeck(this.p2)?this.launchConstructed():(this.step="B",T.ddf5(this.generateDeckPickerActions()))):(this.dekFun(this.p2,i),this.launchConstructed())}dekFun(t,i){t.deck=i,t.bucket=Ot.bucketHunter(i.name)}previewDeckPick(t){const i=Ot.stockDeckByPram(t);bt.showDeck(Ot.parseDeck(i.cards))}generateDeckPickerActions(t=-1){const i=He.map((r,n)=>{const c=b.basicAction("DSET");return c.param=n.toString(),c});if(t>-1){const r=He[t],n=r.decks.map(c=>{const f=b.basicAction("DECK");f.param=S.enTil(r.id,c.name);const m=b.basicAction("DPVW");return m.param=f.param,[f,m]});return i.concat(n.flat())}return i}launchConstructed(){E.aiMode=this.vsAI,gt.setMode("G"),E.newGame(this.p1.deck.cards,this.p2.deck.cards)}replay(){E.newGame(this.p1.deck.cards,this.p2.deck.cards)}namenom(t){const i=t?this.p1:this.p2;return k.toPlayer(t).name+"'s deck: "+i.bucket+" - "+i.deck.name}dud(){return{mode:"CP",deck:{cards:[],name:"",factions:[]},bucket:"???"}}}const $t=new Ea;class Ra{deathOrder=[];graveyard=[];reset(){this.graveyard=[],this.deathOrder=[]}purge(){this.deathOrder=[]}getState(){const t={dO:this.deathOrder,gY:this.graveyard};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.deathOrder=i.dO,this.graveyard=i.gY}deathCheck(){const t=E.tick();p.qActiveCreats().forEach(n=>{n.health<1&&(y.lawg(n.code," died."),this.smite(n,t))});const i=k.toPlayer(!0),r=k.toPlayer(!1);(i.health<1||r.health<1)&&(i.healthr.creatId===t.id)&&(this.deathOrder=this.deathOrder.filter(r=>r.creatId!==t.id))}findDeathTime(t){const i=this.deathOrder.filter(r=>r.creatId===t).map(r=>r.time);if(i.length!==0)return Math.min(...i)}destroy(t,i,r,n=void 0){t.status==="A"?(y.lawg(t.code," was destroyed by ",i,"."),Z.addFactBoard(r,t.id,t.lane,t.owner),this.smite(t,n)):(console.warn(`Attempted to destroy creature that was not active. Targ creat ${t.code}; Killer creat ${i}`),console.trace())}gravedigger(t="X",i="LA"){if(t==="X"&&i==="LA"){const r=this.graveyard.length;return r===0?"":this.graveyard[S.randInt(0,r)].cardCode}else{let r;if(t==="X")r=this.graveyard;else{const c=k.toBool(t);r=this.graveyard.filter(f=>f.owner===c)}i!=="LA"&&(r=r.filter(c=>w.levelTargetTest(i,parseInt(c.cardCode.slice(3)))));const n=r.length;return n===0?"":r[S.randInt(0,n)].cardCode}}smite(t,i=void 0){t.status="D",this.deathOrder.push({creatId:t.id,time:i||E.tick()}),this.graveyard.push({cardCode:t.code,owner:t.owner}),x.addEvents(I.creature("DIE",t)),Be.positionChange(t.owner),Z.addDeathBoard(t.id,t.lane,t.owner),t.owner?L.deathsA.push(t.code):L.deathsB.push(t.code),p.dirt()}}const Bt=new Ra;class La{get youi(){return E.ui}initDeck(t,i){this.youi.deckContents=t,this.youi.deckScroll=0,this.youi.deckSummary=i,gt.setMode("T")}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,r){const n=w.cardByTarget(t,r);if(E.aiActive||n.sort((c,f)=>{const m=c[0],C=f[0];return C===m?0:m>C?1:-1}),i){const c=n.length;let f=0,m="",C=0;const D=[];for(;f0&&D.push({cardCode:m,sourceIdx:-1,cardCount:C}),m=n[f][0],C=1),f++;return c>0&&D.push({cardCode:m,sourceIdx:-1,cardCount:C}),D}else return n.map(c=>({cardCode:c[0],sourceIdx:c[1],cardCount:0}))}uniqueContent(t){const i=new Set;return t.filter(r=>i.has(r.cardCode)?!1:(i.add(r.cardCode),!0))}handleShowDeck(t){let i;const r=S.deTil(t.param);if(r[0]==="VE")i=k.activeCardItems(S.txt2bool(r[1]));else{const n=k.getActive();i=t.param==="VR"?n.deck:n.discard}this.showDeck(i)}handleDeckScroll(t){this.paginate(t.param==="D"),ut.drawAll()}showCustomDeck(t,i){this.initDeck(t,!1);const r=this.rightClickers(),n=i.concat(r);return T.ddf5(n),n}showDeck(t){this.initDeck(this.generateContent(t,!0),!0);const i=T.cancelAction();i.key="CNCL",i.param="PM";const r=this.rightClickers();r.push(i),T.ddf5(r)}rightClickers(){return E.aiActive?[]:this.youi.deckContents.map((t,i)=>{const r=b.deckSelectAction("DEET",t.cardCode,i);return r.param=t.cardCode,r})}}const bt=new La;class Ga{friends;friendText;get browseStack(){return E.ui.detailStack}n(t,i){return`${t}${i}`}friendo(t,i){const r=Array.isArray(i)?i:[i];[1,2,3].forEach(n=>{this.friends[this.n(t,n)]=r.map(c=>this.n(c,n))})}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),i=this.n("AVB",1);this.friends={[this.n("ASQ",1)]:[this.n("SLG",1),this.n("WEB",1)],[this.n("ASQ",2)]:[this.n("WEB",2)],[this.n("ASQ",3)]:[this.n("WEB",3)],[this.n("CGL",1)]:[this.n("CGF",1)],[this.n("DHC",1)]:[this.n("DYF",1)],[this.n("DTD",1)]:[this.n("TOT",1)],[this.n("EWV",1)]:[this.n("EWF",1)],[t]:[this.n("FWG",1)],[this.n("IBA",1)]:[i],[this.n("IBA",2)]:[i],[this.n("IBA",3)]:[i],[this.n("IBA",4)]:[i],[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("ROE",1)]:[this.n("FRH",1),this.n("LVG",1),this.n("LTT",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("SLS",1)]:[this.n("MMY",1)],[this.n("TRA",2)]:[this.n("PTR",2)],[this.n("TRA",3)]:[this.n("PTR",3)],[this.n("TRS",2)]:[this.n("STO",2)],[this.n("TRS",3)]:[this.n("STO",3)],[this.n("TRV",2)]:[this.n("ITO",2)],[this.n("TRV",3)]:[this.n("ITO",3)],[this.n("TRW",2)]:[this.n("STR",2)],[this.n("TRW",3)]:[this.n("STR",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.friendo("BLH","LWY"),this.friendo("BTM","BOS"),this.friendo("BWD","TFD"),this.plont("BTS"),this.friendo("BWT","DNK"),this.friendo("CSB","ZBS"),this.friendo("CYS","COZ"),this.friendo("DSK","SPN"),this.friendo("DDF","SXT"),this.friendo("DNK","BWT"),this.friendo("DZD","DZA"),this.friendo("DBQ","BRF"),this.friendo("EPH","EPS"),this.friendo("FST","ZST"),this.friendo("FWK","ZMB"),this.friendo("FGD",["FGA","FGB","FGG","FGO"]),this.friendo("FGG","FGO"),this.friendo("FMD","FME"),this.friendo("FME","FMD"),this.plont("GMR"),this.friendo("IZL",["IFL","IFR","IZR"]),this.friendo("IZR",["IFL","IFR","IZL"]),this.friendo("IZK",["IFL","IFR","IZL","IZR"]),this.friendo("LVH","KBE"),this.friendo("NCM","POZ"),this.friendo("NSW","SPN"),this.friendo("NSH","NDR"),this.friendo("NGQ","NSD"),this.friendo("NFF","TFF"),this.friendo("NOZ","OOZ"),this.friendo("PHC","CYP"),this.plont("PTB"),this.friendo("RWC","RPT"),this.plont("SST"),this.plont("STS"),this.friendo("SSP","DFM"),this.friendo("SDA","HTP"),this.friendo("SLG","WEB"),this.friendo("SND","SPU"),this.friendo("SIV","KBE"),this.friendo("TNL","ZMB"),this.friendo("USS","LWY"),this.friendo("VIC",["IFL","IFR"]),this.friendo("WHR","WHC"),this.plont("WWS"),this.friendo("YNS","XYR");const r=42,n=31,c=40,f=51,m=38,C=52,D=66;this.friendText={["AVB"]:[42,"Hammer"],["BOS"]:[f,""],["BWT"]:[68,"Bron"],["BRF"]:[18,""],["CGF"]:[65,"Fiend"],["CYP"]:[4,""],["COZ"]:[n,""],["DFM"]:[61,"Mimic"],["DNK"]:[8,""],["DZA"]:[59,"Dozer"],["DYF"]:[38,"Infusion"],["EPS"]:[49,"Soldier"],["EWF"]:[18,""],["FWG"]:[44,""],["FWC"]:[28,"Chrysalis"],["FGA"]:[65,"Alpha"],["FGB"]:[77,"Beta"],["FGG"]:[53,"Gamma"],["FGO"]:[57,"Omega"],["FRH"]:[21,""],["FMD"]:[47,"Dragon"],["FME"]:[78,"Egg"],["FUN"]:[49,""],["HTP"]:[38,"Hunting"],["ITO"]:[r,"Torrent"],["IZL"]:[42,"Av Flame"],["IZR"]:[44,"Av Frost"],["IFL"]:[65,"Flame"],["IFR"]:[67,"Frost"],["KBE"]:[83,"Bee"],["LVG"]:[16,""],["LTT"]:[65,"Titan"],["LWY"]:[65,"Wyrm"],["MMY"]:[40,""],["POZ"]:[n,""],["NDR"]:[3,""],["NSD"]:[c,""],["OOZ"]:[n,""],["PTR"]:[r,"Torrent"],["RPT"]:[51,""],["RSC"]:[60,"Scout"],["SPL"]:[f,""],["SXP"]:[f,""],["SXD"]:[c,""],["SXT"]:[m,""],["SDL"]:[c,""],["SLG"]:[25,""],["SPN"]:[D,""],["STR"]:[r,"Torrent"],["SPU"]:[D,""],["XYR"]:[D,""],["STO"]:[r,"Torrent"],["TOT"]:[40,"Tendrils"],["TFK"]:[m,""],["TFD"]:[m,""],["TFF"]:[m,""],["TTF"]:[m,""],["WHC"]:[41,"Courser"],["WEB"]:[78,""],["ZTR"]:[32,"Returned"],["ZBS"]:[C,""],["ZST"]:[C,""],["ZMB"]:[C,""]}}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(!E.aiActive)if(E.ui.detailStack=[t],gt.mode!=="R"){gt.setMode("R");const i=b.basicAction("CNCL");i.zone=gt.baseMode==="G"?"B":"N",i.param="PM",T.ddf5([i])}else ut.drawAll()}changeLevel(t){const i=this.browseStack,r=i.length-1,n=i[r];i[r]=this.n(Wt.extractCardCode(n),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=b.basicAction("DTUP");return t.param="DB",t}levelAction(t){const i=b.basicAction("DTUP");return i.param=S.enTil("DL",t),i}friendAction(t){const i=b.basicAction("DTUP");return i.param=S.enTil("DF",t),i}updateDetails(t){const i=S.deTil(t.param),r=i[0];r==="DB"?this.goBack():r==="DF"?this.goToFriend(i[1]):r==="DL"?this.changeLevel(parseInt(i[1])):console.error("Unknown detail arg",t)}}const ge=new Ga,ki=[1,2,3,4,5,6,7].map(o=>o.toString());class Ia{rarityCache={["L"]:[],["H"]:[],["R"]:[],["C"]:[],["T"]:[]};faction1="X";faction2="X";factionLock=!1;picks=[];picksAsDeck=[];currentPack=[];scrollIdx=0;memLoad=!0;step="O";stats;vsAI=!0;legDraft=!1;fatPacks=!1;overdraft=!1;rarityFilters;setFilters;pAdeck=[];pBdeck=[];get aiPicking(){return this.vsAI&&this.step==="B"}packOdds=[];constructor(){this.rarityFilters=new Map(Re.map(t=>[t,!0])),this.setFilters=new Map(ki.map(t=>[t,!0])),this.stats=new xi}getRarity(t){return this.rarityFilters.get(t)??!0}toggleRarity(t){const i=!this.rarityFilters.get(t);return this.rarityFilters.set(t,i),i}getSet(t){return this.setFilters.get(t.toString())??!0}toggleSet(t){const i=t.toString(),r=!this.setFilters.get(i);return this.setFilters.set(i,r),r}get canPageDown(){return this.picksAsDeck.length-this.scrollIdx>15}get canPageUp(){return this.scrollIdx>0}paginate(t){t?this.scrollIdx+=15:this.scrollIdx-=15}initDraft(){this.step="O",this.memLoad&&(this.memLoad=!1,this.vsAI=S.readBoolStorage("dAI",!0),this.legDraft=S.readBoolStorage("legDraft",!1),this.fatPacks=S.readBoolStorage("fatPacks",!1),this.overdraft=S.readBoolStorage("overD",!1),ki.forEach(t=>{this.setFilters.set(t,S.readBoolStorage("dSet"+t,!0))}),Re.forEach(t=>{this.rarityFilters.set(t,S.readBoolStorage("dRare"+t,!0))})),ut.drawAll()}setFArr(){let t=ki.filter(i=>this.setFilters.get(i)).map(i=>parseInt(i));return t.length===7&&(t=[]),t}validRarities(){return Re.filter(t=>this.rarityFilters.get(t))}startDraftPicks(){const t=this.setFArr();Re.forEach(i=>{this.getRarity(i)?this.rarityCache[i]=Ot.getDeckCards([i],[],t):this.rarityCache[i]=[]}),Re.every(i=>this.rarityCache[i].length===0)&&(this.rarityCache["C"]=this.fun()),this.packOdds=this.fatPacks?[9,31,40]:[5,25,40],this.faction1="X",this.faction2="X",this.factionLock=!1,this.picks=[],this.picksAsDeck=[],this.scrollIdx=0,this.stats=new xi,this.resumeDraft("")}resumeDraft(t){if(t){this.picks.push(t),this.picksAsDeck=this.picksToDeck();const n=this.overdraft?60:30;if(this.picks.length===n){this.step==="A"?(this.pAdeck=this.picksAsDeck.slice(),this.step="B",this.startDraftPicks()):(this.pBdeck=this.picksAsDeck.slice(),this.launchDraft());return}const c=W.getCard(t);if(this.aiPicking||this.stats.addStat(c.type,c.faction),!this.factionLock){const f=c.faction;if(this.faction1==="X")this.faction1=f;else if(f!==this.faction1){this.faction2=f,this.factionLock=!0;const m=this.setFArr();this.validRarities().forEach(C=>{this.rarityCache[C]=Ot.getDeckCards([C],[this.faction1,this.faction2],m)})}}}const i=this.generatePack().slice(-1*(6-this.picks.length%5)),r=this.fillPack(i);if(this.aiPicking)this.resumeDraft(r[r.length-1]);else{this.currentPack=r;const n=r.map((c,f)=>{const m=b.draftSelectAction("DRFT",f,!0);return m.param=c,m});it.removeAll(),T.ddf5(n)}}replay(){this.vsAI?(this.step="B",this.startDraftPicks()):this.launchDraft()}picksToDeck(){const t=[];return this.picks.forEach(i=>{const r=t.findIndex(n=>n.card===i);r===-1?t.push({card:i,num:1}):t[r].num+=1}),t.sort((i,r)=>{const n=W.getCard(i.card+"1"),c=W.getCard(r.card+"1");return n.name.toLowerCase(){const n=this.rarityCache[r].length;let c=!0,f=0;for(;c&&f<100;){const m=this.rarityCache[r][S.randInt(0,n)];i.includes(m)?f++:(i.push(m),c=!1)}}),i}handleMenuPick(t,i){if(t==="DI"||t==="DV")this.vsAI=t==="DI",S.writeBoolStorage("dAI",this.vsAI);else if(t==="DN")this.step="A",this.startDraftPicks();else if(t==="DR"){const r=i;S.writeBoolStorage("dRare"+i,this.toggleRarity(r))}else t==="DT"?S.writeBoolStorage("dSet"+i,this.toggleSet(i)):t==="LD"?(this.legDraft=!this.legDraft,S.writeBoolStorage("legDraft",this.legDraft)):t==="GP"?(this.fatPacks=!this.fatPacks,S.writeBoolStorage("fatPacks",this.fatPacks)):t==="OD"&&(this.overdraft=!this.overdraft,S.writeBoolStorage("overD",this.overdraft));ut.drawAll()}launchDraft(){E.aiMode=this.vsAI,gt.setMode("G"),E.newGame(this.pAdeck,this.pBdeck)}fun(){return[["ART","SVO","MPH","VSK","MSP","LYS"],["CAG","ATG","WMM","ESU","BWH","CBS"],["DHW","NCF","ROG","EXD","TPT","HOX"],["FLS","STP","BRN","TCG","AQE","VOB"]][S.randInt(0,4)]}}const At=new Ia;class Wa{allCanvases=["game-ui","field","player","hand","hilite","effects","decklist","card"];allBackgrounds=["playmat","blueface","mainmenu"];dirtyA=!0;pvCC=[];init(){[oe,ne].forEach(t=>t.init())}dirtyAll(){[oe,ne,Ct].forEach(t=>{t.dirty=!0}),this.dirtyA=!0}async drawAll(){if(nt.simOn)return;const t=gt.mode;this.clearDetails(),t==="G"?await this.drawGame():(it.removeAll(),t==="R"?await this.drawDetails(T.activeActions):t==="T"?E.aiActive||await this.drawDeck(T.activeActions):t==="D"?await this.drawDraft(T.activeActions):t==="C"?await this.drawConstructed():t==="I"?await this.drawInfoMenu():t==="X"?await this.drawExit(T.activeActions):t==="S"?await this.drawSwap():await this.drawMenu())}async drawGame(){this.clearDeck(),Dt.genAnimations();const t=await Z.prep();if(!E.aiActive&&t>0&&(lt.get("hilite").clear(),await $e.drawActions([]),this.dirtyA=!0),await Promise.all([this.drawHand(k.getLocal()),this.drawPlayers(),this.drawField()]),Z.start(),await Z.aniProm(),await this.drawActions(T.activeActions),this.pvCC.forEach(i=>it.add(i)),E.winFlag!==0)await this.drawGameOver(),setTimeout(()=>{gt.mode==="G"&&E.winFlag!==0&&(oe.dirty=!0,this.drawField().then(()=>{this.drawGameOver(!0)}))},1500);else{await this.drawCommonButtons(!0,!0,!0);const i=b.basicAction("DBUG");i.param="AB";const r=new ht(i,0,0,40,35,at.Right);it.add(r)}}async drawGameOver(t=!1){await Ct.drawGameOver(t)}async drawHand(t){ne.dirty&&await ne.drawCards(t)}async drawField(){oe.dirty&&await oe.drawCards()}async drawPlayers(){Ct.dirty&&(this.pvCC=await Ct.drawAllPlayers())}async drawDeck(t){const i=t.find(c=>c.zone==="B"),r=gt.baseMode==="G";r&&await $e.drawActions(i?[i]:[]);const n=lt.get("decklist");if(n.clear(),Ci.makeHaze(n),!r&&i){await re.drawFactionButton(n,631,712,"A"),await re.drawSprite(n,"ui/arrow/x.png",631+28,712+12);const m=re.makeFactButtonClick(631,712,i);it.add(m)}await Ci.drawActions(t,n),await Ci.drawCards(n),await this.drawCommonButtons(!0,!0,!1)}async drawActions(t){E.aiActive?await $e.drawActions([]):this.dirtyA&&(it.removeAll(),lt.get("hilite").clear(),await Promise.all([ne.drawActions(t),oe.drawActions(t),$e.drawActions(t),Ct.drawActions(t)]),this.dirtyA=!1)}async drawDraft(t){lt.get("hilite").clear();const r=lt.get("game-ui");r.clear(),it.removeAll(),At.step==="O"?await oi.drawDraftMenu(r):(await me.drawPickerPlayer(r,At.step==="A",!1),await oi.drawList(t,r),await oi.drawStats(r),await this.drawCommonButtons(!0,!0,!1),await oi.drawPack(t,r))}async drawMenu(){const t=lt.get("game-ui");t.clear(),it.removeAll(),await kn.drawMenu(t)}async drawInfoMenu(){const t=lt.get("game-ui");t.clear(),it.removeAll(),await me.drawExtrasMenu(t)}async drawConstructed(){if($t.step==="O"){const t=lt.get("game-ui");t.clear(),it.removeAll(),await qe.drawConstrMenu(t)}else await this.drawDeckPick(T.activeActions)}async drawDeckPick(t){lt.get("decklist").clear();const r=lt.get("game-ui");r.clear(),it.removeAll(),await me.drawPickerPlayer(r,$t.step==="A",$t.vsAI),await qe.drawSets(t,r),await qe.drawList(t,r)}clearDetails(){lt.get("card").clear()}clearDeck(){lt.get("decklist").clear()}async drawDetails(t){gt.baseMode==="G"&&(this.dirtyA=!0,await this.drawActions(t)),await this.drawCommonButtons(!0,!0,!1),lt.get("card").clear();const r=t.find(n=>n.key==="CNCL");r?await mn.drawDetails(r):console.error("Attempted to show details view with no cancel action")}async drawCommonButtons(t,i,r){let n=979;const c=723,f=lt.get("game-ui");if(r&&f.clear(),t&&(await re.makeIconButton(f,n,c,"EX"),n-=50,await re.makeIconButton(f,n,c,"HL"),n-=50),i){const m=S.clickMode;m!=="M"&&await re.makeIconButton(f,n,c,m==="I"?"TM":"DM")}}async drawExit(t){const i=lt.get("card");await ot.drawButton(i,151,488,t[1],"Quit Game",24,!1),await ot.drawButton(i,478,488,t[0],"Resume",52,!1)}async drawSwap(){const t=lt.get("decklist");t.clear(),t.context.fillStyle="#000000",t.context.fillRect(0,0,S.gameWidth,S.gameHeight);const i=k.getActive(),r="#AAF0C1",n=b.basicAction("USWP");n.param="PM",await Ct.drawPlayer(i,t,200,300);const c={fontSize:22,colour:r};await Ct.drawText(t,"Player "+(i.isPlayerA?"1":"2"),480,360,c),await Ct.drawText(t,"Click to start turn",480,420,c);const f=new ht(n,0,0,S.gameWidth,S.gameHeight,at.Both);it.add(f)}setBackground(t){const i="hide";this.allBackgrounds.forEach(r=>{const n=document.getElementById(r);n&&(t===r?n.classList.remove(i):n.classList.add(i))})}playmatSetup(){let t=!1;const i=S.options.playmat,r=document.getElementById("playmat");if(r?r.dataset.pic!==i&&(t=!0,r.remove()):t=!0,t){const n=new Image(S.gameWidth,S.gameHeight);n.id="playmat",n.classList.add("hide",this.scaleCSS(S.options.scale)),n.dataset.pic=i,n.src=S.imgRoot+`background/playfield-${i}.jpg`,document.getElementById("mainmenu").before(n)}}scaleCSS(t){return`uiSize${t}`}changeScale(t){this.clearAll();let i=S.options.scale;i===t&&(i="100");const r=t==="100"?1:.90625;it.updateScale(r);const n=this.scaleCSS(i),c=this.scaleCSS(t);this.allCanvases.forEach(C=>{lt.get(C).dom.classList.replace(n,c)}),this.allBackgrounds.forEach(C=>{const D=document.getElementById(C);D&&D.classList.replace(n,c)}),document.getElementById("solforge").classList.replace(`gameSize${i}`,`gameSize${t}`),document.getElementById("log").classList.replace(`logSize${i}`,`logSize${t}`),S.options.scale=t,S.writeStorage("scale",t)}clearAll(){this.allCanvases.forEach(t=>{lt.get(t).clear()})}}const ut=new Wa;class $a{positionChange(t){p.creatByTarget().forEach(i=>{i.enforceEffects("PS",t)}),k.enforceEffects(t)}defenderChange(t){p.qPlayerCreats(t).forEach(r=>{r.effects.filter(n=>n.watch==="DF").forEach(n=>W.getCard(n.logicCode).enforceEffect(r))})}playerHealthChange(){p.qActiveCreats().forEach(t=>{t.enforceEffects("PH")})}enforceAllNonPositionCreatureEffects(){p.qActiveCreats().forEach(i=>{i.enforceEffects("AT"),i.enforceEffects("AR"),i.enforceEffects("CH"),i.enforceEffects("DF",i.owner)})}}const Be=new $a;class Ua{getC(t){return p.jr5(t)}creature(t,i){return{code:t,creatId:i.id}}creatHeal(t,i){return{code:"CHL",creatId:t.id,healAmt:i}}damage(t,i,r,n,c,f,m){let C;return f instanceof Qe?C=f.id:C=f,{code:"DMG",battle:t,dmg:i,life:r,isCreatSrc:n,isCreatTarg:c,target:C,srcId:m?.id}}enterField(t){return{code:"ENT",creatId:t.id,forged:!1,formation:!1}}playCard(t,i){return{code:"PLC",playerA:i,cardCode:t}}player(t,i){return{code:t,playerA:i}}playerHeal(t,i){return{code:"PHL",playerA:t,healAmt:i}}replaced(t,i){return{code:"RPL",creatId:t.id,replCreatId:i.id}}toCreature(t){const i=t;return{code:i.code,creatId:i.creatId,creature:this.getC(i.creatId)}}toDamage(t){const i=t;let r,n,c;return i.isCreatTarg?c=this.getC(i.target):n=k.toPlayer(i.target),i.isCreatSrc&&(r=this.getC(i.srcId)),{code:i.code,battle:i.battle,dmg:i.dmg,life:i.life,isCreatSrc:i.isCreatSrc,srcId:i.srcId,target:i.target,isCreatTarg:i.isCreatTarg,srcCreat:r,hurtCreat:c,hurtPlayer:n}}toEnterField(t){const i=t;return{code:i.code,creatId:i.creatId,forged:i.forged,formation:i.formation,creature:this.getC(i.creatId)}}toReplaced(t){const i=t;return{code:i.code,creatId:i.creatId,creature:this.getC(i.creatId),replCreatId:i.replCreatId,replCreat:this.getC(i.replCreatId)}}}const I=new Ua;class Oa{field=[];birthOrder=[];laneIdx=[1,2,3,4,5];reset(){this.field=[],this.birthOrder=[]}purge(){this.field=this.field.filter(t=>t.status==="A"),this.birthOrder=[]}getState(){const t={field:this.field.map(i=>i.getState()),bO:this.birthOrder};return JSON.stringify(t)}dirt(){nt.simOff&&(oe.dirty=!0,ut.dirtyA=!0)}setState(t){const i=JSON.parse(t);this.field=i.field.map(r=>new Qe(r)),this.birthOrder=i.bO}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")}creatByTr(t){return this.jr5(t.creatId)}creatByLane(t,i){const r=this.searchByLane(t,i);if(r)return r;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 this.field.find(i=>i.id===t)}searchByLane(t,i){return this.field.find(r=>r.lane===t&&r.owner===i&&r.status==="A")}searchByFSA(t){return this.searchByLane(t.lane,t.playerA)}creatByTarget(t){let i=this.field;if(t){if(t.player!=="X"){const r=k.toBool(t.player);i=i.filter(n=>n.owner===r)}if(t.creatStatus!=="A"){const r=this.creatStatusTargetToCS(t.creatStatus);i=i.filter(n=>n.status===r)}if(!S.isUn(t.lanes)){const r=w.lanesToArr(t.lanes);i=i.filter(n=>r.includes(n.lane))}if(S.isUn(t.maxAttack)||(i=i.filter(r=>r.attack<=t.maxAttack)),t.notMe&&(i=i.filter(r=>r.id!==t.notMe)),t.victims){const r=S.deTil(t.victims);i=i.filter(n=>r.includes(n.id))}if(t.tribe!=="AN"&&(i=i.filter(r=>r.isTribe(t.tribe))),t.canLevel&&(i=i.filter(r=>W.getCard(r.code).canLevel())),t.level!=="LA"){const r=w.levelTargetToLevel(t.level);i=i.filter(n=>r.includes(n.level))}t.cardCode&&(i=i.filter(r=>W.getCard(r.code).cardCode()===t.cardCode)),t.canDefender&&(i=i.filter(r=>!r.negateDefender)),t.hasDefender&&(i=i.filter(r=>r.defender)),t.canArmor&&(i=i.filter(r=>!r.negateArmor)),t.hasArmor&&(i=i.filter(r=>r.armor>0)),t.canMove&&(i=i.filter(r=>!r.negateMobility)),t.hasMobility&&(i=i.filter(r=>r.mobility>0)),t.hasPoison&&(i=i.filter(r=>r.poison>0)),t.canRegen&&(i=i.filter(r=>!r.negateRegen)),t.hasRegen&&(i=i.filter(r=>r.regen>0)),t.faction!=="X"&&(i=i.filter(r=>r.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=>!this.field.find(n=>n.owner===t&&n.lane===i&&n.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):[]}fling(t,i){const r=this.emptyLanes(t.owner),n=r.length;n>0&&t.move(r[S.randInt(0,n)],i)}birth(t,i,r,n=0,c,f=void 0){if(i==="S"){const G=this.emptyLanes(r);if(G.length===0)return;n=G[S.randInt(0,G.length)]}else if(i==="P"&&!this.emptyLanes(r).includes(n))return;const m=typeof t=="string"?W.getCard(t):t,C=m.jr3(r,n);this.dirt(),r===k.activeA&&L.birthRegistrar(C.id),Z.addFactBoard(c,C.id,C.lane,r);let D;if(i==="F"||i==="R"){if(D=this.searchByLane(n,r),D){if(nt.simOff){const G=[D.code," was replaced"];i==="R"&&G.push(" with ",C.code),G.push("."),y.lawg(...G)}D.status="R",x.addEvents(I.replaced(C,D))}if(i==="F"){let G=2;r===k.isLocalA&&(G=T.playPosition()-E.ui.handScrollLeft),Z.addForgeMove(C.id,G,n,r,D)}}this.field.push(C);const B=I.enterField(C);return B.forged=i==="F",m.formation&&C.lane!==1&&C.lane!==5&&(B.formation=C.adjacent.every(G=>!S.isUn(this.searchByLane(G,r)))),this.birthOrder.push({creatId:C.id,time:f||E.tick()}),x.addEvents(B),C.enforceEffects("PH"),Be.positionChange(r),C}findBirthTime(t){const i=this.birthOrder.filter(r=>r.creatId===t).map(r=>r.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(b.crTarg())}qPlayerCreats(t){const i=b.crTarg();return i.player=k.toTarget(t),this.creatByTarget(i)}ddf1(){return this.creatByTarget(b.crFriendTarg())}qEnemyCreats(){return this.creatByTarget(b.crEnemyTarg())}}const p=new Oa;class Va{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){if(t.aggState>0){let i=0;if(t.oppState>0){const r=t.aggState===2&&t.aggCreat.breakthrough;i=t.oppCreat.hurtBattle(t.aggAtt,t.aggCreat,r)}else t.aggState===2&&(i=t.aggAtt);i>0&&k.hurtBattle(!t.aggCreat.owner,i,t.aggCreat)}}genNugget(t,i,r,n,c){return{aggState:t,aggCreat:r,oppState:i,oppCreat:n,aggAtt:c,lurch:!1,slash:!1,armHit:!1}}nugPair(t,i,r,n){return[this.genNugget(t,i,r,n,r?.attack||0),this.genNugget(i,t,n,r,n?.attack||0)]}simbaCF(t,i,r,n){if(i.slash=!0,t.lurch&&t.aggCreat.breakthrough){const c=Math.max(0,r-t.oppCreat.health);c>0&&this.simbaP(n,c,!0)}}simbaC(t,i,r){if(t.aggState===0)return;let n=!1;if(t.aggState===2?(t.lurch=!0,n=!0):t.oppState===2&&(n=!0),n&&t.aggAtt>0)if(t.oppState>0){const c=Math.max(t.oppCreat.armor-t.oppCreat.armorDmg,0);if(c>0){i.armHit=!0;const f=t.aggAtt-c;f>0&&this.simbaCF(t,i,f,r)}else this.simbaCF(t,i,t.aggAtt,r)}else this.simbaP(r,t.aggAtt,t.lurch)}simbaP(t,i,r){if(!(i<1||!r||t[1]&&t[2]))if(t[0]>0){t[1]=!0;const n=Math.min(t[0],i);t[0]=t[0]-n,i-n>0&&(t[2]=!0)}else t[2]=!0}fight(t){nt.simOff&&y.add("FIGHT!");let i=2,r=1;t&&(L.mainBattle=!1,i=0,r=0);const n=k.activeA,c=!n,f=[],m=k.makeAnim(n),C=k.makeAnim(c);p.laneIdx.forEach(B=>{const G=p.searchByLane(B,n),R=p.searchByLane(6-B,c),X=this.creatFightState(G,i),V=this.creatFightState(R,r);if(X===2||V===2){const _=this.nugPair(X,V,G,R);this.simbaC(_[0],_[1],C),this.simbaC(_[1],_[0],m),X===2&&L.ffs++,f.push(_[0],_[1])}});let D;nt.simOff&&Z.on&&f.some(B=>B.lurch)?(this.barking&&S.dogBark(),f.forEach(B=>{B.lurch&&Z.addFight(B.aggCreat),B.slash&&Z.addSlash(B.aggCreat),B.armHit&&Z.addArmorC(B.aggCreat)}),m[1]&&Z.addArmorP(n),C[1]&&Z.addArmorP(c),m[2]&&Z.addSwipe(n),C[2]&&Z.addSwipe(c),D=oe.drawFight()):D=Promise.resolve(),D.then(()=>{f.forEach(B=>this.dukeItOut(B)),Be.playerHealthChange(),Bt.deathCheck(),x.type="C0",T.actionDone()})}barking=!0}const Ii=new Va;class za{aiMode=!1;aiActive=!1;winFlag=0;ui=this.freshUI();idnum=0;clock=0;genId(){return this.idnum++,"@"+this.idnum.toString(36)}tick(){return this.clock++,this.clock}getState(){return{i:this.idnum,t:this.clock}}setState(t,i){this.idnum=t,this.clock=i}newGame(t,i){this.idnum=0,this.clock=0,Ii.barking=S.options.bark,k.activeA=S.randInt(0,2)===0,this.aiActive=!k.activeA&&this.aiMode,k.isLocalA=this.aiMode||k.activeA,T.actionHistory=[],nt.turnSims=0,nt.turnTime=0,p.reset(),Bt.reset(),x.reset(),ut.dirtyAll(),this.ui=this.freshUI(),L.firstTurn=!0,this.winFlag=0;const r=k.nameOSaurus();if(k.initPlayer(!0,t,"Forgy McGhee",25),k.initPlayer(!1,i,r[0],r[1]),y.setup(),Z.on&&!Z.initialzed){y.debug("Loading animations, please wait.");let n=!1;const c=setTimeout(()=>{n=!0,y.debug("Slow load. Animations disabled until finished."),this.go()},5e3);Z.initProm().then(()=>{n||(clearTimeout(c),this.go())})}else this.go()}go(){y.add("Ready...FIGHT!"),Dt.startState(k.getLocal()),L.startTurn()}freshUI(){return{handScrollLeft:0,detailStack:[],deckContents:[],deckScroll:0,deckSummary:!1}}}const E=new za;class Za{laneIdx=[1,2,3,4,5];state=[];addCard(t,i,r=!1){const n=t.hand.push(i);if(this.hd(t),this.ok(t)){const c=n-1;this.state.push({status:"A",ccode:i,idx:c,vIdx:r?5:-1})}}cardDiscard(t,i){if(t.discard.push(t.hand.splice(i,1)[0]),this.phd(t),this.ok(t)){const r=this.currHand()[i];r.status="D"}}cardDiscardAll(t){t.discard=t.discard.concat(t.hand),t.hand=[],this.phd(t),this.ok(t)&&this.currHand().forEach(r=>{r.status="D"})}hd(t){this.local(t)&&(ne.dirty=!0)}phd(t){this.local(t)&&(Ct.dirty=!0,ne.dirty=!0)}cardPlayOrLevel(t,i,r,n=!1){if(t.hand.splice(i,1),this.hd(t),this.ok(t)){const c=this.currHand();c[i].status=n?"O":r?"V":"D"}}currHand(){return this.state.filter(t=>t.status==="N"||t.status==="A"||t.status==="L")}genAnimations(){if(!Z.on)return;let t=!1,i=0,r=!1;const n=k.getLocal();this.state.forEach(m=>{this.posInView(m.vIdx)&&((m.status==="D"||m.status==="V"||m.status==="O")&&(Z.addHandDiscard(this.key(!1,m.idx,m.vIdx,-5),m.ccode,m.vIdx),t=!0,r=!0),m.status==="V"||m.status==="L"?(Z.addLevel(this.key(!1,m.idx,m.vIdx,-5),m.vIdx),t=!0):m.status==="O"&&Z.addOverload(this.key(!1,m.idx,m.vIdx,-5),m.vIdx))});let c=this.left();c>0&&n.hand.length-c<5&&(c=Math.max(0,n.hand.length-5),E.ui.handScrollLeft=c),this.currHand().map((m,C)=>({guts:m,newIdx:C,newVIdx:this.viewPos(C,c)})).forEach(m=>{if(m.guts.vIdx!==m.newVIdx){const C=this.key(!0,m.newIdx,m.guts.vIdx,m.newVIdx);m.guts.vIdx<0&&m.newVIdx>4?(Z.addHandFling(C,m.guts.ccode,i),i++,t=!0):(this.posInView(m.guts.vIdx)||this.posInView(m.newVIdx))&&(Z.addHandMove(C,m.guts.ccode,m.guts.vIdx,m.newVIdx,r),t=!0)}}),t&&this.genState(n)}genState(t){if(this.ok(t)){const i=this.left();this.state=t.hand.map((r,n)=>({ccode:r,idx:n,status:"N",vIdx:this.viewPos(n,i)}))}}key(t,i,r,n){return S.enTil(S.bool2txt(t),i,r,n)}left(){return E.ui.handScrollLeft}levelInHand(t,i,r){if(t.hand[i]=r,this.hd(t),this.ok(t)){const n=this.currHand();n[i].status="L"}}local(t){return t.isPlayerA===k.isLocalA}ok(t){return nt.simOff&&Z.on&&this.local(t)}posInView(t){return!(t>4||t<0)}startState(t){this.genState(t),this.state.forEach(i=>{i.vIdx=-1})}viewPos(t,i){return t-i}}const Dt=new Za;class Ya{loglist;you=!0;localPlayerKey="";oppPlayerKey="";localPlayerSpan="";oppPlayerSpan="";constructor(){this.loglist=document.getElementById("loglist")}setup(){this.you=k.isLocalA,this.localPlayerKey=this.you?"^pa":"^pb",this.oppPlayerKey=this.you?"^pb":"^pa",this.localPlayerSpan=this.span(k.toPlayer(this.you).name,"green"),this.oppPlayerSpan=this.span(k.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,r=""){const n=r.length>0?` onclick="sfapi.details('${r}')"`:"";return`${t}`}add(t){this.addLi(t)}debug(t,i=!0){(i||S.options.debug)&&this.addLi(this.span(t,"debug"))}clearAll(){this.loglist.innerHTML=""}crdRgx=/^[A-Z\d]{3}[1234S]$/;lawg(...t){if(nt.simOn)return;let i="";t.forEach(r=>{if(typeof r=="string")r.match(this.crdRgx)===null?i+=r:i+="^c"+r;else{const n=k.toBool(r);i+="^p"+(n?"a":"b")}}),this.parse(i)}factMap={["A"]:"all",["N"]:"nek",["T"]:"tem",["U"]:"ute"};parseCards(t){let i=!0;for(;i;){const r=t.indexOf("^c");if(r===-1)i=!1;else{const n=t.slice(r+2,r+6);if(n==="POIS")t=t.replaceAll("^c"+n,this.span("Poison","green"));else{const c=W.getCard(n);t=t.replaceAll("^c"+n,this.span(`${c.name} ${c.level}`,this.factMap[c.faction],n))}}}return t}parse(t){const r=t.replaceAll(this.localPlayerKey,this.localPlayerSpan).replaceAll(this.oppPlayerKey,this.oppPlayerSpan),n=this.parseCards(r);this.add(n)}cardText(t){let i;if(t.type==="C"){const r=t,n=[];r.iRegen>0&&n.push("Regenerate "+r.iRegen),r.iArmor>0&&n.push("Armor "+r.iArmor),r.iMobile>0&&n.push("Mobility "+r.iMobile),r.iBT&&n.push("Breakthrough"),r.iDefend&&n.push("Defender"),r.iAggro&&n.push("Aggressive"),r.consistent&&n.push("Consistent"),n.length>0&&n.push(""),i=n.join(". ")+t.text}else i=t.text;return(t.free?"Free. ":"")+(t.overload?"Overload. ":"")+i}cardTextSplit(t){const i=[];if(t.free&&i.push("Free"),t.consistent&&i.push("Consistent"),t.overload&&i.push("Overload"),t.type==="C"){const r=t;r.iRegen>0&&i.push("Regenerate "+r.iRegen),r.iArmor>0&&i.push("Armor "+r.iArmor),r.iMobile>0&&i.push("Mobility "+r.iMobile),r.iBT&&i.push("Breakthrough"),r.iDefend&&i.push("Defender"),r.iAggro&&i.push("Aggressive")}if(t.text.length>0&&i.push(...t.text.split("~")),t.level===1){const r=t.cardCode(),n=Di.find(c=>c[0]===r);if(n){let c;const f=n[1];f.length===2&&f[0]===f[1]?c="2x "+W.getCard(`${f[0]}1`).name:c=f.map(m=>W.getCard(`${m}1`).name).join(", "),i.push("Solbind: "+c)}}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){return t===1?"level 1 ":t===2?"level 2 or lower ":""}jr9(t,i,r=!1){return t!==0&&i!==0?`${this.bufferson(t,!0)}${r?",":" 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)}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){t.length===3&&(console.warn("HEY a 3 char card code was passed to fastName, why?: "+t),t=`${t}1`);const i=W.getCard(t);return i.name+" "+i.level}pName(t){return t?"A":"B"}tokName(t){return`${t.iAttack}/${t.iHealth} ${t.name}`}tribeT={["AN"]:"Any",["AB"]:"Abomination",["AG"]:"Angel",["AS"]:"Asir",["BR"]:"Bear",["BE"]:"Beast",["CT"]:"Cat",["CR"]:"Chrysalis",["CY"]:"Cyborg",["DF"]:"Darkforged",["DM"]:"Demon",["DN"]:"Dinosaur",["DG"]:"Dragon",["DK"]:"Drakin",["DY"]:"Dryad",["ER"]:"Earth",["EL"]:"Elemental",["EN"]:"Energeist",["FY"]:"Fairy",["FR"]:"Fire",["FB"]:"Forgeborn",["FT"]:"Frost",["GT"]:"Giant",["GN"]:"Gnome",["GL"]:"Golem",["GG"]:"Grimgaunt",["GD"]:"Guardian",["HM"]:"Human",["HY"]:"Hydra",["IC"]:"Ice",["IN"]:"Insect",["LT"]:"Lightning",["LP"]:"Lupin",["MT"]:"Manticore",["MC"]:"Mech",["MM"]:"Metamind",["NG"]:"Naga",["OZ"]:"Ooze",["PX"]:"Phoenix",["PL"]:"Plant",["RM"]:"Ram",["RB"]:"Robot",["SY"]:"Satyr",["SE"]:"Seraph",["SH"]:"Shaman",["SS"]:"Shapeshifter",["SK"]:"Skeleton",["SN"]:"Snake",["SP"]:"Spider",["ST"]:"Spirit",["TG"]:"Tigrin",["TK"]:"Tuskin",["VP"]:"Vampire",["WD"]:"Wanderer",["WT"]:"Water",["WB"]:"Web",["WN"]:"Wind",["WF"]:"Wolf",["WR"]:"Wurm",["YT"]:"Yeti",["ZB"]:"Zombie"};tribeText(t){return this.tribeT[t]}}const y=new Ya;class Ka{sneak(){ut.playmatSetup(),Z.init()}handleMainMenuButton(t){t.param==="D"?(gt.setMode("D"),S.options.wasDrafting=!0,this.sneak(),At.initDraft()):t.param==="C"?(gt.setMode("C"),S.options.wasDrafting=!1,this.sneak(),$t.initConstructed()):t.param==="I"?(gt.setMode("I"),ut.drawAll()):window.open("deckbuilder.html")}handleMenuButton(t){const i=S.deTil(t.param),r=i[0];let n=!0;if(r==="RP")n=!1,y.clearAll(),S.options.wasDrafting?At.replay():$t.replay();else if(r==="MM")gt.setMode("M"),y.clearAll();else if(r==="CN"||r==="CP"||r==="CX"||r==="CR"||r==="CI"||r==="CV"||r==="LK")n=!1,$t.handleMenuPick(r,i[1]);else if(r==="DN"||r==="DR"||r==="DI"||r==="DV"||r==="LD"||r==="GP"||r==="OD"||r==="DT")n=!1,At.handleMenuPick(r,i[1]);else if(r==="alloyin"||r==="nekrium"||r==="tempys"||r==="uterra"||r==="vanilla")S.options.playmat=r,S.writeStorage("playmat",r);else if(r==="AN"||r==="HH"||r==="CH"||r==="BB"||r==="BC")S.togOptViaPram(r);else if(r==="90"){const c=S.options.scale==="90"?"100":"90";ut.changeScale(c)}else r==="RU"?(n=!1,this.halp()):r==="FQ"?(n=!1,window.open("https://grousewood-games.github.io/solforge/docs/faq")):r==="SB"?(n=!1,window.open("https://stoneblade.com/")):r==="GW"?(n=!1,window.open("https://github.com/grousewood-games")):r==="VR"?(n=!1,window.open("https://github.com/grousewood-games/solforge/releases/tag/"+S.ver)):(n=!1,console.error("missing handler for menu button param "+t.param));n&&ut.drawAll()}handleUIButton(t){t.param==="DM"?(S.setClickMode("I"),ut.dirtyA=!0,ut.drawAll()):t.param==="TM"?(S.setClickMode("T"),ut.dirtyA=!0,ut.drawAll()):t.param==="EX"?(gt.setMode("X"),T.ddf5(this.generateExitActions())):t.param==="HL"?this.halp():console.error("missing handler for common button param "+t.param)}generateExitActions(){const t=b.basicAction("CANC");return t.param="PM",[t,b.menuButtonAction("MM")]}halp(){window.open("https://grousewood-games.github.io/solforge/docs/rules")}}const Ti=new Ka;class Xa{stack=["M"];setMode(t){this.deetMode(t)||t==="X"||t==="S"?this.stack.push(t):(this.stack=[t],t==="G"?(lt.get("game-ui").clear(),ut.setBackground("playmat")):t==="D"||t==="C"||t==="I"?(lt.get("game-ui").clear(),ut.setBackground("blueface")):t==="M"&&(ut.clearAll(),ut.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==="R"||t==="T"}}const gt=new Xa;class qa{constructor(){this.loader=document.getElementById("fileupload"),this.loader.addEventListener("change",t=>this.loadInputHandler(t))}shuffleDeck(t){const i=k.toPlayer(t),r=[],n=[];if(i.deck.forEach(c=>{W.getCard(c).consistent?r.push(c):n.push(c)}),r.length===0)this.shuffle(i.deck);else{this.shuffle(n);const c=20-r.length,f=r.concat(n.slice(0,c));this.shuffle(f),i.deck=n.slice(c).concat(f)}}shuffle(t){const i=t.length,r=(n,c)=>{const f=t[n];t[n]=t[c],t[c]=f};if(i>0){let n,c;const f=i*4;for(let m=0;mr.decks).flat(),i=S.randInt(0,t.length);return t[i]}stockDeckByName(t,i){let r;if(He.some(n=>n.id===t?n.decks.some(c=>c.name===i?(r=c,!0):!1):!1),r)return r;throw new Error("Stock Deck not found: Set: "+t+"; Name: "+i)}stockDeckByPram(t){const i=S.deTil(t);return this.stockDeckByName(i[0],i[1])}bucketHunter(t){let i="";return He.some(r=>r.decks.some(n=>n.name===t?(i=r.name,!0):!1)),i||"???"}ripper(t,i,r){const n=[[15,8,5],[30,15,10]],c=this.getDeckCards([],[t]),f=[],m=n[r===15?0:1][i-1];for(;f.lengthG===B)||f.push(B)}const C=f.map(D=>({card:D,num:i}));return i===2&&r===15&&(C[0].num=1),C}deckify(t){const i=t.map(r=>{const n=Di.find(c=>c[0]===r);return n?n[1]:[]}).flat();return t.concat(i).map(r=>`${r}1`)}parseDeck(t){const i=t.map(r=>Array(r.num).fill(r.card)).flat();return this.deckify(i)}validDeck(t){const i={};t.forEach(D=>{i[D.card]?i[D.card]+=D.num:i[D.card]=D.num});const r=Object.entries(i).map(D=>({card:D[0],num:D[1]})),n=r.map(D=>D.num).reduce((D,B)=>D+B,0);if(n!==30)return"Deck must have 30 cards, found "+n;const c=[];let f="";if(r.some(D=>{const B=ee.findIndex(G=>G.c===D.card);return B===-1?(f=D.card,!0):(c.push(ee[B].f),!1)}))return`Invalid card code: '${f}'`;let m=0;if(r.some(D=>D.num>3?(f=D.card,m=D.num,!0):!1))return`${m} copies of '${f}' ${y.fastName(f).slice(0,-2)}`;const C=[...new Set(c)];return C.length>2?"Deck must have two or less factions, found: "+C.join():""}getDeckCards(t=[],i=[],r=[]){return t.length===0&&i.length===0&&r.length===0?ee.map(n=>n.c):t.length>0&&i.length>0&&r.length===0?ee.filter(n=>t.includes(n.r)&&i.includes(n.f)).map(n=>n.c):t.length>0&&i.length===0&&r.length===0?ee.filter(n=>t.includes(n.r)).map(n=>n.c):t.length===0&&i.length>0&&r.length===0?ee.filter(n=>i.includes(n.f)).map(n=>n.c):t.length>0&&i.length>0&&r.length>0?ee.filter(n=>t.includes(n.r)&&i.includes(n.f)&&r.includes(Math.floor(n.s))).map(n=>n.c):t.length>0&&i.length===0&&r.length>0?ee.filter(n=>t.includes(n.r)&&r.includes(Math.floor(n.s))).map(n=>n.c):t.length===0&&i.length>0&&r.length>0?ee.filter(n=>i.includes(n.f)&&r.includes(Math.floor(n.s))).map(n=>n.c):ee.filter(n=>r.includes(Math.floor(n.s))).map(n=>n.c)}getCardFaction(t){const i=ee.find(r=>r.c===t);return i?i.f:"X"}getCardRarity(t){const i=ee.find(r=>r.c===t);return i?i.r:"T"}cardStats(){je.forEach(t=>{const i=`${y.factionText(t)} total: ${this.getDeckCards(void 0,[t]).length}; `,r=Re.map(n=>`${y.rarityText(n)}: ${this.getDeckCards([n],[t]).length}`).join("; ");console.log(i+r)})}loadPromise=new Ne;fileguts="";loader;async loadFromFile(){if(this.loadPromise=new Ne,this.loader.click(),await this.loadPromise.getPromise(),this.fileguts==="")return"";if(this.fileguts.startsWith("!")){const n=this.fileguts.substring(1);return this.fileguts="",n}const t=JSON.parse(this.fileguts);this.fileguts="";const i=t.cards,r=this.validDeck(i);return r||t}readError(t){this.fileguts="!"+t,this.loadPromise.resolveMe()}loadInputHandler(t){const i=this.loader.files;if(i&&i.length>0){const n=i[0];var r=new FileReader;r.onload=c=>{try{var f=r.result;if(f){var m=JSON.parse(new TextDecoder("utf-8").decode(new Uint8Array(f)));m.cards&&Array.isArray(m.cards)&&!m.cards.some(C=>!(C&&typeof C.card=="string"&&Number.isInteger(C.num)))?(this.fileguts=JSON.stringify(m),this.loadPromise.resolveMe()):this.readError("File format is invalid.")}else this.readError("File read was empty.")}catch(C){console.error(C),this.readError("Error reading file.")}};try{r.readAsArrayBuffer(n)}catch{this.readError("Could not read file.")}}else this.loadPromise.resolveMe()}}const Ot=new qa;class ja{phase="ST";enterMainPhase(){this.phase="MN";const t=k.getActive(),i=this.getMainPhaseActions(t);E.aiActive&&nt.hitMainPhase(),T.ddf5(i,!0)}async whatNext(t=!1){if(E.winFlag!==0){nt.simOn?(nt.simEndpoint(E.winFlag===1?"L":"W"),E.winFlag=0):(T.actionHistory=[],E.aiActive=!1,await ut.drawAll());return}if(await ut.drawAll(),T.actionHistory.length>0)T.ddf5();else if(t)gt.setMode("S"),ut.drawAll();else if(x.getNextTrigger())vi.resolve(x.getNextTrigger());else if(!x.deathCheck)Bt.deathCheck(),this.whatNext();else if(x.events.length>0)x.startBatch();else switch(p.purge(),Bt.purge(),this.phase){case "MN":this.enterMainPhase();break;case "ET":this.phase="PT",x.addEvents(I.player("PTN",k.activeA)),Qt.expireMods(),this.whatNext();break;case "PT":L.passTheTurn();break;case "WT":console.error("Hit unhandled waiting phase"),this.phase="MN",this.whatNext();break;case "ST":if(nt.simOn)nt.simEndpoint("T");else{const i=k.getInctive();i.triggers=i.triggers.filter(c=>c.type!=="NT"),this.phase="MN";const n=nt.cheater()?500:100;S.sleep(n).then(()=>this.whatNext())}break}}expireatron(t,i,r,n){i.mods.forEach(c=>{c.expiry===n?c.expiry=r:c.expiry===r&&t.push([i,c])})}expireMods(){const t=p.creatByTarget(b.crTarg());t.push(k.playerA,k.playerB);let i=[];this.phase==="PT"?t.forEach(r=>{this.expireatron(i,r,"ET","EN")}):this.phase==="ST"&&t.forEach(r=>{this.expireatron(i,r,"ST","SN")}),i.length>0&&(p.dirt(),Ct.dirty=!0,i.forEach(r=>{const n=r[0];n instanceof Qe?n.expireMod(r[1]):k.expireMod(n,r[1])}),Be.enforceAllNonPositionCreatureEffects())}getMainPhaseActions(t){const i=this.getHandActions(t),r=this.getFieldActions(t);let n=L.mainBattle;if(n||(n=p.ddf1().some(c=>c.extraBattles>0&&c.isActive&&!c.defender)),n)i.push({key:"FITE",zone:"B",param:L.mainBattle?"M":"",host:""});else{const c=i.length===0&&r.length===0?"":"DIO";i.push({key:"ENDT",zone:"B",param:c,host:""})}return i.concat(r)}getHandActions(t){const i=[...new Set(t.hand)],r=[],n=[],c=[],f=[];i.forEach(B=>{const G=W.getCard(B);G.free?r.push(B):n.push(B),G.canLevel()&&c.push(B),G.canPlay()&&f.push(B)});const m=r.map(B=>[B,"FREE"]);L.freeCards.forEach(B=>{w.cardByTarget(n,B.condition).forEach(R=>{m.push([R[0],B.id]),n.splice(n.indexOf(R[0]),1)})}),m.push(...n.map(B=>[B,""]));const C=L.regularPlays>0;let D=t.hand.map((B,G)=>[B,G]);return C||(D=D.filter(B=>!n.includes(B[0]))),D.map(B=>{const G=m.find(_=>_[0]===B[0]),R=c.includes(B[0]),X=f.includes(B[0]);if(G[1]&&!X&&!C||!X&&!R)return;const V=b.handSelectAction("HPLY",B[0],G[1],B[1]);return V.canPlay=X,V.lvlOnly=R&&!X,V}).filter(Boolean)}getFieldActions(t){const i=p.qPlayerCreats(t.isPlayerA),r=i.filter(c=>p.canMove(c).length>0).map(c=>{const f=b.fieldSelectAction("MOVE",c.lane,c.owner);return f.host=c.code,f}),n=i.filter(c=>c.isActive&&c.activationAvailable?W.getCard(c.code).canActivate(c):!1).map(c=>{const f=b.fieldSelectAction("ACTV",c.lane,c.owner);return f.host=c.code,f.param=c.id,f});return r.forEach(c=>{const f=n.findIndex(m=>m.lane===c.lane);f>-1&&(n.splice(f,1),c.param="ACTV")}),r.concat(n)}}const Qt=new ja;class Qa{playerA;playerB;activeA;isLocalA;constructor(){this.playerA=this.newPlayer(!0),this.playerB=this.newPlayer(!1),this.activeA=!0,this.isLocalA=!0}getPlayerState(t){return{deck:t.deck,discard:t.discard,hand:t.hand,health:t.health,triggers:t.triggers,turn:t.turn,rank:t.rank,poison:t.poison,armor:t.armor,armorDmg:t.armorDmg,mods:t.mods,effects:t.effects}}setPlayerState(t,i){i.deck=t.deck,i.discard=t.discard,i.hand=t.hand,i.health=t.health,i.triggers=t.triggers,i.turn=t.turn,i.rank=t.rank,i.poison=t.poison,i.mods=t.mods,i.effects=t.effects,i.armor=t.armor,i.armorDmg=t.armorDmg}getState(){const t={pA:this.getPlayerState(this.playerA),pB:this.getPlayerState(this.playerB),actP:this.activeA};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.setPlayerState(i.pA,this.playerA),this.setPlayerState(i.pB,this.playerB),this.activeA=i.actP}pt2pb={["X"]:()=>{throw new Error("goof passed any to player target boolean-o-fier")},["A"]:()=>!0,["B"]:()=>!1,["F"]:()=>this.activeA,["E"]:()=>!this.activeA};b2p(t){return t?this.playerA:this.playerB}toPlayer(t){return typeof t=="boolean"?this.b2p(t):typeof t=="string"?this.b2p(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"}getActive(){return this.b2p(this.activeA)}getInctive(){return this.b2p(!this.activeA)}getLocal(){return this.b2p(this.isLocalA)}makeAnim(t){const i=this.toPlayer(t),r=this.totalArmor(i);return[Math.max(r-i.armorDmg,0),!1,!1]}hurtPlayer(t,i){if(i<1)return 0;const r=this.totalArmor(t),n=Math.max(Math.min(i,r-t.armorDmg),0);let c=i-n;return t.armorDmg+=n,t.health-=c,c}hurtDirect(t,i,r){const n=this.toPlayer(t),c=this.hurtPlayer(n,i);return c>0&&(Ct.dirty=!0,y.lawg(r,` dealt ${c} dmg to `,n,"."),x.addEvents(I.damage(!1,c,n.health,!1,!1,n.isPlayerA,void 0)),Be.playerHealthChange()),c}hurtBattle(t,i,r){const n=this.toPlayer(t),c=this.hurtPlayer(n,i);c>0&&(Ct.dirty=!0,y.lawg(r.code,` dealt ${c} battle dmg to `,n,"."),x.addEvents(I.damage(!0,c,n.health,!0,!1,n.isPlayerA,r)))}heal(t,i,r){const n=this.toPlayer(t);n.health+=i,Ct.dirty=!0,y.lawg(n,` gained ${i} health from `,r,"."),x.addEvents(I.playerHeal(n.isPlayerA,i)),Be.playerHealthChange()}drawCard(t,i){const r=this.toPlayer(t);let n=!0;for(let c=0;c{parseInt(D.slice(3,4))>r.rank?C.push(D):m.push(D)}),m.length>0&&(r.deck=m,r.discard=C,Ot.shuffle(r.deck),Dt.addCard(r,r.deck.pop()))}}r.isPlayerA===this.isLocalA&&(Ct.dirty=!0)}addPoison(t,i){const r=this.toPlayer(t);r.poison+=i,Ct.dirty=!0}totalArmor(t){const i=this.toPlayer(t);return this.modBool(i,"NA")?0:i.armor+this.modSum(i,"AR")}totalPoison(t){const i=this.toPlayer(t);return i.poison+this.modSum(i,"PN")}modSum(t,i){const r=this.toPlayer(t);return b.modSum(r.mods,i)}modBool(t,i){const r=this.toPlayer(t);return b.modBool(r.mods,i)}hasMod(t,i){const r=this.toPlayer(t);return b.hasModG(r.mods,i)}addMod(t,i){this.toPlayer(t).mods.push(i),Ct.dirty=!0}addModSafe(t,i){const r=this.toPlayer(t);b.hasMod(r.mods,i)||this.addMod(r,i)}removeMod(t,i){const r=this.toPlayer(t);r.mods=r.mods.filter(n=>n.granter===i?(n.type==="AR"&&(r.armorDmg=Math.max(0,r.armorDmg-n.value)),Ct.dirty=!0,!1):!0)}removeModSafe(t,i){const r=this.toPlayer(t);this.hasMod(r,i)&&this.removeMod(r,i)}expireMod(t,i){const r=this.toPlayer(t);r.mods.splice(b.modIdx(r.mods,i),1),Ct.dirty=!0}addTr(t,i){this.toPlayer(t).triggers.push(i),Ct.dirty=!0}enforceEffects(t){const i=this.toPlayer(t);i.effects.forEach(r=>W.getCard(r.logicCode).enforcePlayerEffect(r,i))}activeCardItems(t){const i=this.toPlayer(t),r=i.triggers.filter(c=>!(c.customCode==="AB"||c.type==="NT")).map(c=>c.logicCode.startsWith("EPH")?c.customCode:c.logicCode),n=i.effects.map(c=>c.logicCode);return r.concat(n)}newPlayer(t){return{hand:[],deck:[],discard:[],effects:[],isPlayerA:t,health:120,mods:[],name:"",nameOffset:0,triggers:[],turn:1,rank:1,armor:0,armorDmg:0,poison:0,avatar:Math.floor(Math.random()*17)}}initPlayer(t,i,r,n){const c=this.toPlayer(t);c.name=r,c.nameOffset=n,c.turn=1,c.rank=1,c.health=S.options.highHealth?360:120,c.discard=[],c.deck=Ot.parseDeck(i),c.mods=[],c.triggers=[],c.effects=[],c.poison=0,c.armor=0,c.armorDmg=0,this.ambushScan(c),Ot.shuffleDeck(c),c.hand=c.deck.splice(-5,5)}ambushScan(t){this.boosh(t,"LLD","PC"),this.boosh(t,"LLG","MV"),this.boosh(t,"LLS","EF"),this.boosh(t,"LLT","LG"),this.boosh(t,"LLV","DS")}boosh(t,i,r){const n=i+"1";if(t.deck.includes(n)){const c=b.trigger(r,n);c.customCode="AB",t.triggers.push(c)}}nameOSaurus(){const t=[["The Garmgunt",5],["Dr. Lucksack",15],["Sgt. Misplay",22],["Salty O'Teary",12],["M.V.P. Sprout",19],["Uncle Punchy",7],["Yesetherian",20],["Rubbish Asir",20],["Hogwash Druid",0],["Offal Savant",15],["Filth Knight",17],["Dirty Mystic",16],["Ether Buffoon",6],["Nexus Dimwit",12],["Hairy Poppins",11],["Al E. Gator",26],["Anita Bath",28],["Bennie Factor",9],["Chris P. Bacon",9],["Don Keigh",29],["Earl E. Bird",25],["Hugh Jass",34],["Jay Walker",28],["Barb Dwyer",22],["Robyn Banks",18],["Anna Graham",9],["Holly Graham",6],["Justin Case",26],["Sir Loins",39]],i=t[S.randInt(0,t.length)];return[i[0],i[1]+18]}}const k=new Qa;class Ja{stateStack=[];popCheck(){if(this.stateStack.length===0)throw new Error("Attempted to manipulate empty stack")}saveState(){const t={action:T.getState(),aiInPhase:nt.inPhase,batch:x.getState(),death:Bt.getState(),field:p.getState(),game:E.getState(),mode:JSON.stringify(gt.stack),phase:Qt.phase,player:k.getState(),turn:L.getState()};this.stateStack.push(t)}restoreState(){this.popCheck();const t=this.stateStack[this.stateStack.length-1];T.setState(t.action),nt.inPhase=t.aiInPhase,x.setState(t.batch),Bt.setState(t.death),p.setState(t.field),E.setState(t.game.i,t.game.t),gt.stack=JSON.parse(t.mode),Qt.phase=t.phase,k.setState(t.player),L.setState(t.turn)}popState(){this.popCheck(),this.stateStack.pop()}}const We=new Ja;class _a{toActions(t){return(Array.isArray(t)?t:[t]).map(r=>{const n=this.actionTargGuts(r);return n.forEach(c=>{c.host=r.host,c.param=r.param,c.hint=r.hint}),n}).flat()}actionTargGuts(t){if(t.target==="TH")return this.deckByTarget(t).map(i=>b.handSelectAction(t.key,i[0],"",i[1]));if(t.target==="TF"){if(t.field==="O")return p.creatByTarget(t).map(i=>b.fieldSelectAction(t.key,i.lane,i.owner));{const i=t.player==="X"?[!0,!1]:[k.toBool(t.player)],r=S.isUn(t.lanes)?p.laneIdx:this.lanesToArr(t.lanes);if(t.field==="A")return i.map(n=>r.map(c=>b.fieldSelectAction(t.key,c,n))).flat();if(t.field==="E")return i.map(n=>p.emptyLanes(n).filter(c=>r.includes(c)).map(c=>b.fieldSelectAction(t.key,c,n))).flat()}}if(t.target==="TP")return t.player==="X"?[b.playerSelectAction(t.key,!0),b.playerSelectAction(t.key,!1)]:[b.playerSelectAction(t.key,k.toBool(t.player))];if(t.target==="TB")return[{key:t.key,zone:"B",host:t.host,param:""}];if(t.target==="TR")return[{key:t.key,zone:"R",host:t.host,param:""}];if(t.target==="TD")return[];throw new Error("Target encountered that doesnt have mappings to actions: "+t.target)}cardByTarget(t,i){let r=t.map((n,c)=>[n,c]);if(i){if(S.isUn(i.deckPositionSkip)||(r=r.filter(n=>n[1]!==i.deckPositionSkip)),i.faction!=="X"&&(r=r.filter(n=>W.getCard(n[0]).faction===i.faction)),i.tribe!=="AN"&&(r=r.filter(n=>{const c=W.getCard(n[0]);return c.type==="C"?c.isTribe(i.tribe):!1})),i.canLevel&&(r=r.filter(n=>W.getCard(n[0]).canLevel())),i.level!=="LA"){const n=w.levelTargetToLevel(i.level);r=r.filter(c=>{const f=parseInt(c[0].substring(3,4));return n.includes(f)})}if(i.card!=="A"){const n=i.card==="C"?"C":"S";r=r.filter(c=>W.getCard(c[0]).type===n),i.card==="C"&&!S.isUn(i.maxAttack)&&(r=r.filter(c=>W.getCard(c[0]).iAttack<=i.maxAttack))}i.cardCode&&(r=r.filter(n=>W.getCard(n[0]).cardCode()===i.cardCode))}return r}deckByTarget(t){const i=k.toPlayer(t.player);let r;if(t.target==="TH")r=i.hand;else if(t.target==="TD")r=i.discard;else if(t.target==="DK")r=i.deck;else throw new Error("bad target passed to deckByTarget: "+t.target);return this.cardByTarget(r,t)}buttonTarget(t,i="",r=""){return b.actionTarget("TB",t,i,r)}boardTarget(t,i){return b.actionTarget("TR",t,i,"")}ddf2(t){return t===1?"L1":t===2?"LN":"LA"}lt2l={["LA"]:()=>[1,2,3,4],["HR"]:()=>[1,2,3],["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]}}const w=new _a;class tn{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==="FM"?this.formationTriggerTest(t):t.trigger.type==="RD"?this.raidTriggerTest(t):t.trigger.type==="DM"&&t.event.code==="DMG"||t.trigger.type==="HG"&&t.event.code==="CHL"||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.trigger.interactive&&(t.host==="P"?console.error("Encountered player hosted trigger that is interactive!!"):x.iaTrigLane=p.creatByTr(t).lane),W.getCard(t.trigger.logicCode).jr8(t)}forgeTriggerTest(t,i){if(t.event.code==="ENT"&&t.event.forged){const r=p.creatByTr(t),n=r.id===t.event.creatId&&r.status==="A";return i&&n?!r.opposed:n}return!1}formationTriggerTest(t){if(t.event.code==="ENT"&&t.event.formation){const i=p.creatByTr(t);return i.id===t.event.creatId&&i.status==="A"}return!1}raidTriggerTest(t){if(t.event.code==="TRE"&&L.ffs>2){const i=p.creatByTr(t);return i.owner===t.event.playerA&&i.status==="A"}return!1}upgradeTriggerTest(t){if(t.event.code==="RPL"){const i=p.searchById(t.creatId);if(i)return i.id===t.event.creatId;console.warn("Upgrade trigger test could not find its creature",t)}return!1}vengeanceTriggerTest(t){if(t.event.code==="DIE"){const i=t.event,r=p.searchById(t.creatId);if(r)return r.status==="D"&&r.id===i.creatId;console.warn("Venegeance trigger test could not find its creature",t)}return!1}flankTriggerTest(t){if(t.event.code==="MOV"){const i=t.event,r=p.creatByTr(t);return r.status==="A"&&r.id===i.creatId}return!1}generalTriggerTest(t){return W.getCard(t.trigger.logicCode).ddf8(t)}}const vi=new tn;class en{firstTurn=!0;mainBattle=!0;deathsA=[];deathsB=[];ffs=0;regularPlays=2;cardsPlayed=0;freeCards=[];newPre=[];newPost=[];getState(){const t={mB:this.mainBattle,dA:this.deathsA,dB:this.deathsB,cP:this.cardsPlayed,ffs:this.ffs,fC:this.freeCards,rP:this.regularPlays,n1:this.newPre,n2:this.newPost};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.mainBattle=i.mB,this.deathsA=i.dA,this.deathsB=i.dB,this.cardsPlayed=i.cP,this.ffs=i.ffs,this.freeCards=i.fC,this.regularPlays=i.rP,this.newPre=i.n1,this.newPost=i.n2}resetTurnData(){this.mainBattle=!0,this.deathsA=[],this.deathsB=[],this.ffs=0,this.regularPlays=2,this.cardsPlayed=0,this.freeCards=[],this.newPre=[],this.newPost=[],this.firstTurn&&(this.firstTurn=!1,this.regularPlays=1)}forgeCard(t,i,r,n){const c=this.cardPlayed(i,r,n),f=k.getActive();y.lawg("Forged ",c.code,"."),p.birth(c,"F",f.isPlayerA,t.lane,"X"),T.actionDone()}levelAndDiscardA(t){return this.levelAndDiscard(t.card,t.position)}levelAndDiscard(t,i,r=!0,n="F"){const c=W.getCard(t),f=k.toPlayer(n);let m=!1;if(!c.overload){const C=c.levelUpCard();f.discard.push(C),C!==t&&(m=!0)}return i>-1?Dt.cardPlayOrLevel(f,i,m,c.overload):y.debug("Bad play index: "+i+" ("+t+")"),f.isPlayerA===k.isLocalA&&(Ct.dirty=!0),r&&m&&y.lawg(f," leveled a card."),c}cardPlayed(t,i,r,n=!1){const c=this.levelAndDiscard(t,r,n),f=k.getActive();if(i==="")this.regularPlays-=1;else if(i!=="FREE"){const m=this.freeCards.findIndex(C=>C.id===i);m>-1?this.freeCards.splice(m,1):console.error("Could not find free card rule!")}if(this.cardsPlayed+=1,!n){const m=I.playCard(t,f.isPlayerA);x.addEvents(m)}return c}passTheTurn(){if(k.activeA=!k.activeA,Qt.phase="WT",E.aiMode){if(nt.simOff)if(E.aiActive=!E.aiActive,E.aiActive)nt.turnSims=0,nt.turnTime=0;else{const t=`🤖: ${this.calma(nt.turnSims)} pontifications in ${(nt.turnTime/1e3).toFixed(1)} seconds.`;y.lawg(t)}}else k.isLocalA=k.activeA,Dt.genState(k.getLocal());this.startTurn()}calma(t){let i=t.toString();return i.length<4?i:i.length>6?i.slice(0,-6)+","+i.slice(-6,-3)+","+i.slice(-3):i.slice(0,-3)+","+i.slice(-3)}startTurn(){const t="------";nt.log&&E.aiActive&&E.aiMode&&console.log(t+" AI Turn Start "+t),nt.simOff&&(y.lawg(t),y.lawg(k.activeA," starts turn.")),this.resetTurnData(),Qt.phase="ST",x.addEvents(I.player("TRS",k.activeA)),Qt.expireMods(),Ct.dirty=!0,Qt.whatNext(!E.aiMode)}endTurn(){const t=k.getActive();Dt.cardDiscardAll(t),t.turn++;const i=t.turn>4;x.addEvents(I.player("TRE",t.isPlayerA)),i&&(t.turn=1,t.rank++,y.lawg(t," hits Rank "+t.rank+"."),Z.addRankup(t.isPlayerA),x.addEvents(I.player("RKU",t.isPlayerA)),t.deck=t.deck.concat(t.discard),t.discard=[],Ot.shuffleDeck(t)),p.qActiveCreats().forEach(r=>{r.extraBattles=0}),k.drawCard(t,5),Qt.phase="ET",Ct.dirty=!0,T.actionDone()}mobility(t){const i=p.jr5(t.param);y.lawg(i.code," moved."),i.mobilityAvailable=!1,i.move(t.lane,"X"),T.actionDone()}allied(t,i){const r=i??k.getActive(),n=b.target("TH");return n.player=k.toTarget(r),n.faction=t,w.deckByTarget(n).length>0}patron(t){const i=b.target("TH");return i.player=k.toTarget(k.getActive()),i.faction=t,w.deckByTarget(i).length>2}freeCard(t){const i=b.freeCard(t);return this.freeCards.push(i),this.lpd(),i}freePlay(t=1){this.regularPlays+=t,this.lpd()}birthRegistrar(t){this.mainBattle?this.newPre.push(t):this.newPost.push(t)}lpd(){k.activeA===k.isLocalA&&(Ct.dirty=!0)}}const L=new en;class Si{id;dom;context;width;height;constructor(){this.id="",this.width=0,this.height=0}show(){}hide(){}get visible(){return!1}clear(){this.context.clearRect(0,0,this.width,this.height)}sprite(t,i,r){this.context.drawImage(t,i,r)}updateScale(t){this.context.scale(t,t)}writeHC(t,i,r){this.context.drawImage(t.dom,i,r)}}class rn extends Si{constructor(t){if(super(),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}}class Wi extends Si{constructor(t,i){super(),this.dom=new OffscreenCanvas(t,i),this.context=this.dom.getContext("2d"),this.width=t,this.height=i}}class Jt{getCanv(t){return t instanceof Si?t:lt.get(t)}init(){}dirty=!0;async drawSprite(t,i,r,n,c={}){const f=this.getCanv(t).context,m=await S.getSprite(S.imgRoot+i);let C=1;c&&(C=c.alpha??1),C<1&&(f.globalAlpha=C),f.drawImage(m,r,n),C<1&&(f.globalAlpha=1)}drawHC(t,i,r,n){t.context.drawImage(i.dom,r,n)}async drawText(t,i,r,n,c={}){const f=this.getCanv(t).context,m=c.fontSize??24;S.pxRatio===2&&(n=this.retinaTextY(n,m)),f.fillStyle=c.colour||"#000000",f.font=`${m}px ${c.fontName||"cinzel"}`,f.shadowColor=c.shadow?"#000000":"#00000000",f.fillText(i,r,n),f.shadowColor="#00000000"}async spriteNumber(t,i,r,n,c,f){let m=r-this.numOffset(i,c);const C=[];i.toString().split("").forEach(D=>{C.push(this.drawSprite(t,this.numSpriteUrl(D,c,f),m,n)),m+=this.numSize(D,c)}),await Promise.all(C)}glowColour(t){const i=t.key;return i==="MOVE"||i==="ACTV"?"green":i==="CANC"?"red":i==="CARD"?"yellow":"blue"}drawRarity(t,i,r,n){return this.drawSprite(t,`icons/rarity/new/${y.rarityText(i).toLowerCase()}.png`,r,n)}drawFaction(t,i,r,n){const c=i==="T"?2:0;return this.drawSprite(t,`icons/faction/${y.factionText(i).toLowerCase()}.png`,r+c,n+3)}makeHaze(t,i=!0){t.context.fillStyle="#222222d8",t.context.fillRect(0,0,i?849:S.gameWidth,S.gameHeight)}cBlu="#03fcfc";cYella="#f5f242";retinaTextY(t,i){let r;return i<21?r=6:i<27?r=7:r=8,t-r}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 r=t.toString().split("").reduce((n,c)=>n+this.numSize(c,i),0)-(i==="B"?2:1);return Math.floor(r/2)}numSpriteUrl(t,i,r){return`text/nums/${i}/${r}/${t}.png`}}class sn extends Jt{async drawButton(t,i,r,n,c,f=7,m=!1,C=!0){let D,B;m?(D="ui/button/menu_on.png",B="#d7fc03"):(D="ui/button/menu_off.png",B="#00DEF7");const G=this.buttonBounds(i,r);await this.drawSprite(t,D,G[0],G[1]),await this.drawText(t,c,G[0]+7+f,G[1]+24,{colour:B,fontSize:30}),(!m||C)&&it.add(ht.fromArr(n,G,at.Both))}async buttonMaker(t,i,r,n,c,f=7,m=!1,C=!0){const D=b.basicAction("MNBT");D.param=n,await this.drawButton(t,i,r,D,c,f,m,C)}buttonBounds(t,i){return[t-7,i-7,232,69]}}const ot=new sn;class an extends Jt{async makeIconButton(t,i,r,n){let f;f=`ui/button/ui_${n}.png`,await this.drawSprite(t,f,i,r);const m=b.basicAction("UIBT");m.param=n;const C=new ht(m,i,r,40,40,at.Both);it.add(C)}async makeVScroller(t,i,r,n,c){const f={zone:"N",key:c,host:"",param:n?"U":"D"};await this.makeScroller(t,i,r,n?"up":"down",f)}async makeScroller(t,i,r,n,c){await this.drawFactionButton(t,i,r,"A"),await this.drawSprite(t,`ui/arrow/${n}.png`,i+30,r+14);const f=this.makeFactButtonClick(i,r,c);it.add(f)}makeFactButtonClick(t,i,r){return new ht(r,t,i,...this.factionButtonBounds(),at.Both)}async drawFactionButton(t,i,r,n){await this.drawSprite(t,`ui/button/faction_${n}.png`,i,r)}factionButtonBounds(){return[77,44]}}const re=new an;class nn extends Jt{async drawActions(t){if(gt.baseMode==="G"){const i=lt.get("hilite"),r=t.filter(n=>n.zone==="B");if(r.length>1&&console.error("Two button actions encountered in one batch",r),r.length===0||E.aiActive||S.clickMode==="I"&&!gt.isDetailMode){const n=this.buttonBounds();await this.drawSprite(i,"ui/button/off.png",n[0],n[1])}else{const n=r[0],c=this.buttonBounds(),f=n.key==="CARD"?n.param:n.key,m=this.buttonHilite(f,n.param);await this.drawSprite(i,`ui/button/on_${m}.png`,c[0]-5,c[1]-5),await this.drawSprite(i,"ui/button/on.png",c[0],c[1]),await this.drawSprite(i,`text/butt/${f}.png`,c[0]+23,c[1]+18);const C=this.highlightBounds(),D=ht.fromArr(n,C);n.key==="CNCL"&&(D.mouse=at.Both),it.add(D)}}}buttonBounds(){return[856,406,160,63]}buttonHilite(t,i){return t==="FITE"||t==="ENDT"&&i===""?"blue":t==="ENDT"&&i==="DIO"||t==="CANC"||t==="CNCL"?"red":"yellow"}highlightBounds(){return[851,401,170,73]}}const $e=new nn;class on extends Jt{async drawCard(t,i,r,n){const c=this.getCanv(i),f=this.extractStats(t),m=f.cardClass;if(await this.drawSprite(c,m.image(!1),r+14,n+35),await this.drawSprite(c,this.frameImg(m.level,m.faction,m.type,!1),r,n),await this.drawSprite(c,`text/card/${m.cardCode()}.png`,r+12,n+16),f.isCreature){const C=n+178;await this.spriteNumber(c,f.att,r+24,C,"S","Y"),await this.spriteNumber(c,f.hlt,r+127,C,"S","Y")}if(f.sleeping&&await this.drawSprite(c,"icons/effects/defensive.png",r+5,n+40,{alpha:.7}),f.iconList.length>0){const C=r+57-17*(f.iconList.length-1);await Promise.all(f.iconList.map(async(D,B)=>this.drawIcon(c,C+B*35,n+140,D[0],D[1])))}}async drawBigCard(t,i,r,n){const c=this.extractStats(i);if(await this.drawSprite(t,i.image(!0),r+(c.isCreature?38:35),n+117),await this.drawSprite(t,this.frameImg(i.level,i.faction,i.type,!0),r,n),i.rarity!=="T"&&await this.drawRarity(t,i.rarity,r+309,n+394),c.isCreature){const f=n+555;await this.spriteNumber(t,c.att,r+44,f,"B","Y"),await this.spriteNumber(t,c.hlt,r+325,f,"B","Y")}}async drawIcon(t,i,r,n,c=0){const f=this.getCanv(t);if(await this.drawSprite(f,`icons/effects/${n}.png`,i,r),c>0){const m=n==="poison"?12:9;await this.spriteNumber(f,c,i+17,r+m,"S","B")}}extractStats(t){let i,r=!1,n=0,c=0,f=!1,m=0,C=!1,D=!1,B=!1,G=!1,R=0,X=0,V=0,_=!1,q=!1;if(!(t instanceof Wt))r=!0,n=t.attack,c=t.health,f=t.sleeping&&!t.aggressive,m=t.regen,C=t.breakthrough,D=t.defender,B=t.aggressive,R=t.armor,X=t.poison,V=t.mobility,G=t.changed,i=W.getCard(t.code);else{if(t.type==="C"){r=!0;const Mt=t;n=Mt.iAttack,c=Mt.iHealth,m=Mt.iRegen,C=Mt.iBT,D=Mt.iDefend,B=Mt.iAggro,R=Mt.iArmor,V=Mt.iMobile}_=t.overload,q=t.consistent,i=t}const pt=[];return _&&pt.push(["overload",0]),q&&pt.push(["consistent",0]),m>0&&pt.push(["regenerate",m]),C&&pt.push(["breakthrough",0]),D&&pt.push(["defender",0]),B&&pt.push(["aggressive",0]),R>0&&pt.push(["armor",R]),X>0&&pt.push(["poison",X]),V>0&&pt.push(["mobility",V]),G&&pt.push(["changed",0]),{cardClass:i,isCreature:r,iconList:pt,hlt:c,att:n,sleeping:f}}async drawHilight(t,i,r,n){await this.drawSprite(t,`frames/glow_${n}.png`,i-22,r-36)}cardBounds(t,i){return[t,i,150,205]}cardSize(){return[150,205]}highlightBounds(t){return[t[0]-5,t[1]-5,160,215]}frameImg(t,i,r,n){return`frames/${n?"big":"small"}/lvl${t}_${i}${r}.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 St=new on,$i=22,Xe=540,hn=6;class ln extends Jt{handCan;highCan;xOffset=0;xCache=new Array(15);init(){this.handCan=lt.get("hand"),this.highCan=lt.get("hilite"),this.xOffset=St.highlightBounds([0,0])[2]+hn;for(let t=-5;t<10;t++)this.xCache[t+5]=$i+t*this.xOffset}async drawCards(t){const i=this.handCan;i.clear();let r=$i;const n=this.paginatron(t);for(let c=n[0];c<=n[1];c++){if(!Z.active||!Z.movingHand.includes(c)){const f=W.getCard(t.hand[c]);await St.drawCard(f,i,r,Xe)}r+=this.xOffset}this.dirty=!1}fastCoord(t){return[this.xCache[t+5],Xe]}async drawActions(t){const i=S.clickMode!=="I",r=this.highCan,n=new Xt(0,520,1e3,250),c=new Xt(0,520,1e3,250,at.Right),f=this.paginatron(k.getActive());await Promise.all(t.filter(m=>m.zone==="H").map(async m=>{const C=m;if(C.position>=f[0]&&C.position<=f[1]){const D=this.xCache[C.position-f[0]+5];if(m.key==="DEET")c.addChild(ht.fromArr(m,St.highlightBounds([D,Xe]),at.Right));else if(i){n.addChild(ht.fromArr(m,St.highlightBounds([D,Xe])));let B;C.key==="HPLY"?C.cost&&C.canPlay?B="green":C.lvlOnly?B="purple":B="blue":B=this.glowColour(C),await St.drawHilight(r,D,Xe,B)}}})),i&&it.add(n),it.add(c),f[0]>0&&await this.makeScroller(r,!1),f[1]0&&(i=i.filter(n=>!Z.movingBoard.includes(n.id)));const r=i.map(n=>{const c=this.coordCalc(n.lane,n.owner);return St.drawCard(n,t,c[0],c[1])});await Promise.all(r),this.dirty=!1}async drawActions(t){const i=S.clickMode!=="I",r=this.highCan,n=Xt.fromBox(this.fieldBoundary),c=Xt.fromBox(this.fieldBoundary,at.Right);if(await Promise.all(t.filter(f=>f.zone==="F"||f.zone==="R").map(async f=>{if(f.zone==="R"&&i)it.add(ht.fromArr(f,this.fieldBoundary)),await this.drawSprite(r,"background/field-glow.png",this.fieldBoundary[0]-6,this.fieldBoundary[1]-9);else{const m=f,C=this.coordCalc(m.lane,m.playerA);f.key==="DEET"?c.addChild(ht.fromArr(f,St.highlightBounds(C),at.Right)):i&&(n.addChild(ht.fromArr(f,St.highlightBounds(C))),await St.drawHilight(r,C[0],C[1],this.glowColour(m)))}})),i&&n.childs.length>0&&it.add(n),c.childs.length>0&&it.add(c),x.iaTrigLane>0){const f=this.coordCalc(x.iaTrigLane,k.activeA),m=St.cardBounds(f[0],f[1]),C=m[1]+m[3]+11,D=m[0]+m[2]/2;await this.drawSprite(r,"icons/rewards/gold.png",D-10,C),await this.drawSprite(r,"icons/rewards/gold.png",D-35,C),await this.drawSprite(r,"icons/rewards/gold.png",D-60,C),await this.drawSprite(r,"icons/rewards/gold.png",D+15,C),await this.drawSprite(r,"icons/rewards/gold.png",D+40,C)}}drawCacheCard(t,i,r){this.drawHC(this.fieldCan,t,i,r)}async drawFight(){lt.get("hilite").clear(),await $e.drawActions([]),await Z.prep(),Z.movingBoard.length>0&&(await this.drawCards(),Z.start(),await Z.aniProm())}}const oe=new cn;class un extends Jt{avatars=["barf","beee","behold","boof","crowley","darko","deert","eyebs","fine","furiousgeorge","ghoost","judge","kenta","nom","pupsky","skelly","stache"];async drawPlayer(t,i,r,n){const c=this.getCanv(i);await this.drawSprite(c,`avatar/${this.avatars[t.avatar]}.jpg`,r+46,n+48),await this.drawSprite(c,"ui/player_frame.png",r,n),await this.drawSprite(c,"ui/player_health.png",r+10,n+102),await this.spriteNumber(c,t.health,r+45,n+149,"B","G"),await this.drawSprite(c,`ui/turn${t.turn}.png`,r+117,n+25),await this.drawSprite(c,"ui/rank.png",r+90,n+4),await this.spriteNumber(c,t.rank,r+121,n+28,"B","G"),t.isPlayerA===k.activeA&&await this.drawSprite(c,"icons/rarity/drop/common.png",r+84,n+153),await this.drawText(c,t.name,r+t.nameOffset,n+189,{colour:this.cBlu,fontSize:20});const f=k.totalPoison(t),m=k.totalArmor(t),C=k.activeCardItems(t);if(f>0||m>0||C.length>0){const D=n+9;if(f>0&&await St.drawIcon(c,r+15,D,"poison",f),m>0&&await St.drawIcon(c,r+150,D,"armor",m),C.length>0){await St.drawIcon(c,r+156,n+147,"changed");const B=b.basicAction("VWDK");return B.param=S.enTil("VE",S.bool2txt(t.isPlayerA)),new ht(B,r+155,n+147,36,36,at.Both)}}}async drawAllPlayers(){const t=lt.get("player");t.clear();const i=[],r=!E.aiActive,n=k.getLocal(),c=k.toPlayer(!n.isPlayerA),f=await this.drawPlayer(n,t,...this.playerOrigin(!0)),m=await this.drawPlayer(c,t,...this.playerOrigin(!1));let C,D;if(n.isPlayerA===k.activeA){let B=862;const G=295,R=Array(L.regularPlays).fill("blue").concat(L.freeCards.map(V=>V.sourceCard)),X=[];R.forEach(V=>{let _;if(V==="blue")_=V;else if(_="green",r){const q={key:"DEET",zone:"N",host:"",param:V};i.push(new ht(q,B-1,G-1,28,41,at.Both))}X.push(this.drawSprite(t,`ui/${_}card.png`,B,G)),B+=30}),await Promise.all(X),C=await this.drawDeckButton(t,n,!0,r),D=await this.drawDeckButton(t,n,!1,r)}return this.dirty=!1,i.concat([f,m,C,D]).filter(Boolean)}async drawDeckButton(t,i,r,n){let c,f,m;if(r?(c=i.discard.length,f=935,m="T"):(c=i.deck.length,f=858,m="U"),await re.drawFactionButton(t,f,350,m),await this.spriteNumber(t,c,f+38,350+14,"S","Y"),c>0&&n){const D=b.basicAction("VWDK");return D.param=r?"VD":"VR",re.makeFactButtonClick(f,350,D)}}async drawActions(t){if(S.clickMode==="I")return;const i=lt.get("hilite"),r=k.isLocalA;await Promise.all(t.filter(n=>n.zone==="P").map(n=>{const c=n,f=this.playerOrigin(c.playerA===r),m=this.playerBounds(...f);return it.add(ht.fromArr(n,m)),this.drawSprite(i,"ui/player_glow.png",f[0]+1,f[1]-1)}))}playerOrigin(t){return[832,t?485:0]}playerBounds(t,i){return[t+18,i+18,170,170]}async drawGameOver(t=!1){const i=lt.get("field"),r=94,n=k.isLocalA,c=E.winFlag,f=n&&c===1||!n&&c===-1;await this.drawSprite(i,`ui/you-${f?"win":"lose"}.png`,r,89,{alpha:t?.65:1}),it.removeAll();const m=lt.get("hand");if(await ot.drawButton(m,r+62,488,b.menuButtonAction("MM"),"Main Menu",20,!1),await ot.drawButton(m,r+389,488,b.menuButtonAction("RP"),"Replay",55,!1),t&&!S.options.wasDrafting){m.context.fillStyle="#222222d8",m.context.fillRect(0,0,849,50);const C={colour:this.cBlu,fontSize:20};await this.drawText(m,$t.namenom(!n),5,2,C),await this.drawText(m,$t.namenom(n),5,29,C)}}async drawAiGear(t,i){const c=t%6,f=Math.floor(t/6),m=lt.get("hilite"),C=`icons/rewards/${i?"gold":"silver"}.png`;await this.drawSprite(m,C,862+c*24,255+f*24)}hwhipe(){lt.get("hilite").clear()}}const Ct=new un,Ui=15,Oi=15,dn=5;class fn extends Jt{constructor(){super();const t=St.highlightBounds([0,0]);this.xOffset=t[2]+dn,this.yOffset=t[3]+25}xOffset;yOffset;async drawCards(t){const r=bt.visibleContent().map((n,c)=>{const f=W.getCard(n.cardCode),m=this.listXY(c);return St.drawCard(f,t,...m).then(()=>{if(n.cardCount>0)return this.drawCount(t,m[0]+61,m[1]+166,n.cardCount)})});await Promise.all(r)}async drawActions(t,i){const r=S.clickMode!=="I",n=bt.visibleContent(),c=E.ui,f=c.deckScroll,m=f+15,D=c.deckSummary?at.Both:at.Right,B=Xt.fromBox(this.deckBoundary()),G=Xt.fromBox(this.deckBoundary(),D),R=[];t.forEach(X=>{if(X.key==="DEET"){const V=X;V.position>=f&&V.positionq.sourceIdx===V.position);if(_>-1){const q=this.listXY(_);B.addChild(ht.fromArr(X,St.highlightBounds(q))),R.push(St.drawHilight(i,q[0],q[1],"blue"))}}}),r&&B.childs.length>0&&it.add(B),G.childs.length>0&&it.add(G),bt.canPageDown&&R.push(re.makeVScroller(i,299,712,!1,"SCRK")),bt.canPageUp&&R.push(re.makeVScroller(i,465,712,!0,"SCRK")),await Promise.all(R)}async drawCount(t,i,r,n){await this.drawSprite(t,"ui/dullcard.png",i,r),await this.spriteNumber(t,n,i+13,r+12,"S","Y")}listXY(t){return[Ui+t%5*this.xOffset,Oi+Math.floor(t/5)*this.yOffset]}deckBoundary(){return[Ui,Oi,this.xOffset*5,this.yOffset*3]}}const Ci=new fn;class gn extends Jt{async drawDetails(t){const i=[],r=lt.get("card");r.clear(),this.makeHaze(r);const n=30,c=30,f=W.getCard(ge.currentCard);S.options.bigCards?i.push(St.drawBigCard(r,f,n,c)):i.push(St.drawCard(f,r,134,280));const m=435;let C=30;const D=33,B=23,G=28;let R=f.name;for(;R.length>0;){C+=36;let wt;if(R.length{for(;wt.length>0;){let Vt;if(wt.length1){const wt=f.cardCode(),Vt=_===3?[19,147,270]:_===2?[78,216]:[-15,91,197,302];V.forEach((Yt,he)=>{i.push(this.drawLevelButton(r,wt,Yt,27+Vt[he],639,Yt===f.level))})}let q=0;const pt=513,Mt=697,ye=74;gt.baseMode!=="G"&&(i.push(ot.drawButton(r,pt,Mt,t,"Close",62,!1)),q++);const kt=new ht(t,n,c,377,603,at.Both);if(it.add(kt),ge.canGoBack){const wt=ge.goBackAction();i.push(ot.drawButton(r,pt,this.buttonY(Mt,q,ye),wt,"Back",72,!1)),q++}ge.friendos.forEach(wt=>{const Vt=W.getCard(wt),Yt=ge.friendAction(wt),he=ge.friendTxt(Vt.cardCode());i.push(ot.drawButton(r,pt,this.buttonY(Mt,q,ye),Yt,he[1]||Vt.name,he[0],!1)),q++}),await Promise.all(i)}buttonY(t,i,r){return t-i*r}cardSummary(t){const i=y.factionText(t.faction),r=y.rarityText(t.rarity),n=y.cardTypeText(t.type);return`${i}, ${r} ${n}`}tribeSummary(t){return t.tribe.map(i=>y.tribeText(i)).join(" ")}async drawLevelButton(t,i,r,n,c,f){if(await this.drawSprite(t,`icons/frame/l${r}.png`,n,c),!f){const B=ge.levelAction(r),G=new ht(B,n-7,c-5,103,112,at.Both);it.add(G)}const C=W.getCard(`${i}${r}`).levelSpice(),D=[[-7,84],[60,84],[11,79]];await Promise.all(C.map((B,G)=>{const R=n+D[G][0],X=c+D[G][1];if(B.icon==="A"||B.icon==="H"){let V,_;return B.icon==="A"?(V="icons/frame/attack.png",_=R+17):(V="icons/frame/health.png",_=R+16),this.drawSprite(t,V,R-1,X-1).then(()=>this.spriteNumber(t,B.num,_,X+10,"S","Y"))}else{let V=this.spiceIcon(B.icon);if(B.icon==="U"||B.icon==="D"||B.icon==="L"||B.icon==="N"){const _=`icons/effects/${V}.png`;return this.drawSprite(t,_,R-1,X-1).then(()=>this.spriteNumber(t,B.num,R+16,X+10,"S","B"))}else return St.drawIcon(t,R,X,V,B.num)}}))}spiceIcon(t){return t==="N"?"new":t==="D"?"damage":t==="U"?"buff":t==="V"?"mobility":t==="P"?"poison":t==="M"?"armor":t==="G"?"aggressive":t==="F"?"defender":t==="B"?"breakthrough":t==="R"?"regenerate":t==="L"?"life":t==="C"?"consistent":t==="O"?"overload":"whoops"}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]}}const mn=new gn;class pn extends Jt{packLeft=22;packTop=190;packBoundary=[this.packLeft-5,this.packTop-10,537,480];async drawPack(t,i){const r=S.clickMode!=="I",n=[],c=Xt.fromBox(this.packBoundary),f=Xt.fromBox(this.packBoundary,at.Right);t.filter(C=>C.pack).forEach(C=>{const D=this.coordCalcPack(C.index);if(C.key==="DRFT"){const B=W.getCard(C.param+"1");n.push(St.drawCard(B,i,...D).then(()=>this.drawRarity(i,B.rarity,D[0]+112,D[1]+4))),r&&c.addChild(ht.fromArr(C,St.highlightBounds(D)))}else f.addChild(ht.fromArr(C,St.highlightBounds(D),at.Right))}),await Promise.all(n),r&&c.childs.length>0&&it.add(c),f.childs.length>0&&it.add(f)}async drawList(t,i){let r=170;const n=570,c=[],f=At.picksAsDeck,m=new Xt(n,r,600,600,at.Both),C=t,D=15,B=At.scrollIdx;At.canPageDown&&await this.makeScroller(i,!1),At.canPageUp&&await this.makeScroller(i,!0),C.filter(G=>!G.pack).forEach(G=>{if(G.index>=B&&G.index{const f=i.getFactTotal(c);if(f[2]===0)return[Promise.resolve()];{r+=75;const m=this.threeLine(t,r,n,f),C=this.drawFaction(t,c,r-8,n-39);return[m,C]}}).flat())}async threeLine(t,i,r,n){const c={colour:"#ffd865",fontSize:18,fontName:"serif"},f=30;await Promise.all(n.map((m,C)=>this.drawText(t,m.toString(),i,r+f*C,c)))}async drawDraftMenu(t){let f=50,m=240;await me.headerText(f+28,m,"Opponent",t),m+=45,await ot.buttonMaker(t,f,m,"DI","DUMB BOT",27,At.vsAI,!1),m+=80,await ot.buttonMaker(t,f,m,"DV","HUMAN",47,!At.vsAI,!1),m+=80+16,await me.headerText(f+17,m,"Rarity Filter",t),m+=80-34-6,await this.rarityButton(t,f+20,m,"L",At.getRarity("L")),await this.rarityButton(t,f+125,m,"H",At.getRarity("H")),m+=80,await this.rarityButton(t,f+20,m,"R",At.getRarity("R")),await this.rarityButton(t,f+125,m,"C",At.getRarity("C")),m=240+45+80*5,await ot.buttonMaker(t,f,m,"MM","MAIN MENU",16),f=404,m=240,await me.headerText(f+5,m,"Draft Modes",t),m+=45,await ot.buttonMaker(t,f,m,"GP","GOOD PACKS",9,At.fatPacks),m+=80,await ot.buttonMaker(t,f,m,"LD","LEGENDARY",17,At.legDraft),m+=80,await ot.buttonMaker(t,f,m,"OD","OVERDRAFT",17,At.overdraft),f=757,m=240,await me.headerText(f+76,m,"Sets",t),m+=45,await this.chestButton(t,f+3,m,1,At.getSet(1)),await this.chestButton(t,f+124,m,2,At.getSet(2)),m+=88,await this.chestButton(t,f+3,m,3,At.getSet(3)),await this.chestButton(t,f+124,m,4,At.getSet(4)),m+=88,await this.chestButton(t,f+3,m,5,At.getSet(5)),await this.chestButton(t,f+124,m,6,At.getSet(6)),m+=88,await this.chestButton(t,f+3,m,7,At.getSet(7)),m=240+45+80*5,await ot.buttonMaker(t,f,m,"DN","NEXT",68)}async rarityButton(t,i,r,n,c){const f={key:"MNBT",zone:"N",host:"",param:S.enTil("DR",n)},m=`ui/button/rarity_${n}${c?"y":"n"}.png`;await this.drawSprite(t,m,i,r);const C=new ht(f,i,r,75,65,at.Both);it.add(C)}async chestButton(t,i,r,n,c){const f={key:"MNBT",zone:"N",host:"",param:S.enTil("DT",n)};c&&await this.drawSprite(t,"icons/sets/chest-hl.png",i,r);const m=`icons/sets/Chest_Set${n}${c?"y":"n"}.png`;await this.drawSprite(t,m,i,r);const C=new ht(f,i,r,90,74,at.Both);it.add(C)}}const oi=new pn;class yn extends Jt{async drawSets(t,i){let r=200;const n=100,c=[],f=new Xt(n-50,r,450,600);t.filter(m=>m.key==="DSET").forEach(m=>{const C=He[parseInt(m.param)];c.push(this.drawText(i,C.name,n,r,{colour:this.cYella}),this.drawSprite(i,"icons/chest_small.png",n-48,r-5));const D=new ht(m,n-50,r-2,450,35,at.Both);f.addChild(D),r+=45}),it.add(f),await Promise.all(c)}async drawList(t,i){let r=170;const n=570,c=42,f=33,m=[],C=new Xt(n,r,460,600),D=new Xt(n-c,r,f,600),B=t.filter(R=>R.key==="DPVW");t.filter(R=>R.key==="DECK").map(R=>{const X=B.find(V=>V.param===R.param);return[R,X]}).forEach(R=>{const X=Ot.stockDeckByPram(R[0].param);m.push(this.drawFaction(i,X.factions[0],n,r),this.drawText(i,X.name,n+65,r+7,{colour:this.cYella})),X.factions.length===2&&m.push(this.drawFaction(i,X.factions[1],n+28,r));const V=new ht(R[0],n,r-2,460,35,at.Both);C.addChild(V),m.push(this.drawSprite(i,"icons/rarity/eye/legendary.png",n-c,r));const _=new ht(R[1],n-c,r-2,f,35,at.Both);D.addChild(_),r+=35}),await Promise.all(m),it.add(C),it.add(D)}packBoundary=[17,190,537,480];coordCalcPack(t){const n=t%3,c=Math.floor(t/3);return[22+n*176,200+c*235]}iAmError(t){const i=lt.get("game-ui");this.drawText(i,t,295,655,{colour:"#f5142e",fontSize:26})}async drawConstrMenu(t){let c=50,f=240;await me.headerText(c+28,f,"Opponent",t),f+=45,await ot.buttonMaker(t,c,f,"CI","DUMB BOT",27,$t.vsAI,!1),f+=80,await ot.buttonMaker(t,c,f,"CV","HUMAN",47,!$t.vsAI,!1),f+=80*4,await ot.buttonMaker(t,c,f,"MM","MAIN MENU",16),c=404,f=240,await me.headerText(c+46,f,"Player 1",t);const m=$t.p1.mode;f+=45,await ot.buttonMaker(t,c,f,S.enTil("CP","A"),"PRE-CON",39,m==="CP",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CR","A"),"RANDOM",36,m==="CR",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CX","A"),"SCRAMBLE",30,m==="CX",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("LK","A"),"LOAD FILE",32,m==="LK"),m==="LK"&&await this.drawFileDeck(t,c,f,$t.p1.deck),c=757,f=240,await me.headerText(c+44,f,"Player 2",t);const C=$t.p2.mode;f+=45,await ot.buttonMaker(t,c,f,S.enTil("CP","B"),"PRE-CON",39,C==="CP",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CR","B"),"RANDOM",36,C==="CR",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CX","B"),"SCRAMBLE",30,C==="CX",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("LK","B"),"LOAD FILE",32,C==="LK"),C==="LK"&&await this.drawFileDeck(t,c,f,$t.p2.deck),f+=80*2,await ot.buttonMaker(t,c,f,"CN","NEXT",68)}async drawFileDeck(t,i,r,n){const c=r+89;await this.drawText(t,n.name.slice(0,20),i,r+70,{colour:this.cYella,fontSize:18}),n.factions.length===1?await this.drawFaction(t,n.factions[0],i+96,c):(await this.drawFaction(t,n.factions[0],i+78,c),await this.drawFaction(t,n.factions[1],i+113,c))}}const qe=new yn;class bn extends Jt{async drawExtrasMenu(t){let f=50,m=240;await this.headerText(f+37,m,"UI Modes",t),m+=45,await ot.buttonMaker(t,f,m,"90","90% SIZE",47,S.options.scale==="90"),m+=80,await ot.buttonMaker(t,f,m,"BC","BIG CARDS",29,S.options.bigCards),m+=80,await ot.buttonMaker(t,f,m,"AN","ANIMATIONS",10,S.options.anim8),m+=80*3,await ot.buttonMaker(t,f,m,"MM","MAIN MENU",16),f=404,m=240,await this.headerText(f+28,m,"More Info",t),m+=45,await ot.buttonMaker(t,f,m,"RU","RULES",66),m+=80,await ot.buttonMaker(t,f,m,"FQ","INFO & FAQ",20),m+=80+34,await this.headerText(f+12,m,"Game Modes",t),m+=80-34,await ot.buttonMaker(t,f,m,"HH","BIG HEALTH",20,S.options.highHealth),m+=80,await ot.buttonMaker(t,f,m,"CH","CHEATER",39,S.options.cheater),m+=80,await ot.buttonMaker(t,f,m,"BB","BATTLE BARK",13,S.options.bark),f=757,m=240,await this.headerText(f+43,m,"Playmat",t),m+=45;const C=S.options.playmat==="vanilla";await ot.buttonMaker(t,f,m,"vanilla","VANILLA",43,C,!C),m+=80;const D=S.options.playmat==="alloyin";await ot.buttonMaker(t,f,m,"alloyin","ALLOYIN",43,D,!D),m+=80;const B=S.options.playmat==="nekrium";await ot.buttonMaker(t,f,m,"nekrium","NEKRIUM",38,B,!B),m+=80;const G=S.options.playmat==="tempys";await ot.buttonMaker(t,f,m,"tempys","TEMPYS",51,G,!G),m+=80;const R=S.options.playmat==="uterra";await ot.buttonMaker(t,f,m,"uterra","UTERRA",52,R,!R);const X=890;await this.drawText(t,S.ver,X,46,{fontSize:18,colour:"#7b68ee"}),await this.drawText(t,"1-Feb-2024",X,68,{fontSize:14,colour:"#7b68ee"});const V=b.basicAction("MNBT");V.param="VR",it.add(new ht(V,X,44,90,44,at.Both))}async headerText(t,i,r,n){await this.drawText(n,r,t,i,{colour:this.cYella,fontSize:30})}async drawPickerPlayer(t,i,r){let n;i?n="Player 1":r?n="Dumb Bot":n="Player 2",await this.headerText(54,75,n,t)}}const me=new bn;class An extends Jt{async drawMenu(t){let r=22;await this.drawSprite(t,"ui/button/constructed.png",778,r),it.add(ht.fromArr(this.makeAction("C"),this.buttHilightBounds(778,r),at.Both)),r=148,await this.drawSprite(t,"ui/button/draft.png",778,r),it.add(ht.fromArr(this.makeAction("D"),this.buttHilightBounds(778,r),at.Both)),r=508,await this.drawSprite(t,"ui/button/deck.png",778,r),it.add(ht.fromArr(this.makeAction("B"),this.buttHilightBounds(778,r),at.Both)),r=634,await this.drawSprite(t,"ui/button/info.png",778,r),it.add(ht.fromArr(this.makeAction("I"),this.buttHilightBounds(778,r),at.Both));const n=b.basicAction("DBUG");it.add(new ht(n,757,349,74,70,at.Right)),await this.drawSprite(t,"gwg/gwg_red.png",58,0);const c=b.basicAction("MNBT");c.param="SB",it.add(new ht(c,10,10,44,52,at.Both));const f=b.basicAction("MNBT");f.param="GW",it.add(new ht(f,58,10,50,50,at.Both))}buttBounds(t,i){return[t,i,242,113]}buttHilightBounds(t,i){const n=[-3,-3,6,6];return this.buttBounds(t,i).map((c,f)=>c+n[f])}makeAction(t){return{zone:"N",key:"MENU",host:"",param:t}}}const kn=new An;class wi{active=!0;aId;moveX=[];moveY=[];dOrd=1;steps=0;target;targId;type;x=0;y=0;constructor(t,i,r,n){this.aId=t,this.type=i,this.target=r,this.targId=n}async draw(t){console.log("Draw not overridden")}async onEnd(){}extend(t,i,r){if(this.steps+=t,i||r){const n=new Array(t).fill(0);i&&(this.moveX=n.concat(this.moveX)),r&&(this.moveY=n.concat(this.moveY))}}setHand(t){const i=ne.fastCoord(t);this.x=i[0],this.y=i[1]}setField(t,i){const r=oe.coordCalc(t,i);this.x=r[0],this.y=r[1]}nudge(t,i){this.x+=t,this.y+=i}}class pe extends wi{constructor(t,i,r,n,c){super(t,i,r,n),this.drawId=c,this.steps=Z.speedCache.get(t)??0}drawId;async draw(t){Z.hcFrame.writeHC(Z.getCC(this.drawId),this.x,this.y)}static fader(t,i,r){return new pe("D","F",t,i,r)}static fixed(t,i,r){return new pe("C","X",t,i,r)}}class hi extends wi{imgProm;constructor(t,i,r,n,c){super(t,i,r,n),this.steps=c}async draw(t){const i=await this.imgProm;Z.hcFrame.context.drawImage(i,this.x,this.y)}preLoad(t){this.imgProm=S.getSprite(S.imgRoot+t)}}class li extends pe{endWrite=!1;constructor(t,i,r,n){super(t,"C",i,r,n)}async onEnd(){this.endWrite&&(this.target==="F"?oe.drawCacheCard(Z.getCC(this.drawId),this.x,this.y):this.target==="H"&&ne.drawCacheCard(Z.getCC(this.drawId),this.x,this.y))}}class Ee extends wi{holf=1;img;schema;constructor(t,i,r){super(t,"S",i,r),this.img=Z.getSS(t),this.schema=Z.getSSS(t)??{count:0},this.steps=this.schema.count}async draw(t){this.holf>1&&(t=(t-t%this.holf)/this.holf);const i=this.schema.origins[t];Z.hcFrame.context.drawImage(this.img,i[0],i[1],this.schema.width,this.schema.height,this.x,this.y,this.schema.width,this.schema.height)}slow(t){this.holf=t,this.steps=this.schema.count*t}}class Tn extends Ee{offset;constructor(t,i,r){super(t,i,r),t==="U"?this.offset=[-1,0]:t==="N"?this.offset=[-2,-1]:t==="T"?this.offset=[-1,-1]:this.offset=[0,0]}budge(){this.x+=this.offset[0],this.y+=this.offset[1]}}class Vi extends Ee{delay=0;setDelay(t){this.delay=t,this.steps+=t}async draw(t){t>=this.delay&&await super.draw(t-this.delay)}}class vn extends hi{delay=0;setDelay(t){this.delay=t,this.steps+=t}async draw(t){t>=this.delay&&await super.draw(t)}}class Sn{ver="v0.10.2";gameWidth;gameHeight;spriteCache;dogAudio;_clickMode;pxRatio=1;options;imgRoot;constructor(){this.spriteCache={},this.imgRoot="./img/",this.gameWidth=1024,this.gameHeight=768,this.dogAudio=document.getElementById("dogbark"),this._clickMode="M",this.options={anim8:!0,bark:!0,bigCards:!0,highHealth:!1,cheater:!1,playmat:"uterra",wasDrafting:!1,scale:"100",debug:!1}}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 bulkLoadP(t){await Promise.all(t.map(i=>this.getSprite(this.imgRoot+i)))}async bulkLoadS(t){for(let i=0;i{const r=new Image;r.onload=()=>{i(r)},r.src=t})}writeStorage(t,i){localStorage.setItem(t,i)}readStorage(t){return localStorage.getItem(t)}readStringStorage(t,i){const r=this.readStorage(t);return r===null?i:r}readBoolStorage(t,i){const r=this.readStorage(t);return r===null?i:this.txt2bool(r)}writeBoolStorage(t,i){this.writeStorage(t,this.bool2txt(i))}bool2txt(t){return t?"Y":"N"}txt2bool(t){return t==="Y"}restoreOptions(){const t=this.options;t.anim8=this.readBoolStorage("anim8",!0),t.bark=this.readBoolStorage("bark",!1),t.bigCards=this.readBoolStorage("bigCards",!0),t.cheater=this.readBoolStorage("cheater",!1),t.highHealth=this.readBoolStorage("highHealth",!1),t.playmat=this.readStringStorage("playmat","uterra"),t.scale=this.readStringStorage("scale","100")}toggleOption(t){S.options[t]=!S.options[t],this.writeBoolStorage(t,S.options[t])}togOptViaPram(t){let i;if(t==="HH")i="highHealth";else if(t==="CH")i="cheater";else if(t==="BB")i="bark";else if(t==="BC")i="bigCards";else if(t==="AN")i="anim8";else throw new Error("whooops"+t);this.toggleOption(i)}setClickMode(t){this._clickMode=t}get clickMode(){return this._clickMode}}const S=new Sn;window.onload=async()=>{await document.fonts.ready;let o=[];document.fonts.forEach(R=>{R.load(),o.push(R.loaded)}),await Promise.all(o),ut.allCanvases.forEach(R=>{lt.register(R)}),S.pxRatio=window.devicePixelRatio;let t;(R=>{R.Neutral="N",R.Cancel="C",R.Down="D"})(t||(t={}));let i=!0,r=800,n="N",c;try{document.createEvent("TouchEvent"),S.setClickMode("T"),i=!1}catch{}const f=()=>{c&&(clearTimeout(c),c=void 0)},m=(R,X,V)=>{const _=it.hitTest(R,X,V);_&&T.handleAction(_)},C=R=>{m(R.pageX,R.pageY,R.button)},D=R=>{R.touches.length>1?(n="C",f()):n==="N"&&(n="D",c=setTimeout(()=>{n="C";const X=R.touches[0];m(X.pageX,X.pageY,at.ForceRight),c=void 0},r))},B=R=>{if(n==="D"){if(f(),n="N",R.changedTouches.length>0){const X=R.changedTouches[0];m(X.pageX,X.pageY,at.Left)}}else R.touches.length===0&&(n="N")},G=document.getElementById("solforge");i?(G.addEventListener("click",C),G.addEventListener("contextmenu",R=>(R.preventDefault(),C(R),!1))):(G.addEventListener("touchstart",D),G.addEventListener("touchend",B)),window.sfapi={details:R=>{ge.init(R)},setLog:R=>{nt.setLog(R)},peekAll:()=>{nt.peekAllCards()},peekDeck:()=>{nt.peekDecks()},peekField:()=>{console.log(p.field)},dumb:()=>{console.log("Am I dumb? "+nt.dumb)},debug:()=>{S.toggleDebug()}},S.restoreOptions(),S.options.scale!=="100"&&ut.changeScale(S.options.scale),ut.init(),ut.drawAll().then(()=>{const R=["ui/player_frame.png","ui/button/on.png","ui/button/off.png"];[1,2,3].forEach(V=>["C","S"].forEach(_=>["A","N","T","U"].forEach(q=>{R.push("frames/small/lvl"+V+"_"+q+_+".png")}))),["poison","regenerate","armor","aggressive","breakthrough","changed","consistent","defender","defensive","mobility","overload"].forEach((V,_)=>{R.push("icons/effects/"+V+".png"),_<3&&R.push("icons/effects/big/"+V+".png")}),["common","heroic","legendary","rare"].forEach(V=>{R.push("icons/rarity/new/"+V+".png")}),[1,2,3,4].forEach(V=>{R.push("ui/turn"+V+".png")}),["blue","green","purple","red","yellow"].forEach(V=>{R.push("frames/glow_"+V+".png")});const X=new Jt;for(let V=0;V<10;V++)["B","S"].forEach(_=>{(_==="B"?["G","Y"]:["B","Y"]).forEach(pt=>{R.push(X.numSpriteUrl(V,_,pt))})});S.bulkLoadS(R)})}})(); +`))}}const nt=new hr;class lr{getState(){const t={cCrd:this.currPlayCard,cCst:this.currPlayCost,cPos:this.currPlayPos,aa:this.actionHistory};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.currPlayCard=i.cCrd,this.currPlayCost=i.cCst,this.currPlayPos=i.cPos,this.actionHistory=i.aa}handleAction(t){if(t.key==="DEET"){ge.init(t.param);return}if(t.key==="HPLY"){this.playCardSelect(t);return}if(t.key==="FORG"){L.forgeCard(t,this.currPlayCard,this.currPlayCost,this.currPlayPos);return}if(t.key==="FITE"){Ii.fight(t.param==="M");return}if(t.key==="ENDT"){L.endTurn();return}if(t.key==="MOVE"){this.mobilitySelect(t);return}if(t.key==="MEND"){L.mobility(t);return}if(t.key==="HDSC"){this.currPlayCost="",L.cardPlayed(this.currPlayCard,this.currPlayCost,this.currPlayPos,!0),this.actionDone();return}if(t.key==="ACTV"){const i=p.jr5(t.param);W.getCard(i.code).startActivation(i);return}if(t.key==="NOTR"){t.param==="PM"&>.popMode(),this.actionDone(!0);return}if(t.key==="CARD"){W.getCard(t.host).handleAction(t);return}if(t.key==="CANC"||t.key==="CNCL"){t.param==="PM"&>.popMode(),this.actionHistory.pop(),this.ddf5();return}if(t.key==="USWP"){gt.popMode(),Qt.whatNext();return}if(t.key==="DTUP"){ge.updateDetails(t),ut.drawAll();return}if(t.key==="VWDK"){bt.handleShowDeck(t);return}if(t.key==="SCRK"){bt.handleDeckScroll(t);return}if(t.key==="SCRH"){const i=k.getLocal();t.param==="R"?E.ui.handScrollLeft=Math.min(i.hand.length-5,E.ui.handScrollLeft+5):E.ui.handScrollLeft=Math.max(0,E.ui.handScrollLeft-5),ut.dirtyA=!0,se.dirty=!0,ut.drawAll();return}if(t.key==="DRFT"){At.resumeDraft(t.param);return}if(t.key==="SCRD"){At.paginate(t.param==="D"),ut.drawAll();return}if(t.key==="UIBT"){Ti.handleUIButton(t);return}if(t.key==="MENU"){Ti.handleMainMenuButton(t);return}if(t.key==="MNBT"){Ti.handleMenuButton(t);return}if(t.key==="DSET"){this.ddf5($t.generateDeckPickerActions(parseInt(t.param)));return}if(t.key==="DECK"){$t.handleDeckPick(t.param);return}if(t.key==="DPVW"){$t.previewDeckPick(t.param);return}if(t.key==="DBUG"){t.param==="AB"&&S.options.debug?y.clearAll():S.toggleDebug();return}}ddf5(t,i=!1){let r;if(t){const n=this.generateDetailActions();r=t.concat(n),this.actionHistory.push(r)}else r=this.actionHistory[this.actionHistory.length-1];E.aiActive?nt.processAction(r,i):(gt.mode==="G"&&(ut.dirtyA=!0),ut.drawAll())}currPlayCard="";currPlayCost="";currPlayPos=-1;shiftPlayCard(t){t0&&i.canLevel()&&r.push(w.buttonTarget("HDSC",t.card));const n=w.toActions(r);return n.push(b.handSelectAction("CANC",t.card,"",t.position)),n}mobilitySelect(t){const i=this.getMoveCardActions(t);this.ddf5(i)}getMoveCardActions(t){const i=p.ddf6(t);let r=[];if(t.param==="ACTV"){const n=b.actionTarget("TB","ACTV",i.code,i.id);r=w.toActions(n)}return r.push(b.fieldSelectAction("CANC",t.lane,t.playerA)),p.canMove(i).map(n=>{const c=b.fieldSelectAction("MEND",n,t.playerA);return c.param=i.id,c}).concat(r)}noneEndTrigger(){return w.toActions(w.buttonTarget("NOTR"))[0]}cancelAction(){return w.toActions(w.buttonTarget("CANC"))[0]}emptyAdjacents(t,i){const r=i||t.id,n=b.emptyPlayerActTarg("F","CARD",t.code,r);return n.lanes=t.adjacent,w.toActions(n)}generateDetailActions(){const t=gt.mode;if(E.aiActive)return[];if(t==="G"){const i=k.getLocal().hand.map((n,c)=>{const f=b.handSelectAction("DEET",n,"",c);return f.param=n,f}),r=p.qActiveCreats().map(n=>{const c=b.fieldSelectAction("DEET",n.lane,n.owner);return c.param=n.code,c});return i.concat(r)}else if(t==="D"){const i=At.currentPack.map((n,c)=>{const f=b.draftSelectAction("DEET",c,!0);return f.param=`${n}1`,f}),r=At.picksAsDeck.map((n,c)=>{const f=b.draftSelectAction("DEET",c,!1);return f.param=`${n.card}1`,f});return i.concat(r)}return[]}}const T=new lr,cr=16.6,ur=200,dr="!CF",fr="!RU",_e=35,gr=.11,Bi=40,fi=18,gi=18,Hi=32,Ni=40,mi=45,Oe=["L1","L2","L3","L4","L5","L6"],pi=["F1","F2","F3","F4"],yi=o=>Math.round(100*o)/100,mr=(o,t,i)=>Math.round((1-i)*o+i*t);class pr{active=!1;animBase=[];animOpac=[];animOver=[];animQ=[];blocker=new Ne;cardCache=new Map;easingCache=new Map;eCanvas;hcFrame;fct2anm=new Map;initBlock=new Ne;initialzed=!1;lastStep=-1;movingBoard=[];movingHand=[];on=!0;pathCache=new Map;rafStartTime=0;speedCache=new Map;spriteCache=new Map;spriteToSchema=new Map;constructor(){["F","F0","D"].concat(Oe,pi).forEach(t=>this.pathCache.set(t,[[],[]]))}actF(){return[this.animOpac,this.animBase,this.animOver].map(t=>t.filter(i=>i.active))}addArmorC(t){if(this.ok()){const i=new vn("M","M","F",t.id,18);i.setDelay(fi),i.preLoad("icons/effects/big/armor.png"),i.setField(t.lane,t.owner),i.nudge(40,76),i.dOrd=2,this.animQ.push(i)}}addArmorP(t){if(this.ok()){const i=new hi("M","I","P",t,this.speedCache.get("D"));i.preLoad("icons/effects/big/armor.png"),i.nudge(897,t===k.isLocalA?552:65),this.animQ.push(i)}}addCardFlash(t){if(this.ok()){const i=pe.fader("P",dr,t);i.x=861,i.y=200,this.animQ.push(i)}}addDeathBoard(t,i,r){if(this.ok()){const n=pe.fader("F",t,t);n.setField(i,r),this.animQ.push(n)}}addDirDmg(t){if(this.ok()){const i=new Ee("Z","P",t);i.nudge(834,t===k.isLocalA?486:-1),this.animQ.push(i)}}addFactBoard(t,i,r,n){if(this.ok()&&t!=="X"){const c=new Tn(this.fct2anm.get(t),"F",i);c.setField(r,n),c.nudge(20,30),c.budge(),this.animQ.push(c)}}addFight(t){if(this.ok()){const i=new li("F","F",t.id,t.id);i.endWrite=!0,i.setField(t.lane,t.owner);const r=this.pathCache.get("F");i.moveY=r[k.isLocalA===t.owner?1:0],this.animQ.push(i)}}addForgeMove(t,i,r,n,c=void 0){if(this.ok()){const f=k.isLocalA===n,m=(r-(i+1))*(f?1:-1),C=m===0?"F0":pi[Math.abs(m)-1],D=new li(C,"F",t,t);D.endWrite=!0,D.dOrd=2;const B=se.fastCoord(i);f||(B[1]=-184),D.x=B[0],D.y=B[1];const G=this.pathCache.get(D.aId);if(D.moveY=G[f?1:0],m!==0){const R=this.pathCache.get(Oe[Math.abs(m)-1]);D.moveX=R[m>0?0:1]}if(this.animQ.push(D),c){const R=pe.fixed("F",c.id,c.id);R.steps=D.steps,R.dOrd=0,R.setField(c.lane,c.owner),this.animQ.push(R)}}}addHandDiscard(t,i,r){if(this.ok()){const n=this.pathCache.get("D")[0];let c;c=pe.fader("H",t,i),c.setHand(r),c.moveY=n,this.animQ.push(c)}}addHandFling(t,i,r){if(this.ok()){const n="L6",c=this.pathCache.get(n)[0],f=pe.fader("H",t,i);f.setHand(-1),f.x+=40+100*r,f.moveX=c,this.animQ.push(f)}}addHandMove(t,i,r,n,c){if(this.ok()){const f=Math.min(Math.max(n-r,-5),5),m=Oe[Math.abs(f)-1],D=this.pathCache.get(m)[f>0?0:1];let B;const G=n<0||n>4;G?B=pe.fader("H",t,i):(B=new li(m,"H",t,i),B.endWrite=!0,r>4?r=Math.min(r,n+5):r<0&&(r=Math.max(r,n-5))),B.setHand(r),B.moveX=D,c&&!G&&B.extend(15,!0,!1),this.animQ.push(B)}}addHeal(t){if(this.ok()){const i=new Ee("H","P",t);i.slow(4),i.nudge(859,t===k.isLocalA?517:30),this.animQ.push(i)}}addLaneMove(t,i,r,n){if(this.ok()){const c=(r-i)*(k.isLocalA===n?1:-1),f=new li(Oe[Math.abs(c)-1],"F",t,t);f.endWrite=!0,f.setField(i,n);const m=this.pathCache.get(f.aId);f.moveX=m[c>0?0:1],this.animQ.push(f)}}addLevel(t,i){if(this.ok()){const r=new Ee("V","H",t);r.slow(4),r.setHand(i),r.nudge(20,72),this.animQ.push(r)}}addOverload(t,i){if(this.ok()){const r=new Ee("O","H",t);r.slow(4),r.setHand(i),r.nudge(21,72),this.animQ.push(r)}}addPoison(t){if(this.ok()){const i=new hi("P","I","F",t.id,this.speedCache.get("D"));i.preLoad("icons/effects/big/poison.png"),i.setField(t.lane,t.owner),i.nudge(70,36),this.animQ.push(i)}}addRankup(t){if(this.ok()){const i=new Ee("R","P",fr);i.slow(4),i.nudge(890,t===k.isLocalA?466:-21),this.animQ.push(i)}}addRegen(t){if(this.ok()){const i=new hi("G","I","F",t.id,this.speedCache.get("D"));i.preLoad("icons/effects/big/regenerate.png"),i.setField(t.lane,t.owner),i.nudge(10,35),this.animQ.push(i)}}addSlash(t){if(this.ok()){const i=new Vi("B","F",t.id);i.slow(3),i.setDelay(fi),i.setField(t.lane,t.owner),i.nudge(8,44),this.animQ.push(i)}}addSwipe(t){if(this.ok()){const i=new Vi("W","P",t);i.slow(3),i.setDelay(fi),i.nudge(877,t===k.isLocalA?531:44),this.animQ.push(i)}}aniProm(){return this.active?this.blocker.getPromise():Promise.resolve()}async done(t){const i=t??this.actF().flat();await Promise.all(i.map(r=>r.onEnd())),this.eCanvas.clear(),this.active=!1,this.purge(),this.blocker.resolveMe()}async draw(t){if(t-this.lastStep===0){requestAnimationFrame(c=>this.rafNext(c));return}let r=!1;const n=[];for(let c=this.lastStep+1;c<=t;c++)this.actF().forEach(f=>{f.forEach(m=>{m.steps===c?(m.active=!1,n.push(m)):(c===t&&(r=!0),m.moveX.length>c&&(m.x+=m.moveX[c]),m.moveY.length>c&&(m.y+=m.moveY[c]))})});if(r){const c=this.actF();this.hcFrame.clear(),c[0].length>0&&(this.hcFrame.context.globalAlpha=this.easingCache.get("D")[t],await Promise.all(c[0].map(f=>f.draw(t))),this.hcFrame.context.globalAlpha=1),c[1].length>0&&await Promise.all(c[1].map(f=>f.draw(t))),c[2].length>0&&await Promise.all(c[2].map(f=>f.draw(t))),await Promise.all(n.map(f=>f.onEnd())),this.eCanvas.clear(),this.eCanvas.writeHC(this.hcFrame,0,0),this.lastStep=t,t>ur?this.done(n):requestAnimationFrame(f=>this.rafNext(f))}else this.done(n)}easingFade(t){const i=Array(t);let r=0;for(let n=0;nthis.fct2anm.set(kt[1],kt[0]));const i=[["A","effectA"],["B","slash"],["W","swipe"],["Z","boomer"],["H","heal"],["V","level"],["O","overload"],["N","effectN"],["R","rankup"],["T","effectT"],["U","effectU"]];(await Promise.all(i.map(kt=>S.imageLoader(`img/sprites/${kt[1]}.png`)))).forEach((kt,ae)=>{this.spriteCache.set(i[ae][0],kt)});const n=this.schemaBuilder(5,7,110,154,0),c=this.schemaBuilder(5,7,108,153,0),f=this.schemaBuilder(2,3,134,134,0),m=this.schemaBuilder(2,3,114,114,0),C=this.schemaBuilder(3,3,120,116,0),D=this.schemaBuilder(3,3,110,81,0),B=this.schemaBuilder(3,3,112,114,0),G=this.schemaBuilder(5,2,142,142,0),R=this.schemaBuilder(8,4,205,205,0);[["A",n],["N",n],["U",n],["T",c],["B",f],["W",m],["R",C],["V",D],["O",B],["H",G],["Z",R]].forEach(kt=>this.spriteToSchema.set(kt[0],kt[1])),[["D",_e],["F",Bi],["L1",gi],["L2",Hi],["L3",Ni],["L4",mi],["L5",mi],["L6",_e],["F0",gi],["F1",gi],["F2",Hi],["F3",Ni],["F4",mi]].forEach(kt=>this.speedCache.set(kt[0],kt[1])),this.easingCache.set("D",this.easingFade(_e));const _=(kt,ae)=>{const wt=new Array(ae.length),Vt=ae.map(Yt=>mr(0,kt,Yt));return Vt.forEach((Yt,he)=>{he===0?wt[0]=Yt:wt[he]=Yt-Vt[he-1]}),wt},q=kt=>kt.map(ae=>-ae),pt=250;Oe.forEach((kt,ae)=>{const wt=this.easingLine(this.speedCache.get(kt)),Vt=(ae+1)*oe.fieldGap,Yt=_(Vt,wt);if(this.pathCache.set(kt,[Yt,q(Yt)]),ae<5){const he=_(pt,wt);this.pathCache.set(pi[ae],[he,q(he)])}ae===0&&this.pathCache.set("F0",this.pathCache.get("F1"))});const Mt=_(15,this.easingFight(Bi));this.pathCache.set("F",[Mt,q(Mt)]);const ye=_(100,this.easingLine(_e));this.pathCache.set("D",[ye,[]]),this.initialzed=!0,this.initBlock.resolveMe()}}initProm(){return this.on?this.initBlock.getPromise():Promise.resolve()}ok(){return this.on&&nt.simOff}async prep(){if(!this.on||this.animQ.length===0)return 0;if(!this.initialzed)return this.animQ=[],0;this.active=!0;const t=new Map;this.animQ.forEach(n=>{t.has(n.targId)?t.get(n.targId).push(n):t.set(n.targId,[n])});const i=[];let r=0;t.forEach((n,c)=>{const f=n[0].target,m=new Set,C=n.filter(D=>m.has(D.aId)?!1:(m.add(D.aId),!0));if(r+=C.length,n.some(D=>D.type==="F"||D.type==="C"||D.type==="X"?(i.push(D),!0):!1),f==="F"||f==="H"){const D=n.find(B=>B.moveX.length>0||B.moveY.length>0);if(D){if(f==="F")this.movingBoard.push(c);else if(f==="H"){const B=S.deTil(c);S.txt2bool(B[0])&&this.movingHand.push(parseInt(B[1]))}n.length>1&&n.forEach(B=>{B!==D&&(B.moveX=D.moveX,B.moveY=D.moveY)})}}C.forEach(D=>{D.type==="S"?this.animOver.push(D):D.type==="F"||D.type==="I"?this.animOpac.push(D):(D.type==="C"||D.type==="X"||D.type==="M")&&this.animBase.push(D)}),this.animBase.sort((D,B)=>D.dOrd-B.dOrd)});for(let n=0;nthis.rafFirst(t)))}}const Z=new pr;class yr{type="N0";events=[];reactions=[];deathCheck=!0;iaTrigLane=0;getState(){const t={type:this.type,events:this.events,tA:this.reactions,dC:this.deathCheck,tL:this.iaTrigLane};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.type=i.type,this.events=i.events,this.reactions=i.tA,this.deathCheck=i.dC,this.iaTrigLane=i.tL}reset(){this.type="N0",this.events=[],this.reactions=[],this.deathCheck=!0}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=this.events.slice(),this.events=[];else{const n=this.events.filter(f=>f.code==="DIE"),c=this.events.filter(f=>f.code!=="DIE");t==="C1"?(i=c,this.events=n):(i=n,this.events=c)}const r=this.getReactions(i);this.reactions=this.sortReactions(r),Qt.whatNext()}getReactions(t){let i;const r=t.map(n=>{n.code==="TRS"&&(i=n);const c=p.field.map(m=>m.triggers.map(C=>{const D=b.triggerReaction(n,C,m.owner,"C");return D.creatId=m.id,D.cardCode=m.code,D}).filter(C=>vi.ddf8(C))).flat(),f=[!0,!1].map(m=>k.toPlayer(m).triggers.map(D=>b.triggerReaction(n,D,m,"P")).filter(D=>vi.ddf8(D))).flat();return c.concat(f)}).flat();return i&&this.handleTurnStart(i),r}sortReactions(t){const i=k.activeA;let r=t.filter(f=>!f.trigger.interactive&&f.owner===i),n=t.filter(f=>!f.trigger.interactive&&f.owner!==i);const c=t.filter(f=>f.trigger.interactive&&f.owner===i);return nt.simOff&&(r=this.animBatching(r),n=this.animBatching(n)),c.concat(n,r)}animBatching(t){const i=new Map;if(t.forEach(f=>{if(f.trigger.batch){const m=f.trigger.id;i.set(m,1+(i.get(m)??0))}}),i.size===0)return t;const r=[];if(i.forEach((f,m)=>{f>1&&r.push(m)}),r.length===0)return t;const n=t.filter(f=>!r.includes(f.trigger.id));return r.map(f=>t.filter(m=>m.trigger.id===f).map((m,C)=>(C>0&&(m.draw=!1),m))).flat().concat(n)}handleTurnStart(t){p.dirt();const i=E.tick();p.qActiveCreats().forEach(r=>{r.owner===t.playerA&&(r.activationAvailable=!0,r.mobilityAvailable=!0,r.sleeping=!1),r.armorDmg=0,r.poison>0&&r.hurtDirect(r.poison,"POIS","X",i)&&Z.addPoison(r),r.regen>0&&r.heal(r.regen,!1)>0&&Z.addRegen(r),Bt.deathProdder(r,i)}),[k.playerA,k.playerB].forEach(r=>{r.armorDmg=0;const n=k.totalPoison(r);n>0&&k.hurtDirect(r,n,"POIS")>0&&Z.addDirDmg(r.isPlayerA)})}getNextTrigger(){const t=this.reactions;if(t.length!==0)return t[t.length-1]}triggerDone(){this.reactions.length===0?console.error("batch.triggerDone() was called when there is no trigger actions"):(this.reactions.pop(),this.iaTrigLane=0),Qt.whatNext()}addEvents(...t){this.events.push(...t)}}const x=new yr;class br{registry;constructor(){this.registry={}}register(t){if(this.registry[t])throw new Error(`Double registration of canvas ${t}`);this.registry[t]=new rn(t)}get(t){return this.registry[t]}}const lt=new br;class Ar extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Abraxas, Avatar of Kadras",this.iAttack=this.boof4712,this.iHealth=this.lValN([7,11,21]),this.tribe.push("HY");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.`,this.bonus=this.buffNug(this.iAttack,0,"TX")}targ(t){const i=b.crFriendNotMeActTarg("CARD",t.id,this.code,t.id);return this.level<3&&(i.lanes=t.adjacent),i}canActivate(t){return p.creatByTarget(this.targ(t)).length>0}startActivation(t){let i;this.level===1?i=this.targ(t):(i=w.boardTarget("CARD",this.code),i.param=t.id),i.hint=["BB"],T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.applyMod(r)}else{this.logAct(!0);const r=this.targ(i);p.creatByTarget(r).forEach(n=>{this.applyMod(n)})}i.endActivation()}applyMod(t){this.modA(t,b.modT("AT",t.attack))}}class kr extends P{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Abyssal Brute",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.text=`When ${this.name} or another friendly creature enters a side lane, that creature gets ${y.jr9(this.level,this.level,!0)} and Regenerate ${this.level}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("EF");n.bonus=this.buffNug(this.level,this.level,"TW");const c=r.jr4("MV");return c.bonus=this.regnNug(this.level),r}ddf8(t){const i=I.toCreature(t.event);return(i.creature.lane===1||i.creature.lane===5)&&i.creature.owner===t.owner}jr8(t){const i=I.toCreature(t.event);this.buffD(i.creature,this.level),this.regn(i.creature,this.level),x.triggerDone()}}class Tr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Alloyin Highlander",this.iAttack=this.lValN([5,7,10]),this.iHealth=this.boof6914,this.tribe.push("HM"),this.text=`While ${this.name} is your only friendly creature, it gets ${y.jr9(this.boof4812,0)} and Armor ${this.boof248}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);i.player=k.toTarget(t.owner),p.creatByTarget(i).length===0?[b.mod("AT",this.boof4812,t.id),b.mod("AR",this.boof248,t.id)].forEach(n=>{t.addModSafe(n)}):t.removeModSafe(t.id)}}class vr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Ambriel Archangel",this.iAttack=this.boof51016,this.iHealth=this.iAttack+1,this.tribe.push("AG"),this.hints=["ZZ-3"];const i=this.boof101520;this.text=`While ${this.name} is your only friendly creature, you get Armor ${i}, and this gets Armor ${this.level+1} and Mobility 1.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=t.status==="A",r=b.crNotMeTarg(t.id);r.player=k.toTarget(t.owner);const n=p.creatByTarget(r);if(i&&n.length===0){const c=b.mod("AR",this.boof101520,t.id);k.addModSafe(t.owner,c);const f=b.mod("AR",this.level+1,t.id),m=b.mod("MB",1,t.id);t.addModSafe(f),t.addModSafe(m)}else k.removeModSafe(t.owner,t.id),t.removeModSafe(t.id)}}class Ve extends P{cons(t){({["LLD"]:()=>this.demC(),["LLG"]:()=>this.golC(),["LLS"]:()=>this.senC(),["LLT"]:()=>this.tyrC(),["LLV"]:()=>this.verC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;ddf8(t){return nt.simOff&&this.t(t)}jr8(t){const i=this.cardCode(),r=k.toPlayer(t.owner),n=r.hand.length;for(let c=n-1;c>-1;c--){const f=r.hand[c];f.startsWith(i)&&(y.lawg(f," Ambushed."),this.spawn(f,r.isPlayerA),L.levelAndDiscard(f,c,!1,"E"))}x.triggerDone()}ambT(){return`Spawn a ${this.name}. Then discard ${this.level===3?"":"and level up "} ${this.name}.`}demC(){this.faction="N",this.rarity="H",this.name="Leyline Demon",this.iAttack=this.lValN([3,9,14]),this.iHealth=this.iAttack+2,this.tribe.push("DM"),this.text="Ambush: When the enemy player plays a card, if it is their third card played that turn, "+this.ambT(),this.t=this.demT}demT(t){return t.event.code==="PLC"?t.owner!==t.event.playerA&&L.cardsPlayed===3:!1}golC(){this.faction="U",this.rarity="H",this.name="Leyline Golem",this.iAttack=this.lValN([5,12,18]),this.iHealth=this.iAttack-(this.level+1),this.tribe.push("GL"),this.text="Ambush: When an enemy creature moves on the enemy player's turn, "+this.ambT(),this.t=this.golT}golT(t){if(t.event.code==="MOV"){const i=I.toCreature(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner}else return!1}senC(){this.faction="A",this.rarity="H",this.name="Leyline Sentry",this.iAttack=this.lValN([2,7,9]),this.iHealth=this.iAttack+this.level+5,this.tribe.push("RB"),this.text="Ambush: When an enemy creature enters play on the enemy player's turn, if it wasn't Forged, "+this.ambT(),this.t=this.senT}senT(t){if(t.event.code==="ENT"){const i=I.toEnterField(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner&&!i.forged}else return!1}tyrC(){this.faction="T",this.rarity="H",this.name="Leyline Tyrant",this.iAttack=this.lValN([6,12,17]),this.iHealth=this.iAttack-2,this.tribe.push("GT"),this.text="Ambush: When an enemy player gains health on their turn, "+this.ambT(),this.t=this.tyrT}tyrT(t){return t.event.code==="PHL"?t.owner!==t.event.playerA&&k.activeA===t.event.playerA:!1}verC(){this.faction="U",this.rarity="H",this.name="Leyline Vermin",this.iAttack=this.boof61218,this.iHealth=this.boof358,this.tribe.push("IN"),this.text="Ambush: When an enemy creature with Poison is destroyed on the enemy player's turn, "+this.ambT(),this.t=this.verT}verT(t){if(t.event.code==="DIE"){const i=I.toCreature(t.event);return t.owner!==i.creature.owner&&k.activeA===i.creature.owner&&i.creature.poison>0}else return!1}}class Sr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Apocrymancer",this.iAttack=this.boof3713,this.iHealth=this.iAttack+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 r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.rawNug(0,0,0,0,.5,"TW"),n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}ddf8(t){if(t.event.playerA===t.owner){const i=W.getCard(t.event.cardCode);if(i.type==="S"&&i.faction==="A")return!0}return!1}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class Cr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Arboris, Grove Dragon",this.iAttack=this.lValN([5,9,20]),this.iHealth=this.iAttack,this.tribe.push("DG");const i=this.boof;this.text=`While you have over 120 health, Arboris gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i);return r.addEffect("PH",this.code),r}enforceEffect(t){if(k.toPlayer(t.owner).health>120&&t.status==="A"){const r=this.boof;t.addModSafe(b.mod("HL",r,t.id)),t.addModSafe(b.mod("MH",r,t.id)),t.addModSafe(b.mod("AT",r,t.id))}else t.removeModSafe(t.id)}get boof(){return this.lValN([4,8,80])}}class wr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Ash Maiden",this.iAttack=this.boof368,this.iHealth=this.iAttack*2,this.tribe.push("HM"),this.text=`When a friendly creature ${y.dbdtap()}, it gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level,"TP"),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner}jr8(t){const i=I.toDamage(t.event);this.logAct(!1,i.srcCreat),this.buffD(i.srcCreat,this.level),x.triggerDone()}}class ti extends P{constructor(t){super(t),this.rarity="H",this.iAttack=this.level+2,this.iHealth=this.iAttack;const i=this.cardCode();i==="SFA"?this.steel():i==="RFA"?this.root():i==="HFA"?this.hell():i==="SGA"&&this.storm(),this.text=`Forge: ${this.name} gets ${y.jr9(this.level,this.level)} for each ${y.factionText(this.faction)} card in your hand.`}hell(){this.faction="N",this.name="Hellforged Avatar",this.iRegen=this.level,this.tribe.push("AB")}root(){this.faction="U",this.name="Rootforged Avatar",this.iBT=!0,this.tribe.push("HM")}steel(){this.faction="A",this.name="Steelforged Avatar",this.iArmor=this.level,this.tribe.push("CY")}storm(){this.faction="T",this.name="Stormforged Avatar",this.iMobile=this.level,this.tribe.push("MT")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){const i=b.target("TH");i.player=k.toTarget(t.owner),i.faction=this.faction;const r=w.deckByTarget(i).length;if(r>0){const n=I.toEnterField(t.event);this.buffD(n.creature,r*this.level)}x.triggerDone()}}class K extends P{imgKey="";cons(t){({["BOS"]:()=>this.fixedSapling(3),["COZ"]:()=>this.cooze(),["DFM"]:()=>this.dfmimic(),["DZA"]:()=>this.dozer(),["EWF"]:()=>this.woof(),["FWG"]:()=>this.feywing(),["FRH"]:()=>this.hulk(),["FUN"]:()=>this.funguy(),["POZ"]:()=>this.purpz(),["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.cons(this.cardCode())}image(t){return this.rawImage(this.imgKey,t)}static fgoc(t){return "FGO"+t}fixedNekSpirit(t){this.faction="N",this.name="Spirit",this.tribe.push("ST"),this.iAttack=t,this.iHealth=t,this.imgKey=`${"SPN"}${this.level}`}nekSpirit(){this.fixedNekSpirit(this.boof51015)}yuruSpirit(){this.fixedNekSpirit(this.boof5814)}static purpOzC(t){return "POZ"+t}oozer(t){this.faction="N",this.name="Oozeling",this.tribe.push("OZ"),this.iHealth=this.iAttack,this.imgKey=t?"POZ":"OOZ"}purpz(){this.iAttack=this.boof135,this.oozer(!0)}nooze(){this.iAttack=this.boof4711,this.oozer(!1)}cooze(){this.iAttack=1,this.oozer(!1),this.hints=["RT"]}minion(){this.iAttack=K.minionBuff(this.level),this.plont(),this.name=K.minionName(this.level),this.hints=["RT"]}static tffc(t){return "TFF"+t}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.iHealth=this.iAttack,this.tribe.push("PL")}fixedSapling(t){this.iAttack=t,this.plont(),this.name=K.minionName(2),this.imgKey="SPL"}fixedSeedling(t){this.iAttack=t,this.plont(),this.name=K.minionName(1),this.imgKey="SDL",this.hints=["RT"]}fixedTreefolk(t){this.iAttack=t,this.plont(),this.name=K.minionName(3),this.imgKey="TFK"}tfFight(){this.iAttack=this.boof91421,this.plont(),this.name=K.minionName(3),this.imgKey="TFK"}static bee(t){return "KBE"+t}dfmimic(){this.faction="U",this.name="Darkforged Mimic",this.tribe.push("DF","PL"),this.iHealth=this.boof3711,this.iAttack=this.iHealth-1,this.imgKey="SSP"+this.level}dozer(){this.faction="U",this.name="Dozer, the Awakened",this.iAttack=this.level*3+6,this.iHealth=this.iAttack,this.iAggro=!0,this.iBT=!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.iAttack=9,this.iHealth=9,this.iMobile=1,this.tribe.push("DG")}funguy(){this.name="Funguy",this.iAttack=this.lValN([6,12,14]),this.plont(),this.minLevel=1,this.maxLevel=3,this.level===1?this.hints=["ZZ-1"]:this.level===2&&(this.hints=["LB"])}raptor(){this.faction="U",this.name="Raptor",this.iAttack=1,this.iHealth=1,this.tribe.push("DN"),this.hints=["RT"]}uspirit(){this.faction="U",this.name="Spirit",this.iAttack=this.boof4610,this.iHealth=this.boof346,this.tribe.push("ST")}woof(){this.faction="U",this.name="Ether Wolf",this.tribe.push("ST","WF"),this.iHealth=5,this.iAttack=6,this.imgKey="EWV"}static zomc(t){return "ZMB"+t}zimus(){this.faction="N",this.name="Zimus, the Returned",this.tribe.push("ZB"),this.iAttack=10,this.iHealth=5,this.imgKey=`${"ZTU"}2`}zomb(t,i){this.faction="N",this.name="Zombie",this.tribe.push("ZB"),this.iAttack=t,this.iHealth=i,this.imgKey="ZMB"}commonZomb(){const t=this.boof359;this.zomb(t,t)}threeZomb(){this.zomb(3,3)}strideZomb(){this.zomb(this.boof4810,this.boof369)}hulk(){this.faction="T",this.name="Frost Hulk",this.iAttack=9,this.iHealth=9,this.tribe.push("IC","EL")}}class ct extends vt{cons(t){({["AGP"]:()=>this.apulseC(),["ABE"]:()=>this.edicC(),["CTL"]:()=>this.ctlC(),["CCC"]:()=>this.ccalC(),["COD"]:()=>this.chontC(),["CEX"]:()=>this.cypeC(),["DCR"]:()=>this.dcurC(),["DFS"]:()=>this.defsC(),["DGZ"]:()=>this.digiC(),["EPD"]:()=>this.epiC(),["EWV"]:()=>this.ewolC(),["FRR"]:()=>this.roarC(),["FSM"]:()=>this.fstormC(),["GRM"]:()=>this.mealC(),["IBF"]:()=>this.ibfC(),["IVS"]:()=>this.infvC(),["LOD"]:()=>this.lashC(),["NSH"]:()=>this.shriekC(),["NCL"]:()=>this.noxC(),["OWF"]:()=>this.oforceC(),["PLW"]:()=>this.palwC(),["PHC"]:()=>this.pcallC(),["PTB"]:()=>this.phyC(),["PYS"]:()=>this.pyreC(),["ROK"]:()=>this.rokC(),["ROU"]:()=>this.riteC(),["ROE"]:()=>this.roteC(),["STS"]:()=>this.stsC(),["SNP"]:()=>this.pulseC(),["SRD"]:()=>this.sradC(),["SIV"]:()=>this.beesC(),["TST"]:()=>this.talinC(),["TRN"]:()=>this.turnbC(),["VCH"]:()=>this.verdC(),["WOD"]:()=>this.wdenC(),["WPC"]:()=>this.wipeC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;z;image(t){const i=this.cardCode();return i==="NSH"||i==="PHC"?this.leveledImage(t):this.fixedImage(t)}canPlay(){return this.t()}playTargets(){return[w.boardTarget("CARD",this.code)]}handleAction(t){this.logSpell(),this.z(),T.spellCast()}acT(){return p.qActiveCreats().length>0}aoT(){return p.qActiveCreats().length<10}ecT(){return p.qEnemyCreats().length>0}fcT(){return p.ddf1().length>0}foT(){return p.ddf1().length<5}tpytar(){const t=b.crFriendTarg();return t.faction="T",p.creatByTarget(t)}apulseC(){this.faction="A",this.rarity="C",this.name="Aegis Pulse",this.text=`Each friendly creature gets Armor ${this.boof234}.`,this.t=this.fcT,this.z=this.apulseZ}apulseZ(){const t=this.boof234;p.ddf1().forEach(i=>{i.addArmor(t)})}aeSides(){return[p.qPlayerCreats(!0),p.qPlayerCreats(!1)]}edicC(){this.faction="A",this.rarity="H",this.name="Ambriel's Edict",this.maxLevel=1,this.overload=!0,this.text="If each player has at least one creature in play, destroy all but the highest attack creature that each player controls.~Then discard you hand.",this.t=this.edicT,this.z=this.edicZ}edicT(){return this.aeSides().every(t=>t.length>0)}edicZ(){const t=this.aeSides(),i=E.tick();let r=[];t.forEach(m=>{if(m.length>1){let C=[],D=-999999;m.forEach(B=>{B.attack>D?(D=B.attack,r.push(...C),C=[B]):B.attack===D?C.push(B):r.push(B)}),C.length>1&&(C.splice(S.randInt(0,C.length),1),r.push(...C))}}),r.forEach(m=>this.kill(m,i));const n=k.getActive(),c=T.playPosition(),f=n.hand.length;for(let m=f-1;m>-1;m--)m!==c&&(Dt.cardDiscard(n,m),T.shiftPlayCard(m))}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 ${y.jr9(this.ctlboof,0)} this turn. Those creatures`:"";this.text=`Each friendly creature${t} battles an additional time this turn.`,this.t=this.fcT,this.z=this.ctlZ}ctlZ(){const t=this.ctlboof;p.ddf1().forEach(i=>{this.modA(i,b.modT("AT",t)),this.wrang(i)})}ccalC(){this.faction="N",this.rarity="H",this.name="Cercee's Call",this.maxLevel=2,this.free=this.level===2,this.text="Spawn a copy of a friendly Zombie that was destroyed this turn.",this.t=this.ccalT,this.z=this.ccalZ}ccalZ(){const t=this.ccz(),i=t.length;i>0&&this.spawn(t[S.randInt(0,i)],k.activeA)}ccalT(){return this.ccz().length>0}ccz(){return(k.activeA?L.deathsA:L.deathsB).filter(i=>{const r=W.getCard(i);return r.type==="C"&&r.isTribe("ZB")})}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.",this.t=this.ecT,this.z=this.chontZ}chontZ(){const t=k.getActive().rank,i=E.tick();p.qEnemyCreats().forEach(r=>{this.smack(r,t,i)})}cypeC(){this.faction="A",this.rarity="H",this.name="Cypien Experimentation";const t=this.boof5610;this.text=`Give a random friendly creature ${y.jr9(t,0)}. Give a random friendly creature Armor ${t}`,this.t=this.fcT,this.z=this.cypeZ}cypeZ(){const t=p.ddf1(),i=t.length;if(i>0){const r=this.boof5610,n=t[S.randInt(0,i)],c=t[S.randInt(0,i)];this.logAct(!1,n,c),this.buffA(n,r),c.addArmor(r)}}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.`,this.t=this.dcurT,this.z=this.dcurZ}dcurZ(){const t=this.dctargs(),i=t.length;if(i>0){const r=S.randInt(0,i),n=E.tick();this.kill(t[r],n),this.level===3&&i>1&&(t.splice(r,1),this.kill(t[S.randInt(0,i-1)],n))}}dcurT(){return this.dctargs().length>0}dctargs(){const t=b.crEnemyTarg();return t.level=w.ddf2(this.level+1),p.creatByTarget(t)}defsC(){this.faction="A",this.rarity="C",this.name="Defense Spire",this.overload=!0,this.maxLevel=1,this.text="Each friendly creature gets Armor 6 this turn.",this.t=this.fcT,this.z=this.defsZ}defsZ(){p.ddf1().forEach(t=>{this.modA(t,b.modT("AR",6))})}digiC(){this.faction="A",this.rarity="R",this.name="Digitize",this.text=`Each enemy creature gets ${y.jr9(this.boof4812n,0)} this turn.`,this.t=this.ecT,this.z=this.digiZ}digiZ(){const t=this.boof4812n;p.qEnemyCreats().forEach(i=>{this.modA(i,b.modT("AT",t))})}epiC(){this.faction="N",this.rarity="H",this.name="Epidemic";const t=this.boof246n;this.text=`Each enemy creature gets ${y.jr9(t,t)}.`,this.t=this.ecT,this.z=this.epiZ}epiZ(){const t=this.boof246n,i=b.crEnemyTarg();p.creatByTarget(i).forEach(r=>{this.buffD(r,t)})}ewolC(){this.faction="U",this.rarity="C",this.name="Ether Wolves",this.maxLevel=1,this.overload=!0,this.hints=["ZZ-3"],this.text="Spawn two Ether Wolves.",this.t=this.foT,this.z=this.ewolZ}ewolZ(){const t=E.tick(),i="EWF"+"1",r=k.activeA;this.spawn(i,r,t),this.spawn(i,r,t)}roarC(){this.faction="U",this.rarity="H",this.name="Ferocious Roar";const t=this.boof235;this.text=`Each friendly creature gets ${y.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`,this.t=this.fcT,this.z=this.roarZ}roarZ(){const t=this.boof235;p.ddf1().forEach(i=>{this.buffD(i,t),this.level===3&&(i.breakthrough=!0)})}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.`,this.t=this.acT,this.z=this.fstormZ}fstormZ(){const t=this.fszap,i=E.tick();p.qActiveCreats().forEach(r=>{this.smack(r,t,i)})}mealC(){this.faction="N",this.rarity="R",this.name="Group Meal";const t=this.boof234;this.text=`Each enemy creature gets ${y.jr9(-1*t,0)}. Each friendly creature gets ${y.jr9(t,0)}.`,this.t=this.acT,this.z=this.mealZ}mealZ(){const t=this.boof234,i=k.activeA;p.qActiveCreats().forEach(r=>{const n=r.owner===i?t:-1*t;this.buffA(r,n)})}ibfC(){this.faction="T",this.rarity="R",this.name="Iceborn Fortitude",this.text=`Each friendly creature gets ${y.jr9(0,this.boof3510)}.`,this.t=this.fcT,this.z=this.ibfZ}ibfZ(){const t=this.boof3510,i=b.crFriendTarg();p.creatByTarget(i).forEach(r=>{this.buffH(r,t)})}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 ${y.jr9(t,t,!0)} and Regenerate ${this.level}.`,this.t=this.infvT,this.z=this.infvZ}infvZ(){const t=this.boof246;this.ivt().forEach(i=>{this.buffD(i,t),this.regn(i,this.level)})}infvT(){return this.ivt().length>0}ivt(){const t=b.crFriendTarg();return t.lanes=[1,5],p.creatByTarget(t)}lashC(){this.faction="U",this.rarity="L",this.name="Lash of Demara",this.text=`Each enemy creature gets Poison ${this.level+2}.`,this.t=this.ecT,this.z=this.lashZ}lashZ(){const t=this.level+2;p.qEnemyCreats().forEach(i=>{i.addPoison(t)})}shriekC(){this.faction="N",this.rarity="L",this.name="Nethershriek";const t=W.getCard(this.ndc());this.text=`Spawn a ${y.tokName(t)}.`,this.t=this.foT,this.z=this.shriekZ}shriekZ(){this.spawn(this.ndc(),k.activeA)}ndc(){return "NDR"+this.level}noxC(){this.faction="U",this.rarity="R",this.name="Noxious Cloud",this.text=`Each enemy creature gets Poison ${this.boof246}.`,this.t=this.ecT,this.z=this.noxZ}noxZ(){const t=this.boof246;p.qEnemyCreats().forEach(i=>{i.addPoison(t)})}oforceC(){this.faction="A",this.rarity="H",this.name="Overwhelming Force",this.text="Each friendly creature gets "+(this.level===3?"2x attack.":`${y.jr9(this.boof369,0)}.`),this.t=this.fcT,this.z=this.oforceZ}oforceZ(){if(this.level===3)p.ddf1().forEach(t=>{this.buffA(t,t.attack)});else{const t=this.boof369;p.ddf1().forEach(i=>{this.buffA(i,t)})}}palwC(){this.faction="A",this.rarity="R",this.name="Palladium Wave",this.maxLevel=1,this.text=`Each enemy creature gets ${y.jr9(-1,0).replaceAll("1","X")}, where X is two times your rank.`,this.t=this.ecT,this.z=this.palwZ}palwZ(){const t=-2*k.getActive().rank;p.qEnemyCreats().forEach(i=>{this.buffA(i,t)})}pcallC(){this.faction="T",this.rarity="L",this.name="Phoenix Call";const t=W.getCard(this.cpc());this.text=`Spawn a ${y.tokName(t)}.`,this.t=this.foT,this.z=this.pcallZ}pcallZ(){this.spawn(this.cpc(),k.activeA)}cpc(){return "CYP"+this.level}phyC(){this.faction="U",this.rarity="H",this.name="Phytobomb";const t=W.getCard(K.minionCode(this.level));this.text=`Put a ${y.tokName(t)} into each players available lanes.`,this.t=this.aoT,this.z=this.phyZ}phyZ(){const t=K.minionCode(this.level),i=E.tick();[!0,!1].forEach(r=>{p.emptyLanes(r).forEach(n=>{this.poot(t,r,n,i)})})}pyreC(){this.faction="T",this.rarity="C",this.name="Pyre Song",this.text=`Each friendly creature deals ${this.level} damage to each enemy creature.`,this.t=this.edicT,this.z=this.pyreZ}pyreZ(){const t=this.level,i=E.tick(),r=p.qEnemyCreats();p.ddf1().forEach(n=>{r.forEach(c=>{this.smack(c,t,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.",this.t=this.talinT,this.z=this.rokZ}rokZ(){const t=E.tick();this.tpytar().forEach(i=>{this.buffA(i,1);const r=i.opposed;r&&r.hurtDirect(i.attack,i.code,this.faction,t)})}riteC(){this.faction="N",this.rarity="C",this.name="Rite of Undeath",this.text=`Each friendly creature gets Regenerate ${this.boof468}.`,this.t=this.fcT,this.z=this.riteZ}riteZ(){const t=this.boof468;p.ddf1().forEach(i=>{this.regn(i,t)})}roteC(){this.faction="T",this.rarity="H",this.name="Ritual of the Elements",this.maxLevel=1,this.hints=["ZZ-1"],this.text="Spawn a Lava Golem, Frost Hulk, or Lightning Titan at random.",this.t=this.foT,this.z=this.roteZ}roteZ(){const t=["FRH"+"1","LVG"+"1","LTT"+"1"];this.spawn(t[S.randInt(0,3)],k.activeA)}stsC(){this.faction="U",this.rarity="C",this.name="Scatter the Seeds";const t=W.getCard(K.minionCode(this.level));this.text=`Spawn three ${y.tokName(t)}s.`,this.t=this.foT,this.z=this.stsZ}stsZ(){const t=K.minionCode(this.level),i=E.tick();[1,2,3].forEach(r=>{this.spawn(t,k.activeA,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 ${y.jr9(this.spboof,0)}.`,this.t=this.ecT,this.z=this.pulseZ}pulseZ(){const t=this.spboof;p.qEnemyCreats().forEach(i=>{this.buffA(i,t)})}sradC(){this.faction="U",this.rarity="C",this.name="Soothing Radiance",this.text=`Heal ${this.boof61224} damage from each friendly creature.`,this.t=this.fcT,this.z=this.sradZ}sradZ(){const t=this.boof61224;p.ddf1().forEach(i=>{i.heal(t)})}beesC(){this.faction="U",this.rarity="H",this.name="Stinging Invocation";const t=W.getCard(K.bee(this.level));this.text=`Spawn one to three ${y.tokName(t)}s.`,this.t=this.foT,this.z=this.beesZ}beesZ(){const t=K.bee(this.level),i=E.tick(),r=S.randInt(2,5);[1,2,3].every(n=>n{this.modA(i,b.modT("AT",t))})}talinT(){return this.tpytar().length>0}turnbC(){this.faction="T",this.rarity="H",this.name="Turnabout",this.free=this.level===3;const t=this.boof235;this.text=`Each creature gets ${y.jr9(t,-1*t)} this turn.`,this.t=this.acT,this.z=this.turnbZ}turnbZ(){const t=this.boof235,i=-1*t;p.qActiveCreats().forEach(r=>{this.modA(r,b.modT("AT",t)),this.modA(r,b.modT("HL",i)),this.modA(r,b.modT("MH",i))})}verdC(){this.faction="U",this.rarity="H",this.name="Verdant Charge";const t=this.verdb;this.text=`Each friendly creature gets ${y.jr9(t,t,!0)} and Regenerate ${t}.`,this.t=this.fcT,this.z=this.verdZ}verdZ(){const t=this.verdb;p.ddf1().forEach(i=>{this.buffD(i,t),this.regn(i,t)})}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 ${y.jr9(1,1).replaceAll("1","X")}, where X is your rank.`,this.t=this.fcT,this.z=this.wdenZ}wdenZ(){const t=k.getActive().rank;p.ddf1().forEach(i=>{this.buffD(i,t)})}wipeC(){this.faction="A",this.rarity="H",this.name="Wipe Clean",this.overload=!0,this.maxLevel=1,this.text="Remove all abilities from each creature and player.",this.t=()=>!0,this.z=this.wipeZ}wipeZ(){[!0,!1].forEach(i=>{const r=k.toPlayer(i);r.effects=[],r.mods=[],r.triggers=r.triggers.filter(n=>n.customCode==="AB"||n.type==="NT"),r.poison=0,r.armor=0});const t=p.qActiveCreats();t.forEach(i=>{i.preWipe()}),t.forEach(i=>{i.wipeAll()})}}class Dr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Borean Mystic",this.iAttack=this.boof4814,this.iHealth=this.boof71118,this.tribe.push("WN","AS"),this.text=`Activate: Move another friendly creature to an available lane adjacent to ${this.name}.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW")}canActivate(t){return this.emptySloots(t).length>0&&this.buddies(t.id).length>0}startActivation(t){const i=this.buddies(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[2]);this.logAct(!0,r),this.lurk(r,t.lane),p.jr5(i[1]).endActivation()}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",t.id,i))}buddies(t){return w.toActions(b.crFriendNotMeActTarg("CARD",t,this.code,S.enTil("P1",t)))}}class xr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Bron, Wild Tamer",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("TK"),this.hints=["RD"];const i=this.boof357;this.text=`Upgrade Dinosaur: Replace Bron with a level ${this.level} Dino Knight.~When this ${y.dbdtap()}, heal ${i} damage from each other friendly creature.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("UP");const n=r.jr4("DM");return n.bonus=this.buffNug(0,this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="UP"){const r=I.toReplaced(t.event).replCreat;r.isTribe("DN")&&this.replc("DNK"+this.level,r.owner,r.lane)}else if(t.trigger.type==="DM"){const i=this.boof357,r=b.crNotMeTarg(t.creatId);r.player=k.toTarget(t.owner),p.creatByTarget(r).forEach(c=>c.heal(i))}x.triggerDone()}}class Br extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Brightsteel Gargoyle",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.iMobile=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 r=super.jr3(t,i);return r.jr4("PT"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);this.modA(i,b.modT("AR",this.boof2510)),this.modA(i,b.modT("DF",!0)),x.triggerDone()}}class Hr extends vt{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Bulwark Bash",this.text=`Deal damage equal to ${this.level>1?this.level+"x ":""}the Armor on a friendly creature to an enemy creature.`}firstT(){if(this.enemyTargActions().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.hasArmor=!0,t}else return}playTargets(){return[this.firstT()]}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.enemyTargActions(p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logSpell(r),this.smack(p.ddf6(t),r.armor*this.level),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class Nr extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Byzerak Spitemage",this.iAttack=this.boof369,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("HM"),this.text=`Allied Nekrium: When ${this.name} ${y.dbdtac(this.level)}, destroy it.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&i.isCreatSrc&&i.isCreatTarg&&i.srcId===t.creatId&&w.levelTestCommon(i.hurtCreat.level,this.level)}jr8(t){if(t.trigger.type==="FR"&&L.allied("N")){const i=p.creatByTr(t),r=i.jr4("DM");r.bonus=this.avgSpawnNug(),i.changed=!0,i.anim8("N")}else if(t.trigger.type==="DM"){const r=I.toDamage(t.event).hurtCreat;r.status==="A"&&Bt.destroy(r,this.code,"N")}x.triggerDone()}}class Fr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Cercee, Hand of Varna",this.iAttack=this.lValN([1,3,5,7]),this.iHealth=this.lValN([6,10,20,40]),this.tribe.push("FB"),this.hints=["ZZ-2"],this.iMobile=1,this.maxLevel=4;const i=this.level===4?`When ${this.name} ${y.dbdtap()}, deal damamge to that player equal to their health.~`:"";this.text=i+`When ${this.name} ${y.dbdtac(this.level)}, destroy that creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return this.level===4?n.bonus=this.rawNug(0,0,0,0,5,"TP"):n.bonus=this.avgSpawnNug(),r}ddf8(t){const i=I.toDamage(t.event);if(i.battle&&i.isCreatSrc&&i.srcId===t.creatId){if(this.level===4)return!0;if(i.isCreatTarg){const r=i.hurtCreat;return w.levelTestCommon(r.level,this.level)}}return!1}jr8(t){const i=I.toDamage(t.event);if(i.isCreatTarg){const r=i.hurtCreat;r.status==="A"&&this.kill(r)}else this.ouch(i.hurtPlayer,i.hurtPlayer.health),this.anim8(i.srcCreat);x.triggerDone()}}class ve extends vt{cons(t){({["ABL"]:()=>this.ablC(),["DYB"]:()=>this.drybC(),["FVA"]:()=>this.fervassC(),["ROG"]:()=>this.rotgC(),["SPG"]:()=>this.spgrC(),["TOB"]:()=>this.blightC(),["ULG"]:()=>this.ulegC(),["VOB"]:()=>this.vobC(),["WGE"]:()=>this.weguC()})[t]()}playTarg;xl=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode())}z;canPlay(){return p.creatByTarget(this.playTarg).length>0}playTargets(){return[this.playTarg]}handleAction(t){const i=p.ddf6(t);this.logSpell(this.xl?i:void 0),this.z(i),T.spellCast()}ddf8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="TOB"&&t.trigger.type==="DM"){const r=I.toDamage(t.event);if(r.battle&&r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId)return this.level===3?!0:W.getCard(r.hurtCreat.code).level<=this.level}else if((i==="ABL"||i==="VOB"||i==="WGE")&&t.trigger.type==="DM"){const r=t.event;return r.battle&&!r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId}else if(i==="DYB"&&t.trigger.type==="EF"){const r=I.toEnterField(t.event);return t.trigger.creatId!==r.creature.id&&r.creature.owner===t.owner}else{if(i==="SPG"&&t.trigger.type==="TS")return t.event.playerA===t.owner;if(i==="ROG"&&t.trigger.type==="DS"||i==="WGE"&&t.trigger.type==="PT"||i==="ULG"&&t.trigger.type==="VN"||i==="FVA"&&t.trigger.type==="FK")return!0}return!1}jr8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="TOB"){const r=t.event,n=p.jr5(r.target);n.status==="A"&&this.kill(n)}else if(i==="FVA"){const r=p.creatByTr(t),n=p.searchByLane(p.oppositeLane(r.lane),!r.owner);n&&n.hurtDirect(this.boof3612,r.code,this.faction)}else if(i==="ROG"||i==="DYB"||i==="ABL"){const r=p.creatByTr(t);r.status==="A"&&(this.logAct(!1,r),r.buff(this.level,this.level,t.draw?this.faction:"X"))}else if(i==="VOB"){const r=I.toDamage(t.event);this.smack(r.srcCreat,r.dmg)}else if(i==="SPG"){const r=p.creatByTr(t);this.logAct(!1,r),this.buffD(r,this.boof246)}else if(i==="WGE"){if(t.trigger.type==="DM")this.balm(t.owner,t.event.dmg);else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="ULG"){const r=this.spawn(p.creatByTr(t).code,t.owner);r&&this.logAct(!1,r)}else super.jr8(t);x.triggerDone()}ablC(){this.faction="T",this.rarity="R",this.name="Asir's Blessing",this.text=`Give a creature "When this creature ${y.dbdtap()}, it gets ${y.jr9(this.level,this.level)}."`,this.playTarg.hint=["BF"],this.z=this.ablZ}ablZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.buffNug(this.level,this.level,"TP"),this.anim8(t)}drybC(){this.faction="U",this.rarity="R",this.name="Dryad's Boon",this.text=`Give a creature ${y.jr9(this.level,this.level,!0)}, and "When another friendly creature enters play, this gets ${y.jr9(this.level,this.level)}."`,this.playTarg.hint=["BF"],this.z=this.drybZ}drybZ(t){this.buffD(t,this.level),t.changed=!0;const i=t.jr4("EF",this.code);i.bonus=this.buffNug(this.level,this.level,"TS"),i.batch=!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.`,this.z=this.fervassZ}fervassZ(t){t.changed=!0,this.wings(t,this.level);const i=t.jr4("FK",this.code);i.bonus=this.buffNug(this.boof3612,0)}rotgC(){this.faction="N",this.rarity="H",this.name="Rite of the Grimgaunt",this.playTarg.hint=["BF"],this.text=`Give a creature "When a creature is destroyed, this gets ${y.jr9(this.level,this.level)}."`,this.z=this.rotgZ}rotgZ(t){t.changed=!0;const i=t.jr4("DS",this.code);i.bonus=this.buffNug(this.level,this.level,"TS"),this.anim8(t)}spgrC(){this.faction="U",this.rarity="R",this.name="Shardplate Graft";const t=this.boof246;this.text=`Give a creature ${y.jr9(t,t,!0)}, and "At the start of your turn, this gets ${y.jr9(t,t)}."`,this.playTarg.hint=["BF"],this.z=this.spgrZ}spgrZ(t){const i=this.boof246;this.buffD(t,i),t.changed=!0;const r=t.jr4("TS",this.code);r.bonus=this.buffNug(i,i,"TS")}blightC(){this.faction="N",this.rarity="R",this.name="Touch Of Blight",this.text=`Give a creature "When this creature ${y.dbdtac(this.level)}, destroy that creature."`,this.playTarg.hint=["BF"],this.level<3&&(this.hints=["LG"]),this.z=this.blightZ}blightZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.avgSpawnNug(),this.anim8(t)}ulegC(){this.faction="N",this.rarity="H",this.name="Undying Legacy",this.text='Give a friendly creature "Vengeace: Spawn a copy of this."',this.playTarg.player="F",this.maxLevel=1,this.overload=!0,this.z=this.ulegZ}ulegZ(t){t.changed=!0;const i=t.jr4("VN",this.code),r=W.getCard(t.code);t.hints.push("ST"),i.bonus=this.spawnNug(r),this.anim8(t)}vobC(){this.faction="T",this.rarity="R",this.name="Violent Outburst",this.level===3?this.free=!0:this.hints=["LG"],this.text=`Give a ${y.levelGateText(this.level+1)}creature Aggressive and, "When this creature ${y.dbdtap()}, it also deals that much damage to itself."`,this.z=this.vobZ}vobZ(t){t.aggressive=!0;const i=t.jr4("DM",this.code);i.changes=!0,this.anim8(t)}weguC(){this.faction="U",this.rarity="H",this.name="Wegu's Embrace";const t=this.boof3510;this.text=`Give a friendly creature ${y.jr9(t,t)}, and "When this deals ${y.dbdtap()} this turn, you gain that much health."`,this.playTarg.player="F",this.z=this.weguZ}weguZ(t){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i;const n=t.jr4("PT",this.code);n.customCode=i,this.buffD(t,this.boof3510)}}class Tt extends P{cons(t){({["ASQ"]:()=>this.asqC(),["BSW"]:()=>this.bswC(),["CCS"]:()=>this.ccsC(),["CGL"]:()=>this.clordC(),["CSH"]:()=>this.cswC(),["FFU"]:()=>this.ffuC(),["FFS"]:()=>this.ffsC(),["FSH"]:()=>this.fssC(),["KOD"]:()=>this.kodC(),["LOD"]:()=>this.lashC(),["MBP"]:()=>this.mbpC(),["MND"]:()=>this.mndC(),["NCS"]:()=>this.ncsC(),["NFF"]:()=>this.nffC(),["OHV"]:()=>this.orghC(),["PPM"]:()=>this.ppmC(),["PSC"]:()=>this.pcoilC(),["SGF"]:()=>this.siggyC(),["SRM"]:()=>this.srmdC(),["SFG"]:()=>this.sfgdC(),["SSA"]:()=>this.ssaC(),["SWM"]:()=>this.swmC(),["UCM"]:()=>this.ucmC(),["UIM"]:()=>this.uimC(),["WMR"]:()=>this.warmC(),["WWR"]:()=>this.wwrC(),["WFS"]:()=>this.wfsC(),["XSH"]:()=>this.shambC(),["ZPM"]:()=>this.zpmC()})[t]()}xl=!0;constructor(t){super(t),this.cons(this.cardCode())}t;a;jr3(t,i){const r=super.jr3(t,i);return this.doubleActivator()&&(r.jr4("TS"),this.addExtraActivate(r)),r}canActivate(t){return w.toActions(this.t(t)).length>0}startActivation(t){const i=w.toActions([this.t(t),w.buttonTarget("CANC")]);T.ddf5(i)}handleAction(t){const i=p.ddf6(t),r=p.jr5(t.param);this.logAct(!0,this.xl?i:void 0),this.a(i,r),r.endActivation()}crTarg(t){return b.crActTarg("CARD",this.code,t.id)}nmCrTarg(t){const i=this.crTarg(t);return i.notMe=t.id,i}doubleActivator(){return this.code==="CGL"+"3"||this.code==="XSH"+"3"}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="KOD"&&(t.trigger.type==="PT"||t.trigger.type==="VN")?!0:t.trigger.type==="TS"&&this.doubleActivator()?t.event.playerA===t.owner:super.ddf8(t)}jr8(t){if(t.trigger.type==="VN")this.spawn(p.jr5(t.event.creatId).code,t.owner),x.triggerDone();else if(t.trigger.type==="PT"){const i=t.trigger.customCode,r=p.creatByTr(t);r.triggers.filter(c=>c.customCode===i).forEach(c=>r.removeTrigger(c)),x.triggerDone()}else t.trigger.type==="TS"&&(this.addExtraActivate(p.creatByTr(t)),x.triggerDone())}asqC(){this.faction="N",this.rarity="L",this.name="Ariadne, Spider Queen",this.iAttack=this.boof3712,this.iHealth=this.boof81219,this.tribe.push("SP"),this.xl=!1,this.text="Activate, destroy a Web: Ariadne gets +attack and +health equal to the destroyed Web.";const t=this.avgCreatureStats();this.bonus=this.multNug(this.buffNug(t[0],t[1],"TS"),.7),this.t=this.asqT,this.a=this.asqA}asqT(t){const i=this.crTarg(t);return i.tribe="WB",i}asqA(t,i){this.buffB(i,t.attack,t.health),this.kill(t)}bswC(){this.faction="T",this.rarity="C",this.name="Borean Stormweaver",this.iAttack=this.boof4816,this.iHealth=this.lValN([6,10,20]),this.tribe.push("GT"),this.xl=!1;const t=this.boof234;this.text=`Activate: Deal ${t} damage to a creature.`,this.bonus=this.buffNug(0,t,"TX"),this.t=this.bswT,this.a=this.bswA}bswT(t){const i=this.crTarg(t);return i.hint=["HR"],i}bswA(t,i){this.smack(t,this.boof234)}ccsC(){this.faction="N",this.rarity="C",this.name="Catacomb Spider",this.iAttack=this.boof4815,this.iHealth=this.boof51016,this.tribe.push("SP");const t=this.boof246;this.text=`Activate: Give another creature Regenerate ${t}.`,this.bonus=this.regnNug(t,"TW"),this.t=this.ccsT,this.a=this.ccsA}ccsT(t){const i=this.nmCrTarg(t);return i.canRegen=!0,i.hint=["BF"],i}ccsA(t,i){this.regn(t,this.boof246)}clordC(){this.faction="N",this.rarity="H",this.name="Contagion Lord",this.iAttack=this.boof4914,this.iHealth=this.iAttack+3,this.tribe.push("AB"),this.xl=!1,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."),this.bonus=this.multNug(this.avgSpawnNug(),.3),this.bonus.threat="TX",this.t=this.clordT,this.a=this.clordA}clordT(t){const i=this.crTarg(t);return i.player="F",i.tribe="AB",i}clordA(t,i){this.kill(t),L.freePlay(),this.anim8(i)}cswC(){this.faction="A",this.rarity="C",this.name="Cypien Shieldwarden",this.iAttack=this.boof4610,this.iHealth=this.boof61016,this.tribe.push("HM");const t=this.boof246;this.text=`Activate: Give a creature Armor ${t} this turn.`,this.bonus=this.regnNug(t,"TW"),this.t=this.cswT,this.a=this.cswA}cswT(t){const i=this.crTarg(t);return i.canArmor=!0,i.hint=["BF"],i}cswA(t,i){this.modA(t,b.modT("AR",this.boof246))}ffuC(){this.faction="T",this.rarity="H",this.name="Firefist Uranti",this.iAttack=this.boof357,this.iHealth=this.boof71116,this.tribe.push("FR","YT"),this.xl=!1,this.text=`Activate: Deal damage equal to ${this.name}'s attack to a creature.`,this.bonus=this.buffNug(0,this.iAttack,"TX"),this.t=this.ffuT,this.a=this.ffuA}ffuT(t){const i=this.crTarg(t);return i.hint=["HR"],t.attack<1&&(i.victims="???"),i}ffuA(t,i){this.smack(t,i.attack)}ffsC(){this.faction="T",this.rarity="R",this.name="Flamefury Shaman",this.iAttack=this.boof369,this.iHealth=this.boof81116,this.tribe.push("HM"),this.text=`Activate: Grant another creature ${y.jr9(this.iAttack,0)} this turn.`,this.bonus=this.buffNug(this.iAttack,0,"TW"),this.t=this.ffsT,this.a=this.ffsA}ffsT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}ffsA(t,i){this.modA(t,b.modT("AT",this.iAttack))}fssC(){this.faction="T",this.rarity="R",this.name="Flamestoke Shaman",this.iAttack=this.boof61218,this.iHealth=this.boof3712,this.tribe.push("HM"),this.text=`Activate: Grant an adjacent ${y.levelGateText(this.level)}creature Aggressive.`,this.bonus=this.regnNug(1,"TX"),this.t=this.fssT,this.a=this.fssA}fssT(t){const i=this.crTarg(t);return i.level=w.ddf2(this.level),i.lanes=t.adjacent,i.player="F",i}fssA(t,i){t.aggressive=!0,this.anim8(t)}kodC(){this.faction="N",this.rarity="L",this.name="Keeper of the Damned",this.iAttack=this.boof5815,this.iHealth=this.boof61017,this.tribe.push("ZB"),this.text=`Activate: another friendly ${y.levelGateText(this.level)}creature gets "Vengeance: Spawn this" this turn.`,this.bonus=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.kodT,this.a=this.kodA}kodT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.player="F",i}kodA(t,i){const r=t.jr4("VN",this.code);r.customCode=i.id,r.changes=!0;const n=t.jr4("PT",this.code);n.customCode=i.id,this.anim8(t)}lashC(){this.faction="U",this.rarity="L",this.name="Demara, Herald of Affliction",this.iAttack=14,this.iHealth=20,this.tribe.push("NG"),this.text="Activate: Give an enemy creature with Poison Defender.~Forge: Each enemy creature gets Poison 6.",this.bonus=this.rawNug(0,0,0,0,.1,"TW"),this.t=this.lashT,this.a=this.lashA}lashT(t){const i=this.crTarg(t);return i.player="E",i.hasPoison=!0,i.canDefender=!0,i}lashA(t,i){t.defender=!0,this.anim8(t)}mbpC(){this.faction="U",this.rarity="H",this.name="Mossbeard Patriarch",this.iAttack=this.boof137,this.iHealth=this.boof81220,this.tribe.push("PL");const t=this.boof468;this.text=`Activate: Give another creature ${y.jr9(0,t)}.`,this.bonus=this.buffNug(0,t,"TW"),this.t=this.mbpT,this.a=this.mbpA}mbpT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}mbpA(t,i){this.buffH(t,this.boof468)}mndC(){this.faction="A",this.rarity="R",this.name="Munitions Drone",this.iAttack=this.boof137,this.iHealth=this.boof6814,this.tribe.push("RB");const t=this.boof357;this.text=`Activate: Give another creature ${y.jr9(t,0)}.`,this.bonus=this.buffNug(t,0,"TX"),this.t=this.mndT,this.a=this.mndA}mndT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}mndA(t,i){this.buffA(t,this.boof357)}ncsC(){this.faction="N",this.rarity="R",this.name="Necroslime",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.xl=!1;const t=this.boof248;this.text=`Activate, deal 3 damage to another friendly creature: ${this.name} gets ${y.jr9(t,t)}.`,this.bonus=this.buffNug(t,t-3,"TS"),this.t=this.ncsT,this.a=this.ncsA}ncsT(t){const i=this.nmCrTarg(t);return i.player="F",i}ncsA(t,i){this.smack(t,3),this.buffD(i,this.boof248)}nffC(){this.faction="U",this.rarity="L",this.name="Nuada, Faith's Flourish",this.iAttack=this.boof246,this.iHealth=this.lValN([10,17,25]),this.iDefend=!0,this.tribe.push("TK"),this.xl=!1,this.hints=[this.lValH(["ZZ-1","ZZ-2","ZZ-2"])];const t=W.getCard(K.tffc(this.level));this.text=`Activate: Replace a friendly Plant with a ${y.tokName(t)}.`,this.bonus=this.multNug(this.spawnNug(t,"TX"),.5),this.t=this.nffT,this.a=this.nffA}nffT(t){const i=this.crTarg(t);return i.player="F",i.tribe="PL",i}nffA(t,i){this.replc(K.tffc(this.level),i.owner,t.lane)}orghC(){this.faction="N",this.rarity="R",this.name="Organ Harvester",this.iAttack=this.lValN([2,6,9]),this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.xl=!1,this.text=`Activate, destroy ${this.name}: Destroy a ${y.levelGateText(this.level)}creature.`,this.bonus=this.multNug(this.avgSpawnNug(),.4),this.bonus.threat="TX",this.t=this.orghT,this.a=this.orghA}orghT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.hint=["KL"],i}orghA(t,i){const r=E.tick();this.kill(t,r),this.kill(i,r)}ppmC(){this.faction="A",this.rarity="R",this.name="Palladium Pulsemage",this.iAttack=this.lValN([2,8,12]),this.iHealth=this.lValN([7,12,15]),this.tribe.push("HM"),this.text=`Activate: give a creature ${y.jr9(this.boof4812n,0)} this turn.`,this.bonus=this.buffNug(this.boof246,0,"TW"),this.t=this.ppmT,this.a=this.ppmA}ppmT(t){const i=this.crTarg(t);return i.hint=["DB","DF"],i}ppmA(t,i){this.modA(t,b.modT("AT",this.boof4812n))}pcoilC(){this.faction="U",this.rarity="R",this.name="Poisoncoil",this.iAttack=this.boof357,this.iHealth=this.boof71013,this.iDefend=!0,this.tribe.push("SN");const t=this.boof135;this.text=`Activate: Give another creature Poison ${t}.`,this.bonus=this.regnNug(t,"TX"),this.t=this.pcoilT,this.a=this.pcoilA}pcoilT(t){const i=this.nmCrTarg(t);return i.hint=["PN","DF"],i}pcoilA(t,i){t.addPoison(this.boof135)}siggyC(){this.faction="N",this.rarity="H",this.name="Sigmund Fraud",this.iAttack=this.boof357,this.iHealth=this.lValN([9,14,19]),this.iDefend=!0,this.tribe.push("AB"),this.xl=!1;const t=this.boof4812;this.text=`Activate, destroy another friendly creature: Deal ${t} damage to the enemy player and you gain ${t} health.`,this.bonus=this.playerNug(t,"TW"),this.t=this.siggyT,this.a=this.siggyA}siggyT(t){const i=this.nmCrTarg(t);return i.player="F",i}siggyA(t,i){this.kill(t);const r=this.boof4812;this.ouch(!i.owner,r),this.balm(i.owner,r),this.anim8(i)}srmdC(){this.faction="N",this.rarity="H",this.name="Sorrow Maiden",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.xl=!1,this.text=`Activate: Destroy an enemy creature with ${this.iAttack} or less attack.`,this.bonus=this.multNug(this.avgSpawnNug(),.4),this.bonus.threat="TX",this.t=this.srmdT,this.a=this.srmdA}srmdT(t){const i=this.crTarg(t);return i.player="E",i.maxAttack=this.iAttack,i}srmdA(t,i){this.kill(t)}sfgdC(){this.faction="A",this.rarity="L",this.name="Sparky, Forge Guard Dog",this.iAttack=this.lValN([4,10,14]),this.iHealth=this.lValN([5,11,16]),this.tribe.push("RB","GD"),this.xl=!1;const t=this.lValS(["level 2 Sparky","level 3 Sparky","25/25 Forge Guardian Omega"]);this.text=`Activate, destroy Sparky and another friendly ${this.level===3?"level 3 ":""}Sparky: Spawn a ${t}.`,this.bonus=this.playerNug(5,"TW"),this.t=this.sfgdT,this.a=this.sfgdA}sfgdT(t){const i=this.nmCrTarg(t);return i.cardCode="SFG",this.level===3&&(i.level="L3"),i}sfgdA(t,i){const r=E.tick();this.kill(t,r),this.kill(i,r);const n=this.lValS(["SFG"+"2","SFG"+"3","FGO"+"1"]);this.spawn(n,i.owner)}ssaC(){this.faction="N",this.rarity="H",this.name="Spitesower Acolyte",this.iAttack=this.boof234,this.iHealth=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 ${y.jr9(t,t)}.`,this.bonus=this.buffNug(-t,0,"TX"),this.t=this.ssaT,this.a=this.ssaA}ssaT(t){const i=this.crTarg(t);return i.hint=["DB","BB"],i}ssaA(t,i){const r=this.boof246n,n=E.tick();this.smack(i,-r,n),this.buffD(t,r,n)}swmC(){this.faction="A",this.rarity="R",this.name="Steelwelder Medic",this.iAttack=this.lValN([3,5,13]),this.iHealth=this.boof61014,this.tribe.push("HM"),this.text=`Activate: Give another creature Armor ${this.level}.`,this.bonus=this.regnNug(this.level,"TW"),this.t=this.swmT,this.a=this.swmA}swmT(t){const i=this.nmCrTarg(t);return i.canArmor=!0,i.hint=["BF","BB"],i}swmA(t,i){t.addArmor(this.level)}ucmC(){this.faction="T",this.rarity="R",this.name="Uranti Cryomancer",this.iAttack=this.boof247,this.iHealth=this.lValN([8,13,17]),this.tribe.push("IC","YT"),this.xl=!1;const t=this.boof135;this.text=`Activate: Deal ${t} damage to a creature.`,this.bonus=this.buffNug(0,t,"TW"),this.t=this.ucmT,this.a=this.ucmA}ucmT(t){const i=this.crTarg(t);return i.hint=["HR"],i}ucmA(t,i){this.smack(t,this.boof135)}uimC(){this.faction="T",this.rarity="C",this.name="Uranti Icemage",this.iAttack=this.boof259,this.iHealth=this.lValN([8,13,20]),this.tribe.push("IC","YT"),this.text="Activate: Negate Defender from a creature this turn.",this.bonus=this.regnNug(1,"TW"),this.t=this.uimT,this.a=this.uimA}uimT(t){const i=this.crTarg(t);return i.hasDefender=!0,i.hint=["BB"],i}uimA(t,i){this.modA(t,b.modT("ND",!0))}warmC(){this.faction="A",this.rarity="H",this.name="War Merchant",this.iAttack=this.boof468,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("HM");const t=this.level===3?this.iAttack:0;this.text=`Activate: Give a creature in a center lane ${y.jr9(this.iAttack,t)}.`,this.bonus=this.multNug(this.buffNug(this.iAttack,t,"TX"),.5),this.t=this.warmT,this.a=this.warmA}warmT(t){const i=this.crTarg(t);return i.lanes=3,i.hint=["BF","BB"],i}warmA(t,i){this.buffB(t,this.iAttack,this.level===3?this.iAttack:0)}wwrC(){this.faction="U",this.rarity="C",this.name="Weirwood Ranger",this.iAttack=this.boof51015,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.text=`Activate: Give another creature ${y.jr9(this.level,this.level)}.`,this.bonus=this.buffNug(this.level,this.level,"TW"),this.t=this.wwrT,this.a=this.wwrA}wwrT(t){const i=this.nmCrTarg(t);return i.hint=["BF"],i}wwrA(t,i){this.buffD(t,this.level)}wfsC(){this.faction="N",this.rarity="H",this.name="Witherfrost Succubus",this.iAttack=this.boof147,this.iHealth=this.boof61018,this.tribe.push("DM");const t=this.boof357;this.text=`Activate: Give a creature ${y.jr9(-t,-t)} this turn.`,this.bonus=this.buffNug(t,t,"TX"),this.t=this.wfsT,this.a=this.wfsA}wfsT(t){const i=this.crTarg(t);return i.hint=["DB","DF"],i}wfsA(t,i){const r=-this.boof357;this.modA(t,b.modT("AT",r)),this.modA(t,b.modT("HL",r)),this.modA(t,b.modT("MH",r))}shambC(){this.faction="N",this.rarity="L",this.name="Xithian Shambler",this.iAttack=this.boof369,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.xl=!1;let t="";this.level===3&&(t="~You may use this ability twice per turn."),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.bonus=this.rawNug(0,0,0,0,this.lValN([.6,1.2,2.2]),"TS"),this.t=this.shambT,this.a=this.shambA}shambT(t){const i=b.crFriendActTarg("CARD",this.code,t.id);return i.lanes=t.adjacent,i}shambA(t,i){const r=t.attack,n=t.health;this.kill(t),this.lurk(i,t.lane),this.buffB(i,r,n)}zpmC(){this.faction="T",this.rarity="R",this.name="Zephyr Mage",this.iAttack=this.boof4813,this.iHealth=this.boof61017,this.tribe.push("WN","AS"),this.text=`Activate: Give another ${y.levelGateText(this.level)}creature Mobility ${this.level}.`,this.bonus=this.regnNug(this.level,"TW"),this.t=this.zpmT,this.a=this.zpmA}zpmT(t){const i=this.nmCrTarg(t);return i.level=w.ddf2(this.level),i.canMove=!0,i.hint=["BF","BB"],i}zpmA(t,i){this.wings(t,this.level)}}class bi extends P{cons(t){({["CMF"]:()=>this.aconC(),["FLH"]:()=>this.flhC(),["TBB"]:()=>this.tbbC()})[t]()}playTarg;optional=!1;ftext="";constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode()),this.text="Assault: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("AS");return n.interactive=!0,r}handleAction(t){this.f(p.ddf6(t),p.jr5(t.param)),T.actionDone(!0)}jr8(t){const i=w.toActions(this.playTarg);i.length>0?(i.forEach(r=>{r.param=t.creatId}),this.optional&&i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}aconC(){this.faction="N",this.rarity="R",this.name="Calamity Fiend",this.iAttack=this.boof4814,this.iHealth=this.boof51016,this.tribe.push("DM");const t=-this.boof234;this.addSp("U",t),this.playTarg.player="E",this.ftext=`Give an enemy creature ${y.jr9(t,t)}.`,this.f=this.aconF}aconF(t,i){this.logAct(!1,t),this.buffD(t,-this.boof234)}flhC(){this.faction="T",this.rarity="C",this.name="Firelight Hunter",this.iAttack=this.boof468,this.iHealth=this.iAttack-2,this.tribe.push("HM"),this.playTarg.player="E",this.addSp("D",this.iAttack),this.ftext=`Deal ${this.iAttack} to an enemy creature.`,this.f=this.flhF}flhF(t,i){this.smack(t,this.iAttack)}tbbC(){this.faction="T",this.rarity="R",this.name="Totembound Berserker",this.iAttack=this.boof81318,this.iHealth=this.boof2410,this.tribe.push("GT"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.optional=!0,this.ftext=`You may move an enemy ${y.levelGateText(this.level)}creature to the space opposing ${this.name}.`,this.f=this.tbbF}tbbF(t,i){i.opposed||(this.logAct(!1,t),this.lurk(t,p.oppositeLane(i.lane)))}}class mt extends P{cons(t){({["ABM"]:()=>this.mawC(),["AGC"]:()=>this.aconC(),["BTI"]:()=>this.binvC(),["BSR"]:()=>this.bsrC(),["BAW"]:()=>this.bawC(),["CKB"]:()=>this.cacC(),["CHA"]:()=>this.chaC(),["CCR"]:()=>this.ccC(),["DRS"]:()=>this.drsC(),["DSE"]:()=>this.dseC(),["DSA"]:()=>this.dsaC(),["DGS"]:()=>this.drslC(),["FRI"]:()=>this.friC(),["FRV"]:()=>this.freavC(),["FLC"]:()=>this.flcC(),["GLF"]:()=>this.gfiendC(),["GRW"]:()=>this.grwC(),["GHT"]:()=>this.grhC(),["MMH"]:()=>this.houndC(),["MXW"]:()=>this.mtxC(),["NGB"]:()=>this.ngbC(),["POA"]:()=>this.poaC(),["PHS"]:()=>this.phxsC(),["RWD"]:()=>this.rotC(),["SHY"]:()=>this.schyC(),["STD"]:()=>this.stdC(),["SIX"]:()=>this.sdxC(),["SEV"]:()=>this.surzC(),["VNF"]:()=>this.vnfC(),["WBY"]:()=>this.wbyC(),["WBU"]:()=>this.wbuC(),["XDH"]:()=>this.dogsC()})[t]()}playTarg;optional=!1;notme=!1;ftext="";forges=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode()),this.forges&&(this.text="Forge: "+this.ftext),this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);if(this.forges){const n=r.jr4("FR");n.interactive=!0}return r}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="CKB"}handleAction(t){this.f(p.ddf6(t),p.jr5(t.param)),T.actionDone(!0)}jr8(t){const i=this.cardCode();if(t.trigger.type==="TS"&&i==="CKB"){this.logAct(!1),L.freePlay();const n=t.event,c=k.toPlayer(n.playerA),f=b.trigIdx(c.triggers,t.trigger);f>-1&&c.triggers.splice(f,1),x.triggerDone();return}if(i==="ABM"){const n=b.crFriendNotMeTarg(t.creatId);if(n.tribe="AB",p.creatByTarget(n).length===0){x.triggerDone();return}}if(i==="POA"&&!L.patron("A")){x.triggerDone();return}if((i==="DRS"||i==="DSE"||i==="DSA")&&this.dfbuff(t.creatId)===0){x.triggerDone();return}this.notme&&(this.playTarg.notMe=t.creatId);const r=w.toActions(this.playTarg);r.length>0?(r.forEach(n=>{n.param=t.creatId}),this.optional&&r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}dfbuff(t){const i=b.crFriendNotMeTarg(t);return i.tribe="DF",this.boof234*p.creatByTarget(i).length}mawC(){this.faction="N",this.rarity="C",this.name="Abyssal Maw",this.iAttack=this.boof4610,this.iHealth=this.iAttack,this.tribe.push("AB"),this.playTarg.player="E";const t=-this.boof359;this.ftext=`If there is another friendly Abomination, give an enemy creature ${y.jr9(t,t)}.`,this.f=this.mawF}mawF(t,i){this.logAct(!1,t),this.buffD(t,-this.boof359)}aconC(){this.faction="A",this.rarity="C",this.name="Aegis Conscript",this.iAttack=this.boof3612,this.iHealth=this.boof6915,this.tribe.push("HM"),this.playTarg.canArmor=!0,this.playTarg.player="F",this.ftext=`Give a friendly creature Armor ${this.boof124}.`,this.f=this.aconF}aconF(t,i){this.logAct(!1,t),t.addArmor(this.boof124)}binvC(){this.faction="A",this.rarity="C",this.name="Battletech Inventor",this.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("MM"),this.playTarg.player="E",this.ftext=`Give an enemy creature ${y.jr9(-this.iAttack,0)}.`,this.f=this.binvF}binvF(t,i){this.logAct(!1,t),this.buffA(t,-this.iAttack)}bsrC(){if(this.faction="N",this.rarity="R",this.name="Bonescythe Reaver",this.iAttack=this.boof5813,this.iHealth=this.boof3712,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.playTarg.level=w.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy an enemy ${y.levelGateText(t)}creature.`,this.optional=!0}else this.hints=["LG"];this.f=this.bsrF}bsrF(t,i){this.kill(t)}bawC(){this.faction="U",this.rarity="R",this.name="Brambleaxe Warrior",this.iAttack=this.boof61014,this.iHealth=this.iAttack-4,this.tribe.push("HM"),this.playTarg.hint=["BF"],this.ftext="Give a creature Breakthrough this turn.",this.f=this.bawF}bawF(t,i){this.logAct(!1,t),this.modA(t,b.modT("BT",!0))}cacC(){this.faction="N",this.rarity="H",this.name="Cacklebones",this.iAttack=this.boof5915,this.iHealth=this.iAttack-this.level,this.tribe.push("SK"),this.playTarg.level=w.ddf2(this.level),this.playTarg.player="E",this.ftext=`Destroy an enemy ${y.levelGateText(this.level)}creature. If you do, the enemy player may play an additional card next turn.`,this.optional=!0,this.f=this.cacF}cacF(t,i){this.kill(t),k.addTr(t.owner,b.trigger("TS",this.code))}chaC(){this.faction="U",this.rarity="R",this.name="Chistlehearth Archer",this.iAttack=this.boof2510,this.iHealth=this.iAttack+7,this.tribe.push("HM");const t=this.boof4816;this.playTarg.player="E",this.playTarg.hasMobility=!0,this.ftext=`Deal ${t} damage to an enemy creature with Mobility. Negate Mobility from that creature.`,this.f=this.chaF}chaF(t,i){this.smack(t,this.boof4816),t.negateMobility=!0}ccC(){this.faction="N",this.rarity="C",this.name="Corpse Crawler",this.iAttack=this.boof81220,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.hints=[this.lValH(["ZZ-1","ZZ-2","ZZ-5"])],this.playTarg.player="F",this.ftext="Destroy a friendly creature.",this.f=this.ccF}ccF(t,i){this.kill(t)}drsC(){this.faction="U",this.rarity="C",this.name="Darkroot Shambler",this.iHealth=this.lValN([2,6,7]),this.iAttack=this.iHealth*2,this.tribe.push("DF","PL"),this.level===2&&(this.hints=["LB"]),this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature ${y.jr9(0,t)} for each other friendly Darkforged.`,this.f=this.drsF}drsF(t,i){this.logAct(!1,t),this.buffH(t,this.dfbuff(i.id))}dseC(){this.faction="A",this.rarity="C",this.name="Darksteel Enforcer",this.iAttack=this.boof468,this.iHealth=this.iAttack+2,this.tribe.push("DF","RB"),this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature ${y.jr9(t,0)} for each other friendly Darkforged.`,this.f=this.dseF}dseF(t,i){this.logAct(!1,t),this.buffA(t,this.dfbuff(i.id))}dsaC(){this.faction="T",this.rarity="C",this.name="Darkstone Asir",this.iAttack=this.boof2410,this.iHealth=this.iAttack*2,this.tribe.push("DF","AS"),this.playTarg.player="E";const t=this.boof234;this.ftext=`Deal ${t} damage to an enemy creature for each other friendly Darkforged.`,this.f=this.dsaF}dsaF(t,i){this.smack(t,this.dfbuff(i.id))}drslC(){this.faction="U",this.rarity="H",this.name="Dragon Slayer",this.iAttack=this.boof81220,this.iHealth=this.boof4610,this.tribe.push("HM"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.playTarg.tribe="DG",this.ftext=`Destroy an enemy ${y.levelGateText(this.level)}Dragon.`,this.f=this.drslF}drslF(t,i){this.kill(t)}friC(){this.faction="T",this.rarity="C",this.name="Flamerift Instigator",this.iAttack=this.boof71217,this.iHealth=this.iAttack-5,this.tribe.push("GT"),this.ftext="Negate Defender from a creature.",this.f=this.friF}friF(t,i){this.logAct(!1,t),t.negDefend("T")}freavC(){if(this.faction="N",this.rarity="H",this.name="Fleshreaver",this.iAttack=this.boof6915,this.iHealth=this.boof235,this.tribe.push("AB"),this.forges=this.level>1,this.forges){const t=this.level-1;this.consistent=!0,this.playTarg.level=w.ddf2(t),this.playTarg.player="E",this.ftext=`You may destroy a ${y.levelGateText(t)}enemy creature.`,this.optional=!0}else this.hints=["LG"];this.f=this.freavF}freavF(t,i){this.kill(t)}flcC(){this.faction="A",this.rarity="L",this.name="Frontline Combatant",this.iAttack=this.boof4612,this.iHealth=this.iAttack,this.iArmor=this.iAttack,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="E",this.ftext=`You may have ${this.name} deal damage equal to its Armor to an enemy creature. If you do, that creature deals damage equal to its attack back to ${this.name}.`,this.f=this.flcF}flcF(t,i){const r=E.tick(),n=t.attack;this.smack(t,i.armor,r),i.hurtDirect(n,t.code,this.faction,r)}get fiendBof(){return this.lValN([-1,-2,-5])}gfiendC(){this.faction="N",this.rarity="C",this.name="Gloomfiend",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("AB"),this.playTarg.player="E";const t=this.fiendBof;this.ftext=`You may give an enemy creature ${y.jr9(t,t)}.`,this.optional=!0,this.f=this.gfiendF}gfiendF(t,i){this.logAct(!1,t),this.buffD(t,this.fiendBof)}grwC(){this.faction="N",this.rarity="C",this.name="Gloomreaper Witch",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("HM");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,this.f=this.grwF}grwF(t,i){this.kill(t)}grhC(){this.faction="U",this.rarity="C",this.name="Grove Huntress",this.iAttack=this.boof4711,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.playTarg.player="F";const t=this.boof135;this.ftext=`Give a friendly creature ${y.jr9(t,t)}.`,this.f=this.grhF}grhF(t,i){this.logAct(!1,t),this.buffD(t,this.boof135)}houndC(){this.faction="T",this.rarity="C",this.name="Magma Hound",this.iAttack=this.boof4813,this.iHealth=this.iAttack-1,this.tribe.push("ER","EL");const t=this.boof246;this.optional=!0,this.playTarg.player="E",this.ftext=`You may deal ${t} damage to an enemy creature.`,this.f=this.houndF}houndF(t,i){this.smack(t,this.boof246)}mtxC(){this.faction="A",this.rarity="C",this.name="Matrix Warden",this.iAttack=this.lValN([3,8,12]),this.iHealth=this.iAttack,this.tribe.push("RB");const t=this.boof3510;this.playTarg.player="F",this.ftext=`Give a friendly creature ${y.jr9(t,0)}.`,this.f=this.mtxF}mtxF(t,i){this.logAct(!1,t),this.buffA(t,this.boof3510)}ngbC(){this.faction="T",this.rarity="C",this.name="Nargath Bruiser",this.iAttack=this.boof5814,this.iHealth=this.iAttack-1,this.tribe.push("ER","AS");const t=this.boof248;this.playTarg.player="F",this.ftext=`Give a friendly creature ${y.jr9(0,t)}.`,this.f=this.ngbF}ngbF(t,i){this.logAct(!1,t),this.buffH(t,this.boof248)}poaC(){this.faction="A",this.rarity="H",this.name="Patron of Anvillon",this.iAttack=this.boof369,this.iHealth=this.boof71117,this.tribe.push("CY"),this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["BF"],this.ftext=`If you have three or more Alloyin cards in your hand, give a ${y.levelGateText(this.level)}creature 2x attack.`,this.f=this.poaF}poaF(t,i){this.logAct(!1,t),this.buffA(t,t.attack)}phxsC(){this.faction="A",this.rarity="R",this.name="Phalanx Squadron",this.iAttack=this.boof3714,this.iHealth=this.boof61117,this.tribe.push("HM"),this.playTarg.hasArmor=!0,this.playTarg.player="F";const t=this.boof234;this.ftext=`Give a friendly creature with Armor ${y.jr9(t,t)}.`,this.f=this.phxsF}phxsF(t,i){this.logAct(!1,t),this.buffD(t,this.boof234)}rotC(){this.faction="N",this.rarity="C",this.name="Rot Wanderer",this.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.playTarg.maxAttack=this.iAttack,this.playTarg.player="E",this.ftext=`Destroy an enemy creature with ${this.iAttack} or less attack.`,this.f=this.rotF}rotF(t,i){this.kill(t)}schyC(){this.faction="N",this.rarity="C",this.name="Scourge Hydra",this.iAttack=this.boof71117,this.iHealth=this.iAttack,this.tribe.push("HY"),this.playTarg.player="F",this.ftext="Deal 3 damage to a friendly creature.",this.f=this.schyF}schyF(t,i){this.smack(t,3)}stdC(){this.faction="A",this.rarity="H",this.name="Shardthief Druid",this.iAttack=this.boof5813,this.iHealth=this.boof81318,this.tribe.push("MM"),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.f=this.stdF}stdF(t,i){this.logAct(!1,t);const r=t.regen;t.negateRegen=!0,this.regn(i,r)}sdxC(){this.faction="A",this.rarity="R",this.name="Stasis Indexer",this.iAttack=this.boof369,this.iHealth=this.boof71118,this.tribe.push("MM"),this.playTarg.level=w.ddf2(this.level),this.playTarg.canDefender=!0,this.ftext=`Give a ${y.levelGateText(this.level)}creature Defender until the end of the enemy player's next turn.`,this.f=this.sdxF}sdxF(t,i){const r=b.mod("DF",!0);r.expiry="EN",this.modA(t,r)}surzC(){this.faction="N",this.rarity="L",this.name="Suruzal, Emissary of Varna",this.iAttack=this.boof4814,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.optional=!0,this.playTarg.player="F",this.playTarg.level=w.ddf2(this.level),this.notme=!0,this.ftext=`You may destroy another friendly ${y.levelGateText(this.level)}creature. If you do, spawn a copy of it.`,this.f=this.surzF}surzF(t,i){const r=E.tick();this.kill(t,r),this.spawn(t.code,i.owner,r)}vnfC(){this.faction="U",this.rarity="R",this.name="Venomfang",this.iAttack=this.boof61014,this.iHealth=this.iAttack-2,this.tribe.push("SN");const t=this.boof246;this.playTarg.player="E",this.ftext=`Give an enemy creature Poison ${t}.`,this.f=this.vnfF}vnfF(t,i){this.logAct(!1,t),t.addPoison(this.boof246)}wbyC(){this.faction="T",this.rarity="R",this.name="Wallbreaker Yeti",this.iAttack=this.boof4712,this.iHealth=this.boof71116,this.tribe.push("ER","YT"),this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.playTarg.hasDefender=!0,this.ftext=`You may destroy a ${y.levelGateText(this.level)}enemy creature with Defender.`,this.optional=!0,this.f=this.wbyF}wbyF(t,i){this.kill(t)}wbuC(){this.faction="T",this.rarity="C",this.name="Warbringer Uranti",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("LT","YT");const t=this.boof4812;this.notme=!0,this.playTarg.player="F",this.addSp("A",t),this.ftext=`Give another friendly creature ${y.jr9(t,0)} this turn.`,this.f=this.wbuF}wbuF(t,i){this.logAct(!1,t),this.modA(t,b.modT("AT",this.boof4812))}dogsC(){this.faction="N",this.rarity="R",this.name="Xithian Direhound",this.iAttack=4,this.iHealth=4,this.tribe.push("AB"),this.overload=!0,this.maxLevel=1,this.optional=!0,this.playTarg.player="E",this.ftext=`You may give an enemy creature ${y.jr9(-4,-4)}.`,this.f=this.dogsF}dogsF(t,i){this.logAct(!1,t),this.buffD(t,-4)}}class $ extends vt{cons(t){({["AGW"]:()=>this.awingC(),["ASG"]:()=>this.asurgeC(),["ATZ"]:()=>this.anatC(),["AVB"]:()=>this.anvbC(),["AQE"]:()=>this.aqatC(),["AOP"]:()=>this.armoC(),["BFT"]:()=>this.bftC(),["BZH"]:()=>this.bzhC(),["BBR"]:()=>this.bbrC(),["BBD"]:()=>this.bbdC(),["BBL"]:()=>this.bblC(),["BBN"]:()=>this.bbnC(),["BTM"]:()=>this.botC(),["BLP"]:()=>this.btpC(),["CHT"]:()=>this.chatC(),["CSU"]:()=>this.csurgeC(),["CNT"]:()=>this.ctmsC(),["CTW"]:()=>this.cullC(),["CTV"]:()=>this.cultC(),["CAG"]:()=>this.cypaC(),["CBS"]:()=>this.cypbC(),["DPO"]:()=>this.dpsC(),["DDF"]:()=>this.dendC(),["DBT"]:()=>this.dreadC(),["DYF"]:()=>this.dyinC(),["ETN"]:()=>this.elnC(),["ENP"]:()=>this.enpC(),["ENR"]:()=>this.rageC(),["EFA"]:()=>this.efauC(),["EXD"]:()=>this.expdmC(),["FIN"]:()=>this.feralC(),["FOR"]:()=>this.fitrC(),["FJT"]:()=>this.fjetC(),["FLN"]:()=>this.flncC(),["FFL"]:()=>this.ffldC(),["FZS"]:()=>this.frozC(),["GTH"]:()=>this.ghastC(),["GCR"]:()=>this.crushC(),["HAR"]:()=>this.hartC(),["IFR"]:()=>this.izftC(),["JPK"]:()=>this.jpC(),["LBR"]:()=>this.lbrandC(),["LYS"]:()=>this.shartC(),["MMY"]:()=>this.maggyC(),["MPH"]:()=>this.morphC(),["MSC"]:()=>this.sculptC(),["NNS"]:()=>this.nanoC(),["NSL"]:()=>this.natselC(),["NCF"]:()=>this.nflayC(),["NCV"]:()=>this.nviveC(),["NDY"]:()=>this.ntdcC(),["OEX"]:()=>this.oexpC(),["OSS"]:()=>this.orssC(),["PTR"]:()=>this.pwtorC(),["PSG"]:()=>this.psurgeC(),["PMS"]:()=>this.pslamC(),["PMP"]:()=>this.pummC(),["RPR"]:()=>this.rpsC(),["SAP"]:()=>this.sapC(),["SVO"]:()=>this.soathC(),["SOC"]:()=>this.scythC(),["SOA"]:()=>this.soaC(),["SOD"]:()=>this.sodC(),["SOT"]:()=>this.sotC(),["SHG"]:()=>this.shgrC(),["SNB"]:()=>this.snbC(),["SHV"]:()=>this.sharvC(),["SRP"]:()=>this.sreapC(),["STR"]:()=>this.sttorC(),["STO"]:()=>this.sptorC(),["SOV"]:()=>this.sovC(),["STN"]:()=>this.stbrnC(),["STP"]:()=>this.ssperC(),["SIN"]:()=>this.sinC(),["TGL"]:()=>this.tanglC(),["TPT"]:()=>this.tpactC(),["TUP"]:()=>this.tugC(),["TOT"]:()=>this.totsC(),["TXB"]:()=>this.txbnC(),["TXS"]:()=>this.sporeC(),["TCG"]:()=>this.tremcC(),["URS"]:()=>this.urstC(),["VSK"]:()=>this.vensC(),["VGR"]:()=>this.vgraC(),["VSP"]:()=>this.vrdsC(),["VTR"]:()=>this.vrshC(),["VGL"]:()=>this.vglchC(),["VYE"]:()=>this.vembC(),["UBL"]:()=>this.uboltC(),["WMM"]:()=>this.warC(),["XRW"]:()=>this.xwillC()})[t]()}playTarg;xl=!0;constructor(t){super(t),this.playTarg=b.crActTarg("CARD",this.code,""),this.cons(this.cardCode())}z;canPlay(){const t=this.cardCode();if(t==="NSL"&&p.ddf1().length<5)return!1;const i=t==="FOR"?this.fitTarg():this.playTarg;return p.creatByTarget(i).length>0}playTargets(){return this.cardCode()==="FOR"?[this.fitTarg()]:[this.playTarg]}handleAction(t){const i=p.ddf6(t);this.logSpell(this.xl?i:void 0),this.z(i),T.spellCast()}ddf8(t){const i=Wt.extractCardCode(t.trigger.logicCode);if(i==="OEX"&&t.trigger.type==="DM"){const r=t.event;return r.battle&&!r.isCreatTarg&&r.isCreatSrc&&r.srcId===t.creatId}else if((i==="FZS"||i==="IFR")&&t.trigger.type==="DM"){const r=t.event;if(r.isCreatTarg&&r.target===t.creatId)return!0}else if(i==="NDY"&&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=Wt.extractCardCode(t.trigger.logicCode);if(i==="FZS"||i==="IFR"&&t.trigger.type==="DM"){const r=p.creatByTr(t);r.status==="A"&&this.kill(r)}else if(i==="SHG"){if(t.trigger.type==="VN")this.spawn(p.jr5(t.event.creatId).code,t.owner);else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="IFR"&&t.trigger.type==="PT"){const r=S.deTil(t.trigger.customCode),n=r[1],c=p.creatByTr(t);if(r[0]==="P2"){const f=b.trigIdx(c.triggers,t.trigger);c.triggers[f].customCode=S.enTil("P1",n)}else{const f=c.triggers.find(m=>m.customCode===n);f&&c.removeTrigger(f),c.removeTrigger(t.trigger)}}else if(i==="OEX"){if(t.trigger.type==="DM"){const r=t.event,n=p.qEnemyCreats(),c=n.length,f=E.tick();let m;c>0&&(this.level===1?m=[n[S.randInt(0,c)]]:this.level===2?(m=n.splice(S.randInt(0,c),1),n.length>0&&m.push(n[S.randInt(0,c-1)])):m=n,m.forEach(C=>C.hurtDirect(r.dmg,this.code,"T",f)))}else if(t.trigger.type==="PT"){const r=t.trigger.customCode,n=p.creatByTr(t);n.triggers.filter(f=>f.customCode===r).forEach(f=>n.removeTrigger(f))}}else if(i==="NDY"){const r=p.creatByTr(t);r.status==="A"&&(this.logAct(!1,r),this.buffD(r,this.ndcbuf))}else super.jr8(t);x.triggerDone()}rankT(){return`If you are rank ${this.level+1} or higher`}icaf(t){return`. If that creature is ${y.factionText(t)}, `}formFun(t){if(!(t.lane===1||t.lane===5)){const i=b.crTarg();i.player=k.toTarget(t.owner),i.lanes=t.adjacent;const r=p.creatByTarget(i);if(r.length===2)return r}return[]}awingC(){this.faction="A",this.rarity="R",this.name="Aegis Wings",this.text=`Give a creature ${y.jr9(this.boof369,0)}. Then if that creature has the highest attack, it also gets Mobility 1 and Armor ${this.boof246}.`,this.playTarg.hint=["BF"],this.z=this.awingZ}awingZ(t){this.buffA(t,this.boof369);const i=t.attack;p.qActiveCreats().every(r=>r.attack<=i)&&(this.wings(t,1),t.addArmor(this.boof246))}asurgeC(){this.faction="T",this.rarity="R",this.name="Aerial Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.canMove=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Mobility ${this.level}.`,this.z=this.asurgeZ}asurgeZ(t){this.wings(t,this.level)}anatC(){this.faction="A",this.rarity="C",this.name="Anatomize",this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(-this.boof4816,0)}.~You may play an additional ${this.name} this turn.`,this.z=this.anatZ}anatZ(t){this.buffA(t,-this.boof4816);const i=L.freeCard(this.code);i.condition.cardCode="ATZ"}anvbC(){this.faction="A",this.rarity="T",this.name="Anvilbreaker",this.free=!0,this.maxLevel=1,this.playTarg.player="E",this.text=`Give an enemy creature ${y.jr9(-2,0)}, then move it to another available lane at random.`,this.z=this.anvbZ}anvbZ(t){this.buffA(t,-2),p.fling(t,"A")}aqatC(){this.faction="T",this.rarity="C",this.name="Aquatic Embrace",this.text=`Give a creature ${y.jr9(0,this.boof51015)}.`,this.playTarg.hint=["BF"],this.z=this.aqatZ}aqatZ(t){this.buffH(t,this.boof51015)}armoC(){this.faction="A",this.rarity="R",this.name="Armory Outpost",this.playTarg.player="F";const t=y.jr9(this.boof4610,0);this.text=`Give a friendly creature ${t}. If it is in Formation, give the adjacent creatures ${t} as well.`,this.z=this.armoZ}armoZ(t){const i=this.boof4610;this.formFun(t).concat(t).forEach(r=>this.buffA(r,i))}bftC(){this.faction="N",this.rarity="C",this.name="Bitterfrost Totem";const t=this.boof4812n;this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(t,t)}. ${this.rankT()}, it gets an additional ${y.jr9(-2,-2)}.`,this.z=this.bftZ}bftZ(t){const i=this.boof4812n-(k.getActive().rank>this.level?2:0);this.buffD(t,i)}get bhos(){return this.lValN([6,9,20])}bzhC(){this.faction="T",this.rarity="H",this.name="Blazing Hostility";const t=this.bhos;this.playTarg.player="E",this.text=`Deal ${t} damage to an enemy creature${this.icaf("N")}deal ${t} damage to the enemy player as well.`,this.z=this.bzhZ}bzhZ(t){const i=this.bhos;this.smack(t,i),t.faction==="N"&&this.ouch(t.owner,i)}blod(){return L.deathsA.length>0||L.deathsB.length>0}bbrC(){this.faction="A",this.rarity="C",this.name="Blood Barrier";const t=this.boof234;this.text=`Give a creature Armor ${t}.~If a creature was destroyed this turn, it gets an additional Armor ${t}.`,this.playTarg.hint=["BF"],this.playTarg.canArmor=!0,this.z=this.bbrZ}bbrZ(t){const i=this.boof234;t.addArmor(i),this.blod()&&t.addArmor(i)}bbdC(){this.faction="N",this.rarity="C",this.name="Blood Bindings";const t=this.boof369n,i=y.jr9(t,t);this.text=`Give a creature ${i}.~If a creature was destroyed this turn, it gets an additional ${i}.`,this.playTarg.hint=["DB"],this.z=this.bbdZ}bbdZ(t){const i=this.boof369n;this.buffD(t,i),this.blod()&&this.buffD(t,i)}bblC(){this.faction="T",this.rarity="C",this.name="Blood Boil";const t=this.boof5610;this.text=`Deal ${t} damage to a creature.~If a creature was destroyed this turn, deal an additional ${t} damage to that creature.`,this.playTarg.hint=["HR"],this.z=this.bblZ}bblZ(t){const i=this.boof5610,r=E.tick();this.smack(t,i,r),this.blod()&&this.smack(t,i,r)}bbnC(){this.faction="U",this.rarity="C",this.name="Blood Boon";const t=this.boof347,i=y.jr9(t,t);this.text=`Give a creature ${i}.~If a creature was destroyed this turn, it gets an additional ${i}.`,this.playTarg.hint=["BF"],this.z=this.bbnZ}bbnZ(t){const i=this.boof347;this.buffD(t,i),this.blod()&&this.buffD(t,i)}botC(){this.faction="U",this.rarity="H",this.name="Botanimate",this.xl=!1,this.text=`Replace an enemy ${y.levelGateText(this.level)}creature with a 3/3 Sapling.`,this.playTarg.player="E",this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.botZ}botZ(t){this.replc(`${"BOS"}${this.level}`,t.owner,t.lane)}btpC(){this.faction="U",this.rarity="H",this.name="Bottomless Puncture",this.playTarg.player="E",this.text=`Give an enemy creature Poison ${this.boof369}${this.icaf("T")}give the enemy player Poison ${this.level} as well.`,this.z=this.btpZ}btpZ(t){t.addPoison(this.boof369),t.faction==="T"&&k.addPoison(t.owner,this.level)}chatC(){this.faction="T",this.rarity="R",this.name="Chaos Twister",this.playTarg.player="E";const t=`eal ${this.boof6810} damage to `;this.text=`D${t}an enemy creature. If it is in Formation, d${t}the adjacent creatures as well.`,this.z=this.chatZ}chatZ(t){const i=this.boof6810,r=E.tick();this.formFun(t).concat(t).forEach(n=>this.smack(n,i,r))}csurgeC(){this.faction="N",this.rarity="R",this.name="Contagion Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]);const t=this.boof123n;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["DB"],this.z=this.csurgeZ}csurgeZ(t){this.buffD(t,this.boof123n)}ctmsC(){this.faction="A",this.rarity="R",this.name="Countermeasure";const t=this.boof4816;this.text=`Give an enemy creature ${y.jr9(-t,0)}, or give a friendly creature ${y.jr9(t,0)}.`,this.z=this.ctmsZ}ctmsZ(t){const i=this.boof4816;t.owner===k.activeA?this.buffA(t,i):this.buffA(t,-i)}cullC(){this.faction="N",this.rarity="C",this.name="Cull the Weak",this.xl=!1;const t=this.boof4814;this.text=`Destroy a creature with ${t} or less attack.`,this.playTarg.maxAttack=t,this.playTarg.hint=["KL"],this.level<3&&(this.hints=["LG"]),this.z=this.cullZ}cullZ(t){this.kill(t)}cultC(){this.faction="U",this.rarity="H",this.name="Cultivate",this.xl=!1;const t=W.getCard(K.tffc(this.level));this.text=`Replace a friendly Plant with a ${y.tokName(t)}.`,this.playTarg.player="F",this.playTarg.tribe="PL",this.level<3&&(this.hints=["LG"]),this.z=this.cultZ}cultZ(t){this.replc(K.tffc(this.level),t.owner,t.lane)}cypaC(){this.faction="A",this.rarity="R",this.name="Cypien Augmentation",this.free=this.level>1,this.level===1&&(this.hints=["LG"]);const t=this.boof246;this.text=`Give a creature in a center lane ${y.jr9(t,t)}.`,this.playTarg.lanes=3,this.playTarg.hint=["BF"],this.z=this.cypaZ}cypaZ(t){this.buffD(t,this.boof246)}cypbC(){this.faction="A",this.rarity="C",this.name="Cypien Battlesuit",this.text=`Give an Alloyin creature ${y.jr9(this.boof51015,0)} and Armor ${this.boof124}.`,this.playTarg.hint=["BF"],this.playTarg.faction="A",this.z=this.cypbZ}cypbZ(t){this.buffA(t,this.boof51015),t.addArmor(this.boof124)}dpsC(){this.faction="N",this.rarity="H",this.name="Death's Possession";const t=this.boof4812;this.playTarg.maxAttack=t,this.text=`Destroy a creature with ${t} or less attack${this.icaf("A")}Spawn a copy of it.`,this.z=this.dpsZ}dpsZ(t){this.kill(t),t.faction==="A"&&this.spawn(t.code,k.activeA)}dendC(){this.faction="U",this.rarity="R",this.name="Dendrify",this.xl=!1,this.level===3&&(this.free=!0,this.overload=!0),this.text=`Replace a ${y.levelGateText(this.level+1)}creature with a 7/7 Treefolk.`,this.playTarg.level=w.ddf2(this.level+1),this.z=this.dendZ}dendZ(t){this.replc(`${"SXT"}${this.level}`,t.owner,t.lane)}dreadC(){this.faction="N",this.rarity="H",this.name="Dreadbolt",this.xl=!1,this.level<3&&(this.hints=["LG"]),this.text=`Destroy a ${y.levelGateText(this.level)}creature.`,this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.z=this.dreadZ}dreadZ(t){this.kill(t)}dyinC(){this.faction="U",this.rarity="T",this.name="Dysian Infusion",this.playTarg.hint=["BF"];const t=this.boof135,i=this.boof4710;this.text=`Give a creature ${y.jr9(i,i)} and Regenerate ${t}.`,this.z=this.dyinZ}dyinZ(t){this.buffD(t,this.boof4710),this.regn(t,this.boof135)}enpC(){this.faction="A",this.rarity="H",this.name="Energy Prison",this.free=this.level===3,this.text=`Give a ${y.levelGateText(this.level)}creature Defender.`,this.playTarg.canDefender=!0,this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.enpZ}enpZ(t){t.defender=!0,this.anim8(t)}elnC(){this.faction="A",this.rarity="C",this.name="Electro Net",this.text=`Give a creature ${y.jr9(-this.boof51015,0)}.`,this.playTarg.hint=["DB"],this.z=this.elnZ}elnZ(t){this.buffA(t,-this.boof51015)}rageC(){this.faction="U",this.rarity="C",this.name="Enrage";const t=this.boof3612;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["BF"],this.z=this.rageZ}rageZ(t){this.buffD(t,this.boof3612)}efauC(){this.faction="T",this.rarity="R",this.name="Everflame Aura",this.text=`Deal ${this.level+6} damage to an enemy creature, or give a friendly creature Mobility ${this.level}.`,this.z=this.efauZ}efauZ(t){t.owner===k.activeA?this.wings(t,this.level):this.smack(t,this.level+6)}expdmC(){this.faction="N",this.rarity="H",this.name="Explosive Demise",this.xl=!1,this.text=`Destroy a friendly ${y.levelGateText(this.level+1)}creature.~Deal damage equal to its attack to the enemy player.${this.level===3?"~You gain that much health.":""}`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.z=this.expdmZ}expdmZ(t){const i=t.attack;this.kill(t),this.ouch("E",i),this.level===3&&this.balm("F",i)}fitrC(){this.faction="T",this.rarity="C",this.name="Fit of Rage",this.maxLevel=1,this.overload=!0,this.playTarg.player="F",this.text="Give a friendly creature +attack equal to the creature opposing it this turn.",this.z=this.fitrZ}fitrZ(t){this.modA(t,b.modT("AT",t.opposed?.attack||0))}fitTarg(){const t=b.crActTarg("CARD",this.code,"");return t.lanes=p.ddf1().filter(i=>i.opposed).map(i=>i.lane),t}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 ${y.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.hint=["BF"],this.z=this.feralZ}feralZ(t){t.breakthrough=!0,this.buffD(t,this.fiboof)}fjetC(){this.faction="T",this.rarity="C",this.name="Flame Jet",this.playTarg.hint=["HR"],this.text=`Deal ${this.boof3915} damage to a creature. ${this.rankT()}, deal an additional 3 damage.`,this.z=this.fjetZ}fjetZ(t){this.smack(t,this.boof3915),k.getActive().rank>this.level&&this.smack(t,3)}flncC(){this.faction="T",this.rarity="R",this.name="Flame Lance",this.xl=!1;const t=this.boof579;this.text=`Deal ${t} damage to an enemy creature and ${t} damage to the enemy player.`,this.playTarg.player="E",this.z=this.flncZ}flncZ(t){const i=this.boof579;this.smack(t,i),this.ouch("E",i)}ffldC(){this.faction="A",this.rarity="C",this.name="Forcefield",this.playTarg.canArmor=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Armor ${this.boof51020} this turn.`,this.z=this.ffldZ}ffldZ(t){this.modA(t,b.modT("AR",this.boof51020))}frozC(){this.faction="T",this.rarity="R",this.name="Frozen Solid",this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.text=`Give a ${y.levelGateText(this.level)}creature "When this is dealt damage, destroy it".`,this.level<3&&(this.hints=["LG"]),this.z=this.frozZ}frozZ(t){t.changed=!0;const i=t.jr4("DM",this.code);i.bonus=this.avgSpawnNug(),this.anim8(t)}ghastC(){this.faction="N",this.rarity="C",this.name="Ghastly Touch";const t=-this.boof3612;this.text=`Give a creature ${y.jr9(t,t)}.`,this.playTarg.hint=["DB"],this.z=this.ghastZ}ghastZ(t){this.buffD(t,-this.boof3612)}crushC(){this.faction="T",this.rarity="C",this.name="Glacial Crush",this.xl=!1,this.free=this.level>1,this.free||(this.hints=["LG"]),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.":""}`,this.z=this.crushZ}crushZ(t){const i=t.health;this.kill(t),this.level===3&&this.ouch(t.owner,i)}hartC(){this.faction="A",this.rarity="C",this.name="Heavy Artillery",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof51015,0)}.`,this.z=this.hartZ}hartZ(t){this.buffA(t,this.boof51015)}izftC(){this.faction="T",this.rarity="T",this.name="Iztek's Frost",this.free=this.level===3,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hint=["KL"],this.text=`Until the end of the next turn, give a ${y.levelGateText(this.level+1)}creature "When this is dealt damage, destroy it".`,this.level===1&&(this.hints=["LG"]),this.z=this.izftZ}izftZ(t){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i,r.bonus=this.avgSpawnNug();const n=t.jr4("PT",this.code);n.customCode=S.enTil("P2",i)}jpC(){this.faction="A",this.rarity="C",this.name="Jet Pack",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof369,0)} and Mobility 1.`,this.z=this.jpZ}jpZ(t){this.buffA(t,this.boof369),this.wings(t,1)}lbrandC(){this.faction="T",this.rarity="C",this.name="Lightning Brand",this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hint=["BF"],this.text=`Give a ${y.levelGateText(this.level+1)}creature ${y.jr9(this.boof124,0)} and Aggressive this turn.`,this.level===1&&(this.hints=["LG"]),this.z=this.lbrandZ}lbrandZ(t){this.modA(t,b.modT("AT",this.boof124)),this.modA(t,b.modT("AG",!0))}shartC(){this.faction="U",this.rarity="R",this.name="Lysian Shard",this.overload=!0,this.maxLevel=1,this.hints=["ZZ-1"],this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(6,6)}.`,this.z=this.shartZ}shartZ(t){this.buffD(t,6)}maggyC(){this.faction="T",this.rarity="T",this.name="Magmify",this.maxLevel=2,this.level===1?this.hints=["LG"]:this.free=!0,this.playTarg.player="F",this.text="Set a friendly creatures attack equal to its health.",this.z=this.maggyZ}maggyZ(t){const i=t.health-t.attack;i!==0&&this.buffA(t,i)}morphC(){this.faction="U",this.rarity="H",this.name="Metamorphosis",this.xl=!1,this.text=`Replace a ${y.levelGateText(this.level)}creature with a 0/3 Feywing Chrysalis.`,this.playTarg.level=w.ddf2(this.level),this.level<3&&(this.hints=["LG"]),this.z=this.morphZ}morphZ(t){this.replc(`${"FWC"}1`,t.owner,t.lane)}sculptC(){this.faction="A",this.rarity="H",this.name="Metasculpt",this.level===3?this.free=!0:this.hints=["LG"],this.playTarg.level=w.ddf2(this.level+1),this.text=`Remove all abilities from a ${y.levelGateText(this.level+1)}creature.`,this.playTarg.hint=["DB"],this.z=this.sculptZ}sculptZ(t){t.wipeAll()}nanoC(){this.faction="A",this.rarity="R",this.name="Nanoswarm",this.playTarg.level=w.ddf2(this.level),this.text=`Give a ${y.levelGateText(this.level)}creature ${y.jr9(-this.boof51015,0)} and remove all abilities from it.`,this.playTarg.hint=["DB"],this.level<3&&(this.hints=["LG"]),this.z=this.nanoZ}nanoZ(t){this.buffA(t,-this.boof51015),t.wipeAll()}natselC(){this.faction="U",this.rarity="R",this.name="Natural Selection",this.xl=!1,this.text=`If there is a friendly creature in each lane, destroy a ${y.levelGateText(this.level)}creature.`,this.playTarg.level=w.ddf2(this.level),this.playTarg.hint=["KL"],this.level<3&&(this.hints=["LG"]),this.z=this.natselZ}natselZ(t){this.kill(t)}nflayC(){this.faction="N",this.rarity="C",this.name="Necroflay";const t=-this.boof3711;this.text=`Give a creature ${y.jr9(t,t)}.~You may play an additional ${this.name} this turn.`,this.playTarg.hint=["DB"],this.z=this.nflayZ}nflayZ(t){this.buffD(t,-this.boof3711);const i=L.freeCard(this.code);i.condition.cardCode="NCF"}nviveC(){this.faction="N",this.rarity="C",this.name="Necrovive",this.playTarg.canRegen=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Regenerate ${this.boof3612}.`,this.z=this.nviveZ}nviveZ(t){this.regn(t,this.boof3612)}ntdcC(){this.faction="N",this.rarity="R",this.name="Nether Decay";const t=this.ndcbuf;this.text=`Give a creature "When a creature is destroyed, this gets ${y.jr9(t,t)}."`,this.playTarg.hint=["DB"],this.z=this.ntdcZ}ntdcZ(t){t.changed=!0;const i=t.jr4("DS",this.code),r=this.ndcbuf;i.bonus=this.buffNug(r,r)}get ndcbuf(){return-4-this.level}oexpC(){this.faction="A",this.rarity="H",this.name="Oratek Explosives",this.playTarg.player="F";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 ${y.jr9(5,0)}.~Allied Tempys: This turn, when that creature ${y.dbdtap()}, deal that much damage to ${t}.`,this.z=this.oexpZ}oexpZ(t){if(this.buffA(t,5),L.allied("T")){const i=E.genId(),r=t.jr4("DM",this.code);r.changes=!0,r.customCode=i;const n=t.jr4("PT",this.code);n.customCode=i}}orssC(){this.faction="A",this.rarity="C",this.name="Oreian Steelskin",this.playTarg.canArmor=!0,this.playTarg.hint=["BF"],this.text=`Give a creature Armor ${this.boof246}. ${this.rankT()}, it gets an additional Armor 1.`,this.z=this.orssZ}orssZ(t){const i=k.getActive().rank>this.level?1:0;t.addArmor(this.boof246+i)}pwtorC(){this.faction="A",this.rarity="R",this.name="Power Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof234,0)}.`,this.z=this.pwtorZ}pwtorZ(t){this.buffA(t,this.boof234)}psurgeC(){this.faction="U",this.rarity="R",this.name="Primal Surge",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.level,this.level)}.`,this.z=this.psurgeZ}psurgeZ(t){this.buffD(t,this.level)}pslamC(){this.faction="T",this.rarity="C",this.name="Primordial Slam",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.boof71116,0)} this turn.`,this.z=this.pslamZ}pslamZ(t){this.modA(t,b.modT("AT",this.boof71116))}pummC(){this.faction="A",this.rarity="R",this.name="Pummel Pack";const t=this.boof236,i=`${y.jr9(t,0)} and Armor ${t}.`;this.text=`Give a friendly creature ${i}~If it is the only friendly creature, it gets an additional ${i}`,this.playTarg.player="F",this.z=this.pummZ}pummZ(t){const i=this.boof236;this.buffA(t,i),t.addArmor(i),p.ddf1().length===1&&(this.buffA(t,i),t.addArmor(i))}get dennis(){return this.lValN([-3,-9,-25])}rpsC(){this.faction="A",this.rarity="H",this.name="Repress",this.playTarg.player="E",this.text=`Give an enemy creature ${y.jr9(this.dennis,0)}.${this.icaf("U")}remove all abilities from it.`,this.z=this.rpsZ}rpsZ(t){this.buffA(t,this.dennis),t.faction==="U"&&t.wipeAll()}sapC(){this.faction="A",this.rarity="C",this.name="Sap",this.playTarg.level=w.ddf2(this.level),this.text=`Reduce a ${y.levelGateText(this.level)}creature's attack to 0.`,this.playTarg.hint=["DB"],this.level<3&&(this.hints=["LG"]),this.z=this.sapZ}sapZ(t){this.buffA(t,-t.attack)}soathC(){this.faction="U",this.rarity="C",this.name="Savage Oath",this.level===1&&(this.hints=["LG"]);const t=this.saboof;this.text=`Give an Uterra creature ${y.jr9(t,t,!0)} and Breakthrough.`,this.playTarg.hint=["BF"],this.playTarg.faction="U",this.z=this.soathZ}soathZ(t){this.buffD(t,this.saboof),t.breakthrough=!0}get saboof(){return this.lValN([2,6,15])}scythC(){this.faction="N",this.rarity="L",this.name="Scythe of Chiron";const t=this.boof246;this.playTarg.player="F",this.text=`Each enemy creature gets ${y.jr9(-t,0)}. Give a friendly creature ${y.jr9(t,0)} for each enemy creature.`,this.z=this.scythZ}scythZ(t){const i=-this.boof246,r=p.qEnemyCreats();r.forEach(n=>{this.buffA(n,i)}),r.length>0&&this.buffA(t,-i*r.length)}soaC(){this.faction="A",this.rarity="C",this.name="Seal of Anvillon",this.level===1?this.hints=["LG"]:this.consistent=!0,this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.ubzap,0)}.`,this.z=this.soaZ}soaZ(t){this.buffA(t,this.ubzap)}sodC(){this.faction="U",this.rarity="C",this.name="Seal of Deepwood",this.level===1?this.hints=["LG"]:this.consistent=!0;const t=this.derpboof;this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(t,t)}.`,this.z=this.sodZ}sodZ(t){this.buffD(t,this.derpboof)}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=["LG"]:this.consistent=!0;const t=this.tars;this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(t,t)}.`,this.z=this.sotZ}sotZ(t){this.buffD(t,this.tars)}get tars(){return this.lValN([-2,-8,-16])}shgrC(){this.faction="N",this.rarity="L",this.name="Shallow Grave",this.free=this.level===3,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.text=`Give a ${y.levelGateText(this.level+1)}friendly creature "Vengeance: Spawn this" this turn.`,this.level===1&&(this.hints=["LG"]),this.z=this.shgrZ}shgrZ(t){const i=E.genId(),r=t.jr4("VN",this.code);r.customCode=i,r.changes=!0;const n=t.jr4("PT",this.code);n.customCode=i}sinC(){this.faction="U",this.rarity="C",this.name="Strength In Numbers",this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(this.level,this.level)} for each friendly creature.`,this.z=this.sinZ}sinZ(t){this.buffD(t,this.level*p.ddf1().length)}get snbboof(){return-1*(this.level+7)}snbC(){this.faction="A",this.rarity="C",this.name="Sonic Burst",this.playTarg.hint=["DB"],this.text=`Give a creature ${y.jr9(this.snbboof,0)}.`,this.level<3&&(this.hints=["LB"]),this.z=this.snbZ}snbZ(t){this.buffA(t,this.snbboof)}sharvC(){this.faction="N",this.rarity="H",this.name="Soul Harvest",this.xl=!1;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",this.level<3&&(this.hints=["LG"]),this.z=this.sharvZ}sharvZ(t){if(this.kill(t),this.level===1){const i=L.freeCard(this.code);i.condition.level=w.ddf2(1)}else L.freePlay(this.level-1)}sreapC(){this.faction="N",this.rarity="L",this.name="Soulreap",this.xl=!1;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,this.level<3&&(this.hints=["LG"]),this.z=this.sreapZ}sreapZ(t){this.kill(t),this.spawn(t.code,!t.owner)}sttorC(){this.faction="N",this.rarity="R",this.name="Spirit Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.text=`Give a creature Regenerate ${this.boof234}.`,this.playTarg.hint=["BF"],this.playTarg.canRegen=!0,this.z=this.sttorZ}sttorZ(t){this.regn(t,this.boof234)}sptorC(){this.faction="U",this.rarity="R",this.name="Spore Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.text=`Give a creature Poison ${this.boof234}.`,this.playTarg.hint=["PN"],this.z=this.sptorZ}sptorZ(t){t.addPoison(this.boof234)}sovC(){this.faction="T",this.rarity="L",this.name="Staff of Vaerus",this.text=`Give a friendly ${y.levelGateText(this.level+1)}creature Mobility ${this.level}. That creature battles an additional time this turn.`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.player="F",this.z=this.sovZ}sovZ(t){this.wrang(t),this.wings(t,this.level)}stbrnC(){this.faction="T",this.rarity="R",this.name="Stone Brand";const t=this.boof579;this.text=`Give a creature with Defender ${y.jr9(t,t,!0)} and Negate Defender from it.`,this.playTarg.hint=["BF"],this.playTarg.hasDefender=!0,this.z=this.stbrnZ}stbrnZ(t){this.buffD(t,this.boof579),t.negDefend("T")}ssperC(){this.faction="T",this.rarity="C",this.name="Stormspear",this.xl=!1,this.playTarg.hint=["HR"],this.text=`Deal ${this.sspb} to a creature.~You may play an additional ${this.name} this turn.`,this.z=this.ssperZ}ssperZ(t){this.smack(t,this.sspb);const i=L.freeCard(this.code);i.condition.cardCode="STP"}get sspb(){return this.lValN([3,8,12])}tanglC(){this.faction="U",this.rarity="R",this.name="Tangle",this.xl=!1;let t="";this.level===3?t=" You gain health equal to that creature's attack.":this.playTarg.hint=["KL"],this.text=`Destroy a ${y.levelGateText(this.level+1)}creature with Mobility.${t}`,this.playTarg.level=w.ddf2(this.level+1),this.playTarg.hasMobility=!0,this.level===1&&(this.hints=["LG"]),this.z=this.tanglZ}tanglZ(t){this.kill(t),this.level===3&&this.balm("F",t.attack)}tpactC(){this.faction="N",this.rarity="C",this.name="Tarsian Pact";const t=this.boof235;this.text=`Give a Nekrium creature ${y.jr9(t,t,!0)} and Regenerate ${t}.`,this.playTarg.hint=["BF"],this.playTarg.faction="N",this.z=this.tpactZ}tpactZ(t){const i=this.boof235;this.buffD(t,i),this.regn(t,i)}tugC(){this.faction="A",this.rarity="R",this.name="Tech Upgrade",this.playTarg.tribe="RB",this.playTarg.hint=["BF"],this.text=`Give a Robot ${y.jr9(this.boof4612,0)} and Armor ${this.boof236}.`,this.z=this.tugZ}tugZ(t){t.addArmor(this.boof236),this.buffA(t,this.boof4612)}totsC(){this.faction="N",this.rarity="T",this.name="Tendrils Of Twilight",this.free=!0;const t=-this.boof7911;this.text=`Give an enemy creature ${y.jr9(-1,-1)}.~If that creature is opposing a friendly Duskmaw, give that creature ${y.jr9(t,t)} instead.`,this.playTarg.player="E",this.z=this.totsZ}totsZ(t){const i=t.opposed;let r=!1;i&&(r=Wt.extractCardCode(i.code)==="DTD");const n=r?-this.boof7911:-1;this.buffD(t,n)}txbnC(){this.faction="U",this.rarity="R",this.name="Toxic Boon";const t=this.boof357;this.text=`Give an enemy creature Poison ${t}, or give a friendly creature ${y.jr9(t,t)}.`,this.z=this.txbnZ}txbnZ(t){const i=this.boof357;t.owner===k.activeA?this.buffD(t,i):t.addPoison(i)}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}.`,this.playTarg.hint=["PN"],this.z=this.sporeZ}sporeZ(t){t.addPoison(this.tspois)}tremcC(){this.faction="T",this.rarity="C",this.name="Tremorcharge",this.text=`Give a Tempys creature ${y.jr9(0,this.boof4812)} and Mobility ${this.level}.`,this.playTarg.faction="T",this.playTarg.hint=["BF"],this.z=this.tremcZ}tremcZ(t){this.buffH(t,this.boof4812),this.wings(t,this.level)}uboltC(){this.faction="T",this.rarity="R",this.name="Uranti Bolt",this.xl=!1,this.text=`Deal ${this.ubzap} damage to a creature.~It gets Defender until the end of the next turn.`,this.z=this.uboltZ}uboltZ(t){this.smack(t,this.ubzap);const i=b.mod("DF",!0);i.expiry="EN",this.modA(t,i)}get ubzap(){return this.lValN([3,10,20])}urstC(){this.faction="U",this.rarity="C",this.name="Ursine Strength";const t=this.boof3711;this.playTarg.hint=["BF"],this.text=`Give a creature ${y.jr9(t,t)}. ${this.rankT()}, it gets an additional ${y.jr9(2,2)}.`,this.z=this.urstZ}urstZ(t){const i=this.boof3711+(k.getActive().rank>this.level?2:0);this.buffD(t,i)}vensC(){this.faction="U",this.rarity="C",this.name="Venomstrike",this.playTarg.hint=["PN"],this.text=`Give a creature Poison ${this.boof468}.~You may play an additional ${this.name} this turn.`,this.z=this.vensZ}vensZ(t){t.addPoison(this.boof468);const i=L.freeCard(this.code);i.condition.cardCode="VSK"}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.`,this.z=this.vgraZ}vgraZ(t){t.heal(this.boof101520);const i=this.boof246;p.creatByTarget(b.crFriendNotMeTarg(t.id)).forEach(r=>{r.heal(i)})}vrdsC(){this.faction="U",this.rarity="C",this.name="Verdant Sphere";const t=this.boof5812;this.text=`Give a creature ${y.jr9(0,t)} and you gain ${t} health.`,this.playTarg.hint=["BF"],this.z=this.vrdsZ}vrdsZ(t){const i=this.boof5812;this.buffH(t,i),this.balm(k.getActive(),i)}vrshC(){this.faction="U",this.rarity="R",this.name="Victory Rush";const t=this.level+3,i=y.jr9(t,t);this.text=`Give a friendly creature ${i}. If a Raid occured this turn, give it an additional ${i}.`,this.playTarg.player="F",this.z=this.vrshZ}vrshZ(t){const i=(this.level+3)*(L.ffs>2?2:1);this.buffD(t,i)}vglchC(){this.faction="N",this.rarity="R",this.name="Vigor Leech";const t=this.boof369n;this.text=`Give an enemy creature ${y.jr9(t,t)}, or give a friendly creature Regenerate ${-t}.`,this.z=this.vglchZ}vglchZ(t){const i=this.boof369n;t.owner===k.activeA?this.regn(t,-i):this.buffD(t,i)}vembC(){this.faction="N",this.rarity="C",this.name="Vyric's Embrace",this.playTarg.hint=["DB"];const t=this.boof468,i=-t;this.text=`Give a creature ${y.jr9(i,i)}.~You gain ${t} health.`,this.z=this.vembZ}vembZ(t){const i=this.boof468;this.buffD(t,-i),this.balm(k.getActive(),i)}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.playTarg.hint=["BF"],this.text=`Give a ${y.levelGateText(i)}creature ${t}x attack.`,this.z=this.warZ}warZ(t){const i=this.level===3?2:1;this.buffA(t,t.attack*i)}xwillC(){this.faction="N",this.rarity="H",this.name="Xrath's Will",this.xl=!1;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,this.level<3&&(this.hints=["LG"]),this.z=this.xwillZ}xwillZ(t){this.kill(t);const i=L.freeCard(this.code);i.condition.tribe="ZB"}}class Pr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Crux, Metamind Rogue",this.iAttack=this.boof71217,this.iHealth=this.boof4812,this.tribe.push("MM"),this.hints=["RD"],this.text=`Forge: If Crux is your only friendly creature, it gets Armor ${this.level+2}.~Upgrade: Give an enemy creature ${y.jr9(-this.iHealth,0)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("UP");return n.interactive=!0,r}handleAction(t){const i=p.ddf6(t);this.buffA(i,-this.iHealth),this.logAct(!1,i),T.actionDone(!0)}jr8(t){if(t.trigger.type==="UP"){const i=w.toActions(b.crEnemyActTarg("CARD",this.code,""));i.length===0?x.triggerDone():T.ddf5(i)}else if(t.trigger.type==="FR"){const i=p.creatByTarget(b.crFriendTarg());i.length===1&&i[0].addArmor(this.level+2),x.triggerDone()}}}class Mr extends P{constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Cryophoenix",this.iAttack=this.boof3711,this.iHealth=this.iAttack+3,this.iMobile=this.lValN([0,0,1]),this.tribe.push("PX"),this.text=`When ${this.name} enters play or moves, deal damage equal to its attack to the opposing creature.~If there is no opposing creature, deal that damage to the enemy player instead.`}image(t){return this.rawImage(`${"PHC"}${this.level}`,t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FK");return n.bonus=this.playerNug(this.iAttack,"TX"),r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const r=I.toCreature(t.event).creature,n=r.opposed;n?this.smack(n,r.attack):(this.ouch(!r.owner,r.attack),this.anim8(r)),x.triggerDone()}}class Gt extends P{cons(t){({["BOF"]:()=>this.bofC(),["CTM"]:()=>this.ctmC(),["DFB"]:()=>this.dfbC(),["GGB"]:()=>this.ggbC(),["GGD"]:()=>this.ggdC(),["GGR"]:()=>this.ggdrC(),["GGP"]:()=>this.ggpC(),["GGW"]:()=>this.ggwC(),["MHR"]:()=>this.mhermC(),["NGT"]:()=>this.ngauntC(),["SRH"]:()=>this.sharvC(),["SPR"]:()=>this.sprC(),["YNS"]:()=>this.yuruC()})[t]()}trigB;bDraw=!1;constructor(t){super(t),this.cons(this.cardCode())}t;d;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DS");return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.t(t)}truLive(t){return p.creatByTr(t).status==="A"}jr8(t){this.d(t),x.triggerDone()}friendTribeTest(t,i,r){return i.id===t.id||t.owner===i.owner&&t.isTribe(r)&&Gt.itDiedFirst(t.id,i.id)}bofC(){this.faction="N",this.rarity="C",this.name="Bride of Frankenbaum",this.iAttack=this.boof5813,this.iHealth=this.iAttack+1,this.tribe.push("AB"),this.hints=["ZZ-1"];const t=this.boof234;this.text=`When a friendly Abomination is destroyed, you gain ${t} health.`,this.trigB=this.playerNug(t*2,"TW"),this.bDraw=!0,this.t=this.dfbT,this.d=this.bofD}bofD(t){this.balm(t.owner,this.boof234,t.draw),t.draw&&this.anim8(p.creatByTr(t))}ctmC(){this.faction="N",this.rarity="L",this.name="Cyrus, the Merciless",this.iAttack=this.boof359,this.iHealth=this.iAttack+1,this.tribe.push("GG"),this.text=`Formation: Destroy each other creature with ${this.boof579} or less attack.~Whenever a creature is destroyed, Cyrus gets ${y.jr9(1,1)}.`,this.trigB=this.buffNug(2,2,"TS"),this.bDraw=!0,this.t=this.truLive,this.d=this.ctmR}ctmR(t){p.creatByTr(t).buff(1,1,this.bFac(t))}dfbC(){this.faction="N",this.rarity="R",this.name="Dr. Frankenbaum",this.iAttack=this.boof6914,this.iHealth=this.iAttack-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.trigB=this.playerNug(t*2,"TX"),this.bDraw=!0,this.t=this.dfbT,this.d=this.dfbD}dfbT(t){const i=I.toCreature(t.event).creature;return this.friendTribeTest(i,p.creatByTr(t),"AB")}dfbD(t){this.ouch(!t.owner,this.boof234,t.draw),t.draw&&this.anim8(p.creatByTr(t))}ggbC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Betrayer",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("DF","GG");const t=-this.level;this.text=`When a friendly Darkforged is destroyed, the creature opposing it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(this.level,this.level,"TW"),this.t=this.ggbT,this.d=this.ggbD}ggbT(t){const i=I.toCreature(t.event).creature;return this.friendTribeTest(i,p.creatByTr(t),"DF")?i.opposed:!1}ggbD(t){const i=I.toCreature(t.event).creature.opposed;i&&(this.buffD(i,-this.level),this.logAct(!1,i))}ggdC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Devourer",this.iAttack=this.boof579,this.iHealth=this.iAttack-2,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),2),this.bDraw=!0,this.t=this.truLive,this.d=this.ggdD}ggdD(t){p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}get doomb(){return this.lValN([1,1,2])}ggdrC(){this.faction="N",this.rarity="L",this.name="Grimgaunt Doomrider",this.iAttack=this.boof4712,this.iHealth=this.iAttack+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 ${y.jr9(t,t)}. Then give the opposing creature ${y.jr9(-t,-t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.t=this.ggdrT,this.d=this.ggdrD}ggdrT(t){const r=I.toCreature(t.event).creature;return r.owner===t.owner&&r.id!==t.creatId?this.truLive(t)&&Gt.itDiedFirst(r.id,t.creatId):!1}ggdrD(t){const i=I.toCreature(t.event).creature;if(!p.searchByLane(i.lane,i.owner)){const n=p.creatByTr(t),c=this.doomb;this.lurk(n,i.lane),this.buffD(n,c);const f=n.opposed;f&&(this.logAct(!1,f),this.buffD(f,-c))}}ggpC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Predator",this.iAttack=this.boof5914,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("GG");const t=this.boof246;this.text=`When the opposing creature is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.t=this.ggpT,this.d=this.ggpD}ggpT(t){const i=I.toCreature(t.event);if(i.creature.owner!==t.owner){const r=p.creatByTr(t);return r.status==="A"&&p.oppositeLane(r.lane)===i.creature.lane}return!1}ggpD(t){this.buffD(p.creatByTr(t),this.boof246),this.logAct(!1)}ggwC(){this.faction="N",this.rarity="H",this.name="Grimgaunt Warrior",this.iAttack=this.boof4710,this.iHealth=this.iAttack+1,this.tribe.push("GG");const t=this.boof234;this.text=`When an adjacent creature is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.bDraw=!0,this.t=this.ggwT,this.d=this.ggwD}ggwT(t){const i=I.toCreature(t.event);if(i.creature.owner===t.owner){const r=p.creatByTr(t);return r.status==="A"&&r.adjacent.includes(i.creature.lane)}return!1}ggwD(t){const i=this.boof234;p.creatByTr(t).buff(i,i,this.bFac(t)),this.logAct(!1)}mhermC(){this.faction="U",this.rarity="L",this.name="Malice Hermit",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("YT");const t=this.boof124;this.text=`Forge: Each other creature gets Poison ${t}.~When a creature with Poison is destroyed, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.bDraw=!0,this.t=this.mhermT,this.d=this.mhermD}mhermT(t){return I.toCreature(t.event).creature.poison>0&&this.truLive(t)}mhermD(t){const i=I.toCreature(t.event);this.logAct(!1,i.creature);const r=this.boof124;p.creatByTr(t).buff(r,r,this.bFac(t))}ngauntC(){this.faction="N",this.rarity="R",this.name="Nightgaunt",this.iAttack=this.boof4815,this.iHealth=this.iAttack+1,this.tribe.push("GG"),this.text=`When a creature is destroyed, ${this.name} gets Regenerate 1.`,this.trigB=this.regnNug(2,"TS"),this.bDraw=!0,this.t=this.truLive,this.d=this.ngauntD}ngauntD(t){p.creatByTr(t).addRegen(1,this.bFac(t))}sharvC(){this.faction="N",this.rarity="C",this.name="Sorrow Harvester",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("AB"),this.text="When a friendly Abomination is destroyed on your turn, draw a card.",this.trigB=this.rawNug(0,0,0,0,ft.dcWeight),this.bDraw=!0,this.t=this.sharvT,this.d=this.sharvD}sharvT(t){const r=I.toCreature(t.event).creature;return!!(r.owner===t.owner&&r.isTribe("AB")&&k.activeA===t.owner&&Gt.itDiedFirst(r.id,t.creatId))}sharvD(t){this.logAct(!1),k.drawCard(t.owner,1),t.draw&&this.anim8(t.creatId)}sprC(){this.faction="N",this.rarity="R",this.name="Spectral Rider",this.iAttack=this.lValN([6,8,13]),this.iHealth=this.iAttack-1,this.tribe.push("GG"),this.text=`When a friendly creature is destroyed, ${this.name} gets ${y.jr9(1,1)}.`,this.trigB=this.buffNug(2,2,"TS"),this.bDraw=!0,this.t=this.sprT,this.d=this.sprD}sprT(t){const i=I.toCreature(t.event);return t.owner===i.creature.owner&&this.truLive(t)}sprD(t){p.creatByTr(t).buff(1,1,this.bFac(t))}yuruC(){this.faction="N",this.rarity="L",this.name="Yuru, the Necrosage",this.iAttack=3,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("HM"),this.level===1&&(this.hints=["ZZ-1"]);const t=W.getCard(this.syc());this.text=`When an adjacent non-Spirit creature is destroyed, put a ${y.tokName(t)} into that lane.`,this.trigB=this.spawnNug(t,"TX"),this.t=this.yuruT,this.d=this.yuruD}yuruT(t){const i=p.creatByTr(t),n=I.toCreature(t.event).creature;return!!(n.owner===i.owner&&i.adjacent.includes(n.lane)&&!n.isTribe("ST")&&Gt.itDiedFirst(n.id,i.id))}yuruD(t){const i=I.toCreature(t.event);this.poot(this.syc(),t.owner,i.creature.lane)}syc(){return "XYR"+this.level}static itDiedFirst(t,i){if(t===i)return!0;let r=!1;const n=Bt.findDeathTime(i);if(S.isUn(n))r=!0;else{const c=Bt.findDeathTime(t);(S.isUn(c)||c<=n)&&(r=!0)}return r}}class Er extends Gt{get formation(){return!0}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FM"),r}jr8(t){if(t.trigger.type==="FM"){const i=b.crNotMeTarg(t.creatId);i.maxAttack=this.boof579;const r=p.creatByTarget(i);if(r.length>0){const n=E.tick();r.forEach(c=>this.kill(c,n))}x.triggerDone()}else super.jr8(t)}}class Le extends P{cons(t){({["ATP"]:()=>this.phagC(),["PLI"]:()=>this.pimpC(),["SSH"]:()=>this.sshmC(),["TPG"]:()=>this.pillC(),["TMG"]:()=>this.grootC(),["VIN"]:()=>this.vintC()})[t]()}forgTargets(){const t=this.t();return E.aiActive?bt.uniqueContent(t):t}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Forge: "+this.ftext,this.ftext=""}t;f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){const i=p.jr5(t.param);this.f(t.position,i),this.anim8(i),gt.popMode(),T.actionDone(!0)}jr8(t){const i=this.cardCode()==="VIN";if(i&&E.aiActive)x.triggerDone();else{const r=this.forgTargets();if(r.length>0){let n;i?n=[]:n=r.map(f=>{const m=b.deckSelectAction("CARD",f.cardCode,f.sourceIdx);return m.param=t.creatId,m.host=this.code,m});const c=T.noneEndTrigger();c.param="PM",n.push(c),bt.showCustomDeck(r,n)}else x.triggerDone()}}hdiscardF(t,i){const r=k.toPlayer(!i.owner),n=r.hand[t];Dt.cardDiscard(r,t),r.discard.push(n)}phagC(){this.faction="U",this.rarity="H",this.name="Aetherphage",this.iAttack=this.lValN([7,10,16]),this.iHealth=this.boof3612,this.tribe.push("IN"),this.ftext=`Look at the ${y.levelGateText(this.level)}spells in the enemy player's hand and choose one. The enemy player discards the chosen spell.`,this.t=this.phagT,this.f=this.hdiscardF}phagT(){const t=k.getInactive(),i=b.target("TH");return i.player=k.toTarget(t),i.level=w.ddf2(this.level),i.card="S",bt.generateContent(t.hand,!1,i)}pimpC(){this.faction="N",this.rarity="R",this.name="Plunder Imp",this.iAttack=this.boof61016,this.iHealth=this.iAttack-1,this.tribe.push("DM");const t=this.boof369;this.ftext=`Look at the creatures with ${t} or less attack in the enemy player's hand and choose one. The enemy player discards the chosen creature.`,this.t=this.pimpT,this.f=this.hdiscardF}pimpT(){const t=k.getInactive(),i=b.target("TH");return i.player=k.toTarget(t),i.maxAttack=this.boof369,i.card="C",bt.generateContent(t.hand,!1,i)}sshmC(){this.faction="U",this.rarity="H",this.name="Soothsayer Hermit",this.iAttack=this.boof61016,this.iHealth=this.iAttack-1,this.tribe.push("LP");let t="";this.level===3?t="level 3 or lower ":t=y.levelGateText(this.level),this.ftext=`You may put a ${t}creature from your discard pile into your hand.`,this.t=this.sshmT,this.f=this.sshmF}sshmT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.card="C",this.level===3?i.level="HR":i.level=w.ddf2(this.level),bt.generateContent(t.discard,!1,i)}sshmF(t,i){const r=k.toPlayer(i.owner),n=r.discard.splice(t,1);Dt.addCard(r,n[0],!0)}pillC(){this.faction="N",this.rarity="H",this.name="Tomb Pillager",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("ZB"),this.consistent=this.level>1,this.ftext="You may banish a Nekrium card from your discard pile.",this.t=this.pillT,this.f=this.pillF}pillT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.faction="N",bt.generateContent(t.discard,!1,i)}pillF(t,i){k.toPlayer(i.owner).discard.splice(t,1)}grootC(){this.faction="U",this.rarity="R",this.name="Toorgmai Guardian",this.iAttack=this.boof4711,this.iHealth=this.iAttack,this.tribe.push("PL");const t=this.boof358;this.ftext=`You may banish a Plant from your discard pile. If you do, ${this.name} gets ${y.jr9(t,t)}.`,this.t=this.grootT,this.f=this.grootF}grootT(){const t=k.getActive(),i=b.target("TD");return i.player=k.toTarget(t),i.tribe="PL",bt.generateContent(t.discard,!1,i)}grootF(t,i){k.toPlayer(i.owner).discard.splice(t,1),this.buffD(i,this.boof358)}vintC(){this.faction="A",this.rarity="C",this.name="Vault Intruder",this.iAttack=this.boof71218,this.iHealth=this.boof5914,this.tribe.push("RB"),this.ftext="Look at the enemy player's hand.",this.t=this.vintT,this.f=(t,i)=>{}}vintT(){const t=k.getInactive(),i=b.target("TH");return i.player=k.toTarget(t),bt.generateContent(t.hand,!1,i)}}class Rr extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Darkheart Conjurer",this.iAttack=this.boof4813,this.iHealth=this.boof71116,this.tribe.push("HM"),this.text=`When you play a spell, give a friendly creature Regenerate ${this.boof135}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.regnNug(this.boof135,"TW"),r}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),this.regn(i,this.boof135),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,"");i.canRegen=!0;const r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class Lr extends Tt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){p.qEnemyCreats().forEach(i=>{i.addPoison(6)}),x.triggerDone()}}class Gr extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Demara's Pitguard",this.iAttack=this.boof6914,this.iHealth=this.iAttack+2,this.tribe.push("NG"),this.text=`The opposing creature has Poison ${this.boof248}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=t.status==="A",r=p.oppositeLane(t.lane);p.qPlayerCreats(!t.owner).forEach(n=>{n.lane===r&&i?n.addModSafe(b.mod("PN",this.boof248,t.id)):n.removeModSafe(t.id)})}}class Ir extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Demonweb Watcher",this.iAttack=this.boof4714,this.iHealth=this.boof71218,this.tribe.push("SP");const i=this.boof246n;this.text=`When an enemy creature with Aggressive deals battle damage, it gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level),r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&i.isCreatSrc&&i.srcCreat.owner!==t.owner&&i.srcCreat.aggressive}jr8(t){const i=I.toDamage(t.event);this.logAct(!1,i.srcCreat),this.buffD(i.srcCreat,this.boof246n),x.triggerDone()}}class Wr extends P{constructor(t){super(t),this.faction="U",this.rarity="T",this.name="Dino Knight",this.iAttack=this.boof81218,this.iHealth=this.iAttack,this.tribe.push("DN"),this.iAggro=!0,this.iBT=!0,this.maxLevel=this.level,this.minLevel=this.level;const i=this.boof357;this.text=`When this ${y.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 r=super.jr3(t,i),n=r.jr4("VN");n.bonus=this.buffNug(this.iAttack,this.iHealth);const c=r.jr4("DM");return c.bonus=this.buffNug(0,this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="VN"){const i=p.creatByTr(t);this.poot("BWT"+this.level,i.owner,i.lane),x.triggerDone()}else if(t.trigger.type==="DM"){const i=this.boof357,r=b.crNotMeTarg(t.creatId);r.player=k.toTarget(t.owner),p.creatByTarget(r).forEach(c=>c.heal(i)),x.triggerDone()}}}class $r extends vt{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Discordant Strike";const i=-this.boof4610;this.text=`Give an enemy creature ${y.jr9(i,0)}.~Allied Nekrium: Give an enemy creature ${y.jr9(0,i)}.`}playTargets(){return[b.crEnemyActTarg("CARD",this.code,"P1")]}canPlay(){return p.qEnemyCreats().length>0}handleAction(t){const i=S.deTil(t.param),r=-this.boof4610,n=p.ddf6(t);i[0]==="P1"?(this.logSpell(n),this.buffA(n,r),L.allied("N")?T.ddf5(w.toActions(b.crEnemyActTarg("CARD",this.code,"P2"))):T.spellCast()):(this.logSpell(n),n.buff(0,r,"N"),T.spellCast())}}class Ur extends vt{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Dissolve",this.free=this.level===3,this.level<3&&(this.hints=["LG"]),this.text=`Double the Poison on ${this.level===1?"an":"each"} enemy creature.`}canPlay(){return p.creatByTarget(this.poisTarg()).length>0}playTargets(){return this.level===1?[this.poisTarg()]:[w.boardTarget("CARD",this.code)]}handleAction(t){if(this.level===1){const i=p.ddf6(t);this.logSpell(i),i.addPoison(i.poison)}else this.logSpell(),p.creatByTarget(this.poisTarg()).forEach(r=>{r.addPoison(r.poison)});T.spellCast()}poisTarg(){const t=b.crEnemyActTarg("CARD",this.code,"");return t.hasPoison=!0,t}}class Or extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Doppelbot",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("RB");let i="";const r=this.lValN([0,5,10]);this.level>1&&(i=`, then give it ${y.jr9(r,0)}`),this.text=`Activate: Look at the creatures in the enemy player's hand and choose one. Replace ${this.name} with the chosen creature${i}.`;const n=this.avgCreatureStats();this.bonus=this.buffNug(r+n[0]-this.iAttack,n[1],"TW")}canActivate(t){return k.toPlayer(!t.owner).hand.some(r=>W.getCard(r).type==="C")}startActivation(t){let i;if(nt.simOn)i=[{cardCode:"VND"+this.level,sourceIdx:0,cardCount:0}];else{const n=k.getInactive(),c=b.target("TH");c.player=k.toTarget(n),c.card="C",i=bt.generateContent(n.hand,!1,c),E.aiActive&&(i=bt.uniqueContent(i))}const r=i.map(n=>{const c=b.deckSelectAction("CARD",n.cardCode,n.sourceIdx);return c.param=t.id,c.host=this.code,c});bt.showCustomDeck(i,r)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=this.replc(t.card,i.owner,i.lane);this.level>1&&r&&this.buffA(r,this.level===3?10:5),gt.popMode(),i.endActivation()}}class Vr extends vt{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Dragonwake",this.text=`Search your deck for a ${y.levelGateText(this.level+1)}Dragon and Spawn a copy of it. It gets Aggressive${this.level===3?".":' and "At the end of your turn, destroy this."'}`}canPlay(){return this.dragoons(!1).length>0}playTargets(){const t=w.boardTarget("CARD",this.code);return t.param="P1",[t]}dragoons(t){const i=k.getActive(),r=b.target("DK");r.player=k.toTarget(i),r.level=w.ddf2(this.level+1),r.tribe="DG";const n=bt.generateContent(i.deck,!1,r);return t?bt.uniqueContent(n):n}handleAction(t){if(t.param==="P1"){const i=this.dragoons(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else{const i=this.spawn(t.card,k.activeA);if(i){if(this.logSpell(i),i.aggressive=!0,this.level<3){const r=i.jr4("TE",this.code);r.creatId=i.id,r.changes=!0}}else this.logSpell();gt.popMode(),T.spellCast()}}ddf8(t){return!0}jr8(t){const i=p.creatByTr(t);i.status==="A"&&this.kill(i),x.triggerDone()}}class zr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Dread",this.iAttack=this.boof6912,this.iHealth=this.boof234,this.tribe.push("AB"),this.text=`When ${this.name} enters play, it has a 50% chance to get the ability "Vengeance: Spawn a level ${this.level} Dread".`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(t.event.code==="ENT"){if(S.randInt(0,2)===0){const i=I.toEnterField(t.event),r=i.creature.jr4("VN");r.changes=!0,r.bonus=this.buffNug(this.iAttack,this.iHealth),this.anim8(i.creature)}}else this.spawn(this,t.owner);x.triggerDone()}}class Zr extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Dysian Broodqueen",this.iAttack=this.boof248,this.iHealth=this.boof61117,this.tribe.push("NG");const i=W.getCard(this.bfc()),r=`Destroy an enemy ${y.levelGateText(this.level)}creature.`;this.text=`Activate, destroy another friendly creature: ${r}~Allied Uterra: Put a ${y.tokName(i)} into an available lane.`,this.bonus=this.multNug(this.avgSpawnNug(),.5),this.bonus.threat="TX"}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){const i=this.friends(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[1]==="P1"){const r=this.enemies(i[0],p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else if(i[1]==="P2"){this.logAct(!0);const r=E.tick();this.kill(p.jr5(i[2]),r),this.kill(p.ddf6(t),r),p.jr5(i[0]).endActivation()}else p.birth(this.bfc(),"P",t.playerA,t.lane,"U"),T.actionDone(!0)}jr8(t){if(L.allied("U")){const i=b.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}else x.triggerDone()}friends(t){const i=b.crFriendNotMeActTarg("CARD",t,this.code,S.enTil(t,"P1"));return w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t,"P2",i));return r.level=w.ddf2(this.level),w.toActions(r)}bfc(){return "BRF"+this.level}}class Yr extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Dysian Siphon";const i=this.boof357;this.text=`Give an enemy creature ${y.jr9(-i,-i)}.~Allied Uterra: Give a friendly creature ${y.jr9(i,i)}. `}canPlay(){return p.creatByTarget(this.firstT()).length>0}playTargets(){return[this.firstT()]}firstT(){return b.crEnemyActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=this.boof357,n=p.ddf6(t);if(i[0]==="P1"){const c=b.crFriendActTarg("CARD",this.code,S.enTil("P2",n.id)),f=w.toActions(c);L.allied("U")&&f.length>0?(f.push(T.cancelAction()),T.ddf5(f)):(this.logSpell(n),this.buffD(n,-r),T.spellCast())}else{const c=p.jr5(i[1]);this.logSpell(c,n),this.buffD(c,-r),n.buff(r,r,"U"),T.spellCast()}}}class Kr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Dysian Sludge",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("OZ");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 ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,n.customCode=r.id,r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=I.toEnterField(t.event);if(i.forged&&i.creature.id===t.trigger.customCode)if(k.getActive().health>120){const r=b.actionTarget("TF","CARD",this.code,"");r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>c!==i.creature.lane);const n=w.toActions(r);n.push(T.noneEndTrigger()),T.ddf5(n)}else x.triggerDone();else{const r=i.creature.opposed;if(r&&L.allied("N",i.creature.owner)){const n=-this.boof135;r.buff(n,n,"N")}x.triggerDone()}}handleAction(t){this.replc(this,t.playerA,t.lane),T.actionDone(!0)}}class Xr extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Ebonskull Diabolist",this.iAttack=this.boof137,this.iHealth=this.boof4814,this.tribe.push("VP"),this.text=`Forge: At the start of your next turn, if ${this.name} is in play, you may play an additional card.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="FR"){const r=i.jr4("TS");r.changes=!0,r.bonus=this.avgSpawnNug(),r.bonus.threat="TX",x.triggerDone()}else if(t.event.code==="TRS"){const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.removeTrigger(i.triggers[r]),L.freePlay(),this.anim8(i),this.logAct(!1),x.triggerDone()}}}class qr extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Echowisp",this.iAttack=this.lValN([7,8,10]),this.iHealth=this.boof135,this.tribe.push("ST"),this.level===3?this.text="Forge: Put a copy of Echowisp into each available lane.":this.text="Forge: You may put a copy of Echowisp into an adjacent lane."}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=this.level<3,r}jr8(t){if(this.level<3){const i=b.actionTarget("TF","CARD",this.code,"");i.player="F",i.lanes=p.creatByTr(t).adjacent,i.hint=["FL"];const r=w.toActions(i);r.push(T.noneEndTrigger()),T.ddf5(r)}else{const i=b.emptyPlayerActTarg("F","CARD",this.code,t.trigger.creatId);let r=w.toActions(i);if(r.length>0){const n=E.tick();r.forEach(c=>this.poot(this,c.playerA,c.lane,n))}x.triggerDone()}}handleAction(t){this.poot(this,t.playerA,t.lane),T.actionDone(!0)}}class Fi extends P{cons(t){({["BTB"]:()=>this.bbtC(),["TVG"]:()=>this.tvgC()})[t]()}wipe=!1;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("AR",this.code);return n.area="A",r}enforceEffect(t){if(t.armor>0){const i=this.m(t);if(this.wipe){const r=t.mods.find(n=>n.granter===t.id);r&&r.value!==t.armor&&t.removeModSafe(t.id)}t.addModSafe(i)}else t.removeModSafe(t.id)}bbtC(){this.faction="A",this.rarity="R",this.name="Batterbot",this.iAttack=this.boof6914,this.iHealth=this.iAttack+2,this.tribe.push("RB","DN"),this.wipe=!0,this.text=`${this.name} gets +Attack equal to its Armor.`,this.m=this.bbtM}bbtM(t){return b.mod("AT",t.armor,t.id)}tvgC(){this.faction="A",this.rarity="R",this.name="Tower Vanguard",this.iAttack=this.lValN([3,6,11]),this.iHealth=this.lValN([7,13,21]),this.tribe.push("RB");const t=this.boof247;this.text=`While ${this.name} has Armor, it gets ${y.jr9(t,0)}.`,this.m=this.tvgM}tvgM(t){return b.mod("AT",this.boof247,t.id)}}class ze extends P{cons(t){({["CIN"]:()=>this.cyinC(),["HWM"]:()=>this.hlwmC(),["LSP"]:()=>this.lspC(),["SSI"]:()=>this.ssinC(),["WTA"]:()=>this.weguC()})[t]()}attThreshold=0;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i);return r.addEffect("AT",this.code),r}enforceEffect(t){this.attThreshold<=t.attack?this.m(t).forEach(i=>{t.addModSafe(i)}):t.removeModSafe(t.id)}cyinC(){this.faction="A",this.rarity="R",this.name="Cypien Infiltrator",this.iAttack=this.boof61117,this.iHealth=this.iAttack-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.`,this.m=this.cyinM}cyinM(t){return[b.mod("BT",!0,t.id)]}hlwmC(){this.faction="A",this.rarity="L",this.name="Hinterland Watchman",this.iAttack=this.lValN([4,7,15]),this.iHealth=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.m=this.hlwmM}hlwmM(t){const i=[b.mod("MB",3,t.id)];return this.level>1&&i.push(b.mod("AR",5,t.id)),this.level===3&&(i.push(b.mod("BT",!0,t.id)),i.push(b.mod("AG",!0,t.id)),i.push(b.mod("RG",5,t.id))),i}lspC(){this.faction="A",this.rarity="C",this.name="Lightshield Patrol",this.iAttack=this.lValN([4,7,15]),this.iHealth=this.boof51020,this.tribe.push("HM"),this.attThreshold=this.iHealth,this.text=`While ${this.name} has ${this.attThreshold} or more attack, it gets Armor ${this.boof234}.`,this.m=this.lspM}lspM(t){return[b.mod("AR",this.boof234,t.id)]}ssinC(){this.faction="A",this.rarity="R",this.name="Spiritsteel Infiltrator",this.iAttack=this.boof4815,this.iHealth=this.iAttack+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}.`,this.m=this.ssinM}ssinM(t){return[b.mod("MB",this.level,t.id),b.mod("AR",this.boof246,t.id)]}weguC(){this.faction="U",this.rarity="L",this.name="Wegu, the Ancient",this.iAttack=0,this.iHealth=1,this.tribe.push("PL"),this.iDefend=!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 ${y.jr9(t,t)} for each health you gained.~While Wegu has ${this.attThreshold} or more attack, ${i}Negate Defender from it.`,this.m=this.weguM}weguM(t){const i=[b.mod("ND",!0,t.id)];return this.level===3&&i.push(b.mod("BT",!0,t.id)),i}}class Pi extends P{friendNotMe(t){const i=b.crNotMeTarg(t.id);return i.player=k.toTarget(t.owner),i}friendNone(t){const i=b.crTarg();return i.player=k.toTarget(t.owner),i.lanes=[],i}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforcementActive(t){return t.status==="A"}applyEffect(t,i,r){const n=this.friendNotMe(t),c=p.creatByTarget(n),f=p.creatByTarget(r);c.forEach(m=>{f.includes(m)?m.addModSafe(i):m.removeModSafe(t.id)})}}class we extends Pi{cons(t){({["BWW"]:()=>this.bwwC(),["HTR"]:()=>this.hrtC(),["KKK"]:()=>this.kkkC(),["LVG"]:()=>this.lvgC(),["LTT"]:()=>this.lntC(),["SFE"]:()=>this.sfeC(),["TCN"]:()=>this.tcanC(),["XDV"]:()=>this.xdvC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}t;m;enforceEffect(t){const i=this.m(t),r=this.enforcementActive(t)?this.t(t):this.friendNone(t);this.applyEffect(t,i,r)}bwwC(){this.faction="T",this.rarity="H",this.name="Borean Windweaver",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.iMobile=this.level,this.tribe.push("WN","AS"),this.text=`Each other friendly creature gets Mobility ${this.level}.`,this.t=this.friendNotMe,this.m=this.bwwM}bwwM(t){return b.mod("MB",this.level,t.id)}hrtC(){this.faction="U",this.rarity="L",this.name="Heart Tree",this.iAttack=0,this.iHealth=this.lValN([10,15,30]),this.iRegen=this.boof246,this.iDefend=!0,this.tribe.push("PL"),this.text=`Each other friendly creature gets Regenerate ${this.iRegen}.`,this.t=this.friendNotMe,this.m=this.hrtM}hrtM(t){return b.mod("RG",this.iRegen,t.id)}kkkC(){if(this.faction="T",this.rarity="L",this.name="Korok, Khan of Kadras",this.iAttack=this.lValN([4,7,12,18]),this.iHealth=this.lValN([7,12,18,26]),this.iAggro=!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.t=this.kkkT,this.m=this.kkkM}kkkM(t){return b.mod("AG",!0,t.id)}kkkT(t){const i=this.friendNotMe(t);return this.level===1?i.lanes=[]:i.level=w.ddf2(this.level-1),i}lvgC(){this.faction="T",this.rarity="T",this.name="Lava Golem",this.iAttack=4,this.iHealth=6,this.maxLevel=1,this.tribe.push("FR","EL"),this.text=`Friendly creature have ${y.jr9(4,0)}.`,this.t=this.friendNotMe,this.m=this.lvgM}lvgM(t){return b.mod("AT",4,t.id)}lntC(){this.faction="T",this.rarity="T",this.name="Lightning Titan",this.iAttack=6,this.iHealth=4,this.maxLevel=1,this.iAggro=!0,this.tribe.push("LT","EL"),this.text="Friendly creature have Aggressive.",this.t=this.friendNotMe,this.m=this.lntM}lntM(t){return b.mod("AG",!0,t.id)}sfeC(){this.faction="T",this.rarity="H",this.name="Shadowflame Elemental",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.iAggro=!0,this.tribe.push("DF","EL"),this.text="Each other friendly Darkforged gets Aggressive.",this.t=this.sfeT,this.m=this.sfeM}sfeM(t){return b.mod("AG",!0,t.id)}sfeT(t){const i=this.friendNotMe(t);return i.tribe="DF",i}tcanC(){this.faction="A",this.rarity="C",this.name="Tower Cannoneer",this.iAttack=this.lValN([6,12,14]),this.iHealth=this.iAttack-2,this.tribe.push("RB"),this.level===2&&(this.hints=["LB"]),this.text=`Each friendly Defender gets ${y.jr9(this.boof369,0)}`,this.t=this.tcanT,this.m=this.tcanM}tcanM(t){return b.mod("AT",this.boof369,t.id)}tcanT(t){const i=this.friendNotMe(t);return i.hasDefender=!0,i}xdvC(){this.faction="N",this.rarity="H",this.name="Xrath, Dreadnight Of Varna",this.iAttack=this.boof5914,this.iHealth=this.iAttack+1,this.iRegen=this.boof248,this.tribe.push("ZB"),this.text=`Each other friendly Zombie gets Regenerate ${this.iRegen}`,this.t=this.xdvT,this.m=this.xdvM}xdvM(t){return b.mod("RG",this.iRegen,t.id)}xdvT(t){const i=this.friendNotMe(t);return i.tribe="ZB",i}}class Mi extends P{cons(t){({["NXP"]:()=>this.nxpC(),["SKG"]:()=>this.skgC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){t.lane===3?this.m(t).forEach(i=>{t.addModSafe(i)}):t.removeModSafe(t.id)}nxpC(){this.faction="A",this.rarity="C",this.name="Nexus Pilot",this.iAttack=this.boof358,this.iHealth=this.boof4710,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets ${y.jr9(this.iAttack,this.iHealth)}.`,this.m=this.nxpM}nxpM(t){return[b.mod("AT",this.iAttack,t.id),b.mod("HL",this.iHealth,t.id),b.mod("MH",this.iHealth,t.id)]}skgC(){this.faction="A",this.rarity="C",this.name="Skyknight Glider",this.iAttack=this.boof5916,this.iHealth=this.iAttack+1,this.tribe.push("HM"),this.text=`While ${this.name} is in the center lane, it gets Mobility 2.`,this.m=this.skgM}skgM(t){return[b.mod("MB",2,t.id)]}}class ei extends P{cons(t){({["CCT"]:()=>this.cctC(),["GHB"]:()=>this.ghbC(),["ISB"]:()=>this.isbC(),["PYG"]:()=>this.pygC()})[t]()}eOpp=!1;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){!!t.opposed===this.eOpp?t.addModSafe(this.m(t)):t.removeModSafe(t.id)}cctC(){this.faction="T",this.rarity="R",this.name="Cloudcleaver Titan",this.iAttack=this.boof4812,this.iHealth=this.lValN([7,10,16]),this.tribe.push("WN","GT"),this.iMobile=this.level;const t=this.boof246;this.text=`While ${this.name} is unopposed, it gets ${y.jr9(t,0)}.`,this.m=this.cctM}cctM(t){return b.mod("AT",this.boof246,t.id)}ghbC(){this.faction="U",this.rarity="R",this.name="Gemhide Basher",this.iAttack=this.boof51016,this.iHealth=this.lValN([3,7,10]),this.tribe.push("DN"),this.eOpp=!0,this.text=`While ${this.name} is opposed, it gets Aggressive.`,this.m=this.ghbM}ghbM(t){return b.mod("AG",!0,t.id)}isbC(){this.faction="T",this.rarity="C",this.name="Iceshard Berserker",this.iAttack=this.boof358,this.iHealth=this.boof61016,this.tribe.push("IC","AS"),this.eOpp=!0,this.text=`While ${this.name} is opposed, it gets ${y.jr9(this.iHealth,0)}.`,this.m=this.isbM}isbM(t){return b.mod("AT",this.iHealth,t.id)}pygC(){this.faction="T",this.rarity="H",this.name="Pyre Giant",this.iAttack=this.boof468,this.iHealth=this.boof234,this.tribe.push("FR","GT"),this.iAggro=!0,this.text=`While ${this.name} is unopposed, it gets ${y.jr9(this.iAttack,0)}.`,this.m=this.pygM}pygM(t){return b.mod("AT",this.iAttack,t.id)}}class Ei extends P{cons(t){({["BRS"]:()=>this.barryC(),["CSR"]:()=>this.cvsC()})[t]()}mPlayer=0;targetPlayer(t){if(this.mPlayer===1)return t.owner;if(this.mPlayer===-1)return!t.owner;throw new Error("didnt write code OBDD")}constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=t.status==="A",r=this.targetPlayer(t);i?k.addModSafe(r,this.m(t)):k.removeModSafe(r,t.id)}barryC(){this.faction="A",this.rarity="C",this.name="Barrier Soldier",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("HM"),this.mPlayer=1,this.hints=[this.lValH(["ZZ-1","ZZ-3","ZZ-5"])],this.text=`You get Armor ${this.iHealth}.`,this.m=this.barryM}barryM(t){return b.mod("AR",this.iHealth,t.id)}cvsC(){this.faction="U",this.rarity="C",this.name="Cavern Serpent",this.iAttack=this.boof4914,this.iHealth=this.iAttack,this.tribe.push("SN"),this.mPlayer=-1,this.text=`The enemy player has Poison ${this.boof246}.`,this.m=this.cvsM}cvsM(t){return b.mod("PN",this.boof246,t.id)}}class Ze extends Pi{cons(t){({["ALG"]:()=>this.algnC(),["ALS"]:()=>this.alstC(),["BTN"]:()=>this.btcC(),["NXA"]:()=>this.aeroC(),["NXT"]:()=>this.ntcC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}m;nexus=!1;enforcementActive(t){return super.enforcementActive(t)?this.nexus?t.lane===3:!0:!1}enforceEffect(t){const i=this.m(t);let r;this.enforcementActive(t)?(r=this.friendNotMe(t),this.nexus?r.lanes=[1,2,4,5]:r.lanes=t.adjacent):r=this.friendNone(t),this.applyEffect(t,i,r)}algnC(){this.faction="A",this.rarity="R",this.name="Alloyin General",this.iAttack=this.boof246,this.iHealth=this.boof81318,this.tribe.push("HM"),this.text=`Adjacent creatures gets ${y.jr9(this.iAttack,0)}.`,this.m=this.algnM}algnM(t){return b.mod("AT",this.iAttack,t.id)}alstC(){this.faction="A",this.rarity="H",this.name="Alloyin Strategist",this.iAttack=this.boof4814,this.iHealth=this.iAttack+1,this.iMobile=this.level,this.tribe.push("HM");const t=this.boof246;this.text=`Adjacent creatures gets ${y.jr9(t,0)}.`,this.m=this.alstM}alstM(t){return b.mod("AT",this.boof246,t.id)}btcC(){this.faction="A",this.rarity="H",this.name="Battle Techtician",this.iAttack=this.boof3714,this.iHealth=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 ${y.jr9(t,0)}.`,this.m=this.btcM}btcM(t){return b.mod("AT",this.boof248,t.id)}aeroC(){this.faction="A",this.rarity="L",this.name="Nexus Aeronaut",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.iMobile=1;const t=this.boof236;this.nexus=!0,this.text=`While ${this.name} is in the center lane, each other friendly creature gets ${y.jr9(t,0)}. Otherwise this gets Armor ${t}.`,this.m=this.aeroM}aeroM(t){return b.mod("AT",this.boof236,t.id)}ntcC(){this.faction="A",this.rarity="H",this.name="Nexus Techtician",this.iHealth=this.boof6916,this.iAttack=this.iHealth-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 ${t}.`,this.m=this.ntcM}ntcM(t){return b.mod("AR",this.boof235,t.id)}}class Ge extends P{cons(t){({["BWD"]:()=>this.bwdC(),["BTS"]:()=>this.btsC(),["ESC"]:()=>this.escarC(),["EHN"]:()=>this.ethhC(),["POD"]:()=>this.podC(),["RWC"]:()=>this.roamC()})[t]()}targAction(t){this.replc(this.spawnCode,t.playerA,t.lane)}adjacent=!1;optional=!1;needsEmpty=!1;spawnCode="";ftext="";allied="X";constructor(t){super(t),this.cons(this.cardCode());const i=y.forglied(this.allied);this.text=i+": "+this.ftext}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){if(this.cardCode()==="POD"&&!L.patron("U")){x.triggerDone();return}if(this.allied==="X"||L.allied(this.allied)){const i=p.creatByTr(t),r=b.emptyPlayerActTarg("F","CARD",this.code,t.creatId);this.needsEmpty||(r.field="A",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>c!==i.lane)),this.adjacent&&(r.lanes=i.adjacent);const n=w.toActions(r);n.length>0?(this.optional&&n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){this.targAction(t),T.actionDone(!0)}bwdC(){this.faction="U",this.rarity="C",this.name="Branchweaver Druid",this.iAttack=1,this.iHealth=1,this.tribe.push("HM"),this.hints=["RT"],this.spawnCode=`${"TFD"}${this.level}`,this.optional=!0;const t=W.getCard(this.spawnCode);this.ftext=`You may put a ${y.tokName(t)} into another lane.`}btsC(){this.faction="U",this.rarity="C",this.name="Brighttusk Sower",this.iAttack=this.boof6810,this.iHealth=this.iAttack,this.tribe.push("TK"),this.level===1&&(this.hints=["ZZ-1"]),this.spawnCode=K.minionCode(this.level),this.optional=!0,this.adjacent=!0;const t=W.getCard(this.spawnCode);this.ftext=`You may put a ${y.tokName(t)} into an adjacent lane.`}escarC(){this.faction="A",this.rarity="H",this.name="Esperian Scarab",this.iAttack=this.boof347,this.iHealth=this.boof5711,this.iArmor=this.boof135,this.tribe.push("RB"),this.allied="U",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.iAttack=this.boof369,this.iHealth=this.iAttack,this.tribe.push("ST","WF"),this.needsEmpty=!0,this.spawnCode=this.code,this.ftext="Put a copy of this into an available lane."}podC(){this.faction="U",this.rarity="H",this.name="Patron of Deepwood",this.iHealth=this.boof4713,this.iAttack=this.iHealth+3,this.tribe.push("ST"),this.spawnCode=this.code,this.optional=!0,this.adjacent=!0,this.ftext=`If you have three or more Uterra cards in your hand, you may put a copy of ${this.name} into an adjacent lane.`}roamC(){this.faction="U",this.rarity="C",this.name="Roaming Warclaw",this.iAttack=this.boof61016,this.iHealth=this.iAttack-3,this.tribe.push("DN"),this.spawnCode=`${"RPT"}${this.level}`,this.optional=!0,this.ftext="You may put a 1/1 Raptor into another lane."}}class jr extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Epoch Hawk",this.iAttack=this.boof469,this.iHealth=this.boof71117,this.tribe.push("MC");const i=W.getCard(this.soldier);this.addSp("N",i.iAttack),this.text=`While you have 6 or more cards in hand, this gets "Activate: Put a ${y.tokName(i)} into an available lane."`,this.bonus=this.multNug(this.spawnNug(i,"TX"),.3)}canActivate(t){return k.toPlayer(t.owner).hand.length>5&&p.emptyLanes(t.owner).length>0}startActivation(t){const i=b.emptyPlayerActTarg(t.owner,"CARD",this.code,t.id),r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){this.logAct(!0),this.poot(this.soldier,t.playerA,t.lane),p.jr5(t.param).endActivation()}ddf8(t){return!0}jr8(t){const i=k.toPlayer(t.owner);k.drawCard(i,1);const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.triggers.splice(r,1),x.triggerDone()}get soldier(){return "EPS"+this.level}}class Qr extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Esperian Sage",this.iAttack=this.boof3510,this.iHealth=this.boof124,this.tribe.push("HM"),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 r=super.jr3(t,i),n=r.jr4("FR");n.interactive=!0;const c=r.jr4("EF");return c.interactive=!0,r}handleAction(t){if(t.zone==="H")L.levelAndDiscardA(t),this.anim8(t.param);else{const i=t;p.birth(this.code,"R",i.playerA,i.lane,"U")}T.actionDone(!0)}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(t.trigger.type==="FR")if(L.allied("U")){const i=p.creatByTr(t),r=b.actionTarget("TF","CARD",this.code,t.creatId);r.player="F",r.lanes=p.laneIdx.filter(c=>c!==i.lane),r.hint=["FL"];const n=w.toActions(r);n.push(T.noneEndTrigger()),T.ddf5(n)}else x.triggerDone();else{const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}}}class Jr extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Esperian Steelplate",this.iAttack=this.boof369,this.iHealth=this.boof6916,this.tribe.push("IN");const i=this.boof358;this.addSp("H",i),this.text=`Activate: Heal ${i} damage from each other friendly creature.~Allied Alloyin: Armor ${this.boof247}.`,this.bonus=this.buffNug(0,i,"TW")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){const i=b.crFriendNotMeTarg(t.id);return p.creatByTarget(i).length>0}startActivation(t){const i=w.boardTarget("CARD",this.code);i.param=t.id,T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=this.boof358,n=b.crFriendNotMeTarg(i.id);p.creatByTarget(n).forEach(c=>{c.heal(r)}),i.endActivation()}jr8(t){L.allied("A")&&p.creatByTr(t).addArmor(this.boof247),x.triggerDone()}}class _r extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Everflame Phoenix",this.iAttack=this.lValN([7,0,22]),this.iHealth=this.lValN([6,1,15]),this.tribe.push("PX"),this.iMobile=this.lValN([1,0,2]),this.level===2?(this.iDefend=!0,this.text=`When you gain a rank, replace ${this.name} with a level 3 ${this.name}.`,this.hints=["LG"]):this.level===3&&(this.text=`Vengeance: Put a level 2 ${this.name} into this lane.`,this.hints=["ZZ-3"])}jr3(t,i){const r=super.jr3(t,i);if(this.level===2){const n=r.jr4("RU");n.bonus=this.buffNug(10,9,"TH")}else if(this.level===3){const n=r.jr4("VN");n.bonus=this.statSpawnNug(0,1)}return r}ddf8(t){return t.event.playerA===t.owner}jr8(t){if(t.trigger.type==="RU"){const i=p.creatByTr(t);this.replc(`${"EFP"}3`,i.owner,i.lane)}else if(t.trigger.type==="VN"){const r=I.toCreature(t.event).creature;this.replc(`${"EFP"}2`,r.owner,r.lane)}x.triggerDone()}}class ts extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Everflow Eidolon",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("PL"),this.text=`When ${this.name} gains health, you gain ${this.level===3?"2x ":""}that much health.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("HG");return n.bonus=this.playerNug(this.iHealth/2,"TW"),n.batch=!0,r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=this.level===3?2:1;this.balm(t.owner,t.event.healAmt*i,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class es extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Frostmane Dragon",this.iAttack=this.lValN([6,9,13]),this.iHealth=this.iAttack+1,this.tribe.push("IC","DG"),this.hints=["ZZ-1"],this.iMobile=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 r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){this.poot(`${"FME"}${this.level}`,t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner}jr8(t){const i=p.creatByTr(t);if(t.event.code==="ENT"){const r=i.jr4("TS");r.interactive=!0,r.changes=!0,r.bonus=this.rawNug(1,0,6,0,0,"TX"),this.anim8(i),x.triggerDone()}else if(t.event.code==="TRS"){const r=b.trigIdx(i.triggers,t.trigger);r>-1&&i.removeTrigger(i.triggers[r]);const n=b.emptyPlayerActTarg("F","CARD",this.code,""),c=w.toActions(n);c.length===0?x.triggerDone():(c.push(T.noneEndTrigger()),T.ddf5(c))}}}class is extends vt{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 ${y.jr9(i,0)} this turn.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.friends().length>0)return b.crEnemyActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.friends(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{this.logSpell(r);const n=this.boof4711;this.smack(p.jr5(i[1]),n),this.modA(r,b.modT("AT",n)),T.spellCast()}}friends(t=""){const i=b.crFriendActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class rs extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Frostspeaker Shaman",this.iAttack=this.boof248,this.iHealth=this.boof71116,this.iDefend=!0,this.tribe.push("IC","YT"),this.addSp("D",this.iAttack),this.text=`Activate: Deal ${this.iAttack} damage to an enemy creature or player.`,this.bonus=this.buffNug(this.iAttack,0,"TX")}canActivate(t){return!0}startActivation(t){const i=b.crEnemyActTarg("CARD",this.code,t.id),r=b.playerActTarg("E","CARD",this.code,t.id),n=w.toActions([i,r]);n.push(T.cancelAction()),T.ddf5(n)}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.smack(r,this.iAttack)}else{this.logAct(!0);const r=t;this.ouch(r.playerA,this.iAttack),this.anim8(i)}i.endActivation()}}class ss extends vt{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.`}firstT(){if(this.baddies().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.canArmor=!0,t}else return}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=T.cancelAction(),c=this.baddies(r.id);c.push(n),T.ddf5(c)}else{const n=p.jr5(i[1]);this.logSpell(n);const c=this.boof2510;n.addArmor(c),this.smack(r,n.armor),T.spellCast()}}baddies(t=""){return w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t)))}}class as extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Gemhide Ravager",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("DN"),this.text=`When ${this.name} ${y.dbdtap()}, you gain that much health.~Allied Tempys: Mobility ${this.level}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.playerNug(this.iAttack,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="FR")L.allied("T")&&p.creatByTr(t).addMobility(this.level,"T"),x.triggerDone();else if(t.trigger.type==="DM"){const i=t.event;this.balm(t.owner,i.dmg),this.anim8(t.creatId),x.triggerDone()}}}class ns extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Glaceus, Tundra Tyrant",this.iAttack=this.boof5916,this.iHealth=this.iAttack+2,this.tribe.push("IC","EL");const i=`Gain Rank: each enemy ${y.levelGateText(this.level)}creature gets "When this is dealt damage, destroy it."`,r=this.level===3?"At the start of each turn, deal 1 damage to each enemy creature.~":"";this.text=r+i}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RU");if(n.bonus=this.statSpawnNug(0,0,"TH"),this.level===3){const c=r.jr4("TS");c.bonus=this.buffNug(3,0,"TW")}return r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;if(i.isCreatTarg&&i.target===t.creatId)return!0}return t.trigger.type==="RU"?t.event.playerA===t.owner:t.trigger.type==="TS"}jr8(t){if(t.trigger.type==="RU"){const i=b.crEnemyTarg();i.level=w.ddf2(this.level),p.creatByTarget(i).forEach(r=>{const n=r.jr4("DM",this.code);n.bonus=this.rawNug(0,0,0,0,-.5*this.level),n.changes=!0,this.anim8(r)})}else if(t.trigger.type==="TS"){const i=E.tick();p.qEnemyCreats().forEach(r=>{this.smack(r,1,i)})}else if(t.trigger.type==="DM"){const i=p.creatByTr(t);i.status==="A"&&this.kill(i)}x.triggerDone()}}class os extends P{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Grapplevine",this.iAttack=this.boof357,this.iHealth=this.boof91218,this.tribe.push("PL"),this.text="Negate Mobility from each creature.",this.level===3&&(this.hints=["ZZ+2"])}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=p.qActiveCreats();t.status==="A"?i.forEach(r=>{r.addModSafe(b.mod("NM",!0,t.id))}):i.forEach(r=>{r.removeModSafe(t.id)})}}class hs extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Grave Pact",this.free=this.level===3,this.free||(this.hints=["LG"]),this.text=`Destroy a friendly creature.~Destroy an ${y.levelGateText(this.level+1)}enemy creature.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.enemyTargActions().length>0)return b.crFriendActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.enemyTargActions(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{this.logSpell();const n=E.tick();this.kill(p.jr5(i[1]),n),this.kill(r,n),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return i.level=w.ddf2(this.level+1),w.toActions(i)}}class ls extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="G.S.F. Commando",this.iAttack=this.lValN([3,6,11]),this.iHealth=this.boof81219,this.iArmor=this.level,this.tribe.push("MM"),this.text=`Forge: ${this.name} gets Armor 1 for each other friendly Metamind.~Activate: Deal damage equal to ${this.level}x ${this.name}'s Armor to an enemy creature.`,this.bonus=this.buffNug(0,2*this.level,"TX")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.armor>0&&p.qEnemyCreats().length>0}startActivation(t){const i=b.crEnemyActTarg("CARD",this.code,t.id);T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){const i=p.jr5(t.param);this.smack(p.ddf6(t),i.armor*this.level),i.endActivation()}jr8(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="MM";const r=p.creatByTarget(i).length;r>0&&p.creatByTr(t).addArmor(r),x.triggerDone()}}class cs extends vt{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Guardians Assemble",this.free=this.level===3,this.free||(this.hints=["LG"]);const i=this.level===1?"Put a copy of a random Forge Guardian from your deck":"Search your deck for a Forge Guardian and put a copy";this.text=`${i} into the center lane.`}canPlay(){return this.voltrons(!1).length>0}playTargets(){const t=b.actionTarget("TF","CARD",this.code,"");return t.player="F",t.lanes=3,this.level>1&&(t.param="P1"),[t]}voltrons(t){const i=k.getActive(),r=b.target("DK");r.player=k.toTarget(i),r.tribe="GD";const n=bt.generateContent(i.deck,!1,r);return t?bt.uniqueContent(n):n}tron(t){this.replc(t,k.activeA,3)}handleAction(t){if(this.level===1){const i=this.voltrons(!1),r=i[S.randInt(0,i.length)].cardCode;this.logSpell(),this.tron(r),T.spellCast()}else if(t.param==="P1"){const i=this.voltrons(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else this.logSpell(),this.tron(t.card),gt.popMode(),T.spellCast()}}class us extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="H.E.R.M.E.S.",this.iAttack=this.boof6915,this.iHealth=this.iAttack,this.tribe.push("RB"),this.text=`At the end of your turn, each other friendly creature gets Defender and Armor ${this.boof124} until the end of the next turn.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TE",this.code);n.bonus=this.playerNug(0,"TX");const c=r.addEffect("PS",this.code);return c.area="C",r}ddf8(t){return!0}jr8(t){const i=p.creatByTr(t);this.enforceEffect(i),this.anim8(i),x.triggerDone()}enforceEffect(t){const i=this.boof124,r=b.crNotMeTarg(t.id);r.player=k.toTarget(t.owner);const n=p.creatByTarget(r),c=t.status==="A",f=k.activeA===t.owner,m=Qt.phase==="ET"||Qt.phase==="PT";c&&(f&&m||!f&&!m)?n.forEach(C=>{C.addModSafe(b.mod("AR",i,t.id)),C.addModSafe(b.mod("DF",!0,t.id))}):n.forEach(C=>{C.removeModSafe(t.id)})}}class ds extends vt{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.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.enemyTargActions().length>0)return b.crFriendActTarg("CARD",this.code,"P1")}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=this.enemyTargActions(r.id);n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[1]);this.logSpell(n,r);const c=this.boof359;this.buffA(n,c),this.buffA(r,-c),T.spellCast()}}enemyTargActions(t=""){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t));return w.toActions(i)}}class fs extends P{constructor(t){super(t),this.faction="U",this.rarity="C",this.name="Hunting Pack",this.iAttack=this.boof3612,this.iHealth=this.boof248,this.tribe.push("WF"),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 r=super.jr3(t,i),n=r.jr4("EF");return n.interactive=!0,r}handleAction(t){this.poot(this,t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.creatId===t.creatId}jr8(t){if(S.randInt(0,nt.simOn?4:2)===1){const r=b.emptyPlayerActTarg("F","CARD",this.code,""),n=b.actionTarget("TB","NOTR",this.code,""),c=w.toActions([r,n]);c.length===1?x.triggerDone():T.ddf5(c)}else x.triggerDone()}}class gs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Iniog, Carrion Demon",this.iAttack=this.lValN([0,12,20]),this.iHealth=this.boof3713,this.tribe.push("DM");let i;this.level===1?(this.iDefend=!0,i=5):(this.iMobile=1,this.iRegen=this.level===2?5:10,i=10,this.hints=["ZZ-5"]);let r;this.level===3?r="When this gains health, deal that much damage to the enemy player.~Vengeance: Put a level 1 Iniog into this lane.":r=`When a creature is destroyed, this gets Regenerate 1.~At the end of your turn, if this has Regenerate ${i} or higher, replace it with a level ${this.level+1} Iniog.`,this.text=r}jr3(t,i){const r=super.jr3(t,i);if(this.level===3){const n=r.jr4("HG");n.bonus=this.playerNug(4,"TX"),n.batch=!0;const c=r.jr4("VN");c.bonus=this.buffNug(0,3)}else{const n=r.jr4("DS");n.bonus=this.regnNug(2);const c=r.jr4("TE"),f=W.getCard(this.levelUpCard());c.bonus=this.multNug(this.buffNug(f.iAttack,f.iHealth,"TX"),.4)}return r}ddf8(t){return t.trigger.type==="TE"?t.event.playerA===t.owner:t.trigger.type==="HG"?t.event.creatId===t.creatId:t.trigger.type==="DS"}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="HG")this.ouch(!t.owner,t.event.healAmt,t.draw),t.draw&&this.anim8(i);else if(t.trigger.type==="VN")this.poot("ICD"+"1",i.owner,i.lane);else if(t.trigger.type==="DS")this.regn(i,1);else if(t.trigger.type==="TE"){const r=this.level===1?4:9;i.regen>r&&this.replc(this.levelUpCard(),i.owner,i.lane)}x.triggerDone()}}class ms extends P{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Flame",this.iAttack=this.boof71220,this.iHealth=this.boof6915,this.tribe.push("FR","EL"),this.iAggro=!0,this.text=`When Iztek ${y.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 r=super.jr3(t,i),n=r.jr4("PC");n.bonus=this.buffNug(0,this.iAttack);const c=r.jr4("DM");return c.bonus=this.buffNug(this.iAttack,0,"TP"),r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId}else if(t.trigger.type==="PC"){const i=t.event;if(i.playerA===t.owner)return i.cardCode.slice(0,3)==="IFR"}return!1}jr8(t){const i=p.creatByTr(t);t.trigger.type==="DM"?(this.ouch(!t.owner,t.event.dmg),this.anim8(i)):t.trigger.type==="PC"&&this.replc(`${"IZR"}${this.level}`,i.owner,i.lane),x.triggerDone()}}class ps extends P{image(t){return super.fixedImage(t)}constructor(t){super(t),this.faction="T",this.rarity="T",this.name="Iztek, Avatar of Frost",this.iAttack=this.boof6915,this.iHealth=this.boof71220,this.tribe.push("IC","EL"),this.iAggro=!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.`,this.bonus=this.buffNug(i,0,"TW")}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.buffNug(0,this.iAttack,"TW"),r}canActivate(t){return!0}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["HR"];const r=w.toActions([i,w.buttonTarget("CANC")]);T.ddf5(r)}handleAction(t){this.logAct(!0),this.smack(p.ddf6(t),this.boof2510),p.jr5(t.param).endActivation()}ddf8(t){return t.event.playerA===t.owner&&t.event.cardCode.slice(0,3)==="IFL"}jr8(t){const i=p.creatByTr(t);this.replc(`${"IZL"}${this.level}`,i.owner,i.lane),x.triggerDone()}}class ys extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Killer Bee",this.iAttack=this.boof135,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("IN"),this.hints=[this.lValH(["ZZ+2","ZZ+2","ZZ+3"])];const i=this.lValS(["Poison 1","Poison 3","that much Poison"]);this.text=`When ${this.name} deals battle damage to a creature or player, they get ${i}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.regnNug(this.iAttack,"TP"),n.bonus.pHealth=this.iAttack,r}ddf8(t){return t.event.battle&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){const i=I.toDamage(t.event),r=this.lValN([1,3,i.dmg]);i.isCreatTarg?i.hurtCreat.addPoison(r):(k.addPoison(i.hurtPlayer,r),this.anim8(i.srcCreat)),x.triggerDone()}}class bs extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Killion, Infinity Warden",this.maxLevel=4,this.iAttack=this.lValN([6,9,16,22]),this.iHealth=this.lValN([3,7,14,20]),this.tribe.push("FB");let i;this.level<3?i=`a ${y.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 r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=this.level<4,r}handleAction(t){const i=k.getActive();if(t.zone==="N"){const r=W.getCard(i.discard[t.position]);i.discard[t.position]=r.levelUpCard(),gt.popMode(),this.anim8(t.param),T.actionDone(!0)}else Dt.levelInHand(i,t.position,W.getCard(t.card).levelUpCard()),this.anim8(t.param),this.discardLevel(!0,t.param)}jr8(t){if(this.level<3)this.discardLevel(!1,t.creatId);else if(this.level===3){const i=w.toActions(b.lvlHandActTarg(this.code,t.creatId));i.length>0?T.ddf5(i):this.discardLevel(!1,t.creatId)}else{const i=k.getActive();this.levelDeck(i.deck),this.levelDeck(i.discard),i.hand.forEach((r,n)=>{const c=W.getCard(r).levelUpCard();c!==r&&Dt.levelInHand(i,n,c)}),this.anim8(t.creatId),x.triggerDone()}}discardLevel(t,i){const r=k.getActive(),n=b.target("TD");n.player=k.toTarget(r),n.level=w.ddf2(this.level),n.canLevel=!0;let c=bt.generateContent(r.discard,!1,n);if(c.length>0){E.aiActive&&(c=bt.uniqueContent(c));const f=c.map(m=>{const C=b.deckSelectAction("CARD",m.cardCode,m.sourceIdx);return C.param=i,C.host=this.code,C.hint=["CD"],C});bt.showCustomDeck(c,f)}else t?T.actionDone(!0):x.triggerDone()}levelDeck(t){t.map(r=>W.getCard(r).levelUpCard()).forEach((r,n)=>t[n]=r)}}class As extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Lavafused Asir",this.iAttack=this.boof369,this.iHealth=this.iAttack*2,this.tribe.push("FR","AS"),this.text=`While a friendly creature is unopposed, gets ${y.jr9(this.iAttack,0)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){const i=t.status!=="A",r=b.mod("AT",this.iAttack,t.id);p.qPlayerCreats(t.owner).forEach(n=>{n.opposed||i?n.removeModSafe(t.id):n.addModSafe(r)})}}class ks extends P{constructor(t){if(super(t),this.faction="U",this.rarity="L",this.name="Leafkin Progenitor",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("PL"),this.level===3)this.text=`Activate: Put a level 1 ${this.name} into an adjacent available lane.`,this.bonus=this.statSpawnNug(3,3,"TW");else{this.text=`Activate: Replace this with a level ${this.level+1} ${this.name}.`;const i=3*this.level;this.bonus=this.buffNug(i,i,"TX")}}canActivate(t){return this.level===3?T.emptyAdjacents(t,"").length>0:!0}startActivation(t){let i;if(this.level===3)i=T.emptyAdjacents(t,"");else{const r=b.fieldSelectAction("CARD",t.lane,t.owner);r.param=t.id,r.host=this.code,i=[r]}i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.level===3?this.poot(this.leafCode(1),t.playerA,t.lane):this.replc(this.leafCode(this.level+1),i.owner,i.lane),i.endActivation()}leafCode(t){return`${"LKP"}${t}`}}class Fe extends P{cons(t){({["AFO"]:()=>this.aetorC(),["CRS"]:()=>this.scootC(),["FOL"]:()=>this.forcC(),["NXO"]:()=>this.nexoC(),["SNK"]:()=>this.tinkC(),["TEX"]:()=>this.texC(),["TSM"]:()=>this.tsmithC()})[t]()}playTarg;optional=!1;constructor(t){super(t),this.playTarg=b.lvlHandActTarg(this.code,""),this.cons(this.cardCode()),this.text="Forge: "+this.text}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){if(this.cardCode()==="NXO"&&p.creatByTr(t).lane!==3){x.triggerDone();return}const i=w.toActions(this.playTarg);i.length>0?(i.forEach(r=>{r.param=t.creatId}),this.optional&&i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}aetorC(){this.faction="A",this.rarity="C",this.name="Aetherforge Oracle",this.iAttack=this.boof61218,this.iHealth=this.boof246,this.tribe.push("HM"),this.optional=!0,this.playTarg.card="S",this.text="You may discard and level up a spell."}scootC(){this.faction="A",this.rarity="R",this.name="Cerebral Scout",this.iAttack=this.boof51015,this.iHealth=this.boof3712,this.tribe.push("MM"),this.optional=!0,this.playTarg.tribe="MM",this.text="You may discard and level up a Metamind."}forcC(){this.faction="A",this.rarity="H",this.name="Forge Oracle",this.iAttack=this.lValN([1,10,20]),this.iHealth=this.iAttack,this.tribe.push("ST"),this.playTarg.faction="A",this.optional=!0,this.text="You may discard an Alloyin card and level it.",this.level===1?this.hints=["LG","RT"]:(this.consistent=!0,this.addSp("C",0),this.level===3&&(this.hints=["ZZ-2"]))}nexoC(){this.faction="A",this.rarity="C",this.name="Nexus Overwatch",this.iHealth=this.boof71014,this.iAttack=this.iHealth-1,this.tribe.push("HM"),this.optional=!0,this.text=`If ${this.name} is in the center lane, you may ${y.daluac()}.`}tinkC(){this.faction="A",this.rarity="C",this.name="Steelspark Tinkerer",this.iAttack=this.boof147,this.iHealth=this.lValN([9,12,21]),this.iDefend=!0,this.tribe.push("HM"),this.optional=!0,this.text=`You may ${y.daluac()}.`}texC(){this.faction="A",this.rarity="C",this.name="Tech Explorer",this.iAttack=this.lValN([1,8,18]),this.iHealth=this.iAttack+2,this.tribe.push("GN"),this.level===1&&(this.hints=["LG","RT"]),this.optional=!0,this.playTarg.card="C",this.text="You may discard and level up a creature."}tsmithC(){this.faction="A",this.rarity="C",this.name="Technosmith",this.iAttack=this.boof5915,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.optional=!0,this.text=`You may ${y.daluac()}.`}}class Ts extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Lightbringer Council",this.iAttack=this.boof4810,this.iHealth=this.boof71116,this.tribe.push("TK"),this.text=`When a friendly Uterra creature ${y.dbdtap()}, you gain ${this.iAttack} health.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.playerNug(this.iAttack,"TP"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner&&i.srcCreat.faction==="U"}jr8(t){this.balm(t.owner,this.iAttack,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class de extends P{cons(t){({["ASB"]:()=>this.asbC(),["CHR"]:()=>this.crgC(),["DZD"]:()=>this.dozC(),["DTR"]:()=>this.dtrC(),["FWS"]:()=>this.fwsC(),["IMD"]:()=>this.eddieC(),["LVH"]:()=>this.hiveC(),["NCM"]:()=>this.ncmbC(),["S01"]:()=>this.spcC(),["TDS"]:()=>this.tsrC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}d;cares=!0;trigB;bDraw=!0;deadOk=!1;image(t){return this.cardCode()==="DZD"?this.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.cares){const n=r.jr4("DM");n.bonus=this.trigB,n.batch=this.bDraw}return r}ddf8(t){return t.event.isCreatTarg&&t.event.target===t.creatId&&(this.deadOk||p.creatByTr(t).status==="A")}jr8(t){const i=I.toDamage(t.event);this.d(t,i.hurtCreat,i),x.triggerDone()}asbC(){this.faction="A",this.rarity="L",this.name="Alyssa, Strifeborn",this.iAttack=this.boof2410,this.iHealth=this.lValN([12,16,24]),this.tribe.push("HM"),this.hints=["MC"],this.trigB=this.buffNug(this.iAttack,0,"TS"),this.text=`When ${this.name} is dealt non-battle damage and survives, it gets ${y.jr9(this.level,1)} for each damage dealt.`,this.d=this.asbD}asbD(t,i,r){!r.battle&&r.life>0&&i.buff(r.dmg*this.level,r.dmg,this.bFac(t))}crgC(){this.faction="U",this.rarity="L",this.name="Chrogias",this.iAttack=this.lValN([1,0,40]),this.iHealth=this.lValN([1,15,40]),this.tribe.push("PL"),this.deadOk=!0,this.level>1&&(this.hints=["MC"],this.text="When Chrogias is dealt damage, you gain that much health.",this.trigB=this.playerNug(5,"TW")),this.level===1?(this.hints=["LG","LM","RT"],this.cares=!1):this.level===2?(this.iRegen=2,this.iDefend=!0,this.hints?.push("LG")):this.level===3&&(this.iBT=!0,this.iRegen=5),this.d=this.crgD}crgD(t,i,r){this.balm(t.owner,r.dmg,t.draw),t.draw&&this.anim8(i)}dozC(){this.faction="U",this.rarity="L",this.name="Dozer, the Dormant",this.iAttack=0,this.iHealth=this.level*3+6,this.tribe.push("BR"),this.iDefend=!0,this.hints=["MC"],this.bDraw=!1,this.level===1&&this.hints.push("ZZ-2"),this.trigB=this.buffNug(this.iHealth,0,"TW"),this.trigB.bonus=.3;const t=W.getCard(this.dz());this.text=`When ${this.name} is dealt damage and survives, replace it with a ${y.tokName(t)}.`,this.d=this.dozD}dozD(t,i,r){if(i.health>0&&i.status==="A"){const n=this.replc(this.dz(),i.owner,i.lane);n&&n.setHealth(i.health)}}dz(){return "DZA"+this.level}dtrC(){this.faction="U",this.rarity="L",this.name="Dream Tree",this.iAttack=0,this.iHealth=this.lValN([7,11,20]),this.iDefend=!0,this.tribe.push("PL"),this.bDraw=!1,this.deadOk=!0,this.level===3&&(this.iRegen=5),this.hints=["MC"],this.trigB=this.avgSpawnNug(),this.trigB.threat="TX",this.text=`When ${this.name} is dealt damage and survives, if it is your turn, you may play an additional card this turn.`,this.d=this.dtrD}dtrD(t,i,r){i.owner===k.activeA&&r.life>0&&(this.logAct(!1),L.freePlay(),this.anim8(i))}fwsC(){this.faction="A",this.rarity="H",this.name="Forgewatch Sentry",this.iAttack=this.boof6912,this.iHealth=this.iAttack,this.iArmor=this.iAttack,this.tribe.push("RB"),this.bDraw=!1,this.trigB=this.rawNug(0,0,0,0,-1),this.text=`When ${this.name} is dealt damage, destroy it.`,this.d=this.fwsD}fwsD(t,i,r){i.status==="A"&&this.kill(i)}eddieC(){this.faction="A",this.rarity="L",this.name="Iron Maiden",this.iAttack=this.lValN([1,3,30]),this.iHealth=this.iAttack,this.tribe.push("RB"),this.deadOk=!0,this.consistent=this.level>1,this.level===3?(this.iBT=!0,this.hints=["MC"],this.text="When Iron Maiden is dealt damage, deal that much damage to the enemy player.",this.trigB=this.playerNug(16,"TW")):(this.cares=!1,this.hints=["LG","LM","RT"]),this.d=this.eddieD}eddieD(t,i,r){this.ouch(!t.owner,r.dmg,t.draw),t.draw&&this.anim8(i)}hiveC(){this.faction="U",this.rarity="L",this.name="Living Hive",this.iAttack=this.lValN([0,0,10]),this.iHealth=this.lValN([8,12,15]),this.tribe.push("IN","EL"),this.iDefend=this.level<3,this.deadOk=!0,this.bDraw=!1,this.hints=["MC"];const t=W.getCard(K.bee(this.level));this.text=`When ${this.name} is dealt damage, Spawn a level ${y.tokName(t)}.`,this.iDefend||(this.iBT=!0,this.text+=`~Forge: ${this.name} gets +X attack and +X health, where X is the total amount of Poison the enemy player has.`),this.trigB=this.spawnNug(t,"TX"),this.d=this.hiveD}hiveD(t,i,r){this.logAct(!1),this.spawn(K.bee(this.level),t.owner)}ncmbC(){this.faction="N",this.rarity="H",this.name="Necromoeba",this.iAttack=this.boof4710,this.iHealth=this.boof71117,this.tribe.push("OZ"),this.iRegen=3,this.deadOk=!0,this.bDraw=!1,this.hints=["MC"],this.level===1&&this.hints.push("ZZ-1");const t=W.getCard(K.purpOzC(this.level));this.text=`When ${this.name} is dealt damage, Spawn a ${y.tokName(t)}.`,this.trigB=this.spawnNug(t,"TW"),this.d=this.ncmbD}ncmbD(t,i,r){this.logAct(!1),this.spawn(K.purpOzC(this.level),t.owner)}spcC(){this.faction="A",this.rarity="L",this.name="Specimen 001",this.iAttack=this.boof234,this.iHealth=this.lValN([12,16,22]),this.tribe.push("OZ"),this.deadOk=!0,this.bDraw=!1,this.hints=["MC"],this.trigB=this.rawNug(0,ft.calcCreatValueFormula(this.iAttack,0,this.level,0,0,!1,0),0,0,0,"TX"),this.text=`When ${this.name} is dealt non-battle damage, each other friendly creature gets ${y.jr9(this.iAttack,0)} and Armor ${this.level}.`,this.d=this.spcD}spcD(t,i,r){if(!r.battle){const n=b.crNotMeTarg(i.id);n.player=k.toTarget(i.owner),p.creatByTarget(n).forEach(c=>{this.buffA(c,this.iAttack),c.addArmor(this.level)})}}tsrC(){this.faction="U",this.rarity="L",this.name="Thundersaur",this.iAttack=0,this.iHealth=this.level*12,this.tribe.push("DN"),this.iBT=!0,this.hints=["MC",this.level===2?"ZZ-3":"ZZ-1"],this.trigB=this.buffNug(this.iHealth/2,0,"TS"),this.text=`When ${this.name} is dealt damage, it gets +1 attack for each damage dealt.`,this.d=this.tsrD}tsrD(t,i,r){i.buff(r.dmg,0,this.bFac(t))}}class vs extends de{jr3(t,i){const r=super.jr3(t,i);return this.level===3&&r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=k.totalPoison(!t.owner);i>0&&this.buffD(p.creatByTr(t),i),x.triggerDone()}else super.jr8(t)}}class Ss extends Gt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=p.creatByTarget(b.crNotMeTarg(t.creatId)),r=this.boof124;i.forEach(n=>n.addPoison(r)),x.triggerDone()}else super.jr8(t)}}class Cs extends vt{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Metatransfer",this.text=`Give a creature ${y.jr9(-this.boof579,0)}.~Discard and level up a card.`}canPlay(){return p.qActiveCreats().length>0}playTargets(){const t=b.crActTarg("CARD",this.code,"P1");return t.hint=["DB"],[t]}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=p.ddf6(t),n=b.lvlHandActTarg(this.code,S.enTil("P2",r.id));n.deckPositionSkip=T.playPosition();const c=w.toActions(n);c.length===0?(this.logSpell(r),this.buffA(r,-this.boof579),T.spellCast()):(c.push(T.cancelAction()),T.ddf5(c))}else{const r=p.jr5(i[1]);this.logSpell(r),this.buffA(r,-this.boof579);const n=t;T.shiftPlayCard(n.position),L.levelAndDiscardA(n),T.spellCast()}}}class ws extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Mimicleaf",this.iAttack=this.lValN([2,5,11]),this.iHealth=this.iAttack,this.tribe.push("PL"),this.text=`Activate: Put a level ${this.level} ${this.name} into an adjacent available lane.`,this.bonus=this.statSpawnNug(this.iAttack,this.iHealth,"TW")}canActivate(t){return T.emptyAdjacents(t,"").length>0}startActivation(t){const i=T.emptyAdjacents(t,"");i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.poot(this,t.playerA,t.lane),i.endActivation()}}class Ds extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Mimicwurm",this.iAttack=7,this.iHealth=this.iAttack,this.tribe.push("WR"),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 r=super.jr3(t,i);if(this.level>1){const n=r.jr4("FR");n.interactive=!0}return r}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1")if(this.level===3){this.wurmsign(2,t);const r=[t.lane,parseInt(i[1])],n=this.fieldActions("P2",r);T.ddf5(n)}else this.wurmsign(1,t),T.actionDone(!0);else this.wurmsign(1,t),T.actionDone(!0)}jr8(t){const i=I.toCreature(t.event);T.ddf5(this.fieldActions("P1",[i.creature.lane]))}fieldActions(t,i){const r=b.actionTarget("TF","CARD",this.code,S.enTil(t,i[0]));r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(c=>!i.includes(c));const n=w.toActions(r);return n.push(T.noneEndTrigger()),n}wurmsign(t,i){this.replc(this.wurmCode(t),i.playerA,i.lane)}wurmCode(t){return`${"MMW"}${t}`}}class Pe extends vt{cons(t){({["BRN"]:()=>this.boutC(),["IFL"]:()=>this.izfmC(),["LSK"]:()=>this.lspkC(),["LYR"]:()=>this.rainC(),["SOK"]:()=>this.sealkC(),["STB"]:()=>this.shatC(),["SHK"]:()=>this.shkC()})[t]()}hurts=!0;burner(t,i){i?this.smack(t,this.crisp):this.ouch(t,this.crisp)}burnText(t){return`Deal ${t} damage to a creature or player.`}constructor(t){super(t),this.cons(this.cardCode())}z;crisp=0;playTargets(){const t=this.hurts?["HR"]:["BF"],i=b.crActTarg("CARD",this.code,"");i.hint=t;const r=b.actionTarget("TP","CARD",this.code,"");return r.hint=t,[i,r]}handleAction(t){let i,r;t.zone==="P"?(this.logSpell(),i=!1,r=t.playerA):(r=p.ddf6(t),this.logSpell(this.hurts?void 0:r),i=!0),this.z(r,i),T.spellCast()}boutC(){this.faction="T",this.rarity="R",this.name="Burnout",this.overload=!0,this.maxLevel=1,this.crisp=8,this.text=this.burnText(8),this.z=this.burner}izfmC(){this.faction="T",this.rarity="T",this.name="Iztek's Flame",this.crisp=this.boof6915,this.text=this.burnText(this.crisp),this.z=this.burner}lspkC(){this.faction="T",this.rarity="C",this.name="Lightning Spark",this.crisp=this.boof6812,this.text=this.burnText(this.crisp),this.z=this.burner}rainC(){this.faction="U",this.rarity="C",this.name="Lysian Rain",this.hurts=!1;const t=this.boof7911;this.text=`Give a creature or player +${t} health.`,this.z=this.rainZ}rainZ(t,i){const r=this.boof7911;i?this.buffH(t,r):this.balm(t,r)}sealkC(){this.faction="T",this.rarity="C",this.name="Seal of Kadras",this.level<3&&(this.hints=["LG"]),this.consistent=this.level>1,this.crisp=this.sealzap,this.text=this.burnText(this.crisp),this.z=this.burner}get sealzap(){return this.lValN([1,2,25])}shatC(){this.faction="T",this.rarity="C",this.name="Shatterbolt",this.crisp=this.boof5914,this.text=`Negate Armor from a creature or player this turn, then deal ${this.crisp} damage to that creature or player.`,this.z=this.shatZ}shatZ(t,i){const r=b.modT("NA",!0);if(i){const n=t;this.modA(n,r),this.smack(n,this.crisp)}else{const n=k.toPlayer(t);k.addMod(n,r),this.ouch(n,this.crisp)}}shkC(){this.faction="T",this.rarity="H",this.name="Static Shock",this.crisp=this.boof124,this.hints=["ZZ+1"],this.text=`${this.burnText(this.crisp)} You may play an additional ${y.levelGateText(this.level)}spell this turn.`,this.z=this.shkZ}shkZ(t,i){this.burner(t,i);const r=L.freeCard(this.code);r.condition.level=w.ddf2(this.level),r.condition.card="S"}}class xs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Nefrax, the Soulweaver",this.iAttack=this.boof4712,this.iHealth=this.lValN([10,15,25]),this.tribe.push("HM"),this.hints=["ZZ-2"];const i=W.getCard(this.spc());this.text=`Activate: Put a ${y.tokName(i)} into an available lane.~Forge: Destroy a friendly creature.`,this.bonus=this.spawnNug(i,"TX")}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}canActivate(t){return this.empties(t).length>0}startActivation(t){const i=this.empties(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);i[0]==="P1"?(this.logAct(!0),this.poot(this.spc(),t.playerA,t.lane),p.jr5(i[1]).endActivation()):(this.kill(p.ddf6(t)),T.actionDone(!0))}jr8(t){const i=b.crFriendActTarg("CARD",this.code,""),r=w.toActions(i);T.ddf5(r)}spc(){return "SPN"+this.level}empties(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,S.enTil("P1",t.id));return w.toActions(i)}}class Bs extends P{constructor(t){super(t),this.faction="N",this.rarity="T",this.name="Netherdrake",this.iAttack=this.boof4815,this.iHealth=this.iAttack,this.iMobile=this.lValN([0,0,1]),this.tribe.push("DG"),this.text=`When this enters play or moves into a lane, destroy the opposing ${y.levelGateText(this.level)}creature.`}image(t){return this.rawImage(`${"NSH"}${this.level}`,t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FK");return n.bonus=this.multNug(this.avgSpawnNug(),.5),n.bonus.threat="TX",r.jr4("EF"),r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const r=I.toCreature(t.event).creature.opposed;r&&w.levelTestCommon(r.level,this.level)&&this.kill(r),x.triggerDone()}}class Hs extends Ze{enforceEffect(t){t.lane===3?t.removeModSafe(t.id):t.addModSafe(b.mod("AR",this.boof236,t.id)),super.enforceEffect(t)}}class Ns extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Nexus Gunner",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("HM"),this.text=`Activate: Give a creature ${y.jr9(this.iAttack,0)}. Use this ability only if ${this.name} is in the center lane.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.lane===3}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["BF","BB"];const r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){const i=p.ddf6(t);this.logAct(!0,i),this.buffA(i,this.iAttack),p.jr5(t.param).endActivation()}jr8(t){const i=p.creatByTr(t);if(i.lane===3){const r=i.jr4("NT");r.bonus=this.buffNug(this.iAttack/2,0,"TW")}x.triggerDone()}}class Fs extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Nova, Grove Queen",this.iAttack=this.lValN([3,5,10,14]),this.iHealth=this.lValN([7,10,15,19]),this.tribe.push("FB"),this.maxLevel=4;const i=this.nbuf,r=this.lValS(["an adjacent","each adjacent","each","each"]);this.text=`Forge: Put a 1/1 Seedling into ${r} available space.~When a friendly creature is replaced, Nova gets ${y.jr9(i,i)}.`}get nbuf(){return this.lValN([1,3,5,10])}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");this.level===1&&(n.interactive=!0);const c=r.jr4("RP"),f=this.nbuf;return c.bonus=this.buffNug(f,f,"TS"),r}ddf8(t){const i=I.toReplaced(t.event);return t.creatId!==i.replCreatId&&t.owner===i.replCreat.owner}jr8(t){const i=p.creatByTr(t);if(t.event.code==="RPL")this.buffD(i,this.nbuf),x.triggerDone();else{const r=p.emptyLanes(t.owner);if(this.level>1){const n=this.level===2?i.adjacent.filter(f=>r.includes(f)):r,c=E.tick();n.forEach(f=>{this.poot(this.seed,i.owner,f,c)}),x.triggerDone()}else{const n=i.adjacent.filter(c=>r.includes(c));if(n.length===0)x.triggerDone();else if(n.length===1)this.poot(this.seed,i.owner,n[0]),x.triggerDone();else{const c=T.emptyAdjacents(i,"");T.ddf5(c)}}}}handleAction(t){this.poot(this.seed,t.playerA,t.lane),T.actionDone(!0)}get seed(){return "NSD"+this.level}}class Ps extends vt{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Omnomnom";const i=this.boof246,r=i*-1;this.text=`Give a friendly Zombie ${y.jr9(i,i,!0)}, and Regenerate ${i}.~Then give an enemy non-Zombie ${y.jr9(r,r)}.`}canPlay(){const t=this.firstT();return t?p.creatByTarget(t).length>0:!1}playTargets(){return[this.firstT()]}firstT(){if(this.nonZombies().length>0){const t=b.crFriendActTarg("CARD",this.code,"P1");return t.tribe="ZB",t}else return}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=T.cancelAction(),c=this.nonZombies(r.id);c.push(n),T.ddf5(c)}else{const n=p.jr5(i[1]);this.logSpell(n,r);const c=this.boof246;this.buffD(n,c),this.regn(n,c),this.buffD(r,-c),T.spellCast()}}nonZombies(t=""){return w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",t))).filter(i=>!p.ddf6(i).isTribe("ZB"))}}class Ms extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Onyxium Allomancer",this.iAttack=this.boof248,this.iHealth=this.boof61016,this.tribe.push("HM");const i=this.boof358;this.text=`Activate: Discard and level up a card.~Allied Nekrium: Regenerate ${i}.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW")}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0),L.levelAndDiscardA(t);const i=p.jr5(t.param);this.anim8(i),i.endActivation()}jr8(t){L.allied("N")&&p.creatByTr(t).addRegen(this.boof358,"N"),x.triggerDone()}}class Es extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Onyxium Phantasm",this.iAttack=this.boof246,this.iHealth=this.lValN([9,12,19]),this.iRegen=this.boof124,this.tribe.push("ST");const i=this.boof4812n;this.addSp("A",i),this.text=`Allied Alloyin: Activate: Give a creature ${y.jr9(i,0)}`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return t.hasMod(t.id)}startActivation(t){const i=b.crActTarg("CARD",this.code,t.id);i.hint=["DF","DB"];const r=w.toActions(i);r.push(T.cancelAction()),T.ddf5(r)}handleAction(t){const i=p.ddf6(t);this.logAct(!0,i),this.buffA(i,this.boof4812n),p.jr5(t.param).endActivation()}jr8(t){if(L.allied("A")){const i=p.creatByTr(t);i.addMod(b.mod("AL",!0,i.id),"A"),i.changed=!0;const r=i.jr4("NT");r.bonus=this.buffNug(this.boof4812,0,"TX")}x.triggerDone()}}class Rs extends vt{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Oratek Battlebrand";const i=this.boof71013;this.addSp("D",i),this.text=`Deal ${i} damage to a creature.~Allied Alloyin: You may discard a card and level it.`}canPlay(){return p.qActiveCreats().length>0}playTargets(){const t=b.crActTarg("CARD",this.code,"");return t.hint=["HR"],[t]}handleAction(t){if(t.zone==="F")if(this.logSpell(),this.smack(p.ddf6(t),this.boof71013),L.allied("A")){const i=this.levelActs();i.length===1?T.spellCast():T.ddf5(i)}else T.spellCast();else if(t.zone==="H"){const i=t;T.shiftPlayCard(i.position),L.levelAndDiscardA(i),T.spellCast()}else t.zone==="B"&&t.param==="NOTR"?T.spellCast():super.handleAction(t)}levelActs(){const t=b.actionTarget("TB","CARD",this.code,"NOTR"),i=b.lvlHandActTarg(this.code,"");return i.deckPositionSkip=T.playPosition(),w.toActions([i,t])}}class Ls extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Oratek Warhammer",this.iAttack=this.boof3713,this.iHealth=this.boof81219,this.iMobile=this.level,this.tribe.push("FR","AS"),this.text=`Allied Alloyin: When ${this.name} ${y.dbdtap()} on your turn, you may discard and level up a card.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){L.levelAndDiscardA(t),p.jr5(t.param).anim8("A"),T.actionDone(!0)}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}jr8(t){if(t.trigger.type==="FR"){if(L.allied("A")){const i=p.creatByTr(t),r=i.jr4("DM");r.interactive=!0,r.bonus=this.rawNug(0,0,0,0,.5,"TP"),i.changed=!0,i.anim8("A")}x.triggerDone()}else if(t.trigger.type==="DM"){const i=w.toActions(b.lvlHandActTarg(this.code,t.creatId));i.length>0?(i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}}}class Ai extends P{hitCreature;constructor(t,i){super(t),this.hitCreature=i}trigB;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.trigB,r}ddf8(t){return t.event.battle&&t.event.isCreatTarg===this.hitCreature&&t.event.isCreatSrc&&t.event.srcId===t.creatId}}class Gs extends Ai{constructor(t){super(t,!1),this.faction="U",this.rarity="L",this.name="Oros, Deepwood's Chosen",this.iAttack=this.lValN([7,11,16,0]),this.iHealth=this.iAttack,this.iBT=!0,this.maxLevel=4,this.tribe.push("FB"),this.hints=["ZZ-2"];const i=`When Oros ${y.dbdtap()}, you gain that much health.`,r=this.level===4?"Oros gets +attack and +health equal to your health.~":"";this.text=r+i,this.trigB=this.playerNug(this.iAttack/2,"TP")}jr3(t,i){const r=super.jr3(t,i);return this.level===4&&r.addEffect("PH",this.code),r}jr8(t){const i=t.event;this.balm(t.owner,i.dmg),this.anim8(t.creatId),x.triggerDone()}enforceEffect(t){const i=k.toPlayer(t.owner).health;t.status==="A"&&(t.removeModSafe(t.id,!1),t.addMod(b.mod("HL",i,t.id),"X"),t.addMod(b.mod("MH",i,t.id),"X"),t.addMod(b.mod("AT",i,t.id),"X"))}}class Is extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Othra, Apex Predator",this.iAttack=this.lValN([8,0,10]),this.iHealth=this.lValN([6,12,50]),this.tribe.push("IN"),this.level===3?(this.iMobile=1,this.text="When Othra deals battle damage to a creature or player, they get Poison 10.",this.hints=["ZZ-5"]):(this.text=`Gain Rank: Replace this with a level ${this.level+1} Othra.`,this.level===2?this.iDefend=!0:this.hints=["ZZ-1"])}jr3(t,i){const r=super.jr3(t,i);if(this.level===3){const n=r.jr4("DM");n.bonus=this.regnNug(10,"TP")}else{const n=r.jr4("RU");n.bonus=this.regnNug(this.level,"TH")}return r}ddf8(t){if(t.trigger.type==="DM"){const i=t.event;return i.battle&&i.isCreatSrc&&i.srcId===t.creatId}return t.trigger.type==="RU"?t.event.playerA===t.owner:!1}jr8(t){if(t.trigger.type==="RU"){const i=p.creatByTr(t);this.replc(this.levelUpCard(),i.owner,i.lane)}else if(t.trigger.type==="DM"){const i=I.toDamage(t.event);i.isCreatTarg?i.hurtCreat.addPoison(10):(k.addPoison(i.hurtPlayer,10),this.anim8(i.srcCreat))}x.triggerDone()}}class Ws extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Oxidon Spitter",this.iAttack=this.boof7914,this.iHealth=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 r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!this.l3,r}jr8(t){if(this.l3)p.creatByTarget(b.crEnemyTarg()).forEach(i=>{i.negateArmor=!0}),x.triggerDone();else{const i=b.crEnemyActTarg("CARD",this.code,""),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),i.negateArmor=!0,T.actionDone(!0)}}class fe extends P{cons(t){({["AFS"]:()=>this.afsC(),["DMW"]:()=>this.drixC(),["FGG"]:()=>this.fggC(),["GHS"]:()=>this.mvpC(),["MMG"]:()=>this.mmgC(),["OWW"]:()=>this.owwC(),["SST"]:()=>this.sstC(),["UPM"]:()=>this.upakC(),["WFM"]:()=>this.wfmC(),["XTE"]:()=>this.xerxC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}a;t;preFight=!1;prePlay=!1;canActivate(t){return this.t(t)}startActivation(t){const i=w.boardTarget("CARD",this.code);i.param=t.id,this.preFight&&(i.hint=["BB"]),this.prePlay&&(i.hint=["DF"]),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param);this.a(i),i.endActivation()}afsC(){this.faction="A",this.rarity="L",this.name="Arcflight Squadron",this.iAttack=this.boof4710,this.iHealth=this.iAttack+2,this.tribe.push("RB"),this.hints=[this.level===1?"ZZ-3":"ZZ-2"],this.prePlay=!0,this.text=`Activate: You may play an additional ${y.levelGateText(this.level)}Robot this turn.`,this.bonus=this.avgSpawnNug(),this.bonus.threat="TX",this.t=this.afsT,this.a=this.afsA}afsT(t){return!0}afsA(t){const i=L.freeCard(this.code);i.condition.tribe="RB",i.condition.level=w.ddf2(this.level),this.anim8(t)}drixC(){this.faction="A",this.rarity="L",this.name="Drix, the Mindwelder",this.iAttack=this.boof3612,this.iHealth=this.lValN([6,12,21]),this.tribe.push("MM"),this.preFight=!0,this.addSp("A",this.level),this.text=`Activate, discard your hand: Each friendly Metamind gets ${y.jr9(this.level,0)} for each card discarded this way.`,this.bonus=this.buffNug(3*this.level,0,"TX"),this.t=this.drixT,this.a=this.drixA}drixT(t){return k.getActive().hand.length>0}drixA(t){const i=k.toPlayer(t.owner),r=i.hand.length*this.level;Dt.cardDiscardAll(i);const n=b.crFriendTarg();n.tribe="MM",p.creatByTarget(n).forEach(c=>{this.buffA(c,r)})}fggC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Gamma",this.iAttack=this.boof4816,this.iHealth=this.iAttack,this.tribe.push("RB","GD"),this.preFight=!0;const t=W.getCard(K.fgoc(this.level));this.addSp("N",t.iAttack),this.text=`Activate, destroy five friendly Robot Guardians: Put a ${y.tokName(t)} into this lane.`,this.bonus=this.rawNug(0,0,0,0,1,"TW"),this.t=this.fggT,this.a=this.fggA}fggT(t){return p.creatByTarget(this.fggTarg()).length===5}fggA(t){const i=t.lane,r=t.owner,n=E.tick();p.creatByTarget(this.fggTarg()).forEach(c=>this.kill(c,n)),this.poot(K.fgoc(this.level),r,i)}fggTarg(){const t=b.crFriendTarg();return t.tribe="GD",t}mvpC(){this.faction="U",this.rarity="C",this.name="Gemheart Sprout",this.iAttack=this.boof357,this.iHealth=this.iAttack+this.level,this.iDefend=!0,this.tribe.push("PL"),this.preFight=!0,this.addSp("L",this.level),this.text=`Activate: You gain health equal to ${this.level}x the number of friendly creatures.`,this.bonus=this.playerNug(this.level*3,"TW"),this.t=this.mvpT,this.a=this.mvpA}mvpT(t){return!0}mvpA(t){const i=p.ddf1().length;this.balm(t.owner,i*this.level),this.anim8(t)}mmgC(){this.faction="A",this.rarity="L",this.name="Marty McGear",this.iAttack=this.boof3612,this.iHealth=this.boof71117,this.tribe.push("GN"),this.hints=[this.lValH(["ZZ-2","ZZ-2","ZZ-5"])],this.addSp("A",this.level),this.addSp("M",this.level),this.text=`Activate: Spawn a copy of a random ${y.levelGateText(this.level)}Robot from your deck. That Robot gets ${y.jr9(this.level,0)} and Armor ${this.level}.`,this.bonus=this.avgSpawnNug(),this.bonus.threat="TX",this.t=this.mmgT,this.a=this.mmgA}mmgT(t){return p.ddf1().length<5&&this.mmgBots().length>0}mmgA(t){const i=this.mmgBots(),r=i[S.randInt(0,i.length)],n=this.spawn(r,t.owner);n&&(n.addArmor(this.level),this.buffA(n,this.level))}mmgBots(){const t=b.target("DK");return t.player="F",t.tribe="RB",t.level=w.ddf2(this.level),w.deckByTarget(t).map(r=>r[0])}owwC(){this.faction="A",this.rarity="L",this.name="Oreian Warwalker",this.iAttack=this.boof359,this.iHealth=this.boof61018,this.tribe.push("RB"),this.preFight=!0;const t=this.owwbuff+1;this.addSp("A",t),this.text=`Activate: ${this.name} gets ${t}x attack.`,this.bonus=this.buffNug(2*this.iAttack,0,"TX"),this.t=this.owwT,this.a=this.owwA}owwT(t){return!0}owwA(t){this.buffA(t,t.attack*this.owwbuff)}get owwbuff(){return this.lValN([1,1,2])}sstC(){this.faction="U",this.rarity="C",this.name="Scatterspore Tiller",this.iHealth=this.boof61014,this.iAttack=this.iHealth-1,this.tribe.push("PL");const t=W.getCard(K.minionCode(this.level));this.text=`Activate: Spawn a ${y.tokName(t)}`,this.bonus=this.spawnNug(t,"TW"),this.t=this.sstT,this.a=this.sstA}sstT(t){return p.ddf1().length<5}sstA(t){this.spawn(K.minionCode(this.level),t.owner)}upakC(){this.faction="U",this.rarity="L",this.name="Uterra Packmaster",this.iAttack=this.boof6914,this.iHealth=this.iAttack,this.tribe.push("HM"),this.preFight=!0;const t=this.boof124;this.addSp("U",t),this.text=`Activate: Each other friendly Uterra creature gets ${y.jr9(t,t)}.`,this.bonus=this.multNug(this.buffNug(t,t,"TX"),1.5),this.t=this.upakT,this.a=this.upakA}upakT(t){return p.creatByTarget(this.upakTarg(t.id)).length>0}upakA(t){const i=this.boof124;p.creatByTarget(this.upakTarg(t.id)).forEach(r=>{this.buffD(r,i)})}upakTarg(t){const i=b.crFriendNotMeTarg(t);return i.faction="U",i}wfmC(){this.faction="T",this.rarity="H",this.name="Wildfire Maiden",this.iAttack=this.boof4610,this.iHealth=this.boof5814,this.tribe.push("FR","AS"),this.text=`Activate, destroy ${this.name}: Deal damage equal to its attack to each enemy creature.`,this.bonus=this.rawNug(0,0,0,0,.5,"TW"),this.t=this.wfmT,this.a=this.wfmA}wfmT(t){return!0}wfmA(t){const i=E.tick();p.creatByTarget(b.crEnemyTarg()).forEach(r=>{this.smack(r,t.attack,i)}),this.kill(t)}xerxC(){this.faction="N",this.rarity="L",this.name="Xerxes, the Executioner",this.iAttack=this.boof5915,this.iHealth=this.iAttack+2,this.tribe.push("GG");const t=-this.boof135;this.addSp("U",t),this.text=`Activate: Each non-Nekrium creature gets ${y.jr9(t,t)}.~If any enemy creatures are destroyed this way, Spawn one of them at random.`,this.bonus=this.buffNug(-t,-t,"TX"),this.t=this.xerxT,this.a=this.xerxA}xerxT(t){return this.xerxTargs().length>0}xerxA(t){const i=-this.boof135,r=[],n=E.tick();this.xerxTargs().forEach(f=>{this.buffD(f,i,n),f.owner!==t.owner&&f.health<1&&r.push(f)});const c=r.length;c>0&&this.spawn(r[S.randInt(0,c)].code,t.owner)}xerxTargs(){return p.qActiveCreats().filter(t=>t.faction!=="N")}}class Ri extends P{cons(t){({["MDE"]:()=>this.misdC(),["TAB"]:()=>this.thraC()})[t]()}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Assault: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);return r.jr4("AS"),r}jr8(t){this.f(t),x.triggerDone()}misdC(){this.faction="N",this.rarity="C",this.name="Misery Demon",this.iAttack=this.boof5915,this.iHealth=this.boof2510,this.tribe.push("DM");const t=this.level+3;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health.`,this.f=this.misdF}misdF(t){const i=this.level+3;this.ouch(!t.owner,i),this.balm(t.owner,i),this.anim8(t.creatId)}thraC(){this.faction="T",this.rarity="C",this.name="Thranik Ambusher",this.iAttack=this.boof5813,this.iHealth=this.iAttack,this.tribe.push("DK");const t=this.boof234;this.ftext=`${this.name} gets ${y.jr9(t,t)}.`,this.f=this.thraF}thraF(t){this.buffD(p.creatByTr(t),this.boof234)}}class yt extends P{cons(t){({["ATT"]:()=>this.atorC(),["BRH"]:()=>this.brhrC(),["BWN"]:()=>this.bulbC(),["CDM"]:()=>this.cmyC(),["CYR"]:()=>this.cycrC(),["DHM"]:()=>this.dhamC(),["FGD"]:()=>this.fgdC(),["FSP"]:()=>this.fspC(),["HMF"]:()=>this.hamfC(),["HOS"]:()=>this.hossC(),["HOD"]:()=>this.haroldC(),["IDF"]:()=>this.idfC(),["OJC"]:()=>this.ocarC(),["RLW"]:()=>this.restwandC(),["RHW"]:()=>this.ruthwandC(),["SCZ"]:()=>this.sczC(),["SHA"]:()=>this.smaC(),["SSP"]:()=>this.shspC(),["SDR"]:()=>this.spdryC(),["TDW"]:()=>this.tdwC(),["TNL"]:()=>this.tnlC(),["USY"]:()=>this.usyC(),["UTR"]:()=>this.urexC()})[t]()}iTrigger=!0;trigB;bDraw=!1;constructor(t){super(t),this.cons(this.cardCode())}t;b;jr3(t,i){const r=super.jr3(t,i);if(this.iTrigger){const n=r.jr4("EF");n.bonus=this.trigB,n.batch=this.bDraw}return r}ddf8(t){return this.t(t)}jr8(t){this.b(t),x.triggerDone()}truLive(t){return p.creatByTr(t).status==="A"}efp(t){return I.toEnterField(t.event)}efc(t){return this.efp(t).creature}friendTimeT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&yt.itBirthedFirst(i.id,t.creatId)}friendGuts(t,i){return i.creatId!==t.creatId&&t.creature.owner===i.owner&&this.truLive(i)}donkforgeT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&i.isTribe("DF")&&this.truLive(t)}donkforgeB(t){this.logAct(!1),p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}dftxt(){this.text=`When another friendly Darkforged enters play, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),.5),this.bDraw=!0}atorC(){this.faction="T",this.rarity="L",this.name="Ator, Thunder Titan",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.tribe.push("GT"),this.text=`Each other friendly ${y.levelGateText(this.level)}creature gets Assault: Aggressive.`,this.trigB=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.atorT,this.b=this.atorB}atorT(t){const i=this.efp(t);return i.forged&&this.friendGuts(i,t)&&w.levelTargetTest(w.ddf2(this.level),i.creature.level)&&!i.creature.opposed&&!i.creature.getState().aggressive}atorB(t){const i=this.efc(t);i.aggressive=!0,this.anim8(i)}brhrC(){this.faction="N",this.rarity="R",this.name="Brood Horror",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("AB"),this.text=`When another friendly creature enters play, it gets ${y.jr9(this.level,this.level)}. Then ${this.name} gets ${y.jr9(-this.level,-this.level)}.`,this.t=this.friendTimeT,this.b=this.brhrB}brhrB(t){const i=this.efc(t);this.logAct(!1,i),this.buffD(i,this.level),this.buffD(p.creatByTr(t),-this.level)}bulbC(){this.faction="A",this.rarity="H",this.name="Bulwark Battalion",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("GN");const t=this.boof468;this.text=`When another friendly creature enters play, it gets Armor ${t} until the end of the turn.`,this.trigB=this.regnNug(t,"TW"),this.t=this.friendTimeT,this.b=this.bulbB}bulbB(t){const i=this.efc(t);this.logAct(!1,i),this.modA(i,b.modT("AR",this.boof468))}cmyC(){this.faction="T",this.rarity="H",this.name="Cauldron Mystic",this.iAttack=this.boof357,this.iHealth=this.boof71015,this.tribe.push("YT"),this.text=`When a friendly creature enters play, deal ${this.boof234} damage to an enemy creature or player at random.`,this.trigB=this.buffNug(0,this.iAttack,"TX"),this.t=this.cmyT,this.b=this.cmyB}cmyT(t){const i=this.efc(t);return i.owner===t.owner&&yt.itBirthedFirst(i.id,t.creatId)}cmyB(t){const i=p.qPlayerCreats(!t.owner),r=S.randInt(0,i.length+1);r===i.length?(this.ouch(!t.owner,this.boof234),this.anim8(t.creatId)):this.smack(i[r],this.boof234)}cycrC(){this.faction="T",this.rarity="H",this.name="Cyclone Rider",this.iAttack=this.lValN([8,10,16]),this.iHealth=this.iAttack/2,this.tribe.push("WN","AS"),this.level===1&&(this.hints=["ZZ-2"]),this.text=`When an enemy creature enters play, if it is unopposed, move ${this.name} to the lane opposing that creature.`,this.trigB=this.rawNug(0,0,0,0,.5),this.t=this.cycrT,this.b=this.cycrB}cycrT(t){const i=this.efc(t);return i.owner!==t.owner&&!i.opposed}cycrB(t){const i=this.efc(t);i.opposed||this.lurk(p.creatByTr(t),p.oppositeLane(i.lane))}dhamC(){this.faction="U",this.rarity="R",this.name="Dusk Hammer",this.iAttack=this.boof51015,this.iHealth=this.boof4812,this.iBT=!0,this.tribe.push("DF","TK"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}fgdC(){this.faction="A",this.rarity="H",this.name="Forge Guardian Delta",this.iAttack=this.boof71117,this.iHealth=this.iAttack,this.tribe.push("RB","GD");const t=W.getCard(K.fgoc(this.level));this.text=`When ${this.name} enters play, if there is a friendly Alpha Beta, and Gamma, put a ${y.tokName(t)} in your discard pile.`,this.t=this.fgdT,this.b=this.fgdB}fgdT(t){return this.efc(t).id===t.creatId}fgdB(t){const i=p.qPlayerCreats(t.owner).map(r=>r.code.slice(0,3));if(i.includes("FGA")&&i.includes("FGB")&&i.includes("FGG")){const r=k.toPlayer(t.owner);r.discard.push(K.fgoc(this.level));const n=b.trigger("NT",this.code);n.bonus=this.rawNug(0,0,0,0,10),k.addTr(r,n),this.anim8(t.creatId)}}fspC(){if(this.faction="A",this.rarity="L",this.name="Flowsteel Prototype",this.iAttack=this.boof368,this.iHealth=this.lValN([8,15,20]),this.tribe.push("SS"),this.iTrigger=this.level>1,this.iTrigger){this.text=`When you Forge a ${y.levelGateText(this.level-1)}creature, ${this.name} gets +attack equal to that creature's attack.`;const t=this.avgCreatureStats(this.level-1);this.trigB=this.buffNug(t[0],0,"TS")}this.t=this.fspT,this.b=this.fspB}fspT(t){const i=this.efp(t);return i.forged&&i.creature.owner===t.owner&&i.creature.level0&&this.lurk(p.creatByTr(t),i[S.randInt(0,r)])}hossC(){this.faction="U",this.rarity="R",this.name="Harbinger of Spring",this.iAttack=this.lValN([5,8,11]),this.iHealth=this.iAttack,this.tribe.push("DY");const t=this.boof234;this.text=`When another friendly creature enters play, if it wasn't Forged, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),1.5),this.bDraw=!0,this.t=this.hossT,this.b=this.hossB}hossT(t){const i=this.efp(t);return this.friendGuts(i,t)&&!i.forged}hossB(t){this.logAct(!1,this.efc(t));const i=this.boof234;p.creatByTr(t).buff(i,i,this.bFac(t))}haroldC(){this.faction="T",this.rarity="R",this.name="Herald of Destruction",this.iAttack=this.boof369,this.iHealth=this.boof91218,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.trigB=this.playerNug(this.iAttack*.5,"TX"),this.bDraw=!0,this.t=this.haroldT,this.b=this.haroldB}haroldT(t){const i=this.efp(t);return i.creature.owner!==t.owner&&!i.forged&&this.truLive(t)}haroldB(t){const i=p.creatByTr(t);this.ouch(!i.owner,i.attack,t.draw),t.draw&&this.anim8(i)}idfC(){this.faction="N",this.rarity="H",this.name="Indomitable Fiend",this.iAttack=2,this.iHealth=2,this.maxLevel=1,this.tribe.push("ZB"),this.hints=["ST","ZZ+1"],this.text=`When ${this.name} enters play, if it wasn't Forged, it gets ${y.jr9(5,5)} for each player rank you are.`,this.t=this.idfT,this.b=this.idfB}idfT(t){const i=this.efp(t);return i.creature.id===t.creatId&&!i.forged}idfB(t){const i=5*k.toPlayer(t.owner).rank;this.buffD(this.efc(t),i)}ocarC(){this.faction="A",this.rarity="H",this.name="Oreian Justicar",this.iAttack=this.boof5814,this.iHealth=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 ${y.jr9(t,0)}.`,this.trigB=this.buffNug(-.5*t,0,"TX"),this.t=this.ocarT,this.b=this.ocarB}ocarT(t){const i=this.efp(t);return i.creature.owner!==t.owner&&!i.forged&&yt.itBirthedFirst(i.creature.id,t.creatId)}ocarB(t){this.buffA(this.efc(t),this.ocarbuff)}get ocarbuff(){return this.lValN([-5,-10,-20])}restwandC(){this.faction="U",this.rarity="H",this.name="Restless Wanderers",this.iAttack=this.boof51014,this.iHealth=this.boof3610,this.tribe.push("ST","WD");const t=this.boof369;this.text=`When another friendly Spirit Wanderer enters play, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),.5),this.t=this.restwandT,this.b=this.restwandB}restwandT(t){const i=this.efp(t);return i.creature.isTribe("WD")&&this.friendGuts(i,t)}restwandB(t){this.logAct(!1),this.buffD(p.creatByTr(t),this.boof369)}ruthwandC(){this.faction="N",this.rarity="C",this.name="Ruthless Wanderers",this.iAttack=this.boof3610,this.iHealth=this.boof51014,this.tribe.push("ST","WD");const t=this.boof369,i=-t;this.text=`When another friendly Spirit Wanderer enters play, the creature opposing this gets ${y.jr9(i,i)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TW"),.5),this.t=this.restwandT,this.b=this.ruthwandB}ruthwandB(t){const i=p.creatByTr(t).opposed;i&&(this.logAct(!1,i),this.buffD(i,-this.boof369))}sczC(){this.faction="N",this.rarity="R",this.name="Shadeclaw Zombie",this.iAttack=this.boof4812,this.iHealth=this.iAttack+this.level,this.iRegen=this.level,this.tribe.push("DF","ZB"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}smaC(){this.faction="A",this.rarity="R",this.name="Shadowmist Angel",this.iHealth=this.boof369,this.iAttack=this.iHealth*2,this.iArmor=this.level,this.tribe.push("DF","AG"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}shspC(){this.faction="U",this.rarity="H",this.name="Shroudthorn Splicer",this.iHealth=this.boof3711,this.iAttack=this.iHealth-1,this.tribe.push("DF","PL"),this.text=`When another friendly Darkforged enters play, if it was Forged, Spawn a ${this.iAttack}/${this.iHealth} Darkforged Mimic.`,this.trigB=this.statSpawnNug(this.iAttack,this.iHealth,"TX"),this.t=this.shspT,this.b=this.shspB}shspT(t){const i=this.efp(t);return i.forged&&i.creature.isTribe("DF")&&this.friendGuts(i,t)}shspB(t){this.spawn("DFM"+this.level,t.owner)}spdryC(){this.faction="U",this.rarity="R",this.name="Spring Dryad",this.iAttack=this.boof469,this.iHealth=this.iAttack,this.tribe.push("DY"),this.text=`When another friendly creature enters play, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.multNug(this.buffNug(this.level,this.level,"TS"),1.5),this.bDraw=!0,this.t=this.spdryT,this.b=this.spdryB}spdryT(t){return this.friendGuts(this.efp(t),t)}spdryB(t){this.logAct(!1,this.efc(t)),p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}tdwC(){this.faction="N",this.rarity="R",this.name="Tarsus Deathweaver",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof246;this.text=`When a friendly creature enters play, if it wasn't Forged, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TX"),this.t=this.tdwT,this.b=this.tdwB}tdwT(t){const i=this.efp(t);return i.creature.owner===t.owner&&!i.forged&&yt.itBirthedFirst(i.creature.id,t.creatId)}tdwB(t){this.buffD(this.efc(t),this.boof246)}tnlC(){this.faction="N",this.rarity="L",this.name="Tarsus Necrolord",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof124,i=W.getCard(K.zomc(this.level));this.text=`Forge: Spawn a ${y.tokName(i)} for each friendly creature that was destroyed this turn.~When a friendly Zombie enters play, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.bDraw=!0,this.t=this.tnlT,this.b=this.tnlB}tnlT(t){const i=this.efp(t);return i.creature.isTribe("ZB")&&this.friendGuts(i,t)}tnlB(t){const i=this.boof124;p.creatByTr(t).buff(i,i,this.bFac(t))}usyC(){this.faction="T",this.rarity="R",this.name="Umbraskin Yeti",this.iAttack=this.boof369,this.iHealth=this.iAttack*2,this.iMobile=this.level,this.tribe.push("DF","YT"),this.dftxt(),this.t=this.donkforgeT,this.b=this.donkforgeB}urexC(){this.faction="U",this.rarity="H",this.name="Uterradon Rex",this.iAttack=this.boof4813,this.iHealth=this.boof71118,this.tribe.push("DN");const t=this.boof124;this.text=`When another friendly Dinosaur enters play, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TW"),this.t=this.urexT,this.b=this.urexB}urexT(t){const i=this.efc(t);return t.creatId!==i.id&&i.owner===t.owner&&i.isTribe("DN")&&yt.itBirthedFirst(i.id,t.creatId)}urexB(t){this.buffD(this.efc(t),this.boof124)}static itBirthedFirst(t,i){if(t===i)return!0;let r=!1;const n=Bt.findDeathTime(i);if(S.isUn(n))r=!0;else{const c=p.findBirthTime(t);(S.isUn(c)||c<=n)&&(r=!0)}return r}}class De extends Ai{cons(t){({["AGM"]:()=>this.agamC(),["BWK"]:()=>this.blwalkC(),["BRF"]:()=>this.bfangC(),["CDT"]:()=>this.cadtC(),["FSL"]:()=>this.fslmC(),["GSC"]:()=>this.gcobC(),["IHA"]:()=>this.ibhaC(),["SHS"]:()=>this.shimfC()})[t]()}image(t){return this.rarity==="T"?this.fixedImage(t):this.leveledImage(t)}constructor(t){super(t,!0),this.cons(this.cardCode())}h;jr8(t){const i=I.toDamage(t.event);this.h(t,i,i.srcCreat,i.hurtCreat),x.triggerDone()}poos(t,i){t.status==="A"&&t.addPoison(i)}snek(t,i,r,n){this.poos(n,this.iAttack)}agamC(){this.faction="T",this.rarity="L",this.name="Agamemnon",this.iAttack=this.boof4814,this.iHealth=this.boof81218,this.level>1&&(this.iMobile=1,this.iAggro=this.level===3),this.tribe.push("GT"),this.text=`When ${this.name} ${y.dbdtac()} on your turn, this battles again.`,this.trigB=this.buffNug(this.iAttack/2,0),this.h=this.agamH}agamH(t,i,r,n){t.owner===k.activeA&&r.status==="A"&&this.wrang(r)}blwalkC(){this.faction="N",this.rarity="R",this.name="Blight Walker",this.iAttack=this.boof137,this.iHealth=this.lValN([5,10,17]),this.tribe.push("ZB"),this.text=`When ${this.name} ${y.dbdtac(this.level)}, destroy that creature.`,this.trigB=this.avgSpawnNug(),this.h=this.blwalkH}blwalkH(t,i,r,n){n.status==="A"&&w.levelTestCommon(n.level,this.level)&&this.kill(n)}bfangC(){this.faction="U",this.rarity="T",this.name="Broodfang",this.iAttack=this.level,this.iHealth=this.level,this.maxLevel=this.level,this.minLevel=this.level,this.tribe.push("SN"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}poisonText(t){return`When ${this.name} ${y.dbdtac()}, give that creature gets Poison ${t}.`}cadtC(){this.faction="U",this.rarity="R",this.name="Cadaverous Thicket",this.iAttack=this.boof135,this.iHealth=this.lValN([7,12,22]),this.tribe.push("PL"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}fslmC(){this.faction="N",this.rarity="C",this.name="Festering Slime",this.iAttack=this.level,this.iHealth=this.boof61218,this.tribe.push("OZ");const t=this.level+2;this.text=`When ${this.name} ${y.dbdtac()}, that creature gets ${y.jr9(-t,-t)}.`,this.trigB=this.buffNug(t,t),this.h=this.fslmH}fslmH(t,i,r,n){n.status==="A"&&this.buffD(n,this.lValN([-3,-4,-5]))}gcobC(){this.faction="U",this.rarity="C",this.name="Ghostscale Cobra",this.iAttack=this.boof4610,this.iHealth=this.boof135,this.tribe.push("SN"),this.text=this.poisonText(this.iAttack),this.trigB=this.regnNug(this.iAttack),this.h=this.snek}ibhaC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Hammer of Anvillon",this.iAttack=this.lValN([4,7,12,15]),this.iHealth=this.lValN([7,11,17,25]),this.iArmor=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 ${y.jr9(this.boof246n,0)}`;this.text=`When Ironbeard ${y.dbdtac()}, that creature${t}, and moves to an available enemy lane at random.`,this.trigB=this.buffNug(this.lValN([2,4,6,16]),0),this.h=this.ibhaH}ibhaH(t,i,r,n){if(n.status==="A"){const c=this.level===4?n.attack*-1:this.boof246n;this.buffA(n,c),p.fling(n,"A")}}shimfC(){this.faction="U",this.rarity="R",this.name="Shimmerfang Serpent",this.iAttack=this.boof357,this.iHealth=this.boof61016,this.tribe.push("SN"),this.text=`When ${this.name} ${y.dbdtac()}, that creatures gets that much Poison.`,this.trigB=this.regnNug(this.iAttack),this.h=this.shimfH}shimfH(t,i,r,n){this.poos(n,i.dmg)}}class ne extends Ai{cons(t){({["ABR"]:()=>this.ashbC(),["AMY"]:()=>this.ashmC(),["CFB"]:()=>this.cfbC(),["EPS"]:()=>this.epsdC(),["EFM"]:()=>this.efmC(),["FBC"]:()=>this.fbcC(),["RTS"]:()=>this.rzstC(),["RSE"]:()=>this.rselC(),["SVH"]:()=>this.strhyC(),["URB"]:()=>this.uridC(),["VES"]:()=>this.veskC()})[t]()}bothTurns=!0;constructor(t){super(t,!1),this.cons(this.cardCode())}h;jr8(t){const i=I.toDamage(t.event);i.srcCreat&&(this.bothTurns||i.srcCreat.owner===k.activeA)&&this.h(t,i,i.srcCreat),x.triggerDone()}ashyC(){this.faction="T",this.rarity="C",this.tribe.push("FR","AS");const t=this.boof124;this.text=`When ${this.name} ${y.dbdtap()}, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.ashyH}ashyH(t,i,r){this.buffD(r,this.boof124)}ashbC(){this.name="Ashurian Brawler",this.iAttack=this.boof7911,this.iHealth=this.iAttack,this.ashyC()}ashmC(){this.name="Ashurian Mystic",this.iAttack=this.boof3610,this.iHealth=this.boof5812,this.iAggro=!0,this.ashyC()}cfbC(){this.faction="T",this.rarity="H",this.name="Cinderfist Brawler",this.iAttack=this.boof71014,this.iHealth=this.boof357,this.tribe.push("FR","AS"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to that player again.`,this.trigB=this.playerNug(this.iAttack/2,"TP"),this.h=this.cfbH}cfbH(t,i,r){this.ouch(!r.owner,i.dmg),this.anim8(r)}epsdC(){this.faction="A",this.rarity="T",this.name="Epoch Soldier",this.minLevel=this.level,this.maxLevel=this.level,this.iAttack=this.boof4710,this.iHealth=this.iAttack,this.tribe.push("HM"),this.bothTurns=!1,this.text=`When ${this.name} ${y.dbdtap()} on your turn, draw a card at the end of the turn.`,this.trigB=this.rawNug(0,0,0,0,.2,"TP"),this.h=this.epsdH}epsdH(t,i,r){const n=b.trigger("TE","EPH"+this.level);n.changes=!0,n.customCode=this.code,n.bonus=this.rawNug(0,0,0,0,ft.dcWeight),k.addTr(t.owner,n),this.anim8(r)}efmC(){this.faction="T",this.rarity="L",this.name="Everflame Mystic",this.iAttack=this.boof5813,this.iHealth=this.iAttack+1,this.tribe.push("FR","AS"),this.bothTurns=!1,this.text=`When ${this.name} ${y.dbdtap()} on your turn, you may play ${this.lValS(["one","two","three"])} spells this turn.`,this.trigB=this.rawNug(0,0,0,0,this.level*.5,"TP"),this.h=this.efmH}efmH(t,i,r){for(let n=0;nthis.smack(c,i.dmg,n))}rzstC(){this.faction="T",this.rarity="C",this.name="Razortooth Stalker",this.iAttack=this.boof4812,this.iHealth=this.iAttack+1,this.iMobile=1,this.tribe.push("DN");const t=this.boof235;this.text=`When ${this.name} ${y.dbdtap()}, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.rzstH}rzstH(t,i,r){this.buffD(r,this.boof235)}rselC(){this.faction="T",this.rarity="H",this.name="Rumblestone Elemental",this.iAttack=this.boof246,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("ER","EL"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to itself as well.~Assault: Spawn a copy of ${this.name}. Then repeat this for each copy.`,this.trigB=this.rawNug(0,0,0,0,-.1),this.h=this.rselH}rselH(t,i,r){this.smack(r,i.dmg)}strhyC(){this.faction="U",this.rarity="C",this.name="Stranglevine Hydra",this.iAttack=this.boof5815,this.iHealth=this.iAttack+1,this.tribe.push("HY"),this.text=`When ${this.name} ${y.dbdtap()}, it gets Regenerate ${this.level}.`,this.trigB=this.regnNug(this.level,"TP"),this.h=this.strhyH}strhyH(t,i,r){this.regn(r,this.level)}uridC(){this.faction="U",this.rarity="L",this.name="Uterradon Ridgeback",this.iAttack=this.boof71117,this.iHealth=this.boof4713,this.iBT=!0,this.tribe.push("DN"),this.bothTurns=!1;const t=this.boof124;this.text=`When ${this.name} ${y.dbdtap()} on your turn, each friendly creature gets ${y.jr9(t,t,this.level===3)}${this.level===3?", and Breakthrough":""}.`,this.trigB=this.buffNug(t,t,"TP"),this.h=this.uridH}uridH(t,i,r){const n=this.boof124,c=this.level===3;p.ddf1().forEach(f=>{this.buffD(f,n),c&&(f.breakthrough=!0)})}veskC(){this.faction="N",this.rarity="L",this.name="Vyric Ebonskull",this.iAttack=this.boof3713,this.iHealth=this.boof71117,this.tribe.push("VP");let t="",i=.5;this.level===3&&(t=" Then Spawn a copy of that creature."),this.text=`When Vyric ${y.dbdtap()}, destroy an enemy ${y.levelGateText(this.level)}creature at random.`+t,this.trigB=this.multNug(this.avgSpawnNug(),i),this.trigB.threat="TP",this.h=this.veskH}veskH(t,i,r){const n=b.crTarg();n.player=k.toTarget(i.hurtPlayer),n.level=w.ddf2(this.level);const c=p.creatByTarget(n);if(c.length>0){const f=E.tick(),m=c[S.randInt(0,c.length)];this.kill(m,f),this.level===3&&this.spawn(m.code,r.owner,f)}}}class Y extends P{cons(t){({["AGK"]:()=>this.agknitC(),["AMS"]:()=>this.squadC(),["AFR"]:()=>this.afsC(),["ATI"]:()=>this.atiC(),["BZS"]:()=>this.bzshC(),["BTR"]:()=>this.bwtC(),["BSS"]:()=>this.bssC(),["BZD"]:()=>this.bzdrC(),["BFM"]:()=>this.bfmC(),["CTI"]:()=>this.charnC(),["CHH"]:()=>this.chihC(),["CSW"]:()=>this.chickenC(),["DFR"]:()=>this.dfrC(),["DSW"]:()=>this.dswC(),["DBA"]:()=>this.dbaC(),["DBN"]:()=>this.drbC(),["DDD"]:()=>this.dddC(),["EWT"]:()=>this.espwrC(),["FWT"]:()=>this.fwtC(),["GSW"]:()=>this.gwurmC(),["GSS"]:()=>this.gsC(),["IMA"]:()=>this.iracoC(),["KSB"]:()=>this.ksbC(),["LGT"]:()=>this.legtitC(),["LBD"]:()=>this.lbdC(),["LMV"]:()=>this.lyrC(),["MOE"]:()=>this.moeC(),["MMA"]:()=>this.mmaC(),["MMR"]:()=>this.mmrC(),["MBR"]:()=>this.mbrC(),["MTD"]:()=>this.mossC(),["NSY"]:()=>this.nysymC(),["OXM"]:()=>this.onxmarC(),["OFM"]:()=>this.ofmC(),["OPK"]:()=>this.orpC(),["PHM"]:()=>this.phmC(),["PSM"]:()=>this.palsC(),["POK"]:()=>this.pokC(),["POT"]:()=>this.potC(),["PMI"]:()=>this.prinvC(),["REW"]:()=>this.rewC(),["SMD"]:()=>this.scorchC(),["SOC"]:()=>this.scythC(),["SDN"]:()=>this.souldrC(),["SGG"]:()=>this.ssggC(),["SLG"]:()=>this.splgC(),["SBD"]:()=>this.sbdC(),["SSK"]:()=>this.sssC(),["SYL"]:()=>this.lotusC(),["TGI"]:()=>this.tgiC(),["TRA"]:()=>this.toraC(),["TRS"]:()=>this.torsC(),["TRV"]:()=>this.torvC(),["TRW"]:()=>this.torwC(),["UGL"]:()=>this.umglidC(),["UWL"]:()=>this.uwarC(),["UWS"]:()=>this.ustokeC(),["UIW"]:()=>this.uiwC(),["UTM"]:()=>this.umaulC(),["VIC"]:()=>this.vlfxC(),["VIK"]:()=>this.vikC(),["VND"]:()=>this.vdrkC(),["VNS"]:()=>this.vnsC(),["WMC"]:()=>this.warC(),["WWP"]:()=>this.wwpC(),["WFB"]:()=>this.wfbC(),["XTR"]:()=>this.xtmC(),["ZDK"]:()=>this.zdkC()})[t]()}f;ftext="";forges=!0;flanks;allied="X";constructor(t){super(t),this.cons(this.cardCode());let i="";this.flanks&&(i="Flank"),this.forges&&(i?i="Forge/"+i:i=y.forglied(this.allied)),i&&(this.text=i+": "+this.ftext),this.ftext=""}image(t){return this.rarity==="T"?super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.forges&&r.jr4("FR"),this.flanks){const n=r.jr4("FK");n.bonus=this.flanks}return r}ddf8(t){return Wt.extractCardCode(t.trigger.logicCode)==="MMR"}jr8(t){const i=this.cardCode();if(t.trigger.type==="TE"&&i==="MMR"){this.logAct(!1);const r=t.event,n=k.toPlayer(r.playerA);k.drawCard(n,this.level);const c=b.trigIdx(n.triggers,t.trigger);c>-1&&n.triggers.splice(c,1)}else this.f(t);x.triggerDone()}agknitC(){this.faction="A",this.rarity="L",this.name="Aegis Knight",this.iAttack=this.boof5814,this.iHealth=this.iAttack,this.tribe.push("HM"),this.iArmor=this.lValN([1,2,5]),this.ftext="Each friendly creature deals damage equal to its Armor to the opposing creature",this.f=this.agknitF}agknitF(t){const i=b.crFriendTarg();i.hasArmor=!0;const r=E.tick();p.creatByTarget(i).forEach(n=>{n.opposed&&n.opposed.hurtDirect(n.armor,n.code,this.faction,r)})}squadC(){this.faction="A",this.rarity="H",this.name="Aeromind Squadron",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("MM"),this.iMobile=1,this.ftext="Put a Metamind at random from your deck into your hand.",this.f=this.squadF}squadF(t){const i=k.toPlayer(t.owner),r=b.target("TH");r.player=k.toTarget(i),r.tribe="MM";const n=w.deckByTarget(r),c=n.length;if(c>0){const f=n[S.randInt(0,c)];i.deck.splice(f[1],1),Dt.addCard(i,f[0]),this.anim8(t.creatId)}}afsC(){this.faction="T",this.rarity="H",this.name="Ashurian Flamesculptor",this.iAttack=this.boof5915,this.iHealth=this.boof3610,this.tribe.push("FR","AS"),this.forges=this.level>1,this.consistent=this.forges,this.forges&&(this.ftext=`You may play an additional ${y.levelGateText(this.level-1)}Tempys spell this turn.`,this.addSp("C",0)),this.f=this.afsF}afsF(t){const i=L.freeCard(this.code);i.condition.card="S",i.condition.level=w.ddf2(this.level-1),i.condition.faction="T",this.anim8(t.creatId)}atiC(){this.faction="T",this.rarity="L",this.name="Avarice, the Insatiable",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.iMobile=1,this.tribe.push("DG");let t="";this.level<3&&(t="Discard down to one card at random. "),this.ftext=`${t}You may play an additional spell this turn.`,this.f=this.atiF}atiF(t){if(this.level<3){const r=k.toPlayer(t.owner);if(r.hand.length>1){let n=r.hand.slice();const c=S.randInt(0,n.length);for(let f=n.length-1;f>-1;f--)f!==c&&Dt.cardDiscard(r,f)}}const i=L.freeCard(this.code);i.condition.card="S",this.anim8(t.creatId)}bzshC(){this.faction="T",this.rarity="C",this.name="Blizzard Shaman",this.iAttack=this.boof61014,this.iHealth=this.iAttack+1,this.tribe.push("WN","AS"),this.ftext="Move another friendly creature at random to another available lane at random.",this.f=this.bzshF}bzshF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId)),r=i.length;if(r<4&&r>0){const n=i[S.randInt(0,r)];p.fling(n,"T"),this.logAct(!1,n)}}bwtC(){if(this.faction="U",this.rarity="H",this.name="Bramblewood Tracker",this.iAttack=this.boof3712,this.iHealth=this.iAttack+3,this.tribe.push("HM"),this.forges=this.level>1,this.forges){const t=this.level-1;this.ftext=`You may play an additional ${y.levelGateText(t)}Uterra creature this turn.`,this.consistent=!0,this.addSp("C",0)}else this.hints=["LG"];this.f=this.bwtF}bwtF(t){const i=L.freeCard(this.code);i.condition.card="C",i.condition.faction="U",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}bssC(){this.faction="A",this.rarity="L",this.name="Brightsteel Sentinal",this.iHealth=this.boof51015,this.iAttack=this.iHealth-1,this.tribe.push("RB"),this.addSp("M",this.iHealth),this.ftext=`Each friendly Robot gets Armor ${this.iHealth} this turn.`,this.f=this.bssF}bssF(t){const i=this.boof51015,r=b.crFriendTarg();r.tribe="RB",r.canArmor=!0,p.creatByTarget(r).forEach(c=>{this.modA(c,b.modT("AR",i))})}bzdrC(){this.faction="N",this.rarity="R",this.name="Byzerak Drake",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.iRegen=this.level,this.allied="T",this.tribe.push("DG"),this.addSp("R",this.level),this.ftext=`Mobility ${this.level}.`,this.f=this.bzdrF}bzdrF(t){L.allied(this.allied)&&p.creatByTr(t).addMobility(this.level,"T")}bfmC(){this.faction="N",this.rarity="H",this.name="Byzerak Frostmaiden",this.iAttack=this.boof135,this.iHealth=this.boof91420,this.tribe.push("HM");const t=this.boof246;this.flanks=this.buffNug(t*2,0,"TS"),this.ftext=`If ${this.name} is opposed, the opposing creature gets ${y.jr9(-1*t,0)} and this gets ${y.jr9(t,0)}.~Allied Tempys: Mobility ${this.level}.`,this.f=this.bfmF}bfmF(t){const r=I.toEnterField(t.event).creature;t.trigger.type==="FR"&&L.allied("T")&&r.addMobility(this.level,"T");const n=r.opposed;if(n){const c=this.boof246;this.buffA(n,-1*c),this.buffA(r,c)}}charnC(){this.faction="N",this.rarity="C",this.name="Charnel Titan",this.iAttack=this.boof359,this.iHealth=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 ${y.jr9(t,t)}.`,this.f=this.charnF}charnF(t){const i=this.boof357,r=b.crEnemyTarg();r.maxAttack=i,p.creatByTarget(r).length>0&&this.buffD(p.creatByTr(t),i)}chihC(){this.faction="U",this.rarity="C",this.name="Chistlehearth Hunter",this.iAttack=this.lValN([2,6,11]),this.iHealth=this.boof81217,this.tribe.push("HM"),this.ftext=`${this.name} gets ${y.jr9(1,0)} for each other friendly creature.`,this.f=this.chihF}chihF(t){const i=p.ddf1().length;i>1&&this.buffA(p.creatByTr(t),i-1)}chickenC(){this.faction="T",this.rarity="L",this.name="Cindersmoke Wyvern",this.iAttack=this.boof3610,this.iHealth=this.boof71217,this.tribe.push("DG"),this.iMobile=this.boof124,this.forges=!1,this.flanks=this.buffNug(this.iAttack,0,"TX"),this.ftext="Deal damage equal to its attack to the opposing creature. If unopposed, deal that damage to the enemy player instead.",this.f=this.chickenF}chickenF(t){const i=I.toCreature(t.event),r=i.creature.attack,n=i.creature.opposed;n?this.smack(n,r):(this.ouch(!t.owner,r),this.anim8(i.creature))}dfrC(){this.faction="N",this.rarity="H",this.name="Darkfrost Reaper",this.iAttack=this.boof6916,this.iHealth=this.boof3713,this.tribe.push("SK"),this.ftext="Destroy each creature with 1 or less attack.",this.f=this.dfrF}dfrF(t){const i=b.crTarg();i.maxAttack=1;const r=p.creatByTarget(i);if(r.length>0){const n=E.tick();r.forEach(c=>{this.kill(c,n)})}}dswC(){this.faction="N",this.rarity="C",this.name="Darkshard Witch",this.iAttack=this.boof51015,this.iHealth=this.iAttack-1,this.tribe.push("DF","HM");const t=this.boof234;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health for each other friendly Darkforged.`,this.f=this.dswF}dswF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="DF";const r=this.boof234*p.creatByTarget(i).length;r>0&&(this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(t.creatId))}dbaC(){this.faction="U",this.rarity="H",this.name="Deepbranch Ancient",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("HY"),this.ftext=`If there is a friendly creature in each lane, ${this.name} gets ${y.jr9(this.iAttack,this.iHealth)}.`,this.f=this.dbaF}dbaF(t){p.ddf1().length===5&&this.buffB(p.creatByTr(t),this.iAttack,this.iHealth)}drbC(){this.faction="N",this.rarity="C",this.name="Dirge Banshee",this.iAttack=this.boof248,this.iHealth=this.boof61016,this.tribe.push("ST");const t=this.boof246;this.flanks=this.buffNug(t*2,0),this.ftext=`If ${this.name} is opposed, the opposing creature gets ${y.jr9(-t,0)} and this gets ${y.jr9(t,0)}.`,this.f=this.drbF}drbF(t){const i=I.toEnterField(t.event),r=i.creature.opposed;if(r){const n=this.boof246;this.buffA(r,-n),this.buffA(i.creature,n)}}dddC(){this.faction="N",this.rarity="L",this.name="Doomwing, Dire Drake",this.iAttack=this.boof61018,this.iHealth=this.lValN([2,6,10]),this.iMobile=this.level,this.tribe.push("DG"),this.level>1&&(this.hints=[this.level===2?"ZZ-2":"ZZ-5"]),this.forges=!1,this.flanks=this.multNug(this.avgSpawnNug(),.5),this.flanks.threat="TX",this.ftext=`Destroy the opposing ${y.levelGateText(this.level)}creature.`,this.f=this.dddF}dddF(t){const r=I.toCreature(t.event).creature.opposed;r&&w.levelTestCommon(r.level,this.level)&&this.kill(r)}espwrC(){this.faction="U",this.rarity="R",this.name="Esperian Wartusk",this.iAttack=this.boof5916,this.iHealth=this.iAttack-1,this.iBT=!0,this.allied="A",this.tribe.push("TK");const t=this.boof124;this.ftext=`Armor ${t}.`,this.f=this.espwrF}espwrF(t){L.allied(this.allied)&&p.creatByTr(t).addArmor(this.boof124)}fwtC(){this.faction="U",this.rarity="H",this.name="Frostwild Tracker",this.iAttack=this.boof4712,this.iHealth=this.boof248,this.tribe.push("TG"),this.forges=this.level>1;const t=this.level-1;this.ftext=`You may play an additional ${y.levelGateText(t)}creature this turn.`,this.level===1&&(this.hints=["LG"]),this.f=this.fwtF}fwtF(t){const i=L.freeCard(this.code);i.condition.card="C",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}gwurmC(){this.faction="N",this.rarity="C",this.name="Gloomspire Wurm",this.iAttack=this.boof4813,this.iHealth=this.iAttack,this.tribe.push("WR"),this.ftext=`If there are no enemy creatures, ${this.name} gets ${y.jr9(4,4)}.`,this.f=this.gwurmF}gwurmF(t){p.qEnemyCreats().length===0&&this.buffD(p.creatByTr(t),4)}gsC(){this.faction="U",this.rarity="C",this.name="Glowstride Stag",this.iAttack=this.boof5812,this.iHealth=this.iAttack+this.level,this.tribe.push("ST");const t=this.boof51015;this.ftext=`You gain ${t} health.`,this.f=this.gsF}gsF(t){const i=this.boof51015;this.balm(t.owner,i),this.anim8(t.creatId)}iracoC(){this.faction="A",this.rarity="L",this.name="Ironmind Acolyte",this.iAttack=this.boof61015,this.iHealth=this.iAttack-2,this.tribe.push("GN"),this.ftext="If you have five or more cards in your hand, you may play an additional card this turn.",this.f=this.iracoF}iracoF(t){k.toPlayer(t.owner).hand.length>4&&(L.freePlay(),this.anim8(t.creatId))}ksbC(){this.faction="T",this.rarity="C",this.name="Kadrasian Stoneback",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("DN"),this.iMobile=1,this.iDefend=!0,this.forges=!1,this.flanks=this.regnNug(1),this.ftext=`Negate Defender from ${this.name} this turn.`,this.f=this.ksbF}ksbF(t){const i=I.toCreature(t.event);i.creature.hasMod(t.creatId)||this.modA(i.creature,b.modT("ND",!0,t.creatId))}legtitC(){this.faction="N",this.rarity="R",this.name="Legion Titan",this.iAttack=this.boof4812,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.ftext=`${this.name} gets ${y.jr9(this.level,this.level)} for each enemy creature with ${this.boof357} or less attack.`,this.f=this.legtitF}legtitF(t){const i=b.crEnemyTarg();i.maxAttack=this.boof357;const r=p.creatByTarget(i);r.length>0&&this.buffD(p.creatByTr(t),this.level*r.length)}lbdC(){this.faction="U",this.rarity="H",this.name="Lifeblood Dryad",this.iAttack=this.lValN([4,7,9]),this.iHealth=this.iAttack,this.tribe.push("DY");const t=this.boof236;this.ftext=`If there is a friendly creature in each lane, each other friendly creature gets ${y.jr9(t,t)}.`,this.f=this.lbdF}lbdF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length===4){const r=this.boof236;i.forEach(n=>this.buffD(n,r))}}lyrC(){this.faction="N",this.rarity="L",this.name="Lyria, Muse of Varna",this.iAttack=this.boof5815,this.iHealth=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=["LG"]),this.f=this.lyrF}lyrF(t){if(this.level===2){const i=Bt.gravedigger();i&&this.spawn(i,t.owner)}else if(this.level===3){const i=p.emptyLanes(t.owner),r=i.map(n=>Bt.gravedigger());if(i.length>0&&r[0]){const n=E.tick();i.forEach((c,f)=>{this.poot(r[f],t.owner,c,n)})}}}moeC(){this.faction="T",this.rarity="H",this.name="Master of Elements",this.iAttack=this.boof5917,this.iHealth=this.iAttack,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=`You may play an additional ${y.levelGateText(this.level-1)}spell this turn.`,this.f=this.moeF}moeF(t){const i=L.freeCard(this.code);i.condition.card="S",i.condition.level=w.ddf2(this.level-1),this.anim8(t.creatId)}mmaC(){this.faction="A",this.rarity="C",this.name="Metamind Adept",this.iAttack=this.boof5915,this.iHealth=this.boof4813,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`Draw ${this.level} card${t}.`,this.f=this.mmaF}mmaF(t){k.drawCard(t.owner,this.level),this.anim8(t.creatId)}mmrC(){this.faction="A",this.rarity="C",this.name="Metamind Archivist",this.iAttack=this.boof3713,this.iHealth=this.iAttack+5,this.tribe.push("MM");const t=this.level===1?"":"s";this.ftext=`If there is another friendly Metamind, draw ${this.level} card${t} at the end of your turn.`,this.f=this.mmrF}mmrF(t){const i=b.crFriendNotMeTarg(t.creatId);if(i.tribe="MM",p.creatByTarget(i).length>0){const r=b.trigger("TE",this.code);r.changes=!0,r.bonus=this.rawNug(0,0,0,0,this.level*ft.dcWeight),k.addTr(t.owner,r),this.anim8(t.creatId)}}mbrC(){this.faction="A",this.rarity="R",this.name="Mind Breaker",this.iAttack=this.boof248,this.iHealth=this.boof81420,this.tribe.push("MM"),this.ftext="Draw a card for each friendly Metamind.",this.f=this.mbrF}mbrF(t){const i=b.crFriendTarg();i.tribe="MM",k.drawCard(t.owner,p.creatByTarget(i).length),this.anim8(t.creatId)}mossC(){this.faction="U",this.rarity="R",this.name="Mosstodon",this.iAttack=this.boof71117,this.iHealth=this.boof4713,this.tribe.push("DN"),this.ftext=`Each other friendly Dinosaur gets ${y.jr9(0,this.boof357)}.`,this.f=this.mossF}mossF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="DN";const r=p.creatByTarget(i);if(r.length>0){const n=this.boof357;r.forEach(c=>this.buffH(c,n))}}nysymC(){this.faction="N",this.rarity="C",this.name="Nyrali Symbiote",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("OZ");const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets Regenerate ${t}.`,this.f=this.nysymF}nysymF(t){const i=I.toEnterField(t.event);i.creature.opposed&&this.regn(i.creature,this.boof246)}ofmC(){this.faction="A",this.rarity="R",this.name="Oreian Fieldmarshal",this.iAttack=this.boof5914,this.iHealth=this.iAttack-2,this.tribe.push("HM");const t=this.boof135;this.ftext=`Each other friendly creature gets ${y.jr9(t,0)}.`,this.f=this.ofmF}ofmF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=this.boof135;i.forEach(n=>{this.buffA(n,r)})}}orpC(){this.faction="A",this.rarity="R",this.name="Oreian Peacekeeper",this.iAttack=this.boof4816,this.iHealth=this.boof248,this.tribe.push("RB"),this.ftext=`${this.name} gets Armor ${this.iAttack} this turn.`,this.f=this.orpF}orpF(t){this.modA(p.creatByTr(t),b.modT("AR",this.iAttack))}onxmarC(){this.faction="A",this.rarity="R",this.name="Onyxium Marauder",this.iAttack=this.boof4714,this.iHealth=this.lValN([6,9,17]),this.iArmor=this.level,this.allied="N",this.tribe.push("HM"),this.ftext=`Regenerate ${this.level}.`,this.f=this.onxmarF}onxmarF(t){L.allied(this.allied)&&p.creatByTr(t).addRegen(this.level,"N")}phmC(){this.faction="A",this.rarity="R",this.name="Palladium Hindermind",this.iAttack=this.boof2612,this.iHealth=this.boof61016,this.tribe.push("HM"),this.ftext=`Each enemy creature gets ${y.jr9(this.boof123n,0)}.`,this.f=this.phmF}phmF(t){const i=p.qEnemyCreats();if(i.length>0){const r=this.boof123n;i.forEach(n=>{this.buffA(n,r)})}}palsC(){this.faction="A",this.rarity="L",this.name="Palladium Simulacrum",this.iAttack=this.boof4816,this.iHealth=this.boof248,this.iMobile=this.level-1,this.tribe.push("SS"),this.flanks=this.multNug(this.statSpawnNug(this.iAttack,this.iHealth,"TW"),.5),this.ftext=`If ${this.name} is in the center lane, Spawn a copy.`,this.f=this.palsF}palsF(t){I.toEnterField(t.event).creature.lane===3&&this.spawn(this,t.owner)}pokC(){this.faction="T",this.rarity="H",this.name="Patron of Kadras",this.iAttack=this.boof4812,this.iHealth=this.iAttack+2,this.tribe.push("ER","EL"),this.ftext=`If you have three or more Tempys cards in your hand, each friendly creature gets ${y.jr9(this.iAttack,0)} this turn.`,this.f=this.pokF}pokF(t){L.patron("T")&&p.ddf1().forEach(i=>{this.modA(i,b.modT("AT",this.iAttack))})}potC(){this.faction="N",this.rarity="H",this.name="Patron of Tarsus",this.iAttack=this.boof5914,this.iHealth=this.boof4712,this.tribe.push("DM");const t=this.potbuf;this.ftext=`If you have three or more Nekrium cards in your hand, each enemy creature gets ${y.jr9(t,t)}.`,this.f=this.potF}potF(t){if(L.patron("N")){const i=p.qEnemyCreats();if(i.length>0){const r=this.potbuf;this.logAct(!1),i.forEach(n=>{this.buffD(n,r)})}}}get potbuf(){return this.lValN([-1,-3,-6])}prinvC(){this.faction="T",this.rarity="H",this.name="Primordial Invoker",this.iAttack=this.boof61016,this.iHealth=this.boof468,this.tribe.push("HM"),this.ftext=`Deal ${this.iHealth} damage divided at random between enemy creatures and the the enemy player.`,this.f=this.prinvF}prinvF(t){const i=p.creatByTarget(b.crEnemyTarg()),r=i.length;if(r===0)this.ouch(!t.owner,this.iHealth),this.anim8(t.creatId);else{const n=E.tick(),c=r+1,f=Array(c).fill(0);for(let m=0;m{f[C]>0&&this.smack(m,f[C],n)}),f[r]>0&&(this.ouch(!t.owner,f[r]),this.anim8(t.creatId))}}rewC(){this.faction="U",this.rarity="L",this.name="Ramble, Eternal Witness",this.iAttack=this.boof3712,this.iHealth=this.iAttack+3+this.level,this.tribe.push("HM"),this.level===3?this.ftext="Spawn a random creature from your deck.":this.ftext=`Shuffle the level ${this.level+1} version of this from your discard pile into your deck.`,this.f=this.rewF}rewF(t){if(this.level===3){const i=b.target("DK");i.player="F",i.card="C";const r=w.deckByTarget(i).map(n=>n[0]);r.length>0&&this.spawn(r[S.randInt(0,r.length)],t.owner)}else{const i=k.getActive(),r=this.levelUpCard();i.discard.splice(i.discard.lastIndexOf(r),1),i.deck.push(r),nt.simOff&&(Ot.shuffleDeck(i),this.anim8(t.creatId))}}scorchC(){this.faction="T",this.rarity="L",this.name="Scorchmane Dragon",this.iAttack=this.lValN([0,12,24]),this.iHealth=this.boof61224,this.tribe.push("DG"),this.iDefend=this.level===1,this.iMobile=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=["LG","LM"]),this.f=this.scorchF}scorchF(t){const i=I.toEnterField(t.event),r=!t.owner;if(this.level===2){const n=i.creature.opposed;n&&this.smack(n,5)}else if(this.level===3){const n=E.tick();p.qPlayerCreats(r).forEach(c=>this.smack(c,5,n)),this.ouch(r,5),this.anim8(i.creature)}}scythC(){this.faction="N",this.rarity="L",this.name="Chiron, Herald of Torment",this.iAttack=12,this.iHealth=6,this.tribe.push("DM"),this.ftext=`Each enemy creature gets ${y.jr9(-6,0)} and ${this.name} gets ${y.jr9(6,0)} for each enemy creature.`,this.f=this.scythF}scythF(t){const i=p.qEnemyCreats();i.forEach(r=>{this.buffA(r,-6)}),i.length>0&&this.buffA(p.creatByTr(t),6*i.length)}souldrC(){if(this.faction="N",this.rarity="L",this.name="Soul Drinker",this.iAttack=1,this.iHealth=this.boof4814,this.iMobile=this.level===3?1:0,this.tribe.push("VP"),this.level===3){const t=this.avgCreatureStats();this.flanks=this.buffNug(t[0]*2,0,"TS")}this.ftext=`The opposing creature's attack gets reduced to 0 and ${this.name} gains that much attack.`,this.f=this.souldrF}souldrF(t){const i=I.toEnterField(t.event),r=i.creature.opposed;if(r){const n=r.attack;this.buffA(i.creature,n),this.buffA(r,-1*n)}}ssggC(){this.faction="N",this.rarity="H",this.name="Soulscourge Grimgaunt",this.iAttack=this.level+1,this.iHealth=this.iAttack,this.tribe.push("GG"),this.ftext=`${this.name} gets ${y.jr9(this.iAttack,this.iHealth)} for each creature that was destroyed this turn.`,this.f=this.ssggF}ssggF(t){const i=this.iAttack*(L.deathsA.length+L.deathsB.length);i>0&&this.buffD(p.creatByTr(t),i)}splgC(){this.faction="N",this.rarity="T",this.name="Spiderling",this.iAttack=this.boof369,this.iHealth=this.iAttack+1,this.tribe.push("SP"),this.ftext=`Replace the opposing ${y.levelGateText(this.level)}creature with a Web.`,this.f=this.splgF}splgF(t){const i=I.toEnterField(t.event);if(i.creature.opposed){const r=i.creature.opposed;w.levelTestCommon(r.level,this.level)&&this.replc("WEB"+this.level,r.owner,r.lane)}}sbdC(){this.faction="U",this.rarity="C",this.name="Spiritbloom Dryad",this.iAttack=this.boof6812,this.iHealth=this.iAttack+this.level,this.tribe.push("DY"),this.ftext=`Each player gains ${this.boof468} health.`,this.f=this.sbdF}sbdF(t){const i=this.boof468;this.balm(!0,i),this.balm(!1,i),this.anim8(t.creatId)}sssC(){this.faction="A",this.rarity="C",this.name="Steelskin Spelunker",this.iAttack=this.boof5814,this.iHealth=this.boof61018,this.tribe.push("HM"),this.ftext=`If there is another friendly creature in the center lane, that creature gets Armor ${this.boof124}`,this.f=this.sssF}sssF(t){const i=p.searchByLane(3,t.owner);i&&i.id!==t.creatId&&!i.negateArmor&&i.addArmor(this.boof124)}lotusC(){this.faction="U",this.rarity="H",this.name="Stygian Lotus",this.iAttack=this.boof468,this.iHealth=this.iAttack-1,this.tribe.push("PL"),this.hints=["ZZ-1"],this.ftext=`If ${this.name} is opposed, spawn a copy of it. Then repeat this for each copy.`,this.f=this.lotusF}lotusF(t){if(I.toEnterField(t.event).creature.opposed){let r=!0;for(;r;){const n=p.emptyLanes(t.owner),c=n.length;if(c===0)r=!1;else{const f=n[S.randInt(0,c)];this.poot(this,t.owner,f).opposed||(r=!1)}}}}tgiC(){this.faction="T",this.rarity="R",this.name="Thundergale Invoker",this.iAttack=this.boof3711,this.iHealth=this.iAttack,this.tribe.push("WN","GT"),this.ftext=`Each creature adjacent to ${this.name} moves one lane away if possible.`,this.f=this.tgiF}tgiF(t){const i=p.creatByTr(t),r=i.lane,n=i.owner,c=[];if(r>2){const f=p.searchByLane(r-1,n);f&&(p.searchByLane(r-2,n)||(c.push(f),this.lurk(f,r-2)))}if(r<4){const f=p.searchByLane(r+1,n);f&&(p.searchByLane(r+2,n)||(c.push(f),this.lurk(f,r+2)))}c.length>0&&this.logAct(!1,...c)}tortex(t){return`Put a level ${this.level} ${t} into your hand.`}handhoss(t,i){const r=k.toPlayer(i.owner);Dt.addCard(r,t+this.level,!0),this.anim8(i.creatId)}toraC(){this.faction="A",this.rarity="R",this.name="Torrent Acolyte",this.iAttack=this.boof71117,this.iHealth=this.iAttack-4,this.tribe.push("MM"),this.forges=this.level>1,this.ftext=this.tortex("Power Torrent"),this.f=this.toraF}toraF(t){this.handhoss("PTR",t)}torsC(){this.faction="U",this.rarity="R",this.name="Torrent Soldier",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("IN"),this.forges=this.level>1,this.ftext=this.tortex("Spore Torrent"),this.f=this.torsF}torsF(t){this.handhoss("STO",t)}torvC(){this.faction="T",this.rarity="R",this.name="Torrent Valkyrie",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("IC","AS"),this.forges=this.level>1,this.ftext=this.tortex("Ice Torrent"),this.f=this.torvF}torvF(t){this.handhoss("ITO",t)}torwC(){this.faction="N",this.rarity="R",this.name="Torrent Witch",this.iAttack=this.boof4814,this.iHealth=this.iAttack+3,this.tribe.push("HM"),this.forges=this.level>1,this.ftext=this.tortex("Spirit Torrent"),this.f=this.torwF}torwF(t){this.handhoss("STR",t)}umglidC(){this.faction="T",this.rarity="R",this.name="Umbruk Glider",this.iAttack=this.boof71117,this.iHealth=this.iAttack-4,this.iMobile=this.level,this.allied="U",this.tribe.push("DN"),this.ftext="Breakthrough.",this.f=this.umglidF}umglidF(t){if(L.allied(this.allied)){const i=p.creatByTr(t);i.breakthrough=!0,i.anim8("U")}}uwarC(){this.faction="T",this.rarity="H",this.name="Uranti Warlord",this.iAttack=this.boof3713,this.iHealth=this.boof71117,this.tribe.push("FR","YT"),this.ftext=`Each friendly Yeti deals ${this.iAttack} damage to the opposing creature.`,this.f=this.uwarF}uwarF(t){const i=b.crFriendTarg();i.tribe="YT";const r=E.tick();p.creatByTarget(i).forEach(n=>{const c=n.opposed;c&&c.hurtDirect(this.iAttack,n.code,this.faction,r)})}ustokeC(){this.faction="T",this.rarity="R",this.name="Uranti Warstoker",this.iAttack=this.boof6812,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.ftext=`Each other friendly Yeti gets ${y.jr9(this.boof346,0)} this turn.`,this.f=this.ustokeF}ustokeF(t){const i=b.crFriendNotMeTarg(t.creatId);i.tribe="YT";const r=this.boof346;p.creatByTarget(i).forEach(n=>{this.modA(n,b.modT("AT",r))})}uiwC(){this.faction="A",this.rarity="L",this.name="Uriel Ironwing",this.iAttack=this.lValN([6,8,13]),this.iHealth=this.boof81117,this.iMobile=this.level,this.tribe.push("AG"),this.hints=["ZZ-1"];const t=this.boof246n;this.flanks=this.buffNug(-t,0,"TX");let i="";this.level===3&&(i=" If that creature has 0 or less attack, destroy it.",this.flanks.count=1),this.ftext=`The opposing creature gets ${y.jr9(t,0)}.${i}`,this.f=this.uiwF}uiwF(t){const n=I.toEnterField(t.event).creature.opposed;n&&(this.buffA(n,this.boof246n),this.level===3&&n.attack<1&&this.kill(n))}umaulC(){this.faction="U",this.rarity="C",this.name="Uterradon Mauler",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.boof246;this.ftext=`If ${this.name} is opposed, it gets ${y.jr9(t,t)}.`,this.f=this.umaulF}umaulF(t){const i=I.toEnterField(t.event);i.creature.opposed&&this.buffD(i.creature,this.boof246)}vlfxC(){this.faction="T",this.rarity="L",this.name="Valifrax, Iztek's Champion",this.iAttack=this.boof4816,this.iHealth=this.iAttack+4,this.iMobile=1,this.tribe.push("FR","IC","DG"),this.forges=!1,this.flanks=this.rawNug(0,0,0,0,.5);const t=(i,r)=>`If there is ${r?"an":"no"} opposing creature, put a level ${this.level} Iztek's ${i} into your hand.`;this.ftext=`${t("Frost",!0)} ${t("Flame",!1)}`,this.f=this.vlfxF}vlfxF(t){const i=I.toCreature(t.event);this.handhoss(i.creature.opposed?"IFR":"IFL",t)}vikC(){this.faction="N",this.rarity="L",this.name="Varna, Immortal King",this.maxLevel=4,this.iAttack=this.lValN([4,6,12,18]),this.iHealth=this.lValN([8,13,22,30]),this.tribe.push("FB");let t="";this.level===4&&(t="Destroy each other creature. Then "),this.ftext=t+"Spawn a random friendly creature that was destroyed this turn.",this.f=this.vikF}vikF(t){if(this.level===4){const n=p.creatByTarget(b.crNotMeTarg(t.creatId));if(n.length>0){const c=E.tick();n.forEach(f=>this.kill(f,c))}}const i=t.owner?L.deathsA:L.deathsB,r=i.length;r>0&&this.spawn(i[S.randInt(0,r)],t.owner)}vdrkC(){this.faction="U",this.rarity="R",this.name="Venomdrinker",this.iAttack=this.lValN([5,9,13]),this.iHealth=this.iAttack,this.tribe.push("NG"),this.ftext=`${this.name} gets ${y.jr9(1,1).replaceAll("1","X")}, where X is the total amount of Poison on each enemy creature.`,this.f=this.vdrkF}vdrkF(t){const i=p.qEnemyCreats();let r=0;i.forEach(n=>{r+=n.poison}),r>0&&this.buffD(p.creatByTr(t),r)}vnsC(){this.faction="U",this.rarity="H",this.name="Venomous Netherscale",this.iAttack=this.boof4713,this.iHealth=this.iAttack+4,this.tribe.push("NG"),this.ftext=`Double the Poison on each enemy creature${this.level===3?" and the enemy player":""}.`,this.f=this.vnsF}vnsF(t){const i=b.crEnemyTarg();if(i.hasPoison=!0,p.creatByTarget(i).forEach(n=>{n.addPoison(n.poison)}),this.level===3){const n=k.toPlayer(!t.owner),c=k.totalPoison(n);c>0&&k.addPoison(n,c)}}warC(){this.faction="A",this.rarity="H",this.name="War Machine",this.iAttack=3,this.iHealth=3,this.tribe.push("RB"),this.maxLevel=1,this.overload=!0,this.ftext=`Each other friendly creature gets ${y.jr9(3,0)}.`,this.f=this.warF}warF(t){const i=b.crFriendNotMeTarg(t.creatId);p.creatByTarget(i).forEach(r=>this.buffA(r,3))}wwpC(){this.faction="U",this.rarity="H",this.name="Weirwood Patriarch",this.iAttack=this.boof5714,this.iHealth=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 ${y.jr9(t,t)}.`,this.f=this.wwpF}wwpF(t){const i=this.boof235,r=b.crFriendTarg();r.maxAttack=this.boof357,p.creatByTarget(r).forEach(n=>this.buffD(n,i))}wfbC(){this.faction="N",this.rarity="C",this.name="Witherfrost Banshee",this.iAttack=this.boof3612,this.iHealth=this.iAttack,this.tribe.push("ST");const t=this.boof247n;this.flanks=this.buffNug(-t,-t),this.ftext=`The opposing creature gets ${y.jr9(t,t)}.`,this.f=this.wfbF}wfbF(t){const r=I.toEnterField(t.event).creature.opposed;r&&this.buffD(r,this.boof247n)}xtmC(){this.faction="N",this.rarity="H",this.name="Xithian Tormentor",this.iAttack=this.lValN([6,12,22]),this.iHealth=this.lValN([10,16,28]),this.tribe.push("AB"),this.ftext="Destroy each other friendly creature.",this.f=this.xtmF}xtmF(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=E.tick();i.forEach(n=>this.kill(n,r))}}zdkC(){this.faction="N",this.rarity="H",this.name="Zombie Dreadknight",this.iAttack=this.boof5814,this.iHealth=this.iAttack-2,this.tribe.push("ZB");const t=this.boof246;this.ftext=`Each friendly creature with Regenerate gets ${y.jr9(t,t)}.`,this.f=this.zdkF}zdkF(t){const i=this.boof246,r=b.crFriendTarg();r.hasRegen=!0,p.creatByTarget(r).forEach(n=>this.buffD(n,i))}}class Ie extends P{cons(t){({["AMP"]:()=>this.aprmC(),["DOV"]:()=>this.dovC(),["LMD"]:()=>this.lmdC(),["MDR"]:()=>this.metaC(),["NCP"]:()=>this.ncplC(),["ORC"]:()=>this.ordcC()})[t]()}get formation(){return!0}ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Formation: "+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i);return r.jr4("FM"),r}jr8(t){this.f(t,I.toEnterField(t.event)),x.triggerDone()}aprmC(){this.faction="A",this.rarity="H",this.name="Automation Prime",this.iHealth=this.boof468,this.iAttack=this.iHealth+4,this.tribe.push("RB"),this.ftext=`${this.name} gets Armor ${this.iHealth}.`,this.f=this.aprmR}aprmR(t,i){i.creature.addArmor(this.iHealth)}dovC(){this.faction="N",this.rarity="R",this.name="Disciple of Vyric",this.iAttack=this.boof6915,this.iHealth=this.iAttack-2,this.tribe.push("VP");const t=this.boof468;this.ftext=`Deal ${t} damage to the enemy player and gain ${t} health.`,this.f=this.dovR}dovR(t,i){const r=this.boof468;this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(i.creature)}lmdC(){this.faction="N",this.rarity="L",this.name="Lichmane Dragon",this.iAttack=this.boof6915,this.iHealth=this.iAttack+1,this.iMobile=1,this.tribe.push("ST","DG"),this.ftext="Spawn an enemy creature that was destroyed this game.",this.f=this.lmdR}lmdR(t,i){const r=Bt.gravedigger(k.toTarget(!t.owner));if(r){const n=this.spawn(r,t.owner);n&&this.logAct(!1,n)}}metaC(){this.faction="A",this.rarity="R",this.name="Metadata Redactor",this.iAttack=this.boof6915,this.iHealth=this.iAttack-1,this.tribe.push("MM"),this.ftext="Remove all abilities from each friendly adjacent creature.",this.f=this.metaR}metaR(t,i){const r=b.crTarg();r.player=k.toTarget(t.owner),r.lanes=i.creature.adjacent,p.creatByTarget(r).forEach(n=>n.wipeAll())}ncplC(){this.faction="N",this.rarity="H",this.name="Necroplasm",this.iAttack=this.lValN([5,8,9]),this.iHealth=this.lValN([7,13,19]),this.tribe.push("OZ"),this.ftext="The enemy player discards a card at random.",this.f=this.ncplR}ncplR(t,i){const r=k.toPlayer(!t.owner);if(r.hand.length>0){Dt.cardDiscard(r,S.randInt(0,r.hand.length));const n=b.trigger("NT",this.code);n.bonus=this.rawNug(0,0,0,0,.5),k.addTr(t.owner,n),this.anim8(t.creatId)}}ordcC(){this.faction="A",this.rarity="C",this.name="Ordnance Captain",this.iAttack=this.boof368,this.iHealth=this.boof61014,this.tribe.push("HM"),this.ftext=`Each friendly creature gets ${y.jr9(this.boof235,0)}.`,this.f=this.ordcR}ordcR(t,i){const r=this.boof235;p.qPlayerCreats(t.owner).forEach(n=>this.buffA(n,r))}}class ii extends P{cons(t){({["PYM"]:()=>this.pymC(),["RBG"]:()=>this.rbgC(),["SRV"]:()=>this.sprvC(),["TGK"]:()=>this.tgkC()})[t]()}hPlayer=0;trigB;bDraw=!0;constructor(t){super(t),this.cons(this.cardCode())}g;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("LG",this.code);return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.validPlayer(t)&&p.creatByTr(t).status==="A"}jr8(t){this.g(t),x.triggerDone()}validPlayer(t){return this.hPlayer===0?!0:this.hPlayer===1?t.owner===t.event.playerA:t.owner!==t.event.playerA}pymC(){this.faction="T",this.rarity="R",this.name="Pyre Mystic",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("FR","AS"),this.hPlayer=-1;const t=this.lValS(["","2x ","3x "]);this.text=`When an enemy player gains health, deal ${t}that much damage to the enemy player.`,this.trigB=this.playerNug(this.boof369,"TW"),this.g=this.pymG}pymG(t){this.ouch(t.event.playerA,t.event.healAmt*this.level,t.draw),t.draw&&this.anim8(t.creatId)}rbgC(){this.faction="U",this.rarity="H",this.name="Runebark Guardian",this.iAttack=this.boof5916,this.iHealth=this.iAttack,this.tribe.push("HM"),this.hPlayer=1;const t=this.boof135;this.text=`When you gain health, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.g=this.rbgG}rbgG(t){const i=this.boof135;p.creatByTr(t).buff(i,i,t.draw?"U":"X")}sprvC(){this.faction="N",this.rarity="R",this.name="Spirit Reaver",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("DM"),this.hPlayer=-1;const t=this.boof234;this.text=`When an enemy player gains health, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TS"),this.hints=["ZZ-1"],this.g=this.sprvG}sprvG(t){const i=this.boof234;p.creatByTr(t).buff(i,i,t.draw?"N":"X")}tgkC(){this.faction="U",this.rarity="R",this.name="Tuskin Grovekeeper",this.iAttack=this.boof6912,this.iHealth=this.iAttack,this.tribe.push("TK"),this.bDraw=!1,this.hPlayer=1,this.text=`When you gain health, Spawn a 3/3 ${K.minionName(this.level)}.`,this.trigB=this.rawNug(.5,3,3,0,0,"TW"),this.g=this.tgkG}tgkG(t){const i=this.lValS(["SXD","SPL","TTF"])+this.level;this.spawn(i,t.owner)}}class Ye extends P{cons(t){({["AWU"]:()=>this.awuC(),["EWE"]:()=>this.eweC(),["FFM"]:()=>this.ffmC(),["LUC"]:()=>this.lugC(),["WBH"]:()=>this.wbhC()})[t]()}mPlayer=0;trigB;bDraw=!0;constructor(t){super(t),this.cons(this.cardCode())}m;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("MV");return n.bonus=this.trigB,n.batch=this.bDraw,r}ddf8(t){return this.validPlayer(t)&&p.creatByTr(t).status==="A"}jr8(t){this.m(t),x.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=I.toCreature(t.event);return this.mPlayer===1?t.owner===i.creature.owner:t.owner!==i.creature.owner}awuC(){this.faction="T",this.rarity="R",this.name="Arc Wurm",this.iAttack=this.boof4813,this.iHealth=this.iAttack+3,this.tribe.push("LT","EL"),this.iMobile=1,this.mPlayer=1;const t=this.boof234;this.text=`When a friendly creature moves, deal ${t} damage to the enemy player.`,this.trigB=this.playerNug(t,"TW"),this.m=this.awuM}awuM(t){this.ouch(!t.owner,this.boof234,t.draw),t.draw&&this.anim8(t.creatId)}eweC(){this.faction="T",this.rarity="H",this.name="Emberwind Evoker",this.iAttack=this.boof4914,this.iHealth=this.iAttack+2,this.tribe.push("HM"),this.mPlayer=1,this.bDraw=!1;const t=this.boof124;this.text=`When a friendly creature moves, it gets ${y.jr9(t,t)}.`,this.trigB=this.buffNug(t,t,"TX"),this.m=this.eweM}eweM(t){this.buffD(I.toCreature(t.event).creature,this.boof124)}ffmC(){this.faction="T",this.rarity="H",this.name="Frostfang Maiden",this.iAttack=this.boof5814,this.iHealth=this.iAttack+this.level,this.tribe.push("HM"),this.iMobile=this.level,this.bDraw=!1,this.mPlayer=1;const t=this.ffbof;this.text=`When a friendly creature moves, deal ${t} to the creature opposing it.`,this.trigB=this.buffNug(t,0,"TX"),this.m=this.ffmM}ffmM(t){const i=I.toCreature(t.event).creature.opposed;i&&this.smack(i,this.ffbof)}get ffbof(){return this.level+2}lugC(){this.faction="T",this.rarity="L",this.name="Lug, Uranti Charger",this.iAttack=this.boof359,this.iHealth=this.lValN([9,13,19]),this.level===3&&(this.iMobile=1),this.tribe.push("YT"),this.mPlayer=1,this.text="When a friendly creature moves on your turn, Lug battles an additional time.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.m=this.lugM}lugM(t){if(t.owner===k.activeA){const i=p.creatByTr(t);i.extraBattles+=1,t.draw&&this.anim8(i)}}wbhC(){this.faction="T",this.rarity="R",this.name="Windborn Hellion",this.iAttack=this.boof4812,this.iHealth=this.boof81217,this.tribe.push("WN","EL"),this.mPlayer=1,this.text=`When a friendly creature moves, ${this.name} gets ${y.jr9(this.level,this.level)}.`,this.trigB=this.buffNug(this.level,this.level,"TS"),this.m=this.wbhM}wbhM(t){p.creatByTr(t).buff(this.level,this.level,this.bFac(t))}}class _t extends P{cons(t){({["ATG"]:()=>this.agrdC(),["ART"]:()=>this.arootC(),["ATS"]:()=>this.atrapC(),["ARB"]:()=>this.arbysC(),["BLH"]:()=>this.bblhC(),["CYC"]:()=>this.ccC(),["DHW"]:()=>this.dhwC(),["FBI"]:()=>this.fbiC(),["FLS"]:()=>this.flspkC(),["IBA"]:()=>this.beardC(),["IZK"]:()=>this.izzyC(),["KAW"]:()=>this.kasC(),["SWA"]:()=>this.swaC()})[t]()}trigB;constructor(t){super(t),this.cons(this.cardCode())}t;p;jr3(t,i){const r=super.jr3(t,i);if(this.trigB){const n=r.jr4("PC");n.bonus=this.trigB}return r}ddf8(t){return t.event.code==="PLC"?this.t(t,t.event):t.event.code==="TRE"&&this.cardCode()==="BLH"}jr8(t){t.event.code==="PLC"?this.p(t,t.event):this.kill(p.creatByTr(t)),x.triggerDone()}spMyTurn(t,i){return i.playerA===t.owner&&W.getCard(i.cardCode).type==="S"}fSpMyTurn(t,i){if(i.playerA===t.owner){const r=W.getCard(i.cardCode);if(r.type==="S"&&r.faction===this.faction)return!0}return!1}enemyPlay(t,i){return i.playerA!==t.owner}isAct(t){return p.jr5(t).status==="A"}agrdC(){this.faction="A",this.rarity="C",this.name="Aetherguard",this.iAttack=this.boof6814,this.iHealth=this.iAttack-1,this.tribe.push("RB"),this.trigB=this.rawNug(0,ft.calcCreatValueFormula(0,0,this.level,0,0,!1,0),0,0),this.text=`When you play a spell, ${this.name} gets Armor ${this.level}.`,this.t=this.spMyTurn,this.p=this.agrdP}agrdP(t,i){p.creatByTr(t).addArmor(this.level)}arootC(){this.faction="U",this.rarity="H",this.name="Aether Root",this.iAttack=this.boof3610,this.iHealth=this.iAttack,this.tribe.push("PL"),this.hints=[this.lValH(["ZZ+1","ZZ+2","ZZ+3"])];const t=this.boof234;this.text=`When you play an Uterra spell, ${this.name} gets ${y.jr9(t,t)}.`,this.trigB=this.multNug(this.buffNug(t,t,"TS"),2),this.t=this.fSpMyTurn,this.p=this.arootP}arootP(t,i){this.buffD(p.creatByTr(t),this.boof234)}atrapC(){this.faction="T",this.rarity="C",this.name="Aethertap Shaman",this.iAttack=this.lValN([7,9,16]),this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.trigB=this.regnNug(1),this.text=`When you play a spell, ${this.name} gets Mobility 1 this turn.`,this.t=this.spMyTurn,this.p=this.atrapP}atrapP(t,i){this.modA(p.creatByTr(t),b.modT("MB",1))}arbysC(){this.faction="A",this.rarity="H",this.name="Anvillon Arbiter",this.iAttack=this.boof3714,this.iHealth=this.iAttack+3,this.iArmor=1,this.tribe.push("RB"),this.text="When the enemy player plays their second card in a turn, that player discards their hand.",this.trigB=this.rawNug(0,0,0,0,1,"TX"),this.t=this.enemyPlay,this.p=this.arbysP}arbysP(t,i){if(L.cardsPlayed>1&&this.isAct(t.creatId)){const r=k.getActive();r.hand.length>0&&(Dt.cardDiscardAll(r),this.anim8(t.creatId))}}bblhC(){this.faction="T",this.rarity="L",this.name="Binben, Lightning Herald",this.iAttack=this.boof61017,this.iHealth=this.boof468,this.tribe.push("LT","AS");const t=W.getCard(this.lwy());this.text=`When you play a spell, Spawn a ${y.tokName(t)}. At the end of your turn, destroy it.`,this.trigB=this.spawnNug(t,"TX"),this.t=this.spMyTurn,this.p=this.bblhP}bblhP(t,i){if(this.isAct(t.creatId)){const r=this.spawn(this.lwy(),t.owner);if(r){const n=r.jr4("TE",this.code);n.changes=!0}}}lwy(){return "LWY"+this.level}ccC(){this.faction="N",this.rarity="H",this.name="Crypt Conjurer",this.iAttack=this.boof258,this.iHealth=this.boof81420,this.tribe.push("VP"),this.text=`When you play a Nekrium spell, deal ${this.iAttack} damage to the enemy player and you gain ${this.iAttack} health.`,this.trigB=this.playerNug(2*this.iAttack,"TX"),this.t=this.fSpMyTurn,this.p=this.ccP}ccP(t,i){this.isAct(t.creatId)&&(this.ouch(!t.owner,this.iAttack),this.balm(t.owner,this.iAttack),this.anim8(t.creatId))}dhwC(){this.faction="N",this.rarity="R",this.name="Darkheart Wanderer",this.iAttack=this.boof3612,this.iHealth=this.boof81116,this.tribe.push("HM");const t=this.boof124;this.text=`When you play a spell, ${this.name} gets Regenerate ${t}.`,this.trigB=this.regnNug(t),this.t=this.spMyTurn,this.p=this.dhwP}dhwP(t,i){this.regn(p.creatByTr(t),this.boof124)}fbiC(){this.faction="T",this.rarity="H",this.name="Flamebreak Invoker",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("FR","GT"),this.text=`When you play a Tempys spell, deal ${this.level} damage to each enemy creature.`,this.trigB=this.buffNug(0,this.level*2,"TX"),this.t=this.fSpMyTurn,this.p=this.fbiP}fbiP(t,i){if(this.isAct(t.creatId)){const r=E.tick();p.qEnemyCreats().forEach(n=>{this.smack(n,this.level,r)})}}flspkC(){this.faction="T",this.rarity="C",this.name="Flame Speaker",this.iAttack=this.lValN([2,6,13]),this.iHealth=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.trigB=this.playerNug(t,"TX"),this.t=this.spMyTurn,this.p=this.flspkP}flspkP(t,i){this.isAct(t.creatId)&&(this.ouch(!t.owner,this.boof235),this.anim8(t.creatId))}beardC(){this.faction="A",this.rarity="L",this.name="Ironbeard, Ascendant",this.iAttack=this.lValN([6,9,14,20]),this.iHealth=this.iAttack,this.iArmor=this.level,this.maxLevel=4,this.tribe.push("FB");let t="";this.level>1&&(t=" and Armor "+(this.level-1));let i=this.lValS([this.name,this.name,this.name+" and adjacent friendly creatures","friendly creatures"]);this.text=`When you play Anvilbreaker, ${i} gets ${y.jr9(this.level+1,0)}${t}.`,this.trigB=this.rawNug(0,0,0,0,this.level/2,"TX"),this.t=this.beardT,this.p=this.beardP}beardT(t,i){return i.playerA===t.owner&&i.cardCode==="AVB"+"1"}beardP(t,i){const r=this.level+1,n=this.level-1,c=p.creatByTr(t);if(this.buffA(c,r),n>0&&c.addArmor(1),this.level>2){const f=b.crFriendTarg();this.level===3?f.lanes=c.adjacent.concat(c.lane):f.notMe=c.id,p.creatByTarget(f).forEach(m=>{this.buffA(m,r),m.addArmor(n)})}}izzyC(){this.faction="T",this.rarity="L",this.name="Iztek, Khan of Arrachtor",this.iAttack=this.boof6915,this.iHealth=this.iAttack,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.`,this.trigB=this.rawNug(0,0,0,0,.5,"TX"),this.t=this.izzyT,this.p=this.izzyP}izzyT(t,i){if(i.playerA===t.owner){const r=i.cardCode.slice(0,3);return r==="IFL"||r==="IFR"}return!1}izzyP(t,i){const r=p.creatByTr(t),n=i.cardCode.slice(0,3)==="IFL"?"IZL":"IZR";this.replc(`${n}${this.level}`,r.owner,r.lane)}kasC(){this.faction="T",this.rarity="L",this.name="Kas, Arcweaver",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("LT","AS"),this.text="When you play a spell, Kas battles an additional time this turn.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.t=this.spMyTurn,this.p=this.kasP}kasP(t,i){this.wrang(p.creatByTr(t))}swaC(){this.faction="T",this.rarity="H",this.name="Sparkweaver Acolyte",this.iAttack=this.boof4610,this.iHealth=this.boof61218,this.tribe.push("LT","AS"),this.text=`When you play a Tempys spell, ${this.name} gets ${y.jr9(this.iAttack,0)} this turn.`,this.trigB=this.multNug(this.buffNug(this.iAttack,0,"TW"),.5),this.t=this.fSpMyTurn,this.p=this.swaP}swaP(t,i){this.modA(p.creatByTr(t),b.modT("AT",this.iAttack))}}class ri extends P{cons(t){({["KTS"]:()=>this.kitC(),["RSC"]:()=>this.scootC(),["SCC"]:()=>this.shcrC(),["SND"]:()=>this.ssdC()})[t]()}trigB;constructor(t){super(t),this.cons(this.cardCode())}r;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RP");return n.bonus=this.trigB,r}ddf8(t){return t.creatId===t.event.replCreatId}jr8(t){this.r(t,I.toReplaced(t.event)),x.triggerDone()}kitC(){this.faction="U",this.rarity="H",this.name="Kitaru Sprite",this.iAttack=this.boof358,this.iHealth=this.boof71117,this.tribe.push("FY"),this.hints=["RT"],this.text=`When this is replaced, Spawn a ${this.name}.`,this.trigB=this.buffNug(0,this.iHealth,"TW"),this.r=this.kitR}kitR(t,i){this.spawn(this,t.owner)}scootC(){this.faction="A",this.rarity="T",this.name="Relic Scout",this.iAttack=this.level,this.iHealth=this.level,this.iArmor=this.level,this.free=!0,this.tribe.push("RB"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${y.jr9(this.level,this.level,!0)} and Armor ${this.level}.`,this.trigB=this.buffNug(this.level,ft.calcCreatValueFormula(this.level,this.level,this.level,0,0,!1,0)),this.r=this.scootR}scootR(t,i){this.buffD(i.creature,this.level),i.creature.addArmor(this.level)}shcrC(){this.faction="U",this.rarity="C",this.name="Shardclaw Crusher",this.iAttack=this.boof5812,this.iHealth=this.iAttack,this.tribe.push("IN"),this.hints=["RT"],this.text=`When ${this.name} is replaced, the creature that replaces it gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.trigB=this.multNug(this.buffNug(this.iAttack,this.iAttack,"TX"),.5),this.r=this.shcrR}shcrR(t,i){this.buffD(i.creature,this.iAttack)}ssdC(){this.faction="U",this.rarity="R",this.name="Spiritstone Druid",this.iAttack=this.boof4610,this.iHealth=this.boof346,this.tribe.push("TG"),this.hints=["RT"],this.text=`When ${this.name} is replaced, put a ${this.iAttack}/${this.iHealth} Spirit into each adjacent available lane.`,this.trigB=this.buffNug(this.iAttack,this.iHealth,"TW"),this.trigB.count=1,this.r=this.ssdR}ssdR(t,i){const r=i.replCreat.adjacent,n=p.emptyLanes(t.owner),c=E.tick();r.forEach(f=>{n.includes(f)&&this.poot("SPU"+this.level,t.owner,f,c)})}}class Me extends P{cons(t){({["BST"]:()=>this.brimC(),["OSV"]:()=>this.scavC(),["RHU"]:()=>this.tiaC(),["SKS"]:()=>this.spsoC(),["SWG"]:()=>this.stgrC(),["VTW"]:()=>this.weldC(),["WEB"]:()=>this.webC()})[t]()}constructor(t){super(t),this.cons(this.cardCode())}u;image(t){return this.rarity==="T"?super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);return r.jr4("UP"),r}jr8(t){this.u(t,I.toReplaced(t.event)),x.triggerDone()}brimC(){this.faction="T",this.rarity="L",this.name="Brimstone Tyrant",this.iAttack=this.boof6916,this.iHealth=this.iAttack,this.tribe.push("FR","EL"),this.hints=["RD"];const t=this.boof468;this.text=`Upgrade: Deal ${t} damage to each other creature.`,this.u=this.brimR}brimR(t,i){const r=E.tick(),n=this.boof468;p.creatByTarget(b.crNotMeTarg(t.creatId)).forEach(c=>this.smack(c,n,r))}scavC(){this.faction="A",this.rarity="H",this.name="Oreian Scavenger",this.iAttack=this.boof6916,this.iHealth=1,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets Armor ${this.iAttack}.`,this.u=this.scavR}scavR(t,i){i.creature.addArmor(this.iAttack)}tiaC(){this.faction="A",this.rarity="L",this.name="Relic Hunter",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.iBT=!0,this.tribe.push("HM"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets +attack and +health equal to the creature it replaced.`,this.u=this.tiaR}tiaR(t,i){this.buffB(i.creature,i.replCreat.attack,i.replCreat.health)}spsoC(){this.faction="T",this.rarity="C",this.name="Sparksoul",this.iAttack=this.boof6915,this.iHealth=this.iAttack-1,this.tribe.push("LT","EL"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets Aggressive.`,this.u=this.spsoR}spsoR(t,i){i.creature.aggressive=!0,this.anim8(i.creature)}stgrC(){this.faction="A",this.rarity="C",this.name="Steelwatch Guard",this.iAttack=this.boof4711,this.iHealth=this.iAttack,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: ${this.name} gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.u=this.stgrR}stgrR(t,i){this.buffD(i.creature,this.iAttack)}weldC(){this.faction="A",this.rarity="R",this.name="Vault Welder",this.iAttack=this.boof71118,this.iHealth=this.lValN([9,14,22]),this.iDefend=!0,this.tribe.push("RB"),this.hints=["RD"],this.text=`Upgrade: Negate Defender from ${this.name}.`,this.u=this.weldR}weldR(t,i){i.creature.negDefend("A")}webC(){this.faction="N",this.rarity="T",this.name="Web",this.iAttack=0,this.iHealth=1,this.iDefend=!0,this.tribe.push("WB"),this.text=`Upgrade: ${this.name} attack and health become equal to the creature it replaced.`,this.u=this.webR}webR(t,i){this.buffB(i.creature,i.replCreat.attack,i.replCreat.health-1)}}class Ht extends P{cons(t){({["CGG"]:()=>this.cggC(),["CGF"]:()=>this.cfiendC(),["CSB"]:()=>this.corpsC(),["CYS"]:()=>this.cslmC(),["DSK"]:()=>this.dskC(),["FST"]:()=>this.fstrC(),["FWK"]:()=>this.fwlkC(),["FFD"]:()=>this.ffC(),["FSC"]:()=>this.flwcC(),["GVS"]:()=>this.ghsC(),["GBG"]:()=>this.ggC(),["GMR"]:()=>this.gromC(),["MMX"]:()=>this.mmeC(),["NOZ"]:()=>this.nyozC(),["POX"]:()=>this.poxC(),["RSZ"]:()=>this.rszC(),["SFM"]:()=>this.spirmC(),["SNT"]:()=>this.sssC(),["USA"]:()=>this.usaC(),["VGN"]:()=>this.vgfsC(),["XHS"]:()=>this.xhostC(),["ZTU"]:()=>this.zimusC()})[t]()}vtext="";trigB;v;fixedImgCreat=!1;constructor(t){super(t),this.cons(this.cardCode()),this.trigB&&(this.text="Vengeance: "+this.vtext),this.vtext=""}image(t){return this.fixedImgCreat?this.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i);if(this.trigB){const n=r.jr4("VN");n.bonus=this.trigB}return r}jr8(t){this.v(t,I.toCreature(t.event)),x.triggerDone()}cggC(){this.faction="N",this.rarity="H",this.name="Ceaseless Grimgaunt",this.iAttack=this.boof5813,this.iHealth=1,this.tribe.push("GG"),this.vtext=`If there are no friendly creatures in play, Spawn a level ${this.level} ${this.name}.`,this.hints=["ST"],this.trigB=this.rawNug(0,0,0,0,.5),this.v=this.cggV}cggV(t,i){p.qPlayerCreats(t.owner).length===0&&(this.logAct(!1),this.spawn(this,t.owner))}cfiendC(){this.faction="N",this.rarity="T",this.name="Contagion Fiend",this.iAttack=this.boof234,this.iHealth=this.boof5812,this.tribe.push("AB"),this.hints=["ST"],this.fixedImgCreat=!0;const t=-this.level;this.vtext=`Each enemy creature gets ${y.jr9(t,t)}.`;const i=this.boof246;this.trigB=this.buffNug(i,i),this.v=this.cfiendV}cfiendV(t,i){const r=-this.level,n=E.tick();p.qPlayerCreats(!t.owner).forEach(c=>this.buffD(c,r,n))}corpsC(){this.faction="N",this.rarity="C",this.name="Corpulent Shambler",this.iAttack=this.lValN([5,7,15]),this.iHealth=this.iAttack,this.tribe.push("ZB"),this.vtext="Put a 3/3 Zombie into this lane.",this.trigB=this.buffNug(3,3),this.v=this.corpsV}corpsV(t,i){const r=`${"ZBS"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}cslmC(){this.faction="N",this.rarity="C",this.name="Crypt Slime",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.vtext="Put a 1/1 Oozeling into this lane.",this.trigB=this.buffNug(1,1),this.v=this.cslmV}cslmV(t,i){const r=`${"COZ"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}dskC(){this.faction="N",this.rarity="C",this.name="Death Seeker",this.iAttack=1,this.iHealth=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.trigB=this.buffNug(t,t),this.v=this.dskV}dskV(t,i){const r=`${"SPN"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}fstrC(){this.faction="N",this.rarity="R",this.name="Fell Strider",this.iAttack=this.boof4810,this.iHealth=this.boof369,this.tribe.push("ZB");const t=W.getCard(this.fsz());this.vtext=`Spawn a ${y.tokName(t)}.`,this.trigB=this.multNug(this.buffNug(t.iAttack,t.iHealth),.5),this.v=this.fstrV}fstrV(t,i){this.spawn(this.fsz(),i.creature.owner)}fsz(){return "ZST"+this.level}fwlkC(){this.faction="N",this.rarity="C",this.name="Fell Walker",this.iAttack=this.boof359,this.iHealth=this.iAttack,this.tribe.push("ZB"),this.hints=["ST"];const t=W.getCard(K.zomc(this.level));this.vtext=`Put a ${y.tokName(t)} into this lane.`,this.trigB=this.buffNug(t.iAttack,t.iHealth),this.v=this.fwlkV}fwlkV(t,i){this.poot(K.zomc(this.level),i.creature.owner,i.creature.lane)}ffC(){this.faction="N",this.rarity="H",this.name="Fleshfiend",this.iAttack=this.boof6812,this.iHealth=this.iAttack,this.tribe.push("AB"),this.vtext=`Put a level ${this.level-1} ${this.name} into this lane.`,this.level>1&&(this.trigB=this.buffNug(0,this.lValN([0,6,15]))),this.v=this.ffV}ffV(t,i){const r=`${"FFD"}${this.level-1}`;this.poot(r,i.creature.owner,i.creature.lane)}flwcC(){this.faction="A",this.rarity="C",this.name="Flowsteel Carrier",this.iAttack=this.boof5915,this.iHealth=this.boof358,this.tribe.push("RB"),this.vtext=`Give a friendly Robot at random Armor ${this.iHealth}.`,this.trigB=this.regnNug(this.iHealth),this.v=this.flwcV}flwcV(t,i){const r=b.crTarg();r.player=k.toTarget(t.owner),r.tribe="RB";const n=p.creatByTarget(r);if(n.length>0){const c=n[S.randInt(0,n.length)];c.addArmor(this.iHealth),this.logAct(!1,c)}}ghsC(){this.faction="U",this.rarity="C",this.name="Glowhive Siren",this.iAttack=this.boof3814,this.iHealth=this.boof61117,this.tribe.push("IN"),this.vtext=`You gain ${this.boof124} to ${this.gghigh-1} health.`,this.trigB=this.playerNug(this.boof258),this.v=this.ghsV}ghsV(t,i){const r=S.randInt(this.boof124,this.gghigh);this.balm(t.owner,r),this.anim8(i.creature)}get gghigh(){return this.lValN([5,9,13])}ggC(){this.faction="N",this.rarity="C",this.name="Graveborn Glutton",this.iAttack=this.boof61117,this.iHealth=this.boof3814,this.tribe.push("AB"),this.vtext=`Deal ${this.boof124} to ${this.gghigh-1} damage to the enemy player.`,this.trigB=this.playerNug(this.boof258),this.v=this.ggV}ggV(t,i){const r=S.randInt(this.boof124,this.gghigh);this.ouch(!t.owner,r),this.anim8(i.creature)}gromC(){this.faction="U",this.rarity="C",this.name="Grove Matriarch",this.iAttack=this.boof4814,this.iHealth=this.iAttack+2,this.tribe.push("PL");const t=K.minionBuff(this.level),i=K.minionName(this.level);this.vtext=`Put a ${t}/${t} ${i} into this lane.`,this.trigB=this.buffNug(t,t),this.v=this.gromV}gromV(t,i){const r=K.minionCode(this.level);this.poot(r,i.creature.owner,i.creature.lane)}mmeC(){this.faction="A",this.rarity="C",this.name="Metamind Explorer",this.iAttack=this.boof3713,this.iHealth=this.iAttack+2,this.tribe.push("MM"),this.vtext=`Draw ${this.level} cards.`,this.trigB=this.rawNug(0,0,0,0,this.level*ft.dcWeight),this.v=this.mmeV}mmeV(t,i){k.drawCard(t.owner,this.level),this.anim8(i.creature)}nyozC(){this.faction="N",this.rarity="R",this.name="Nyrali Ooze",this.iAttack=this.boof247,this.iHealth=this.iAttack,this.tribe.push("OZ"),this.hints=["ST"];const t=this.level+this.iAttack+1;this.vtext=`Put a ${t}/${t} Oozeling into this lane.`,this.trigB=this.buffNug(t,t),this.v=this.nyozV}nyozV(t,i){const r=`${"OOZ"}${this.level}`;this.poot(r,i.creature.owner,i.creature.lane)}poxC(){if(this.faction="N",this.rarity="H",this.name="Progeny of Xith",this.iAttack=this.boof246,this.iHealth=this.iAttack,this.tribe.push("AB"),this.hints=["LB","ST"],this.vtext=`Spawn a level ${this.level+1} ${this.name}.`,this.level<3){const t=this.lValN([10,6,0]);this.trigB=this.buffNug(t,t)}this.v=this.poxV}poxV(t,i){const r=`${"POX"}${this.level+1}`;this.spawn(r,i.creature.owner)}rszC(){this.faction="N",this.rarity="R",this.name="Runescarred Zombie",this.iAttack=this.lValN([5,8,16]),this.iHealth=this.boof359,this.tribe.push("ZB"),this.vtext=`Put a ${y.levelGateText(this.level)}spell at random from your discard pile into your hand.`,this.trigB=this.rawNug(0,0,0,0,.5),this.v=this.rszV}rszV(t,i){const r=k.toPlayer(t.owner),n=b.target("TD");n.player=k.toTarget(r),n.card="S",n.level=w.ddf2(this.level);const c=w.deckByTarget(n);if(c.length>0){const f=c[S.randInt(0,c.length)];r.discard.splice(f[1],1),Dt.addCard(r,f[0],!0),this.anim8(i.creature)}}spirmC(){this.faction="T",this.rarity="H",this.name="Spiritflame Mystic",this.iAttack=this.boof6912,this.iHealth=this.iAttack-3,this.tribe.push("HM"),this.hints=["ST"],this.vtext=`Deal ${this.boof246} damage to each creature.`,this.trigB=this.rawNug(0,0,0,0,.2),this.v=this.spirmV}spirmV(t,i){const r=this.boof246,n=E.tick();p.qActiveCreats().forEach(c=>this.smack(c,r,n))}sssC(){this.faction="N",this.rarity="L",this.name="Spiritstone Sentry",this.iAttack=this.boof4610,this.iHealth=this.iAttack,this.tribe.push("ST"),this.vtext=`If ${this.name} was in a side lane, Spawn a ${this.name}.`,this.hints=["ST"],this.trigB=this.buffNug(this.iAttack,this.iAttack),this.v=this.sssV}sssV(t,i){(i.creature.lane===1||i.creature.lane===5)&&this.spawn(i.creature.code,t.owner)}usaC(){this.faction="T",this.rarity="H",this.name="Unstable Asir",this.iAttack=this.boof357,this.iHealth=this.boof61016,this.iDefend=!0,this.tribe.push("FR","AS"),this.hints=["ST"],this.vtext=`Deal damage equal to ${this.name}'s attack to the enemy player.`,this.trigB=this.playerNug(this.iAttack),this.v=this.usaV}usaV(t,i){i.creature.attack>0&&(this.ouch(!t.owner,i.creature.attack),this.anim8(i.creature))}vgfsC(){this.faction="N",this.rarity="C",this.name="Vengeful Spirit",this.iAttack=this.boof357,this.iHealth=this.iAttack-2,this.tribe.push("ST"),this.hints=["ST"];const t=this.boof369n;this.vtext=`Give the opposing creature ${y.jr9(t,t)}.`,this.trigB=this.buffNug(-t,-t),this.v=this.vgfsV}vgfsV(t,i){const r=i.creature.opposed;r&&this.buffD(r,this.boof369n)}xhostC(){this.faction="N",this.rarity="C",this.name="Xithian Host",this.iAttack=this.boof359,this.iHealth=this.boof135,this.tribe.push("AB"),this.hints=["ST"],this.vtext=`Deal ${this.iAttack} damage to the enemy player and you gain ${this.iAttack} health.`,this.trigB=this.playerNug(this.iAttack*2),this.v=this.xhostV}xhostV(t,i){const r=this.iAttack;this.ouch(!t.owner,r),this.balm(t.owner,r),this.anim8(i.creature)}zimusC(){this.faction="N",this.rarity="L",this.name="Zimus, the Undying",this.iAttack=this.boof51014,this.iHealth=this.lValN([2,5,7]),this.tribe.push(this.level===1?"HM":"ZB"),this.vtext=`Spawn a Zimus, the ${this.level===2?"Returned":"Undying"}.`,this.level<3?(this.hints=["LG"],this.level===2?(this.trigB=this.buffNug(this.iAttack,this.iHealth),this.hints.push("ZZ-5")):this.hints.push("ZZ-1")):(this.hints=["ST","ZZ-5"],this.trigB=this.buffNug(this.iAttack,this.iHealth),this.trigB.bonus=1),this.v=this.zimusV}zimusV(t,i){let r;this.level===2?r=`${"ZTR"}2`:r=`${"ZTU"}3`,this.spawn(r,t.owner)}}class Li extends vt{cons(t){({["IRT"]:()=>this.infrC(),["NXB"]:()=>this.nexbC()})[t]()}constructor(t){super(t),this.overload=!0,this.maxLevel=1,this.cons(this.cardCode())}m;nexus=!1;playTargets(){return[b.playerActTarg("F","CARD",this.code,"")]}handleAction(t){this.logSpell();const i=k.toPlayer(t.playerA),r={effId:E.genId(),logicCode:this.code};i.effects.push(r),this.enforcePlayerEffect(r,i),T.spellCast()}enforcePlayerEffect(t,i){const r=this.m(t.effId),n=this.nexus?[3]:[1,5];p.qPlayerCreats(i.isPlayerA).forEach(c=>{c.faction===this.faction&&n.includes(c.lane)?c.addModSafe(r):c.removeModSafe(t.effId)})}infrC(){this.faction="N",this.rarity="L",this.name="Infernal Ritual",this.text='You get "Each friendly Nekrium creature in the side lanes get Regenerate 2".',this.m=this.infrM}infrM(t){return b.mod("RG",2,t)}nexbC(){this.faction="A",this.rarity="L",this.name="Nexus Bubble",this.nexus=!0,this.text='You get "Friendly Alloyin creatures in the center lane get Armor 3".',this.m=this.nexbM}nexbM(t){return b.mod("AR",3,t)}}class qt extends vt{cons(t){({["AEC"]:()=>this.anceC(),["CYW"]:()=>this.wailC(),["DIS"]:()=>this.disnC(),["DRE"]:()=>this.dracC(),["DCH"]:()=>this.dchantC(),["EVT"]:()=>this.endvC(),["ESU"]:()=>this.esrgC(),["HOX"]:()=>this.howlC(),["IGR"]:()=>this.icegC(),["ITO"]:()=>this.itorC(),["IME"]:()=>this.imecC(),["LCE"]:()=>this.lucidC(),["MSP"]:()=>this.mendC(),["NEM"]:()=>this.netherC()})[t]()}playTarg;constructor(t){super(t),this.playTarg="X",this.cons(this.cardCode())}p;playTargets(){return[b.playerActTarg(this.playTarg,"CARD",this.code,"")]}handleAction(t){this.logSpell();const i=k.toPlayer(t.playerA);this.p(i),T.spellCast()}ddf8(t){if(t.trigger.type==="TE")return t.event.playerA===t.owner;if(t.trigger.type==="PC"){const i=t.event,r=W.getCard(i.cardCode);return r.type==="S"&&r.faction==="T"&&i.playerA===t.owner}else if(t.trigger.type==="EF"){const i=I.toEnterField(t.event);return i.creature.faction==="U"&&i.creature.owner===t.owner}else return!1}jr8(t){const i=Wt.extractCardCode(t.trigger.logicCode),r=t.event;let n=!1;if(i==="LCE"){n=!0;const c=k.toPlayer(r.playerA),f=this.level===1?1:2;this.logAct(!1),k.drawCard(c,f)}else if(i==="IME"){n=!0;const c=Bt.gravedigger(k.toTarget(t.owner),w.ddf2(this.level+1));c&&this.spawn(c,r.playerA)}else if(i==="DRE"){n=!0;const c=this.level===1?11:21;this.ouch(!r.playerA,S.randInt(1,c))}else if(i==="IGR")this.ouch(!r.playerA,2);else if(i==="EVT"){const c=I.toEnterField(t.event);this.buffD(c.creature,1),this.logAct(!1,c.creature)}else if(i==="AEC"){n=!0;const c=p.qPlayerCreats(t.owner);if(c.length>0){const f=this.level===1?[1,2]:[2,4];c.forEach(m=>{this.logAct(!1,m),this.buffB(m,f[0],f[1])})}}else super.jr8(t);if(n&&this.level<3){const c=k.toPlayer(r.playerA),f=b.trigIdx(c.triggers,t.trigger);f>-1?t.trigger.customCode==="P2"?c.triggers[f].customCode="P1":c.triggers.splice(f,1):console.error("Wery curious, could not find player trigger ",t.trigger)}x.triggerDone()}echTxt(){return"At the end of "+(this.level===3?"each of your turns":"this turn and your next turn")+", "}echoZ(t){const i=b.trigger("TE",this.code);return this.level<3&&(i.customCode="P2"),i.changes=!0,k.addTr(t,i),i}anceC(){this.faction="U",this.rarity="L",this.name="Ancestral Echoes",this.playTarg="F";const t=this.level===1?[1,2]:[2,4];this.text=`${this.echTxt()}each friendly creature gets ${y.jr9(t[0],t[1])}.`,this.p=this.aeZ}aeZ(t){const i=this.echoZ(t),r=this.boof248;i.bonus=this.buffNug(r,r*2)}wailC(){this.faction="N",this.rarity="R",this.name="Crypt Wail",this.playTarg="E";const t=this.boof579;this.text=`Deal ${t} damage to the enemy player and gain ${t} health. If a Raid occured this turn, deal ${t*2} damage and gain ${t*2} health instead.`,this.p=this.wailZ}wailZ(t){const i=this.boof579*(L.ffs>2?2:1);this.ouch(t,i),this.balm(!t.isPlayerA,i)}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.`,this.p=this.disnZ}disnZ(t){this.ouch(t,S.randInt(1,this.dshigh))}get dshigh(){return this.lValN([9,16,26])}dracC(){this.faction="T",this.rarity="L",this.name="Draconic Echoes",this.playTarg="F";const t=this.level===1?"10":"20";this.text=`${this.echTxt()}deal 1 to ${t} damage to the enemy player.`,this.p=this.deZ}deZ(t){const i=this.echoZ(t);i.bonus=this.playerNug(this.lValN([4,9,25]))}dchantC(){this.faction="U",this.rarity="C",this.name="Druid's Chant",this.playTarg="F",this.text=`You gain ${this.boof81220} health.`,this.p=this.dchantZ}dchantZ(t){this.balm(t,this.boof81220)}endvC(){this.faction="U",this.rarity="L",this.name="Enduring Vitality",this.overload=!0,this.maxLevel=1,this.playTarg="F",this.text=`You get "When a friendly Uterra creature enters play, it gets ${y.jr9(1,1)}".`,this.p=this.endvZ}endvZ(t){const i=b.trigger("EF",this.code);i.bonus=this.buffNug(4,4),i.changes=!0,k.addTr(t,i)}esrgC(){this.faction="A",this.rarity="R",this.name="Energy Surge",this.overload=this.level===3,this.level===1?this.hints=["LG"]:this.free=!0,this.playTarg="F",this.text=`Draw ${this.level} card${this.free?"s":""}.`,this.p=this.esrgZ}esrgZ(t){k.drawCard(t,this.level)}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.",this.p=this.howlZ}howlZ(t){const i=k.getActive(),r=i.rank*3;this.ouch(t,r),this.balm(i,r)}icegC(){this.faction="T",this.rarity="L",this.name="Ice Grasp",this.overload=!0,this.maxLevel=1,this.playTarg="F",this.text='You get "When you play a Tempys spell, deal 2 damage to the enemy player".',this.p=this.icegZ}icegZ(t){const i=b.trigger("PC",this.code);i.bonus=this.playerNug(6),i.changes=!0,k.addTr(t,i)}itorC(){this.faction="T",this.rarity="R",this.name="Ice Torrent",this.free=this.level>1,this.level===1&&(this.hints=["LG"]),this.playTarg="E",this.text=`Deal ${this.boof234} damage to the enemy player.`,this.p=this.itorZ}itorZ(t){this.ouch(t,this.boof234)}imecC(){this.faction="N",this.rarity="L",this.name="Immortal Echoes",this.playTarg="F";const t=`Spawn a random friendly ${y.levelGateText(this.level+1)}creature that was destroyed this game`;this.text=`${this.echTxt()}${t}.`,this.p=this.ieZ}ieZ(t){const i=this.echoZ(t),r=this.lValN([1,1,3]);i.bonus=this.multNug(this.avgSpawnNug(),r)}lucidC(){this.faction="A",this.rarity="L",this.name="Lucid Echoes",this.playTarg="F";const t=this.level===1?"draw 1 card":"draw 2 cards";this.text=`${this.echTxt()}${t}.`,this.p=this.leZ}leZ(t){const i=this.echoZ(t),r=this.boof124*ft.dcWeight;i.bonus=this.rawNug(0,0,0,0,r)}mendC(){this.faction="U",this.rarity="R",this.name="Mending Spring",this.playTarg="F",this.text=`You gain 1 to ${this.mendboof} Health.`,this.p=this.mendZ}mendZ(t){nt.simOn?this.boof61224:this.mendboof+1,this.balm(t,S.randInt(1,this.mendboof+1))}get mendboof(){return this.lValN([10,20,40])}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`,this.p=this.netherZ}netherZ(t){const i=this.boof4712;this.ouch(t,i),this.balm(!t.isPlayerA,i)}}class $s extends P{constructor(t){super(t),this.faction="U",this.rarity="L",this.name="Primeval Ancient",this.iAttack=this.boof359,this.iHealth=this.boof71117,this.tribe.push("DN"),this.text=`At the end of your turn, you gain ${this.healy} life.~Forge: If there are no enemy creatures, spawn a copy of this.`}get healy(){return this.level+2}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("TE");return n.bonus=this.playerNug(this.healy,"TW"),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){t.trigger.type==="FR"?p.qEnemyCreats().length===0&&this.spawn(this,t.owner):t.event.code==="TRE"&&(this.balm(t.owner,this.healy),this.anim8(t.creatId)),x.triggerDone()}}class Us extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Rageborn Hellion",this.iAttack=this.boof469,this.iHealth=this.iAttack*2,this.tribe.push("FR","EL"),this.text=`When a friendly creature ${y.dbdtap()}, ${this.name} gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM"),c=this.boof246;return n.bonus=this.buffNug(c,c,"TP"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcCreat.owner===t.owner}jr8(t){p.creatByTr(t).buff(this.level,this.level,t.draw?"T":"X"),x.triggerDone()}}class xe extends P{cons(t){({["BTD"]:()=>this.btdC(),["DKS"]:()=>this.dksC(),["HMO"]:()=>this.hrdC(),["HVE"]:()=>this.hveC(),["LTU"]:()=>this.ltuC(),["QSW"]:()=>this.qswC(),["RTW"]:()=>this.rlwC(),["SMS"]:()=>this.smsC()})[t]()}trigB;rtext="";constructor(t){super(t),this.cons(this.cardCode()),this.text="Raid: "+this.rtext,this.rtext=""}r;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RD");return n.bonus=this.trigB,r}jr8(t){this.r(t),x.triggerDone()}btdC(){this.faction="T",this.rarity="L",this.name="Blitzmane, the Destroyer",this.iAttack=this.lValN([5,8,10]),this.iHealth=this.iAttack-1,this.iAggro=!0,this.iMobile=1,this.tribe.push("DG"),this.trigB=this.buffNug(0,this.iAttack,"TX"),this.rtext="Deal damage equal to Blitzmane's attack to the opposing creature. If unopposed, deal the damage to the enemy player instead.",this.r=this.btdR}btdR(t){const i=p.creatByTr(t);if(i.attack>0){const r=i.opposed;r?this.smack(r,i.attack):(this.ouch(!i.owner,i.attack),this.anim8(i))}}dksC(){this.faction="T",this.rarity="R",this.name="Dragonkeeper Shaman",this.iAttack=this.boof61016,this.iHealth=this.boof369,this.tribe.push("HM");const t=this.level+2;this.trigB=this.buffNug(0,t,"TX"),this.rtext=`Deal ${t} damage to each enemy creature.`,this.r=this.dksR}dksR(t){const i=p.qEnemyCreats();if(i.length>0){const r=E.tick(),n=this.level+2;i.forEach(c=>this.smack(c,n,r))}}hrdC(){this.faction="U",this.rarity="C",this.name="Herd Mother",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.level+2;this.trigB=this.buffNug(this.level,this.level),"TS",this.rtext=`${this.name} gets ${y.jr9(t,t)}.`,this.r=this.hrdR}hrdR(t){this.logAct(!1),this.buffD(p.creatByTr(t),this.level+2)}hveC(){this.faction="U",this.rarity="R",this.name="Hive Empress",this.iAttack=this.boof234,this.iHealth=this.boof61016,this.tribe.push("IN"),this.hints=[this.lValH(["ZZ+1","ZZ+2","ZZ+4"])],this.trigB=this.playerNug(this.iAttack,"TX"),this.rtext=`Give the enemy player Poison ${this.iAttack}.`,this.r=this.hveR}hveR(t){this.logAct(!1),k.addPoison(!t.owner,this.iAttack),this.anim8(t.creatId)}ltuC(){this.faction="U",this.rarity="L",this.name="Lorus, the Unrivaled",this.iAttack=this.boof2612,this.iHealth=this.boof71117,this.tribe.push("LP"),this.trigB=this.buffNug(3,3,"TX"),this.level===3?this.rtext=`Each other friendly creature gets ${y.jr9(3,3)}.`:this.rtext=`Replace this with a level ${this.level+1} ${this.name}.`,this.r=this.ltuR}ltuR(t){if(this.logAct(!1),this.level===3)p.creatByTarget(b.crFriendNotMeTarg(t.creatId)).forEach(i=>this.buffD(i,3));else{const i=p.creatByTr(t);this.replc(this.levelUpCard(),i.owner,i.lane)}}qswC(){this.faction="T",this.rarity="L",this.name="Quakeasaurus Wrecks",this.iAttack=this.boof5814,this.iHealth=this.iAttack+2,this.tribe.push("DN");const t=this.boof234;this.trigB=this.playerNug(t,"TX"),this.rtext=`Deal damage to a random enemy creature and to the enemy player equal to ${t}x the number of friendly Dinosaurs.`,this.r=this.qswR}qswR(t){const i=b.crFriendTarg();i.tribe="DN";const r=p.creatByTarget(i).length*this.boof234,n=p.qEnemyCreats();n.length>0&&this.smack(n[S.randInt(0,n.length)],r),this.ouch(!t.owner,r),this.anim8(t.creatId)}rlwC(){this.faction="U",this.rarity="H",this.name="Relentless Wanderers",this.iAttack=this.boof51015,this.iHealth=this.iAttack-this.level,this.tribe.push("ST","WD"),this.hints=[this.lValH(["ZZ-1","ZZ-3","ZZ-3"])],this.trigB=this.multNug(this.statSpawnNug(this.iAttack,this.iHealth,"TW"),.5),this.rtext=`Spawn a ${y.tokName(this)}.`,this.r=this.rlwR}rlwR(t){this.spawn(this,t.owner)&&this.logAct(!1)}smsC(){this.faction="T",this.rarity="C",this.name="Stampeding Mongosaur",this.iAttack=this.boof61015,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.boof6810;this.trigB=this.playerNug(t/2,"TW"),this.rtext=`Deal ${t} damage to the enemy player.`,this.r=this.smsR}smsR(t){this.ouch(!t.owner,this.boof6810),this.anim8(t.creatId)}}class te extends P{cons(t){({["AIV"]:()=>this.avinvC(),["BSP"]:()=>this.bskphC(),["CRC"]:()=>this.crucC(),["ESK"]:()=>this.ebknC(),["FWC"]:()=>this.fwcC(),["FME"]:()=>this.feggC(),["MMV"]:()=>this.mmovC(),["PSH"]:()=>this.porshC(),["RGG"]:()=>this.runegC(),["SSR"]:()=>this.solrevC(),["SSM"]:()=>this.spshamC(),["SSG"]:()=>this.snoutC(),["UGM"]:()=>this.mantisC()})[t]()}rtext="";trigB;constructor(t){super(t),this.cons(this.cardCode()),this.text="Gain Rank: "+this.rtext,this.rtext=""}r;image(t){return this.rarity==="T"?this.cardCode()==="FWC"?this.rawImage("MPH",t):super.fixedImage(t):super.image(t)}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("RU");return n.bonus=this.trigB,r}ddf8(t){return t.event.playerA===t.owner}jr8(t){this.r(t),x.triggerDone()}avinvC(){this.faction="T",this.rarity="H",this.name="Avalanche Invoker",this.iAttack=this.boof6914,this.iHealth=this.iAttack+1,this.tribe.push("ER","AS");const t=this.boof3612;this.trigB=this.buffNug(t,0,"TH"),this.rtext=`Deal ${t} damage to each non-Tempys creature.`,this.r=this.avinvR}avinvR(t){const i=this.boof3612,r=E.tick();p.qActiveCreats().filter(n=>n.faction!=="T").forEach(n=>this.smack(n,i,r))}bskphC(){this.faction="N",this.rarity="C",this.name="Blightskull Phantasm",this.iAttack=this.boof5814,this.iHealth=this.boof61017,this.tribe.push("ST");const t=this.boof369n;this.trigB=this.buffNug(0,-t,"TH"),this.rtext=`The opposing creature gets ${y.jr9(t,t)}.`,this.r=this.bskphR}bskphR(t){const i=p.creatByTr(t).opposed;i&&this.buffD(i,this.boof369n)}crucC(){this.faction="A",this.rarity="R",this.name="Crucible Colossus",this.iAttack=this.boof61016,this.iHealth=this.iAttack+2,this.tribe.push("RB"),this.iDefend=!0,this.trigB=this.rawNug(0,0,0,0,.2,"TH"),this.rtext=`Negate Defender from ${this.name}.`,this.r=this.crucR}crucR(t){p.creatByTr(t).negDefend("A"),t.trigger.bonus.threat=void 0}ebknC(){this.faction="N",this.rarity="H",this.name="Ebonskull Knight",this.iAttack=this.lValN([9,13,18]),this.iHealth=this.iAttack-2,this.tribe.push("VP"),this.trigB=this.rawNug(0,0,0,0,-1,"TL"),this.rtext=`Destroy ${this.name}.`,this.r=this.ebknR}ebknR(t){this.kill(p.creatByTr(t))}fwcC(){this.faction="U",this.rarity="T",this.maxLevel=1,this.name="Feywing Chrysalis",this.iAttack=0,this.iHealth=3,this.tribe.push("CR"),this.iDefend=!0,this.trigB=this.buffNug(5,5,"TH"),this.rtext=`Replace ${this.name} with a 9/9 Feywing.`,this.r=this.fwcR}fwcR(t){const i=p.creatByTr(t);this.replc(`${"FWG"}1`,i.owner,i.lane)}feggC(){this.faction="T",this.rarity="T",this.minLevel=this.level,this.maxLevel=this.level,this.name="Frostmane Egg",this.iAttack=0,this.iHealth=6,this.tribe.push("DG"),this.iDefend=!0;const t=this.lValN([6,9,13]);this.trigB=this.buffNug(t,t,"TH"),this.rtext=`Replace ${this.name} with a level ${this.level} Frostmane Dragon.`,this.r=this.feggR}feggR(t){const i=p.creatByTr(t);this.replc(`${"FMD"}${this.level}`,i.owner,i.lane)}mmovC(){this.faction="A",this.rarity="C",this.name="Metamind Overseer",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("MM"),this.trigB=this.rawNug(0,0,0,0,ft.dcWeight*.6,"TH"),this.rtext="Draw 2 cards.",this.r=this.mmovR}mmovR(t){k.drawCard(t.owner,2),this.anim8(t.creatId)}porshC(){this.faction="N",this.rarity="H",this.name="Portal Shade",this.iAttack=this.boof5914,this.iHealth=this.boof71118,this.tribe.push("ST"),this.trigB=this.multNug(this.avgSpawnNug(),.4),this.trigB.threat="TH",this.rtext="Spawn a random creature that was destroyed this game.",this.r=this.porshR}porshR(t){const i=Bt.gravedigger();i&&this.spawn(i,t.owner)}runegC(){this.faction="U",this.rarity="H",this.name="Runegrove Guardian",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("PL"),this.trigB=this.buffNug(0,this.iAttack,"TH"),this.rtext=`${this.name} gets ${y.jr9(this.iAttack,this.iAttack)}.`,this.r=this.runegR}runegR(t){this.buffD(p.creatByTr(t),this.iAttack)}solrevC(){this.faction="U",this.rarity="L",this.name="Solstice Reveler",this.iAttack=this.boof4816,this.iHealth=this.iAttack,this.tribe.push("HM");const t=this.boof248;this.trigB=this.buffNug(t,t,"TH");const i=this.level===3;let r="";i&&(r=", and Breakthrough"),this.rtext=`Each friendly creature gets ${y.jr9(t,t,i)}${r}.`,this.r=this.solrevR}solrevR(t){const i=this.boof248;p.ddf1().forEach(r=>{this.buffD(r,i),this.level===3&&(r.breakthrough=!0)})}spshamC(){this.faction="T",this.rarity="C",this.name="Spiritfrost Shaman",this.iAttack=this.boof71117,this.iHealth=this.boof4610,this.tribe.push("HM");const t=this.boof579;this.rtext=`Deal ${t} damage to the enemy player.`,this.trigB=this.playerNug(t,"TH"),this.r=this.spshamR}spshamR(t){this.ouch(!t.owner,this.boof579),this.anim8(t.creatId)}snoutC(){this.faction="U",this.rarity="C",this.name="Stouthide Stegadon",this.iAttack=this.boof4714,this.iHealth=this.boof71117,this.tribe.push("DN"),this.rtext=`Heal ${this.snoutbof} damage from ${this.name}.`,this.trigB=this.buffNug(0,this.iHealth),this.r=this.snoutR}snoutR(t){p.creatByTr(t).heal(this.snoutbof)}get snoutbof(){return this.level*10}mantisC(){this.faction="U",this.rarity="C",this.name="Umbraglim Mantis",this.iAttack=this.boof6914,this.iHealth=this.iAttack-1,this.tribe.push("IN");const t=this.mantbof;this.rtext=`You gain ${t} health.`,this.trigB=this.playerNug(t/3,"TH"),this.r=this.mantisR}mantisR(t){this.balm(t.owner,this.mantbof),this.anim8(t.creatId)}get mantbof(){return this.lValN([8,10,12])}}class Os extends vt{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Remembrance",this.text=`Banish a ${y.levelGateText(this.level)}creature from your discard pile, then Spawn a copy of it.`}canPlay(){return this.remCrds(!1).length>0}playTargets(){const t=w.boardTarget("CARD",this.code);return t.param="P1",[t]}remCrds(t){const i=k.getActive(),r=b.target("TD");r.player=k.toTarget(i),r.card="C",r.level=w.ddf2(this.level);const n=bt.generateContent(i.discard,!1,r);return t?bt.uniqueContent(n):n}handleAction(t){if(t.param==="P1"){const i=this.remCrds(E.aiActive),r=i.map(c=>{const f=b.deckSelectAction("CARD",c.cardCode,c.sourceIdx);return f.host=this.code,f}),n=T.cancelAction();n.param="PM",r.push(n),bt.showCustomDeck(i,r)}else{const i=t,r=k.getActive();r.discard.splice(i.position,1);const n=this.spawn(i.card,r.isPlayerA);this.logSpell(n),gt.popMode(),T.spellCast()}}}class Vs extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Riftlasher",this.iAttack=this.boof359,this.iHealth=this.boof61016,this.tribe.push("FR","EL"),this.text=`When ${this.name} ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.interactive=!0,n.bonus=this.buffNug(this.iAttack,0,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId&&t.owner===k.activeA}jr8(t){const i=w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil(t.creatId,t.event.dmg)));i.length>0?(i.push(T.noneEndTrigger()),T.ddf5(i)):x.triggerDone()}handleAction(t){const i=S.deTil(t.param);this.smack(p.ddf6(t),parseInt(i[1])),T.actionDone(!0)}}class zs extends ne{jr3(t,i){const r=super.jr3(t,i);return r.jr4("AS"),r}jr8(t){if(t.trigger.type==="AS"){let i=!0;for(;i;){const r=this.spawn(this,t.owner);r?r.opposed&&(i=!1):i=!1}x.triggerDone()}else super.jr8(t)}}class Zs extends P{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Scourgeflame Sorcerer",this.iAttack=this.boof358,this.iHealth=this.boof5914,this.tribe.push("ZB");let i=": ",r=1;this.level<3&&(i=", destroy another friendly creature: ",r=.5);const n=`Destroy an enemy ${y.levelGateText(this.level+1)}creature.`;this.text=`Activate${i}${n}`,this.bonus=this.multNug(this.avgSpawnNug(),r),this.bonus.threat="TX"}canActivate(t){return this.enemies(t).length>0?this.level===3?!0:this.friends(t).length>0:!1}startActivation(t){let i;this.level===3?i=this.enemies(t):i=this.friends(t),i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.jr5(i[0]),n=p.ddf6(t);if(i[1]==="P1"){const c=this.enemies(r,n.id);c.push(T.cancelAction()),T.ddf5(c)}else{this.logAct(!0);const c=E.tick();this.level<3&&this.kill(p.jr5(i[2]),c),this.kill(n,c),r.endActivation()}}friends(t){const i=b.crFriendNotMeActTarg("CARD",t.id,this.code,S.enTil(t.id,"P1"));return w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t.id,"P2",i));return r.level=w.ddf2(this.level+1),w.toActions(r)}}class Ys extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Scourge Knights",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.tribe.push("ZB");const i=this.boof246n;this.text=`Formation: Give an enemy creature ${y.jr9(i,i)}.`}get formation(){return!0}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FM");return n.interactive=!0,r}jr8(t){if(t.owner!==k.activeA){x.triggerDone();return}const i=b.crEnemyActTarg("CARD",this.code,""),r=w.toActions(i);r.length>0?T.ddf5(r):x.triggerDone()}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i),this.buffD(i,this.boof246n),T.actionDone(!0)}}class Ks extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Seismic Adept",this.iAttack=this.boof4712,this.iHealth=this.boof61218,this.tribe.push("HM"),this.text="Activate: Move an enemy creature to another available enemy lane.",this.bonus=this.rawNug(0,0,0,0,this.level*.5,"TW")}canActivate(t){return this.enemies(t).length>0&&this.empties(t).length>0}startActivation(t){const i=this.enemies(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.jr5(i[1]);if(i[0]==="P1"){const n=this.empties(r,p.ddf6(t).id);n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[2]);this.logAct(!0,n),this.lurk(n,t.lane),r.endActivation()}}empties(t,i=""){const r=b.emptyPlayerActTarg("E","CARD",this.code,S.enTil("P2",t.id,i));return w.toActions(r)}enemies(t){const i=b.crEnemyActTarg("CARD",this.code,S.enTil("P1",t.id));return w.toActions(i)}}class Xs extends P{constructor(t){super(t),this.faction="A",this.rarity="H",this.name="Shadowsmith",this.iAttack=this.boof3612,this.iHealth=this.boof6915,this.tribe.push("DF","HM"),this.text=`When ${this.name} or another friendly Darkforged enters play on your turn, you may discard and level up a card.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("EF");return n.bonus=this.rawNug(0,0,0,0,.5,"TW"),n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}ddf8(t){const i=I.toCreature(t.event);return i.creature.owner===t.owner&&t.owner===k.activeA&&i.creature.isTribe("DF")}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class si extends P{constructor(t){super(t),this.rarity="R",this.iAttack=this.boof4612,this.iHealth=this.boof61016;const i=this.cardCode();i==="SSS"?this.steel():i==="LSS"?this.life():i==="FSS"?this.flame():i==="DSS"&&this.dark(),this.level>1?this.text=`When you play a ${y.levelGateText(this.level-1)}${y.factionText(this.faction)} card, you may ${this.tuxt}.`:this.hints=["LG"],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 ${y.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 ${y.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 r=super.jr3(t,i);if(this.level>1){const n=r.jr4("PC");n.interactive=!0,n.bonus=this.rawNug(0,0,0,0,this.level*.5,"TX")}return r}ddf8(t){if(t.event.playerA===t.owner){const i=W.getCard(t.event.cardCode);if(i.level0?T.ddf5(r):x.triggerDone()}else{const i=p.qPlayerCreats(!t.owner);if(i.length>0){this.logAct(!1);const r=this.splat;i.forEach(n=>n.addPoison(r))}x.triggerDone()}}}class Qs extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Slumbering Shrine",this.iAttack=0,this.iHealth=this.lValN([14,20,30]),this.iDefend=!0,this.tribe.push("ER","EL"),this.text="When you play an spell, you may Negate Defender from a friendly creature."}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.bonus=this.rawNug(0,0,0,0,.5,"TX"),n.interactive=!0,r}handleAction(t){const i=p.ddf6(t);i.negDefend("T"),this.logAct(!1,i),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,""),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}}class Js extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Snowdrift Alpha",this.iAttack=this.boof61224,this.iHealth=this.boof4816,this.tribe.push("ST","WF"),this.hints=[this.lValH(["ZZ-2","ZZ-3","ZZ-5"])];const i=W.getCard(this.hc());this.text=`Activate: Put a ${y.tokName(i)} into an available lane.`,this.bonus=this.spawnNug(i,"TX")}hc(){return "HTP"+this.level}canActivate(t){return this.empties(t).length>0}startActivation(t){const i=this.empties(t);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){this.logAct(!0),this.poot(this.hc(),t.playerA,t.lane),p.jr5(t.param).endActivation()}empties(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,t.id);return w.toActions(i)}}class _s extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Sparkstone Elemental",this.iAttack=this.boof4815,this.iHealth=this.iAttack+3,this.tribe.push("LT","EL"),this.text="Negate Defender from each creature."}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="A",r}enforceEffect(t){if(t.status==="A"){const r=b.mod("ND",!0,t.id);p.qActiveCreats().forEach(n=>n.addModSafe(r))}else p.qActiveCreats().forEach(r=>r.removeModSafe(t.id))}}class ta extends vt{constructor(t){super(t),this.faction="N",this.rarity="R",this.name="Spiritcleave",this.text=`Destroy a ${y.levelGateText(this.level+1)}creature with the highest health among all creatures.${this.level===3?"~You gain health equal to that creature's health.":""}`}canPlay(){return p.creatByTarget(this.firstT()).length>0}playTargets(){return[this.firstT()]}firstT(){let t=-1;const i=p.qActiveCreats();i.forEach(c=>{c.health>t&&(t=c.health)});const r=i.filter(c=>c.health===t).map(c=>c.id),n=b.crActTarg("CARD",this.code,"");return n.level=w.ddf2(this.level+1),n.victims=S.enTil(...r),this.level<3&&(n.hint=["KL"]),n}handleAction(t){this.logSpell();const i=p.ddf6(t);this.kill(i),this.level===3&&this.balm(k.activeA,i.health),T.spellCast()}}class ea extends vt{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 ${y.jr9(i,i)}.`}canPlay(){return p.ddf1().length>0&&p.qActiveCreats().length>1}playTargets(){return[b.crFriendActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=b.crNotMeActTarg("CARD",r.id,this.code,S.enTil("P2",r.id));n.hint=["BF"];const c=w.toActions(n);c.push(T.cancelAction()),T.ddf5(c)}else this.logSpell(r),this.kill(p.jr5(i[1])),this.buffD(r,this.boof5814),T.spellCast()}}class ia extends P{constructor(t){super(t),this.faction="N",this.rarity="H",this.name="Spite Hydra",this.iAttack=this.boof5914,this.iHealth=this.iAttack,this.tribe.push("HY"),this.text=`When ${this.name} ${y.dbdtac()}, this gets ${y.jr9(this.level,this.level)}.~Allied Tempys: Activate: Deal ${this.level} damage to another creature. This gets ${y.jr9(this.level,this.level)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.buffNug(this.level,this.level),r}zapTargs(t){const i=b.crNotMeActTarg("CARD",t,this.code,t);return i.hint=["HR"],w.toActions([i,w.buttonTarget("CANC")])}canActivate(t){return this.zapTargs(t.id).length>1&&t.hasMod(t.id)}startActivation(t){T.ddf5(this.zapTargs(t.id))}ddf8(t){return t.event.battle&&t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}handleAction(t){const i=p.jr5(t.param);this.logAct(!0),this.smack(p.ddf6(t),this.level),i.buff(this.level,this.level,"T"),i.endActivation()}jr8(t){const i=p.creatByTr(t);if(t.trigger.type==="FR"){if(L.allied("T")){i.addMod(b.mod("AL",!0,i.id),"T"),i.changed=!0;const r=i.jr4("NT");r.bonus=this.buffNug(this.boof246,this.level,"TS")}}else t.trigger.type==="DM"&&this.buffD(i,this.level);x.triggerDone()}}class ra extends P{constructor(t){super(t),this.faction="A",this.rarity="R",this.name="Statis Warden",this.iAttack=this.boof5915,this.iHealth=this.iAttack+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 r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.rawNug(0,0,0,0,.5),r}handleAction(t){const i=p.ddf6(t);this.logAct(!1,i);const r=b.mod("DF",!0);r.expiry="EN",this.modA(i,r),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.crFriendActTarg("CARD",this.code,t.creatId);i.canDefender=!0;const r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class sa extends P{constructor(t){super(t),this.faction="A",this.rarity="C",this.name="Steeleye Researcher",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("HM"),this.hints=["RD"],this.text=`Upgrade: You may ${y.daluac()}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("UP");return n.interactive=!0,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions(i);r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}}class aa extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steeleye Seer",this.iAttack=0,this.iHealth=this.boof81218,this.iDefend=!0,this.tribe.push("HM"),this.level===3?this.text="Activate: Level up a card in your hand. You may use this ability twice each turn.":this.text="Activate: Level a card in your hand, then discard it if its level is higher than your Rank.",this.bonus=this.rawNug(0,0,0,0,this.lValN([.8,1.7,3]),"TX")}jr3(t,i){const r=super.jr3(t,i);return this.level===3&&(r.jr4("TS"),this.addExtraActivate(r)),r}ddf8(t){return t.event.playerA===t.owner}jr8(t){this.addExtraActivate(p.creatByTr(t)),x.triggerDone()}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=k.toPlayer(i.owner);this.level===3||r.rank>parseInt(t.card.slice(3))?Dt.levelInHand(r,t.position,W.getCard(t.card).levelUpCard()):L.levelAndDiscardA(t),this.anim8(i),i.endActivation()}}class na extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Steelscale Dragon",this.iAttack=this.boof4812,this.iHealth=this.iAttack+2,this.tribe.push("RB","DG"),this.iMobile=this.level;const i=this.boof246;this.addSp("M",i),this.text=`While each other friendly creature has Defender, ${this.name} gets ${y.jr9(this.iAttack,0)}, Armor ${i}, and Breakthrough.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("DF",this.code);n.area="C";const c=r.addEffect("PS",this.code);return c.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);if(i.player=k.toTarget(t.owner),p.creatByTarget(i).some(n=>!n.defender))t.removeModSafe(t.id);else{const n=b.mod("AT",this.iAttack,t.id),c=b.mod("AR",this.boof246,t.id),f=b.mod("BT",!0,t.id);t.addModSafe(n),t.addModSafe(c),t.addModSafe(f)}}}class oa extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Storm Bringer",this.iAttack=this.boof5814,this.iHealth=this.boof61018,this.tribe.push("WN","EL");const i=this.boof246;this.addSp("D",i),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 r=this.boof246,n=super.jr3(t,i),c=n.jr4("TS");c.bonus=this.rawNug(0,0,r,0,.2);const f=n.jr4("FK");return f.bonus=this.buffNug(r,0,"TW"),n}ddf8(t){return!0}jr8(t){if(t.trigger.type==="TS")p.fling(p.creatByTr(t),"T"),x.triggerDone();else if(t.trigger.type==="FK"){const r=I.toCreature(t.event).creature.opposed;r&&this.smack(r,this.boof246),x.triggerDone()}else super.jr8(t)}}class ha extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Sulgrim, Herald of Force",this.iAttack=15,this.iHealth=15,this.tribe.push("GL"),this.addSp("M",6),this.bonus=this.buffNug(6,0,"TX"),this.text="Activate: Deal damage equal to a friendly creature's Armor to an enemy creature.~Forge: Each friendly creature gets Armor 6."}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}canActivate(t){return this.enemies(t.id).length>0&&this.friends(t.id).length>0}startActivation(t){const i=this.friends(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[1]==="P1"){const n=this.enemies(i[0],r.id);n.push(T.cancelAction()),T.ddf5(n)}else if(i[1]==="P2"){const n=p.jr5(i[2]);this.logAct(!0,n),this.smack(r,n.armor),p.jr5(i[0]).endActivation()}}jr8(t){p.ddf1().forEach(i=>i.addArmor(6)),x.triggerDone()}friends(t){const i=b.crFriendActTarg("CARD",this.code,S.enTil(t,"P1"));return i.hasArmor=!0,w.toActions(i)}enemies(t,i=""){const r=b.crEnemyActTarg("CARD",this.code,S.enTil(t,"P2",i));return w.toActions(r)}}class la extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Synapsis Oracle",this.iAttack=this.boof358,this.iHealth=this.lValN([9,15,24]),this.tribe.push("HM");let i;this.level===3?(this.text="Activate: Level up a card in your hand.",i=1):(this.text=`Activate: ${y.daluac(!0)}.`,i=.5),this.bonus=this.rawNug(0,0,0,0,i,"TX")}canActivate(t){return k.toPlayer(t.owner).hand.some(r=>W.getCard(r).canLevel())}startActivation(t){const i=b.lvlHandActTarg(this.code,t.id);i.hint?.push("DF"),T.ddf5(w.toActions([i,w.buttonTarget("CANC")]))}handleAction(t){this.logAct(!0);const i=p.jr5(t.param),r=k.toPlayer(i.owner);this.level===3?Dt.levelInHand(r,t.position,W.getCard(t.card).levelUpCard()):L.levelAndDiscardA(t),this.anim8(i),i.endActivation()}}class ca extends yt{jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}jr8(t){if(t.trigger.type==="FR"){const i=t.owner?L.deathsA.length:L.deathsB.length;if(i>0){const r=E.tick();for(let n=0;n0}playTargets(){return[b.crEnemyActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=this.boof5812,n=p.ddf6(t);i[0]==="P1"?(this.logSpell(),this.smack(n,r),this.dino()?T.ddf5(w.toActions(b.crEnemyActTarg("CARD",this.code,"P2"))):T.spellCast()):(this.smack(n,r),T.spellCast())}dino(){const t=b.crFriendTarg();return t.tribe="DN",p.creatByTarget(t).length>0}}class da extends P{constructor(t){super(t),this.rarity="C",this.faction="U",this.name="Toorgmai Mender",this.tribe.push("PL"),this.iAttack=this.boof259,this.iHealth=this.iAttack+3,this.text=`Forge: Give a creature or player ${y.jr9(0,this.iHealth)}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=b.crActTarg("CARD",this.code,"");i.hint=["BF"];const r=b.actionTarget("TP","CARD",this.code,t.creatId);r.hint=["BF"];const n=[i,r,w.buttonTarget("NOTR")],c=w.toActions(n);T.ddf5(c)}handleAction(t){if(t.zone==="P")this.balm(t.playerA,this.iHealth),this.anim8(t.param);else{const i=p.ddf6(t);this.logAct(!1,i),this.buffH(i,this.iHealth)}T.actionDone(!0)}}class fa extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tremorsaur",this.iAttack=0,this.iHealth=this.lValN([8,16,24]),this.tribe.push("DN"),this.text=`When you are dealt damage, ${this.name} gets +attack equal to ${this.level===3?"2x ":""}the damage dealt.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.buffNug(this.boof3610,0,"TS"),n.batch=!0,r}ddf8(t){return!t.event.isCreatTarg&&t.event.target===t.owner}jr8(t){const i=this.level===3?2:1;p.creatByTr(t).buff(t.event.dmg*i,0,t.draw?"U":"X"),x.triggerDone()}}class ga extends vt{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Trial by Combat";const i=this.boof369;this.text=`Give a friendly creature ${y.jr9(i,0)} this turn. Then it and an enemy creature deal damage equal to their attacks to each other.`}canPlay(){return p.qEnemyCreats().length>0&&p.ddf1().length>0}playTargets(){return[b.crFriendActTarg("CARD",this.code,"P1")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=w.toActions(b.crEnemyActTarg("CARD",this.code,S.enTil("P2",r.id)));n.push(T.cancelAction()),T.ddf5(n)}else{const n=p.jr5(i[1]);this.modA(n,b.mod("AT",this.boof369));const c=E.tick();this.smack(r,n.attack,c),this.smack(n,r.attack,c),T.spellCast()}}}class Ke extends P{cons(t){({["IKA"]:()=>this.ikaC(),["RSD"]:()=>this.rsdC(),["SSD"]:()=>this.ssdC(),["SOL"]:()=>this.stagC(),["WTK"]:()=>this.tinkC()})[t]()}mPlayer=0;trigB;constructor(t){super(t),this.cons(this.cardCode())}t;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TE");return n.bonus=this.trigB,r}ddf8(t){return this.validPlayer(t)}jr8(t){this.t(t),x.triggerDone()}validPlayer(t){if(this.mPlayer===0)return!0;const i=t.event;return this.mPlayer===1?i.playerA===t.owner:i.playerA!==t.owner}ikaC(){this.faction="T",this.rarity="L",this.name="Ignir, Khan of Ashur",this.iAttack=this.lValN([4,8,14,24]),this.iHealth=this.iAttack,this.tribe.push("FB"),this.maxLevel=4;let t;this.level<3?(this.hints=["LG","ZZ-2"],t="an enemy creature or player at random."):this.level===3?t="an enemy creature at random and the enemy player.":t="each enemy creature and player.",this.mPlayer=1,this.trigB=this.buffNug(0,this.iAttack,"TX"),this.text=`At the end of your turn, deal ${this.iAttack} damage to `+t,this.t=this.ikaT}ikaT(t){const i=p.qEnemyCreats(),r=i.length>0;let n=this.level>2,c=-1;if(this.level===4&&r){const f=E.tick();i.forEach(m=>this.smack(m,this.iAttack,f))}if(this.level===3&&r&&(c=S.randInt(0,i.length)),this.level<3){const f=S.randInt(0,i.length+1);f===i.length?n=!0:c=f}c>-1&&this.smack(i[c],this.iAttack),n&&(this.ouch("E",this.iAttack),this.anim8(t.creatId))}rsdC(){this.faction="U",this.rarity="L",this.name="Rubyscale Dragon",this.iAttack=this.lValN([2,8,18]),this.iHealth=this.lValN([7,11,24]),this.tribe.push("DG"),this.level===1?(this.iDefend=!0,this.hints=["LG"]):(this.iMobile=1,this.level===3&&(this.hints=["ZZ-5"])),this.mPlayer=1;const t=this.lValN([1,2,5]);this.trigB=this.playerNug(t,"TX"),this.text=`At the end of your turn, you and each other friendly creature gets ${y.jr9(0,t)}.`,this.t=this.rsdT}rsdT(t){const i=this.lValN([1,2,5]);p.creatByTarget(b.crFriendNotMeTarg(t.creatId)).forEach(n=>this.buffH(n,i)),this.balm(t.owner,i),this.anim8(t.creatId)}ssdC(){this.faction="T",this.rarity="L",this.name="Smolderscale Dragon",this.iAttack=this.lValN([0,3,15]),this.iHealth=this.lValN([6,13,30]),this.tribe.push("DG"),this.level===3?this.iMobile=2:(this.hints=["LG"],this.iDefend=!0),this.mPlayer=1;const t=this.boof135;this.trigB=this.buffNug(t*2,0,"TX"),this.text=`At the end of your turn, deal ${t} damage to each enemy creature.`,this.t=this.ssdT}ssdT(t){const i=p.qEnemyCreats();if(i.length>0){const r=E.tick(),n=this.boof135;i.forEach(c=>this.smack(c,n,r))}}stagC(){this.faction="U",this.rarity="C",this.name="Stag of Lys",this.iAttack=this.boof5916,this.iHealth=this.iAttack,this.tribe.push("ST"),this.mPlayer=1;const t=this.boof246;this.trigB=this.playerNug(t,"TW"),this.text=`At the end of your turn, gain ${t} health.`,this.t=this.stagT}stagT(t){this.balm(t.owner,this.boof246),this.anim8(t.creatId)}tinkC(){this.faction="A",this.rarity="H",this.name="War Tinker",this.iAttack=this.level,this.iHealth=this.boof4812,this.tribe.push("GN"),this.mPlayer=-1,this.trigB=this.avgSpawnNug(),this.trigB.threat="TW",this.text=`At the end of the enemy player's turn, replace ${this.name} with a copy of a random Robot from your deck.`,this.t=this.tinkT}tinkT(t){const i=b.target("DK");i.player=k.toTarget(t.owner),i.tribe="RB";const r=w.deckByTarget(i),n=r.length;if(n>0){const c=r[S.randInt(0,n)][0],f=p.creatByTr(t);this.replc(c,f.owner,f.lane)}}}class jt extends P{cons(t){({["DCS"]:()=>this.delphC(),["GMP"]:()=>this.gmpC(),["LBL"]:()=>this.lbcC(),["MNM"]:()=>this.mnmC(),["NUG"]:()=>this.nugC(),["SBF"]:()=>this.sfangC(),["SSE"]:()=>this.sseC(),["SPD"]:()=>this.spdC(),["SPM"]:()=>this.spmC(),["TBA"]:()=>this.tbaC(),["USS"]:()=>this.ussC(),["VCG"]:()=>this.vgC(),["WBG"]:()=>this.woeC(),["ZSH"]:()=>this.zyxC()})[t]()}bothTurns=!1;trigB;constructor(t){super(t),this.cons(this.cardCode())}t;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("TS");n.bonus=this.trigB;const c=Wt.extractCardCode(this.code);return(c==="ZSH"||c==="SBF")&&(r.extraBattles=1),r}ddf8(t){return this.bothTurns||t.event.playerA===t.owner}jr8(t){this.t(t),x.triggerDone()}delphC(){this.faction="A",this.rarity="L",this.name="Delpha, Chronosculptor",this.iAttack=this.boof7914,this.iHealth=this.iAttack,this.tribe.push("HM"),this.level>1&&(this.trigB=this.buffNug(5,4,"TX"),this.text=`At the start of your turn, level a ${this.level===2?"level 1 ":""}card in your hand at random.`),this.t=this.delphT}delphT(t){if(this.level>1){const i=k.toPlayer(t.owner),r=i.hand.map((c,f)=>{const m=W.getCard(c);return{idx:f,lvl:m.level,nxt:m.canLevel()?m.levelUpCard():""}}).filter(c=>c.nxt&&(this.level===3||c.lvl===1)),n=r.length;if(n>0){const c=r[S.randInt(0,n)];Dt.levelInHand(i,c.idx,c.nxt),this.anim8(t.creatId)}}}gmpC(){this.faction="A",this.rarity="L",this.name="Ghox, Metamind Paragon",this.iAttack=this.boof4814,this.iHealth=this.boof61218,this.tribe.push("MM");const t=this.level===1?"":"s";this.trigB=this.rawNug(0,0,0,0,this.level*ft.dcWeight,"TX"),this.text=`At the start of your turn, draw ${this.level} card${t}.`,this.t=this.gmpT}gmpT(t){k.drawCard(t.owner,this.level),this.anim8(t.creatId)}lbcC(){this.faction="U",this.rarity="R",this.name="Lightbringer Cleric",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("TK"),this.trigB=this.playerNug(this.boof3610,"TW"),this.text=`At the start of your turn, you gain ${this.boof137} to ${this.boof5914-1} health.`,this.t=this.lbcT}lbcT(t){this.balm(t.owner,S.randInt(this.boof137,this.boof5914)),this.anim8(t.creatId)}mnmC(){this.faction="N",this.rarity="L",this.name="Murderous Necromancer",this.iAttack=this.boof61017,this.iHealth=this.iAttack-1,this.tribe.push("HM"),this.trigB=this.avgSpawnNug(),this.trigB.threat="TX";let t;this.level===3?(t=" If that creature is opposed, destroy the creature opposing it.",this.hints=["ZZ-5"]):(t="",this.hints=["ZZ-3"]),this.text=`At the start of your turn, Spawn a random ${y.levelGateText(this.level)}creature that was destroyed this game.${t}`,this.t=this.mnmT}mnmT(t){const i=Bt.gravedigger("X",w.ddf2(this.level));if(i){const r=this.spawn(i,t.owner);if(r&&(this.logAct(!1,r),this.level===3)){const n=r.opposed;n&&this.kill(n)}}}nugC(){this.faction="T",this.rarity="L",this.name="Nug, Fury Fists",this.iAttack=this.boof71015,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.hints=["ZZ-3"],this.trigB=this.rawNug(0,0,0,0,1.5,"TX"),this.text="At the start of your turn, each other friendly creature deals battle damage equal to its attack to the creature opposing it.",this.t=this.nugT}nugT(t){const i=p.creatByTarget(b.crFriendNotMeTarg(t.creatId));if(i.length>0){const r=E.tick();i.forEach(n=>{if(n.attack>0){const c=n.opposed;c&&c.hurtDirect(n.attack,n.code,this.faction,r)}})}}sfangC(){this.faction="T",this.rarity="H",this.name="Saberfang",this.iAttack=this.boof246,this.iHealth=1,this.iAggro=!0,this.tribe.push("CT"),this.trigB=this.buffNug(this.iAttack,0),this.text=`${this.name} battles an additional time on your turn.`,this.t=this.sfangT}sfangT(t){this.wrang(p.creatByTr(t))}sseC(){this.faction="U",this.rarity="L",this.name="Scatterspore Eidolon",this.iAttack=8,this.iHealth=this.iAttack,this.tribe.push("PL"),this.level<3&&(this.hints=["LB"]);const t=this.boof357,i=K.minionName(this.level);this.trigB=this.statSpawnNug(t,t,"TW"),this.text=`At the start of your turn, Spawn a ${t}/${t} ${i}.`,this.t=this.sseT}sseT(t){const i=this.lValS(["SXD","SXP","SXT"])+this.level.toString();this.spawn(i,t.owner)}spdC(){this.faction="U",this.rarity="R",this.name="Shardplate Delver",this.iAttack=this.boof4612,this.iHealth=this.iAttack,this.tribe.push("DN");const t=this.boof246;this.trigB=this.buffNug(t,t,"TS"),this.text=`At the start of your turn, ${this.name} gets ${y.jr9(t,t)}.`,this.t=this.spdT}spdT(t){this.buffD(p.creatByTr(t),this.boof246)}spmC(){this.faction="U",this.rarity="L",this.name="Shardplate Mutant",this.iAttack=this.boof91421,this.iHealth=this.iAttack,this.tribe.push("IN"),this.trigB=this.rawNug(0,0,0,0,this.lValN([-1.5,-2.1,-3])),this.text="At the start of your turn, randomly discard down to two cards in your hand.",this.t=this.spmT}spmT(t){const i=k.toPlayer(t.owner);if(i.hand.length>2){let r=i.hand.slice();const n=S.randInt(0,r.length);let c=-1;for(;c===-1;){const f=S.randInt(0,r.length);f!==n&&(c=f)}for(let f=r.length-1;f>-1;f--)f===n||f===c||Dt.cardDiscard(i,f);this.anim8(t.creatId)}}tbaC(){this.faction="U",this.rarity="L",this.name="Talisin, Bard of Abundance",this.iAttack=this.lValN([8,12,16]),this.iHealth=this.lValN([10,14,20]),this.tribe.push("SY"),this.bothTurns=this.lValB([!0,!0,!1]),this.level===3?this.trigB=this.multNug(this.avgSpawnNug(),.5):this.hints=["LG","ZZ-3"],this.text=`At the start of ${this.bothTurns?"each player's":"your"} turn, ${this.bothTurns?"that player":"you"} may play an additional card.`,this.t=this.tbaT}tbaT(t){L.freePlay(),this.anim8(t.creatId)}ussC(){this.faction="T",this.rarity="H",this.name="Uranti Stormshaper",this.iAttack=0,this.iHealth=this.boof91218,this.iDefend=!0,this.tribe.push("YT");const t=W.getCard("LWY"+this.level);this.trigB=this.spawnNug(t,"TX");const i=this.level===3?" into each available lane":"";this.text=`At the start of your turn, Spawn a ${y.tokName(t)}${i}.`,this.t=this.ussT}ussT(t){const i="LWY"+this.level;if(this.level===3){const r=p.emptyLanes(t.owner);if(r.length>0){const n=E.tick();r.forEach(c=>this.poot(i,t.owner,c,n))}}else this.spawn(i,t.owner)}vgC(){this.faction="T",this.rarity="C",this.name="Volcanic Giant",this.iAttack=this.boof51015,this.iHealth=this.iAttack,this.tribe.push("ER","GT"),this.trigB=this.playerNug(this.boof3610,"TW"),this.text=`At the start of your turn, deals ${this.boof137} to ${this.boof5914-1} damage to the enemy player.`,this.t=this.vgT}vgT(t){const i=S.randInt(this.boof137,this.boof5914);this.ouch(!t.owner,i),this.anim8(t.creatId)}woeC(){this.faction="N",this.rarity="L",this.name="Woebringer",this.iAttack=this.lValN([7,10,18]),this.iHealth=this.boof5815,this.tribe.push("AB"),this.trigB=this.playerNug(0,"TW"),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.`,this.t=this.woeT}woeT(t){const i=b.crTarg();this.level===3&&(i.player=k.toTarget(!t.owner));const r=p.creatByTarget(i);let n=99999,c=[];r.forEach(m=>{m.attack===n?c.push(m):m.attack0){const m=c[S.randInt(0,f)];this.kill(m)}}zyxC(){this.faction="T",this.rarity="L",this.name="Zyx, Storm Herald",this.iAttack=this.boof4712,this.iHealth=this.lValN([6,9,20]),this.iMobile=1,this.tribe.push("LT","AS"),this.text="Zyx battles an additional time on your turn.",this.trigB=this.buffNug(this.iAttack,0,"TX"),this.t=this.zyxT}zyxT(t){this.wrang(p.creatByTr(t))}}class ma extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Tuskin Sporelord",this.iAttack=this.lValN([2,6,10]),this.iHealth=this.lValN([10,14,18]),this.tribe.push("TK"),this.text=`Activate: Put a copy of friendly ${y.levelGateText(this.level)}Plant into an available lane.`,this.bonus=this.multNug(this.avgSpawnNug(),.5),this.bonus.threat="TX"}canActivate(t){return this.emptySloots(t.id).length>0&&this.buddies(t.id).length>0}startActivation(t){const i=this.buddies(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(i[1],p.ddf6(t).code);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]),n=this.poot(i[2],r.owner,t.lane);this.logAct(!0,n),r.endActivation()}}emptySloots(t,i=""){const r=b.emptyPlayerActTarg("F","CARD",this.code,S.enTil("P2",t,i));return w.toActions(r)}buddies(t){const i=b.crFriendActTarg("CARD",this.code,S.enTil("P1",t));return i.tribe="PL",i.level=w.ddf2(this.level),w.toActions(i)}}class Gi extends vt{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.free=this.level===2),this.text="Discard and level up two cards."}canPlay(){const t=w.cardByTarget(k.getActive().deck,b.lvlHandActTarg(this.code,"")).length;return this.code==="MTS"+"1"?t>1:t>0}playTargets(){return[this.targParty("P1")]}handleAction(t){if(T.shiftPlayCard(t.position),t.param==="P1"){this.logSpell(),L.levelAndDiscardA(t);const i=this.targParty("P2"),r=w.toActions(i);r.length===0?T.spellCast():T.ddf5(r)}else L.levelAndDiscardA(t),T.spellCast()}targParty(t){const i=b.lvlHandActTarg(this.code,t);return i.deckPositionSkip=T.playPosition(),i}}class ai extends vt{cons(t){({["CFG"]:()=>this.confC(),["CSG"]:()=>this.cystgC(),["GRN"]:()=>this.grenC(),["TWG"]:()=>this.twstrC()})[t]()}cardTarg(t,i){const r=this.t(b.crActTarg("CARD",this.code,""));return r.param=t,r.notMe=i,r}xl=!0;constructor(t){super(t),this.cons(this.cardCode())}t;z;canPlay(){return p.creatByTarget(this.cardTarg("P1","")).length>1}playTargets(){return[this.cardTarg("P1","")]}handleAction(t){const i=S.deTil(t.param),r=p.ddf6(t);if(i[0]==="P1"){const n=S.enTil("P2",r.id),c=w.toActions([this.cardTarg(n,r.id),w.buttonTarget("CANC")]);T.ddf5(c)}else{const n=p.jr5(i[1]);this.xl?this.logSpell(n,r):this.logSpell(),this.z(n,r),T.spellCast()}}confC(){this.faction="T",this.rarity="C",this.name="Conflagrate",this.xl=!1,this.text=`Deal ${this.boof369} to two enemy creatures.`,this.t=this.confT,this.z=this.confZ}confZ(t,i){const r=E.tick(),n=this.boof369;this.smack(t,n,r),this.smack(i,n,r)}confT(t){return t.player="E",t}cystgC(){this.faction="A",this.rarity="C",this.name="Cypien Steelgraft",this.text=`Two friendly creatures get Armor ${this.boof246}.`,this.t=this.cystgT,this.z=this.cystgZ}cystgZ(t,i){const r=this.boof246;t.addArmor(r),i.addArmor(r)}cystgT(t){return t.player="F",t.canArmor=!0,t}grenC(){this.faction="N",this.rarity="C",this.name="Ghastly Renewal",this.text=`Give two friendly creatures Regenerate ${this.boof246}.`,this.t=this.grenT,this.z=this.grenZ}grenZ(t,i){const r=this.boof246;this.regn(t,r),this.regn(i,r)}grenT(t){return t.player="F",t.canRegen=!0,t}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 ${y.jr9(t,t)}.`,this.t=this.twstrT,this.z=this.twstrZ}twstrZ(t,i){const r=this.tsboof;this.buffD(t,r),this.buffD(i,r)}twstrT(t){return t.player="F",t}}class pa extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Umbruk Icecrusher",this.iAttack=this.boof61014,this.iHealth=this.boof246,this.tribe.push("DN"),this.text=`When ${this.name} ${y.dbdtap()}, deal that much damage to that player.~Allied Uterra: This gets ${y.jr9(2,2,!0)}, and Breakthrough.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.bonus=this.playerNug(this.boof357,"TP"),r}ddf8(t){return t.event.battle&&!t.event.isCreatTarg&&t.event.isCreatSrc&&t.event.srcId===t.creatId}jr8(t){if(t.trigger.type==="FR"){if(L.allied("U")){const i=p.creatByTr(t);i.breakthrough=!0,i.buff(2,2,"U")}}else t.trigger.type==="DM"&&(this.ouch(t.event.target,t.event.dmg),this.anim8(t.creatId));x.triggerDone()}}class ya extends P{constructor(t){super(t),this.faction="U",this.rarity="H",this.name="Umbruk Lasher",this.iAttack=this.boof71014,this.iHealth=this.iAttack-1,this.iBT=!0,this.tribe.push("DN"),this.text=`Allied Tempys: When ${this.name} ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.`}jr3(t,i){const r=super.jr3(t,i);return r.jr4("FR"),r}handleAction(t){p.ddf6(t).hurtDirect(parseInt(t.param),this.code,"T"),T.actionDone(!0)}ddf8(t){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}jr8(t){if(t.trigger.type==="FR"){if(L.allied("T")){const i=p.creatByTr(t),r=i.jr4("DM");r.interactive=!0,r.bonus=this.buffNug(this.iAttack,0,"TP"),i.anim8("T"),i.changed=!0}x.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,r=w.toActions(b.crEnemyActTarg("CARD",this.code,i.dmg.toString()));r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}}}class ni extends P{cons(t){({["CBB"]:()=>this.cindC(),["EBW"]:()=>this.ebwC(),["IBR"]:()=>this.ibrfC(),["SBI"]:()=>this.sbiC()})[t]()}enemy=!1;ftext="";constructor(t){super(t),this.cons(this.cardCode()),this.text=`Forge: If you are rank ${this.level+1} or higher, `+this.ftext,this.ftext=""}f;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}handleAction(t){this.f(p.ddf6(t)),T.actionDone(!0)}jr8(t){if(p.creatByTr(t).rank>this.level){const r=b.crActTarg("CARD",this.code,t.creatId);this.enemy?r.player="E":r.hint=["BF"];const n=w.toActions(r);n.length>0?T.ddf5(n):x.triggerDone()}else x.triggerDone()}ebwC(){this.faction="N",this.rarity="C",this.name="Ebonbound Warlord",this.iAttack=this.boof3714,this.iHealth=this.iAttack+4,this.tribe.push("VP"),this.enemy=!0;const t=this.boof369n;this.ftext=`give an enemy creature ${y.jr9(t,t)}.`,this.f=this.ebwF}ebwF(t){this.logAct(!1,t),this.buffD(t,this.boof369n)}sbiC(){this.faction="U",this.rarity="C",this.name="Shardbound Invoker",this.iAttack=this.boof4714,this.iHealth=this.iAttack+1,this.tribe.push("TK");const t=this.boof359;this.ftext=`give a creature ${y.jr9(t,t)}.`,this.f=this.sbiF}sbiF(t){this.logAct(!1,t),this.buffD(t,this.boof359)}cindC(){this.faction="T",this.rarity="C",this.name="Cinderbound Barbarian",this.iAttack=this.boof3612,this.iHealth=this.iAttack,this.tribe.push("FR","AS");const t=this.boof6912;this.enemy=!0,this.ftext=`deal ${t} damage to an enemy creature.`,this.f=this.cindF}cindF(t){this.smack(t,this.boof6912)}ibrfC(){this.faction="A",this.rarity="C",this.name="Ironbound Reinforcements",this.iAttack=this.boof368,this.iHealth=this.iAttack*2,this.tribe.push("GN");const t=this.boof5812;this.ftext=`give a creature ${y.jr9(t,0)}.`,this.f=this.ibrfF}ibrfF(t){this.logAct(!1,t),this.buffA(t,this.boof5812)}}class ba extends P{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Uranti Elementalist",this.iAttack=this.boof4712,this.iHealth=this.iAttack-1,this.tribe.push("YT"),this.text=`Forge: You may move another friendly creature to an available lane adjacent to ${this.name}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=p.creatByTr(t);if(this.emptySloots(i).length>0){const r=b.crFriendNotMeActTarg("CARD",i.id,this.code,S.enTil("P1",i.id)),n=w.toActions(r);n.length>0?(n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logAct(!1,r),this.lurk(r,t.lane),T.actionDone(!0)}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",i))}}class Aa extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Uranti Heartseeker",this.iAttack=this.boof4915,this.iHealth=this.iAttack,this.iDefend=!0,this.tribe.push("YT"),this.addSp("D",this.iAttack),this.text=`Activate: Deal ${this.iAttack} damage to an enemy creature or player with exactly ${this.iAttack} health.`,this.bonus=this.buffNug(this.iAttack/2,0,"TW")}canActivate(t){return this.findVictims(t.id).length>0}startActivation(t){const i=this.findVictims(t.id);i.push(T.cancelAction()),T.ddf5(i)}handleAction(t){const i=p.jr5(t.param);if(t.zone==="F"){const r=p.ddf6(t);this.logAct(!0,r),this.smack(r,this.iAttack)}else{this.logAct(!0);const r=t;this.ouch(r.playerA,this.iAttack),this.anim8(i)}i.endActivation()}findVictims(t){const i=this.iAttack,r=b.crEnemyTarg(),c=p.creatByTarget(r).filter(m=>m.health===i).map(m=>b.fieldSelectAction("CARD",m.lane,m.owner)),f=k.toPlayer("E");return f.health===i&&c.push(b.playerSelectAction("CARD",f.isPlayerA)),c.forEach(m=>{m.host=this.code,m.param=t}),c}}class ka extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Vaerus, Herald of Fury",this.iAttack=15,this.iHealth=12,this.iMobile=2,this.tribe.push("DG"),this.text="Each friendly creature battles an additional time on each of your turns."}jr3(t,i){const r=super.jr3(t,i);r.jr4("EF");const n=r.jr4("TS");return n.bonus=this.buffNug(20,0,"TX"),r}ddf8(t){if(t.event.code==="ENT"){const i=I.toCreature(t.event);return t.owner===i.creature.owner&&t.owner===k.activeA}else if(t.event.code==="TRS")return t.event.playerA===t.owner;return!1}giveXtra(t,i){t.hasMod(i)||(this.wrang(t),t.addMod(b.mod("TK",!0,i),"X"))}jr8(t){if(t.event.code==="ENT"){const i=I.toCreature(t.event);i.creature.id===t.creatId?p.ddf1().forEach(r=>{this.giveXtra(r,t.creatId)}):yt.itBirthedFirst(i.creature.id,t.creatId)&&this.giveXtra(i.creature,t.creatId)}else t.event.code==="TRS"&&p.ddf1().forEach(i=>{this.wrang(i),i.hasMod(t.creatId)||i.addMod(b.mod("TK",!0,t.creatId),"X")});x.triggerDone()}}class O extends P{constructor(t){super(t),this.cons(this.cardCode())}cons(t){({["AEN"]:()=>this.anvenf(),["AGU"]:()=>this.avguard(),["BTH"]:()=>this.batthid(),["BBB"]:()=>this.bart(),["BLW"]:()=>this.blitwi(),["BWG"]:()=>this.brambleguard(),["CHY"]:()=>this.cavernhyd(),["CSL"]:()=>this.cslime(),["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(),["LTM"]:()=>this.ltam(),["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(),["SMN"]:()=>this.steam(),["SGI"]:()=>this.stonefist(),["SCL"]:()=>this.stormcall(),["SMA"]:()=>this.ancient(),["SML"]:()=>this.lurker(),["TGS"]:()=>this.tsprout(),["TGN"]:()=>this.tgnome(),["TNM"]:()=>this.tiggy(),["TWS"]:()=>this.tscout(),["TWT"]:()=>this.tund(),["URD"]:()=>this.unrelenting(),["VBK"]:()=>this.vblock(),["VTC"]:()=>this.vtech(),["WHC"]:()=>this.wardog(),["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=["LG"]:this.consistent=!0}shite(){this.level<3&&(this.hints=["LB"])}ancient(){this.faction="U",this.rarity="C",this.name="Swampmoss Ancient",this.iAttack=this.lValN([7,12]),this.iHealth=this.iAttack,this.tribe.push("DN"),this.hints=[this.level===1?"ZZ-1":"ZZ-2"],this.maxLevel=2}anvenf(){this.faction="A",this.rarity="C",this.name="Anvillon Enforcer",this.iAttack=this.boof5711,this.iHealth=this.iAttack-1,this.iArmor=this.boof246,this.tribe.push("RB")}avguard(){this.faction="T",this.rarity="R",this.name="Avalanche Guardian",this.iAttack=this.boof5915,this.iHealth=this.lValN([8,15,23]),this.iMobile=1,this.iDefend=!0,this.tribe.push("IC","EL")}bart(){this.faction="U",this.rarity="H",this.name="Big Bad Bartok",this.iAttack=this.level+8,this.iHealth=this.iAttack,this.consistent=!0,this.shite(),this.tribe.push("TG")}batthid(){this.faction="U",this.name="Batterhide",this.iAttack=this.boof3814,this.iHealth=this.iAttack+3,this.sist(),this.iBT=!0,this.tribe.push("DN")}battledroid(){this.faction="A",this.rarity="H",this.name="Oreian Battledroid",this.iAttack=this.lValN([5,7,17]),this.iHealth=1,this.iArmor=this.iAttack,this.tribe.push("RB")}bearride(){this.faction="U",this.rarity="C",this.name="Deepwood Bear Rider",this.iAttack=this.lValN([5,16,18]),this.iHealth=this.lValN([2,8,10]),this.tribe.push("LP"),this.level===2&&(this.hints=["LB"])}blitwi(){this.faction="N",this.name="Blight Witch",this.iAttack=this.boof259,this.iHealth=this.boof71117,this.sist(),this.iRegen=this.boof234,this.tribe.push("ZB")}brambleguard(){this.faction="U",this.rarity="C",this.name="Bramblewood Guardian",this.iAttack=this.boof2612,this.iHealth=this.lValN([9,14,24]),this.tribe.push("PL")}cavernhyd(){this.faction="U",this.rarity="C",this.name="Cavern Hydra",this.iAttack=this.boof4711,this.iHealth=this.boof71015,this.iRegen=this.boof135,this.tribe.push("HY")}cslime(){this.faction="N",this.rarity="C",this.name="Cavern Slime",this.iAttack=this.boof61218,this.iHealth=this.boof246,this.iRegen=this.iAttack,this.tribe.push("OZ"),this.hints=[this.lValH(["ZZ-2","ZZ-3","ZZ-5"])]}cindcol(){this.faction="T",this.rarity="C",this.name="Cinder Colossus",this.iAttack=this.lValN([3,13,24]),this.iHealth=this.lValN([4,14,27]),this.iDefend=!0,this.level===1&&(this.hints=["LG"]),this.tribe.push("ER","EL")}cindmy(){this.faction="T",this.rarity="C",this.name="Cinder Mystic",this.iAttack=this.lValN([4,11,21]),this.iHealth=this.boof3714,this.tribe.push("FR","AS")}citg(){this.faction="A",this.rarity="C",this.name="Citadel Guard",this.iAttack=this.lValN([8,12,25]),this.iHealth=this.lValN([9,13,30]),this.iDefend=!0,this.hints=[this.level===3?"ZZ-5":"ZZ-1"],this.tribe.push("RB")}crag(){this.faction="T",this.rarity="C",this.name="Crag Walker",this.iAttack=this.boof71218,this.iHealth=this.boof246,this.iMobile=1,this.tribe.push("DN")}dmaw(){this.faction="N",this.rarity="L",this.name="Duskmaw, Twilight Drake",this.iAttack=this.boof61017,this.iHealth=this.boof5915,this.iMobile=1,this.tribe.push("ST","DG")}duskzomb(){this.faction="N",this.rarity="C",this.name="Duskspire Zombie",this.iAttack=this.lValN([2,5,16]),this.iHealth=this.lValN([5,8,19]),this.iRegen=4,this.tribe.push("ZB")}falpha(){this.faction="A",this.rarity="C",this.name="Forge Guardian Alpha",this.iAttack=this.lValN([4,8,20]),this.iHealth=this.lValN([8,14,26]),this.iDefend=!0,this.tribe.push("RB","GD")}fangbear(){this.faction="U",this.rarity="C",this.name="Fangwood Bear",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("BR")}fbeta(){this.faction="A",this.rarity="R",this.name="Forge Guardian Beta",this.iAttack=this.lValN([5,8,20]),this.iHealth=this.lValN([3,6,18]),this.iArmor=this.boof124,this.tribe.push("RB","GD"),this.level===3&&(this.hints=["ZZ-3"])}ffang(){this.faction="U",this.rarity="C",this.name="Featherfang",this.iAttack=this.boof61218,this.iHealth=this.boof4812,this.tribe.push("DN")}firemane(){this.faction="T",this.rarity="C",this.name="Firemane Steed",this.iAttack=this.lValN([3,6,16]),this.iHealth=this.lValN([6,9,19]),this.iMobile=2,this.tribe.push("FR","EL")}flop(){this.faction="T",this.rarity="C",this.name="Flowstone Primordial",this.iAttack=this.lValN([6,7,15]),this.iHealth=this.iAttack+1,this.tribe.push("FR","EL")}fomega(){this.faction="A",this.rarity="L",this.name="Forge Guardian Omega",this.iAttack=this.boof255080,this.iHealth=this.iAttack,this.iMobile=this.boof124,this.iArmor=this.iMobile*10,this.iBT=!0,this.iAggro=!0,this.consistent=!0,this.tribe.push("RB","GD")}forgeplate(){this.faction="A",this.rarity="C",this.name="Forgeplate Sentry",this.iAttack=this.boof4915,this.iHealth=this.iAttack,this.iArmor=this.boof135,this.tribe.push("RB")}ggs(){this.faction="N",this.rarity="C",this.name="Grimgaunt Spectre",this.iAttack=this.lValN([3,11,14]),this.iHealth=this.iAttack,this.iMobile=1,this.level===1?this.hints=["LG"]:this.level===2&&(this.hints=["LB"]),this.tribe.push("GG")}geist(){this.faction="N",this.rarity="C",this.name="Grave Geist",this.iAttack=this.boof71118,this.iHealth=this.boof4711,this.tribe.push("ST")}ghast(){this.faction="N",this.rarity="C",this.name="Grave Ghast",this.iHealth=this.boof71013,this.iAttack=this.iHealth-2,this.iRegen=this.boof246,this.tribe.push("ZB")}glacial(){this.faction="T",this.rarity="C",this.name="Glacial Colossus",this.iAttack=this.boof61016,this.iHealth=this.lValN([8,13,19]),this.tribe.push("IC","EL"),this.iDefend=!0}hulk(){this.faction="N",this.rarity="C",this.name="Xithian Hulk",this.iAttack=this.boof4814,this.iHealth=this.iAttack+3,this.tribe.push("AB")}kadc(){this.faction="T",this.rarity="C",this.name="Kadras Colossus",this.iAttack=this.lValN([6,11,13]),this.iHealth=this.iAttack,this.tribe.push("GT"),this.shite(),this.level===1&&this.hints.push("ZZ+1")}ltam(){this.faction="T",this.rarity="C",this.name="Lightning Tamer",this.iAttack=this.boof6810,this.iHealth=1,this.tribe.push("LT","AS"),this.iAggro=!0}lurker(){this.faction="U",this.rarity="C",this.name="Swampmoss Lurker",this.iAttack=this.lValN([8,13,22]),this.iHealth=this.lValN([4,6,15]),this.tribe.push("DN"),this.level===3?this.hints=["ZZ-5"]:this.hints=["ZZ-1"]}lwyrm(){this.faction="T",this.rarity="C",this.name="Lightning Wyrm",this.iAttack=this.boof4711,this.iHealth=this.boof258,this.tribe.push("LT","EL"),this.iAggro=!0}lyshyd(){this.faction="U",this.rarity="C",this.name="Lysian Hydra",this.iAttack=this.boof5914,this.iHealth=this.iAttack+1,this.iRegen=this.level,this.tribe.push("HY")}marrow(){this.faction="N",this.rarity="C",this.name="Marrow Fiend",this.iAttack=this.boof81117,this.iHealth=this.lValN([1,5,13]),this.tribe.push("SK")}minot(){this.faction="A",this.name="Forgeplate Minotaur",this.iAttack=this.lValN([2,8,16]),this.iHealth=this.lValN([4,9,17]),this.sist(),this.iArmor=this.level,this.tribe.push("RB")}mmin(){this.faction="A",this.rarity="C",this.name="Metamind Infiltrator",this.iAttack=this.boof5917,this.iHealth=this.iAttack-1,this.tribe.push("MM")}mmop(){this.faction="A",this.rarity="C",this.name="Metamind Operator",this.iAttack=this.boof4610,this.iHealth=this.lValN([10,14,18]),this.tribe.push("MM")}narg(){this.faction="T",this.rarity="C",this.name="Nargath Warrior",this.iAttack=this.boof51014,this.iHealth=this.iAttack+1,this.tribe.push("ER","AS")}necrotic(){this.faction="N",this.rarity="C",this.name="Necrotic Wurm",this.iAttack=this.lValN([4,7,18]),this.iHealth=this.lValN([5,8,19]),this.tribe.push("WR")}nexcore(){this.faction="A",this.rarity="C",this.name="Nexus Core",this.iAttack=0,this.iHealth=this.lValN([15,25,40]),this.tribe.push("RB"),this.iDefend=!0}nyam(){this.faction="N",this.rarity="C",this.name="Nyrali Ambusher",this.iAttack=this.boof71117,this.iHealth=this.lValN([3,6,13]),this.tribe.push("OZ")}ogsl(){this.faction="U",this.rarity="C",this.name="Overgrown Spineleaf",this.iAttack=this.lValN([6,12,16]),this.iHealth=this.boof4812,this.tribe.push("PL")}oss(){this.faction="N",this.rarity="R",this.name="Ossuary Spirit",this.iAttack=this.lValN([1,3,6]),this.iHealth=this.boof91420,this.iRegen=this.iAttack+2,this.tribe.push("ST")}perd(){this.faction="N",this.rarity="C",this.name="Perdition Guard",this.iAttack=this.lValN([3,12,15]),this.iHealth=this.iAttack-1,this.tribe.push("NG"),this.level===1?this.hints=["LG","ZZ-1"]:this.level===2&&(this.hints=["LB"])}prowler(){this.faction="U",this.rarity="C",this.name="Deepbranch Prowler",this.iAttack=this.lValN([8,9,10]),this.iHealth=this.iAttack,this.tribe.push("CT"),this.shite(),this.iBT=!0}raptor(){this.faction="U",this.rarity="C",this.name="Deepmoss Raptor",this.iAttack=this.lValN([2,13,16]),this.iHealth=this.iAttack,this.level===1?this.hints=["LG","RT"]:this.level===2&&(this.hints=["LB"]),this.tribe.push("DN")}ravager(){this.faction="U",this.rarity="C",this.name="Fangwood Ravager",this.iAttack=this.boof5917,this.iHealth=this.iAttack,this.tribe.push("BE")}ravh(){this.faction="U",this.rarity="C",this.name="Ravenous Hydra",this.iAttack=this.boof5813,this.iHealth=this.iAttack+this.level,this.iRegen=this.level,this.iBT=!0,this.tribe.push("HY")}rime(){this.faction="T",this.rarity="C",this.name="Rimehorn Charger",this.iAttack=this.lValN([5,8,10]),this.iHealth=this.iAttack+3,this.iMobile=1,this.shite(),this.tribe.push("RM")}runprim(){this.faction="T",this.name="Runestorm Primordial",this.iAttack=this.boof3714,this.iHealth=this.iAttack-1,this.sist(),this.iAggro=!0,this.tribe.push("LT","EL")}scorp(){this.faction="N",this.rarity="C",this.name="Scavenger Scorpion",this.iAttack=this.lValN([6,9,11]),this.iHealth=this.iAttack,this.iRegen=this.level,this.shite(),this.tribe.push("AB")}scout(){this.faction="A",this.rarity="H",this.name="Scout Drone",this.iAttack=this.boof246,this.iHealth=this.iAttack,this.free=this.level>1,this.level<3&&(this.hints=[this.level===1?"LG":"LB"]),this.tribe.push("RB")}scrap(){this.faction="A",this.rarity="H",this.name="Scrapforge Titan",this.iAttack=this.lValN([1,5,20]),this.iHealth=this.iAttack,this.iArmor=this.lValN([1,5,10]),this.level===1&&(this.hints=["LG","LM","RT"]),this.tribe.push("RB")}sfsent(){this.faction="A",this.rarity="C",this.name="Spiritforge Sentinel",this.iAttack=this.lValN([3,6,9]),this.iHealth=this.iAttack*2,this.iArmor=this.lValN([1,2,6]),this.tribe.push("RB")}sparkbot(){this.faction="A",this.rarity="C",this.name="Spark Bot",this.iAttack=this.boof5914,this.iHealth=this.lValN([6,11,16]),this.tribe.push("RB")}sparkblade(){this.faction="A",this.rarity="C",this.name="Sparkblade Assassin",this.iAttack=this.lValN([4,12,14]),this.iHealth=this.lValN([5,13,15]),this.tribe.push("HM")}sparkass(){this.faction="T",this.rarity="C",this.name="Sparkbrand Asir",this.iAttack=this.lValN([2,7,9]),this.iHealth=this.lValN([6,11,13]),this.iAggro=!0,this.tribe.push("LT","AS")}sparkman(){this.faction="T",this.rarity="R",this.name="Sparktail Manticore",this.iAttack=this.boof369,this.iHealth=this.boof71116,this.iAggro=!0,this.iMobile=1,this.tribe.push("MT")}steam(){this.faction="T",this.rarity="C",this.name="Steam Sentinel",this.iAttack=this.boof81420,this.iHealth=this.boof61016,this.iDefend=!0,this.tribe.push("WT","EL")}stonefist(){this.faction="T",this.rarity="C",this.name="Stonefist Giant",this.iAttack=this.lValN([3,7,16]),this.iHealth=this.lValN([6,10,24]),this.tribe.push("ER","EL")}stormcall(){this.faction="T",this.rarity="C",this.name="Storm Caller",this.iAttack=this.lValN([8,11,14]),this.iHealth=this.iAttack-2,this.tribe.push("WN","AS")}tgnome(){this.faction="A",this.rarity="C",this.name="Technognome",this.iAttack=this.lValN([3,9,19]),this.iHealth=this.iAttack,this.level===1&&(this.hints=["LG"]),this.tribe.push("GN")}tiggy(){this.faction="U",this.rarity="C",this.name="Tigrin Nomad",this.iAttack=this.lValN([8,10,12]),this.iHealth=this.boof246,this.iBT=!0,this.shite(),this.tribe.push("TG")}tscout(){this.faction="A",this.rarity="C",this.name="Tower Scout",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.iMobile=1,this.tribe.push("HM")}tund(){this.faction="A",this.rarity="C",this.name="Tundra Watcher",this.iAttack=this.lValN([5,10,12]),this.iHealth=this.lValN([8,11,13]),this.shite(),this.tribe.push("RB")}tsprout(){this.faction="U",this.rarity="C",this.name="Tanglesprout",this.iAttack=this.boof7911,this.iHealth=this.iAttack+1,this.shite(),this.tribe.push("PL")}unrelenting(){this.faction="N",this.rarity="H",this.name="Unrelenting Dead",this.iAttack=this.boof4814,this.iHealth=this.iAttack,this.iRegen=this.iAttack,this.tribe.push("ZB")}vblock(){this.faction="A",this.rarity="R",this.name="Vault Blockade",this.iAttack=0,this.iHealth=this.boof135,this.iArmor=this.boof101520,this.iDefend=!0,this.tribe.push("RB")}vtech(){this.faction="A",this.rarity="C",this.name="Vault Technician",this.iAttack=this.boof61218,this.iHealth=this.boof3915,this.tribe.push("HM")}warcharger(){this.faction="A",this.rarity="C",this.name="Ionic Warcharger",this.iAttack=this.boof4915,this.iHealth=this.boof71218,this.iMobile=1,this.tribe.push("RB")}wardog(){this.faction="T",this.rarity="T",this.name="Warhound Courser",this.iAttack=this.level,this.iHealth=this.level,this.iAggro=!0,this.tribe.push("FR","EL"),this.free=!0}waterwalk(){this.faction="T",this.rarity="C",this.name="Water Walker",this.iAttack=this.lValN([5,12,14]),this.iHealth=this.lValN([2,9,11]),this.tribe.push("WT","AS")}windprime(){this.faction="T",this.rarity="C",this.name="Wind Primordial",this.iHealth=this.boof4814,this.iAttack=this.iHealth+2,this.iMobile=this.level,this.tribe.push("WN","EL")}xithcrush(){this.faction="N",this.rarity="C",this.name="Xithian Crusher",this.iAttack=this.lValN([4,10,16]),this.iHealth=this.iAttack+2,this.tribe.push("AB")}yetiwar(){this.faction="T",this.rarity="C",this.name="Yeti Warcaller",this.iAttack=this.boof248,this.iHealth=this.lValN([10,15,23]),this.tribe.push("YT")}zombinf(){this.faction="N",this.rarity="C",this.name="Zombie Infantry",this.iAttack=this.boof61015,this.iHealth=this.iAttack-1,this.tribe.push("ZB")}}class Ta extends vt{constructor(t){super(t),this.faction="N",this.rarity="L",this.name="Varna's Pact";const i=this.lValS(["a","two","three"]),r=this.level===1?"":"s",n=this.level===1?"was":"were";this.text=`Put ${i} random creature${r} that ${n} destroyed this game into ${i} lane${r}.`}playTargets(){return[this.fieldTarget("P1",[])]}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1")if(this.level===1)this.endSpell([t.lane],t.playerA);else{const r=this.fieldTarget("P2",[t.lane]);T.ddf5(w.toActions(r))}else if(i[0]==="P2"){const r=[t.lane,parseInt(i[1])];if(this.level===2)this.endSpell(r,t.playerA);else{const n=this.fieldTarget("P3",r);T.ddf5(w.toActions(n))}}else this.endSpell([t.lane,parseInt(i[1]),parseInt(i[2])],t.playerA)}endSpell(t,i){this.logSpell();const r=E.tick();t.forEach(n=>{const c=Bt.gravedigger();c&&this.replc(c,i,n,r)}),T.spellCast()}fieldTarget(t,i){const r=b.actionTarget("TF","CARD",this.code,S.enTil(t,...i));return r.player="F",r.hint=["FL"],r.lanes=p.laneIdx.filter(n=>!i.includes(n)),r}}class va extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Vigorwisp",this.iAttack=this.boof5915,this.iHealth=this.iAttack,this.tribe.push("ST"),this.text=`When ${this.name} gains health, heal that much damage from each other friendly creature.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("HG");return n.bonus=this.buffNug(0,this.boof369,"TW"),n.batch=!0,r}ddf8(t){return t.event.creatId===t.creatId}jr8(t){const i=b.crNotMeTarg(t.creatId);i.player=k.toTarget(t.owner),p.creatByTarget(i).forEach(r=>r.heal(t.event.healAmt,t.draw)),x.triggerDone()}}class Sa extends P{constructor(t){super(t),this.faction="A",this.rarity="L",this.name="Voltaic Prophet",this.iAttack=this.boof61016,this.iHealth=this.iAttack,this.tribe.push("HM");const i="evel up each card in your hand",r=this.lValS(["You may discard and level up a card","Discard and l"+i,"L"+i]);this.text="Formation: "+r+"."}get formation(){return!0}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FM");return n.interactive=this.level===1,r}handleAction(t){L.levelAndDiscardA(t),this.anim8(t.param),T.actionDone(!0)}jr8(t){if(t.owner!==k.activeA){x.triggerDone();return}if(this.level===1){const i=b.lvlHandActTarg(this.code,t.creatId),r=w.toActions([i,w.buttonTarget("NOTR")]);r.length>1?T.ddf5(r):x.triggerDone()}else{const i=k.getActive();this.logAct(!1);const r=i.hand.slice();if(this.level===2)for(let n=r.length-1;n>-1;n--)W.getCard(r[n]).canLevel()?L.levelAndDiscard(r[n],n,!1):Dt.cardDiscard(i,n);else r.forEach((n,c)=>{const f=W.getCard(n).levelUpCard();f!==n&&Dt.levelInHand(i,c,f)});this.anim8(t.creatId),x.triggerDone()}}}class Ca extends P{constructor(t){super(t),this.faction="T",this.rarity="R",this.name="Warhound Raider",this.iAttack=this.boof5915,this.iHealth=this.iAttack+1,this.tribe.push("FR","AS"),this.text=`If there is a friendly Warhound Courser in play, ${this.name} has Aggressive.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){const i=b.crNotMeTarg(t.id);i.player=k.toTarget(t.owner),i.cardCode="WHC",p.creatByTarget(i).length===0?t.removeModSafe(t.id):t.addModSafe(b.mod("AG",!0,t.id))}}class wa extends ze{jr3(t,i){const r=super.jr3(t,i),n=r.jr4("LG"),c=this.boof124*5;return n.bonus=this.buffNug(c,c,"TS"),n.batch=!0,r}ddf8(t){return t.owner===t.event.playerA}jr8(t){const i=this.boof124*t.event.healAmt;p.creatByTr(t).buff(i,i,t.draw?"U":"X"),x.triggerDone()}}class Da extends P{constructor(t){super(t),this.faction="U",this.rarity="R",this.name="Wildwood Sower",this.iAttack=this.boof3612,this.iHealth=this.lValN([6,11,18]),this.tribe.push("HM");const i=W.getCard(K.minionCode(this.level));this.text=`When you play a spell, you may put a ${y.tokName(i)} into an available lane.`,this.spB=this.spawnNug(i,"TW")}spB;jr3(t,i){const r=super.jr3(t,i),n=r.jr4("PC");return n.interactive=!0,n.bonus=this.spB,r}handleAction(t){this.poot(K.minionCode(this.level),t.playerA,t.lane),T.actionDone(!0)}ddf8(t){return t.event.playerA===t.owner&&W.getCard(t.event.cardCode).type==="S"}jr8(t){const i=b.emptyPlayerActTarg("F","CARD",this.code,""),r=w.toActions(i);r.length===0?x.triggerDone():(r.push(T.noneEndTrigger()),T.ddf5(r))}}class xa extends P{constructor(t){super(t),this.faction="T",this.rarity="C",this.name="Windcaller Shaman",this.iAttack=this.boof3713,this.iHealth=this.iAttack+4,this.tribe.push("WN","AS"),this.text=`Forge: You may move another friendly ${y.levelGateText(this.level)}creature to an available lane adjacent to ${this.name}.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("FR");return n.interactive=!0,r}jr8(t){const i=p.creatByTr(t);if(this.emptySloots(i).length>0){const r=b.crFriendNotMeActTarg("CARD",i.id,this.code,S.enTil("P1",i.id));r.level=w.ddf2(this.level);const n=w.toActions(r);n.length>0?(n.push(T.noneEndTrigger()),T.ddf5(n)):x.triggerDone()}else x.triggerDone()}handleAction(t){const i=S.deTil(t.param);if(i[0]==="P1"){const r=this.emptySloots(p.jr5(i[1]),p.ddf6(t).id);r.push(T.cancelAction()),T.ddf5(r)}else{const r=p.jr5(i[1]);this.logAct(!1,r),this.lurk(r,t.lane),T.actionDone(!0)}}emptySloots(t,i=""){return T.emptyAdjacents(t,S.enTil("P2",i))}}class Ba extends P{constructor(t){super(t),this.faction="T",this.rarity="L",this.name="Windspark Elemental",this.iAttack=this.boof258,this.iHealth=this.lValN([7,14,21]),this.tribe.push("LT","EL"),this.text=`When an enemy creature is delt non-battle damage, deal ${this.boof246} damage to the enemy player.`}jr3(t,i){const r=super.jr3(t,i),n=r.jr4("DM");return n.bonus=this.playerNug(this.boof246,"TX"),n.batch=!0,r}ddf8(t){const i=I.toDamage(t.event);return!i.battle&&i.isCreatTarg&&i.hurtCreat.owner!==t.owner}jr8(t){this.ouch(!t.owner,this.boof246,t.draw),t.draw&&this.anim8(t.creatId),x.triggerDone()}}class Ha extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Xithian Rotfiend",this.iAttack=this.boof71220,this.iHealth=this.iAttack+1,this.tribe.push("AB");const i=-this.boof135;this.text=`When ${this.name} becomes opposed, it gets ${y.jr9(i,i)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("EF");const n=r.jr4("MV"),c=-this.boof135;return n.bonus=this.buffNug(c,c),r}ddf8(t){const i=I.toCreature(t.event);return t.trigger.creatId===i.creature.id&&t.trigger.type==="MV"||i.creature.owner!==t.owner}jr8(t){let i=!1;const r=p.creatByTr(t),n=I.toCreature(t.event);(r.id===n.creature.id&&r.opposed||n.creature.lane===p.oppositeLane(r.lane))&&(i=!0),i&&this.buffD(r,-this.boof135),x.triggerDone()}}class Na extends P{constructor(t){super(t),this.faction="T",this.rarity="H",this.name="Zarox, the Raging",this.iAttack=this.boof2410,this.iHealth=this.boof81218,this.tribe.push("FR","EL"),this.text=`When Zaxox ${y.dbdtap()} on your turn, you may deal that much damage to an enemy creature.~Allied Nekrium: When a creature is destroyed, Zarox gets ${y.jr9(this.boof124,0)}.`}jr3(t,i){const r=super.jr3(t,i);r.jr4("FR");const n=r.jr4("DM");return n.interactive=!0,n.bonus=this.buffNug(this.lValN([3,6,14]),0,"TP"),r}handleAction(t){this.smack(p.ddf6(t),parseInt(t.param)),T.actionDone(!0)}ddf8(t){if(t.trigger.type==="DM"){const i=I.toDamage(t.event);return i.battle&&!i.isCreatTarg&&i.isCreatSrc&&i.srcId===t.creatId&&i.srcCreat.owner===k.activeA}else return!0}jr8(t){if(t.trigger.type==="FR"){if(L.allied("N")){const i=p.creatByTr(t),r=i.jr4("DS");r.bonus=this.buffNug(this.boof124,0,"TS"),r.batch=!0,i.changed=!0,i.anim8("N")}x.triggerDone()}else if(t.trigger.type==="DM"){const i=t.event,r=w.toActions(b.crEnemyActTarg("CARD",this.code,i.dmg.toString()));r.length>0?(r.push(T.noneEndTrigger()),T.ddf5(r)):x.triggerDone()}else t.trigger.type==="DS"&&(this.logAct(!1),p.creatByTr(t).buff(this.boof124,0,t.draw?"N":"X"),x.triggerDone())}}class Fa extends P{constructor(t){super(t),this.faction="N",this.rarity="C",this.name="Zombie Titan",this.iAttack=this.boof4712,this.iHealth=this.iAttack,this.tribe.push("ZB");const i=this.boof234;this.text=`While ${this.name} is in a side lane, it gets ${y.jr9(i,i,!0)} and Regenerate ${this.level}.`}jr3(t,i){const r=super.jr3(t,i),n=r.addEffect("PS",this.code);return n.area="C",r}enforceEffect(t){if(t.lane===1||t.lane===5){const i=this.boof234;[b.mod("AT",i,t.id),b.mod("HL",i,t.id),b.mod("MH",i,t.id),b.mod("RG",this.level,t.id)].forEach(n=>{t.addModSafe(n)})}else t.removeModSafe(t.id)}}class Pa{cardCache=new Map;mapper={["AAK"]:Ar,["ABB"]:kr,["ABM"]:mt,["AGC"]:mt,["AGK"]:Y,["AGP"]:ct,["AGW"]:$,["ASG"]:$,["AMS"]:Y,["AFO"]:Fe,["ATG"]:_t,["ATP"]:Le,["ART"]:_t,["ATS"]:_t,["AGM"]:De,["ALG"]:Ze,["AHL"]:Tr,["ALS"]:Ze,["ASB"]:de,["AAA"]:vr,["ABE"]:ct,["ATZ"]:$,["AEC"]:qt,["AVB"]:$,["ARB"]:_t,["AEN"]:O,["APM"]:Sr,["AQE"]:$,["AGD"]:Cr,["AFS"]:fe,["AWU"]:Ye,["ASQ"]:Tt,["AOP"]:$,["AMD"]:wr,["ABR"]:ne,["AFR"]:Y,["AMY"]:ne,["ABL"]:ve,["ATT"]:yt,["AMP"]:Ie,["AGU"]:O,["AIV"]:te,["ATI"]:Y,["BRS"]:Ei,["BTB"]:Fi,["BTH"]:O,["BTI"]:mt,["BTN"]:Ze,["BBB"]:O,["BLH"]:_t,["BFT"]:$,["BZH"]:$,["BSP"]:te,["BWK"]:De,["BLW"]:O,["BTD"]:xe,["BZS"]:Y,["BBR"]:$,["BBD"]:$,["BBL"]:$,["BBN"]:$,["BSR"]:mt,["BMY"]:Dr,["BSW"]:Tt,["BWW"]:we,["BTM"]:$,["BLP"]:$,["BOS"]:K,["BAW"]:mt,["BWG"]:O,["BTR"]:Y,["BWD"]:Ge,["BOF"]:Gt,["BSG"]:Br,["BSS"]:Y,["BTS"]:Ge,["BST"]:Me,["BWT"]:xr,["BRF"]:De,["BRH"]:yt,["BWH"]:Hr,["BWN"]:yt,["BRN"]:Pe,["BZD"]:Y,["BFM"]:Y,["BSM"]:Nr,["CKB"]:mt,["CDT"]:De,["CMF"]:bi,["CTL"]:ct,["CCS"]:Tt,["CDM"]:yt,["CHY"]:O,["CSR"]:Ei,["CSL"]:O,["CGG"]:Ht,["CHV"]:Fr,["CCC"]:ct,["CRS"]:Fe,["COD"]:ct,["CHT"]:$,["CTI"]:Y,["CHA"]:mt,["CHH"]:Y,["CHR"]:de,["CBB"]:ni,["CDC"]:O,["CFB"]:ne,["CNM"]:O,["CSW"]:Y,["CTG"]:O,["CCT"]:ei,["CFG"]:ai,["CGF"]:Ht,["CGL"]:Tt,["CSU"]:$,["CCR"]:mt,["CSB"]:Ht,["CNT"]:$,["CWK"]:O,["CRC"]:te,["CMR"]:Pr,["CYP"]:Mr,["CYC"]:_t,["COZ"]:K,["CYS"]:Ht,["CYW"]:qt,["CTW"]:$,["CTV"]:$,["CYR"]:yt,["CAG"]:$,["CBS"]:$,["CEX"]:ct,["CIN"]:ze,["CSH"]:Tt,["CSG"]:ai,["CTM"]:Er,["DFM"]:K,["DFR"]:Y,["DHC"]:Rr,["DHW"]:_t,["DRS"]:mt,["DSS"]:si,["DSW"]:Y,["DSE"]:mt,["DSA"]:mt,["DCR"]:ct,["DSK"]:Ht,["DPO"]:$,["DBA"]:Y,["DBP"]:O,["DMR"]:O,["DBR"]:O,["DFS"]:ct,["DCS"]:jt,["DPG"]:Gr,["DWW"]:Ir,["DDF"]:$,["DGZ"]:ct,["DNK"]:Wr,["DBN"]:Y,["DOV"]:Ie,["DDS"]:$r,["DIS"]:qt,["DSV"]:Ur,["DDD"]:Y,["DPB"]:Or,["DZA"]:K,["DZD"]:de,["DRE"]:qt,["DKS"]:xe,["DGS"]:mt,["DGW"]:Vr,["DRD"]:zr,["DBT"]:$,["DTR"]:de,["DFB"]:Gt,["DMW"]:fe,["DCH"]:qt,["DTD"]:O,["DHM"]:yt,["DSZ"]:O,["DYB"]:ve,["DBQ"]:Zr,["DYF"]:$,["DYS"]:Yr,["DYL"]:Kr,["EBW"]:ni,["ESD"]:Xr,["ESK"]:te,["EHW"]:qr,["ETN"]:$,["EWE"]:Ye,["EVT"]:qt,["ENP"]:$,["ESU"]:qt,["ENR"]:$,["EPD"]:ct,["EPH"]:jr,["EPS"]:ne,["ESG"]:Qr,["ESC"]:Ge,["ESP"]:Jr,["EWT"]:Y,["EHN"]:Ge,["EWF"]:K,["EWV"]:ct,["EFA"]:$,["EFM"]:ne,["EFP"]:_r,["EFE"]:ts,["EXD"]:$,["FWB"]:O,["FWR"]:O,["FFG"]:O,["FST"]:Ht,["FWK"]:Ht,["FIN"]:$,["FRR"]:ct,["FVA"]:ve,["FSL"]:De,["FWG"]:K,["FWC"]:te,["FFU"]:Tt,["FLH"]:bi,["FMS"]:O,["FSM"]:ct,["FOR"]:$,["FBC"]:ne,["FBI"]:_t,["FFS"]:Tt,["FLN"]:$,["FJT"]:$,["FRI"]:mt,["FSS"]:si,["FLS"]:_t,["FSH"]:Tt,["FFD"]:Ht,["FRV"]:mt,["FSC"]:Ht,["FSP"]:yt,["FPR"]:O,["FFL"]:$,["FGA"]:O,["FGB"]:O,["FGD"]:yt,["FGG"]:fe,["FGO"]:O,["FOL"]:Fe,["FPM"]:O,["FPS"]:O,["FWS"]:de,["FLC"]:mt,["FFM"]:Ye,["FRH"]:K,["FMD"]:es,["FME"]:te,["FSK"]:is,["FKS"]:rs,["FWT"]:Y,["FZS"]:$,["FUN"]:K,["GOS"]:ss,["GHS"]:fe,["GHB"]:ei,["GHR"]:as,["GRN"]:ai,["GTH"]:$,["GSC"]:De,["GMP"]:jt,["GTT"]:ns,["GCL"]:O,["GCR"]:$,["GLF"]:mt,["GRW"]:mt,["GSW"]:Y,["GVS"]:Ht,["GSS"]:Y,["GPV"]:os,["GBG"]:Ht,["GGE"]:O,["GGH"]:O,["GRP"]:hs,["GGB"]:Gt,["GGD"]:Gt,["GGR"]:Gt,["GGP"]:Gt,["GGS"]:O,["GGW"]:Gt,["GRM"]:ct,["GHT"]:mt,["GMR"]:Ht,["GSF"]:ls,["GAS"]:cs,["HMF"]:yt,["HOS"]:yt,["HTR"]:we,["HAR"]:$,["HFA"]:ti,["HOD"]:yt,["HMO"]:xe,["HRM"]:us,["HWM"]:ze,["HVE"]:xe,["HOX"]:qt,["HGS"]:ds,["HTP"]:fs,["IBF"]:ct,["IGR"]:qt,["ITO"]:qt,["ISB"]:ei,["IKA"]:Ke,["IME"]:qt,["IDF"]:yt,["IRT"]:Li,["IVS"]:ct,["ICD"]:gs,["IWC"]:O,["IBA"]:_t,["IHA"]:De,["IBR"]:ni,["IMD"]:de,["IMA"]:Y,["IZL"]:ms,["IZR"]:ps,["IZK"]:_t,["IFL"]:Pe,["IFR"]:$,["JPK"]:$,["KDC"]:O,["KSB"]:Y,["KAW"]:_t,["KOD"]:Tt,["KBE"]:ys,["KIW"]:bs,["KTS"]:ri,["KKK"]:we,["LOD"]:ct,["LFA"]:As,["LVG"]:we,["LKP"]:ks,["LGT"]:Y,["LLD"]:Ve,["LLG"]:Ve,["LLS"]:Ve,["LLT"]:Ve,["LLV"]:Ve,["LMD"]:Ie,["LBD"]:Y,["LSS"]:si,["LBL"]:jt,["LBC"]:Ts,["LBR"]:$,["LSK"]:Pe,["LTT"]:we,["LTM"]:O,["LWY"]:O,["LSP"]:ze,["LVH"]:vs,["LTU"]:xe,["LCE"]:qt,["LUC"]:Ye,["LMV"]:Y,["LHY"]:O,["LYR"]:Pe,["LYS"]:$,["MMH"]:mt,["MMY"]:$,["MHR"]:Ss,["MRF"]:O,["MMG"]:fe,["MOE"]:Y,["MXW"]:mt,["MSP"]:qt,["MDR"]:Ie,["MMA"]:Y,["MMR"]:Y,["MMX"]:Ht,["MMI"]:O,["MMO"]:O,["MMV"]:te,["MPH"]:$,["MSC"]:$,["MTS"]:Gi,["MTT"]:Cs,["MML"]:ws,["MMW"]:Ds,["MBR"]:Y,["MDE"]:Ri,["MBP"]:Tt,["MTD"]:Y,["MND"]:Tt,["MNM"]:jt,["NNS"]:$,["NGB"]:mt,["NGW"]:O,["NSL"]:$,["NCF"]:$,["NCM"]:de,["POZ"]:K,["NCP"]:Ie,["NCS"]:Tt,["NCW"]:O,["NCV"]:$,["NSW"]:xs,["NDY"]:$,["NDR"]:Bs,["NEM"]:qt,["NSH"]:ct,["NXA"]:Hs,["NXB"]:Li,["NXC"]:O,["NXG"]:Ns,["NXO"]:Fe,["NXP"]:Mi,["NXT"]:Ze,["NGT"]:Gt,["NGQ"]:Fs,["NSD"]:K,["NCL"]:ct,["NFF"]:Tt,["NUG"]:jt,["NAM"]:O,["NOZ"]:Ht,["NSY"]:Y,["ONN"]:Ps,["OXA"]:Ms,["OXM"]:Y,["OXP"]:Es,["OOZ"]:K,["OBB"]:Rs,["OEX"]:$,["OWH"]:Ls,["ORC"]:Ie,["OBD"]:O,["OFM"]:Y,["OJC"]:yt,["OPK"]:Y,["OSV"]:Me,["OSS"]:$,["OWW"]:fe,["OHV"]:Tt,["ODC"]:Gs,["OSP"]:O,["OAP"]:Is,["OSL"]:O,["OWF"]:ct,["OXS"]:Ws,["PHM"]:Y,["PPM"]:Tt,["PSM"]:Y,["PLW"]:ct,["POA"]:mt,["POD"]:Ge,["POK"]:Y,["POT"]:Y,["PRG"]:O,["PRI"]:Gi,["PHS"]:mt,["PHC"]:ct,["PTB"]:ct,["PLI"]:Le,["PSC"]:Tt,["PSH"]:te,["PTR"]:$,["PSG"]:$,["PVA"]:$s,["PMI"]:Y,["PMS"]:$,["POX"]:Ht,["PMP"]:$,["PYG"]:ei,["PYM"]:ii,["PYS"]:ct,["QSW"]:xe,["RBH"]:Us,["ROK"]:ct,["REW"]:Y,["RPT"]:K,["RHY"]:O,["RTS"]:ne,["RTW"]:xe,["RHU"]:Me,["RSC"]:ri,["RMB"]:Os,["RPR"]:$,["RLW"]:yt,["RFL"]:Vs,["RHC"]:O,["ROG"]:ve,["ROU"]:ct,["ROE"]:ct,["RWC"]:Ge,["RFA"]:ti,["RWD"]:mt,["RSD"]:Ke,["RSE"]:zs,["RBG"]:ii,["RGG"]:te,["RSZ"]:Ht,["RSP"]:O,["RHW"]:yt,["SBF"]:jt,["SAP"]:$,["SPL"]:K,["SVO"]:$,["SSE"]:jt,["SXP"]:K,["SXD"]:K,["SST"]:fe,["SXT"]:K,["STS"]:ct,["SCS"]:O,["SMD"]:Y,["SFS"]:Zs,["SHY"]:mt,["SKN"]:Ys,["SCD"]:O,["SFT"]:O,["SOC"]:$,["SOA"]:$,["SOD"]:$,["SOK"]:Pe,["SOT"]:$,["SDL"]:K,["SAD"]:Ks,["SCZ"]:yt,["SFE"]:we,["SWS"]:Xs,["SHA"]:yt,["SHG"]:$,["SBI"]:ni,["SCC"]:ri,["SPB"]:qs,["SPD"]:jt,["SPG"]:ve,["SPM"]:jt,["SPT"]:js,["STD"]:mt,["STB"]:Pe,["SHS"]:De,["SSP"]:yt,["SGF"]:Tt,["SKG"]:Mi,["SLS"]:Qs,["SSD"]:Ke,["SDA"]:Js,["SSR"]:te,["SNB"]:$,["SNP"]:ct,["SRD"]:ct,["SSH"]:Le,["SRM"]:Tt,["SRH"]:Gt,["SDN"]:Y,["SHV"]:$,["SRP"]:$,["SGG"]:Y,["SBA"]:O,["SKB"]:O,["SBR"]:O,["SKS"]:Me,["SEL"]:_s,["STM"]:O,["SWA"]:_t,["SFG"]:Tt,["S01"]:de,["SPR"]:Gt,["SLG"]:Y,["SBD"]:Y,["SCV"]:ta,["SFM"]:Ht,["SSN"]:O,["SSM"]:te,["SLH"]:ea,["SPN"]:K,["SSI"]:ze,["SND"]:ri,["SNT"]:Ht,["SRV"]:ii,["STR"]:$,["SPU"]:K,["XYR"]:K,["SPH"]:ia,["SSA"]:Tt,["STO"]:$,["SDR"]:yt,["SOL"]:Ke,["SOV"]:$,["SMS"]:xe,["SHK"]:Pe,["SIX"]:mt,["SWR"]:ra,["SMN"]:O,["SER"]:sa,["SES"]:aa,["SFA"]:ti,["STG"]:na,["SSS"]:si,["SSK"]:Y,["SNK"]:Fe,["SWG"]:Me,["SWM"]:Tt,["SIV"]:ct,["STN"]:$,["SGI"]:O,["SBG"]:oa,["SCL"]:O,["SGA"]:ti,["STP"]:$,["SSG"]:te,["SVH"]:ne,["SIN"]:$,["SYL"]:Y,["SEV"]:mt,["SMA"]:O,["SML"]:O,["SYO"]:la,["TST"]:ct,["TBA"]:jt,["TGL"]:$,["TGS"]:O,["TPT"]:$,["TDW"]:yt,["TNL"]:ca,["TEX"]:Fe,["TGN"]:O,["TSM"]:Fe,["TUP"]:$,["TOT"]:$,["TAB"]:Ri,["TGI"]:Y,["TDS"]:de,["TSP"]:ua,["TNM"]:O,["TPG"]:Le,["TMG"]:Le,["TMM"]:da,["TRA"]:Y,["TRS"]:Y,["TRV"]:Y,["TRW"]:Y,["TBB"]:bi,["TOB"]:ve,["TCN"]:we,["TWS"]:O,["TVG"]:Fi,["TXB"]:$,["TXS"]:$,["TFK"]:K,["TFD"]:K,["TFF"]:K,["TCG"]:$,["TMS"]:fa,["TBC"]:ga,["TWT"]:O,["TRN"]:ct,["TGK"]:ii,["TSL"]:ma,["TTF"]:K,["TWG"]:ai,["UGM"]:te,["USY"]:yt,["UGL"]:Y,["UIC"]:pa,["ULR"]:ya,["ULG"]:ve,["URD"]:O,["USA"]:Ht,["UBL"]:$,["UCM"]:Tt,["UEM"]:ba,["UHS"]:Aa,["UIM"]:Tt,["USS"]:jt,["UWL"]:Y,["UWS"]:Y,["UIW"]:Y,["URS"]:$,["UTM"]:Y,["UTR"]:yt,["URB"]:ne,["UPM"]:fe,["VIC"]:Y,["VIK"]:Y,["VRP"]:Ta,["VBK"]:O,["VIN"]:Le,["VTC"]:O,["VTW"]:Me,["VGN"]:Ht,["VND"]:Y,["VNF"]:mt,["VNS"]:Y,["VSK"]:$,["VCH"]:ct,["VGR"]:$,["VSP"]:$,["VTR"]:$,["VGL"]:$,["VGW"]:va,["VOB"]:ve,["VCG"]:jt,["VPR"]:Sa,["VES"]:ne,["VYE"]:$,["WBY"]:mt,["WBU"]:mt,["WHC"]:O,["WHR"]:Ca,["WMC"]:Y,["WMR"]:Tt,["WMM"]:$,["WTK"]:Ke,["WTW"]:O,["WEB"]:Me,["WGE"]:ve,["WTA"]:wa,["WWP"]:Y,["WWR"]:Tt,["WOD"]:ct,["WFM"]:fe,["WWS"]:Da,["WBH"]:Ye,["WCS"]:xa,["WPD"]:O,["WSE"]:Ba,["WPC"]:ct,["WFB"]:Y,["WFS"]:Tt,["WBG"]:jt,["XTE"]:fe,["XCR"]:O,["XDH"]:mt,["XHS"]:Ht,["XHU"]:O,["XRF"]:Ha,["XSH"]:Tt,["XTR"]:Y,["XDV"]:we,["XRW"]:$,["YWC"]:O,["YNS"]:Gt,["ZXR"]:Na,["ZPM"]:Tt,["ZTR"]:K,["ZTU"]:Ht,["ZIN"]:O,["ZDK"]:Y,["ZBS"]:K,["ZST"]:K,["ZMT"]:Fa,["ZMB"]:K,["ZSH"]:jt};makeCard(t){try{let i;if(t==="SOV3"?i=new ka(t):t==="SOC3"?i=new Y(t):t==="LOD3"?i=new Lr(t):t==="GOS3"?i=new ha(t):i=new this.mapper[Wt.extractCardCode(t)](t),i.type==="C"){const r=i;r.spice=[{icon:"A",num:r.iAttack},{icon:"H",num:r.iHealth}].concat(r.spice??[])}return i}catch(i){throw console.error("Make card screwed up on code: "+t),i}}getCard(t){let i=this.cardCache.get(t);return i||(i=this.makeCard(t),this.cardCache.set(t,i)),i}}const W=new Pa;class Ma{registry;constructor(){this.registry=[]}find(t){const i=this.registry.find(r=>r.action===t);if(i)return i;throw console.trace(),new Error("Attempted to find non-existing clicker")}entoggle(t,i){const r=this.find(t);r.enabled=i}add(t){this.registry.push(t)}get(t){return this.find(t)}remove(t){const i=this.registry.findIndex(r=>r.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,r){if(Z.active)return;let n,c;this.scaleFactor===1?(n=t,c=i):(n=Math.round(t*this.scaleFactor),c=Math.round(i*this.scaleFactor));let f,m=S.clickMode;return m==="M"?f=r:r===at.ForceRight?f=at.Right:m==="T"?f=at.Left:f=at.Right,ci.arrayHit(this.registry,n,c,f)}updateScale(t){t===1?this.scaleFactor=1:this.scaleFactor=1/t}scaleFactor=1}const it=new Ma;class Ea{memLoad=!0;step="O";vsAI=!0;p1=this.dud();p2=this.dud();initConstructed(){this.step="O",this.memLoad&&(this.memLoad=!1,this.p1.mode=S.readStringStorage("cMode"+"A","CP"),this.p2.mode=S.readStringStorage("cMode"+"B","CP"),this.p1.mode==="LK"&&(this.p1.mode="CP"),this.p2.mode==="LK"&&(this.p2.mode="CP"),this.vsAI=S.readBoolStorage("cAI",!0)),ut.drawAll()}handleMenuPick(t,i){let r=!0;if(t==="CI"||t==="CV")this.vsAI=t==="CI",S.writeBoolStorage("cAI",this.vsAI);else if(t==="CN")r=!1,this.ezDeck(this.p1)?this.ezDeck(this.p2)?this.launchConstructed():(this.step="B",T.ddf5(this.generateDeckPickerActions())):(this.step="A",T.ddf5(this.generateDeckPickerActions()));else{const n=i==="A"?this.p1:this.p2;t==="LK"?(r=!1,Ot.loadFromFile().then(c=>{typeof c=="string"?qe.iAmError(c):(n.deck=c,n.mode=t,n.bucket="File Upload",S.writeStorage("cMode"+i,t),ut.drawAll())})):(n.mode=t,S.writeStorage("cMode"+i,t))}r&&ut.drawAll()}ezDeck(t){return t.mode==="CP"?!1:(t.mode==="CR"?(t.deck=Ot.randomStockDeck(),t.bucket=Ot.bucketHunter(t.deck.name)):t.mode==="CX"&&(t.deck=Ot.treatsAbound(!0),t.bucket="Scramble"),!0)}handleDeckPick(t){const i=Ot.stockDeckByPram(t);this.step==="A"?(this.dekFun(this.p1,i),this.ezDeck(this.p2)?this.launchConstructed():(this.step="B",T.ddf5(this.generateDeckPickerActions()))):(this.dekFun(this.p2,i),this.launchConstructed())}dekFun(t,i){t.deck=i,t.bucket=Ot.bucketHunter(i.name)}previewDeckPick(t){const i=Ot.stockDeckByPram(t);bt.showDeck(Ot.parseDeck(i.cards))}generateDeckPickerActions(t=-1){const i=He.map((r,n)=>{const c=b.basicAction("DSET");return c.param=n.toString(),c});if(t>-1){const r=He[t],n=r.decks.map(c=>{const f=b.basicAction("DECK");f.param=S.enTil(r.id,c.name);const m=b.basicAction("DPVW");return m.param=f.param,[f,m]});return i.concat(n.flat())}return i}launchConstructed(){E.aiMode=this.vsAI,gt.setMode("G"),E.newGame(this.p1.deck.cards,this.p2.deck.cards)}replay(){E.newGame(this.p1.deck.cards,this.p2.deck.cards)}namenom(t){const i=t?this.p1:this.p2;return k.toPlayer(t).name+"'s deck: "+i.bucket+" - "+i.deck.name}dud(){return{mode:"CP",deck:{cards:[],name:"",factions:[]},bucket:"???"}}}const $t=new Ea;class Ra{deathOrder=[];graveyard=[];reset(){this.graveyard=[],this.deathOrder=[]}purge(){this.deathOrder=[]}getState(){const t={dO:this.deathOrder,gY:this.graveyard};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.deathOrder=i.dO,this.graveyard=i.gY}deathCheck(){const t=E.tick();p.qActiveCreats().forEach(n=>{n.health<1&&(y.lawg(n.code," died."),this.smite(n,t))});const i=k.toPlayer(!0),r=k.toPlayer(!1);(i.health<1||r.health<1)&&(i.healthr.creatId===t.id)&&(this.deathOrder=this.deathOrder.filter(r=>r.creatId!==t.id))}findDeathTime(t){const i=this.deathOrder.filter(r=>r.creatId===t).map(r=>r.time);if(i.length!==0)return Math.min(...i)}destroy(t,i,r,n=void 0){t.status==="A"?(y.lawg(t.code," was destroyed by ",i,"."),Z.addFactBoard(r,t.id,t.lane,t.owner),this.smite(t,n)):(console.warn(`Attempted to destroy creature that was not active. Targ creat ${t.code}; Killer creat ${i}`),console.trace())}gravedigger(t="X",i="LA"){if(t==="X"&&i==="LA"){const r=this.graveyard.length;return r===0?"":this.graveyard[S.randInt(0,r)].cardCode}else{let r;if(t==="X")r=this.graveyard;else{const c=k.toBool(t);r=this.graveyard.filter(f=>f.owner===c)}i!=="LA"&&(r=r.filter(c=>w.levelTargetTest(i,parseInt(c.cardCode.slice(3)))));const n=r.length;return n===0?"":r[S.randInt(0,n)].cardCode}}smite(t,i=void 0){t.status="D",this.deathOrder.push({creatId:t.id,time:i||E.tick()}),this.graveyard.push({cardCode:t.code,owner:t.owner}),x.addEvents(I.creature("DIE",t)),Be.positionChange(t.owner),Z.addDeathBoard(t.id,t.lane,t.owner),t.owner?L.deathsA.push(t.code):L.deathsB.push(t.code),p.dirt()}}const Bt=new Ra;class La{get youi(){return E.ui}initDeck(t,i){this.youi.deckContents=t,this.youi.deckScroll=0,this.youi.deckSummary=i,gt.setMode("T")}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,r){const n=w.cardByTarget(t,r);if(E.aiActive||n.sort((c,f)=>{const m=c[0],C=f[0];return C===m?0:m>C?1:-1}),i){const c=n.length;let f=0,m="",C=0;const D=[];for(;f0&&D.push({cardCode:m,sourceIdx:-1,cardCount:C}),m=n[f][0],C=1),f++;return c>0&&D.push({cardCode:m,sourceIdx:-1,cardCount:C}),D}else return n.map(c=>({cardCode:c[0],sourceIdx:c[1],cardCount:0}))}uniqueContent(t){const i=new Set;return t.filter(r=>i.has(r.cardCode)?!1:(i.add(r.cardCode),!0))}handleShowDeck(t){let i;const r=S.deTil(t.param);if(r[0]==="VE")i=k.activeCardItems(S.txt2bool(r[1]));else{const n=k.getActive();i=t.param==="VR"?n.deck:n.discard}this.showDeck(i)}handleDeckScroll(t){this.paginate(t.param==="D"),ut.drawAll()}showCustomDeck(t,i){this.initDeck(t,!1);const r=this.rightClickers(),n=i.concat(r);return T.ddf5(n),n}showDeck(t){this.initDeck(this.generateContent(t,!0),!0);const i=T.cancelAction();i.key="CNCL",i.param="PM";const r=this.rightClickers();r.push(i),T.ddf5(r)}rightClickers(){return E.aiActive?[]:this.youi.deckContents.map((t,i)=>{const r=b.deckSelectAction("DEET",t.cardCode,i);return r.param=t.cardCode,r})}}const bt=new La;class Ga{friends;friendText;get browseStack(){return E.ui.detailStack}n(t,i){return`${t}${i}`}friendo(t,i){const r=Array.isArray(i)?i:[i];[1,2,3].forEach(n=>{this.friends[this.n(t,n)]=r.map(c=>this.n(c,n))})}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),i=this.n("AVB",1);this.friends={[this.n("ASQ",1)]:[this.n("SLG",1),this.n("WEB",1)],[this.n("ASQ",2)]:[this.n("WEB",2)],[this.n("ASQ",3)]:[this.n("WEB",3)],[this.n("CGL",1)]:[this.n("CGF",1)],[this.n("DHC",1)]:[this.n("DYF",1)],[this.n("DTD",1)]:[this.n("TOT",1)],[this.n("EWV",1)]:[this.n("EWF",1)],[t]:[this.n("FWG",1)],[this.n("IBA",1)]:[i],[this.n("IBA",2)]:[i],[this.n("IBA",3)]:[i],[this.n("IBA",4)]:[i],[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("ROE",1)]:[this.n("FRH",1),this.n("LVG",1),this.n("LTT",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("SLS",1)]:[this.n("MMY",1)],[this.n("TRA",2)]:[this.n("PTR",2)],[this.n("TRA",3)]:[this.n("PTR",3)],[this.n("TRS",2)]:[this.n("STO",2)],[this.n("TRS",3)]:[this.n("STO",3)],[this.n("TRV",2)]:[this.n("ITO",2)],[this.n("TRV",3)]:[this.n("ITO",3)],[this.n("TRW",2)]:[this.n("STR",2)],[this.n("TRW",3)]:[this.n("STR",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.friendo("BLH","LWY"),this.friendo("BTM","BOS"),this.friendo("BWD","TFD"),this.plont("BTS"),this.friendo("BWT","DNK"),this.friendo("CSB","ZBS"),this.friendo("CYS","COZ"),this.friendo("DSK","SPN"),this.friendo("DDF","SXT"),this.friendo("DNK","BWT"),this.friendo("DZD","DZA"),this.friendo("DBQ","BRF"),this.friendo("EPH","EPS"),this.friendo("FST","ZST"),this.friendo("FWK","ZMB"),this.friendo("FGD",["FGA","FGB","FGG","FGO"]),this.friendo("FGG","FGO"),this.friendo("FMD","FME"),this.friendo("FME","FMD"),this.plont("GMR"),this.friendo("IZL",["IFL","IFR","IZR"]),this.friendo("IZR",["IFL","IFR","IZL"]),this.friendo("IZK",["IFL","IFR","IZL","IZR"]),this.friendo("LVH","KBE"),this.friendo("NCM","POZ"),this.friendo("NSW","SPN"),this.friendo("NSH","NDR"),this.friendo("NGQ","NSD"),this.friendo("NFF","TFF"),this.friendo("NOZ","OOZ"),this.friendo("PHC","CYP"),this.plont("PTB"),this.friendo("RWC","RPT"),this.plont("SST"),this.plont("STS"),this.friendo("SSP","DFM"),this.friendo("SDA","HTP"),this.friendo("SLG","WEB"),this.friendo("SND","SPU"),this.friendo("SIV","KBE"),this.friendo("TNL","ZMB"),this.friendo("USS","LWY"),this.friendo("VIC",["IFL","IFR"]),this.friendo("WHR","WHC"),this.plont("WWS"),this.friendo("YNS","XYR");const r=42,n=31,c=40,f=51,m=38,C=52,D=66;this.friendText={["AVB"]:[42,"Hammer"],["BOS"]:[f,""],["BWT"]:[68,"Bron"],["BRF"]:[18,""],["CGF"]:[65,"Fiend"],["CYP"]:[4,""],["COZ"]:[n,""],["DFM"]:[61,"Mimic"],["DNK"]:[8,""],["DZA"]:[59,"Dozer"],["DYF"]:[38,"Infusion"],["EPS"]:[49,"Soldier"],["EWF"]:[18,""],["FWG"]:[44,""],["FWC"]:[28,"Chrysalis"],["FGA"]:[65,"Alpha"],["FGB"]:[77,"Beta"],["FGG"]:[53,"Gamma"],["FGO"]:[57,"Omega"],["FRH"]:[21,""],["FMD"]:[47,"Dragon"],["FME"]:[78,"Egg"],["FUN"]:[49,""],["HTP"]:[38,"Hunting"],["ITO"]:[r,"Torrent"],["IZL"]:[42,"Av Flame"],["IZR"]:[44,"Av Frost"],["IFL"]:[65,"Flame"],["IFR"]:[67,"Frost"],["KBE"]:[83,"Bee"],["LVG"]:[16,""],["LTT"]:[65,"Titan"],["LWY"]:[65,"Wyrm"],["MMY"]:[40,""],["POZ"]:[n,""],["NDR"]:[3,""],["NSD"]:[c,""],["OOZ"]:[n,""],["PTR"]:[r,"Torrent"],["RPT"]:[51,""],["RSC"]:[60,"Scout"],["SPL"]:[f,""],["SXP"]:[f,""],["SXD"]:[c,""],["SXT"]:[m,""],["SDL"]:[c,""],["SLG"]:[25,""],["SPN"]:[D,""],["STR"]:[r,"Torrent"],["SPU"]:[D,""],["XYR"]:[D,""],["STO"]:[r,"Torrent"],["TOT"]:[40,"Tendrils"],["TFK"]:[m,""],["TFD"]:[m,""],["TFF"]:[m,""],["TTF"]:[m,""],["WHC"]:[41,"Courser"],["WEB"]:[78,""],["ZTR"]:[32,"Returned"],["ZBS"]:[C,""],["ZST"]:[C,""],["ZMB"]:[C,""]}}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(!E.aiActive)if(E.ui.detailStack=[t],gt.mode!=="R"){gt.setMode("R");const i=b.basicAction("CNCL");i.zone=gt.baseMode==="G"?"B":"N",i.param="PM",T.ddf5([i])}else ut.drawAll()}changeLevel(t){const i=this.browseStack,r=i.length-1,n=i[r];i[r]=this.n(Wt.extractCardCode(n),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=b.basicAction("DTUP");return t.param="DB",t}levelAction(t){const i=b.basicAction("DTUP");return i.param=S.enTil("DL",t),i}friendAction(t){const i=b.basicAction("DTUP");return i.param=S.enTil("DF",t),i}updateDetails(t){const i=S.deTil(t.param),r=i[0];r==="DB"?this.goBack():r==="DF"?this.goToFriend(i[1]):r==="DL"?this.changeLevel(parseInt(i[1])):console.error("Unknown detail arg",t)}}const ge=new Ga,ki=[1,2,3,4,5,6,7].map(o=>o.toString());class Ia{rarityCache={["L"]:[],["H"]:[],["R"]:[],["C"]:[],["T"]:[]};faction1="X";faction2="X";factionLock=!1;picks=[];picksAsDeck=[];currentPack=[];scrollIdx=0;memLoad=!0;step="O";stats;vsAI=!0;legDraft=!1;fatPacks=!1;overdraft=!1;rarityFilters;setFilters;pAdeck=[];pBdeck=[];get aiPicking(){return this.vsAI&&this.step==="B"}packOdds=[];constructor(){this.rarityFilters=new Map(Re.map(t=>[t,!0])),this.setFilters=new Map(ki.map(t=>[t,!0])),this.stats=new xi}getRarity(t){return this.rarityFilters.get(t)??!0}toggleRarity(t){const i=!this.rarityFilters.get(t);return this.rarityFilters.set(t,i),i}getSet(t){return this.setFilters.get(t.toString())??!0}toggleSet(t){const i=t.toString(),r=!this.setFilters.get(i);return this.setFilters.set(i,r),r}get canPageDown(){return this.picksAsDeck.length-this.scrollIdx>15}get canPageUp(){return this.scrollIdx>0}paginate(t){t?this.scrollIdx+=15:this.scrollIdx-=15}initDraft(){this.step="O",this.memLoad&&(this.memLoad=!1,this.vsAI=S.readBoolStorage("dAI",!0),this.legDraft=S.readBoolStorage("legDraft",!1),this.fatPacks=S.readBoolStorage("fatPacks",!1),this.overdraft=S.readBoolStorage("overD",!1),ki.forEach(t=>{this.setFilters.set(t,S.readBoolStorage("dSet"+t,!0))}),Re.forEach(t=>{this.rarityFilters.set(t,S.readBoolStorage("dRare"+t,!0))})),ut.drawAll()}setFArr(){let t=ki.filter(i=>this.setFilters.get(i)).map(i=>parseInt(i));return t.length===7&&(t=[]),t}validRarities(){return Re.filter(t=>this.rarityFilters.get(t))}startDraftPicks(){const t=this.setFArr();Re.forEach(i=>{this.getRarity(i)?this.rarityCache[i]=Ot.getDeckCards([i],[],t):this.rarityCache[i]=[]}),Re.every(i=>this.rarityCache[i].length===0)&&(this.rarityCache["C"]=this.fun()),this.packOdds=this.fatPacks?[9,31,40]:[5,25,40],this.faction1="X",this.faction2="X",this.factionLock=!1,this.picks=[],this.picksAsDeck=[],this.scrollIdx=0,this.stats=new xi,this.resumeDraft("")}resumeDraft(t){if(t){this.picks.push(t),this.picksAsDeck=this.picksToDeck();const n=this.overdraft?60:30;if(this.picks.length===n){this.step==="A"?(this.pAdeck=this.picksAsDeck.slice(),this.step="B",this.startDraftPicks()):(this.pBdeck=this.picksAsDeck.slice(),this.launchDraft());return}const c=W.getCard(t);if(this.aiPicking||this.stats.addStat(c.type,c.faction),!this.factionLock){const f=c.faction;if(this.faction1==="X")this.faction1=f;else if(f!==this.faction1){this.faction2=f,this.factionLock=!0;const m=this.setFArr();this.validRarities().forEach(C=>{this.rarityCache[C]=Ot.getDeckCards([C],[this.faction1,this.faction2],m)})}}}const i=this.generatePack().slice(-1*(6-this.picks.length%5)),r=this.fillPack(i);if(this.aiPicking)this.resumeDraft(r[r.length-1]);else{this.currentPack=r;const n=r.map((c,f)=>{const m=b.draftSelectAction("DRFT",f,!0);return m.param=c,m});it.removeAll(),T.ddf5(n)}}replay(){this.vsAI?(this.step="B",this.startDraftPicks()):this.launchDraft()}picksToDeck(){const t=[];return this.picks.forEach(i=>{const r=t.findIndex(n=>n.card===i);r===-1?t.push({card:i,num:1}):t[r].num+=1}),t.sort((i,r)=>{const n=W.getCard(i.card+"1"),c=W.getCard(r.card+"1");return n.name.toLowerCase(){const n=this.rarityCache[r].length;let c=!0,f=0;for(;c&&f<100;){const m=this.rarityCache[r][S.randInt(0,n)];i.includes(m)?f++:(i.push(m),c=!1)}}),i}handleMenuPick(t,i){if(t==="DI"||t==="DV")this.vsAI=t==="DI",S.writeBoolStorage("dAI",this.vsAI);else if(t==="DN")this.step="A",this.startDraftPicks();else if(t==="DR"){const r=i;S.writeBoolStorage("dRare"+i,this.toggleRarity(r))}else t==="DT"?S.writeBoolStorage("dSet"+i,this.toggleSet(i)):t==="LD"?(this.legDraft=!this.legDraft,S.writeBoolStorage("legDraft",this.legDraft)):t==="GP"?(this.fatPacks=!this.fatPacks,S.writeBoolStorage("fatPacks",this.fatPacks)):t==="OD"&&(this.overdraft=!this.overdraft,S.writeBoolStorage("overD",this.overdraft));ut.drawAll()}launchDraft(){E.aiMode=this.vsAI,gt.setMode("G"),E.newGame(this.pAdeck,this.pBdeck)}fun(){return[["ART","SVO","MPH","VSK","MSP","LYS"],["CAG","ATG","WMM","ESU","BWH","CBS"],["DHW","NCF","ROG","EXD","TPT","HOX"],["FLS","STP","BRN","TCG","AQE","VOB"]][S.randInt(0,4)]}}const At=new Ia;class Wa{allCanvases=["game-ui","field","player","hand","hilite","effects","decklist","card"];allBackgrounds=["playmat","blueface","mainmenu"];dirtyA=!0;pvCC=[];init(){[oe,se].forEach(t=>t.init())}dirtyAll(){[oe,se,Ct].forEach(t=>{t.dirty=!0}),this.dirtyA=!0}async drawAll(){if(nt.simOn)return;const t=gt.mode;this.clearDetails(),t==="G"?await this.drawGame():(it.removeAll(),t==="R"?await this.drawDetails(T.activeActions):t==="T"?E.aiActive||await this.drawDeck(T.activeActions):t==="D"?await this.drawDraft(T.activeActions):t==="C"?await this.drawConstructed():t==="I"?await this.drawInfoMenu():t==="X"?await this.drawExit(T.activeActions):t==="S"?await this.drawSwap():await this.drawMenu())}async drawGame(){this.clearDeck(),Dt.genAnimations();const t=await Z.prep();if(!E.aiActive&&t>0&&(lt.get("hilite").clear(),await $e.drawActions([]),this.dirtyA=!0),await Promise.all([this.drawHand(k.getLocal()),this.drawPlayers(),this.drawField()]),Z.start(),await Z.aniProm(),await this.drawActions(T.activeActions),this.pvCC.forEach(i=>it.add(i)),E.winFlag!==0)await this.drawGameOver(),setTimeout(()=>{gt.mode==="G"&&E.winFlag!==0&&(oe.dirty=!0,this.drawField().then(()=>{this.drawGameOver(!0)}))},1500);else{await this.drawCommonButtons(!0,!0,!0);const i=b.basicAction("DBUG");i.param="AB";const r=new ht(i,0,0,40,35,at.Right);it.add(r)}}async drawGameOver(t=!1){await Ct.drawGameOver(t)}async drawHand(t){se.dirty&&await se.drawCards(t)}async drawField(){oe.dirty&&await oe.drawCards()}async drawPlayers(){Ct.dirty&&(this.pvCC=await Ct.drawAllPlayers())}async drawDeck(t){const i=t.find(c=>c.zone==="B"),r=gt.baseMode==="G";r&&await $e.drawActions(i?[i]:[]);const n=lt.get("decklist");if(n.clear(),Ci.makeHaze(n),!r&&i){await re.drawFactionButton(n,631,712,"A"),await re.drawSprite(n,"ui/arrow/x.png",631+28,712+12);const m=re.makeFactButtonClick(631,712,i);it.add(m)}await Ci.drawActions(t,n),await Ci.drawCards(n),await this.drawCommonButtons(!0,!0,!1)}async drawActions(t){E.aiActive?await $e.drawActions([]):this.dirtyA&&(it.removeAll(),lt.get("hilite").clear(),await Promise.all([se.drawActions(t),oe.drawActions(t),$e.drawActions(t),Ct.drawActions(t)]),this.dirtyA=!1)}async drawDraft(t){lt.get("hilite").clear();const r=lt.get("game-ui");r.clear(),it.removeAll(),At.step==="O"?await oi.drawDraftMenu(r):(await me.drawPickerPlayer(r,At.step==="A",!1),await oi.drawList(t,r),await oi.drawStats(r),await this.drawCommonButtons(!0,!0,!1),await oi.drawPack(t,r))}async drawMenu(){const t=lt.get("game-ui");t.clear(),it.removeAll(),await kn.drawMenu(t)}async drawInfoMenu(){const t=lt.get("game-ui");t.clear(),it.removeAll(),await me.drawExtrasMenu(t)}async drawConstructed(){if($t.step==="O"){const t=lt.get("game-ui");t.clear(),it.removeAll(),await qe.drawConstrMenu(t)}else await this.drawDeckPick(T.activeActions)}async drawDeckPick(t){lt.get("decklist").clear();const r=lt.get("game-ui");r.clear(),it.removeAll(),await me.drawPickerPlayer(r,$t.step==="A",$t.vsAI),await qe.drawSets(t,r),await qe.drawList(t,r)}clearDetails(){lt.get("card").clear()}clearDeck(){lt.get("decklist").clear()}async drawDetails(t){gt.baseMode==="G"&&(this.dirtyA=!0,await this.drawActions(t)),await this.drawCommonButtons(!0,!0,!1),lt.get("card").clear();const r=t.find(n=>n.key==="CNCL");r?await mn.drawDetails(r):console.error("Attempted to show details view with no cancel action")}async drawCommonButtons(t,i,r){let n=979;const c=723,f=lt.get("game-ui");if(r&&f.clear(),t&&(await re.makeIconButton(f,n,c,"EX"),n-=50,await re.makeIconButton(f,n,c,"HL"),n-=50),i){const m=S.clickMode;m!=="M"&&await re.makeIconButton(f,n,c,m==="I"?"TM":"DM")}}async drawExit(t){const i=lt.get("card");await ot.drawButton(i,151,488,t[1],"Quit Game",24,!1),await ot.drawButton(i,478,488,t[0],"Resume",52,!1)}async drawSwap(){const t=lt.get("decklist");t.clear(),t.context.fillStyle="#000000",t.context.fillRect(0,0,S.gameWidth,S.gameHeight);const i=k.getActive(),r="#AAF0C1",n=b.basicAction("USWP");n.param="PM",await Ct.drawPlayer(i,t,200,300);const c={fontSize:22,colour:r};await Ct.drawText(t,"Player "+(i.isPlayerA?"1":"2"),480,360,c),await Ct.drawText(t,"Click to start turn",480,420,c);const f=new ht(n,0,0,S.gameWidth,S.gameHeight,at.Both);it.add(f)}setBackground(t){const i="hide";this.allBackgrounds.forEach(r=>{const n=document.getElementById(r);n&&(t===r?n.classList.remove(i):n.classList.add(i))})}playmatSetup(){let t=!1;const i=S.options.playmat,r=document.getElementById("playmat");if(r?r.dataset.pic!==i&&(t=!0,r.remove()):t=!0,t){const n=new Image(S.gameWidth,S.gameHeight);n.id="playmat",n.classList.add("hide",this.scaleCSS(S.options.scale)),n.dataset.pic=i,n.src=S.imgRoot+`background/playfield-${i}.jpg`,document.getElementById("mainmenu").before(n)}}scaleCSS(t){return`uiSize${t}`}changeScale(t){this.clearAll();let i=S.options.scale;i===t&&(i="100");const r=t==="100"?1:.90625;it.updateScale(r);const n=this.scaleCSS(i),c=this.scaleCSS(t);this.allCanvases.forEach(C=>{lt.get(C).dom.classList.replace(n,c)}),this.allBackgrounds.forEach(C=>{const D=document.getElementById(C);D&&D.classList.replace(n,c)}),document.getElementById("solforge").classList.replace(`gameSize${i}`,`gameSize${t}`),document.getElementById("log").classList.replace(`logSize${i}`,`logSize${t}`),S.options.scale=t,S.writeStorage("scale",t)}clearAll(){this.allCanvases.forEach(t=>{lt.get(t).clear()})}}const ut=new Wa;class $a{positionChange(t){p.creatByTarget().forEach(i=>{i.enforceEffects("PS",t)}),k.enforceEffects(t)}defenderChange(t){p.qPlayerCreats(t).forEach(r=>{r.effects.filter(n=>n.watch==="DF").forEach(n=>W.getCard(n.logicCode).enforceEffect(r))})}playerHealthChange(){p.qActiveCreats().forEach(t=>{t.enforceEffects("PH")})}enforceAllNonPositionCreatureEffects(){p.qActiveCreats().forEach(i=>{i.enforceEffects("AT"),i.enforceEffects("AR"),i.enforceEffects("CH"),i.enforceEffects("DF",i.owner)})}}const Be=new $a;class Ua{getC(t){return p.jr5(t)}creature(t,i){return{code:t,creatId:i.id}}creatHeal(t,i){return{code:"CHL",creatId:t.id,healAmt:i}}damage(t,i,r,n,c,f,m){let C;return f instanceof Qe?C=f.id:C=f,{code:"DMG",battle:t,dmg:i,life:r,isCreatSrc:n,isCreatTarg:c,target:C,srcId:m?.id}}enterField(t){return{code:"ENT",creatId:t.id,forged:!1,formation:!1}}playCard(t,i){return{code:"PLC",playerA:i,cardCode:t}}player(t,i){return{code:t,playerA:i}}playerHeal(t,i){return{code:"PHL",playerA:t,healAmt:i}}replaced(t,i){return{code:"RPL",creatId:t.id,replCreatId:i.id}}toCreature(t){const i=t;return{code:i.code,creatId:i.creatId,creature:this.getC(i.creatId)}}toDamage(t){const i=t;let r,n,c;return i.isCreatTarg?c=this.getC(i.target):n=k.toPlayer(i.target),i.isCreatSrc&&(r=this.getC(i.srcId)),{code:i.code,battle:i.battle,dmg:i.dmg,life:i.life,isCreatSrc:i.isCreatSrc,srcId:i.srcId,target:i.target,isCreatTarg:i.isCreatTarg,srcCreat:r,hurtCreat:c,hurtPlayer:n}}toEnterField(t){const i=t;return{code:i.code,creatId:i.creatId,forged:i.forged,formation:i.formation,creature:this.getC(i.creatId)}}toReplaced(t){const i=t;return{code:i.code,creatId:i.creatId,creature:this.getC(i.creatId),replCreatId:i.replCreatId,replCreat:this.getC(i.replCreatId)}}}const I=new Ua;class Oa{field=[];birthOrder=[];laneIdx=[1,2,3,4,5];reset(){this.field=[],this.birthOrder=[]}purge(){this.field=this.field.filter(t=>t.status==="A"),this.birthOrder=[]}getState(){const t={field:this.field.map(i=>i.getState()),bO:this.birthOrder};return JSON.stringify(t)}dirt(){nt.simOff&&(oe.dirty=!0,ut.dirtyA=!0)}setState(t){const i=JSON.parse(t);this.field=i.field.map(r=>new Qe(r)),this.birthOrder=i.bO}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")}creatByTr(t){return this.jr5(t.creatId)}creatByLane(t,i){const r=this.searchByLane(t,i);if(r)return r;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 this.field.find(i=>i.id===t)}searchByLane(t,i){return this.field.find(r=>r.lane===t&&r.owner===i&&r.status==="A")}searchByFSA(t){return this.searchByLane(t.lane,t.playerA)}creatByTarget(t){let i=this.field;if(t){if(t.player!=="X"){const r=k.toBool(t.player);i=i.filter(n=>n.owner===r)}if(t.creatStatus!=="A"){const r=this.creatStatusTargetToCS(t.creatStatus);i=i.filter(n=>n.status===r)}if(!S.isUn(t.lanes)){const r=w.lanesToArr(t.lanes);i=i.filter(n=>r.includes(n.lane))}if(S.isUn(t.maxAttack)||(i=i.filter(r=>r.attack<=t.maxAttack)),t.notMe&&(i=i.filter(r=>r.id!==t.notMe)),t.victims){const r=S.deTil(t.victims);i=i.filter(n=>r.includes(n.id))}if(t.tribe!=="AN"&&(i=i.filter(r=>r.isTribe(t.tribe))),t.canLevel&&(i=i.filter(r=>W.getCard(r.code).canLevel())),t.level!=="LA"){const r=w.levelTargetToLevel(t.level);i=i.filter(n=>r.includes(n.level))}t.cardCode&&(i=i.filter(r=>W.getCard(r.code).cardCode()===t.cardCode)),t.canDefender&&(i=i.filter(r=>!r.negateDefender)),t.hasDefender&&(i=i.filter(r=>r.defender)),t.canArmor&&(i=i.filter(r=>!r.negateArmor)),t.hasArmor&&(i=i.filter(r=>r.armor>0)),t.canMove&&(i=i.filter(r=>!r.negateMobility)),t.hasMobility&&(i=i.filter(r=>r.mobility>0)),t.hasPoison&&(i=i.filter(r=>r.poison>0)),t.canRegen&&(i=i.filter(r=>!r.negateRegen)),t.hasRegen&&(i=i.filter(r=>r.regen>0)),t.faction!=="X"&&(i=i.filter(r=>r.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=>!this.field.find(n=>n.owner===t&&n.lane===i&&n.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):[]}fling(t,i){const r=this.emptyLanes(t.owner),n=r.length;n>0&&t.move(r[S.randInt(0,n)],i)}birth(t,i,r,n=0,c,f=void 0){if(i==="S"){const G=this.emptyLanes(r);if(G.length===0)return;n=G[S.randInt(0,G.length)]}else if(i==="P"&&!this.emptyLanes(r).includes(n))return;const m=typeof t=="string"?W.getCard(t):t,C=m.jr3(r,n);this.dirt(),r===k.activeA&&L.birthRegistrar(C.id),Z.addFactBoard(c,C.id,C.lane,r);let D;if(i==="F"||i==="R"){if(D=this.searchByLane(n,r),D){if(nt.simOff){const G=[D.code," was replaced"];i==="R"&&G.push(" with ",C.code),G.push("."),y.lawg(...G)}D.status="R",x.addEvents(I.replaced(C,D))}if(i==="F"){let G=2;r===k.isLocalA&&(G=T.playPosition()-E.ui.handScrollLeft),Z.addForgeMove(C.id,G,n,r,D)}}this.field.push(C);const B=I.enterField(C);return B.forged=i==="F",m.formation&&C.lane!==1&&C.lane!==5&&(B.formation=C.adjacent.every(G=>!S.isUn(this.searchByLane(G,r)))),this.birthOrder.push({creatId:C.id,time:f||E.tick()}),x.addEvents(B),C.enforceEffects("PH"),Be.positionChange(r),C}findBirthTime(t){const i=this.birthOrder.filter(r=>r.creatId===t).map(r=>r.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(b.crTarg())}qPlayerCreats(t){const i=b.crTarg();return i.player=k.toTarget(t),this.creatByTarget(i)}ddf1(){return this.creatByTarget(b.crFriendTarg())}qEnemyCreats(){return this.creatByTarget(b.crEnemyTarg())}}const p=new Oa;class Va{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){if(t.aggState>0){let i=0;if(t.oppState>0){const r=t.aggState===2&&t.aggCreat.breakthrough;i=t.oppCreat.hurtBattle(t.aggAtt,t.aggCreat,r)}else t.aggState===2&&(i=t.aggAtt);i>0&&k.hurtBattle(!t.aggCreat.owner,i,t.aggCreat)}}genNugget(t,i,r,n,c){return{aggState:t,aggCreat:r,oppState:i,oppCreat:n,aggAtt:c,lurch:!1,slash:!1,armHit:!1}}nugPair(t,i,r,n){return[this.genNugget(t,i,r,n,r?.attack||0),this.genNugget(i,t,n,r,n?.attack||0)]}simbaCF(t,i,r,n){if(i.slash=!0,t.lurch&&t.aggCreat.breakthrough){const c=Math.max(0,r-t.oppCreat.health);c>0&&this.simbaP(n,c,!0)}}simbaC(t,i,r){if(t.aggState===0)return;let n=!1;if(t.aggState===2?(t.lurch=!0,n=!0):t.oppState===2&&(n=!0),n&&t.aggAtt>0)if(t.oppState>0){const c=Math.max(t.oppCreat.armor-t.oppCreat.armorDmg,0);if(c>0){i.armHit=!0;const f=t.aggAtt-c;f>0&&this.simbaCF(t,i,f,r)}else this.simbaCF(t,i,t.aggAtt,r)}else this.simbaP(r,t.aggAtt,t.lurch)}simbaP(t,i,r){if(!(i<1||!r||t[1]&&t[2]))if(t[0]>0){t[1]=!0;const n=Math.min(t[0],i);t[0]=t[0]-n,i-n>0&&(t[2]=!0)}else t[2]=!0}fight(t){nt.simOff&&y.add("FIGHT!");let i=2,r=1;t&&(L.mainBattle=!1,i=0,r=0);const n=k.activeA,c=!n,f=[],m=k.makeAnim(n),C=k.makeAnim(c);p.laneIdx.forEach(B=>{const G=p.searchByLane(B,n),R=p.searchByLane(6-B,c),X=this.creatFightState(G,i),V=this.creatFightState(R,r);if(X===2||V===2){const _=this.nugPair(X,V,G,R);this.simbaC(_[0],_[1],C),this.simbaC(_[1],_[0],m),X===2&&L.ffs++,f.push(_[0],_[1])}});let D;nt.simOff&&Z.on&&f.some(B=>B.lurch)?(this.barking&&S.dogBark(),f.forEach(B=>{B.lurch&&Z.addFight(B.aggCreat),B.slash&&Z.addSlash(B.aggCreat),B.armHit&&Z.addArmorC(B.aggCreat)}),m[1]&&Z.addArmorP(n),C[1]&&Z.addArmorP(c),m[2]&&Z.addSwipe(n),C[2]&&Z.addSwipe(c),D=oe.drawFight()):D=Promise.resolve(),D.then(()=>{f.forEach(B=>this.dukeItOut(B)),Be.playerHealthChange(),Bt.deathCheck(),x.type="C0",T.actionDone()})}barking=!0}const Ii=new Va;class za{aiMode=!1;aiActive=!1;winFlag=0;ui=this.freshUI();idnum=0;clock=0;genId(){return this.idnum++,"@"+this.idnum.toString(36)}tick(){return this.clock++,this.clock}getState(){return{i:this.idnum,t:this.clock}}setState(t,i){this.idnum=t,this.clock=i}newGame(t,i){this.idnum=0,this.clock=0,Ii.barking=S.options.bark,k.activeA=S.randInt(0,2)===0,this.aiActive=!k.activeA&&this.aiMode,k.isLocalA=this.aiMode||k.activeA,T.actionHistory=[],nt.turnSims=0,nt.turnTime=0,p.reset(),Bt.reset(),x.reset(),ut.dirtyAll(),this.ui=this.freshUI(),L.firstTurn=!0,this.winFlag=0;const r=k.nameOSaurus();if(k.initPlayer(!0,t,"Forgy McGhee",25),k.initPlayer(!1,i,r[0],r[1]),y.setup(),Z.on&&!Z.initialzed){y.debug("Loading animations, please wait.");let n=!1;const c=setTimeout(()=>{n=!0,y.debug("Slow load. Animations disabled until finished."),this.go()},5e3);Z.initProm().then(()=>{n||(clearTimeout(c),this.go())})}else this.go()}go(){y.add("Ready...FIGHT!"),Dt.startState(k.getLocal()),L.startTurn()}freshUI(){return{handScrollLeft:0,detailStack:[],deckContents:[],deckScroll:0,deckSummary:!1}}}const E=new za;class Za{laneIdx=[1,2,3,4,5];state=[];addCard(t,i,r=!1){const n=t.hand.push(i);if(this.hd(t),this.ok(t)){const c=n-1;this.state.push({status:"A",ccode:i,idx:c,vIdx:r?5:-1})}}cardDiscard(t,i){if(t.discard.push(t.hand.splice(i,1)[0]),this.phd(t),this.ok(t)){const r=this.currHand()[i];r.status="D"}}cardDiscardAll(t){t.discard=t.discard.concat(t.hand),t.hand=[],this.phd(t),this.ok(t)&&this.currHand().forEach(r=>{r.status="D"})}hd(t){this.local(t)&&(se.dirty=!0)}phd(t){this.local(t)&&(Ct.dirty=!0,se.dirty=!0)}cardPlayOrLevel(t,i,r,n=!1){if(t.hand.splice(i,1),this.hd(t),this.ok(t)){const c=this.currHand();c[i].status=n?"O":r?"V":"D"}}currHand(){return this.state.filter(t=>t.status==="N"||t.status==="A"||t.status==="L")}genAnimations(){if(!Z.on)return;let t=!1,i=0,r=!1;const n=k.getLocal();this.state.forEach(m=>{this.posInView(m.vIdx)&&((m.status==="D"||m.status==="V"||m.status==="O")&&(Z.addHandDiscard(this.key(!1,m.idx,m.vIdx,-5),m.ccode,m.vIdx),t=!0,r=!0),m.status==="V"||m.status==="L"?(Z.addLevel(this.key(!1,m.idx,m.vIdx,-5),m.vIdx),t=!0):m.status==="O"&&Z.addOverload(this.key(!1,m.idx,m.vIdx,-5),m.vIdx))});let c=this.left();c>0&&n.hand.length-c<5&&(c=Math.max(0,n.hand.length-5),E.ui.handScrollLeft=c),this.currHand().map((m,C)=>({guts:m,newIdx:C,newVIdx:this.viewPos(C,c)})).forEach(m=>{if(m.guts.vIdx!==m.newVIdx){const C=this.key(!0,m.newIdx,m.guts.vIdx,m.newVIdx);m.guts.vIdx<0&&m.newVIdx>4?(Z.addHandFling(C,m.guts.ccode,i),i++,t=!0):(this.posInView(m.guts.vIdx)||this.posInView(m.newVIdx))&&(Z.addHandMove(C,m.guts.ccode,m.guts.vIdx,m.newVIdx,r),t=!0)}}),t&&this.genState(n)}genState(t){if(this.ok(t)){const i=this.left();this.state=t.hand.map((r,n)=>({ccode:r,idx:n,status:"N",vIdx:this.viewPos(n,i)}))}}key(t,i,r,n){return S.enTil(S.bool2txt(t),i,r,n)}left(){return E.ui.handScrollLeft}levelInHand(t,i,r){if(t.hand[i]=r,this.hd(t),this.ok(t)){const n=this.currHand();n[i].status="L"}}local(t){return t.isPlayerA===k.isLocalA}ok(t){return nt.simOff&&Z.on&&this.local(t)}posInView(t){return!(t>4||t<0)}startState(t){this.genState(t),this.state.forEach(i=>{i.vIdx=-1})}viewPos(t,i){return t-i}}const Dt=new Za;class Ya{loglist;you=!0;localPlayerKey="";oppPlayerKey="";localPlayerSpan="";oppPlayerSpan="";constructor(){this.loglist=document.getElementById("loglist")}setup(){this.you=k.isLocalA,this.localPlayerKey=this.you?"^pa":"^pb",this.oppPlayerKey=this.you?"^pb":"^pa",this.localPlayerSpan=this.span(k.toPlayer(this.you).name,"green"),this.oppPlayerSpan=this.span(k.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,r=""){const n=r.length>0?` onclick="sfapi.details('${r}')"`:"";return`${t}`}add(t){this.addLi(t)}debug(t,i=!0){(i||S.options.debug)&&this.addLi(this.span(t,"debug"))}clearAll(){this.loglist.innerHTML=""}crdRgx=/^[A-Z\d]{3}[1234S]$/;lawg(...t){if(nt.simOn)return;let i="";t.forEach(r=>{if(typeof r=="string")r.match(this.crdRgx)===null?i+=r:i+="^c"+r;else{const n=k.toBool(r);i+="^p"+(n?"a":"b")}}),this.parse(i)}factMap={["A"]:"all",["N"]:"nek",["T"]:"tem",["U"]:"ute"};parseCards(t){let i=!0;for(;i;){const r=t.indexOf("^c");if(r===-1)i=!1;else{const n=t.slice(r+2,r+6);if(n==="POIS")t=t.replaceAll("^c"+n,this.span("Poison","green"));else{const c=W.getCard(n);t=t.replaceAll("^c"+n,this.span(`${c.name} ${c.level}`,this.factMap[c.faction],n))}}}return t}parse(t){const r=t.replaceAll(this.localPlayerKey,this.localPlayerSpan).replaceAll(this.oppPlayerKey,this.oppPlayerSpan),n=this.parseCards(r);this.add(n)}cardText(t){let i;if(t.type==="C"){const r=t,n=[];r.iRegen>0&&n.push("Regenerate "+r.iRegen),r.iArmor>0&&n.push("Armor "+r.iArmor),r.iMobile>0&&n.push("Mobility "+r.iMobile),r.iBT&&n.push("Breakthrough"),r.iDefend&&n.push("Defender"),r.iAggro&&n.push("Aggressive"),r.consistent&&n.push("Consistent"),n.length>0&&n.push(""),i=n.join(". ")+t.text}else i=t.text;return(t.free?"Free. ":"")+(t.overload?"Overload. ":"")+i}cardTextSplit(t){const i=[];if(t.free&&i.push("Free"),t.consistent&&i.push("Consistent"),t.overload&&i.push("Overload"),t.type==="C"){const r=t;r.iRegen>0&&i.push("Regenerate "+r.iRegen),r.iArmor>0&&i.push("Armor "+r.iArmor),r.iMobile>0&&i.push("Mobility "+r.iMobile),r.iBT&&i.push("Breakthrough"),r.iDefend&&i.push("Defender"),r.iAggro&&i.push("Aggressive")}if(t.text.length>0&&i.push(...t.text.split("~")),t.level===1){const r=t.cardCode(),n=Di.find(c=>c[0]===r);if(n){let c;const f=n[1];f.length===2&&f[0]===f[1]?c="2x "+W.getCard(`${f[0]}1`).name:c=f.map(m=>W.getCard(`${m}1`).name).join(", "),i.push("Solbind: "+c)}}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){return t===1?"level 1 ":t===2?"level 2 or lower ":""}jr9(t,i,r=!1){return t!==0&&i!==0?`${this.bufferson(t,!0)}${r?",":" 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)}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){t.length===3&&(console.warn("HEY a 3 char card code was passed to fastName, why?: "+t),t=`${t}1`);const i=W.getCard(t);return i.name+" "+i.level}pName(t){return t?"A":"B"}tokName(t){return`${t.iAttack}/${t.iHealth} ${t.name}`}tribeT={["AN"]:"Any",["AB"]:"Abomination",["AG"]:"Angel",["AS"]:"Asir",["BR"]:"Bear",["BE"]:"Beast",["CT"]:"Cat",["CR"]:"Chrysalis",["CY"]:"Cyborg",["DF"]:"Darkforged",["DM"]:"Demon",["DN"]:"Dinosaur",["DG"]:"Dragon",["DK"]:"Drakin",["DY"]:"Dryad",["ER"]:"Earth",["EL"]:"Elemental",["EN"]:"Energeist",["FY"]:"Fairy",["FR"]:"Fire",["FB"]:"Forgeborn",["FT"]:"Frost",["GT"]:"Giant",["GN"]:"Gnome",["GL"]:"Golem",["GG"]:"Grimgaunt",["GD"]:"Guardian",["HM"]:"Human",["HY"]:"Hydra",["IC"]:"Ice",["IN"]:"Insect",["LT"]:"Lightning",["LP"]:"Lupin",["MT"]:"Manticore",["MC"]:"Mech",["MM"]:"Metamind",["NG"]:"Naga",["OZ"]:"Ooze",["PX"]:"Phoenix",["PL"]:"Plant",["RM"]:"Ram",["RB"]:"Robot",["SY"]:"Satyr",["SE"]:"Seraph",["SH"]:"Shaman",["SS"]:"Shapeshifter",["SK"]:"Skeleton",["SN"]:"Snake",["SP"]:"Spider",["ST"]:"Spirit",["TG"]:"Tigrin",["TK"]:"Tuskin",["VP"]:"Vampire",["WD"]:"Wanderer",["WT"]:"Water",["WB"]:"Web",["WN"]:"Wind",["WF"]:"Wolf",["WR"]:"Wurm",["YT"]:"Yeti",["ZB"]:"Zombie"};tribeText(t){return this.tribeT[t]}}const y=new Ya;class Ka{sneak(){ut.playmatSetup(),Z.init()}handleMainMenuButton(t){t.param==="D"?(gt.setMode("D"),S.options.wasDrafting=!0,this.sneak(),At.initDraft()):t.param==="C"?(gt.setMode("C"),S.options.wasDrafting=!1,this.sneak(),$t.initConstructed()):t.param==="I"?(gt.setMode("I"),ut.drawAll()):window.open("deckbuilder.html")}handleMenuButton(t){const i=S.deTil(t.param),r=i[0];let n=!0;if(r==="RP")n=!1,y.clearAll(),S.options.wasDrafting?At.replay():$t.replay();else if(r==="MM")gt.setMode("M"),y.clearAll();else if(r==="CN"||r==="CP"||r==="CX"||r==="CR"||r==="CI"||r==="CV"||r==="LK")n=!1,$t.handleMenuPick(r,i[1]);else if(r==="DN"||r==="DR"||r==="DI"||r==="DV"||r==="LD"||r==="GP"||r==="OD"||r==="DT")n=!1,At.handleMenuPick(r,i[1]);else if(r==="alloyin"||r==="nekrium"||r==="tempys"||r==="uterra"||r==="vanilla")S.options.playmat=r,S.writeStorage("playmat",r);else if(r==="AN"||r==="HH"||r==="CH"||r==="BB"||r==="BC")S.togOptViaPram(r);else if(r==="90"){const c=S.options.scale==="90"?"100":"90";ut.changeScale(c)}else r==="RU"?(n=!1,this.halp()):r==="FQ"?(n=!1,window.open("https://grousewood-games.github.io/solforge/docs/faq")):r==="SB"?(n=!1,window.open("https://stoneblade.com/")):r==="GW"?(n=!1,window.open("https://github.com/grousewood-games")):r==="VR"?(n=!1,window.open("https://github.com/grousewood-games/solforge/releases/tag/"+S.ver)):(n=!1,console.error("missing handler for menu button param "+t.param));n&&ut.drawAll()}handleUIButton(t){t.param==="DM"?(S.setClickMode("I"),ut.dirtyA=!0,ut.drawAll()):t.param==="TM"?(S.setClickMode("T"),ut.dirtyA=!0,ut.drawAll()):t.param==="EX"?(gt.setMode("X"),T.ddf5(this.generateExitActions())):t.param==="HL"?this.halp():console.error("missing handler for common button param "+t.param)}generateExitActions(){const t=b.basicAction("CANC");return t.param="PM",[t,b.menuButtonAction("MM")]}halp(){window.open("https://grousewood-games.github.io/solforge/docs/rules")}}const Ti=new Ka;class Xa{stack=["M"];setMode(t){this.deetMode(t)||t==="X"||t==="S"?this.stack.push(t):(this.stack=[t],t==="G"?(lt.get("game-ui").clear(),ut.setBackground("playmat")):t==="D"||t==="C"||t==="I"?(lt.get("game-ui").clear(),ut.setBackground("blueface")):t==="M"&&(ut.clearAll(),ut.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==="R"||t==="T"}}const gt=new Xa;class qa{constructor(){this.loader=document.getElementById("fileupload"),this.loader.addEventListener("change",t=>this.loadInputHandler(t))}shuffleDeck(t){const i=k.toPlayer(t),r=[],n=[];if(i.deck.forEach(c=>{W.getCard(c).consistent?r.push(c):n.push(c)}),r.length===0)this.shuffle(i.deck);else{this.shuffle(n);const c=20-r.length,f=r.concat(n.slice(0,c));this.shuffle(f),i.deck=n.slice(c).concat(f)}}shuffle(t){const i=t.length,r=(n,c)=>{const f=t[n];t[n]=t[c],t[c]=f};if(i>0){let n,c;const f=i*4;for(let m=0;mr.decks).flat(),i=S.randInt(0,t.length);return t[i]}stockDeckByName(t,i){let r;if(He.some(n=>n.id===t?n.decks.some(c=>c.name===i?(r=c,!0):!1):!1),r)return r;throw new Error("Stock Deck not found: Set: "+t+"; Name: "+i)}stockDeckByPram(t){const i=S.deTil(t);return this.stockDeckByName(i[0],i[1])}bucketHunter(t){let i="";return He.some(r=>r.decks.some(n=>n.name===t?(i=r.name,!0):!1)),i||"???"}ripper(t,i,r){const n=[[15,8,5],[30,15,10]],c=this.getDeckCards([],[t]),f=[],m=n[r===15?0:1][i-1];for(;f.lengthG===B)||f.push(B)}const C=f.map(D=>({card:D,num:i}));return i===2&&r===15&&(C[0].num=1),C}deckify(t){const i=t.map(r=>{const n=Di.find(c=>c[0]===r);return n?n[1]:[]}).flat();return t.concat(i).map(r=>`${r}1`)}parseDeck(t){const i=t.map(r=>Array(r.num).fill(r.card)).flat();return this.deckify(i)}validDeck(t){const i={};t.forEach(D=>{i[D.card]?i[D.card]+=D.num:i[D.card]=D.num});const r=Object.entries(i).map(D=>({card:D[0],num:D[1]})),n=r.map(D=>D.num).reduce((D,B)=>D+B,0);if(n!==30)return"Deck must have 30 cards, found "+n;const c=[];let f="";if(r.some(D=>{const B=ee.findIndex(G=>G.c===D.card);return B===-1?(f=D.card,!0):(c.push(ee[B].f),!1)}))return`Invalid card code: '${f}'`;let m=0;if(r.some(D=>D.num>3?(f=D.card,m=D.num,!0):!1))return`${m} copies of '${f}' ${y.fastName(f).slice(0,-2)}`;const C=[...new Set(c)];return C.length>2?"Deck must have two or less factions, found: "+C.join():""}getDeckCards(t=[],i=[],r=[]){return t.length===0&&i.length===0&&r.length===0?ee.map(n=>n.c):t.length>0&&i.length>0&&r.length===0?ee.filter(n=>t.includes(n.r)&&i.includes(n.f)).map(n=>n.c):t.length>0&&i.length===0&&r.length===0?ee.filter(n=>t.includes(n.r)).map(n=>n.c):t.length===0&&i.length>0&&r.length===0?ee.filter(n=>i.includes(n.f)).map(n=>n.c):t.length>0&&i.length>0&&r.length>0?ee.filter(n=>t.includes(n.r)&&i.includes(n.f)&&r.includes(Math.floor(n.s))).map(n=>n.c):t.length>0&&i.length===0&&r.length>0?ee.filter(n=>t.includes(n.r)&&r.includes(Math.floor(n.s))).map(n=>n.c):t.length===0&&i.length>0&&r.length>0?ee.filter(n=>i.includes(n.f)&&r.includes(Math.floor(n.s))).map(n=>n.c):ee.filter(n=>r.includes(Math.floor(n.s))).map(n=>n.c)}getCardFaction(t){const i=ee.find(r=>r.c===t);return i?i.f:"X"}getCardRarity(t){const i=ee.find(r=>r.c===t);return i?i.r:"T"}cardStats(){je.forEach(t=>{const i=`${y.factionText(t)} total: ${this.getDeckCards(void 0,[t]).length}; `,r=Re.map(n=>`${y.rarityText(n)}: ${this.getDeckCards([n],[t]).length}`).join("; ");console.log(i+r)})}loadPromise=new Ne;fileguts="";loader;async loadFromFile(){if(this.loadPromise=new Ne,this.loader.click(),await this.loadPromise.getPromise(),this.fileguts==="")return"";if(this.fileguts.startsWith("!")){const n=this.fileguts.substring(1);return this.fileguts="",n}const t=JSON.parse(this.fileguts);this.fileguts="";const i=t.cards,r=this.validDeck(i);return r||t}readError(t){this.fileguts="!"+t,this.loadPromise.resolveMe()}loadInputHandler(t){const i=this.loader.files;if(i&&i.length>0){const n=i[0];var r=new FileReader;r.onload=c=>{try{var f=r.result;if(f){var m=JSON.parse(new TextDecoder("utf-8").decode(new Uint8Array(f)));m.cards&&Array.isArray(m.cards)&&!m.cards.some(C=>!(C&&typeof C.card=="string"&&Number.isInteger(C.num)))?(this.fileguts=JSON.stringify(m),this.loadPromise.resolveMe()):this.readError("File format is invalid.")}else this.readError("File read was empty.")}catch(C){console.error(C),this.readError("Error reading file.")}};try{r.readAsArrayBuffer(n)}catch{this.readError("Could not read file.")}}else this.loadPromise.resolveMe()}}const Ot=new qa;class ja{phase="ST";enterMainPhase(){this.phase="MN";const t=k.getActive(),i=this.getMainPhaseActions(t);E.aiActive&&nt.hitMainPhase(),T.ddf5(i,!0)}async whatNext(t=!1){if(E.winFlag!==0){nt.simOn?(nt.simEndpoint(E.winFlag===1?"L":"W"),E.winFlag=0):(T.actionHistory=[],E.aiActive=!1,await ut.drawAll());return}if(await ut.drawAll(),T.actionHistory.length>0)T.ddf5();else if(t)gt.setMode("S"),ut.drawAll();else if(x.getNextTrigger())vi.resolve(x.getNextTrigger());else if(!x.deathCheck)Bt.deathCheck(),this.whatNext();else if(x.events.length>0)x.startBatch();else switch(p.purge(),Bt.purge(),this.phase){case "MN":this.enterMainPhase();break;case "ET":this.phase="PT",x.addEvents(I.player("PTN",k.activeA)),Qt.expireMods(),this.whatNext();break;case "PT":L.passTheTurn();break;case "WT":console.error("Hit unhandled waiting phase"),this.phase="MN",this.whatNext();break;case "ST":if(nt.simOn)nt.simEndpoint("T");else{const i=k.getInactive();i.triggers=i.triggers.filter(c=>c.type!=="NT"),this.phase="MN";const n=nt.cheater()?500:100;S.sleep(n).then(()=>this.whatNext())}break}}expireatron(t,i,r,n){i.mods.forEach(c=>{c.expiry===n?c.expiry=r:c.expiry===r&&t.push([i,c])})}expireMods(){const t=p.creatByTarget(b.crTarg());t.push(k.playerA,k.playerB);let i=[];this.phase==="PT"?t.forEach(r=>{this.expireatron(i,r,"ET","EN")}):this.phase==="ST"&&t.forEach(r=>{this.expireatron(i,r,"ST","SN")}),i.length>0&&(p.dirt(),Ct.dirty=!0,i.forEach(r=>{const n=r[0];n instanceof Qe?n.expireMod(r[1]):k.expireMod(n,r[1])}),Be.enforceAllNonPositionCreatureEffects())}getMainPhaseActions(t){const i=this.getHandActions(t),r=this.getFieldActions(t);let n=L.mainBattle;if(n||(n=p.ddf1().some(c=>c.extraBattles>0&&c.isActive&&!c.defender)),n)i.push({key:"FITE",zone:"B",param:L.mainBattle?"M":"",host:""});else{const c=i.length===0&&r.length===0?"":"DIO";i.push({key:"ENDT",zone:"B",param:c,host:""})}return i.concat(r)}getHandActions(t){const i=[...new Set(t.hand)],r=[],n=[],c=[],f=[];i.forEach(B=>{const G=W.getCard(B);G.free?r.push(B):n.push(B),G.canLevel()&&c.push(B),G.canPlay()&&f.push(B)});const m=r.map(B=>[B,"FREE"]);L.freeCards.forEach(B=>{w.cardByTarget(n,B.condition).forEach(R=>{m.push([R[0],B.id]),n.splice(n.indexOf(R[0]),1)})}),m.push(...n.map(B=>[B,""]));const C=L.regularPlays>0;let D=t.hand.map((B,G)=>[B,G]);return C||(D=D.filter(B=>!n.includes(B[0]))),D.map(B=>{const G=m.find(_=>_[0]===B[0]),R=c.includes(B[0]),X=f.includes(B[0]);if(G[1]&&!X&&!C||!X&&!R)return;const V=b.handSelectAction("HPLY",B[0],G[1],B[1]);return V.canPlay=X,V.lvlOnly=R&&!X,V}).filter(Boolean)}getFieldActions(t){const i=p.qPlayerCreats(t.isPlayerA),r=i.filter(c=>p.canMove(c).length>0).map(c=>{const f=b.fieldSelectAction("MOVE",c.lane,c.owner);return f.host=c.code,f}),n=i.filter(c=>c.isActive&&c.activationAvailable?W.getCard(c.code).canActivate(c):!1).map(c=>{const f=b.fieldSelectAction("ACTV",c.lane,c.owner);return f.host=c.code,f.param=c.id,f});return r.forEach(c=>{const f=n.findIndex(m=>m.lane===c.lane);f>-1&&(n.splice(f,1),c.param="ACTV")}),r.concat(n)}}const Qt=new ja;class Qa{playerA;playerB;activeA;isLocalA;constructor(){this.playerA=this.newPlayer(!0),this.playerB=this.newPlayer(!1),this.activeA=!0,this.isLocalA=!0}getPlayerState(t){return{deck:t.deck,discard:t.discard,hand:t.hand,health:t.health,triggers:t.triggers,turn:t.turn,rank:t.rank,poison:t.poison,armor:t.armor,armorDmg:t.armorDmg,mods:t.mods,effects:t.effects}}setPlayerState(t,i){i.deck=t.deck,i.discard=t.discard,i.hand=t.hand,i.health=t.health,i.triggers=t.triggers,i.turn=t.turn,i.rank=t.rank,i.poison=t.poison,i.mods=t.mods,i.effects=t.effects,i.armor=t.armor,i.armorDmg=t.armorDmg}getState(){const t={pA:this.getPlayerState(this.playerA),pB:this.getPlayerState(this.playerB),actP:this.activeA};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.setPlayerState(i.pA,this.playerA),this.setPlayerState(i.pB,this.playerB),this.activeA=i.actP}pt2pb={["X"]:()=>{throw new Error("goof passed any to player target boolean-o-fier")},["A"]:()=>!0,["B"]:()=>!1,["F"]:()=>this.activeA,["E"]:()=>!this.activeA};b2p(t){return t?this.playerA:this.playerB}toPlayer(t){return typeof t=="boolean"?this.b2p(t):typeof t=="string"?this.b2p(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"}getActive(){return this.b2p(this.activeA)}getInactive(){return this.b2p(!this.activeA)}getLocal(){return this.b2p(this.isLocalA)}makeAnim(t){const i=this.toPlayer(t),r=this.totalArmor(i);return[Math.max(r-i.armorDmg,0),!1,!1]}hurtPlayer(t,i){if(i<1)return 0;const r=this.totalArmor(t),n=Math.max(Math.min(i,r-t.armorDmg),0);let c=i-n;return t.armorDmg+=n,t.health-=c,c}hurtDirect(t,i,r){const n=this.toPlayer(t),c=this.hurtPlayer(n,i);return c>0&&(Ct.dirty=!0,y.lawg(r,` dealt ${c} dmg to `,n,"."),x.addEvents(I.damage(!1,c,n.health,!1,!1,n.isPlayerA,void 0)),Be.playerHealthChange()),c}hurtBattle(t,i,r){const n=this.toPlayer(t),c=this.hurtPlayer(n,i);c>0&&(Ct.dirty=!0,y.lawg(r.code,` dealt ${c} battle dmg to `,n,"."),x.addEvents(I.damage(!0,c,n.health,!0,!1,n.isPlayerA,r)))}heal(t,i,r){const n=this.toPlayer(t);n.health+=i,Ct.dirty=!0,y.lawg(n,` gained ${i} health from `,r,"."),x.addEvents(I.playerHeal(n.isPlayerA,i)),Be.playerHealthChange()}drawCard(t,i){const r=this.toPlayer(t);let n=!0;for(let c=0;c{parseInt(D.slice(3,4))>r.rank?C.push(D):m.push(D)}),m.length>0&&(r.deck=m,r.discard=C,Ot.shuffle(r.deck),Dt.addCard(r,r.deck.pop()))}}r.isPlayerA===this.isLocalA&&(Ct.dirty=!0)}addPoison(t,i){const r=this.toPlayer(t);r.poison+=i,Ct.dirty=!0}totalArmor(t){const i=this.toPlayer(t);return this.modBool(i,"NA")?0:i.armor+this.modSum(i,"AR")}totalPoison(t){const i=this.toPlayer(t);return i.poison+this.modSum(i,"PN")}modSum(t,i){const r=this.toPlayer(t);return b.modSum(r.mods,i)}modBool(t,i){const r=this.toPlayer(t);return b.modBool(r.mods,i)}hasMod(t,i){const r=this.toPlayer(t);return b.hasModG(r.mods,i)}addMod(t,i){this.toPlayer(t).mods.push(i),Ct.dirty=!0}addModSafe(t,i){const r=this.toPlayer(t);b.hasMod(r.mods,i)||this.addMod(r,i)}removeMod(t,i){const r=this.toPlayer(t);r.mods=r.mods.filter(n=>n.granter===i?(n.type==="AR"&&(r.armorDmg=Math.max(0,r.armorDmg-n.value)),Ct.dirty=!0,!1):!0)}removeModSafe(t,i){const r=this.toPlayer(t);this.hasMod(r,i)&&this.removeMod(r,i)}expireMod(t,i){const r=this.toPlayer(t);r.mods.splice(b.modIdx(r.mods,i),1),Ct.dirty=!0}addTr(t,i){this.toPlayer(t).triggers.push(i),Ct.dirty=!0}enforceEffects(t){const i=this.toPlayer(t);i.effects.forEach(r=>W.getCard(r.logicCode).enforcePlayerEffect(r,i))}activeCardItems(t){const i=this.toPlayer(t),r=i.triggers.filter(c=>!(c.customCode==="AB"||c.type==="NT")).map(c=>c.logicCode.startsWith("EPH")?c.customCode:c.logicCode),n=i.effects.map(c=>c.logicCode);return r.concat(n)}newPlayer(t){return{hand:[],deck:[],discard:[],effects:[],isPlayerA:t,health:120,mods:[],name:"",nameOffset:0,triggers:[],turn:1,rank:1,armor:0,armorDmg:0,poison:0,avatar:Math.floor(Math.random()*17)}}initPlayer(t,i,r,n){const c=this.toPlayer(t);c.name=r,c.nameOffset=n,c.turn=1,c.rank=1,c.health=S.options.highHealth?360:120,c.discard=[],c.deck=Ot.parseDeck(i),c.mods=[],c.triggers=[],c.effects=[],c.poison=0,c.armor=0,c.armorDmg=0,this.ambushScan(c),Ot.shuffleDeck(c),c.hand=c.deck.splice(-5,5)}ambushScan(t){this.boosh(t,"LLD","PC"),this.boosh(t,"LLG","MV"),this.boosh(t,"LLS","EF"),this.boosh(t,"LLT","LG"),this.boosh(t,"LLV","DS")}boosh(t,i,r){const n=i+"1";if(t.deck.includes(n)){const c=b.trigger(r,n);c.customCode="AB",t.triggers.push(c)}}nameOSaurus(){const t=[["The Garmgunt",5],["Dr. Lucksack",15],["Sgt. Misplay",22],["Salty O'Teary",12],["M.V.P. Sprout",19],["Uncle Punchy",7],["Yesetherian",20],["Rubbish Asir",20],["Hogwash Druid",0],["Offal Savant",15],["Filth Knight",17],["Dirty Mystic",16],["Ether Buffoon",6],["Nexus Dimwit",12],["Hairy Poppins",11],["Al E. Gator",26],["Anita Bath",28],["Bennie Factor",9],["Chris P. Bacon",9],["Don Keigh",29],["Earl E. Bird",25],["Hugh Jass",34],["Jay Walker",28],["Barb Dwyer",22],["Robyn Banks",18],["Anna Graham",9],["Holly Graham",6],["Justin Case",26],["Sir Loins",39]],i=t[S.randInt(0,t.length)];return[i[0],i[1]+18]}}const k=new Qa;class Ja{stateStack=[];popCheck(){if(this.stateStack.length===0)throw new Error("Attempted to manipulate empty stack")}saveState(){const t={action:T.getState(),aiInPhase:nt.inPhase,batch:x.getState(),death:Bt.getState(),field:p.getState(),game:E.getState(),mode:JSON.stringify(gt.stack),phase:Qt.phase,player:k.getState(),turn:L.getState()};this.stateStack.push(t)}restoreState(){this.popCheck();const t=this.stateStack[this.stateStack.length-1];T.setState(t.action),nt.inPhase=t.aiInPhase,x.setState(t.batch),Bt.setState(t.death),p.setState(t.field),E.setState(t.game.i,t.game.t),gt.stack=JSON.parse(t.mode),Qt.phase=t.phase,k.setState(t.player),L.setState(t.turn)}popState(){this.popCheck(),this.stateStack.pop()}}const We=new Ja;class _a{toActions(t){return(Array.isArray(t)?t:[t]).map(r=>{const n=this.actionTargGuts(r);return n.forEach(c=>{c.host=r.host,c.param=r.param,c.hint=r.hint}),n}).flat()}actionTargGuts(t){if(t.target==="TH")return this.deckByTarget(t).map(i=>b.handSelectAction(t.key,i[0],"",i[1]));if(t.target==="TF"){if(t.field==="O")return p.creatByTarget(t).map(i=>b.fieldSelectAction(t.key,i.lane,i.owner));{const i=t.player==="X"?[!0,!1]:[k.toBool(t.player)],r=S.isUn(t.lanes)?p.laneIdx:this.lanesToArr(t.lanes);if(t.field==="A")return i.map(n=>r.map(c=>b.fieldSelectAction(t.key,c,n))).flat();if(t.field==="E")return i.map(n=>p.emptyLanes(n).filter(c=>r.includes(c)).map(c=>b.fieldSelectAction(t.key,c,n))).flat()}}if(t.target==="TP")return t.player==="X"?[b.playerSelectAction(t.key,!0),b.playerSelectAction(t.key,!1)]:[b.playerSelectAction(t.key,k.toBool(t.player))];if(t.target==="TB")return[{key:t.key,zone:"B",host:t.host,param:""}];if(t.target==="TR")return[{key:t.key,zone:"R",host:t.host,param:""}];if(t.target==="TD")return[];throw new Error("Target encountered that doesnt have mappings to actions: "+t.target)}cardByTarget(t,i){let r=t.map((n,c)=>[n,c]);if(i){if(S.isUn(i.deckPositionSkip)||(r=r.filter(n=>n[1]!==i.deckPositionSkip)),i.faction!=="X"&&(r=r.filter(n=>W.getCard(n[0]).faction===i.faction)),i.tribe!=="AN"&&(r=r.filter(n=>{const c=W.getCard(n[0]);return c.type==="C"?c.isTribe(i.tribe):!1})),i.canLevel&&(r=r.filter(n=>W.getCard(n[0]).canLevel())),i.level!=="LA"){const n=w.levelTargetToLevel(i.level);r=r.filter(c=>{const f=parseInt(c[0].substring(3,4));return n.includes(f)})}if(i.card!=="A"){const n=i.card==="C"?"C":"S";r=r.filter(c=>W.getCard(c[0]).type===n),i.card==="C"&&!S.isUn(i.maxAttack)&&(r=r.filter(c=>W.getCard(c[0]).iAttack<=i.maxAttack))}i.cardCode&&(r=r.filter(n=>W.getCard(n[0]).cardCode()===i.cardCode))}return r}deckByTarget(t){const i=k.toPlayer(t.player);let r;if(t.target==="TH")r=i.hand;else if(t.target==="TD")r=i.discard;else if(t.target==="DK")r=i.deck;else throw new Error("bad target passed to deckByTarget: "+t.target);return this.cardByTarget(r,t)}buttonTarget(t,i="",r=""){return b.actionTarget("TB",t,i,r)}boardTarget(t,i){return b.actionTarget("TR",t,i,"")}ddf2(t){return t===1?"L1":t===2?"LN":"LA"}lt2l={["LA"]:()=>[1,2,3,4],["HR"]:()=>[1,2,3],["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]}}const w=new _a;class tn{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==="FM"?this.formationTriggerTest(t):t.trigger.type==="RD"?this.raidTriggerTest(t):t.trigger.type==="DM"&&t.event.code==="DMG"||t.trigger.type==="HG"&&t.event.code==="CHL"||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.trigger.interactive&&(t.host==="P"?console.error("Encountered player hosted trigger that is interactive!!"):x.iaTrigLane=p.creatByTr(t).lane),W.getCard(t.trigger.logicCode).jr8(t)}forgeTriggerTest(t,i){if(t.event.code==="ENT"&&t.event.forged){const r=p.creatByTr(t),n=r.id===t.event.creatId&&r.status==="A";return i&&n?!r.opposed:n}return!1}formationTriggerTest(t){if(t.event.code==="ENT"&&t.event.formation){const i=p.creatByTr(t);return i.id===t.event.creatId&&i.status==="A"}return!1}raidTriggerTest(t){if(t.event.code==="TRE"&&L.ffs>2){const i=p.creatByTr(t);return i.owner===t.event.playerA&&i.status==="A"}return!1}upgradeTriggerTest(t){if(t.event.code==="RPL"){const i=p.searchById(t.creatId);if(i)return i.id===t.event.creatId;console.warn("Upgrade trigger test could not find its creature",t)}return!1}vengeanceTriggerTest(t){if(t.event.code==="DIE"){const i=t.event,r=p.searchById(t.creatId);if(r)return r.status==="D"&&r.id===i.creatId;console.warn("Venegeance trigger test could not find its creature",t)}return!1}flankTriggerTest(t){if(t.event.code==="MOV"){const i=t.event,r=p.creatByTr(t);return r.status==="A"&&r.id===i.creatId}return!1}generalTriggerTest(t){return W.getCard(t.trigger.logicCode).ddf8(t)}}const vi=new tn;class en{firstTurn=!0;mainBattle=!0;deathsA=[];deathsB=[];ffs=0;regularPlays=2;cardsPlayed=0;freeCards=[];newPre=[];newPost=[];getState(){const t={mB:this.mainBattle,dA:this.deathsA,dB:this.deathsB,cP:this.cardsPlayed,ffs:this.ffs,fC:this.freeCards,rP:this.regularPlays,n1:this.newPre,n2:this.newPost};return JSON.stringify(t)}setState(t){const i=JSON.parse(t);this.mainBattle=i.mB,this.deathsA=i.dA,this.deathsB=i.dB,this.cardsPlayed=i.cP,this.ffs=i.ffs,this.freeCards=i.fC,this.regularPlays=i.rP,this.newPre=i.n1,this.newPost=i.n2}resetTurnData(){this.mainBattle=!0,this.deathsA=[],this.deathsB=[],this.ffs=0,this.regularPlays=2,this.cardsPlayed=0,this.freeCards=[],this.newPre=[],this.newPost=[],this.firstTurn&&(this.firstTurn=!1,this.regularPlays=1)}forgeCard(t,i,r,n){const c=this.cardPlayed(i,r,n),f=k.getActive();y.lawg("Forged ",c.code,"."),p.birth(c,"F",f.isPlayerA,t.lane,"X"),T.actionDone()}levelAndDiscardA(t){return this.levelAndDiscard(t.card,t.position)}levelAndDiscard(t,i,r=!0,n="F"){const c=W.getCard(t),f=k.toPlayer(n);let m=!1;if(!c.overload){const C=c.levelUpCard();f.discard.push(C),C!==t&&(m=!0)}return i>-1?Dt.cardPlayOrLevel(f,i,m,c.overload):y.debug("Bad play index: "+i+" ("+t+")"),f.isPlayerA===k.isLocalA&&(Ct.dirty=!0),r&&m&&y.lawg(f," leveled a card."),c}cardPlayed(t,i,r,n=!1){const c=this.levelAndDiscard(t,r,n),f=k.getActive();if(i==="")this.regularPlays-=1;else if(i!=="FREE"){const m=this.freeCards.findIndex(C=>C.id===i);m>-1?this.freeCards.splice(m,1):console.error("Could not find free card rule!")}if(this.cardsPlayed+=1,!n){const m=I.playCard(t,f.isPlayerA);x.addEvents(m)}return c}passTheTurn(){if(k.activeA=!k.activeA,Qt.phase="WT",E.aiMode){if(nt.simOff)if(E.aiActive=!E.aiActive,E.aiActive)nt.turnSims=0,nt.turnTime=0;else{const t=`🤖: ${this.calma(nt.turnSims)} pontifications in ${(nt.turnTime/1e3).toFixed(1)} seconds.`;y.lawg(t)}}else k.isLocalA=k.activeA,Dt.genState(k.getLocal()),se.dirty=!0;this.startTurn()}calma(t){let i=t.toString();return i.length<4?i:i.length>6?i.slice(0,-6)+","+i.slice(-6,-3)+","+i.slice(-3):i.slice(0,-3)+","+i.slice(-3)}startTurn(){const t="------";nt.log&&E.aiActive&&E.aiMode&&console.log(t+" AI Turn Start "+t),nt.simOff&&(y.lawg(t),y.lawg(k.activeA," starts turn.")),this.resetTurnData(),Qt.phase="ST",x.addEvents(I.player("TRS",k.activeA)),Qt.expireMods(),Ct.dirty=!0,Qt.whatNext(!E.aiMode)}endTurn(){const t=k.getActive();Dt.cardDiscardAll(t),t.turn++;const i=t.turn>4;x.addEvents(I.player("TRE",t.isPlayerA)),i&&(t.turn=1,t.rank++,y.lawg(t," hits Rank "+t.rank+"."),Z.addRankup(t.isPlayerA),x.addEvents(I.player("RKU",t.isPlayerA)),t.deck=t.deck.concat(t.discard),t.discard=[],Ot.shuffleDeck(t)),p.qActiveCreats().forEach(r=>{r.extraBattles=0}),k.drawCard(t,5),Qt.phase="ET",Ct.dirty=!0,T.actionDone()}mobility(t){const i=p.jr5(t.param);y.lawg(i.code," moved."),i.mobilityAvailable=!1,i.move(t.lane,"X"),T.actionDone()}allied(t,i){const r=i??k.getActive(),n=b.target("TH");return n.player=k.toTarget(r),n.faction=t,w.deckByTarget(n).length>0}patron(t){const i=b.target("TH");return i.player=k.toTarget(k.getActive()),i.faction=t,w.deckByTarget(i).length>2}freeCard(t){const i=b.freeCard(t);return this.freeCards.push(i),this.lpd(),i}freePlay(t=1){this.regularPlays+=t,this.lpd()}birthRegistrar(t){this.mainBattle?this.newPre.push(t):this.newPost.push(t)}lpd(){k.activeA===k.isLocalA&&(Ct.dirty=!0)}}const L=new en;class Si{id;dom;context;width;height;constructor(){this.id="",this.width=0,this.height=0}show(){}hide(){}get visible(){return!1}clear(){this.context.clearRect(0,0,this.width,this.height)}sprite(t,i,r){this.context.drawImage(t,i,r)}updateScale(t){this.context.scale(t,t)}writeHC(t,i,r){this.context.drawImage(t.dom,i,r)}}class rn extends Si{constructor(t){if(super(),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}}class Wi extends Si{constructor(t,i){super(),this.dom=new OffscreenCanvas(t,i),this.context=this.dom.getContext("2d"),this.width=t,this.height=i}}class Jt{getCanv(t){return t instanceof Si?t:lt.get(t)}init(){}dirty=!0;async drawSprite(t,i,r,n,c={}){const f=this.getCanv(t).context,m=await S.getSprite(S.imgRoot+i);let C=1;c&&(C=c.alpha??1),C<1&&(f.globalAlpha=C),f.drawImage(m,r,n),C<1&&(f.globalAlpha=1)}drawHC(t,i,r,n){t.context.drawImage(i.dom,r,n)}async drawText(t,i,r,n,c={}){const f=this.getCanv(t).context,m=c.fontSize??24;S.pxRatio===2&&(n=this.retinaTextY(n,m)),f.fillStyle=c.colour||"#000000",f.font=`${m}px ${c.fontName||"cinzel"}`,f.shadowColor=c.shadow?"#000000":"#00000000",f.fillText(i,r,n),f.shadowColor="#00000000"}async spriteNumber(t,i,r,n,c,f){let m=r-this.numOffset(i,c);const C=[];i.toString().split("").forEach(D=>{C.push(this.drawSprite(t,this.numSpriteUrl(D,c,f),m,n)),m+=this.numSize(D,c)}),await Promise.all(C)}glowColour(t){const i=t.key;return i==="MOVE"||i==="ACTV"?"green":i==="CANC"?"red":i==="CARD"?"yellow":"blue"}drawRarity(t,i,r,n){return this.drawSprite(t,`icons/rarity/new/${y.rarityText(i).toLowerCase()}.png`,r,n)}drawFaction(t,i,r,n){const c=i==="T"?2:0;return this.drawSprite(t,`icons/faction/${y.factionText(i).toLowerCase()}.png`,r+c,n+3)}makeHaze(t,i=!0){t.context.fillStyle="#222222d8",t.context.fillRect(0,0,i?849:S.gameWidth,S.gameHeight)}cBlu="#03fcfc";cYella="#f5f242";retinaTextY(t,i){let r;return i<21?r=6:i<27?r=7:r=8,t-r}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 r=t.toString().split("").reduce((n,c)=>n+this.numSize(c,i),0)-(i==="B"?2:1);return Math.floor(r/2)}numSpriteUrl(t,i,r){return`text/nums/${i}/${r}/${t}.png`}}class sn extends Jt{async drawButton(t,i,r,n,c,f=7,m=!1,C=!0){let D,B;m?(D="ui/button/menu_on.png",B="#d7fc03"):(D="ui/button/menu_off.png",B="#00DEF7");const G=this.buttonBounds(i,r);await this.drawSprite(t,D,G[0],G[1]),await this.drawText(t,c,G[0]+7+f,G[1]+24,{colour:B,fontSize:30}),(!m||C)&&it.add(ht.fromArr(n,G,at.Both))}async buttonMaker(t,i,r,n,c,f=7,m=!1,C=!0){const D=b.basicAction("MNBT");D.param=n,await this.drawButton(t,i,r,D,c,f,m,C)}buttonBounds(t,i){return[t-7,i-7,232,69]}}const ot=new sn;class an extends Jt{async makeIconButton(t,i,r,n){let f;f=`ui/button/ui_${n}.png`,await this.drawSprite(t,f,i,r);const m=b.basicAction("UIBT");m.param=n;const C=new ht(m,i,r,40,40,at.Both);it.add(C)}async makeVScroller(t,i,r,n,c){const f={zone:"N",key:c,host:"",param:n?"U":"D"};await this.makeScroller(t,i,r,n?"up":"down",f)}async makeScroller(t,i,r,n,c){await this.drawFactionButton(t,i,r,"A"),await this.drawSprite(t,`ui/arrow/${n}.png`,i+30,r+14);const f=this.makeFactButtonClick(i,r,c);it.add(f)}makeFactButtonClick(t,i,r){return new ht(r,t,i,...this.factionButtonBounds(),at.Both)}async drawFactionButton(t,i,r,n){await this.drawSprite(t,`ui/button/faction_${n}.png`,i,r)}factionButtonBounds(){return[77,44]}}const re=new an;class nn extends Jt{async drawActions(t){if(gt.baseMode==="G"){const i=lt.get("hilite"),r=t.filter(n=>n.zone==="B");if(r.length>1&&console.error("Two button actions encountered in one batch",r),r.length===0||E.aiActive||S.clickMode==="I"&&!gt.isDetailMode){const n=this.buttonBounds();await this.drawSprite(i,"ui/button/off.png",n[0],n[1])}else{const n=r[0],c=this.buttonBounds(),f=n.key==="CARD"?n.param:n.key,m=this.buttonHilite(f,n.param);await this.drawSprite(i,`ui/button/on_${m}.png`,c[0]-5,c[1]-5),await this.drawSprite(i,"ui/button/on.png",c[0],c[1]),await this.drawSprite(i,`text/butt/${f}.png`,c[0]+23,c[1]+18);const C=this.highlightBounds(),D=ht.fromArr(n,C);n.key==="CNCL"&&(D.mouse=at.Both),it.add(D)}}}buttonBounds(){return[856,406,160,63]}buttonHilite(t,i){return t==="FITE"||t==="ENDT"&&i===""?"blue":t==="ENDT"&&i==="DIO"||t==="CANC"||t==="CNCL"?"red":"yellow"}highlightBounds(){return[851,401,170,73]}}const $e=new nn;class on extends Jt{async drawCard(t,i,r,n){const c=this.getCanv(i),f=this.extractStats(t),m=f.cardClass;if(await this.drawSprite(c,m.image(!1),r+14,n+35),await this.drawSprite(c,this.frameImg(m.level,m.faction,m.type,!1),r,n),await this.drawSprite(c,`text/card/${m.cardCode()}.png`,r+12,n+16),f.isCreature){const C=n+178;await this.spriteNumber(c,f.att,r+24,C,"S","Y"),await this.spriteNumber(c,f.hlt,r+127,C,"S","Y")}if(f.sleeping&&await this.drawSprite(c,"icons/effects/defensive.png",r+5,n+40,{alpha:.7}),f.iconList.length>0){const C=r+57-17*(f.iconList.length-1);await Promise.all(f.iconList.map(async(D,B)=>this.drawIcon(c,C+B*35,n+140,D[0],D[1])))}}async drawBigCard(t,i,r,n){const c=this.extractStats(i);if(await this.drawSprite(t,i.image(!0),r+(c.isCreature?38:35),n+117),await this.drawSprite(t,this.frameImg(i.level,i.faction,i.type,!0),r,n),i.rarity!=="T"&&await this.drawRarity(t,i.rarity,r+309,n+394),c.isCreature){const f=n+555;await this.spriteNumber(t,c.att,r+44,f,"B","Y"),await this.spriteNumber(t,c.hlt,r+325,f,"B","Y")}}async drawIcon(t,i,r,n,c=0){const f=this.getCanv(t);if(await this.drawSprite(f,`icons/effects/${n}.png`,i,r),c>0){const m=n==="poison"?12:9;await this.spriteNumber(f,c,i+17,r+m,"S","B")}}extractStats(t){let i,r=!1,n=0,c=0,f=!1,m=0,C=!1,D=!1,B=!1,G=!1,R=0,X=0,V=0,_=!1,q=!1;if(!(t instanceof Wt))r=!0,n=t.attack,c=t.health,f=t.sleeping&&!t.aggressive,m=t.regen,C=t.breakthrough,D=t.defender,B=t.aggressive,R=t.armor,X=t.poison,V=t.mobility,G=t.changed,i=W.getCard(t.code);else{if(t.type==="C"){r=!0;const Mt=t;n=Mt.iAttack,c=Mt.iHealth,m=Mt.iRegen,C=Mt.iBT,D=Mt.iDefend,B=Mt.iAggro,R=Mt.iArmor,V=Mt.iMobile}_=t.overload,q=t.consistent,i=t}const pt=[];return _&&pt.push(["overload",0]),q&&pt.push(["consistent",0]),m>0&&pt.push(["regenerate",m]),C&&pt.push(["breakthrough",0]),D&&pt.push(["defender",0]),B&&pt.push(["aggressive",0]),R>0&&pt.push(["armor",R]),X>0&&pt.push(["poison",X]),V>0&&pt.push(["mobility",V]),G&&pt.push(["changed",0]),{cardClass:i,isCreature:r,iconList:pt,hlt:c,att:n,sleeping:f}}async drawHilight(t,i,r,n){await this.drawSprite(t,`frames/glow_${n}.png`,i-22,r-36)}cardBounds(t,i){return[t,i,150,205]}cardSize(){return[150,205]}highlightBounds(t){return[t[0]-5,t[1]-5,160,215]}frameImg(t,i,r,n){return`frames/${n?"big":"small"}/lvl${t}_${i}${r}.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 St=new on,$i=22,Xe=540,hn=6;class ln extends Jt{handCan;highCan;xOffset=0;xCache=new Array(15);init(){this.handCan=lt.get("hand"),this.highCan=lt.get("hilite"),this.xOffset=St.highlightBounds([0,0])[2]+hn;for(let t=-5;t<10;t++)this.xCache[t+5]=$i+t*this.xOffset}async drawCards(t){const i=this.handCan;i.clear();let r=$i;const n=this.paginatron(t);for(let c=n[0];c<=n[1];c++){if(!Z.active||!Z.movingHand.includes(c)){const f=W.getCard(t.hand[c]);await St.drawCard(f,i,r,Xe)}r+=this.xOffset}this.dirty=!1}fastCoord(t){return[this.xCache[t+5],Xe]}async drawActions(t){const i=S.clickMode!=="I",r=this.highCan,n=new Xt(0,520,1e3,250),c=new Xt(0,520,1e3,250,at.Right),f=this.paginatron(k.getActive());await Promise.all(t.filter(m=>m.zone==="H").map(async m=>{const C=m;if(C.position>=f[0]&&C.position<=f[1]){const D=this.xCache[C.position-f[0]+5];if(m.key==="DEET")c.addChild(ht.fromArr(m,St.highlightBounds([D,Xe]),at.Right));else if(i){n.addChild(ht.fromArr(m,St.highlightBounds([D,Xe])));let B;C.key==="HPLY"?C.cost&&C.canPlay?B="green":C.lvlOnly?B="purple":B="blue":B=this.glowColour(C),await St.drawHilight(r,D,Xe,B)}}})),i&&it.add(n),it.add(c),f[0]>0&&await this.makeScroller(r,!1),f[1]0&&(i=i.filter(n=>!Z.movingBoard.includes(n.id)));const r=i.map(n=>{const c=this.coordCalc(n.lane,n.owner);return St.drawCard(n,t,c[0],c[1])});await Promise.all(r),this.dirty=!1}async drawActions(t){const i=S.clickMode!=="I",r=this.highCan,n=Xt.fromBox(this.fieldBoundary),c=Xt.fromBox(this.fieldBoundary,at.Right);if(await Promise.all(t.filter(f=>f.zone==="F"||f.zone==="R").map(async f=>{if(f.zone==="R"&&i)it.add(ht.fromArr(f,this.fieldBoundary)),await this.drawSprite(r,"background/field-glow.png",this.fieldBoundary[0]-6,this.fieldBoundary[1]-9);else{const m=f,C=this.coordCalc(m.lane,m.playerA);f.key==="DEET"?c.addChild(ht.fromArr(f,St.highlightBounds(C),at.Right)):i&&(n.addChild(ht.fromArr(f,St.highlightBounds(C))),await St.drawHilight(r,C[0],C[1],this.glowColour(m)))}})),i&&n.childs.length>0&&it.add(n),c.childs.length>0&&it.add(c),x.iaTrigLane>0){const f=this.coordCalc(x.iaTrigLane,k.activeA),m=St.cardBounds(f[0],f[1]),C=m[1]+m[3]+11,D=m[0]+m[2]/2;await this.drawSprite(r,"icons/rewards/gold.png",D-10,C),await this.drawSprite(r,"icons/rewards/gold.png",D-35,C),await this.drawSprite(r,"icons/rewards/gold.png",D-60,C),await this.drawSprite(r,"icons/rewards/gold.png",D+15,C),await this.drawSprite(r,"icons/rewards/gold.png",D+40,C)}}drawCacheCard(t,i,r){this.drawHC(this.fieldCan,t,i,r)}async drawFight(){lt.get("hilite").clear(),await $e.drawActions([]),await Z.prep(),Z.movingBoard.length>0&&(await this.drawCards(),Z.start(),await Z.aniProm())}}const oe=new cn;class un extends Jt{avatars=["barf","beee","behold","boof","crowley","darko","deert","eyebs","fine","furiousgeorge","ghoost","judge","kenta","nom","pupsky","skelly","stache"];async drawPlayer(t,i,r,n){const c=this.getCanv(i);await this.drawSprite(c,`avatar/${this.avatars[t.avatar]}.jpg`,r+46,n+48),await this.drawSprite(c,"ui/player_frame.png",r,n),await this.drawSprite(c,"ui/player_health.png",r+10,n+102),await this.spriteNumber(c,t.health,r+45,n+149,"B","G"),await this.drawSprite(c,`ui/turn${t.turn}.png`,r+117,n+25),await this.drawSprite(c,"ui/rank.png",r+90,n+4),await this.spriteNumber(c,t.rank,r+121,n+28,"B","G"),t.isPlayerA===k.activeA&&await this.drawSprite(c,"icons/rarity/drop/common.png",r+84,n+153),await this.drawText(c,t.name,r+t.nameOffset,n+189,{colour:this.cBlu,fontSize:20});const f=k.totalPoison(t),m=k.totalArmor(t),C=k.activeCardItems(t);if(f>0||m>0||C.length>0){const D=n+9;if(f>0&&await St.drawIcon(c,r+15,D,"poison",f),m>0&&await St.drawIcon(c,r+150,D,"armor",m),C.length>0){await St.drawIcon(c,r+156,n+147,"changed");const B=b.basicAction("VWDK");return B.param=S.enTil("VE",S.bool2txt(t.isPlayerA)),new ht(B,r+155,n+147,36,36,at.Both)}}}async drawAllPlayers(){const t=lt.get("player");t.clear();const i=[],r=!E.aiActive,n=k.getLocal(),c=k.toPlayer(!n.isPlayerA),f=await this.drawPlayer(n,t,...this.playerOrigin(!0)),m=await this.drawPlayer(c,t,...this.playerOrigin(!1));let C,D;if(n.isPlayerA===k.activeA){let B=862;const G=295,R=Array(L.regularPlays).fill("blue").concat(L.freeCards.map(V=>V.sourceCard)),X=[];R.forEach(V=>{let _;if(V==="blue")_=V;else if(_="green",r){const q={key:"DEET",zone:"N",host:"",param:V};i.push(new ht(q,B-1,G-1,28,41,at.Both))}X.push(this.drawSprite(t,`ui/${_}card.png`,B,G)),B+=30}),await Promise.all(X),C=await this.drawDeckButton(t,n,!0,r),D=await this.drawDeckButton(t,n,!1,r)}return this.dirty=!1,i.concat([f,m,C,D]).filter(Boolean)}async drawDeckButton(t,i,r,n){let c,f,m;if(r?(c=i.discard.length,f=935,m="T"):(c=i.deck.length,f=858,m="U"),await re.drawFactionButton(t,f,350,m),await this.spriteNumber(t,c,f+38,350+14,"S","Y"),c>0&&n){const D=b.basicAction("VWDK");return D.param=r?"VD":"VR",re.makeFactButtonClick(f,350,D)}}async drawActions(t){if(S.clickMode==="I")return;const i=lt.get("hilite"),r=k.isLocalA;await Promise.all(t.filter(n=>n.zone==="P").map(n=>{const c=n,f=this.playerOrigin(c.playerA===r),m=this.playerBounds(...f);return it.add(ht.fromArr(n,m)),this.drawSprite(i,"ui/player_glow.png",f[0]+1,f[1]-1)}))}playerOrigin(t){return[832,t?485:0]}playerBounds(t,i){return[t+18,i+18,170,170]}async drawGameOver(t=!1){const i=lt.get("field"),r=94,n=k.isLocalA,c=E.winFlag,f=n&&c===1||!n&&c===-1;await this.drawSprite(i,`ui/you-${f?"win":"lose"}.png`,r,89,{alpha:t?.65:1}),it.removeAll();const m=lt.get("hand");if(await ot.drawButton(m,r+62,488,b.menuButtonAction("MM"),"Main Menu",20,!1),await ot.drawButton(m,r+389,488,b.menuButtonAction("RP"),"Replay",55,!1),t&&!S.options.wasDrafting){m.context.fillStyle="#222222d8",m.context.fillRect(0,0,849,50);const C={colour:this.cBlu,fontSize:20};await this.drawText(m,$t.namenom(!n),5,2,C),await this.drawText(m,$t.namenom(n),5,29,C)}}async drawAiGear(t,i){const c=t%6,f=Math.floor(t/6),m=lt.get("hilite"),C=`icons/rewards/${i?"gold":"silver"}.png`;await this.drawSprite(m,C,862+c*24,255+f*24)}hwhipe(){lt.get("hilite").clear()}}const Ct=new un,Ui=15,Oi=15,dn=5;class fn extends Jt{constructor(){super();const t=St.highlightBounds([0,0]);this.xOffset=t[2]+dn,this.yOffset=t[3]+25}xOffset;yOffset;async drawCards(t){const r=bt.visibleContent().map((n,c)=>{const f=W.getCard(n.cardCode),m=this.listXY(c);return St.drawCard(f,t,...m).then(()=>{if(n.cardCount>0)return this.drawCount(t,m[0]+61,m[1]+166,n.cardCount)})});await Promise.all(r)}async drawActions(t,i){const r=S.clickMode!=="I",n=bt.visibleContent(),c=E.ui,f=c.deckScroll,m=f+15,D=c.deckSummary?at.Both:at.Right,B=Xt.fromBox(this.deckBoundary()),G=Xt.fromBox(this.deckBoundary(),D),R=[];t.forEach(X=>{if(X.key==="DEET"){const V=X;V.position>=f&&V.positionq.sourceIdx===V.position);if(_>-1){const q=this.listXY(_);B.addChild(ht.fromArr(X,St.highlightBounds(q))),R.push(St.drawHilight(i,q[0],q[1],"blue"))}}}),r&&B.childs.length>0&&it.add(B),G.childs.length>0&&it.add(G),bt.canPageDown&&R.push(re.makeVScroller(i,299,712,!1,"SCRK")),bt.canPageUp&&R.push(re.makeVScroller(i,465,712,!0,"SCRK")),await Promise.all(R)}async drawCount(t,i,r,n){await this.drawSprite(t,"ui/dullcard.png",i,r),await this.spriteNumber(t,n,i+13,r+12,"S","Y")}listXY(t){return[Ui+t%5*this.xOffset,Oi+Math.floor(t/5)*this.yOffset]}deckBoundary(){return[Ui,Oi,this.xOffset*5,this.yOffset*3]}}const Ci=new fn;class gn extends Jt{async drawDetails(t){const i=[],r=lt.get("card");r.clear(),this.makeHaze(r);const n=30,c=30,f=W.getCard(ge.currentCard);S.options.bigCards?i.push(St.drawBigCard(r,f,n,c)):i.push(St.drawCard(f,r,134,280));const m=435;let C=30;const D=33,B=23,G=28;let R=f.name;for(;R.length>0;){C+=36;let wt;if(R.length{for(;wt.length>0;){let Vt;if(wt.length1){const wt=f.cardCode(),Vt=_===3?[19,147,270]:_===2?[78,216]:[-15,91,197,302];V.forEach((Yt,he)=>{i.push(this.drawLevelButton(r,wt,Yt,27+Vt[he],639,Yt===f.level))})}let q=0;const pt=513,Mt=697,ye=74;gt.baseMode!=="G"&&(i.push(ot.drawButton(r,pt,Mt,t,"Close",62,!1)),q++);const kt=new ht(t,n,c,377,603,at.Both);if(it.add(kt),ge.canGoBack){const wt=ge.goBackAction();i.push(ot.drawButton(r,pt,this.buttonY(Mt,q,ye),wt,"Back",72,!1)),q++}ge.friendos.forEach(wt=>{const Vt=W.getCard(wt),Yt=ge.friendAction(wt),he=ge.friendTxt(Vt.cardCode());i.push(ot.drawButton(r,pt,this.buttonY(Mt,q,ye),Yt,he[1]||Vt.name,he[0],!1)),q++}),await Promise.all(i)}buttonY(t,i,r){return t-i*r}cardSummary(t){const i=y.factionText(t.faction),r=y.rarityText(t.rarity),n=y.cardTypeText(t.type);return`${i}, ${r} ${n}`}tribeSummary(t){return t.tribe.map(i=>y.tribeText(i)).join(" ")}async drawLevelButton(t,i,r,n,c,f){if(await this.drawSprite(t,`icons/frame/l${r}.png`,n,c),!f){const B=ge.levelAction(r),G=new ht(B,n-7,c-5,103,112,at.Both);it.add(G)}const C=W.getCard(`${i}${r}`).levelSpice(),D=[[-7,84],[60,84],[11,79]];await Promise.all(C.map((B,G)=>{const R=n+D[G][0],X=c+D[G][1];if(B.icon==="A"||B.icon==="H"){let V,_;return B.icon==="A"?(V="icons/frame/attack.png",_=R+17):(V="icons/frame/health.png",_=R+16),this.drawSprite(t,V,R-1,X-1).then(()=>this.spriteNumber(t,B.num,_,X+10,"S","Y"))}else{let V=this.spiceIcon(B.icon);if(B.icon==="U"||B.icon==="D"||B.icon==="L"||B.icon==="N"){const _=`icons/effects/${V}.png`;return this.drawSprite(t,_,R-1,X-1).then(()=>this.spriteNumber(t,B.num,R+16,X+10,"S","B"))}else return St.drawIcon(t,R,X,V,B.num)}}))}spiceIcon(t){return t==="N"?"new":t==="D"?"damage":t==="U"?"buff":t==="V"?"mobility":t==="P"?"poison":t==="M"?"armor":t==="G"?"aggressive":t==="F"?"defender":t==="B"?"breakthrough":t==="R"?"regenerate":t==="L"?"life":t==="C"?"consistent":t==="O"?"overload":"whoops"}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]}}const mn=new gn;class pn extends Jt{packLeft=22;packTop=190;packBoundary=[this.packLeft-5,this.packTop-10,537,480];async drawPack(t,i){const r=S.clickMode!=="I",n=[],c=Xt.fromBox(this.packBoundary),f=Xt.fromBox(this.packBoundary,at.Right);t.filter(C=>C.pack).forEach(C=>{const D=this.coordCalcPack(C.index);if(C.key==="DRFT"){const B=W.getCard(C.param+"1");n.push(St.drawCard(B,i,...D).then(()=>this.drawRarity(i,B.rarity,D[0]+112,D[1]+4))),r&&c.addChild(ht.fromArr(C,St.highlightBounds(D)))}else f.addChild(ht.fromArr(C,St.highlightBounds(D),at.Right))}),await Promise.all(n),r&&c.childs.length>0&&it.add(c),f.childs.length>0&&it.add(f)}async drawList(t,i){let r=170;const n=570,c=[],f=At.picksAsDeck,m=new Xt(n,r,600,600,at.Both),C=t,D=15,B=At.scrollIdx;At.canPageDown&&await this.makeScroller(i,!1),At.canPageUp&&await this.makeScroller(i,!0),C.filter(G=>!G.pack).forEach(G=>{if(G.index>=B&&G.index{const f=i.getFactTotal(c);if(f[2]===0)return[Promise.resolve()];{r+=75;const m=this.threeLine(t,r,n,f),C=this.drawFaction(t,c,r-8,n-39);return[m,C]}}).flat())}async threeLine(t,i,r,n){const c={colour:"#ffd865",fontSize:18,fontName:"serif"},f=30;await Promise.all(n.map((m,C)=>this.drawText(t,m.toString(),i,r+f*C,c)))}async drawDraftMenu(t){let f=50,m=240;await me.headerText(f+28,m,"Opponent",t),m+=45,await ot.buttonMaker(t,f,m,"DI","DUMB BOT",27,At.vsAI,!1),m+=80,await ot.buttonMaker(t,f,m,"DV","HUMAN",47,!At.vsAI,!1),m+=80+16,await me.headerText(f+17,m,"Rarity Filter",t),m+=80-34-6,await this.rarityButton(t,f+20,m,"L",At.getRarity("L")),await this.rarityButton(t,f+125,m,"H",At.getRarity("H")),m+=80,await this.rarityButton(t,f+20,m,"R",At.getRarity("R")),await this.rarityButton(t,f+125,m,"C",At.getRarity("C")),m=240+45+80*5,await ot.buttonMaker(t,f,m,"MM","MAIN MENU",16),f=404,m=240,await me.headerText(f+5,m,"Draft Modes",t),m+=45,await ot.buttonMaker(t,f,m,"GP","GOOD PACKS",9,At.fatPacks),m+=80,await ot.buttonMaker(t,f,m,"LD","LEGENDARY",17,At.legDraft),m+=80,await ot.buttonMaker(t,f,m,"OD","OVERDRAFT",17,At.overdraft),f=757,m=240,await me.headerText(f+76,m,"Sets",t),m+=45,await this.chestButton(t,f+3,m,1,At.getSet(1)),await this.chestButton(t,f+124,m,2,At.getSet(2)),m+=88,await this.chestButton(t,f+3,m,3,At.getSet(3)),await this.chestButton(t,f+124,m,4,At.getSet(4)),m+=88,await this.chestButton(t,f+3,m,5,At.getSet(5)),await this.chestButton(t,f+124,m,6,At.getSet(6)),m+=88,await this.chestButton(t,f+3,m,7,At.getSet(7)),m=240+45+80*5,await ot.buttonMaker(t,f,m,"DN","NEXT",68)}async rarityButton(t,i,r,n,c){const f={key:"MNBT",zone:"N",host:"",param:S.enTil("DR",n)},m=`ui/button/rarity_${n}${c?"y":"n"}.png`;await this.drawSprite(t,m,i,r);const C=new ht(f,i,r,75,65,at.Both);it.add(C)}async chestButton(t,i,r,n,c){const f={key:"MNBT",zone:"N",host:"",param:S.enTil("DT",n)};c&&await this.drawSprite(t,"icons/sets/chest-hl.png",i,r);const m=`icons/sets/Chest_Set${n}${c?"y":"n"}.png`;await this.drawSprite(t,m,i,r);const C=new ht(f,i,r,90,74,at.Both);it.add(C)}}const oi=new pn;class yn extends Jt{async drawSets(t,i){let r=200;const n=100,c=[],f=new Xt(n-50,r,450,600);t.filter(m=>m.key==="DSET").forEach(m=>{const C=He[parseInt(m.param)];c.push(this.drawText(i,C.name,n,r,{colour:this.cYella}),this.drawSprite(i,"icons/chest_small.png",n-48,r-5));const D=new ht(m,n-50,r-2,450,35,at.Both);f.addChild(D),r+=45}),it.add(f),await Promise.all(c)}async drawList(t,i){let r=170;const n=570,c=42,f=33,m=[],C=new Xt(n,r,460,600),D=new Xt(n-c,r,f,600),B=t.filter(R=>R.key==="DPVW");t.filter(R=>R.key==="DECK").map(R=>{const X=B.find(V=>V.param===R.param);return[R,X]}).forEach(R=>{const X=Ot.stockDeckByPram(R[0].param);m.push(this.drawFaction(i,X.factions[0],n,r),this.drawText(i,X.name,n+65,r+7,{colour:this.cYella})),X.factions.length===2&&m.push(this.drawFaction(i,X.factions[1],n+28,r));const V=new ht(R[0],n,r-2,460,35,at.Both);C.addChild(V),m.push(this.drawSprite(i,"icons/rarity/eye/legendary.png",n-c,r));const _=new ht(R[1],n-c,r-2,f,35,at.Both);D.addChild(_),r+=35}),await Promise.all(m),it.add(C),it.add(D)}packBoundary=[17,190,537,480];coordCalcPack(t){const n=t%3,c=Math.floor(t/3);return[22+n*176,200+c*235]}iAmError(t){const i=lt.get("game-ui");this.drawText(i,t,295,655,{colour:"#f5142e",fontSize:26})}async drawConstrMenu(t){let c=50,f=240;await me.headerText(c+28,f,"Opponent",t),f+=45,await ot.buttonMaker(t,c,f,"CI","DUMB BOT",27,$t.vsAI,!1),f+=80,await ot.buttonMaker(t,c,f,"CV","HUMAN",47,!$t.vsAI,!1),f+=80*4,await ot.buttonMaker(t,c,f,"MM","MAIN MENU",16),c=404,f=240,await me.headerText(c+46,f,"Player 1",t);const m=$t.p1.mode;f+=45,await ot.buttonMaker(t,c,f,S.enTil("CP","A"),"PRE-CON",39,m==="CP",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CR","A"),"RANDOM",36,m==="CR",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CX","A"),"SCRAMBLE",30,m==="CX",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("LK","A"),"LOAD FILE",32,m==="LK"),m==="LK"&&await this.drawFileDeck(t,c,f,$t.p1.deck),c=757,f=240,await me.headerText(c+44,f,"Player 2",t);const C=$t.p2.mode;f+=45,await ot.buttonMaker(t,c,f,S.enTil("CP","B"),"PRE-CON",39,C==="CP",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CR","B"),"RANDOM",36,C==="CR",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("CX","B"),"SCRAMBLE",30,C==="CX",!1),f+=80,await ot.buttonMaker(t,c,f,S.enTil("LK","B"),"LOAD FILE",32,C==="LK"),C==="LK"&&await this.drawFileDeck(t,c,f,$t.p2.deck),f+=80*2,await ot.buttonMaker(t,c,f,"CN","NEXT",68)}async drawFileDeck(t,i,r,n){const c=r+89;await this.drawText(t,n.name.slice(0,20),i,r+70,{colour:this.cYella,fontSize:18}),n.factions.length===1?await this.drawFaction(t,n.factions[0],i+96,c):(await this.drawFaction(t,n.factions[0],i+78,c),await this.drawFaction(t,n.factions[1],i+113,c))}}const qe=new yn;class bn extends Jt{async drawExtrasMenu(t){let f=50,m=240;await this.headerText(f+37,m,"UI Modes",t),m+=45,await ot.buttonMaker(t,f,m,"90","90% SIZE",47,S.options.scale==="90"),m+=80,await ot.buttonMaker(t,f,m,"BC","BIG CARDS",29,S.options.bigCards),m+=80,await ot.buttonMaker(t,f,m,"AN","ANIMATIONS",10,S.options.anim8),m+=80*3,await ot.buttonMaker(t,f,m,"MM","MAIN MENU",16),f=404,m=240,await this.headerText(f+28,m,"More Info",t),m+=45,await ot.buttonMaker(t,f,m,"RU","RULES",66),m+=80,await ot.buttonMaker(t,f,m,"FQ","INFO & FAQ",20),m+=80+34,await this.headerText(f+12,m,"Game Modes",t),m+=80-34,await ot.buttonMaker(t,f,m,"HH","BIG HEALTH",20,S.options.highHealth),m+=80,await ot.buttonMaker(t,f,m,"CH","CHEATER",39,S.options.cheater),m+=80,await ot.buttonMaker(t,f,m,"BB","BATTLE BARK",13,S.options.bark),f=757,m=240,await this.headerText(f+43,m,"Playmat",t),m+=45;const C=S.options.playmat==="vanilla";await ot.buttonMaker(t,f,m,"vanilla","VANILLA",43,C,!C),m+=80;const D=S.options.playmat==="alloyin";await ot.buttonMaker(t,f,m,"alloyin","ALLOYIN",43,D,!D),m+=80;const B=S.options.playmat==="nekrium";await ot.buttonMaker(t,f,m,"nekrium","NEKRIUM",38,B,!B),m+=80;const G=S.options.playmat==="tempys";await ot.buttonMaker(t,f,m,"tempys","TEMPYS",51,G,!G),m+=80;const R=S.options.playmat==="uterra";await ot.buttonMaker(t,f,m,"uterra","UTERRA",52,R,!R);const X=890;await this.drawText(t,S.ver,X,46,{fontSize:18,colour:"#7b68ee"}),await this.drawText(t,"2-Feb-2024",X,68,{fontSize:14,colour:"#7b68ee"});const V=b.basicAction("MNBT");V.param="VR",it.add(new ht(V,X,44,90,44,at.Both))}async headerText(t,i,r,n){await this.drawText(n,r,t,i,{colour:this.cYella,fontSize:30})}async drawPickerPlayer(t,i,r){let n;i?n="Player 1":r?n="Dumb Bot":n="Player 2",await this.headerText(54,75,n,t)}}const me=new bn;class An extends Jt{async drawMenu(t){let r=22;await this.drawSprite(t,"ui/button/constructed.png",778,r),it.add(ht.fromArr(this.makeAction("C"),this.buttHilightBounds(778,r),at.Both)),r=148,await this.drawSprite(t,"ui/button/draft.png",778,r),it.add(ht.fromArr(this.makeAction("D"),this.buttHilightBounds(778,r),at.Both)),r=508,await this.drawSprite(t,"ui/button/deck.png",778,r),it.add(ht.fromArr(this.makeAction("B"),this.buttHilightBounds(778,r),at.Both)),r=634,await this.drawSprite(t,"ui/button/info.png",778,r),it.add(ht.fromArr(this.makeAction("I"),this.buttHilightBounds(778,r),at.Both));const n=b.basicAction("DBUG");it.add(new ht(n,757,349,74,70,at.Right)),await this.drawSprite(t,"gwg/gwg_red.png",58,0);const c=b.basicAction("MNBT");c.param="SB",it.add(new ht(c,10,10,44,52,at.Both));const f=b.basicAction("MNBT");f.param="GW",it.add(new ht(f,58,10,50,50,at.Both))}buttBounds(t,i){return[t,i,242,113]}buttHilightBounds(t,i){const n=[-3,-3,6,6];return this.buttBounds(t,i).map((c,f)=>c+n[f])}makeAction(t){return{zone:"N",key:"MENU",host:"",param:t}}}const kn=new An;class wi{active=!0;aId;moveX=[];moveY=[];dOrd=1;steps=0;target;targId;type;x=0;y=0;constructor(t,i,r,n){this.aId=t,this.type=i,this.target=r,this.targId=n}async draw(t){console.log("Draw not overridden")}async onEnd(){}extend(t,i,r){if(this.steps+=t,i||r){const n=new Array(t).fill(0);i&&(this.moveX=n.concat(this.moveX)),r&&(this.moveY=n.concat(this.moveY))}}setHand(t){const i=se.fastCoord(t);this.x=i[0],this.y=i[1]}setField(t,i){const r=oe.coordCalc(t,i);this.x=r[0],this.y=r[1]}nudge(t,i){this.x+=t,this.y+=i}}class pe extends wi{constructor(t,i,r,n,c){super(t,i,r,n),this.drawId=c,this.steps=Z.speedCache.get(t)??0}drawId;async draw(t){Z.hcFrame.writeHC(Z.getCC(this.drawId),this.x,this.y)}static fader(t,i,r){return new pe("D","F",t,i,r)}static fixed(t,i,r){return new pe("C","X",t,i,r)}}class hi extends wi{imgProm;constructor(t,i,r,n,c){super(t,i,r,n),this.steps=c}async draw(t){const i=await this.imgProm;Z.hcFrame.context.drawImage(i,this.x,this.y)}preLoad(t){this.imgProm=S.getSprite(S.imgRoot+t)}}class li extends pe{endWrite=!1;constructor(t,i,r,n){super(t,"C",i,r,n)}async onEnd(){this.endWrite&&(this.target==="F"?oe.drawCacheCard(Z.getCC(this.drawId),this.x,this.y):this.target==="H"&&se.drawCacheCard(Z.getCC(this.drawId),this.x,this.y))}}class Ee extends wi{holf=1;img;schema;constructor(t,i,r){super(t,"S",i,r),this.img=Z.getSS(t),this.schema=Z.getSSS(t)??{count:0},this.steps=this.schema.count}async draw(t){this.holf>1&&(t=(t-t%this.holf)/this.holf);const i=this.schema.origins[t];Z.hcFrame.context.drawImage(this.img,i[0],i[1],this.schema.width,this.schema.height,this.x,this.y,this.schema.width,this.schema.height)}slow(t){this.holf=t,this.steps=this.schema.count*t}}class Tn extends Ee{offset;constructor(t,i,r){super(t,i,r),t==="U"?this.offset=[-1,0]:t==="N"?this.offset=[-2,-1]:t==="T"?this.offset=[-1,-1]:this.offset=[0,0]}budge(){this.x+=this.offset[0],this.y+=this.offset[1]}}class Vi extends Ee{delay=0;setDelay(t){this.delay=t,this.steps+=t}async draw(t){t>=this.delay&&await super.draw(t-this.delay)}}class vn extends hi{delay=0;setDelay(t){this.delay=t,this.steps+=t}async draw(t){t>=this.delay&&await super.draw(t)}}class Sn{ver="v0.10.3";gameWidth;gameHeight;spriteCache;dogAudio;_clickMode;pxRatio=1;options;imgRoot;constructor(){this.spriteCache={},this.imgRoot="./img/",this.gameWidth=1024,this.gameHeight=768,this.dogAudio=document.getElementById("dogbark"),this._clickMode="M",this.options={anim8:!0,bark:!0,bigCards:!0,highHealth:!1,cheater:!1,playmat:"uterra",wasDrafting:!1,scale:"100",debug:!1}}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 bulkLoadP(t){await Promise.all(t.map(i=>this.getSprite(this.imgRoot+i)))}async bulkLoadS(t){for(let i=0;i{const r=new Image;r.onload=()=>{i(r)},r.src=t})}writeStorage(t,i){localStorage.setItem(t,i)}readStorage(t){return localStorage.getItem(t)}readStringStorage(t,i){const r=this.readStorage(t);return r===null?i:r}readBoolStorage(t,i){const r=this.readStorage(t);return r===null?i:this.txt2bool(r)}writeBoolStorage(t,i){this.writeStorage(t,this.bool2txt(i))}bool2txt(t){return t?"Y":"N"}txt2bool(t){return t==="Y"}restoreOptions(){const t=this.options;t.anim8=this.readBoolStorage("anim8",!0),t.bark=this.readBoolStorage("bark",!1),t.bigCards=this.readBoolStorage("bigCards",!0),t.cheater=this.readBoolStorage("cheater",!1),t.highHealth=this.readBoolStorage("highHealth",!1),t.playmat=this.readStringStorage("playmat","uterra"),t.scale=this.readStringStorage("scale","100")}toggleOption(t){S.options[t]=!S.options[t],this.writeBoolStorage(t,S.options[t])}togOptViaPram(t){let i;if(t==="HH")i="highHealth";else if(t==="CH")i="cheater";else if(t==="BB")i="bark";else if(t==="BC")i="bigCards";else if(t==="AN")i="anim8";else throw new Error("whooops"+t);this.toggleOption(i)}setClickMode(t){this._clickMode=t}get clickMode(){return this._clickMode}}const S=new Sn;window.onload=async()=>{await document.fonts.ready;let o=[];document.fonts.forEach(R=>{R.load(),o.push(R.loaded)}),await Promise.all(o),ut.allCanvases.forEach(R=>{lt.register(R)}),S.pxRatio=window.devicePixelRatio;let t;(R=>{R.Neutral="N",R.Cancel="C",R.Down="D"})(t||(t={}));let i=!0,r=800,n="N",c;try{document.createEvent("TouchEvent"),S.setClickMode("T"),i=!1}catch{}const f=()=>{c&&(clearTimeout(c),c=void 0)},m=(R,X,V)=>{const _=it.hitTest(R,X,V);_&&T.handleAction(_)},C=R=>{m(R.pageX,R.pageY,R.button)},D=R=>{R.touches.length>1?(n="C",f()):n==="N"&&(n="D",c=setTimeout(()=>{n="C";const X=R.touches[0];m(X.pageX,X.pageY,at.ForceRight),c=void 0},r))},B=R=>{if(n==="D"){if(f(),n="N",R.changedTouches.length>0){const X=R.changedTouches[0];m(X.pageX,X.pageY,at.Left)}}else R.touches.length===0&&(n="N")},G=document.getElementById("solforge");i?(G.addEventListener("click",C),G.addEventListener("contextmenu",R=>(R.preventDefault(),C(R),!1))):(G.addEventListener("touchstart",D),G.addEventListener("touchend",B)),window.sfapi={details:R=>{ge.init(R)},setLog:R=>{nt.setLog(R)},peekAll:()=>{nt.peekAllCards()},peekDeck:()=>{nt.peekDecks()},peekField:()=>{console.log(p.field)},dumb:()=>{console.log("Am I dumb? "+nt.dumb)},debug:()=>{S.toggleDebug()}},S.restoreOptions(),S.options.scale!=="100"&&ut.changeScale(S.options.scale),ut.init(),ut.drawAll().then(()=>{const R=["ui/player_frame.png","ui/button/on.png","ui/button/off.png"];[1,2,3].forEach(V=>["C","S"].forEach(_=>["A","N","T","U"].forEach(q=>{R.push("frames/small/lvl"+V+"_"+q+_+".png")}))),["poison","regenerate","armor","aggressive","breakthrough","changed","consistent","defender","defensive","mobility","overload"].forEach((V,_)=>{R.push("icons/effects/"+V+".png"),_<3&&R.push("icons/effects/big/"+V+".png")}),["common","heroic","legendary","rare"].forEach(V=>{R.push("icons/rarity/new/"+V+".png")}),[1,2,3,4].forEach(V=>{R.push("ui/turn"+V+".png")}),["blue","green","purple","red","yellow"].forEach(V=>{R.push("frames/glow_"+V+".png")});const X=new Jt;for(let V=0;V<10;V++)["B","S"].forEach(_=>{(_==="B"?["G","Y"]:["B","Y"]).forEach(pt=>{R.push(X.numSpriteUrl(V,_,pt))})});S.bulkLoadS(R)})}})();