@malib/gear 0.0.2 → 0.1.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 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var c=(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_incMHP25=9]="incAllStat_incMHP25",t[t.incAllStat=10]="incAllStat",t[t.incMHP_incMMP=11]="incMHP_incMMP",t[t.incMHPr_incMMPr=12]="incMHPr_incMMPr",t[t.incMHP=13]="incMHP",t[t.incMMP=14]="incMMP",t[t.incMHPr=15]="incMHPr",t[t.incMMPr=16]="incMMPr",t[t.incMDF=17]="incMDF",t[t.incARC=18]="incARC",t[t.incAUT=19]="incAUT",t[t.incPAD_incMAD=20]="incPAD_incMAD",t[t.incPAD=21]="incPAD",t[t.incMAD=22]="incMAD",t[t.incAD=23]="incAD",t[t.incPDD_incMDD=24]="incPDD_incMDD",t[t.incPDD=25]="incPDD",t[t.incSpeed=26]="incSpeed",t[t.incJump=27]="incJump",t[t.knockback=28]="knockback",t[t.bdR=29]="bdR",t[t.incBDR=30]="incBDR",t[t.imdR=31]="imdR",t[t.incIMDR=32]="incIMDR",t[t.damR=33]="damR",t[t.nbdR=34]="nbdR",t[t.statR=35]="statR",t[t.incCHUC=36]="incCHUC",t[t.incPADr=100]="incPADr",t[t.incMADr=101]="incMADr",t[t.incPDDr=102]="incPDDr",t[t.incMDDr=103]="incMDDr",t[t.incACCr=104]="incACCr",t[t.incEVAr=105]="incEVAr",t[t.incCr=106]="incCr",t[t.incDAMr=107]="incDAMr",t[t.RecoveryHP=108]="RecoveryHP",t[t.RecoveryMP=109]="RecoveryMP",t[t.face=110]="face",t[t.prop=111]="prop",t[t.time=112]="time",t[t.HP=113]="HP",t[t.MP=114]="MP",t[t.attackType=115]="attackType",t[t.ignoreTargetDEF=116]="ignoreTargetDEF",t[t.ignoreDAM=117]="ignoreDAM",t[t.ignoreDAMr=118]="ignoreDAMr",t[t.DAMreflect=119]="DAMreflect",t[t.mpconReduce=120]="mpconReduce",t[t.mpRestore=121]="mpRestore",t[t.incMesoProp=122]="incMesoProp",t[t.incRewardProp=123]="incRewardProp",t[t.incAllskill=124]="incAllskill",t[t.RecoveryUP=125]="RecoveryUP",t[t.boss=126]="boss",t[t.level=127]="level",t[t.incTerR=128]="incTerR",t[t.incAsrR=129]="incAsrR",t[t.incEXPr=130]="incEXPr",t[t.reduceCooltime=131]="reduceCooltime",t[t.incCriticaldamageMax=132]="incCriticaldamageMax",t[t.incCriticaldamageMin=133]="incCriticaldamageMin",t[t.incSTRlv=134]="incSTRlv",t[t.incDEXlv=135]="incDEXlv",t[t.incINTlv=136]="incINTlv",t[t.incLUKlv=137]="incLUKlv",t[t.incMaxDamage=138]="incMaxDamage",t[t.incMHPlv=139]="incMHPlv",t[t.incPADlv=140]="incPADlv",t[t.incMADlv=141]="incMADlv",t[t.incCriticaldamage=142]="incCriticaldamage",t[t.attackSpeed=200]="attackSpeed",t[t.tuc=201]="tuc",t[t.setItemID=202]="setItemID",t[t.durability=203]="durability",t[t.reduceReq=204]="reduceReq",t[t.growthLevel=205]="growthLevel",t[t.growthExp=206]="growthExp",t[t.mastery=300]="mastery",t[t.reqLevel=1e3]="reqLevel",t[t.reqSTR=1001]="reqSTR",t[t.reqDEX=1002]="reqDEX",t[t.reqINT=1003]="reqINT",t[t.reqLUK=1004]="reqLUK",t[t.reqJob=1005]="reqJob",t[t.reqPOP=1006]="reqPOP",t[t.reqSpecJob=1007]="reqSpecJob",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.tradeOnce=1106]="tradeOnce",t[t.sharableOnce=1107]="sharableOnce",t[t.charismaEXP=1108]="charismaEXP",t[t.senseEXP=1109]="senseEXP",t[t.insightEXP=1110]="insightEXP",t[t.willEXP=1111]="willEXP",t[t.craftEXP=1112]="craftEXP",t[t.charmEXP=1113]="charmEXP",t[t.accountShareTag=1114]="accountShareTag",t[t.bossReward=1115]="bossReward",t[t.noPotential=1116]="noPotential",t[t.fixedPotential=1117]="fixedPotential",t[t.specialGrade=1118]="specialGrade",t[t.fixedGrade=1119]="fixedGrade",t[t.superiorEqp=1120]="superiorEqp",t[t.incPQEXPr=1121]="incPQEXPr",t[t.jokerToSetItem=1122]="jokerToSetItem",t[t.blockGoldHammer=1123]="blockGoldHammer",t[t.exceptUpgrade=1124]="exceptUpgrade",t[t.onlyUpgrade=1125]="onlyUpgrade",t[t.noLookChange=1126]="noLookChange",t[t.tucIgnoreForPotential=1127]="tucIgnoreForPotential",t))(c||{}),l=(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))(l||{}),S=(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))(S||{});class f{constructor(){this.level=0,this.str=0,this.luk=0,this.dex=0,this.int=0,this.job=0,this.specJob=0}}class D{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}}const o=class{constructor(){this.itemID=0,this.name="",this.desc="",this.icon=0,this.origin=[0,0],this.type=0,this.req=new f,this.props=new Map,this.options=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.failCount=0,this.hammerCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=S.normal,this.potentials=[],this.additionalGrade=S.normal,this.additionalPotentials=[]}option(t){return this.options.has(t)||this.options.set(t,new D),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return Boolean(this.props.get(t))}getMaxStar(){if(this.totalUpgradeCount<=0||this.getBooleanValue(c.onlyUpgrade)||o.isMechanicGear(this.type)||o.isDragonGear(this.type))return 0;let t;const n=this.req.level;for(const i of o.starData)if(n>=i[0])t=i;else break;return t===void 0?0:this.getBooleanValue(c.superiorEqp)?t[2]:t[1]}get diff(){let t=0;for(const[n,i]of this.options)t+=Math.floor(i.diff/o.getPropTypeWeight(n));return t}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==l.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 l.katara:case l.shield:case l.demonShield:case l.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case l.shield:case l.demonShield:case l.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110}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 specialCanPotential(t){switch(t){case l.soulShield:case l.demonShield:case l.katara:case l.magicArrow:case l.card:case l.orb:case l.dragonEssence:case l.soulRing:case l.magnum:case l.emblem:return!0;default:return!1}}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return l.soulShield;case 1099:return l.demonShield;case 1212:return l.shiningRod;case 1213:return l.tuner;case 1214:return l.breathShooter;case 1404:return l.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 GetGender(t){switch(this.getGearType(t)){case l.emblem:case l.powerSource:return 2}return Math.floor(t/1e3)%10}static getPropTypeWeight(t){if(t<100)switch(t){case c.incSTR:case c.incDEX:case c.incINT:case c.incLUK:case c.incPAD:case c.incMAD:case c.incSpeed:case c.incJump:return 1;case c.incMHP:case c.incMMP:return 100;case c.incPDD_incMDD:case c.incPDD:return 10;case c.incPAD_incMAD:case c.incAD:return 2;case c.incMHP_incMMP:return 200}return Number.MAX_VALUE}};let g=o;g.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class k{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const n=[...this.option.keys()];n.sort((a,m)=>c[m].length-c[a].length);let i=this.summary;for(const a of n)i=i.replace(`#${c[a]}`,(this.option.get(a)??0).toString());return i}static getPotentialLevel(n){return n<=0?1:n>=200?20:Math.floor((n+9)/10)}static checkOptionType(n,i){switch(n){case 0:return!0;case 10:return g.isWeapon(i)||g.isSubWeapon(i)||i===l.emblem;case 11:return!k.checkOptionType(10,i);case 20:return g.isSubWeapon(i)||i===l.pants||i===l.shoes||i===l.cap||i===l.coat||i===l.longcoat||i===l.glove||i===l.cape||i===l.belt||i===l.shoulder;case 40:return i===l.faceAccessory||i===l.eyeAccessory||i===l.ring||i===l.earrings||i===l.pendant;case 51:return i===l.cap;case 52:return i===l.coat||i===l.longcoat;case 53:return i===l.pants;case 54:return i===l.glove;case 55:return i===l.shoes;default:return!1}}}var s=(t=>(t.EX_PAD="위대한 (공격력)",t.EX_MAD="위대한 (마력)",t.EX_ALL="위대한 (올스탯)",t.EX_MHP="위대한 (최대 HP)",t.EX_CR="위대한 (크리티컬 확률)",t.EX_IMD="위대한 (몬스터 방어율 무시)",t.EX_BD="위대한 (보스 몬스터 공격 시 데미지)",t.EX_AS="위대한 (모든 스킬레벨)",t.STR="기운찬",t.DEX="날렵한",t.INT="총명한",t.LUK="놀라운",t.ALL="화려한",t.PAD="강력한",t.MAD="빛나는",t.MHP="강인한",t.MMP="풍부한",t))(s||{});class M{constructor(){this.charge=0,this.mobName="",this.soulName="",this.skillName="",this.optionString="",this.option=new Map}isEmpty(){return this.soulName===""}get chargeAD(){return this.isEmpty()?Math.floor(Math.min(500,this.charge)/100)*2:u.getSoulGrade(this.mobName)<=6?Math.floor(Math.min(500,this.charge)/100)*4:Math.floor(Math.min(500,this.charge)/100)*3}static createFromName(n,i){const a=new M;a.mobName=n,a.soulName=u.getSoulName(n,i),a.skillName=u.getSkillName(n,i);const{option:m,optionString:d}=u.getSoulOption(n,i);return a.option=m,a.optionString=d,a}}class u{static getSoulGrade(n){return h[n].grade}static hasPostfix(n){return h[n].namePostfix}static isGreatType(n){return n===s.EX_PAD||n===s.EX_MAD||n===s.EX_ALL||n===s.EX_MHP||n===s.EX_CR||n===s.EX_IMD||n===s.EX_BD||n===s.EX_AS}static getSoulName(n,i){let a;u.isGreatType(i)?a="위대한":a=i;let m;return u.hasPostfix(n)?m="의":m="",a+" "+n+m+" 소울"}static getSkillName(n,i){return this.isGreatType(i)?h[n].greatSkillName:h[n].normalSkillName}static getSoulOption(n,i){const a=new Map,m=this.getSoulOptionType(n,i),d=this.getSoulOptionValue(n,i),r=this.getSoulOptionString(m,d);return a.set(m,d),{option:a,optionString:r}}static getSoulOptionType(n,i){const a=this.getSoulGrade(n)===1;switch(i){case s.EX_PAD:return a?c.incPADr:c.incPAD;case s.EX_MAD:return a?c.incMADr:c.incMAD;case s.EX_ALL:return a?c.statR:c.incAllStat;case s.EX_MHP:return c.incMHP;case s.EX_CR:return c.incCr;case s.EX_IMD:return c.imdR;case s.EX_BD:return c.bdR;case s.EX_AS:return c.incAllskill;case s.STR:return c.incSTR;case s.DEX:return c.incDEX;case s.INT:return c.incINT;case s.LUK:return c.incLUK;case s.ALL:return c.incAllStat;case s.PAD:return c.incPAD;case s.MAD:return c.incMAD;case s.MHP:return c.incMHP;case s.MMP:return c.incMMP;default:throw Error()}}static getSoulOptionString(n,i){switch(n){case c.incSTR:return`STR : +${i}`;case c.incDEX:return`DEX : +${i}`;case c.incINT:return`INT : +${i}`;case c.incLUK:return`LUK : +${i}`;case c.incAllStat:return`올스탯 : +${i}`;case c.statR:return`올스탯 : +${i}%`;case c.incMHP:return`최대 HP : +${i}`;case c.incMMP:return`최대 MP : +${i}`;case c.incPAD:return`공격력 : +${i}`;case c.incPADr:return`공격력 : +${i}%`;case c.incMAD:return`마력 : +${i}`;case c.incMADr:return`마력 : +${i}%`;case c.imdR:return`몬스터 방어율 무시 : +${i}%`;case c.bdR:return`보스 몬스터 공격 시 데미지 : +${i}%`;case c.incCr:return`크리티컬 확률 : +${i}%`;case c.incAllskill:return`모든 스킬레벨 : +${i}(5차 제외, 스킬의 마스터 레벨까지만 증가)`;default:return""}}static getSoulOptionValue(n,i){if(this.isGreatType(i)){if(n==="모카딘"&&i===s.EX_PAD||n==="카리아인"&&i===s.EX_MAD)return 10;if(n==="줄라이"&&i===s.EX_MHP)return 1500;if(n==="CQ57"&&i===s.EX_CR)return 10;if(n==="플레드"&&i===s.EX_ALL)return 20;let a=this.getSoulGrade(n);a===4&&n!=="반 레온"&&(a=3);let m;switch(i){case s.EX_PAD:m=0;break;case s.EX_MAD:m=0;break;case s.EX_ALL:m=1;break;case s.EX_MHP:m=2;break;case s.EX_CR:m=3;break;case s.EX_IMD:m=4;break;case s.EX_BD:m=4;break;case s.EX_AS:m=5;break;default:return 0}return A[a][m]}else{if(n==="모카딘"&&i===s.STR||n==="카리아인"&&i===s.INT||n==="줄라이"&&i===s.DEX||n==="CQ57"&&i===s.LUK)return 20;if(n==="플레드"&&i===s.ALL)return 12;let a;switch(i){case s.STR:a=0;break;case s.DEX:a=0;break;case s.INT:a=0;break;case s.LUK:a=0;break;case s.ALL:a=1;break;case s.PAD:a=2;break;case s.MAD:a=2;break;case s.MHP:a=3;break;case s.MMP:a=3;break;default:return 0}return N[this.getSoulGrade(n)][a]}}static getSoulMobNames(){return Object.keys(h)}}const h={시그너스:{grade:1,namePostfix:!0,normalSkillName:"불꽃 여제",greatSkillName:"폭풍 여제"},매그너스:{grade:1,namePostfix:!0,normalSkillName:"진격! 그게 바로 나다",greatSkillName:"폭격! 그게 바로 나다"},무르무르:{grade:1,namePostfix:!0,normalSkillName:"무르무르의 이상한 동행",greatSkillName:"무르무르의 수상한 동행"},블러디퀸:{grade:1,namePostfix:!0,normalSkillName:"여왕의 마음은 갈대",greatSkillName:"여왕님이 함께 하셔!"},벨룸:{grade:1,namePostfix:!0,normalSkillName:"기가 벨룸 레이저",greatSkillName:"주니어 벨룸 소환!"},스우:{grade:1,namePostfix:!0,normalSkillName:"때렸스우~",greatSkillName:"화났스우~"},데미안:{grade:1,namePostfix:!0,normalSkillName:"사냥 개시",greatSkillName:"파멸의 검"},루시드:{grade:1,namePostfix:!0,normalSkillName:"악몽으로의 초대",greatSkillName:"악몽의 지배자"},윌:{grade:1,namePostfix:!0,normalSkillName:"파괴의 손아귀",greatSkillName:"거미의 왕"},"진 힐라":{grade:1,namePostfix:!0,normalSkillName:"영혼 찢기",greatSkillName:"붉은 마녀"},듄켈:{grade:1,namePostfix:!0,normalSkillName:"지면 절단",greatSkillName:"지면 파쇄"},칼로스:{grade:1,namePostfix:!0,normalSkillName:"감시자의 포효",greatSkillName:"침입자 처단"},핑크빈:{grade:2,namePostfix:!0,normalSkillName:"까칠한 귀여움",greatSkillName:"치명적인 귀여움"},피에르:{grade:2,namePostfix:!0,normalSkillName:"피에르의 모자선물",greatSkillName:"깜짝 피에르!"},반반:{grade:2,namePostfix:!0,normalSkillName:"불닭의 따끔한 맛",greatSkillName:"치킨 날다!"},우르스:{grade:2,namePostfix:!0,normalSkillName:"파왕의 포효",greatSkillName:"파왕의 거친 포효"},아카이럼:{grade:3,namePostfix:!0,normalSkillName:"스네이크 사우론",greatSkillName:"메두사카이럼"},모카딘:{grade:3,namePostfix:!0,normalSkillName:"검은 기사 모카딘",greatSkillName:"어둠 기사 모카딘"},카리아인:{grade:3,namePostfix:!0,normalSkillName:"미친 마법사 카리아인",greatSkillName:"폭주 마법사 카리아인"},CQ57:{grade:3,namePostfix:!0,normalSkillName:"돌격형 CQ57",greatSkillName:"상급 돌격형 CQ57"},줄라이:{grade:3,namePostfix:!0,normalSkillName:"인간 사냥꾼 줄라이",greatSkillName:"피의 사냥꾼 줄라이"},플레드:{grade:3,namePostfix:!0,normalSkillName:"싸움꾼 플레드",greatSkillName:"거친 싸움꾼 플레드"},"반 레온":{grade:4,namePostfix:!0,normalSkillName:"야옹이 권법 : 할퀴기 초식",greatSkillName:"야옹이 권법 : 크로스 따귀 어택"},힐라:{grade:4,namePostfix:!0,normalSkillName:"마른 하늘에 번개 어택",greatSkillName:"마른 하늘에 벼락 어택"},파풀라투스:{grade:4,namePostfix:!0,normalSkillName:"공간의 지배자",greatSkillName:"시간의 지배자"},자쿰:{grade:5,namePostfix:!0,normalSkillName:"뜨거운 토템 투하",greatSkillName:"화끈한 토템 투하"},발록:{grade:6,namePostfix:!0,normalSkillName:"지옥불 트림",greatSkillName:"지옥불 재채기"},돼지바:{grade:6,namePostfix:!1,normalSkillName:"돼지바 스윙!",greatSkillName:"돼지바 드랍!"},프리미엄PC방:{grade:6,namePostfix:!1,normalSkillName:"PC방에서 메이플을 켰다!",greatSkillName:"프리미엄 PC방은 빵빵해"},무공:{grade:7,namePostfix:!0,normalSkillName:"회춘신공",greatSkillName:""},피아누스:{grade:7,namePostfix:!0,normalSkillName:"공포의 마빡생선",greatSkillName:""},"드래곤 라이더":{grade:8,namePostfix:!0,normalSkillName:"손바닥 장풍",greatSkillName:""},렉스:{grade:8,namePostfix:!0,normalSkillName:"내 앞길을 막지마",greatSkillName:""},에피네아:{grade:9,namePostfix:!0,normalSkillName:"여왕의 향기는 나빌레라",greatSkillName:""},핑크몽:{grade:9,namePostfix:!0,normalSkillName:"해피 뉴 에브리데이!",greatSkillName:""},"락 스피릿":{grade:10,namePostfix:!0,normalSkillName:"로큰롤 베이비",greatSkillName:""},"교도관 아니":{grade:10,namePostfix:!0,normalSkillName:"난 한놈만 패",greatSkillName:""},크세르크세스:{grade:10,namePostfix:!0,normalSkillName:"특공 염소 어택",greatSkillName:""},"블랙 슬라임":{grade:10,namePostfix:!0,normalSkillName:"핑크빛 독안개",greatSkillName:""}},A=[[],[3,5,2e3,12,7,2],[10,20,1500,10,5,1],[8,17,1300,8,4,1],[7,15,1200,7,4,1],[6,12,1100,6,3,1],[5,10,1e3,5,3,1]],N=[[],[24,15,6,960],[20,12,5,800],[18,10,4,700],[15,8,3,600],[12,8,3,500],[10,7,3,400],[7,5,0,300],[5,3,0,200],[4,2,0,180],[3,2,0,150]];function E(){return u.getSoulMobNames()}exports.Gear=g;exports.GearOption=D;exports.GearPropType=c;exports.GearReq=f;exports.GearType=l;exports.Potential=k;exports.PotentialGrade=S;exports.Soul=M;exports.SoulType=s;exports.getSoulMobNames=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class X{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 n=(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))(n||{});class g{constructor(){this.level=0,this.str=0,this.luk=0,this.dex=0,this.int=0,this.job=0,this.specJob=0}}var s=(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))(s||{}),U=(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))(U||{});class H{constructor(){this.enchanted=!1,this.charge=0,this.chargeOption=new Map}}class q{constructor(){this.name="",this.skill="",this.multiplier=0,this.option=new Map}}const v=class{constructor(){this.itemID=0,this.name="",this.desc="",this.icon=0,this.origin=[0,0],this.type=0,this.req=new g,this.props=new Map,this.options=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.upgradeFailCount=0,this.hammerCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=U.normal,this.potentials=[],this.additionalGrade=U.normal,this.additionalPotentials=[],this.soulSlot=new H}get upgradeCountLeft(){return this.totalUpgradeCount+this.hammerCount-this.upgradeCount-this.upgradeFailCount}get diff(){let t=0;for(const[c,i]of this.options)t+=Math.floor(i.diff/v.getPropTypeWeight(c));return t}option(t){return this.options.has(t)||this.options.set(t,new X),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return Boolean(this.props.get(t))}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==s.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 s.katara:case s.shield:case s.demonShield:case s.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case s.shield:case s.demonShield:case s.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110}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 specialCanPotential(t){switch(t){case s.soulShield:case s.demonShield:case s.katara:case s.magicArrow:case s.card:case s.orb:case s.dragonEssence:case s.soulRing:case s.magnum:case s.emblem:return!0;default:return!1}}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return s.soulShield;case 1099:return s.demonShield;case 1212:return s.shiningRod;case 1213:return s.tuner;case 1214:return s.breathShooter;case 1404:return s.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 GetGender(t){switch(this.getGearType(t)){case s.emblem:case s.powerSource:return 2}return Math.floor(t/1e3)%10}static getMaxStar(t){if(t.totalUpgradeCount<=0||t.getBooleanValue(n.onlyUpgrade)||v.isMechanicGear(t.type)||v.isDragonGear(t.type))return 0;let c;const i=t.req.level;for(const o of v.starData)if(i>=o[0])c=o;else break;return c===void 0?0:t.getBooleanValue(n.superiorEqp)?c[2]:c[1]}static getPropTypeWeight(t){if(t<100)switch(t){case n.incSTR:case n.incDEX:case n.incINT:case n.incLUK:case n.incPAD:case n.incMAD:case n.incSpeed:case n.incJump:return 1;case n.incMHP:case n.incMMP:return 100;case n.incPDD:return 10;case n.incAD:return 2}return Number.MAX_VALUE}};let D=v;D.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class C{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const c=[...this.option.keys()];c.sort((o,a)=>n[a].length-n[o].length);let i=this.summary;for(const o of c)i=i.replace(`#${n[o]}`,(this.option.get(o)??0).toString());return i}static getPotentialLevel(c){return c<=0?1:c>=200?20:Math.floor((c+9)/10)}static checkOptionType(c,i){switch(c){case 0:return!0;case 10:return D.isWeapon(i)||D.isSubWeapon(i)||i===s.emblem;case 11:return!C.checkOptionType(10,i);case 20:return D.isSubWeapon(i)||i===s.cap||i===s.coat||i===s.longcoat||i===s.pants||i===s.shoes||i===s.glove||i===s.cape||i===s.belt||i===s.shoulder;case 40:return i===s.faceAccessory||i===s.eyeAccessory||i===s.earrings||i===s.ring||i===s.pendant;case 51:return i===s.cap;case 52:return i===s.coat||i===s.longcoat;case 53:return i===s.pants;case 54:return i===s.glove;case 55:return i===s.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.PDD=10]="PDD",t[t.PAD=11]="PAD",t[t.MAD=12]="MAD",t[t.MHP=13]="MHP",t[t.MMP=14]="MMP",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||{});class L{addBonusStat(c,i,o){const a=this.getBonusStatOption(c,i,o);if(a.size===0)return!1;for(const[h,e]of a)c.option(h).bonus+=e;return!0}resetBonusStat(c){for(const[,i]of c.options)i.bonus=0;return!0}getBonusStatOption(c,i,o){const a=L.getGearPropType(i),h=this.getBonusStatValue(c,i,o);return h===0?new Map:new Map(a.map(e=>[e,h]))}getBonusStatValue(c,i,o){const a=c.req.level,h=c.getBooleanValue(n.bossReward),e=c.type;if(a<0||h&&o<3)return 0;switch(i){case u.STR:case u.DEX:case u.INT:case u.LUK:return(Math.floor(a/20)+1)*o;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(Math.floor(a/40)+1)*o;case u.PDD:return(Math.floor(a/20)+1)*o;case u.PAD:case u.MAD:if(D.isWeapon(e)){const r=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];let l=c.option(n.incPAD).base;if(e===s.heavySword||e===s.longSword){if(e===s.longSword)switch(l){case 100:l=102;break;case 103:l=105;break;case 105:l=107;break;case 112:l=114;break;case 117:l=121;break;case 135:l=139;break;case 169:l=173;break;case 203:l=207;break;case 293:l=297;break;case 337:l=342;break}const f=a>180?6:a>160?5:a>110?4:3;return Math.ceil(l*r[o-1]*f/100)}else{const f=c.option(n.incMAD).base;if(i===u.MAD&&f>=l&&(l=f),h){const m=a>160?18:a>150?15:a>110?12:9;return Math.ceil(l*r[o-1]*m/100)}else{const m=a>110?4:3;return Math.ceil(l*r[o-1]*m/100)}}}else if(a<60)return 0;return o;case u.MHP:case u.MMP:return Math.floor(a/10)*30*o;case u.speed:case u.jump:return D.isWeapon(e)?0:o;case u.damR:return D.isWeapon(e)?o:0;case u.bdR:return a<90||!D.isWeapon(e)?0:2*o;case u.allStatR:return a<70&&!D.isWeapon(e)?0:o;case u.reduceReq:return Math.min(5*o,a);default:return 0}}static getGearPropType(c){switch(c){case u.STR:return[n.incSTR];case u.DEX:return[n.incDEX];case u.INT:return[n.incINT];case u.LUK:return[n.incLUK];case u.STR_DEX:return[n.incSTR,n.incDEX];case u.STR_INT:return[n.incSTR,n.incINT];case u.STR_LUK:return[n.incSTR,n.incLUK];case u.DEX_INT:return[n.incDEX,n.incINT];case u.DEX_LUK:return[n.incDEX,n.incLUK];case u.INT_LUK:return[n.incINT,n.incLUK];case u.PDD:return[n.incPDD];case u.PAD:return[n.incPAD];case u.MAD:return[n.incMAD];case u.MHP:return[n.incMHP];case u.MMP:return[n.incMMP];case u.speed:return[n.incSpeed];case u.jump:return[n.incJump];case u.damR:return[n.damR];case u.bdR:return[n.bdR];case u.allStatR:return[n.statR];case u.reduceReq:return[n.reduceReq];default:return[]}}}const M=class{addStarforce(t,c=!1){if(t.getBooleanValue(n.incCHUC))return!1;if(t.getBooleanValue(n.superiorEqp))return this.addSuperiorStarforce(t);if(t.star>=t.maxStar&&!c||t.star>=M.MAX_STARFORCE)return!1;t.star+=1;const i=t.star,o=M.getStatData(t,!1,!1),a=M.getStatData(t,!1,!0),h=D.isWeapon(t.type)||t.type===s.katara,e=[[n.incSTR,n.incDEX],[n.incINT,n.incLUK],[n.incDEX,n.incSTR],[n.incLUK,n.incDEX],[n.incSTR,n.incDEX]],r=[n.incSTR,n.incDEX,n.incINT,n.incLUK];let l;const f=t.req.job;if(f===0)l=new Set([n.incSTR,n.incDEX,n.incINT,n.incLUK]);else{l=new Set;for(let d=0;d<5;d++)if(f&1<<d)for(const A of e[d])l.add(A)}for(const d of r)(l.has(d)||i>15&&(t.option(d).base>0||t.option(d).upgrade>0))&&(t.option(d).enchant+=o[i]);if(h){const d=f===0||Math.floor(f/2)%2===1||t.option(n.incMAD).upgrade>0;if(i>15)t.option(n.incPAD).enchant+=a[i],d&&(t.option(n.incMAD).enchant+=a[i]);else{const A=t.option(n.incPAD).sum-t.option(n.incPAD).bonus;if(t.option(n.incPAD).enchant+=Math.floor(A/50)+1,d){const S=t.option(n.incMAD).sum-t.option(n.incMAD).bonus;t.option(n.incMAD).enchant+=Math.floor(S/50)+1}}}else t.option(n.incPAD).enchant+=a[i],t.option(n.incMAD).enchant+=a[i],t.type===s.glove&&(f===0?(t.option(n.incPAD).enchant+=M.starforceGloveBonusAttData[i],t.option(n.incMAD).enchant+=M.starforceGloveBonusAttData[i]):Math.floor(f/2)%2===1?t.option(n.incMAD).enchant+=M.starforceGloveBonusAttData[i]:t.option(n.incPAD).enchant+=M.starforceGloveBonusAttData[i]);if(!h&&t.type!==s.machineHeart){const d=t.option(n.incPDD).sum-t.option(n.incPDD).bonus;t.option(n.incPDD).enchant+=Math.floor(d/20)+1}const m=[s.cap,s.coat,s.longcoat,s.pants,s.cape,s.ring,s.pendant,s.belt,s.shoulder,s.shield];return h?(t.option(n.incMHP).enchant+=M.starforceMhpData[i],t.option(n.incMMP).enchant+=M.starforceMhpData[i]):m.includes(t.type)&&(t.option(n.incMHP).enchant+=M.starforceMhpData[i]),t.type===s.shoes&&(t.option(n.incSpeed).enchant+=M.starforceSpeedJumpData[i],t.option(n.incJump).enchant+=M.starforceSpeedJumpData[i]),!0}addSuperiorStarforce(t){if(t.star>=t.maxStar)return!1;t.star+=1;const c=t.star,i=M.getStatData(t,!1,!1),o=M.getStatData(t,!1,!0),a=[n.incSTR,n.incDEX,n.incINT,n.incLUK];for(const r of a)t.option(r).base>0&&(t.option(r).enchant+=i[c]);const h=[n.incPAD,n.incMAD];for(const r of h)t.option(r).base>0&&(t.option(r).enchant+=o[c]);const e=t.option(n.incPDD).sum-t.option(n.incPDD).bonus;return t.option(n.incPDD).enchant+=Math.floor(e/20)+1,!0}addAmazingEnhancement(t,c=!1,i=!1){if(t.getBooleanValue(n.incCHUC)||t.getBooleanValue(n.superiorEqp)||t.star>=t.maxStar&&!i||t.star>=M.MAX_AMAZING)return!1;t.amazing||(t.amazing=!0,t.maxStar=Math.min(t.maxStar,M.MAX_AMAZING)),t.star+=1;const o=t.star,a=M.getStatData(t,!0,!1),h=M.getStatData(t,!0,!0),e=D.isWeapon(t.type)||t.type===s.katara,r=[n.incSTR,n.incDEX,n.incINT,n.incLUK];for(const m of r)if(t.option(m).sum>0){let A=a[o];c&&D.isAccessory(t.type)&&(A+=o>5?2:1),t.option(m).enchant+=A}const l=[n.incPAD,n.incMAD];for(const m of l){const d=t.option(m).sum;if(d>0){e&&(t.option(m).enchant+=Math.floor(d/50)+1);let A=h[o];c&&(e||t.type===s.shield)&&(A+=1),t.option(m).enchant+=A}}c&&D.isArmor(t.type)&&(t.option(n.incMHP).enchant+=50);const f=t.option(n.incPDD).sum;return t.option(n.incPDD).enchant+=Math.floor(f/20)+1,!0}resetEnhancement(t){if(t.getBooleanValue(n.incCHUC))return!1;t.star=0,t.amazing=!1,t.maxStar=D.getMaxStar(t);for(const[,c]of t.options)c.enchant=0;return!0}recalculate(t){if(t.getBooleanValue(n.incCHUC)||t.amazing)return!1;const c=t.star;this.resetEnhancement(t);for(let i=0;i<c;i++)this.addStarforce(t,!0);return!0}static getStatData(t,c,i){let o;t.getBooleanValue(n.superiorEqp)?i?o=this.superiorAttData:o=this.superiorStatData:c?i?o=this.amazingAttData:o=this.amazingStatData:i?D.isWeapon(t.type)||t.type===s.katara?o=this.starforceWeaponAttData:o=this.starforceAttData:o=this.starforceStatData;const a=t.req.level;for(const h of[...o].reverse())if(a>=h[0])return h;throw Error(`Gear has invalid reqLevel.
2
+ `+t)}};let R=M;R.MAX_STARFORCE=25;R.MAX_AMAZING=15;R.superiorAttData=[[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]];R.superiorStatData=[[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]];R.starforceWeaponAttData=[[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]];R.starforceAttData=[[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]];R.starforceStatData=[[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]];R.amazingAttData=[[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]];R.amazingStatData=[[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]];R.starforceGloveBonusAttData=[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];R.starforceMhpData=[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];R.starforceSpeedJumpData=[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];class w{constructor(c="",i){this.name=c,this.stat=i??new Map}static getSpellTraceScroll(c,i,o){const a=i===n.incINT?n.incMAD:n.incPAD,h=c.req.level>=115?2:c.req.level>=75?1:0;let e;const r=a===n.incMAD?"마력":"공격력";switch(i){case n.incSTR:e="힘";break;case n.incDEX:e="민첩";break;case n.incINT:e="지력";break;case n.incLUK:e="운";break;case n.incAllStat:e="올스탯";break;case n.incMHP:e="체력";break}if(D.isWeapon(c.type)||c.type===s.katara){if(i===n.incAllStat)return;let l;switch(o){case 100:l=[[1,0],[2,0],[3,1]];break;case 70:l=[[2,0],[3,1],[5,2]];break;case 30:l=[[3,1],[5,2],[7,3]];break;case 15:l=[[5,2],[7,3],[9,4]];break}const f=l[h][0],m=l[h][1]*(i===n.incMHP?50:1),d=m>0?`${o}% ${r}(${e}) 주문서`:`${o}% ${r} 주문서`,A=new Map([[i,m],[a,f]]);return new w(d,A)}else if(o===15)return;if(c.type===s.glove){let l;switch(o){case 100:l=[0,1,1];break;case 70:l=[1,2,2];break;case 30:l=[2,3,3];break}const f=l[h];let m,d;return f===0?(m=`${o}% 방어력 주문서`,d=new Map([[n.incPDD,3]])):(m=`${o}% ${r} 주문서`,d=new Map([[a,f]])),new w(m,d)}if(D.isArmor(c.type)||c.type===s.shoulder){if(i===n.incAllStat){if(o!==30)return;const k=[[1,30,4],[2,70,7],[3,120,10]],b=k[h][0],N=k[h][1],I=k[h][2],K=`${o}% ${e} 주문서`,E=new Map([[n.incSTR,b],[n.incDEX,b],[n.incINT,b],[n.incLUK,b],[n.incMHP,N],[n.incPDD,I]]);return c.upgradeCount===3&&(c.req.job===0?(E.set(n.incMAD,1),E.set(n.incPAD,1)):Math.floor(c.req.job/2)%2===1?E.set(n.incMAD,1):E.set(n.incPAD,1)),new w(K,E)}let l;switch(o){case 100:l=[[1,5,1],[2,20,2],[3,30,3]];break;case 70:l=[[2,15,2],[3,40,4],[4,70,5]];break;case 30:l=[[3,30,4],[5,70,7],[7,120,10]];break}const f=i!==n.incMHP?l[h][0]:0,m=l[h][1]+(i===n.incMHP?l[h][0]*50:0),d=l[h][2],A=`${o}% ${e} 주문서`,S=new Map([[n.incMHP,m],[n.incPDD,d]]);return f>0&&S.set(i,f),c.upgradeCount===3&&(c.req.job===0?(S.set(n.incMAD,1),S.set(n.incPAD,1)):Math.floor(c.req.job/2)%2===1?S.set(n.incMAD,1):S.set(n.incPAD,1)),new w(A,S)}if(D.isAccessory(c.type)){if(i===n.incAllStat){if(o!==30)return;const S=[[1,30,4],[2,70,7],[3,120,10]][h][0],k=`${o}% ${e} 주문서`,b=new Map([[n.incSTR,S],[n.incDEX,S],[n.incINT,S],[n.incLUK,S]]);return new w(k,b)}let l;switch(o){case 100:l=[1,1,2];break;case 70:l=[2,2,3];break;case 30:l=[3,4,5];break}const f=l[h]*(i===n.incMHP?50:1),m=`${o}% ${e} 주문서`,d=new Map([[i,f]]);return new w(m,d)}if(c.type===s.machineHeart){let l;switch(o){case 100:l=[1,2,3];break;case 70:l=[2,3,5];break;case 30:l=[3,5,7];break}const f=l[h],m=`${o}% ${e} 주문서`,d=new Map([[a,f]]);return new w(m,d)}}}class W{enchant(c){return c.soulSlot.enchanted||!D.isWeapon(c.type)?!1:(c.soulSlot.enchanted=!0,c.soulSlot.soul=void 0,c.soulSlot.charge=0,c.soulSlot.chargeOption.clear(),!0)}disenchant(c){return c.soulSlot.enchanted?(c.soulSlot.enchanted=!1,c.soulSlot.soul=void 0,c.soulSlot.charge=0,c.soulSlot.chargeOption.clear(),!0):!1}setSoul(c,i){return c.soulSlot.enchanted?(c.soulSlot.soul=i,this.setCharge(c,c.soulSlot.charge),!0):!1}removeSoul(c){return!c.soulSlot.enchanted||!c.soulSlot.soul?!1:(c.soulSlot.soul=void 0,this.setCharge(c,c.soulSlot.charge),!0)}setCharge(c,i){if(!c.soulSlot.enchanted||i<0||i>1e3)return!1;c.soulSlot.charge=i;const a=c.option(n.incPAD).base<c.option(n.incMAD).base?n.incMAD:n.incPAD;return c.soulSlot.chargeOption.clear(),c.soulSlot.chargeOption.set(a,this.getChargeAD(c.soulSlot)),!0}getChargeAD(c){if(!c.enchanted)return 0;if(c.soul){const i=c.soul.multiplier;return 10+Math.min(Math.ceil(c.charge/100),5)*i}return 5+Math.min(Math.ceil(c.charge/100),5)}}class V{applyGoldHammer(c){return c.getBooleanValue(n.blockGoldHammer)||c.getBooleanValue(n.onlyUpgrade)||c.totalUpgradeCount<=0||c.hammerCount>0?!1:(c.hammerCount=1,!0)}applyScroll(c,i){if(c.upgradeCountLeft<1)return!1;c.upgradeCount+=1;for(const[o,a]of i.stat)c.option(o).upgrade+=a;return!0}applySpellTrace(c,i,o){const a=w.getSpellTraceScroll(c,i,o);return a?this.applyScroll(c,a):!1}addUpgradeFailCount(c){return c.upgradeCountLeft<1?!1:(c.upgradeFailCount+=1,!0)}restoreUpgradeCount(c){return c.upgradeFailCount<1?!1:(c.upgradeFailCount-=1,!0)}resetUpgrade(c){c.upgradeCount=0,c.upgradeFailCount=0,c.hammerCount=0;for(const[,i]of c.options)i.upgrade=0;return!0}}exports.BonusStatLogic=L;exports.BonusStatType=u;exports.EnhancementLogic=R;exports.Gear=D;exports.GearOption=X;exports.GearPropType=n;exports.GearReq=g;exports.GearType=s;exports.Potential=C;exports.PotentialGrade=U;exports.Scroll=w;exports.Soul=q;exports.SoulLogic=W;exports.SoulSlot=H;exports.UpgradeLogic=V;
package/index.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  export * from "./lib/gear";
2
+ export * from "./lib/gearoption";
2
3
  export * from "./lib/gearproptype";
4
+ export * from "./lib/gearreq";
3
5
  export * from "./lib/geartype";
4
6
  export * from "./lib/potential";
5
7
  export * from "./lib/potentialgrade";
6
8
  export * from "./lib/soul";
7
- export * from "./lib/soultype";
9
+ export * from "./lib/logic/bonusstat";
10
+ export * from "./lib/logic/bonusstattype";
11
+ export * from "./lib/logic/enhancement";
12
+ export * from "./lib/logic/scroll";
13
+ export * from "./lib/logic/soul";
14
+ export * from "./lib/logic/upgrade";