@malib/gear 0.12.3 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class N{constructor(){this.base=0,this.bonus=0,this.upgrade=0,this.enchant=0}get empty(){return this.base===0&&this.bonus===0&&this.upgrade===0&&this.enchant===0}get sum(){return Math.max(0,this.base+this.bonus+this.upgrade+this.enchant)}get diff(){return this.bonus+this.upgrade+this.enchant}}var i=(t=>(t[t.incSTR=1]="incSTR",t[t.incSTRr=2]="incSTRr",t[t.incDEX=3]="incDEX",t[t.incDEXr=4]="incDEXr",t[t.incINT=5]="incINT",t[t.incINTr=6]="incINTr",t[t.incLUK=7]="incLUK",t[t.incLUKr=8]="incLUKr",t[t.incAllStat=9]="incAllStat",t[t.incMHP=10]="incMHP",t[t.incMMP=11]="incMMP",t[t.incMHPr=12]="incMHPr",t[t.incMMPr=13]="incMMPr",t[t.incMDF=14]="incMDF",t[t.incARC=15]="incARC",t[t.incAUT=16]="incAUT",t[t.incPAD=17]="incPAD",t[t.incMAD=18]="incMAD",t[t.incAD=19]="incAD",t[t.incPDD=20]="incPDD",t[t.incSpeed=21]="incSpeed",t[t.incJump=22]="incJump",t[t.knockback=23]="knockback",t[t.bdR=24]="bdR",t[t.incBDR=25]="incBDR",t[t.imdR=26]="imdR",t[t.incIMDR=27]="incIMDR",t[t.damR=28]="damR",t[t.nbdR=29]="nbdR",t[t.statR=30]="statR",t[t.incCHUC=31]="incCHUC",t[t.incPADr=100]="incPADr",t[t.incMADr=101]="incMADr",t[t.incPDDr=102]="incPDDr",t[t.incCr=103]="incCr",t[t.incDAMr=104]="incDAMr",t[t.RecoveryHP=105]="RecoveryHP",t[t.RecoveryMP=106]="RecoveryMP",t[t.face=107]="face",t[t.prop=108]="prop",t[t.time=109]="time",t[t.HP=110]="HP",t[t.MP=111]="MP",t[t.attackType=112]="attackType",t[t.ignoreTargetDEF=113]="ignoreTargetDEF",t[t.ignoreDAM=114]="ignoreDAM",t[t.ignoreDAMr=115]="ignoreDAMr",t[t.DAMreflect=116]="DAMreflect",t[t.mpconReduce=117]="mpconReduce",t[t.incMesoProp=118]="incMesoProp",t[t.incRewardProp=119]="incRewardProp",t[t.incAllskill=120]="incAllskill",t[t.RecoveryUP=121]="RecoveryUP",t[t.boss=122]="boss",t[t.level=123]="level",t[t.incTerR=124]="incTerR",t[t.incAsrR=125]="incAsrR",t[t.incEXPr=126]="incEXPr",t[t.reduceCooltime=127]="reduceCooltime",t[t.incSTRlv=128]="incSTRlv",t[t.incDEXlv=129]="incDEXlv",t[t.incINTlv=130]="incINTlv",t[t.incLUKlv=131]="incLUKlv",t[t.incMHPlv=132]="incMHPlv",t[t.incPADlv=133]="incPADlv",t[t.incMADlv=134]="incMADlv",t[t.incCriticaldamage=135]="incCriticaldamage",t[t.attackSpeed=200]="attackSpeed",t[t.setItemID=201]="setItemID",t[t.durability=202]="durability",t[t.reduceReq=203]="reduceReq",t[t.only=1100]="only",t[t.tradeBlock=1101]="tradeBlock",t[t.accountSharable=1102]="accountSharable",t[t.onlyEquip=1103]="onlyEquip",t[t.tradeAvailable=1104]="tradeAvailable",t[t.equipTradeBlock=1105]="equipTradeBlock",t[t.sharableOnce=1106]="sharableOnce",t[t.charismaEXP=1107]="charismaEXP",t[t.senseEXP=1108]="senseEXP",t[t.insightEXP=1109]="insightEXP",t[t.willEXP=1110]="willEXP",t[t.craftEXP=1111]="craftEXP",t[t.charmEXP=1112]="charmEXP",t[t.accountShareTag=1113]="accountShareTag",t[t.bossReward=1114]="bossReward",t[t.noPotential=1115]="noPotential",t[t.fixedPotential=1116]="fixedPotential",t[t.specialGrade=1117]="specialGrade",t[t.fixedGrade=1118]="fixedGrade",t[t.superiorEqp=1119]="superiorEqp",t[t.incPQEXPr=1120]="incPQEXPr",t[t.jokerToSetItem=1121]="jokerToSetItem",t[t.blockGoldHammer=1122]="blockGoldHammer",t[t.exceptUpgrade=1123]="exceptUpgrade",t[t.onlyUpgrade=1124]="onlyUpgrade",t[t.noLookChange=1125]="noLookChange",t[t.tucIgnoreForPotential=1126]="tucIgnoreForPotential",t))(i||{}),f=(t=>(t[t.cap=100]="cap",t[t.faceAccessory=101]="faceAccessory",t[t.eyeAccessory=102]="eyeAccessory",t[t.earrings=103]="earrings",t[t.coat=104]="coat",t[t.longcoat=105]="longcoat",t[t.pants=106]="pants",t[t.shoes=107]="shoes",t[t.glove=108]="glove",t[t.cape=110]="cape",t[t.ring=111]="ring",t[t.pendant=112]="pendant",t[t.belt=113]="belt",t[t.medal=114]="medal",t[t.shoulder=115]="shoulder",t[t.pocket=116]="pocket",t[t.badge=118]="badge",t[t.android=166]="android",t[t.machineHeart=167]="machineHeart",t[t.shield=109]="shield",t[t.emblem=119]="emblem",t[t.powerSource=119020]="powerSource",t[t.shiningRod=1212]="shiningRod",t[t.tuner=1213]="tuner",t[t.breathShooter=1214]="breathShooter",t[t.soulShooter=122]="soulShooter",t[t.desperado=123]="desperado",t[t.energySword=124]="energySword",t[t.espLimiter=126]="espLimiter",t[t.chain=127]="chain",t[t.magicGauntlet=128]="magicGauntlet",t[t.ritualFan=129]="ritualFan",t[t.ohSword=130]="ohSword",t[t.ohAxe=131]="ohAxe",t[t.ohBlunt=132]="ohBlunt",t[t.dagger=133]="dagger",t[t.katara=134]="katara",t[t.cane=136]="cane",t[t.wand=137]="wand",t[t.staff=138]="staff",t[t.thSword=140]="thSword",t[t.chakram=1404]="chakram",t[t.thAxe=141]="thAxe",t[t.thBlunt=142]="thBlunt",t[t.spear=143]="spear",t[t.polearm=144]="polearm",t[t.bow=145]="bow",t[t.crossbow=146]="crossbow",t[t.claw=147]="claw",t[t.knuckle=148]="knuckle",t[t.gun=149]="gun",t[t.shovel=150]="shovel",t[t.pickaxe=151]="pickaxe",t[t.dualBowguns=152]="dualBowguns",t[t.handCannon=153]="handCannon",t[t.heavySword=156]="heavySword",t[t.longSword=157]="longSword",t[t.gauntletRevolver=158]="gauntletRevolver",t[t.ancientBow=159]="ancientBow",t[t.soulShield=1098]="soulShield",t[t.demonShield=1099]="demonShield",t[t.magicArrow=135200]="magicArrow",t[t.card=135210]="card",t[t.medallion=135220]="medallion",t[t.rosary=135221]="rosary",t[t.ironChain=135222]="ironChain",t[t.magicBook1=135223]="magicBook1",t[t.magicBook2=135224]="magicBook2",t[t.magicBook3=135225]="magicBook3",t[t.arrowFletching=135226]="arrowFletching",t[t.bowThimble=135227]="bowThimble",t[t.daggerScabbard=135228]="daggerScabbard",t[t.charm=135229]="charm",t[t.orb=135240]="orb",t[t.dragonEssence=135250]="dragonEssence",t[t.soulRing=135260]="soulRing",t[t.magnum=135270]="magnum",t[t.wristBand=135290]="wristBand",t[t.farSight=135291]="farSight",t[t.powderKeg=135292]="powderKeg",t[t.mass=135293]="mass",t[t.document=135294]="document",t[t.magicMarble=135295]="magicMarble",t[t.arrowhead=135296]="arrowhead",t[t.jewel=135297]="jewel",t[t.powderKeg2=135298]="powderKeg2",t[t.controller=135300]="controller",t[t.foxMarble=135310]="foxMarble",t[t.chessPiece=135320]="chessPiece",t[t.transmitter=135330]="transmitter",t[t.charge=135340]="charge",t[t.magicWing=135350]="magicWing",t[t.pathOfAbyss=135360]="pathOfAbyss",t[t.relic=135370]="relic",t[t.fanTassel=135380]="fanTassel",t[t.bracelet=135400]="bracelet",t[t.weaponBelt=135401]="weaponBelt",t[t.ornament=135402]="ornament",t[t.hexSeeker=135403]="hexSeeker",t[t.petEquip=180]="petEquip",t[t.machineEngine=161]="machineEngine",t[t.machineArms=162]="machineArms",t[t.machineLegs=163]="machineLegs",t[t.machineBody=164]="machineBody",t[t.machineTransistors=165]="machineTransistors",t[t.dragonMask=194]="dragonMask",t[t.dragonPendant=195]="dragonPendant",t[t.dragonWings=196]="dragonWings",t[t.dragonTail=197]="dragonTail",t))(f||{}),X=(t=>(t[t.normal=0]="normal",t[t.rare=1]="rare",t[t.epic=2]="epic",t[t.unique=3]="unique",t[t.legendary=4]="legendary",t[t.special=5]="special",t))(X||{});class J{constructor(o){this.enchanted=!1,this._charge=0,this.chargeOption=new Map,this.gear=o}get charge(){return this._charge}set charge(o){this.enchanted&&(o<0||o>1e3||(this._charge=o,this.updateChargeOption()))}enchant(){return this.enchanted||!D.isWeapon(this.gear.type)?!1:(this.enchanted=!0,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0)}disenchant(){return this.enchanted?(this.enchanted=!1,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0):!1}setSoul(o){return this.enchanted?(this.soul=o,this.updateChargeOption(),!0):!1}removeSoul(){return!this.enchanted||!this.soul?!1:(this.soul=void 0,this.updateChargeOption(),!0)}updateChargeOption(){const s=this.gear.option(i.incPAD).base<this.gear.option(i.incMAD).base?i.incMAD:i.incPAD;return this.chargeOption.clear(),this.chargeOption.set(s,this.getChargeAD()),!0}getChargeAD(){if(!this.enchanted||this.charge===0)return 0;const o=Math.min(Math.ceil(this.charge/100)-1,5);if(this.soul){const s=this.soul.multiplier;return 10+o*s}return 5+o}}const E=class{constructor(){this.itemID=0,this.name="",this.desc="",this.type=0,this.props=new Map,this.options=new Map,this.exceptionalOptions=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.upgradeFailCount=0,this.hammerCount=0,this.exceptionalTotalUpgradeCount=0,this.exceptionalUpgradeCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=X.normal,this.potentials=[],this.additionalGrade=X.normal,this.additionalPotentials=[],this.soulWeapon=new J(this),this.icon={id:0,origin:[0,0]},this.req={level:0,str:0,dex:0,int:0,luk:0,job:0,specJob:0}}get upgradeCountLeft(){return this.totalUpgradeCount+this.hammerCount-this.upgradeCount-this.upgradeFailCount}get exceptionalUpgradeCountLeft(){return this.exceptionalTotalUpgradeCount-this.exceptionalUpgradeCount}get diff(){let t=0;for(const[o,s]of this.options)t+=Math.floor(s.diff/E.getPropTypeWeight(o));return t}get isNewBonusType(){return!!([...this.options.values()].some(o=>o.bonus>0)&&this.getPropValue(i.tradeAvailable)!==1)}option(t){return this.options.has(t)||this.options.set(t,new N),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return(this.props.get(t)??0)>0}setAnvil(t,o){this.anvilIcon=t,this.anvilName=o}resetAnvil(){this.anvilIcon=void 0,this.anvilName=void 0}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==f.katara||Math.floor(t/10)===121}static isDoubleHandWeapon(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}static isSubWeapon(t){switch(t){case f.katara:case f.shield:case f.demonShield:case f.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case f.shield:case f.demonShield:case f.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110||t===f.soulShield||t===f.demonShield}static isAccessory(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}static isMechanicGear(t){return t>=161&&t<=165}static isDragonGear(t){return t>=194&&t<=197}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return f.soulShield;case 1099:return f.demonShield;case 1212:return f.shiningRod;case 1213:return f.tuner;case 1214:return f.breathShooter;case 1404:return f.chakram}if(Math.floor(t/1e4)===135)switch(Math.floor(t/100)){case 13522:case 13528:case 13529:case 13540:return Math.floor(t/10);default:return Math.floor(t/100)*10}if(Math.floor(t/1e4)===119)switch(Math.floor(t/100)){case 11902:return Math.floor(t/10)}return Math.floor(t/1e4)}static getMaxStar(t){if(t.totalUpgradeCount<=0||t.getBooleanValue(i.onlyUpgrade)||E.isMechanicGear(t.type)||E.isDragonGear(t.type))return 0;let o;const s=t.req.level;for(const a of E.starData)if(s>=a[0])o=a;else break;return o===void 0?0:t.getBooleanValue(i.superiorEqp)?o[2]:o[1]}static getPropTypeWeight(t){if(t<100)switch(t){case i.incSTR:case i.incDEX:case i.incINT:case i.incLUK:case i.incPAD:case i.incMAD:case i.incSpeed:case i.incJump:return 1;case i.incMHP:case i.incMMP:return 100;case i.incPDD:return 10;case i.incAD:return 2}return Number.MAX_VALUE}};let D=E;D.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class x{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const o=[...this.option.keys()];o.sort((a,r)=>i[r].length-i[a].length);let s=this.summary;for(const a of o)s=s.replace(`#${i[a]}`,(this.option.get(a)??0).toString());return s}static getPotentialLevel(o){return o<=0?1:o>=250?25:Math.floor((o+9)/10)}static checkOptionType(o,s){switch(o){case 0:return!0;case 10:return D.isWeapon(s)||D.isSubWeapon(s)||s===f.emblem;case 11:return!x.checkOptionType(10,s);case 20:return D.isSubWeapon(s)||s===f.cap||s===f.coat||s===f.longcoat||s===f.pants||s===f.shoes||s===f.glove||s===f.cape||s===f.belt||s===f.shoulder;case 40:return s===f.faceAccessory||s===f.eyeAccessory||s===f.earrings||s===f.ring||s===f.pendant;case 51:return s===f.cap;case 52:return s===f.coat||s===f.longcoat;case 53:return s===f.pants;case 54:return s===f.glove;case 55:return s===f.shoes;default:return!1}}}var h=(t=>(t[t.STR=0]="STR",t[t.DEX=1]="DEX",t[t.INT=2]="INT",t[t.LUK=3]="LUK",t[t.STR_DEX=4]="STR_DEX",t[t.STR_INT=5]="STR_INT",t[t.STR_LUK=6]="STR_LUK",t[t.DEX_INT=7]="DEX_INT",t[t.DEX_LUK=8]="DEX_LUK",t[t.INT_LUK=9]="INT_LUK",t[t.MHP=10]="MHP",t[t.MMP=11]="MMP",t[t.PAD=12]="PAD",t[t.MAD=13]="MAD",t[t.PDD=14]="PDD",t[t.speed=15]="speed",t[t.jump=16]="jump",t[t.damR=17]="damR",t[t.bdR=18]="bdR",t[t.allStatR=19]="allStatR",t[t.reduceReq=20]="reduceReq",t))(h||{});function p(t,o,s){const a=B(t,o,s);if(a.size===0)return!1;for(const[r,u]of a)t.option(r).bonus+=u;return!0}function G(t){for(const[,o]of t.options)o.bonus=0;return!0}function B(t,o,s){const a=o0(o),r=Q(t,o,s);return r===0?new Map:new Map(a.map(u=>[u,r]))}function Q(t,o,s){const a=t.req.level,r=t.getBooleanValue(i.bossReward),u=t.type;if(a<0||r&&s<3)return 0;switch(o){case h.STR:case h.DEX:case h.INT:case h.LUK:return K(a,s);case h.STR_DEX:case h.STR_INT:case h.STR_LUK:case h.DEX_INT:case h.DEX_LUK:case h.INT_LUK:return e(a,s);case h.PDD:return K(a,s);case h.PAD:case h.MAD:return t0(a,s,o,t.type,r,t.option(i.incPAD).base,t.option(i.incMAD).base);case h.MHP:case h.MMP:return n0(a,s);case h.speed:case h.jump:return D.isWeapon(u)?0:s;case h.damR:return D.isWeapon(u)?s:0;case h.bdR:return a<90||!D.isWeapon(u)?0:2*s;case h.allStatR:return a<70&&!D.isWeapon(u)?0:s;case h.reduceReq:return c0(a,s);default:return 0}}function K(t,o){return t>=250?Math.floor(t/20)*o:(Math.floor(t/20)+1)*o}function e(t,o){return(Math.floor(t/40)+1)*o}function t0(t,o,s,a,r,u,M){if(D.isWeapon(a)){const c=r?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];let n=u;if(a===f.heavySword||a===f.longSword){if(a===f.longSword)switch(n){case 100:n=102;break;case 103:n=105;break;case 105:n=107;break;case 112:n=114;break;case 117:n=121;break;case 135:n=139;break;case 169:n=173;break;case 203:n=207;break;case 293:n=297;break;case 337:n=342;break}const A=t>180?6:t>160?5:t>110?4:3;return Math.ceil(n*c[o-1]*A/100)}else if(s===h.MAD&&M>=n&&(n=M),r){const A=t>160?18:t>150?15:t>110?12:9;return Math.ceil(n*c[o-1]*A/100)}else{const A=t>110?4:3;return Math.ceil(n*c[o-1]*A/100)}}else if(t<60)return 0;return o}function n0(t,o){return t<10?3*o:t>=250?700*o:Math.floor(t/10)*30*o}function c0(t,o){return o*5}function o0(t){switch(t){case h.STR:return[i.incSTR];case h.DEX:return[i.incDEX];case h.INT:return[i.incINT];case h.LUK:return[i.incLUK];case h.STR_DEX:return[i.incSTR,i.incDEX];case h.STR_INT:return[i.incSTR,i.incINT];case h.STR_LUK:return[i.incSTR,i.incLUK];case h.DEX_INT:return[i.incDEX,i.incINT];case h.DEX_LUK:return[i.incDEX,i.incLUK];case h.INT_LUK:return[i.incINT,i.incLUK];case h.PDD:return[i.incPDD];case h.PAD:return[i.incPAD];case h.MAD:return[i.incMAD];case h.MHP:return[i.incMHP];case h.MMP:return[i.incMMP];case h.speed:return[i.incSpeed];case h.jump:return[i.incJump];case h.damR:return[i.damR];case h.bdR:return[i.bdR];case h.allStatR:return[i.statR];case h.reduceReq:return[i.reduceReq];default:return[]}}const i0=25,O=15;function Z(t,o=!1){if(t.getBooleanValue(i.incCHUC))return!1;if(t.getBooleanValue(i.superiorEqp))return s0(t);if(t.star>=t.maxStar&&!o||t.star>=i0)return!1;t.star+=1;const s=t.star,a=R(t,!1,!1),r=R(t,!1,!0),u=D.isWeapon(t.type)||t.type===f.katara,M=[[i.incSTR,i.incDEX],[i.incINT,i.incLUK],[i.incDEX,i.incSTR],[i.incLUK,i.incDEX],[i.incSTR,i.incDEX]],c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];let n;const A=t.req.job;if(A===0)n=new Set([i.incSTR,i.incDEX,i.incINT,i.incLUK]);else{n=new Set;for(let d=0;d<5;d++)if(A&1<<d)for(const S of M[d])n.add(S)}for(const d of c)(n.has(d)||s>15&&(t.option(d).base>0||t.option(d).upgrade>0))&&(t.option(d).enchant+=a[s]);if(u){const d=A===0||Math.floor(A/2)%2===1||t.option(i.incMAD).upgrade>0;if(s>15)t.option(i.incPAD).enchant+=r[s],d&&(t.option(i.incMAD).enchant+=r[s]);else{const S=t.option(i.incPAD).sum-t.option(i.incPAD).bonus;if(t.option(i.incPAD).enchant+=Math.floor(S/50)+1,d){const T=t.option(i.incMAD).sum-t.option(i.incMAD).bonus;t.option(i.incMAD).enchant+=Math.floor(T/50)+1}}}else t.option(i.incPAD).enchant+=r[s],t.option(i.incMAD).enchant+=r[s],t.type===f.glove&&(A===0?(t.option(i.incPAD).enchant+=U[s],t.option(i.incMAD).enchant+=U[s]):Math.floor(A/2)%2===1?t.option(i.incMAD).enchant+=U[s]:t.option(i.incPAD).enchant+=U[s]);if(!u&&t.type!==f.machineHeart){const d=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;t.option(i.incPDD).enchant+=Math.floor(d/20)+1}const b=[f.cap,f.coat,f.longcoat,f.pants,f.cape,f.ring,f.pendant,f.belt,f.shoulder,f.shield];return u?(t.option(i.incMHP).enchant+=L[s],t.option(i.incMMP).enchant+=L[s]):b.includes(t.type)&&(t.option(i.incMHP).enchant+=L[s]),t.type===f.shoes&&(t.option(i.incSpeed).enchant+=W[s],t.option(i.incJump).enchant+=W[s]),!0}function s0(t){if(t.star>=t.maxStar)return!1;t.star+=1;const o=t.star,s=R(t,!1,!1),a=R(t,!1,!0),r=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const c of r)t.option(c).base>0&&(t.option(c).enchant+=s[o]);const u=[i.incPAD,i.incMAD];for(const c of u)t.option(c).base>0&&(t.option(c).enchant+=a[o]);const M=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;return t.option(i.incPDD).enchant+=Math.floor(M/20)+1,!0}function a0(t,o=!1,s=!1){if(t.getBooleanValue(i.incCHUC)||t.getBooleanValue(i.superiorEqp)||t.req.level>150||t.star>=t.maxStar&&!s||t.star>=O)return!1;t.amazing||(t.amazing=!0,t.maxStar=Math.min(t.maxStar,O)),t.star+=1;const a=t.star,r=R(t,!0,!1),u=R(t,!0,!0),M=D.isWeapon(t.type)||t.type===f.katara,c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const b of c)if(t.option(b).sum>0){let S=r[a];o&&D.isAccessory(t.type)&&(S+=a>5?2:1),t.option(b).enchant+=S}const n=[i.incPAD,i.incMAD];for(const b of n){const d=t.option(b).sum;if(d>0){M&&(t.option(b).enchant+=Math.floor(d/50)+1);let S=u[a];o&&(M||t.type===f.shield)&&(S+=1),t.option(b).enchant+=S}}o&&D.isArmor(t.type)&&(t.option(i.incMHP).enchant+=50);const A=t.option(i.incPDD).sum;return t.option(i.incPDD).enchant+=Math.floor(A/20)+1,!0}function Y(t){if(t.getBooleanValue(i.incCHUC))return!1;t.star=0,t.amazing=!1,t.maxStar=D.getMaxStar(t);for(const[,o]of t.options)o.enchant=0;return!0}function f0(t){if(t.getBooleanValue(i.incCHUC)||t.amazing)return!1;const o=t.star;Y(t);for(let s=0;s<o;s++)Z(t,!0);return!0}function R(t,o,s){let a;t.getBooleanValue(i.superiorEqp)?s?a=r0:a=h0:o?s?a=A0:a=M0:s?D.isWeapon(t.type)||t.type===f.katara?a=u0:a=d0:a=D0;const r=t.req.level;for(const u of[...a].reverse())if(r>=u[0])return u;throw Error(`Gear has invalid reqLevel.
2
- `+t)}const r0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[110,0,0,0,0,0,5,6,7,0,0,0,0,0,0,0],[150,0,0,0,0,0,9,10,11,12,13,15,17,19,21,23]],h0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],u0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6,7,8,9,27,28,29],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6,7,8,9,10,28,29,30],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,7,8,9,10,11,29,30,31],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,9,10,11,12,30,31,32],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,10,11,12,13,31,32,33],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,10,11,12,13,14,32,33,34],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,14,14,15,16,17,34,35,36],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,16,16,17,18,19,36,37,38]],d0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7,8,9,10,12,13,15,17],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,13,14,16,18],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,17,19,21,23],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,14,15,16,17,19,21,23,25],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,15,16,17,18,19,21,23,25,27]],D0=[[0,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0],[108,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0],[118,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,0,0,0],[128,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,0,0,0],[138,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,9,9,9,9,9,9,9,0,0,0],[148,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,11,11,11,11,11,11,11,0,0,0],[158,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,13,13,13,13,13,13,13,0,0,0],[198,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,15,15,15,15,15,15,15,0,0,0],[248,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,0,0,0]],A0=[[0,0,0,0,0,0,1,2,3,4,5,6,8,10,12,14],[80,0,0,0,0,0,2,3,4,5,6,7,9,11,13,15],[90,0,0,0,0,0,3,4,5,6,7,8,10,12,14,16],[100,0,0,0,0,0,4,5,6,7,8,9,11,13,15,17],[110,0,0,0,0,0,5,6,7,8,9,10,12,14,16,18],[120,0,0,0,0,0,6,7,8,9,10,11,13,15,17,19],[130,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[140,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[150,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22]],M0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[85,3,4,6,9,13,0,0,0,0,0,0,0,0,0,0],[90,4,5,7,10,14,0,0,0,0,0,0,0,0,0,0],[95,5,6,8,11,15,0,0,0,0,0,0,0,0,0,0],[100,7,8,10,13,17,0,0,0,0,0,0,0,0,0,0],[105,8,9,11,14,18,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[115,10,11,13,16,20,0,0,0,0,0,0,0,0,0,0],[120,12,13,15,18,22,0,0,0,0,0,0,0,0,0,0],[125,13,14,16,19,23,0,0,0,0,0,0,0,0,0,0],[130,14,15,17,20,24,0,0,0,0,0,0,0,0,0,0],[135,15,16,18,21,25,0,0,0,0,0,0,0,0,0,0],[140,17,18,20,23,27,0,0,0,0,0,0,0,0,0,0],[145,18,19,21,24,28,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],U=[0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0],L=[0,5,5,5,10,10,15,15,20,20,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0],W=[0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0];function S0(t,o){if(t.exceptionalUpgradeCountLeft<1)return!1;t.exceptionalUpgradeCount+=1;for(const[s,a]of o.option){const r=t.exceptionalOptions.get(s)??0;t.exceptionalOptions.set(s,r+a)}return!0}function b0(t){return t.exceptionalUpgradeCount=0,t.exceptionalOptions.clear(),!0}function P(t,o,s){if(D.isWeapon(t.type)||t.type===f.katara)return w0(t,o,s);if(t.type===f.glove)return C0(t,o,s);if(D.isArmor(t.type)||t.type===f.shoulder)return E0(t,o,s);if(D.isAccessory(t.type))return U0(t,o,s);if(t.type===f.machineHeart)return X0(t,o,s)}const v0={100:[[1,0],[2,0],[3,1]],70:[[2,0],[3,1],[5,2]],30:[[3,1],[5,2],[7,3]],15:[[5,2],[7,3],[9,4]]},g0={100:[[1,5,1],[2,20,2],[3,30,3]],70:[[2,15,2],[3,40,4],[4,70,5]],30:[[3,30,4],[5,70,7],[7,120,10]],15:[[4,45,6],[7,110,10],[10,170,15]]},_={30:[1,2,3],15:[2,3,4]},q={30:[1,2,3]},R0={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},z={100:[1,1,2],70:[2,2,3],30:[3,4,5]},V={100:[1,2,3],70:[2,3,5],30:[3,5,7]},I={[i.incSTR]:i.incPAD,[i.incDEX]:i.incPAD,[i.incINT]:i.incMAD,[i.incLUK]:i.incPAD,[i.incMHP]:i.incPAD,[i.incAllStat]:i.incPAD},w={[i.incSTR]:"힘",[i.incDEX]:"민첩",[i.incINT]:"지력",[i.incLUK]:"운",[i.incMHP]:"체력",[i.incAllStat]:"올스탯",[i.incPAD]:"공격력",[i.incMAD]:"마력"};function C(t){return t.req.level>110?2:t.req.level>70?1:0}function w0(t,o,s){if(o===i.incAllStat)return;const a=C(t);let[r,u]=v0[s][a];const M=I[o],c=w[M];return o===i.incMHP&&(u*=50),{name:u>0?`${s}% ${c}(${w[o]}) 주문서`:`${s}% ${c} 주문서`,option:new Map([[o,u],[M,r]])}}function E0(t,o,s){const a=C(t),[r,u,M]=g0[s][a];let c=[],n=[],A=[];if(o===i.incMHP)n=[[i.incMHP,u+r*50]];else if(n=[[i.incMHP,u]],o===i.incAllStat){if(!(s in _))return;const S=_[s][a];c=[[i.incSTR,S],[i.incDEX,S],[i.incINT,S],[i.incLUK,S]]}else c=[[o,r]];t.upgradeCount===3&&(t.req.job===0?A=[[i.incPAD,1],[i.incMAD,1]]:Math.floor(t.req.job/2)%2===1?A=[[i.incMAD,1]]:A=[[i.incPAD,1]]);const b=`${s}% ${w[o]} 주문서`,d=new Map([...c,...A,...n,[i.incPDD,M]]);return{name:b,option:d}}function C0(t,o,s){const a=C(t),r=R0[s][a];if(r===0)return{name:`${s}% 방어력 주문서`,option:new Map([[i.incPDD,3]])};{const u=I[o];return{name:`${s}% ${w[u]} 주문서`,option:new Map([[u,r]])}}}function U0(t,o,s){if(!(s in z))return;const a=C(t),r=z[s][a];let u=[];if(o===i.incMHP)u=[[i.incMHP,r*50]];else if(o===i.incAllStat){if(!(s in q))return;const n=q[s][a];u=[[i.incSTR,n],[i.incDEX,n],[i.incINT,n],[i.incLUK,n]]}else u=[[o,r]];const M=`${s}% ${w[o]} 주문서`,c=new Map(u);return{name:M,option:c}}function X0(t,o,s){if(!(s in V))return;const a=C(t),r=V[s][a],u=I[o];return{name:`${s}% ${w[o]} 주문서`,option:new Map([[u,r]])}}function x0(t){return t.getBooleanValue(i.blockGoldHammer)||t.getBooleanValue(i.onlyUpgrade)||t.totalUpgradeCount<=0||t.hammerCount>0?!1:(t.hammerCount=1,!0)}function l(t,o){if(t.upgradeCountLeft<1)return!1;t.upgradeCount+=1;for(const[s,a]of o.option)t.option(s).upgrade+=a;return!0}function L0(t,o,s){const a=P(t,o,s);return a?l(t,a):!1}function N0(t){return t.upgradeCountLeft<1?!1:(t.upgradeFailCount+=1,!0)}function I0(t){return t.upgradeFailCount<1?!1:(t.upgradeFailCount-=1,!0)}function H0(t){t.upgradeCount=0,t.upgradeFailCount=0,t.hammerCount=0;for(const[,o]of t.options)o.upgrade=0;return!0}function y(t){const o={};o.id=t.itemID,o.n=t.name,t.desc.length>0&&(o.d=t.desc),o.i=t.icon,t.anvilIcon&&(o.i2=t.anvilIcon),t.anvilName&&(o.n2=t.anvilName),o.t=t.type,o.r=t.req,o.pr=v(t.props,a=>a!==0),o.o=v(t.options,a=>!a.empty,K0),t.totalUpgradeCount>0&&(o.c=t.totalUpgradeCount),t.upgradeCount>0&&(o.up=t.upgradeCount),t.upgradeFailCount>0&&(o.f=t.upgradeFailCount),t.hammerCount>0&&(o.h=t.hammerCount),t.exceptionalTotalUpgradeCount>0&&(o.ec=t.exceptionalTotalUpgradeCount),t.exceptionalUpgradeCount>0&&(o.eu=t.exceptionalUpgradeCount),o.eo=v(t.exceptionalOptions,a=>a!==0),t.maxStar>0&&(o.m=t.maxStar),t.star>0&&(o.s=t.star),t.amazing&&(o.a=t.amazing),t.karma!==void 0&&(o.k=t.karma),t.canPotential&&(o.cp=t.canPotential),t.grade>0&&(o.g=t.grade),t.grade>0&&t.potentials.length>0&&(o.p=$(t.potentials,void 0,j)),t.additionalGrade>0&&(o.g2=t.additionalGrade),t.additionalGrade>0&&t.additionalPotentials.length>0&&(o.p2=$(t.additionalPotentials,void 0,j));const s=O0(t.soulWeapon);return s&&(o.w=s),o}function K0(t){return[t.base,t.bonus,t.upgrade,t.enchant]}function j(t){return t?{c:t.code,t:t.optionType,l:t.reqLevel,s:t.summary,o:v(t.option,o=>o!==0)}:null}function O0(t){const o={};if(t.enchanted&&(o.e=t.enchanted),t.soul&&(o.s=W0(t.soul)),t.charge>0&&(o.c=t.charge),t.chargeOption.size>0&&(o.o=v(t.chargeOption,s=>s!==0)),Object.keys(o).length>0)return o}function W0(t){return t?{n:t.name,s:t.skill,o:v(t.option,o=>o!==0),m:t.multiplier}:void 0}const m=t=>{const o=c=>typeof c.id=="number"&&typeof c.n=="string"&&(c.d===void 0||typeof c.d=="string")&&typeof c.i=="object"&&c.i!==null&&s(c.i)&&(c.i2===void 0||typeof c.i2=="object"&&c.i2!==null&&s(c.i2))&&(c.n2===void 0||typeof c.n2=="string")&&(c.t===100||c.t===101||c.t===102||c.t===103||c.t===104||c.t===105||c.t===106||c.t===107||c.t===108||c.t===110||c.t===111||c.t===112||c.t===113||c.t===114||c.t===115||c.t===116||c.t===118||c.t===166||c.t===167||c.t===109||c.t===119||c.t===119020||c.t===1212||c.t===1213||c.t===1214||c.t===122||c.t===123||c.t===124||c.t===126||c.t===127||c.t===128||c.t===129||c.t===130||c.t===131||c.t===132||c.t===133||c.t===134||c.t===136||c.t===137||c.t===138||c.t===140||c.t===1404||c.t===141||c.t===142||c.t===143||c.t===144||c.t===145||c.t===146||c.t===147||c.t===148||c.t===149||c.t===150||c.t===151||c.t===152||c.t===153||c.t===156||c.t===157||c.t===158||c.t===159||c.t===1098||c.t===1099||c.t===135200||c.t===135210||c.t===135220||c.t===135221||c.t===135222||c.t===135223||c.t===135224||c.t===135225||c.t===135226||c.t===135227||c.t===135228||c.t===135229||c.t===135240||c.t===135250||c.t===135260||c.t===135270||c.t===135290||c.t===135291||c.t===135292||c.t===135293||c.t===135294||c.t===135295||c.t===135296||c.t===135297||c.t===135298||c.t===135300||c.t===135310||c.t===135320||c.t===135330||c.t===135340||c.t===135350||c.t===135360||c.t===135370||c.t===135380||c.t===135400||c.t===135401||c.t===135402||c.t===135403||c.t===180||c.t===161||c.t===162||c.t===163||c.t===164||c.t===165||c.t===194||c.t===195||c.t===196||c.t===197)&&typeof c.r=="object"&&c.r!==null&&a(c.r)&&Array.isArray(c.pr)&&c.pr.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&Array.isArray(n[1])&&n[1].length===4&&typeof n[1][0]=="number"&&typeof n[1][1]=="number"&&typeof n[1][2]=="number"&&typeof n[1][3]=="number")&&(c.c===void 0||typeof c.c=="number")&&(c.up===void 0||typeof c.up=="number")&&(c.f===void 0||typeof c.f=="number")&&(c.h===void 0||typeof c.h=="number")&&(c.ec===void 0||typeof c.ec=="number")&&(c.eu===void 0||typeof c.eu=="number")&&(c.eo===void 0||Array.isArray(c.eo)&&c.eo.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"))&&(c.m===void 0||typeof c.m=="number")&&(c.s===void 0||typeof c.s=="number")&&(c.a===void 0||typeof c.a=="boolean")&&(c.k===void 0||typeof c.k=="number")&&(c.cp===void 0||typeof c.cp=="boolean")&&(c.g===void 0||c.g===0||c.g===1||c.g===2||c.g===3||c.g===4||c.g===5)&&(c.p===void 0||Array.isArray(c.p)&&c.p.every(n=>typeof n=="object"&&n!==null&&r(n)))&&(c.g2===void 0||c.g2===0||c.g2===1||c.g2===2||c.g2===3||c.g2===4||c.g2===5)&&(c.p2===void 0||Array.isArray(c.p2)&&c.p2.every(n=>typeof n=="object"&&n!==null&&r(n)))&&(c.w===void 0||typeof c.w=="object"&&c.w!==null&&Array.isArray(c.w)===!1&&u(c.w)),s=c=>typeof c.id=="number"&&Array.isArray(c.origin)&&c.origin.length===2&&typeof c.origin[0]=="number"&&typeof c.origin[1]=="number",a=c=>typeof c.level=="number"&&typeof c.str=="number"&&typeof c.luk=="number"&&typeof c.dex=="number"&&typeof c.int=="number"&&typeof c.job=="number"&&typeof c.specJob=="number",r=c=>typeof c.c=="number"&&typeof c.t=="number"&&typeof c.l=="number"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"),u=c=>(c.e===void 0||typeof c.e=="boolean")&&(c.s===void 0||typeof c.s=="object"&&c.s!==null&&M(c.s))&&(c.c===void 0||typeof c.c=="number")&&(c.o===void 0||Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")),M=c=>typeof c.n=="string"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&typeof c.m=="number";return typeof t=="object"&&t!==null&&o(t)};function _0(t){return JSON.stringify(y(t))}function q0(t){return H(JSON.parse(t))}function z0(t){try{const o=JSON.parse(t);if(m(o))return H(o)}catch{}return null}function v(t,o,s){let a=[...t];return o&&(a=a.filter(r=>o(r[1]))),s?a.map(r=>[r[0],s(r[1])]):a}function $(t,o,s){let a=t;return o&&(a=a.filter(o)),s?a.map(s):a===t?[...t]:a}function g(t,o){return o?new Map(t.map(s=>[s[0],o(s[1])])):new Map(t)}function k(t,o){return o?[...t].map(o):[...t]}function H(t){const o=new D;return o.itemID=t.id,o.name=t.n,t.d&&(o.desc=t.d),o.icon=t.i,t.i2&&t.n2&&(o.anvilIcon=t.i2,o.anvilName=t.n2),o.type=t.t,o.req=t.r,o.props=g(t.pr),o.options=g(t.o,V0),t.c&&(o.totalUpgradeCount=t.c),t.up&&(o.upgradeCount=t.up),t.f&&(o.upgradeFailCount=t.f),t.h&&(o.hammerCount=t.h),t.ec&&(o.exceptionalTotalUpgradeCount=t.ec),t.eu&&(o.exceptionalUpgradeCount=t.eu),t.eo&&(o.exceptionalOptions=g(t.eo)),t.m&&(o.maxStar=t.m),t.s&&(o.star=t.s),t.a&&(o.amazing=t.a),t.k&&(o.karma=t.k),t.cp&&(o.canPotential=t.cp),t.g&&(o.grade=t.g),t.p&&(o.potentials=k(t.p,F)),t.g2&&(o.additionalGrade=t.g2),t.p2&&(o.additionalPotentials=k(t.p2,F)),j0(t.w,o),o}function V0(t){const o=new N;return o.base=t[0],o.bonus=t[1],o.upgrade=t[2],o.enchant=t[3],o}function F(t){if(!t)return null;const o=new x;return o.code=t.c,o.optionType=t.t,o.reqLevel=t.l,o.summary=t.s,o.option=g(t.o),o}function j0(t,o){if(t){const s=o.soulWeapon;t?.e&&(s.enchanted=t.e),t?.s&&(s.soul=$0(t.s)),t?.c&&(s.charge=t.c),t?.o&&(s.chargeOption=g(t.o))}}function $0(t){if(t)return{name:t.n,skill:t.s,option:g(t.o),multiplier:t.m}}exports.BonusStatType=h;exports.Gear=D;exports.GearOption=N;exports.GearPropType=i;exports.GearType=f;exports.Potential=x;exports.PotentialGrade=X;exports.SoulWeapon=J;exports.addAmazingEnhancement=a0;exports.addBonusStat=p;exports.addStarforce=Z;exports.addUpgradeFailCount=N0;exports.applyExceptionalEnchant=S0;exports.applyGoldHammer=x0;exports.applyScroll=l;exports.applySpellTrace=L0;exports.gearToPlain=y;exports.getBonusStatOption=B;exports.getBonusStatValue=Q;exports.getSpellTraceScroll=P;exports.isGearLike=m;exports.parseGear=q0;exports.plainToGear=H;exports.recalculateStarforce=f0;exports.resetBonusStat=G;exports.resetEnhancement=Y;exports.resetExceptionalEnchant=b0;exports.resetUpgrade=H0;exports.restoreUpgradeCount=I0;exports.stringifyGear=_0;exports.validateParseGear=z0;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class H{constructor(){this.base=0,this.bonus=0,this.upgrade=0,this.enchant=0}get empty(){return this.base===0&&this.bonus===0&&this.upgrade===0&&this.enchant===0}get sum(){return Math.max(0,this.base+this.bonus+this.upgrade+this.enchant)}get diff(){return this.bonus+this.upgrade+this.enchant}}var i=(t=>(t[t.incSTR=1]="incSTR",t[t.incSTRr=2]="incSTRr",t[t.incDEX=3]="incDEX",t[t.incDEXr=4]="incDEXr",t[t.incINT=5]="incINT",t[t.incINTr=6]="incINTr",t[t.incLUK=7]="incLUK",t[t.incLUKr=8]="incLUKr",t[t.incAllStat=9]="incAllStat",t[t.incMHP=10]="incMHP",t[t.incMMP=11]="incMMP",t[t.incMHPr=12]="incMHPr",t[t.incMMPr=13]="incMMPr",t[t.incMDF=14]="incMDF",t[t.incARC=15]="incARC",t[t.incAUT=16]="incAUT",t[t.incPAD=17]="incPAD",t[t.incMAD=18]="incMAD",t[t.incAD=19]="incAD",t[t.incPDD=20]="incPDD",t[t.incSpeed=21]="incSpeed",t[t.incJump=22]="incJump",t[t.knockback=23]="knockback",t[t.bdR=24]="bdR",t[t.incBDR=25]="incBDR",t[t.imdR=26]="imdR",t[t.incIMDR=27]="incIMDR",t[t.damR=28]="damR",t[t.nbdR=29]="nbdR",t[t.statR=30]="statR",t[t.incCHUC=31]="incCHUC",t[t.incPADr=100]="incPADr",t[t.incMADr=101]="incMADr",t[t.incPDDr=102]="incPDDr",t[t.incCr=103]="incCr",t[t.incDAMr=104]="incDAMr",t[t.RecoveryHP=105]="RecoveryHP",t[t.RecoveryMP=106]="RecoveryMP",t[t.face=107]="face",t[t.prop=108]="prop",t[t.time=109]="time",t[t.HP=110]="HP",t[t.MP=111]="MP",t[t.attackType=112]="attackType",t[t.ignoreTargetDEF=113]="ignoreTargetDEF",t[t.ignoreDAM=114]="ignoreDAM",t[t.ignoreDAMr=115]="ignoreDAMr",t[t.DAMreflect=116]="DAMreflect",t[t.mpconReduce=117]="mpconReduce",t[t.incMesoProp=118]="incMesoProp",t[t.incRewardProp=119]="incRewardProp",t[t.incAllskill=120]="incAllskill",t[t.RecoveryUP=121]="RecoveryUP",t[t.boss=122]="boss",t[t.level=123]="level",t[t.incTerR=124]="incTerR",t[t.incAsrR=125]="incAsrR",t[t.incEXPr=126]="incEXPr",t[t.reduceCooltime=127]="reduceCooltime",t[t.incSTRlv=128]="incSTRlv",t[t.incDEXlv=129]="incDEXlv",t[t.incINTlv=130]="incINTlv",t[t.incLUKlv=131]="incLUKlv",t[t.incMHPlv=132]="incMHPlv",t[t.incPADlv=133]="incPADlv",t[t.incMADlv=134]="incMADlv",t[t.incCriticaldamage=135]="incCriticaldamage",t[t.attackSpeed=200]="attackSpeed",t[t.setItemID=201]="setItemID",t[t.durability=202]="durability",t[t.reduceReq=203]="reduceReq",t[t.only=1100]="only",t[t.tradeBlock=1101]="tradeBlock",t[t.accountSharable=1102]="accountSharable",t[t.onlyEquip=1103]="onlyEquip",t[t.tradeAvailable=1104]="tradeAvailable",t[t.equipTradeBlock=1105]="equipTradeBlock",t[t.sharableOnce=1106]="sharableOnce",t[t.charismaEXP=1107]="charismaEXP",t[t.senseEXP=1108]="senseEXP",t[t.insightEXP=1109]="insightEXP",t[t.willEXP=1110]="willEXP",t[t.craftEXP=1111]="craftEXP",t[t.charmEXP=1112]="charmEXP",t[t.accountShareTag=1113]="accountShareTag",t[t.bossReward=1114]="bossReward",t[t.noPotential=1115]="noPotential",t[t.fixedPotential=1116]="fixedPotential",t[t.specialGrade=1117]="specialGrade",t[t.fixedGrade=1118]="fixedGrade",t[t.superiorEqp=1119]="superiorEqp",t[t.incPQEXPr=1120]="incPQEXPr",t[t.jokerToSetItem=1121]="jokerToSetItem",t[t.blockGoldHammer=1122]="blockGoldHammer",t[t.exceptUpgrade=1123]="exceptUpgrade",t[t.onlyUpgrade=1124]="onlyUpgrade",t[t.noLookChange=1125]="noLookChange",t[t.tucIgnoreForPotential=1126]="tucIgnoreForPotential",t))(i||{}),f=(t=>(t[t.cap=100]="cap",t[t.faceAccessory=101]="faceAccessory",t[t.eyeAccessory=102]="eyeAccessory",t[t.earrings=103]="earrings",t[t.coat=104]="coat",t[t.longcoat=105]="longcoat",t[t.pants=106]="pants",t[t.shoes=107]="shoes",t[t.glove=108]="glove",t[t.cape=110]="cape",t[t.ring=111]="ring",t[t.pendant=112]="pendant",t[t.belt=113]="belt",t[t.medal=114]="medal",t[t.shoulder=115]="shoulder",t[t.pocket=116]="pocket",t[t.badge=118]="badge",t[t.android=166]="android",t[t.machineHeart=167]="machineHeart",t[t.shield=109]="shield",t[t.emblem=119]="emblem",t[t.powerSource=119020]="powerSource",t[t.shiningRod=1212]="shiningRod",t[t.tuner=1213]="tuner",t[t.breathShooter=1214]="breathShooter",t[t.soulShooter=122]="soulShooter",t[t.desperado=123]="desperado",t[t.energySword=124]="energySword",t[t.espLimiter=126]="espLimiter",t[t.chain=127]="chain",t[t.magicGauntlet=128]="magicGauntlet",t[t.ritualFan=129]="ritualFan",t[t.ohSword=130]="ohSword",t[t.ohAxe=131]="ohAxe",t[t.ohBlunt=132]="ohBlunt",t[t.dagger=133]="dagger",t[t.katara=134]="katara",t[t.cane=136]="cane",t[t.wand=137]="wand",t[t.staff=138]="staff",t[t.thSword=140]="thSword",t[t.chakram=1404]="chakram",t[t.thAxe=141]="thAxe",t[t.thBlunt=142]="thBlunt",t[t.spear=143]="spear",t[t.polearm=144]="polearm",t[t.bow=145]="bow",t[t.crossbow=146]="crossbow",t[t.claw=147]="claw",t[t.knuckle=148]="knuckle",t[t.gun=149]="gun",t[t.shovel=150]="shovel",t[t.pickaxe=151]="pickaxe",t[t.dualBowguns=152]="dualBowguns",t[t.handCannon=153]="handCannon",t[t.heavySword=156]="heavySword",t[t.longSword=157]="longSword",t[t.gauntletRevolver=158]="gauntletRevolver",t[t.ancientBow=159]="ancientBow",t[t.soulShield=1098]="soulShield",t[t.demonShield=1099]="demonShield",t[t.magicArrow=135200]="magicArrow",t[t.card=135210]="card",t[t.medallion=135220]="medallion",t[t.rosary=135221]="rosary",t[t.ironChain=135222]="ironChain",t[t.magicBook1=135223]="magicBook1",t[t.magicBook2=135224]="magicBook2",t[t.magicBook3=135225]="magicBook3",t[t.arrowFletching=135226]="arrowFletching",t[t.bowThimble=135227]="bowThimble",t[t.daggerScabbard=135228]="daggerScabbard",t[t.charm=135229]="charm",t[t.orb=135240]="orb",t[t.dragonEssence=135250]="dragonEssence",t[t.soulRing=135260]="soulRing",t[t.magnum=135270]="magnum",t[t.wristBand=135290]="wristBand",t[t.farSight=135291]="farSight",t[t.powderKeg=135292]="powderKeg",t[t.mass=135293]="mass",t[t.document=135294]="document",t[t.magicMarble=135295]="magicMarble",t[t.arrowhead=135296]="arrowhead",t[t.jewel=135297]="jewel",t[t.powderKeg2=135298]="powderKeg2",t[t.controller=135300]="controller",t[t.foxMarble=135310]="foxMarble",t[t.chessPiece=135320]="chessPiece",t[t.transmitter=135330]="transmitter",t[t.charge=135340]="charge",t[t.magicWing=135350]="magicWing",t[t.pathOfAbyss=135360]="pathOfAbyss",t[t.relic=135370]="relic",t[t.fanTassel=135380]="fanTassel",t[t.bracelet=135400]="bracelet",t[t.weaponBelt=135401]="weaponBelt",t[t.ornament=135402]="ornament",t[t.hexSeeker=135403]="hexSeeker",t[t.petEquip=180]="petEquip",t[t.machineEngine=161]="machineEngine",t[t.machineArms=162]="machineArms",t[t.machineLegs=163]="machineLegs",t[t.machineBody=164]="machineBody",t[t.machineTransistors=165]="machineTransistors",t[t.dragonMask=194]="dragonMask",t[t.dragonPendant=195]="dragonPendant",t[t.dragonWings=196]="dragonWings",t[t.dragonTail=197]="dragonTail",t))(f||{}),X=(t=>(t[t.normal=0]="normal",t[t.rare=1]="rare",t[t.epic=2]="epic",t[t.unique=3]="unique",t[t.legendary=4]="legendary",t[t.special=5]="special",t))(X||{});class J{constructor(o){this.enchanted=!1,this._charge=0,this.chargeOption=new Map,this.gear=o}get charge(){return this._charge}set charge(o){this.enchanted&&(o<0||o>1e3||(this._charge=o,this.updateChargeOption()))}enchant(){return this.enchanted||!D.isWeapon(this.gear.type)?!1:(this.enchanted=!0,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0)}disenchant(){return this.enchanted?(this.enchanted=!1,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0):!1}setSoul(o){return this.enchanted?(this.soul=o,this.updateChargeOption(),!0):!1}removeSoul(){return!this.enchanted||!this.soul?!1:(this.soul=void 0,this.updateChargeOption(),!0)}updateChargeOption(){const s=this.gear.option(i.incPAD).base<this.gear.option(i.incMAD).base?i.incMAD:i.incPAD;return this.chargeOption.clear(),this.chargeOption.set(s,this.getChargeAD()),!0}getChargeAD(){if(!this.enchanted||this.charge===0)return 0;const o=Math.min(Math.ceil(this.charge/100)-1,5);if(this.soul){const s=this.soul.multiplier;return 10+o*s}return 5+o}}const E=class{constructor(){this.itemID=0,this.name="",this.desc="",this.type=0,this.props=new Map,this.options=new Map,this.exceptionalOptions=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.upgradeFailCount=0,this.hammerCount=0,this.exceptionalTotalUpgradeCount=0,this.exceptionalUpgradeCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=X.normal,this.potentials=[],this.additionalGrade=X.normal,this.additionalPotentials=[],this.soulWeapon=new J(this),this.icon={id:0},this.req={level:0,str:0,dex:0,int:0,luk:0,job:0,specJob:0}}get upgradeCountLeft(){return this.totalUpgradeCount+this.hammerCount-this.upgradeCount-this.upgradeFailCount}get exceptionalUpgradeCountLeft(){return this.exceptionalTotalUpgradeCount-this.exceptionalUpgradeCount}get diff(){let t=0;for(const[o,s]of this.options)t+=Math.floor(s.diff/E.getPropTypeWeight(o));return t}get isNewBonusType(){return!!([...this.options.values()].some(o=>o.bonus>0)&&this.getPropValue(i.tradeAvailable)!==1)}option(t){return this.options.has(t)||this.options.set(t,new H),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return(this.props.get(t)??0)>0}setAnvil(t){this.anvil=t}resetAnvil(){this.anvil=void 0}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==f.katara||Math.floor(t/10)===121}static isDoubleHandWeapon(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}static isSubWeapon(t){switch(t){case f.katara:case f.shield:case f.demonShield:case f.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case f.shield:case f.demonShield:case f.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110||t===f.soulShield||t===f.demonShield}static isAccessory(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}static isMechanicGear(t){return t>=161&&t<=165}static isDragonGear(t){return t>=194&&t<=197}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return f.soulShield;case 1099:return f.demonShield;case 1212:return f.shiningRod;case 1213:return f.tuner;case 1214:return f.breathShooter;case 1404:return f.chakram}if(Math.floor(t/1e4)===135)switch(Math.floor(t/100)){case 13522:case 13528:case 13529:case 13540:return Math.floor(t/10);default:return Math.floor(t/100)*10}if(Math.floor(t/1e4)===119)switch(Math.floor(t/100)){case 11902:return Math.floor(t/10)}return Math.floor(t/1e4)}static getMaxStar(t){if(t.totalUpgradeCount<=0||t.getBooleanValue(i.onlyUpgrade)||E.isMechanicGear(t.type)||E.isDragonGear(t.type))return 0;let o;const s=t.req.level;for(const a of E.starData)if(s>=a[0])o=a;else break;return o===void 0?0:t.getBooleanValue(i.superiorEqp)?o[2]:o[1]}static getPropTypeWeight(t){if(t<100)switch(t){case i.incSTR:case i.incDEX:case i.incINT:case i.incLUK:case i.incPAD:case i.incMAD:case i.incSpeed:case i.incJump:return 1;case i.incMHP:case i.incMMP:return 100;case i.incPDD:return 10;case i.incAD:return 2}return Number.MAX_VALUE}};let D=E;D.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class x{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const o=[...this.option.keys()];o.sort((a,r)=>i[r].length-i[a].length);let s=this.summary;for(const a of o)s=s.replace(`#${i[a]}`,(this.option.get(a)??0).toString());return s}static getPotentialLevel(o){return o<=0?1:o>=250?25:Math.floor((o+9)/10)}static checkOptionType(o,s){switch(o){case 0:return!0;case 10:return D.isWeapon(s)||D.isSubWeapon(s)||s===f.emblem;case 11:return!x.checkOptionType(10,s);case 20:return D.isSubWeapon(s)||s===f.cap||s===f.coat||s===f.longcoat||s===f.pants||s===f.shoes||s===f.glove||s===f.cape||s===f.belt||s===f.shoulder;case 40:return s===f.faceAccessory||s===f.eyeAccessory||s===f.earrings||s===f.ring||s===f.pendant;case 51:return s===f.cap;case 52:return s===f.coat||s===f.longcoat;case 53:return s===f.pants;case 54:return s===f.glove;case 55:return s===f.shoes;default:return!1}}}var u=(t=>(t[t.STR=0]="STR",t[t.DEX=1]="DEX",t[t.INT=2]="INT",t[t.LUK=3]="LUK",t[t.STR_DEX=4]="STR_DEX",t[t.STR_INT=5]="STR_INT",t[t.STR_LUK=6]="STR_LUK",t[t.DEX_INT=7]="DEX_INT",t[t.DEX_LUK=8]="DEX_LUK",t[t.INT_LUK=9]="INT_LUK",t[t.MHP=10]="MHP",t[t.MMP=11]="MMP",t[t.PAD=12]="PAD",t[t.MAD=13]="MAD",t[t.PDD=14]="PDD",t[t.speed=15]="speed",t[t.jump=16]="jump",t[t.damR=17]="damR",t[t.bdR=18]="bdR",t[t.allStatR=19]="allStatR",t[t.reduceReq=20]="reduceReq",t))(u||{});function p(t,o,s){const a=B(t,o,s);if(a.size===0)return!1;for(const[r,h]of a)t.option(r).bonus+=h;return!0}function G(t){for(const[,o]of t.options)o.bonus=0;return!0}function B(t,o,s){const a=o0(o),r=Q(t,o,s);return r===0?new Map:new Map(a.map(h=>[h,r]))}function Q(t,o,s){const a=t.req.level,r=t.getBooleanValue(i.bossReward),h=t.type;if(a<0||r&&s<3)return 0;switch(o){case u.STR:case u.DEX:case u.INT:case u.LUK:return K(a,s);case u.STR_DEX:case u.STR_INT:case u.STR_LUK:case u.DEX_INT:case u.DEX_LUK:case u.INT_LUK:return e(a,s);case u.PDD:return K(a,s);case u.PAD:case u.MAD:return t0(a,s,o,t.type,r,t.option(i.incPAD).base,t.option(i.incMAD).base);case u.MHP:case u.MMP:return n0(a,s);case u.speed:case u.jump:return D.isWeapon(h)?0:s;case u.damR:return D.isWeapon(h)?s:0;case u.bdR:return a<90||!D.isWeapon(h)?0:2*s;case u.allStatR:return a<70&&!D.isWeapon(h)?0:s;case u.reduceReq:return c0(a,s);default:return 0}}function K(t,o){return t>=250?Math.floor(t/20)*o:(Math.floor(t/20)+1)*o}function e(t,o){return(Math.floor(t/40)+1)*o}function t0(t,o,s,a,r,h,M){if(D.isWeapon(a)){const c=r?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];let n=h;if(a===f.heavySword||a===f.longSword){if(a===f.longSword)switch(n){case 100:n=102;break;case 103:n=105;break;case 105:n=107;break;case 112:n=114;break;case 117:n=121;break;case 135:n=139;break;case 169:n=173;break;case 203:n=207;break;case 293:n=297;break;case 337:n=342;break}const A=t>180?6:t>160?5:t>110?4:3;return Math.ceil(n*c[o-1]*A/100)}else if(s===u.MAD&&M>=n&&(n=M),r){const A=t>160?18:t>150?15:t>110?12:9;return Math.ceil(n*c[o-1]*A/100)}else{const A=t>110?4:3;return Math.ceil(n*c[o-1]*A/100)}}else if(t<60)return 0;return o}function n0(t,o){return t<10?3*o:t>=250?700*o:Math.floor(t/10)*30*o}function c0(t,o){return o*5}function o0(t){switch(t){case u.STR:return[i.incSTR];case u.DEX:return[i.incDEX];case u.INT:return[i.incINT];case u.LUK:return[i.incLUK];case u.STR_DEX:return[i.incSTR,i.incDEX];case u.STR_INT:return[i.incSTR,i.incINT];case u.STR_LUK:return[i.incSTR,i.incLUK];case u.DEX_INT:return[i.incDEX,i.incINT];case u.DEX_LUK:return[i.incDEX,i.incLUK];case u.INT_LUK:return[i.incINT,i.incLUK];case u.PDD:return[i.incPDD];case u.PAD:return[i.incPAD];case u.MAD:return[i.incMAD];case u.MHP:return[i.incMHP];case u.MMP:return[i.incMMP];case u.speed:return[i.incSpeed];case u.jump:return[i.incJump];case u.damR:return[i.damR];case u.bdR:return[i.bdR];case u.allStatR:return[i.statR];case u.reduceReq:return[i.reduceReq];default:return[]}}const i0=25,O=15;function Z(t,o=!1){if(t.getBooleanValue(i.incCHUC))return!1;if(t.getBooleanValue(i.superiorEqp))return s0(t);if(t.star>=t.maxStar&&!o||t.star>=i0)return!1;t.star+=1;const s=t.star,a=g(t,!1,!1),r=g(t,!1,!0),h=D.isWeapon(t.type)||t.type===f.katara,M=[[i.incSTR,i.incDEX],[i.incINT,i.incLUK],[i.incDEX,i.incSTR],[i.incLUK,i.incDEX],[i.incSTR,i.incDEX]],c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];let n;const A=t.req.job;if(A===0)n=new Set([i.incSTR,i.incDEX,i.incINT,i.incLUK]);else{n=new Set;for(let d=0;d<5;d++)if(A&1<<d)for(const S of M[d])n.add(S)}for(const d of c)(n.has(d)||s>15&&(t.option(d).base>0||t.option(d).upgrade>0))&&(t.option(d).enchant+=a[s]);if(h){const d=A===0||Math.floor(A/2)%2===1||t.option(i.incMAD).upgrade>0;if(s>15)t.option(i.incPAD).enchant+=r[s],d&&(t.option(i.incMAD).enchant+=r[s]);else{const S=t.option(i.incPAD).sum-t.option(i.incPAD).bonus;if(t.option(i.incPAD).enchant+=Math.floor(S/50)+1,d){const m=t.option(i.incMAD).sum-t.option(i.incMAD).bonus;t.option(i.incMAD).enchant+=Math.floor(m/50)+1}}}else t.option(i.incPAD).enchant+=r[s],t.option(i.incMAD).enchant+=r[s],t.type===f.glove&&(A===0?(t.option(i.incPAD).enchant+=U[s],t.option(i.incMAD).enchant+=U[s]):Math.floor(A/2)%2===1?t.option(i.incMAD).enchant+=U[s]:t.option(i.incPAD).enchant+=U[s]);if(!h&&t.type!==f.machineHeart){const d=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;t.option(i.incPDD).enchant+=Math.floor(d/20)+1}const b=[f.cap,f.coat,f.longcoat,f.pants,f.cape,f.ring,f.pendant,f.belt,f.shoulder,f.shield];return h?(t.option(i.incMHP).enchant+=L[s],t.option(i.incMMP).enchant+=L[s]):b.includes(t.type)&&(t.option(i.incMHP).enchant+=L[s]),t.type===f.shoes&&(t.option(i.incSpeed).enchant+=W[s],t.option(i.incJump).enchant+=W[s]),!0}function s0(t){if(t.star>=t.maxStar)return!1;t.star+=1;const o=t.star,s=g(t,!1,!1),a=g(t,!1,!0),r=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const c of r)t.option(c).base>0&&(t.option(c).enchant+=s[o]);const h=[i.incPAD,i.incMAD];for(const c of h)t.option(c).base>0&&(t.option(c).enchant+=a[o]);const M=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;return t.option(i.incPDD).enchant+=Math.floor(M/20)+1,!0}function a0(t,o=!1,s=!1){if(t.getBooleanValue(i.incCHUC)||t.getBooleanValue(i.superiorEqp)||t.req.level>150||t.star>=t.maxStar&&!s||t.star>=O)return!1;t.amazing||(t.amazing=!0,t.maxStar=Math.min(t.maxStar,O)),t.star+=1;const a=t.star,r=g(t,!0,!1),h=g(t,!0,!0),M=D.isWeapon(t.type)||t.type===f.katara,c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const b of c)if(t.option(b).sum>0){let S=r[a];o&&D.isAccessory(t.type)&&(S+=a>5?2:1),t.option(b).enchant+=S}const n=[i.incPAD,i.incMAD];for(const b of n){const d=t.option(b).sum;if(d>0){M&&(t.option(b).enchant+=Math.floor(d/50)+1);let S=h[a];o&&(M||t.type===f.shield)&&(S+=1),t.option(b).enchant+=S}}o&&D.isArmor(t.type)&&(t.option(i.incMHP).enchant+=50);const A=t.option(i.incPDD).sum;return t.option(i.incPDD).enchant+=Math.floor(A/20)+1,!0}function Y(t){if(t.getBooleanValue(i.incCHUC))return!1;t.star=0,t.amazing=!1,t.maxStar=D.getMaxStar(t);for(const[,o]of t.options)o.enchant=0;return!0}function f0(t){if(t.getBooleanValue(i.incCHUC)||t.amazing)return!1;const o=t.star;Y(t);for(let s=0;s<o;s++)Z(t,!0);return!0}function g(t,o,s){let a;t.getBooleanValue(i.superiorEqp)?s?a=r0:a=u0:o?s?a=A0:a=M0:s?D.isWeapon(t.type)||t.type===f.katara?a=h0:a=d0:a=D0;const r=t.req.level;for(const h of[...a].reverse())if(r>=h[0])return h;throw Error(`Gear has invalid reqLevel.
2
+ `+t)}const r0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[110,0,0,0,0,0,5,6,7,0,0,0,0,0,0,0],[150,0,0,0,0,0,9,10,11,12,13,15,17,19,21,23]],u0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],h0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6,7,8,9,27,28,29],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6,7,8,9,10,28,29,30],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,7,8,9,10,11,29,30,31],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,9,10,11,12,30,31,32],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,10,11,12,13,31,32,33],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,10,11,12,13,14,32,33,34],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,14,14,15,16,17,34,35,36],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,16,16,17,18,19,36,37,38]],d0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7,8,9,10,12,13,15,17],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,13,14,16,18],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,17,19,21,23],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,14,15,16,17,19,21,23,25],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,15,16,17,18,19,21,23,25,27]],D0=[[0,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0],[108,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0],[118,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,0,0,0],[128,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,0,0,0],[138,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,9,9,9,9,9,9,9,0,0,0],[148,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,11,11,11,11,11,11,11,0,0,0],[158,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,13,13,13,13,13,13,13,0,0,0],[198,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,15,15,15,15,15,15,15,0,0,0],[248,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,0,0,0]],A0=[[0,0,0,0,0,0,1,2,3,4,5,6,8,10,12,14],[80,0,0,0,0,0,2,3,4,5,6,7,9,11,13,15],[90,0,0,0,0,0,3,4,5,6,7,8,10,12,14,16],[100,0,0,0,0,0,4,5,6,7,8,9,11,13,15,17],[110,0,0,0,0,0,5,6,7,8,9,10,12,14,16,18],[120,0,0,0,0,0,6,7,8,9,10,11,13,15,17,19],[130,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[140,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[150,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22]],M0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[85,3,4,6,9,13,0,0,0,0,0,0,0,0,0,0],[90,4,5,7,10,14,0,0,0,0,0,0,0,0,0,0],[95,5,6,8,11,15,0,0,0,0,0,0,0,0,0,0],[100,7,8,10,13,17,0,0,0,0,0,0,0,0,0,0],[105,8,9,11,14,18,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[115,10,11,13,16,20,0,0,0,0,0,0,0,0,0,0],[120,12,13,15,18,22,0,0,0,0,0,0,0,0,0,0],[125,13,14,16,19,23,0,0,0,0,0,0,0,0,0,0],[130,14,15,17,20,24,0,0,0,0,0,0,0,0,0,0],[135,15,16,18,21,25,0,0,0,0,0,0,0,0,0,0],[140,17,18,20,23,27,0,0,0,0,0,0,0,0,0,0],[145,18,19,21,24,28,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],U=[0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0],L=[0,5,5,5,10,10,15,15,20,20,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0],W=[0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0];function S0(t,o){if(t.exceptionalUpgradeCountLeft<1)return!1;t.exceptionalUpgradeCount+=1;for(const[s,a]of o.option){const r=t.exceptionalOptions.get(s)??0;t.exceptionalOptions.set(s,r+a)}return!0}function b0(t){return t.exceptionalUpgradeCount=0,t.exceptionalOptions.clear(),!0}function P(t,o,s){if(D.isWeapon(t.type)||t.type===f.katara)return w0(t,o,s);if(t.type===f.glove)return C0(t,o,s);if(D.isArmor(t.type)||t.type===f.shoulder)return E0(t,o,s);if(D.isAccessory(t.type))return U0(t,o,s);if(t.type===f.machineHeart)return X0(t,o,s)}const v0={100:[[1,0],[2,0],[3,1]],70:[[2,0],[3,1],[5,2]],30:[[3,1],[5,2],[7,3]],15:[[5,2],[7,3],[9,4]]},R0={100:[[1,5,1],[2,20,2],[3,30,3]],70:[[2,15,2],[3,40,4],[4,70,5]],30:[[3,30,4],[5,70,7],[7,120,10]],15:[[4,45,6],[7,110,10],[10,170,15]]},_={30:[1,2,3],15:[2,3,4]},q={30:[1,2,3]},g0={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},z={100:[1,1,2],70:[2,2,3],30:[3,4,5]},V={100:[1,2,3],70:[2,3,5],30:[3,5,7]},N={[i.incSTR]:i.incPAD,[i.incDEX]:i.incPAD,[i.incINT]:i.incMAD,[i.incLUK]:i.incPAD,[i.incMHP]:i.incPAD,[i.incAllStat]:i.incPAD},w={[i.incSTR]:"힘",[i.incDEX]:"민첩",[i.incINT]:"지력",[i.incLUK]:"운",[i.incMHP]:"체력",[i.incAllStat]:"올스탯",[i.incPAD]:"공격력",[i.incMAD]:"마력"};function C(t){return t.req.level>110?2:t.req.level>70?1:0}function w0(t,o,s){if(o===i.incAllStat)return;const a=C(t);let[r,h]=v0[s][a];const M=N[o],c=w[M];return o===i.incMHP&&(h*=50),{name:h>0?`${s}% ${c}(${w[o]}) 주문서`:`${s}% ${c} 주문서`,option:new Map([[o,h],[M,r]])}}function E0(t,o,s){const a=C(t),[r,h,M]=R0[s][a];let c=[],n=[],A=[];if(o===i.incMHP)n=[[i.incMHP,h+r*50]];else if(n=[[i.incMHP,h]],o===i.incAllStat){if(!(s in _))return;const S=_[s][a];c=[[i.incSTR,S],[i.incDEX,S],[i.incINT,S],[i.incLUK,S]]}else c=[[o,r]];t.upgradeCount===3&&(t.req.job===0?A=[[i.incPAD,1],[i.incMAD,1]]:Math.floor(t.req.job/2)%2===1?A=[[i.incMAD,1]]:A=[[i.incPAD,1]]);const b=`${s}% ${w[o]} 주문서`,d=new Map([...c,...A,...n,[i.incPDD,M]]);return{name:b,option:d}}function C0(t,o,s){const a=C(t),r=g0[s][a];if(r===0)return{name:`${s}% 방어력 주문서`,option:new Map([[i.incPDD,3]])};{const h=N[o];return{name:`${s}% ${w[h]} 주문서`,option:new Map([[h,r]])}}}function U0(t,o,s){if(!(s in z))return;const a=C(t),r=z[s][a];let h=[];if(o===i.incMHP)h=[[i.incMHP,r*50]];else if(o===i.incAllStat){if(!(s in q))return;const n=q[s][a];h=[[i.incSTR,n],[i.incDEX,n],[i.incINT,n],[i.incLUK,n]]}else h=[[o,r]];const M=`${s}% ${w[o]} 주문서`,c=new Map(h);return{name:M,option:c}}function X0(t,o,s){if(!(s in V))return;const a=C(t),r=V[s][a],h=N[o];return{name:`${s}% ${w[o]} 주문서`,option:new Map([[h,r]])}}function x0(t){return t.getBooleanValue(i.blockGoldHammer)||t.getBooleanValue(i.onlyUpgrade)||t.totalUpgradeCount<=0||t.hammerCount>0?!1:(t.hammerCount=1,!0)}function l(t,o){if(t.upgradeCountLeft<1)return!1;t.upgradeCount+=1;for(const[s,a]of o.option)t.option(s).upgrade+=a;return!0}function L0(t,o,s){const a=P(t,o,s);return a?l(t,a):!1}function H0(t){return t.upgradeCountLeft<1?!1:(t.upgradeFailCount+=1,!0)}function N0(t){return t.upgradeFailCount<1?!1:(t.upgradeFailCount-=1,!0)}function I0(t){t.upgradeCount=0,t.upgradeFailCount=0,t.hammerCount=0;for(const[,o]of t.options)o.upgrade=0;return!0}function y(t){const o={};o.id=t.itemID,o.n=t.name,t.desc.length>0&&(o.d=t.desc),o.i=t.icon,t.anvil&&(o.an=t.anvil),o.t=t.type,o.r=t.req,o.pr=v(t.props,a=>a!==0),o.o=v(t.options,a=>!a.empty,K0),t.totalUpgradeCount>0&&(o.c=t.totalUpgradeCount),t.upgradeCount>0&&(o.up=t.upgradeCount),t.upgradeFailCount>0&&(o.f=t.upgradeFailCount),t.hammerCount>0&&(o.h=t.hammerCount),t.exceptionalTotalUpgradeCount>0&&(o.ec=t.exceptionalTotalUpgradeCount),t.exceptionalUpgradeCount>0&&(o.eu=t.exceptionalUpgradeCount),o.eo=v(t.exceptionalOptions,a=>a!==0),t.maxStar>0&&(o.m=t.maxStar),t.star>0&&(o.s=t.star),t.amazing&&(o.a=t.amazing),t.karma!==void 0&&(o.k=t.karma),t.canPotential&&(o.cp=t.canPotential),t.grade>0&&(o.g=t.grade),t.grade>0&&t.potentials.length>0&&(o.p=k(t.potentials,void 0,j)),t.additionalGrade>0&&(o.g2=t.additionalGrade),t.additionalGrade>0&&t.additionalPotentials.length>0&&(o.p2=k(t.additionalPotentials,void 0,j));const s=O0(t.soulWeapon);return s&&(o.w=s),o}function K0(t){return[t.base,t.bonus,t.upgrade,t.enchant]}function j(t){return t?{c:t.code,t:t.optionType,l:t.reqLevel,s:t.summary,o:v(t.option,o=>o!==0)}:null}function O0(t){const o={};if(t.enchanted&&(o.e=t.enchanted),t.soul&&(o.s=W0(t.soul)),t.charge>0&&(o.c=t.charge),t.chargeOption.size>0&&(o.o=v(t.chargeOption,s=>s!==0)),Object.keys(o).length>0)return o}function W0(t){return t?{n:t.name,s:t.skill,o:v(t.option,o=>o!==0),m:t.multiplier}:void 0}const T=t=>{const o=c=>typeof c.id=="number"&&typeof c.n=="string"&&(c.d===void 0||typeof c.d=="string")&&typeof c.i=="object"&&c.i!==null&&typeof c.i.id=="number"&&(c.an===void 0||typeof c.an=="object"&&c.an!==null&&s(c.an))&&(c.t===100||c.t===101||c.t===102||c.t===103||c.t===104||c.t===105||c.t===106||c.t===107||c.t===108||c.t===110||c.t===111||c.t===112||c.t===113||c.t===114||c.t===115||c.t===116||c.t===118||c.t===166||c.t===167||c.t===109||c.t===119||c.t===119020||c.t===1212||c.t===1213||c.t===1214||c.t===122||c.t===123||c.t===124||c.t===126||c.t===127||c.t===128||c.t===129||c.t===130||c.t===131||c.t===132||c.t===133||c.t===134||c.t===136||c.t===137||c.t===138||c.t===140||c.t===1404||c.t===141||c.t===142||c.t===143||c.t===144||c.t===145||c.t===146||c.t===147||c.t===148||c.t===149||c.t===150||c.t===151||c.t===152||c.t===153||c.t===156||c.t===157||c.t===158||c.t===159||c.t===1098||c.t===1099||c.t===135200||c.t===135210||c.t===135220||c.t===135221||c.t===135222||c.t===135223||c.t===135224||c.t===135225||c.t===135226||c.t===135227||c.t===135228||c.t===135229||c.t===135240||c.t===135250||c.t===135260||c.t===135270||c.t===135290||c.t===135291||c.t===135292||c.t===135293||c.t===135294||c.t===135295||c.t===135296||c.t===135297||c.t===135298||c.t===135300||c.t===135310||c.t===135320||c.t===135330||c.t===135340||c.t===135350||c.t===135360||c.t===135370||c.t===135380||c.t===135400||c.t===135401||c.t===135402||c.t===135403||c.t===180||c.t===161||c.t===162||c.t===163||c.t===164||c.t===165||c.t===194||c.t===195||c.t===196||c.t===197)&&typeof c.r=="object"&&c.r!==null&&a(c.r)&&Array.isArray(c.pr)&&c.pr.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&Array.isArray(n[1])&&n[1].length===4&&typeof n[1][0]=="number"&&typeof n[1][1]=="number"&&typeof n[1][2]=="number"&&typeof n[1][3]=="number")&&(c.c===void 0||typeof c.c=="number")&&(c.up===void 0||typeof c.up=="number")&&(c.f===void 0||typeof c.f=="number")&&(c.h===void 0||typeof c.h=="number")&&(c.ec===void 0||typeof c.ec=="number")&&(c.eu===void 0||typeof c.eu=="number")&&(c.eo===void 0||Array.isArray(c.eo)&&c.eo.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"))&&(c.m===void 0||typeof c.m=="number")&&(c.s===void 0||typeof c.s=="number")&&(c.a===void 0||typeof c.a=="boolean")&&(c.k===void 0||typeof c.k=="number")&&(c.cp===void 0||typeof c.cp=="boolean")&&(c.g===void 0||c.g===0||c.g===1||c.g===2||c.g===3||c.g===4||c.g===5)&&(c.p===void 0||Array.isArray(c.p)&&c.p.every(n=>n===null||typeof n=="object"&&n!==null&&r(n)))&&(c.g2===void 0||c.g2===0||c.g2===1||c.g2===2||c.g2===3||c.g2===4||c.g2===5)&&(c.p2===void 0||Array.isArray(c.p2)&&c.p2.every(n=>n===null||typeof n=="object"&&n!==null&&r(n)))&&(c.w===void 0||typeof c.w=="object"&&c.w!==null&&Array.isArray(c.w)===!1&&h(c.w)),s=c=>typeof c.name=="string"&&typeof c.icon=="object"&&c.icon!==null&&typeof c.icon.id=="number",a=c=>typeof c.level=="number"&&typeof c.str=="number"&&typeof c.luk=="number"&&typeof c.dex=="number"&&typeof c.int=="number"&&typeof c.job=="number"&&typeof c.specJob=="number",r=c=>typeof c.c=="number"&&typeof c.t=="number"&&typeof c.l=="number"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"),h=c=>(c.e===void 0||typeof c.e=="boolean")&&(c.s===void 0||typeof c.s=="object"&&c.s!==null&&M(c.s))&&(c.c===void 0||typeof c.c=="number")&&(c.o===void 0||Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")),M=c=>typeof c.n=="string"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&typeof c.m=="number";return typeof t=="object"&&t!==null&&o(t)};function _0(t){return JSON.stringify(y(t))}function q0(t){return I(JSON.parse(t))}function z0(t){try{const o=JSON.parse(t);if(T(o))return I(o)}catch{}return null}function v(t,o,s){let a=[...t];return o&&(a=a.filter(r=>o(r[1]))),s?a.map(r=>[r[0],s(r[1])]):a}function k(t,o,s){let a=t;return o&&(a=a.filter(o)),s?a.map(s):a===t?[...t]:a}function R(t,o){return o?new Map(t.map(s=>[s[0],o(s[1])])):new Map(t)}function $(t,o){return o?[...t].map(o):[...t]}function I(t){const o=new D;return o.itemID=t.id,o.name=t.n,t.d&&(o.desc=t.d),o.icon=t.i,t.an&&(o.anvil=t.an),o.type=t.t,o.req=t.r,o.props=R(t.pr),o.options=R(t.o,V0),t.c&&(o.totalUpgradeCount=t.c),t.up&&(o.upgradeCount=t.up),t.f&&(o.upgradeFailCount=t.f),t.h&&(o.hammerCount=t.h),t.ec&&(o.exceptionalTotalUpgradeCount=t.ec),t.eu&&(o.exceptionalUpgradeCount=t.eu),t.eo&&(o.exceptionalOptions=R(t.eo)),t.m&&(o.maxStar=t.m),t.s&&(o.star=t.s),t.a&&(o.amazing=t.a),t.k&&(o.karma=t.k),t.cp&&(o.canPotential=t.cp),t.g&&(o.grade=t.g),t.p&&(o.potentials=$(t.p,F)),t.g2&&(o.additionalGrade=t.g2),t.p2&&(o.additionalPotentials=$(t.p2,F)),j0(t.w,o),o}function V0(t){const o=new H;return o.base=t[0],o.bonus=t[1],o.upgrade=t[2],o.enchant=t[3],o}function F(t){if(!t)return null;const o=new x;return o.code=t.c,o.optionType=t.t,o.reqLevel=t.l,o.summary=t.s,o.option=R(t.o),o}function j0(t,o){if(t){const s=o.soulWeapon;t?.e&&(s.enchanted=t.e),t?.s&&(s.soul=k0(t.s)),t?.c&&(s.charge=t.c),t?.o&&(s.chargeOption=R(t.o))}}function k0(t){if(t)return{name:t.n,skill:t.s,option:R(t.o),multiplier:t.m}}exports.BonusStatType=u;exports.Gear=D;exports.GearOption=H;exports.GearPropType=i;exports.GearType=f;exports.Potential=x;exports.PotentialGrade=X;exports.SoulWeapon=J;exports.addAmazingEnhancement=a0;exports.addBonusStat=p;exports.addStarforce=Z;exports.addUpgradeFailCount=H0;exports.applyExceptionalEnchant=S0;exports.applyGoldHammer=x0;exports.applyScroll=l;exports.applySpellTrace=L0;exports.gearToPlain=y;exports.getBonusStatOption=B;exports.getBonusStatValue=Q;exports.getSpellTraceScroll=P;exports.isGearLike=T;exports.parseGear=q0;exports.plainToGear=I;exports.recalculateStarforce=f0;exports.resetBonusStat=G;exports.resetEnhancement=Y;exports.resetExceptionalEnchant=b0;exports.resetUpgrade=I0;exports.restoreUpgradeCount=N0;exports.stringifyGear=_0;exports.validateParseGear=z0;
package/index.js CHANGED
@@ -89,8 +89,7 @@ class B {
89
89
  const C = class {
90
90
  constructor() {
91
91
  this.itemID = 0, this.name = "", this.desc = "", this.type = 0, this.props = /* @__PURE__ */ new Map(), this.options = /* @__PURE__ */ new Map(), this.exceptionalOptions = /* @__PURE__ */ new Map(), this.totalUpgradeCount = 0, this.upgradeCount = 0, this.upgradeFailCount = 0, this.hammerCount = 0, this.exceptionalTotalUpgradeCount = 0, this.exceptionalUpgradeCount = 0, this.maxStar = 0, this.star = 0, this.amazing = !1, this.canPotential = !1, this.grade = x.normal, this.potentials = [], this.additionalGrade = x.normal, this.additionalPotentials = [], this.soulWeapon = new B(this), this.icon = {
92
- id: 0,
93
- origin: [0, 0]
92
+ id: 0
94
93
  }, this.req = {
95
94
  level: 0,
96
95
  str: 0,
@@ -161,14 +160,14 @@ const C = class {
161
160
  * @param icon 외형 아이콘.
162
161
  * @param name 외형 장비명.
163
162
  */
164
- setAnvil(t, o) {
165
- this.anvilIcon = t, this.anvilName = o;
163
+ setAnvil(t) {
164
+ this.anvil = t;
166
165
  }
167
166
  /**
168
167
  * 장비에 적용된 신비의 모루 외형을 제거합니다.
169
168
  */
170
169
  resetAnvil() {
171
- this.anvilIcon = void 0, this.anvilName = void 0;
170
+ this.anvil = void 0;
172
171
  }
173
172
  /**
174
173
  * 장비 분류가 주무기인지 여부를 확인합니다. 블레이드(`katara`)는 포함되지 않습니다.
@@ -344,7 +343,7 @@ A.starData = [
344
343
  [130, 20, 12],
345
344
  [140, 25, 15]
346
345
  ];
347
- class N {
346
+ class L {
348
347
  constructor() {
349
348
  this.code = 0, this.optionType = 0, this.reqLevel = 0, this.summary = "", this.option = /* @__PURE__ */ new Map();
350
349
  }
@@ -383,7 +382,7 @@ class N {
383
382
  case 10:
384
383
  return A.isWeapon(s) || A.isSubWeapon(s) || s === f.emblem;
385
384
  case 11:
386
- return !N.checkOptionType(10, s);
385
+ return !L.checkOptionType(10, s);
387
386
  case 20:
388
387
  return A.isSubWeapon(s) || s === f.cap || s === f.coat || s === f.longcoat || s === f.pants || s === f.shoes || s === f.glove || s === f.cape || s === f.belt || s === f.shoulder;
389
388
  case 40:
@@ -403,45 +402,45 @@ class N {
403
402
  }
404
403
  }
405
404
  }
406
- var r = /* @__PURE__ */ ((t) => (t[t.STR = 0] = "STR", t[t.DEX = 1] = "DEX", t[t.INT = 2] = "INT", t[t.LUK = 3] = "LUK", t[t.STR_DEX = 4] = "STR_DEX", t[t.STR_INT = 5] = "STR_INT", t[t.STR_LUK = 6] = "STR_LUK", t[t.DEX_INT = 7] = "DEX_INT", t[t.DEX_LUK = 8] = "DEX_LUK", t[t.INT_LUK = 9] = "INT_LUK", t[t.MHP = 10] = "MHP", t[t.MMP = 11] = "MMP", t[t.PAD = 12] = "PAD", t[t.MAD = 13] = "MAD", t[t.PDD = 14] = "PDD", t[t.speed = 15] = "speed", t[t.jump = 16] = "jump", t[t.damR = 17] = "damR", t[t.bdR = 18] = "bdR", t[t.allStatR = 19] = "allStatR", t[t.reduceReq = 20] = "reduceReq", t))(r || {});
405
+ var u = /* @__PURE__ */ ((t) => (t[t.STR = 0] = "STR", t[t.DEX = 1] = "DEX", t[t.INT = 2] = "INT", t[t.LUK = 3] = "LUK", t[t.STR_DEX = 4] = "STR_DEX", t[t.STR_INT = 5] = "STR_INT", t[t.STR_LUK = 6] = "STR_LUK", t[t.DEX_INT = 7] = "DEX_INT", t[t.DEX_LUK = 8] = "DEX_LUK", t[t.INT_LUK = 9] = "INT_LUK", t[t.MHP = 10] = "MHP", t[t.MMP = 11] = "MMP", t[t.PAD = 12] = "PAD", t[t.MAD = 13] = "MAD", t[t.PDD = 14] = "PDD", t[t.speed = 15] = "speed", t[t.jump = 16] = "jump", t[t.damR = 17] = "damR", t[t.bdR = 18] = "bdR", t[t.allStatR = 19] = "allStatR", t[t.reduceReq = 20] = "reduceReq", t))(u || {});
407
406
  function x0(t, o, s) {
408
407
  const a = Q(t, o, s);
409
408
  if (a.size === 0)
410
409
  return !1;
411
- for (const [h, u] of a)
412
- t.option(h).bonus += u;
410
+ for (const [h, r] of a)
411
+ t.option(h).bonus += r;
413
412
  return !0;
414
413
  }
415
- function N0(t) {
414
+ function L0(t) {
416
415
  for (const [, o] of t.options)
417
416
  o.bonus = 0;
418
417
  return !0;
419
418
  }
420
419
  function Q(t, o, s) {
421
- const a = m(o), h = Z(t, o, s);
422
- return h === 0 ? /* @__PURE__ */ new Map() : new Map(a.map((u) => [u, h]));
420
+ const a = T(o), h = Z(t, o, s);
421
+ return h === 0 ? /* @__PURE__ */ new Map() : new Map(a.map((r) => [r, h]));
423
422
  }
424
423
  function Z(t, o, s) {
425
- const a = t.req.level, h = t.getBooleanValue(i.bossReward), u = t.type;
424
+ const a = t.req.level, h = t.getBooleanValue(i.bossReward), r = t.type;
426
425
  if (a < 0 || h && s < 3)
427
426
  return 0;
428
427
  switch (o) {
429
- case r.STR:
430
- case r.DEX:
431
- case r.INT:
432
- case r.LUK:
433
- return I(a, s);
434
- case r.STR_DEX:
435
- case r.STR_INT:
436
- case r.STR_LUK:
437
- case r.DEX_INT:
438
- case r.DEX_LUK:
439
- case r.INT_LUK:
428
+ case u.STR:
429
+ case u.DEX:
430
+ case u.INT:
431
+ case u.LUK:
432
+ return N(a, s);
433
+ case u.STR_DEX:
434
+ case u.STR_INT:
435
+ case u.STR_LUK:
436
+ case u.DEX_INT:
437
+ case u.DEX_LUK:
438
+ case u.INT_LUK:
440
439
  return Y(a, s);
441
- case r.PDD:
442
- return I(a, s);
443
- case r.PAD:
444
- case r.MAD:
440
+ case u.PDD:
441
+ return N(a, s);
442
+ case u.PAD:
443
+ case u.MAD:
445
444
  return P(
446
445
  a,
447
446
  s,
@@ -451,34 +450,34 @@ function Z(t, o, s) {
451
450
  t.option(i.incPAD).base,
452
451
  t.option(i.incMAD).base
453
452
  );
454
- case r.MHP:
455
- case r.MMP:
453
+ case u.MHP:
454
+ case u.MMP:
456
455
  return l(a, s);
457
- case r.speed:
458
- case r.jump:
459
- return A.isWeapon(u) ? 0 : s;
460
- case r.damR:
461
- return A.isWeapon(u) ? s : 0;
462
- case r.bdR:
463
- return a < 90 || !A.isWeapon(u) ? 0 : 2 * s;
464
- case r.allStatR:
465
- return a < 70 && !A.isWeapon(u) ? 0 : s;
466
- case r.reduceReq:
456
+ case u.speed:
457
+ case u.jump:
458
+ return A.isWeapon(r) ? 0 : s;
459
+ case u.damR:
460
+ return A.isWeapon(r) ? s : 0;
461
+ case u.bdR:
462
+ return a < 90 || !A.isWeapon(r) ? 0 : 2 * s;
463
+ case u.allStatR:
464
+ return a < 70 && !A.isWeapon(r) ? 0 : s;
465
+ case u.reduceReq:
467
466
  return y(a, s);
468
467
  default:
469
468
  return 0;
470
469
  }
471
470
  }
472
- function I(t, o) {
471
+ function N(t, o) {
473
472
  return t >= 250 ? Math.floor(t / 20) * o : (Math.floor(t / 20) + 1) * o;
474
473
  }
475
474
  function Y(t, o) {
476
475
  return (Math.floor(t / 40) + 1) * o;
477
476
  }
478
- function P(t, o, s, a, h, u, M) {
477
+ function P(t, o, s, a, h, r, M) {
479
478
  if (A.isWeapon(a)) {
480
479
  const c = h ? [0, 0, 1, 1.4666, 2.0166, 2.663, 3.4166] : [1, 2.222, 3.63, 5.325, 7.32, 8.777, 10.25];
481
- let n = u;
480
+ let n = r;
482
481
  if (a === f.heavySword || a === f.longSword) {
483
482
  if (a === f.longSword)
484
483
  switch (n) {
@@ -515,7 +514,7 @@ function P(t, o, s, a, h, u, M) {
515
514
  }
516
515
  const D = t > 180 ? 6 : t > 160 ? 5 : t > 110 ? 4 : 3;
517
516
  return Math.ceil(n * c[o - 1] * D / 100);
518
- } else if (s === r.MAD && M >= n && (n = M), h) {
517
+ } else if (s === u.MAD && M >= n && (n = M), h) {
519
518
  const D = t > 160 ? 18 : t > 150 ? 15 : t > 110 ? 12 : 9;
520
519
  return Math.ceil(n * c[o - 1] * D / 100);
521
520
  } else {
@@ -532,64 +531,64 @@ function l(t, o) {
532
531
  function y(t, o) {
533
532
  return o * 5;
534
533
  }
535
- function m(t) {
534
+ function T(t) {
536
535
  switch (t) {
537
- case r.STR:
536
+ case u.STR:
538
537
  return [i.incSTR];
539
- case r.DEX:
538
+ case u.DEX:
540
539
  return [i.incDEX];
541
- case r.INT:
540
+ case u.INT:
542
541
  return [i.incINT];
543
- case r.LUK:
542
+ case u.LUK:
544
543
  return [i.incLUK];
545
- case r.STR_DEX:
544
+ case u.STR_DEX:
546
545
  return [i.incSTR, i.incDEX];
547
- case r.STR_INT:
546
+ case u.STR_INT:
548
547
  return [i.incSTR, i.incINT];
549
- case r.STR_LUK:
548
+ case u.STR_LUK:
550
549
  return [i.incSTR, i.incLUK];
551
- case r.DEX_INT:
550
+ case u.DEX_INT:
552
551
  return [i.incDEX, i.incINT];
553
- case r.DEX_LUK:
552
+ case u.DEX_LUK:
554
553
  return [i.incDEX, i.incLUK];
555
- case r.INT_LUK:
554
+ case u.INT_LUK:
556
555
  return [i.incINT, i.incLUK];
557
- case r.PDD:
556
+ case u.PDD:
558
557
  return [i.incPDD];
559
- case r.PAD:
558
+ case u.PAD:
560
559
  return [i.incPAD];
561
- case r.MAD:
560
+ case u.MAD:
562
561
  return [i.incMAD];
563
- case r.MHP:
562
+ case u.MHP:
564
563
  return [i.incMHP];
565
- case r.MMP:
564
+ case u.MMP:
566
565
  return [i.incMMP];
567
- case r.speed:
566
+ case u.speed:
568
567
  return [i.incSpeed];
569
- case r.jump:
568
+ case u.jump:
570
569
  return [i.incJump];
571
- case r.damR:
570
+ case u.damR:
572
571
  return [i.damR];
573
- case r.bdR:
572
+ case u.bdR:
574
573
  return [i.bdR];
575
- case r.allStatR:
574
+ case u.allStatR:
576
575
  return [i.statR];
577
- case r.reduceReq:
576
+ case u.reduceReq:
578
577
  return [i.reduceReq];
579
578
  default:
580
579
  return [];
581
580
  }
582
581
  }
583
- const T = 25, H = 15;
584
- function G(t, o = !1) {
582
+ const m = 25, I = 15;
583
+ function p(t, o = !1) {
585
584
  if (t.getBooleanValue(i.incCHUC))
586
585
  return !1;
587
586
  if (t.getBooleanValue(i.superiorEqp))
588
- return p(t);
589
- if (t.star >= t.maxStar && !o || t.star >= T)
587
+ return G(t);
588
+ if (t.star >= t.maxStar && !o || t.star >= m)
590
589
  return !1;
591
590
  t.star += 1;
592
- const s = t.star, a = w(t, !1, !1), h = w(t, !1, !0), u = A.isWeapon(t.type) || t.type === f.katara, M = [
591
+ const s = t.star, a = w(t, !1, !1), h = w(t, !1, !0), r = A.isWeapon(t.type) || t.type === f.katara, M = [
593
592
  [i.incSTR, i.incDEX],
594
593
  [i.incINT, i.incLUK],
595
594
  [i.incDEX, i.incSTR],
@@ -619,7 +618,7 @@ function G(t, o = !1) {
619
618
  }
620
619
  for (const d of c)
621
620
  (n.has(d) || s > 15 && (t.option(d).base > 0 || t.option(d).upgrade > 0)) && (t.option(d).enchant += a[s]);
622
- if (u) {
621
+ if (r) {
623
622
  const d = D === 0 || Math.floor(D / 2) % 2 === 1 || t.option(i.incMAD).upgrade > 0;
624
623
  if (s > 15)
625
624
  t.option(i.incPAD).enchant += h[s], d && (t.option(i.incMAD).enchant += h[s]);
@@ -632,7 +631,7 @@ function G(t, o = !1) {
632
631
  }
633
632
  } else
634
633
  t.option(i.incPAD).enchant += h[s], t.option(i.incMAD).enchant += h[s], t.type === f.glove && (D === 0 ? (t.option(i.incPAD).enchant += U[s], t.option(i.incMAD).enchant += U[s]) : Math.floor(D / 2) % 2 === 1 ? t.option(i.incMAD).enchant += U[s] : t.option(i.incPAD).enchant += U[s]);
635
- if (!u && t.type !== f.machineHeart) {
634
+ if (!r && t.type !== f.machineHeart) {
636
635
  const d = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
637
636
  t.option(i.incPDD).enchant += Math.floor(d / 20) + 1;
638
637
  }
@@ -648,9 +647,9 @@ function G(t, o = !1) {
648
647
  f.shoulder,
649
648
  f.shield
650
649
  ];
651
- return u ? (t.option(i.incMHP).enchant += X[s], t.option(i.incMMP).enchant += X[s]) : S.includes(t.type) && (t.option(i.incMHP).enchant += X[s]), t.type === f.shoes && (t.option(i.incSpeed).enchant += K[s], t.option(i.incJump).enchant += K[s]), !0;
650
+ return r ? (t.option(i.incMHP).enchant += X[s], t.option(i.incMMP).enchant += X[s]) : S.includes(t.type) && (t.option(i.incMHP).enchant += X[s]), t.type === f.shoes && (t.option(i.incSpeed).enchant += K[s], t.option(i.incJump).enchant += K[s]), !0;
652
651
  }
653
- function p(t) {
652
+ function G(t) {
654
653
  if (t.star >= t.maxStar)
655
654
  return !1;
656
655
  t.star += 1;
@@ -662,17 +661,17 @@ function p(t) {
662
661
  ];
663
662
  for (const c of h)
664
663
  t.option(c).base > 0 && (t.option(c).enchant += s[o]);
665
- const u = [i.incPAD, i.incMAD];
666
- for (const c of u)
664
+ const r = [i.incPAD, i.incMAD];
665
+ for (const c of r)
667
666
  t.option(c).base > 0 && (t.option(c).enchant += a[o]);
668
667
  const M = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
669
668
  return t.option(i.incPDD).enchant += Math.floor(M / 20) + 1, !0;
670
669
  }
671
- function L0(t, o = !1, s = !1) {
672
- if (t.getBooleanValue(i.incCHUC) || t.getBooleanValue(i.superiorEqp) || t.req.level > 150 || t.star >= t.maxStar && !s || t.star >= H)
670
+ function H0(t, o = !1, s = !1) {
671
+ if (t.getBooleanValue(i.incCHUC) || t.getBooleanValue(i.superiorEqp) || t.req.level > 150 || t.star >= t.maxStar && !s || t.star >= I)
673
672
  return !1;
674
- t.amazing || (t.amazing = !0, t.maxStar = Math.min(t.maxStar, H)), t.star += 1;
675
- const a = t.star, h = w(t, !0, !1), u = w(t, !0, !0), M = A.isWeapon(t.type) || t.type === f.katara, c = [
673
+ t.amazing || (t.amazing = !0, t.maxStar = Math.min(t.maxStar, I)), t.star += 1;
674
+ const a = t.star, h = w(t, !0, !1), r = w(t, !0, !0), M = A.isWeapon(t.type) || t.type === f.katara, c = [
676
675
  i.incSTR,
677
676
  i.incDEX,
678
677
  i.incINT,
@@ -688,7 +687,7 @@ function L0(t, o = !1, s = !1) {
688
687
  const d = t.option(S).sum;
689
688
  if (d > 0) {
690
689
  M && (t.option(S).enchant += Math.floor(d / 50) + 1);
691
- let b = u[a];
690
+ let b = r[a];
692
691
  o && (M || t.type === f.shield) && (b += 1), t.option(S).enchant += b;
693
692
  }
694
693
  }
@@ -704,22 +703,22 @@ function e(t) {
704
703
  o.enchant = 0;
705
704
  return !0;
706
705
  }
707
- function I0(t) {
706
+ function N0(t) {
708
707
  if (t.getBooleanValue(i.incCHUC) || t.amazing)
709
708
  return !1;
710
709
  const o = t.star;
711
710
  e(t);
712
711
  for (let s = 0; s < o; s++)
713
- G(t, !0);
712
+ p(t, !0);
714
713
  return !0;
715
714
  }
716
715
  function w(t, o, s) {
717
716
  let a;
718
717
  t.getBooleanValue(i.superiorEqp) ? s ? a = t0 : a = n0 : o ? s ? a = s0 : a = a0 : s ? A.isWeapon(t.type) || t.type === f.katara ? a = c0 : a = o0 : a = i0;
719
718
  const h = t.req.level;
720
- for (const u of [...a].reverse())
721
- if (h >= u[0])
722
- return u;
719
+ for (const r of [...a].reverse())
720
+ if (h >= r[0])
721
+ return r;
723
722
  throw Error(`Gear has invalid reqLevel.
724
723
  ` + t);
725
724
  }
@@ -1600,7 +1599,7 @@ const t0 = [
1600
1599
  0,
1601
1600
  0
1602
1601
  ];
1603
- function H0(t, o) {
1602
+ function I0(t, o) {
1604
1603
  if (t.exceptionalUpgradeCountLeft < 1)
1605
1604
  return !1;
1606
1605
  t.exceptionalUpgradeCount += 1;
@@ -1646,7 +1645,7 @@ const h0 = {
1646
1645
  [7, 3],
1647
1646
  [9, 4]
1648
1647
  ]
1649
- }, r0 = {
1648
+ }, u0 = {
1650
1649
  100: [
1651
1650
  [1, 5, 1],
1652
1651
  [2, 20, 2],
@@ -1672,7 +1671,7 @@ const h0 = {
1672
1671
  15: [2, 3, 4]
1673
1672
  }, _ = {
1674
1673
  30: [1, 2, 3]
1675
- }, u0 = {
1674
+ }, r0 = {
1676
1675
  100: [0, 1, 1],
1677
1676
  70: [1, 2, 2],
1678
1677
  30: [2, 3, 3],
@@ -1685,7 +1684,7 @@ const h0 = {
1685
1684
  100: [1, 2, 3],
1686
1685
  70: [2, 3, 5],
1687
1686
  30: [3, 5, 7]
1688
- }, L = {
1687
+ }, H = {
1689
1688
  [i.incSTR]: i.incPAD,
1690
1689
  [i.incDEX]: i.incPAD,
1691
1690
  [i.incINT]: i.incMAD,
@@ -1709,19 +1708,19 @@ function d0(t, o, s) {
1709
1708
  if (o === i.incAllStat)
1710
1709
  return;
1711
1710
  const a = E(t);
1712
- let [h, u] = h0[s][a];
1713
- const M = L[o], c = g[M];
1714
- return o === i.incMHP && (u *= 50), { name: u > 0 ? `${s}% ${c}(${g[o]}) 주문서` : `${s}% ${c} 주문서`, option: /* @__PURE__ */ new Map([
1715
- [o, u],
1711
+ let [h, r] = h0[s][a];
1712
+ const M = H[o], c = g[M];
1713
+ return o === i.incMHP && (r *= 50), { name: r > 0 ? `${s}% ${c}(${g[o]}) 주문서` : `${s}% ${c} 주문서`, option: /* @__PURE__ */ new Map([
1714
+ [o, r],
1716
1715
  [M, h]
1717
1716
  ]) };
1718
1717
  }
1719
1718
  function D0(t, o, s) {
1720
- const a = E(t), [h, u, M] = r0[s][a];
1719
+ const a = E(t), [h, r, M] = u0[s][a];
1721
1720
  let c = [], n = [], D = [];
1722
1721
  if (o === i.incMHP)
1723
- n = [[i.incMHP, u + h * 50]];
1724
- else if (n = [[i.incMHP, u]], o === i.incAllStat) {
1722
+ n = [[i.incMHP, r + h * 50]];
1723
+ else if (n = [[i.incMHP, r]], o === i.incAllStat) {
1725
1724
  if (!(s in O))
1726
1725
  return;
1727
1726
  const b = O[s][a];
@@ -1746,17 +1745,17 @@ function D0(t, o, s) {
1746
1745
  return { name: S, option: d };
1747
1746
  }
1748
1747
  function A0(t, o, s) {
1749
- const a = E(t), h = u0[s][a];
1748
+ const a = E(t), h = r0[s][a];
1750
1749
  if (h === 0)
1751
1750
  return {
1752
1751
  name: `${s}% 방어력 주문서`,
1753
1752
  option: /* @__PURE__ */ new Map([[i.incPDD, 3]])
1754
1753
  };
1755
1754
  {
1756
- const u = L[o];
1755
+ const r = H[o];
1757
1756
  return {
1758
- name: `${s}% ${g[u]} 주문서`,
1759
- option: /* @__PURE__ */ new Map([[u, h]])
1757
+ name: `${s}% ${g[r]} 주문서`,
1758
+ option: /* @__PURE__ */ new Map([[r, h]])
1760
1759
  };
1761
1760
  }
1762
1761
  }
@@ -1764,29 +1763,29 @@ function M0(t, o, s) {
1764
1763
  if (!(s in q))
1765
1764
  return;
1766
1765
  const a = E(t), h = q[s][a];
1767
- let u = [];
1766
+ let r = [];
1768
1767
  if (o === i.incMHP)
1769
- u = [[i.incMHP, h * 50]];
1768
+ r = [[i.incMHP, h * 50]];
1770
1769
  else if (o === i.incAllStat) {
1771
1770
  if (!(s in _))
1772
1771
  return;
1773
1772
  const n = _[s][a];
1774
- u = [
1773
+ r = [
1775
1774
  [i.incSTR, n],
1776
1775
  [i.incDEX, n],
1777
1776
  [i.incINT, n],
1778
1777
  [i.incLUK, n]
1779
1778
  ];
1780
1779
  } else
1781
- u = [[o, h]];
1782
- const M = `${s}% ${g[o]} 주문서`, c = new Map(u);
1780
+ r = [[o, h]];
1781
+ const M = `${s}% ${g[o]} 주문서`, c = new Map(r);
1783
1782
  return { name: M, option: c };
1784
1783
  }
1785
1784
  function b0(t, o, s) {
1786
1785
  if (!(s in W))
1787
1786
  return;
1788
- const a = E(t), h = W[s][a], u = L[o];
1789
- return { name: `${s}% ${g[o]} 주문서`, option: /* @__PURE__ */ new Map([[u, h]]) };
1787
+ const a = E(t), h = W[s][a], r = H[o];
1788
+ return { name: `${s}% ${g[o]} 주문서`, option: /* @__PURE__ */ new Map([[r, h]]) };
1790
1789
  }
1791
1790
  function O0(t) {
1792
1791
  return t.getBooleanValue(i.blockGoldHammer) || t.getBooleanValue(i.onlyUpgrade) || t.totalUpgradeCount <= 0 || t.hammerCount > 0 ? !1 : (t.hammerCount = 1, !0);
@@ -1817,7 +1816,7 @@ function z0(t) {
1817
1816
  }
1818
1817
  function v0(t) {
1819
1818
  const o = {};
1820
- o.id = t.itemID, o.n = t.name, t.desc.length > 0 && (o.d = t.desc), o.i = t.icon, t.anvilIcon && (o.i2 = t.anvilIcon), t.anvilName && (o.n2 = t.anvilName), o.t = t.type, o.r = t.req, o.pr = v(t.props, (a) => a !== 0), o.o = v(t.options, (a) => !a.empty, R0), t.totalUpgradeCount > 0 && (o.c = t.totalUpgradeCount), t.upgradeCount > 0 && (o.up = t.upgradeCount), t.upgradeFailCount > 0 && (o.f = t.upgradeFailCount), t.hammerCount > 0 && (o.h = t.hammerCount), t.exceptionalTotalUpgradeCount > 0 && (o.ec = t.exceptionalTotalUpgradeCount), t.exceptionalUpgradeCount > 0 && (o.eu = t.exceptionalUpgradeCount), o.eo = v(t.exceptionalOptions, (a) => a !== 0), t.maxStar > 0 && (o.m = t.maxStar), t.star > 0 && (o.s = t.star), t.amazing && (o.a = t.amazing), t.karma !== void 0 && (o.k = t.karma), t.canPotential && (o.cp = t.canPotential), t.grade > 0 && (o.g = t.grade), t.grade > 0 && t.potentials.length > 0 && (o.p = V(t.potentials, void 0, z)), t.additionalGrade > 0 && (o.g2 = t.additionalGrade), t.additionalGrade > 0 && t.additionalPotentials.length > 0 && (o.p2 = V(
1819
+ o.id = t.itemID, o.n = t.name, t.desc.length > 0 && (o.d = t.desc), o.i = t.icon, t.anvil && (o.an = t.anvil), o.t = t.type, o.r = t.req, o.pr = v(t.props, (a) => a !== 0), o.o = v(t.options, (a) => !a.empty, R0), t.totalUpgradeCount > 0 && (o.c = t.totalUpgradeCount), t.upgradeCount > 0 && (o.up = t.upgradeCount), t.upgradeFailCount > 0 && (o.f = t.upgradeFailCount), t.hammerCount > 0 && (o.h = t.hammerCount), t.exceptionalTotalUpgradeCount > 0 && (o.ec = t.exceptionalTotalUpgradeCount), t.exceptionalUpgradeCount > 0 && (o.eu = t.exceptionalUpgradeCount), o.eo = v(t.exceptionalOptions, (a) => a !== 0), t.maxStar > 0 && (o.m = t.maxStar), t.star > 0 && (o.s = t.star), t.amazing && (o.a = t.amazing), t.karma !== void 0 && (o.k = t.karma), t.canPotential && (o.cp = t.canPotential), t.grade > 0 && (o.g = t.grade), t.grade > 0 && t.potentials.length > 0 && (o.p = V(t.potentials, void 0, z)), t.additionalGrade > 0 && (o.g2 = t.additionalGrade), t.additionalGrade > 0 && t.additionalPotentials.length > 0 && (o.p2 = V(
1821
1820
  t.additionalPotentials,
1822
1821
  void 0,
1823
1822
  z
@@ -1851,19 +1850,19 @@ function g0(t) {
1851
1850
  } : void 0;
1852
1851
  }
1853
1852
  const C0 = (t) => {
1854
- const o = (c) => typeof c.id == "number" && typeof c.n == "string" && (c.d === void 0 || typeof c.d == "string") && typeof c.i == "object" && c.i !== null && s(c.i) && (c.i2 === void 0 || typeof c.i2 == "object" && c.i2 !== null && s(c.i2)) && (c.n2 === void 0 || typeof c.n2 == "string") && (c.t === 100 || c.t === 101 || c.t === 102 || c.t === 103 || c.t === 104 || c.t === 105 || c.t === 106 || c.t === 107 || c.t === 108 || c.t === 110 || c.t === 111 || c.t === 112 || c.t === 113 || c.t === 114 || c.t === 115 || c.t === 116 || c.t === 118 || c.t === 166 || c.t === 167 || c.t === 109 || c.t === 119 || c.t === 119020 || c.t === 1212 || c.t === 1213 || c.t === 1214 || c.t === 122 || c.t === 123 || c.t === 124 || c.t === 126 || c.t === 127 || c.t === 128 || c.t === 129 || c.t === 130 || c.t === 131 || c.t === 132 || c.t === 133 || c.t === 134 || c.t === 136 || c.t === 137 || c.t === 138 || c.t === 140 || c.t === 1404 || c.t === 141 || c.t === 142 || c.t === 143 || c.t === 144 || c.t === 145 || c.t === 146 || c.t === 147 || c.t === 148 || c.t === 149 || c.t === 150 || c.t === 151 || c.t === 152 || c.t === 153 || c.t === 156 || c.t === 157 || c.t === 158 || c.t === 159 || c.t === 1098 || c.t === 1099 || c.t === 135200 || c.t === 135210 || c.t === 135220 || c.t === 135221 || c.t === 135222 || c.t === 135223 || c.t === 135224 || c.t === 135225 || c.t === 135226 || c.t === 135227 || c.t === 135228 || c.t === 135229 || c.t === 135240 || c.t === 135250 || c.t === 135260 || c.t === 135270 || c.t === 135290 || c.t === 135291 || c.t === 135292 || c.t === 135293 || c.t === 135294 || c.t === 135295 || c.t === 135296 || c.t === 135297 || c.t === 135298 || c.t === 135300 || c.t === 135310 || c.t === 135320 || c.t === 135330 || c.t === 135340 || c.t === 135350 || c.t === 135360 || c.t === 135370 || c.t === 135380 || c.t === 135400 || c.t === 135401 || c.t === 135402 || c.t === 135403 || c.t === 180 || c.t === 161 || c.t === 162 || c.t === 163 || c.t === 164 || c.t === 165 || c.t === 194 || c.t === 195 || c.t === 196 || c.t === 197) && typeof c.r == "object" && c.r !== null && a(c.r) && Array.isArray(c.pr) && c.pr.every(
1853
+ const o = (c) => typeof c.id == "number" && typeof c.n == "string" && (c.d === void 0 || typeof c.d == "string") && typeof c.i == "object" && c.i !== null && typeof c.i.id == "number" && (c.an === void 0 || typeof c.an == "object" && c.an !== null && s(c.an)) && (c.t === 100 || c.t === 101 || c.t === 102 || c.t === 103 || c.t === 104 || c.t === 105 || c.t === 106 || c.t === 107 || c.t === 108 || c.t === 110 || c.t === 111 || c.t === 112 || c.t === 113 || c.t === 114 || c.t === 115 || c.t === 116 || c.t === 118 || c.t === 166 || c.t === 167 || c.t === 109 || c.t === 119 || c.t === 119020 || c.t === 1212 || c.t === 1213 || c.t === 1214 || c.t === 122 || c.t === 123 || c.t === 124 || c.t === 126 || c.t === 127 || c.t === 128 || c.t === 129 || c.t === 130 || c.t === 131 || c.t === 132 || c.t === 133 || c.t === 134 || c.t === 136 || c.t === 137 || c.t === 138 || c.t === 140 || c.t === 1404 || c.t === 141 || c.t === 142 || c.t === 143 || c.t === 144 || c.t === 145 || c.t === 146 || c.t === 147 || c.t === 148 || c.t === 149 || c.t === 150 || c.t === 151 || c.t === 152 || c.t === 153 || c.t === 156 || c.t === 157 || c.t === 158 || c.t === 159 || c.t === 1098 || c.t === 1099 || c.t === 135200 || c.t === 135210 || c.t === 135220 || c.t === 135221 || c.t === 135222 || c.t === 135223 || c.t === 135224 || c.t === 135225 || c.t === 135226 || c.t === 135227 || c.t === 135228 || c.t === 135229 || c.t === 135240 || c.t === 135250 || c.t === 135260 || c.t === 135270 || c.t === 135290 || c.t === 135291 || c.t === 135292 || c.t === 135293 || c.t === 135294 || c.t === 135295 || c.t === 135296 || c.t === 135297 || c.t === 135298 || c.t === 135300 || c.t === 135310 || c.t === 135320 || c.t === 135330 || c.t === 135340 || c.t === 135350 || c.t === 135360 || c.t === 135370 || c.t === 135380 || c.t === 135400 || c.t === 135401 || c.t === 135402 || c.t === 135403 || c.t === 180 || c.t === 161 || c.t === 162 || c.t === 163 || c.t === 164 || c.t === 165 || c.t === 194 || c.t === 195 || c.t === 196 || c.t === 197) && typeof c.r == "object" && c.r !== null && a(c.r) && Array.isArray(c.pr) && c.pr.every(
1855
1854
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1856
1855
  ) && Array.isArray(c.o) && c.o.every(
1857
1856
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && Array.isArray(n[1]) && n[1].length === 4 && typeof n[1][0] == "number" && typeof n[1][1] == "number" && typeof n[1][2] == "number" && typeof n[1][3] == "number"
1858
1857
  ) && (c.c === void 0 || typeof c.c == "number") && (c.up === void 0 || typeof c.up == "number") && (c.f === void 0 || typeof c.f == "number") && (c.h === void 0 || typeof c.h == "number") && (c.ec === void 0 || typeof c.ec == "number") && (c.eu === void 0 || typeof c.eu == "number") && (c.eo === void 0 || Array.isArray(c.eo) && c.eo.every(
1859
1858
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1860
1859
  )) && (c.m === void 0 || typeof c.m == "number") && (c.s === void 0 || typeof c.s == "number") && (c.a === void 0 || typeof c.a == "boolean") && (c.k === void 0 || typeof c.k == "number") && (c.cp === void 0 || typeof c.cp == "boolean") && (c.g === void 0 || c.g === 0 || c.g === 1 || c.g === 2 || c.g === 3 || c.g === 4 || c.g === 5) && (c.p === void 0 || Array.isArray(c.p) && c.p.every(
1861
- (n) => typeof n == "object" && n !== null && h(n)
1860
+ (n) => n === null || typeof n == "object" && n !== null && h(n)
1862
1861
  )) && (c.g2 === void 0 || c.g2 === 0 || c.g2 === 1 || c.g2 === 2 || c.g2 === 3 || c.g2 === 4 || c.g2 === 5) && (c.p2 === void 0 || Array.isArray(c.p2) && c.p2.every(
1863
- (n) => typeof n == "object" && n !== null && h(n)
1864
- )) && (c.w === void 0 || typeof c.w == "object" && c.w !== null && Array.isArray(c.w) === !1 && u(c.w)), s = (c) => typeof c.id == "number" && Array.isArray(c.origin) && c.origin.length === 2 && typeof c.origin[0] == "number" && typeof c.origin[1] == "number", a = (c) => typeof c.level == "number" && typeof c.str == "number" && typeof c.luk == "number" && typeof c.dex == "number" && typeof c.int == "number" && typeof c.job == "number" && typeof c.specJob == "number", h = (c) => typeof c.c == "number" && typeof c.t == "number" && typeof c.l == "number" && typeof c.s == "string" && Array.isArray(c.o) && c.o.every(
1862
+ (n) => n === null || typeof n == "object" && n !== null && h(n)
1863
+ )) && (c.w === void 0 || typeof c.w == "object" && c.w !== null && Array.isArray(c.w) === !1 && r(c.w)), s = (c) => typeof c.name == "string" && typeof c.icon == "object" && c.icon !== null && typeof c.icon.id == "number", a = (c) => typeof c.level == "number" && typeof c.str == "number" && typeof c.luk == "number" && typeof c.dex == "number" && typeof c.int == "number" && typeof c.job == "number" && typeof c.specJob == "number", h = (c) => typeof c.c == "number" && typeof c.t == "number" && typeof c.l == "number" && typeof c.s == "string" && Array.isArray(c.o) && c.o.every(
1865
1864
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1866
- ), u = (c) => (c.e === void 0 || typeof c.e == "boolean") && (c.s === void 0 || typeof c.s == "object" && c.s !== null && M(c.s)) && (c.c === void 0 || typeof c.c == "number") && (c.o === void 0 || Array.isArray(c.o) && c.o.every(
1865
+ ), r = (c) => (c.e === void 0 || typeof c.e == "boolean") && (c.s === void 0 || typeof c.s == "object" && c.s !== null && M(c.s)) && (c.c === void 0 || typeof c.c == "number") && (c.o === void 0 || Array.isArray(c.o) && c.o.every(
1867
1866
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1868
1867
  )), M = (c) => typeof c.n == "string" && typeof c.s == "string" && Array.isArray(c.o) && c.o.every(
1869
1868
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
@@ -1901,7 +1900,7 @@ function j(t, o) {
1901
1900
  }
1902
1901
  function F(t) {
1903
1902
  const o = new A();
1904
- return o.itemID = t.id, o.name = t.n, t.d && (o.desc = t.d), o.icon = t.i, t.i2 && t.n2 && (o.anvilIcon = t.i2, o.anvilName = t.n2), o.type = t.t, o.req = t.r, o.props = R(t.pr), o.options = R(t.o, E0), t.c && (o.totalUpgradeCount = t.c), t.up && (o.upgradeCount = t.up), t.f && (o.upgradeFailCount = t.f), t.h && (o.hammerCount = t.h), t.ec && (o.exceptionalTotalUpgradeCount = t.ec), t.eu && (o.exceptionalUpgradeCount = t.eu), t.eo && (o.exceptionalOptions = R(t.eo)), t.m && (o.maxStar = t.m), t.s && (o.star = t.s), t.a && (o.amazing = t.a), t.k && (o.karma = t.k), t.cp && (o.canPotential = t.cp), t.g && (o.grade = t.g), t.p && (o.potentials = j(t.p, $)), t.g2 && (o.additionalGrade = t.g2), t.p2 && (o.additionalPotentials = j(t.p2, $)), U0(t.w, o), o;
1903
+ return o.itemID = t.id, o.name = t.n, t.d && (o.desc = t.d), o.icon = t.i, t.an && (o.anvil = t.an), o.type = t.t, o.req = t.r, o.props = R(t.pr), o.options = R(t.o, E0), t.c && (o.totalUpgradeCount = t.c), t.up && (o.upgradeCount = t.up), t.f && (o.upgradeFailCount = t.f), t.h && (o.hammerCount = t.h), t.ec && (o.exceptionalTotalUpgradeCount = t.ec), t.eu && (o.exceptionalUpgradeCount = t.eu), t.eo && (o.exceptionalOptions = R(t.eo)), t.m && (o.maxStar = t.m), t.s && (o.star = t.s), t.a && (o.amazing = t.a), t.k && (o.karma = t.k), t.cp && (o.canPotential = t.cp), t.g && (o.grade = t.g), t.p && (o.potentials = j(t.p, $)), t.g2 && (o.additionalGrade = t.g2), t.p2 && (o.additionalPotentials = j(t.p2, $)), U0(t.w, o), o;
1905
1904
  }
1906
1905
  function E0(t) {
1907
1906
  const o = new k();
@@ -1910,7 +1909,7 @@ function E0(t) {
1910
1909
  function $(t) {
1911
1910
  if (!t)
1912
1911
  return null;
1913
- const o = new N();
1912
+ const o = new L();
1914
1913
  return o.code = t.c, o.optionType = t.t, o.reqLevel = t.l, o.summary = t.s, o.option = R(t.o), o;
1915
1914
  }
1916
1915
  function U0(t, o) {
@@ -1929,19 +1928,19 @@ function X0(t) {
1929
1928
  };
1930
1929
  }
1931
1930
  export {
1932
- r as BonusStatType,
1931
+ u as BonusStatType,
1933
1932
  A as Gear,
1934
1933
  k as GearOption,
1935
1934
  i as GearPropType,
1936
1935
  f as GearType,
1937
- N as Potential,
1936
+ L as Potential,
1938
1937
  x as PotentialGrade,
1939
1938
  B as SoulWeapon,
1940
- L0 as addAmazingEnhancement,
1939
+ H0 as addAmazingEnhancement,
1941
1940
  x0 as addBonusStat,
1942
- G as addStarforce,
1941
+ p as addStarforce,
1943
1942
  q0 as addUpgradeFailCount,
1944
- H0 as applyExceptionalEnchant,
1943
+ I0 as applyExceptionalEnchant,
1945
1944
  O0 as applyGoldHammer,
1946
1945
  S0 as applyScroll,
1947
1946
  _0 as applySpellTrace,
@@ -1952,8 +1951,8 @@ export {
1952
1951
  C0 as isGearLike,
1953
1952
  j0 as parseGear,
1954
1953
  F as plainToGear,
1955
- I0 as recalculateStarforce,
1956
- N0 as resetBonusStat,
1954
+ N0 as recalculateStarforce,
1955
+ L0 as resetBonusStat,
1957
1956
  e as resetEnhancement,
1958
1957
  K0 as resetExceptionalEnchant,
1959
1958
  z0 as resetUpgrade,
package/lib/gear.d.ts CHANGED
@@ -10,8 +10,6 @@ import { SoulWeapon } from "./soul";
10
10
  export interface GearIcon {
11
11
  /** 아이콘 ID */
12
12
  id: number;
13
- /** 아이콘 오프셋 */
14
- origin: [number, number];
15
13
  }
16
14
  /**
17
15
  * 장비 착용 제한
@@ -32,6 +30,15 @@ export interface GearReq {
32
30
  /** 착용 가능 직업 */
33
31
  specJob: number;
34
32
  }
33
+ /**
34
+ * 신비의 모루
35
+ */
36
+ export interface Anvil {
37
+ /** 모루 장비명 */
38
+ name: string;
39
+ /** 모루 장비 아이콘 */
40
+ icon: GearIcon;
41
+ }
35
42
  /**
36
43
  * 장비
37
44
  */
@@ -44,10 +51,8 @@ export declare class Gear {
44
51
  desc: string;
45
52
  /** 아이콘 */
46
53
  icon: GearIcon;
47
- /** 신비의 모루 아이콘 */
48
- anvilIcon: GearIcon | undefined;
49
- /** 신비의 모루 장비명 */
50
- anvilName: string | undefined;
54
+ /** 신비의 모루 */
55
+ anvil: Anvil | undefined;
51
56
  /** 장비 분류 */
52
57
  type: GearType;
53
58
  /** 장비 착용 제한 */
@@ -144,7 +149,7 @@ export declare class Gear {
144
149
  * @param icon 외형 아이콘.
145
150
  * @param name 외형 장비명.
146
151
  */
147
- setAnvil(icon: GearIcon, name: string): void;
152
+ setAnvil(anvil: Anvil): void;
148
153
  /**
149
154
  * 장비에 적용된 신비의 모루 외형을 제거합니다.
150
155
  */
@@ -1,4 +1,4 @@
1
- import { GearIcon, GearReq } from "../gear";
1
+ import { Anvil, GearIcon, GearReq } from "../gear";
2
2
  import { GearPropType } from "../gearproptype";
3
3
  import { GearType } from "../geartype";
4
4
  import { PotentialGrade } from "../potentialgrade";
@@ -14,10 +14,8 @@ export interface GearLike {
14
14
  d?: string;
15
15
  /** icon */
16
16
  i: GearIcon;
17
- /** anvilIcon */
18
- i2?: GearIcon;
19
- /** anvilName */
20
- n2?: string;
17
+ /** anvil */
18
+ an?: Anvil;
21
19
  /** type */
22
20
  t: GearType;
23
21
  /** req */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malib/gear",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",