@malib/gear 1.0.0-next.2 → 1.0.0-next.3
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/Gear.d.ts +9 -16
- package/dist/lib/GearAttribute.d.ts +6 -1
- package/dist/lib/data/GearAttributeData.d.ts +6 -4
- package/dist/lib/data/GearData.d.ts +16 -9
- package/dist/lib/data/GearOption.d.ts +8 -2
- package/dist/lib/data/PotentialData.d.ts +2 -2
- package/dist/lib/data/SoulSlotData.d.ts +4 -4
- package/dist/lib/enhance/addOption.d.ts +2 -2
- package/dist/lib/enhance/exceptional.d.ts +2 -2
- package/dist/lib/enhance/starforce.d.ts +4 -62
- package/dist/lib/enhance/upgrade.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ut=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var $t=Object.prototype.hasOwnProperty;var Ft=(t,o)=>{for(var r in o)ut(t,r,{get:o[r],enumerable:!0})},Jt=(t,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Nt(o))!$t.call(t,n)&&n!==r&&ut(t,n,{get:()=>o[n],enumerable:!(a=Vt(o,n))||a.enumerable});return t};var Kt=t=>Jt(ut({},"__esModule",{value:!0}),t);var Ee={};Ft(Ee,{AddOptionCan:()=>mt,AddOptionType:()=>Ot,Gear:()=>pt,GearAttribute:()=>v,GearCuttable:()=>ht,GearReq:()=>C,GearShare:()=>ft,GearTrade:()=>dt,GearType:()=>O,PotentialCan:()=>St,PotentialGrade:()=>y,SpellTraceType:()=>At,applyExceptional:()=>Z,applyGoldenHammer:()=>T,applyScroll:()=>P,applySoulEnchant:()=>lt,applySpellTrace:()=>rt,canApplyExceptional:()=>H,canApplyScroll:()=>j,canApplySoulEnchant:()=>J,canFailScroll:()=>L,canGoldenHammer:()=>q,canResetExceptional:()=>D,canResetStarforce:()=>N,canResetUpgrade:()=>G,canResileScroll:()=>M,canSetSoul:()=>K,canSetSoulCharge:()=>X,canStarScroll:()=>R,canStarforce:()=>_,failScroll:()=>tt,getAddOption:()=>Y,getAddOptionValue:()=>wt,getSpellTraceScroll:()=>kt,isAccessory:()=>x,isArmor:()=>h,isDoubleHandWeapon:()=>bt,isDragonGear:()=>Et,isLeftWeapon:()=>xt,isMechanicGear:()=>Ct,isShield:()=>U,isSubWeapon:()=>vt,isWeapon:()=>u,resetExceptional:()=>z,resetSoulEnchant:()=>st,resetStarforce:()=>nt,resetUpgrade:()=>ot,resileScroll:()=>et,setSoul:()=>it,setSoulCharge:()=>ct,starScroll:()=>V,starforce:()=>W,supportsAddOption:()=>Q,supportsExceptional:()=>k,supportsSoul:()=>F,supportsStarforce:()=>A,supportsUpgrade:()=>S,toGearOption:()=>d});module.exports=Kt(Ee);var dt=(a=>(a[a.Tradeable=0]="Tradeable",a[a.TradeBlock=1]="TradeBlock",a[a.EquipTradeBlock=2]="EquipTradeBlock",a))(dt||{}),ft=(a=>(a[a.None=0]="None",a[a.AccountSharable=1]="AccountSharable",a[a.AccountSharableOnce=2]="AccountSharableOnce",a))(ft||{}),mt=(a=>(a[a.None=0]="None",a[a.Can=1]="Can",a[a.Cannot=2]="Cannot",a))(mt||{}),St=(n=>(n[n.None=0]="None",n[n.Can=1]="Can",n[n.Cannot=2]="Cannot",n[n.Fixed=3]="Fixed",n))(St||{}),ht=(a=>(a[a.None=0]="None",a[a.Silver=1]="Silver",a[a.Platinum=2]="Platinum",a))(ht||{});var O=(e=>(e[e.cap=100]="cap",e[e.faceAccessory=101]="faceAccessory",e[e.eyeAccessory=102]="eyeAccessory",e[e.earrings=103]="earrings",e[e.coat=104]="coat",e[e.longcoat=105]="longcoat",e[e.pants=106]="pants",e[e.shoes=107]="shoes",e[e.glove=108]="glove",e[e.cape=110]="cape",e[e.ring=111]="ring",e[e.pendant=112]="pendant",e[e.belt=113]="belt",e[e.medal=114]="medal",e[e.shoulder=115]="shoulder",e[e.pocket=116]="pocket",e[e.badge=118]="badge",e[e.android=166]="android",e[e.machineHeart=167]="machineHeart",e[e.shield=109]="shield",e[e.emblem=119]="emblem",e[e.powerSource=119020]="powerSource",e[e.shiningRod=1212]="shiningRod",e[e.tuner=1213]="tuner",e[e.breathShooter=1214]="breathShooter",e[e.soulShooter=122]="soulShooter",e[e.desperado=123]="desperado",e[e.energySword=124]="energySword",e[e.espLimiter=126]="espLimiter",e[e.chain=127]="chain",e[e.magicGauntlet=128]="magicGauntlet",e[e.ritualFan=129]="ritualFan",e[e.ohSword=130]="ohSword",e[e.ohAxe=131]="ohAxe",e[e.ohBlunt=132]="ohBlunt",e[e.dagger=133]="dagger",e[e.katara=134]="katara",e[e.cane=136]="cane",e[e.wand=137]="wand",e[e.staff=138]="staff",e[e.thSword=140]="thSword",e[e.chakram=1404]="chakram",e[e.thAxe=141]="thAxe",e[e.thBlunt=142]="thBlunt",e[e.spear=143]="spear",e[e.polearm=144]="polearm",e[e.bow=145]="bow",e[e.crossbow=146]="crossbow",e[e.claw=147]="claw",e[e.knuckle=148]="knuckle",e[e.gun=149]="gun",e[e.shovel=150]="shovel",e[e.pickaxe=151]="pickaxe",e[e.dualBowguns=152]="dualBowguns",e[e.handCannon=153]="handCannon",e[e.heavySword=156]="heavySword",e[e.longSword=157]="longSword",e[e.gauntletRevolver=158]="gauntletRevolver",e[e.ancientBow=159]="ancientBow",e[e.soulShield=1098]="soulShield",e[e.demonShield=1099]="demonShield",e[e.magicArrow=135200]="magicArrow",e[e.card=135210]="card",e[e.medallion=135220]="medallion",e[e.rosary=135221]="rosary",e[e.ironChain=135222]="ironChain",e[e.magicBook1=135223]="magicBook1",e[e.magicBook2=135224]="magicBook2",e[e.magicBook3=135225]="magicBook3",e[e.arrowFletching=135226]="arrowFletching",e[e.bowThimble=135227]="bowThimble",e[e.daggerScabbard=135228]="daggerScabbard",e[e.charm=135229]="charm",e[e.orb=135240]="orb",e[e.dragonEssence=135250]="dragonEssence",e[e.soulRing=135260]="soulRing",e[e.magnum=135270]="magnum",e[e.wristBand=135290]="wristBand",e[e.farSight=135291]="farSight",e[e.powderKeg=135292]="powderKeg",e[e.mass=135293]="mass",e[e.document=135294]="document",e[e.magicMarble=135295]="magicMarble",e[e.arrowhead=135296]="arrowhead",e[e.jewel=135297]="jewel",e[e.powderKeg2=135298]="powderKeg2",e[e.controller=135300]="controller",e[e.foxMarble=135310]="foxMarble",e[e.chessPiece=135320]="chessPiece",e[e.transmitter=135330]="transmitter",e[e.charge=135340]="charge",e[e.magicWing=135350]="magicWing",e[e.pathOfAbyss=135360]="pathOfAbyss",e[e.relic=135370]="relic",e[e.fanTassel=135380]="fanTassel",e[e.bracelet=135400]="bracelet",e[e.weaponBelt=135401]="weaponBelt",e[e.ornament=135402]="ornament",e[e.hexSeeker=135403]="hexSeeker",e[e.petEquip=180]="petEquip",e[e.machineEngine=161]="machineEngine",e[e.machineArms=162]="machineArms",e[e.machineLegs=163]="machineLegs",e[e.machineBody=164]="machineBody",e[e.machineTransistors=165]="machineTransistors",e[e.dragonMask=194]="dragonMask",e[e.dragonPendant=195]="dragonPendant",e[e.dragonWings=196]="dragonWings",e[e.dragonTail=197]="dragonTail",e))(O||{});var y=(l=>(l[l.Normal=0]="Normal",l[l.Rare=1]="Rare",l[l.Epic=2]="Epic",l[l.Unique=3]="Unique",l[l.Legendary=4]="Legendary",l))(y||{});function u(t){return xt(t)||bt(t)}function xt(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function bt(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function vt(t){if(U(t))return!0;switch(t){case 134:return!0;default:return Math.floor(t/1e3)===135}}function U(t){switch(t){case 109:case 1099:case 1098:return!0;default:return!1}}function h(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function x(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}function Ct(t){return t>=161&&t<=165}function Et(t){return t>=194&&t<=197}var Ot=(p=>(p.str="str",p.dex="dex",p.int="int",p.luk="luk",p.str_dex="str&dex",p.str_int="str&int",p.str_luk="str&luk",p.dex_int="dex&int",p.dex_luk="dex&luk",p.int_luk="int&luk",p.maxHp="maxHp",p.maxMp="maxMp",p.attackPower="attackPower",p.magicPower="magicPower",p.armor="armor",p.speed="speed",p.jump="jump",p.bossDamage="bossDamage",p.damage="damage",p.allStat="allStat",p.reqLevelDecrease="reqLevelDecrease",p))(Ot||{});function Q(t){return u(t)?!0:h(t)?!U(t):x(t)?![111,115].includes(t):t===116}function Y(t,o,r){let a=ae(o),n=wt(t,o,r),l=a.map(c=>[c,n]);return Object.fromEntries(l)}function wt(t,o,r){let a={type:o,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward??!1,attackPower:t.baseOption.attackPower??0,magicPower:t.baseOption.magicPower??0};switch(o){case"str":case"dex":case"int":case"luk":return Ut(r,a);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Xt(r,a);case"armor":return Ut(r,a);case"attackPower":case"magicPower":return yt(r,a);case"maxHp":case"maxMp":return Zt(r,a);case"speed":return zt(r,a);case"jump":return Tt(r,a);case"damage":return te(r,a);case"bossDamage":return ee(r,a);case"allStat":return oe(r,a);case"reqLevelDecrease":return re(r,a)}}function Ut(t,{reqLevel:o}){return o>=250?Math.floor(o/20)*t:(Math.floor(o/20)+1)*t}function Xt(t,{reqLevel:o}){return(Math.floor(o/40)+1)*t}function yt(t,o){let{reqLevel:r,gearType:a}=o;if(u(a))return Qt(t,o);if(r>=60)return t;throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 60 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")}function Qt(t,o){let{reqLevel:r,type:a,gearType:n,bossReward:l,attackPower:c,magicPower:i}=o,f=l?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];if(n===156||n===157){let m=Yt(n,o),E=r>180?6:r>160?5:r>110?4:3;return Math.ceil(m*f[t-1]*E/100)}else{let m=a==="magicPower"&&i>c?i:c;if(l){let E=r>160?6:r>150?5:r>110?4:3;return Math.ceil(m*f[t-1]*E*3/100)}else{let E=r>110?4:3;return Math.ceil(m*f[t-1]*E/100)}}}function Yt(t,{attackPower:o}){if(t===156)return o;let a=new Map([[100,102],[103,105],[105,107],[112,114],[117,121],[135,139],[169,173],[203,207],[293,297],[337,342]]).get(o);if(a===void 0)throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC744 \uBD80\uC5EC\uD560 \uC218 \uC5C6\uB294 \uD0DC\uB3C4 \uC7A5\uBE44\uC785\uB2C8\uB2E4. (Please submit issue with the gear info)");return a}function Zt(t,{reqLevel:o}){return o<10?3*t:o>=250?700*t:Math.floor(o/10)*30*t}function zt(t,{gearType:o}){if(u(o))throw TypeError("\uC774\uB3D9\uC18D\uB3C4 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Tt(t,{gearType:o}){if(u(o))throw TypeError("\uC810\uD504\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function te(t,{gearType:o}){if(!u(o))throw TypeError("\uB370\uBBF8\uC9C0(%) \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function ee(t,{reqLevel:o,gearType:r}){if(o<90||!u(r))throw TypeError("\uBCF4\uC2A4 \uACF5\uACA9 \uC2DC \uB370\uBBF8\uC9C0 \uC99D\uAC00(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 90 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return 2*t}function oe(t,{reqLevel:o,gearType:r}){if(o<70&&!u(r))throw TypeError("\uC62C\uC2A4\uD0EF(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 70 \uC774\uC0C1 \uB610\uB294 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function re(t,{reqLevel:o}){if(o<=0)throw TypeError("\uCC29\uC6A9 \uB808\uBCA8 \uAC10\uC18C \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 1 \uC774\uC0C1\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return Math.min(o,5*t)}function ae(t){return t.split("&")}function w(t,...o){let r=t;for(let a of o)for(let[n,l]of Object.entries(a))n in r?r[n]+=l:r[n]=l}function It(...t){let o={};return w(o,...t),o}function k(t){return t.exceptionalTotalUpgradeableCount>0}function H(t){return k(t)&&t.exceptionalUpgradeableCount>0}function Z(t,o){if(!H(t))throw TypeError("\uC775\uC149\uC154\uB110 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption===void 0&&(t.data.exceptionalOption={}),w(t.data.exceptionalOption,o.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function D(t){return k(t)}function z(t){if(!D(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption={},t.data.exceptionalUpgradeableCount=t.exceptionalTotalUpgradeableCount,t.data.exceptionalUpgradeCount=void 0}function S(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function q(t){return S(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function T(t){if(!q(t))throw TypeError("\uD669\uAE08 \uB9DD\uCE58\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.goldenHammer=t.goldenHammer+1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function L(t){return S(t)&&t.scrollUpgradeableCount>0}function tt(t){if(!L(t))throw TypeError("\uC8FC\uBB38\uC11C \uC2E4\uD328\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollResilienceCount=t.scrollResilienceCount+1}function M(t){return S(t)&&t.scrollResilienceCount>0}function et(t){if(!M(t))throw TypeError("\uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5 \uD69F\uC218\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollResilienceCount=t.scrollResilienceCount-1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function G(t){return S(t)}function ot(t){if(!G(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function j(t){return S(t)&&t.scrollUpgradeableCount>0}function P(t,o){if(!j(t))throw TypeError("\uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption===void 0&&(t.data.upgradeOption={}),w(t.data.upgradeOption,o.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}var At=(c=>(c.str="str",c.dex="dex",c.int="int",c.luk="luk",c.maxHp="maxHp",c.allStat="allStat",c))(At||{});function rt(t,o,r){let a=kt(t,o,r);P(t,a)}function kt(t,o,r){if(u(t.type)||t.type===134)return ne(t,o,r);if(t.type===108)return le(t,o,r);if(h(t.type)||t.type===115)return ie(t,o,r);if(x(t.type))return ce(t,o,r);if(t.type===167)return se(t,o,r);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function ne(t,o,r){if(o==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=B(t),[n,l]=pe[r][a];o==="maxHp"&&(l*=50);let c=Pt(o),i,f;return l===0?(i=`${r}% ${g(c)} \uC8FC\uBB38\uC11C`,f={[c]:n}):(i=`${r}% ${g(c)}(${g(o)}) \uC8FC\uBB38\uC11C`,f={[c]:n,[o]:l}),{name:i,option:f,type:o,rate:r}}function le(t,o,r){let a=B(t),n=de[r][a],l,c;if(n===0)l=`${r}% \uBC29\uC5B4\uB825 \uC8FC\uBB38\uC11C`,c={armor:3};else{let i=Pt(o);l=`${r}% ${g(i)} \uC8FC\uBB38\uC11C`,c={[i]:n}}return{name:l,option:c,rate:r,type:o}}function ie(t,o,r){let a=B(t),[n,l,c]=ue[r][a],i={maxHp:l,armor:c};switch(o){case"str":case"dex":case"int":case"luk":i[o]=n;break;case"maxHp":i.maxHp+=n*50;break;case"allStat":if(!(r in Ht))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let m=Ht[r][a];i.str=m,i.dex=m,i.int=m,i.luk=m;break}return t.scrollUpgradeCount===3&&(t.req.beginner()?(i.attackPower=1,i.magicPower=1):t.req.magician()?i.magicPower=1:i.attackPower=1),{name:`${r}% ${g(o)} \uC8FC\uBB38\uC11C`,option:i,type:o,rate:r}}function ce(t,o,r){if(!(r in gt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=B(t),n=gt[r][a],l={};switch(o){case"str":case"dex":case"int":case"luk":l[o]=n;break;case"maxHp":l.maxHp=n*50;break;case"allStat":if(!(r in Dt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let i=Dt[r][a];l.str=i,l.dex=i,l.int=i,l.luk=i;break}return{name:`${r}% ${g(o)} \uC8FC\uBB38\uC11C`,option:l,type:o,rate:r}}function se(t,o,r){if(!(r in gt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=B(t),n=fe[r][a],l=Pt(o),c=`${r}% ${g(l)} \uC8FC\uBB38\uC11C`,i={[l]:n};return{name:c,option:i,type:o,rate:r}}function g(t){switch(t){case"str":return"\uD798";case"dex":return"\uBBFC\uCCA9";case"int":return"\uC9C0\uB825";case"luk":return"\uC6B4";case"maxHp":return"\uCCB4\uB825";case"allStat":return"\uC62C\uC2A4\uD0EF";case"attackPower":return"\uACF5\uACA9\uB825";case"magicPower":return"\uB9C8\uB825"}}function B(t){return t.req.level>110?2:t.req.level>70?1:0}function Pt(t){return t==="int"?"magicPower":"attackPower"}var pe={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]]},ue={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]]},Ht={30:[1,2,3],15:[2,3,4]},de={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},gt={100:[1,1,2],70:[2,2,3],30:[3,4,5]},Dt={30:[1,2,3]},fe={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var qt="__GearOption_s87Ns2aQ";function d(t){return t[qt]?t:new Proxy(t,{get(o,r){if(r===qt)return!0;if(r in _t)return o[r]??_t[r]},set(o,r,a){return r in _t?(o[r]=a,!0):!1},ownKeys(o){return Object.entries(o).filter(([,r])=>r!=0).map(([r])=>r)}})}var _t={str:0,dex:0,int:0,luk:0,strRate:0,dexRate:0,intRate:0,lukRate:0,maxHp:0,maxMp:0,maxHpRate:0,maxMpRate:0,attackPower:0,magicPower:0,attackPowerRate:0,magicPowerRate:0,armor:0,armorRate:0,speed:0,jump:0,bossDamage:0,ignoreMonsterArmor:0,allStat:0,damage:0,reqLevelDecrease:0,criticalRate:0,criticalDamage:0,cooltimeReduce:0,strLv:0,dexLv:0,intLv:0,lukLv:0};var me=25,Lt=15,Se=15,he=150;function A(t){return(t.data.maxStar??0)>0}function _(t,o=!1){if(!A(t))return!1;if(t.attributes.superior)return t.star<Math.min(Se,t.maxStar);if(!o&&t.star>=t.maxStar)return!1;let r=t.starScroll?Lt:me;return t.star<r}function W(t,o=!1){if(!_(t,o))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.star=t.star+1,t.attributes.superior?xe(t):u(t.type)||t.type===134?be(t):Oe(t)}function R(t,o=!1){return!A(t)||t.attributes.superior||t.req.level>he||!o&&t.star>=t.maxStar?!1:t.star<Lt}function V(t,o=!1,r=!1){if(!R(t,r))throw TypeError("\uB180\uB77C\uC6B4 \uC7A5\uBE44 \uAC15\uD654 \uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starScroll=!0,t.data.star=t.star+1;let a=b(ve,t),n=b(Ce,t),l=u(t.type)||t.type===134;for(let i of $)Rt(t,i)>0&&(s(t)[i]+=a,o&&x(t.type)&&(s(t)[i]+=t.star>5?2:1));for(let i of Gt){let f=Rt(t,i);f>0&&(l&&(s(t)[i]+=Math.floor(f/50)+1),s(t)[i]+=n,o&&(l||t.type===109)&&(s(t)[i]+=1))}o&&h(t.type)&&(s(t).maxHp+=50);let c=Rt(t,"armor");c>0&&(s(t).armor+=Math.floor(c/20)+1)}function N(t){return!!A(t)}function nt(t){if(!N(t))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starforceOption={},t.data.star=void 0,t.data.starScroll=void 0}function xe(t){let o=b(Pe,t),r=b(ke,t);for(let n of $)t.baseOption[n]>0&&(s(t)[n]+=o);for(let n of Gt)t.baseOption[n]>0&&(s(t)[n]+=r);let a=at(t,"armor");s(t).armor+=Math.floor(a/20)+1}function be(t){let o=b(jt,t),r=b(Ae,t),a=Mt(t);for(let c of $)(a.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(s(t)[c]+=o);let n=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)s(t).attackPower+=r,n&&(s(t).magicPower+=r);else{let c=at(t,"attackPower");if(s(t).attackPower+=Math.floor(c/50)+1,n){let i=at(t,"magicPower");s(t).magicPower+=Math.floor(i/50)+1}}let l=Bt[t.star];s(t).maxHp+=l,s(t).maxMp+=l}function Oe(t){let o=b(jt,t),r=b(ge,t),a=Mt(t);for(let n of $)(a.has(n)||t.star>15&&(t.baseOption[n]>0||t.upgradeOption[n]>0))&&(s(t)[n]+=o);if(s(t).attackPower+=r,s(t).magicPower+=r,t.type===108){let n=_e[t.star];t.req.beginner()?(s(t).attackPower+=n,s(t).magicPower+=n):t.req.magician()?s(t).magicPower+=n:s(t).attackPower+=n}if(t.type!==167){let n=at(t,"armor");s(t).armor+=Math.floor(n/20)+1}if(we.includes(t.type)){let n=Bt[t.star];s(t).maxHp+=n}if(t.type===107){let n=Re[t.star];s(t).speed+=n,s(t).jump+=n}}function Mt(t){if(t.req.beginner())return new Set($);let o=[];return t.req.warrior()&&o.push("str","dex"),t.req.magician()&&o.push("int","luk"),t.req.bowman()&&o.push("dex","str"),t.req.thief()&&o.push("luk","dex"),t.req.pirate()&&o.push("str","dex"),new Set(o)}function b(t,o){let r=o.req.level;for(let a=t.length-1;a>=0;a--){let n=t[a];if(r>=n[0])return n[o.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function s(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),d(t.data.starforceOption)}function at(t,o){return t.baseOption[o]+t.upgradeOption[o]+t.starforceOption[o]}function Rt(t,o){return t.baseOption[o]+t.addOption[o]+t.upgradeOption[o]+t.starforceOption[o]}var $=["str","dex","int","luk"],Gt=["attackPower","magicPower"],we=[100,104,105,106,110,111,112,113,115,109],jt=[[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]],ge=[[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]],Ae=[[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]],ke=[[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]],Pe=[[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]],_e=[-1,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],Bt=[-1,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],Re=[-1,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],ve=[[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]],Ce=[[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]];var v=class{data;constructor(o){this.data=o}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(o){this.data.trade=o}get onlyEquip(){return this.data.onlyEquip??!1}get share(){return this.data.share??0}get blockGoldenHammer(){return this.data.blockGoldenHammer??!1}get superior(){return this.data.superior??!1}get cannotUpgrade(){return this.data.cannotUpgrade??!1}get canAddOption(){return this.data.canAddOption??0}get canPotential(){return this.data.canPotential??0}get canAdditionalPotential(){return this.data.canAdditionalPotential??0}get specialGrade(){return this.data.specialGrade??!1}get reqLevelIncrease(){return this.data.reqLevelIncrease??0}get cuttable(){return this.data.cuttable??0}get cuttableCount(){return this.data.cuttableCount}set cuttableCount(o){this.data.cuttableCount=o}get accountShareTag(){return this.data.accountShareTag??!1}get lucky(){return this.data.lucky??!1}get incline(){return{charisma:0,insight:0,will:0,craft:0,sense:0,charm:0,...this.data.incline}}set incline(o){this.data.incline=o}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(o){(o===void 0||0<=o&&o<=100)&&(this.data.growthExp=o)}get growthLevel(){return this.data.growthLevel}set growthLevel(o){this.data.growthLevel=o}get dateExpire(){return this.data.dateExpire}set dateExpire(o){(o===void 0||!Number.isNaN(Date.parse(o)))&&(this.data.dateExpire=o)}};var C=class{data;constructor(o){this.data=o}get level(){return this.data.level??0}get str(){return this.data.str??0}get dex(){return this.data.dex??0}get int(){return this.data.int??0}get luk(){return this.data.luk??0}get job(){return this.data.job??0}get class(){return this.data.class??0}beginner(){return this.job===0}warrior(){return this.job===0||(this.job&1)!=0}magician(){return this.job===0||(this.job&2)!=0}bowman(){return this.job===0||(this.job&4)!=0}thief(){return this.job===0||(this.job&8)!=0}pirate(){return this.job===0||(this.job&16)!=0}};function F(t){return u(t.type)&&t.req.level>=30}function J(t){return F(t)&&!t.soulEnchanted}function lt(t){if(!J(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0\uC740 \uC911\uBCF5\uD574\uC11C \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");t.data.soulSlot={}}function K(t){return t.soulEnchanted}function it(t,o){if(!K(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uC18C\uC6B8\uC744 \uC7A5\uCC29\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.soul=o,Wt(t)}function X(t){return t.soulEnchanted}function ct(t,o){if(!X(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uB9CC \uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC744 \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");if(o<0||o>1e3)throw TypeError("\uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC740 0 \uC774\uC0C1 1000 \uC774\uD558\uC758 \uAC12\uC73C\uB85C\uB9CC \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.charge=o,Wt(t)}function st(t){t.data.soulSlot=void 0}function Wt(t){let o;if(t.soulCharge===0)o={};else{let r=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",a=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?o={[r]:10+a*(t.soul.chargeFactor??1)}:o={[r]:5+a}}t.data.soulSlot.chargeOption=o}var pt=class{data;constructor(o){this.data=o}get meta(){return this.data.meta}get name(){return this.data.name}get icon(){return this.data.icon??""}get desc(){return this.data.desc}get shapeName(){return this.data.shapeName}get shapeIcon(){return this.data.shapeIcon||this.icon}get type(){return this.data.type}get req(){return new C(this.data.req??{})}get attributes(){return new v(this.data.attributes??{})}get totalOption(){return d(It(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return d(this.data.baseOption??{})}get addOption(){return d(this.data.addOption??{})}get upgradeOption(){return d(this.data.upgradeOption??{})}get starforceOption(){return d(this.data.starforceOption??{})}get scrollUpgradeCount(){return this.data.scrollUpgradeCount??0}get scrollResilienceCount(){return this.data.scrollResilienceCount??0}get scrollUpgradeableCount(){return this.data.scrollUpgradeableCount??0}get goldenHammer(){return this.data.goldenHammer??0}get scrollTotalUpgradeableCount(){return this.scrollUpgradeCount+this.scrollUpgradeableCount+this.scrollResilienceCount-this.goldenHammer}get star(){return this.data.star??0}get maxStar(){let o=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(15,o):o)}get starScroll(){return this.data.starScroll??!1}get soulEnchanted(){return this.data.soulSlot!==void 0}get soul(){if(this.data.soulSlot?.soul)return{...this.data.soulSlot.soul,option:d(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return d(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(o){this.data.potentialGrade=o}get potentials(){return this.data.potentials??[]}set potentials(o){this.data.potentials=o}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(o){this.data.additionalPotentialGrade=o}get additionalPotentials(){return this.data.additionalPotentials??[]}set additionalPotentials(o){this.data.additionalPotentials=o}get exceptionalOption(){return d(this.data.exceptionalOption??{})}get exceptionalUpgradeCount(){return this.data.exceptionalUpgradeCount??0}get exceptionalUpgradeableCount(){return this.data.exceptionalUpgradeableCount??0}get exceptionalTotalUpgradeableCount(){return this.exceptionalUpgradeCount+this.exceptionalUpgradeableCount}setShape(o,r){this.data.shapeName=o,this.data.shapeIcon=r}resetShape(){this.data.shapeName=void 0,this.data.shapeIcon=void 0}get supportsAddOption(){return Q(this.type)}applyAddOption(o,r){let a=Y(this,o,r);this.data.addOption||(this.data.addOption={}),w(this.data.addOption,a),this.meta.add.push([o,r])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return S(this)}get canApplyGoldenHammer(){return q(this)}applyGoldenHammer(){T(this)}get canApplyFailScroll(){return L(this)}applyScrollFail(){tt(this)}get canApplyResileScroll(){return M(this)}applyScrollResile(){et(this)}get canResetUpgrade(){return G(this)}resetUpgrade(){ot(this)}get canApplyScroll(){return j(this)}applyScroll(o){P(this,o)}applySpellTrace(o,r){rt(this,o,r)}get supportsStarforce(){return A(this)}get canApplyStarforce(){return _(this)}applyStarforce(){W(this)}get canApplyStarforceIgnoringMaxStar(){return _(this,!0)}applyStarforceIgnoringMaxStar(){W(this,!0)}get canApplyStarScroll(){return R(this)}applyStarScroll(o=!1){V(this,o)}get canApplyStarScrollIgnoringMaxStar(){return R(this,!0)}applyStarScrollIgnoringMaxStar(o=!1){V(this,o,!0)}get canResetStarforce(){return N(this)}resetStarforce(){nt(this)}get supportsSoul(){return F(this)}get canApplySoulEnchant(){return J(this)}applySoulEnchant(){lt(this)}get canSetSoul(){return K(this)}setSoul(o){it(this,o)}get canSetSoulCharge(){return X(this)}setSoulCharge(o){ct(this,o)}resetSoulEnchant(){st(this)}get supportsExceptional(){return k(this)}get canApplyExceptional(){return H(this)}applyExceptional(o){Z(this,o)}get canResetExceptional(){return D(this)}resetExceptional(){z(this)}};
|
|
1
|
+
"use strict";var mt=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Jt=Object.prototype.hasOwnProperty;var Xt=(t,o)=>{for(var r in o)mt(t,r,{get:o[r],enumerable:!0})},$t=(t,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Nt(o))!Jt.call(t,n)&&n!==r&&mt(t,n,{get:()=>o[n],enumerable:!(a=Ft(o,n))||a.enumerable});return t};var Kt=t=>$t(mt({},"__esModule",{value:!0}),t);var Ue={};Xt(Ue,{AddOptionCan:()=>ht,AddOptionType:()=>gt,Gear:()=>dt,GearAttribute:()=>C,GearCuttable:()=>xt,GearReq:()=>E,GearShare:()=>St,GearTrade:()=>ft,GearType:()=>O,PotentialCan:()=>bt,PotentialGrade:()=>Y,SpellTraceType:()=>Pt,applyExceptional:()=>y,applyGoldenHammer:()=>tt,applyScroll:()=>_,applySoulEnchant:()=>ct,applySpellTrace:()=>at,canApplyExceptional:()=>H,canApplyScroll:()=>B,canApplySoulEnchant:()=>$,canFailScroll:()=>M,canGoldenHammer:()=>L,canResetExceptional:()=>q,canResetStarforce:()=>N,canResetUpgrade:()=>j,canResileScroll:()=>G,canSetSoul:()=>K,canSetSoulCharge:()=>Q,canStarScroll:()=>v,canStarforce:()=>R,failScroll:()=>et,getAddOption:()=>z,getAddOptionValue:()=>At,getSpellTraceScroll:()=>_t,isAccessory:()=>b,isArmor:()=>h,isDoubleHandWeapon:()=>wt,isDragonGear:()=>It,isLeftWeapon:()=>Ot,isMechanicGear:()=>Ut,isShield:()=>I,isSubWeapon:()=>Et,isWeapon:()=>u,resetExceptional:()=>T,resetSoulEnchant:()=>ut,resetStarforce:()=>lt,resetUpgrade:()=>rt,resileScroll:()=>ot,setSoul:()=>st,setSoulCharge:()=>pt,starScroll:()=>F,starforce:()=>V,supportsAddOption:()=>Z,supportsExceptional:()=>P,supportsSoul:()=>X,supportsStarforce:()=>k,supportsUpgrade:()=>S,toGearOption:()=>d});module.exports=Kt(Ue);var ft=(a=>(a[a.Tradeable=0]="Tradeable",a[a.TradeBlock=1]="TradeBlock",a[a.EquipTradeBlock=2]="EquipTradeBlock",a))(ft||{}),St=(a=>(a[a.None=0]="None",a[a.AccountSharable=1]="AccountSharable",a[a.AccountSharableOnce=2]="AccountSharableOnce",a))(St||{}),ht=(a=>(a[a.None=0]="None",a[a.Can=1]="Can",a[a.Cannot=2]="Cannot",a))(ht||{}),bt=(n=>(n[n.None=0]="None",n[n.Can=1]="Can",n[n.Cannot=2]="Cannot",n[n.Fixed=3]="Fixed",n))(bt||{}),xt=(a=>(a[a.None=0]="None",a[a.Silver=1]="Silver",a[a.Platinum=2]="Platinum",a))(xt||{});var O=(e=>(e[e.cap=100]="cap",e[e.faceAccessory=101]="faceAccessory",e[e.eyeAccessory=102]="eyeAccessory",e[e.earrings=103]="earrings",e[e.coat=104]="coat",e[e.longcoat=105]="longcoat",e[e.pants=106]="pants",e[e.shoes=107]="shoes",e[e.glove=108]="glove",e[e.cape=110]="cape",e[e.ring=111]="ring",e[e.pendant=112]="pendant",e[e.belt=113]="belt",e[e.medal=114]="medal",e[e.shoulder=115]="shoulder",e[e.pocket=116]="pocket",e[e.badge=118]="badge",e[e.android=166]="android",e[e.machineHeart=167]="machineHeart",e[e.shield=109]="shield",e[e.emblem=119]="emblem",e[e.powerSource=119020]="powerSource",e[e.shiningRod=1212]="shiningRod",e[e.tuner=1213]="tuner",e[e.breathShooter=1214]="breathShooter",e[e.soulShooter=122]="soulShooter",e[e.desperado=123]="desperado",e[e.energySword=124]="energySword",e[e.espLimiter=126]="espLimiter",e[e.chain=127]="chain",e[e.magicGauntlet=128]="magicGauntlet",e[e.ritualFan=129]="ritualFan",e[e.ohSword=130]="ohSword",e[e.ohAxe=131]="ohAxe",e[e.ohBlunt=132]="ohBlunt",e[e.dagger=133]="dagger",e[e.katara=134]="katara",e[e.cane=136]="cane",e[e.wand=137]="wand",e[e.staff=138]="staff",e[e.thSword=140]="thSword",e[e.chakram=1404]="chakram",e[e.thAxe=141]="thAxe",e[e.thBlunt=142]="thBlunt",e[e.spear=143]="spear",e[e.polearm=144]="polearm",e[e.bow=145]="bow",e[e.crossbow=146]="crossbow",e[e.claw=147]="claw",e[e.knuckle=148]="knuckle",e[e.gun=149]="gun",e[e.shovel=150]="shovel",e[e.pickaxe=151]="pickaxe",e[e.dualBowguns=152]="dualBowguns",e[e.handCannon=153]="handCannon",e[e.heavySword=156]="heavySword",e[e.longSword=157]="longSword",e[e.gauntletRevolver=158]="gauntletRevolver",e[e.ancientBow=159]="ancientBow",e[e.soulShield=1098]="soulShield",e[e.demonShield=1099]="demonShield",e[e.magicArrow=135200]="magicArrow",e[e.card=135210]="card",e[e.medallion=135220]="medallion",e[e.rosary=135221]="rosary",e[e.ironChain=135222]="ironChain",e[e.magicBook1=135223]="magicBook1",e[e.magicBook2=135224]="magicBook2",e[e.magicBook3=135225]="magicBook3",e[e.arrowFletching=135226]="arrowFletching",e[e.bowThimble=135227]="bowThimble",e[e.daggerScabbard=135228]="daggerScabbard",e[e.charm=135229]="charm",e[e.orb=135240]="orb",e[e.dragonEssence=135250]="dragonEssence",e[e.soulRing=135260]="soulRing",e[e.magnum=135270]="magnum",e[e.wristBand=135290]="wristBand",e[e.farSight=135291]="farSight",e[e.powderKeg=135292]="powderKeg",e[e.mass=135293]="mass",e[e.document=135294]="document",e[e.magicMarble=135295]="magicMarble",e[e.arrowhead=135296]="arrowhead",e[e.jewel=135297]="jewel",e[e.powderKeg2=135298]="powderKeg2",e[e.controller=135300]="controller",e[e.foxMarble=135310]="foxMarble",e[e.chessPiece=135320]="chessPiece",e[e.transmitter=135330]="transmitter",e[e.charge=135340]="charge",e[e.magicWing=135350]="magicWing",e[e.pathOfAbyss=135360]="pathOfAbyss",e[e.relic=135370]="relic",e[e.fanTassel=135380]="fanTassel",e[e.bracelet=135400]="bracelet",e[e.weaponBelt=135401]="weaponBelt",e[e.ornament=135402]="ornament",e[e.hexSeeker=135403]="hexSeeker",e[e.petEquip=180]="petEquip",e[e.machineEngine=161]="machineEngine",e[e.machineArms=162]="machineArms",e[e.machineLegs=163]="machineLegs",e[e.machineBody=164]="machineBody",e[e.machineTransistors=165]="machineTransistors",e[e.dragonMask=194]="dragonMask",e[e.dragonPendant=195]="dragonPendant",e[e.dragonWings=196]="dragonWings",e[e.dragonTail=197]="dragonTail",e))(O||{});var Y=(i=>(i[i.Normal=0]="Normal",i[i.Rare=1]="Rare",i[i.Epic=2]="Epic",i[i.Unique=3]="Unique",i[i.Legendary=4]="Legendary",i))(Y||{});function u(t){return Ot(t)||wt(t)}function Ot(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function wt(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function Et(t){if(I(t))return!0;switch(t){case 134:return!0;default:return Math.floor(t/1e3)===135}}function I(t){switch(t){case 109:case 1099:case 1098:return!0;default:return!1}}function h(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function b(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}function Ut(t){return t>=161&&t<=165}function It(t){return t>=194&&t<=197}var gt=(p=>(p.str="str",p.dex="dex",p.int="int",p.luk="luk",p.str_dex="str&dex",p.str_int="str&int",p.str_luk="str&luk",p.dex_int="dex&int",p.dex_luk="dex&luk",p.int_luk="int&luk",p.maxHp="maxHp",p.maxMp="maxMp",p.attackPower="attackPower",p.magicPower="magicPower",p.armor="armor",p.speed="speed",p.jump="jump",p.bossDamage="bossDamage",p.damage="damage",p.allStat="allStat",p.reqLevelDecrease="reqLevelDecrease",p))(gt||{});function Z(t){return u(t)?!0:h(t)?!I(t):b(t)?![111,115].includes(t):t===116}function z(t,o,r){let a=ne(o),n=At(t,o,r),i=a.map(c=>[c,n]);return Object.fromEntries(i)}function At(t,o,r){let a={type:o,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward,attackPower:t.baseOption.attackPower,magicPower:t.baseOption.magicPower};switch(o){case"str":case"dex":case"int":case"luk":return Dt(r,a);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Qt(r,a);case"armor":return Dt(r,a);case"attackPower":case"magicPower":return Yt(r,a);case"maxHp":case"maxMp":return yt(r,a);case"speed":return Tt(r,a);case"jump":return te(r,a);case"damage":return ee(r,a);case"bossDamage":return oe(r,a);case"allStat":return re(r,a);case"reqLevelDecrease":return ae(r,a)}}function Dt(t,{reqLevel:o}){return o>=250?Math.floor(o/20)*t:(Math.floor(o/20)+1)*t}function Qt(t,{reqLevel:o}){return(Math.floor(o/40)+1)*t}function Yt(t,o){let{reqLevel:r,gearType:a}=o;if(u(a))return Zt(t,o);if(r>=60)return t;throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 60 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")}function Zt(t,o){let{reqLevel:r,type:a,gearType:n,bossReward:i,attackPower:c,magicPower:l}=o,m=i?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];if(n===156||n===157){let f=zt(n,o),U=r>180?6:r>160?5:r>110?4:3;return Math.ceil(f*m[t-1]*U/100)}else{let f=a==="magicPower"&&l>c?l:c;if(i){let U=r>160?6:r>150?5:r>110?4:3;return Math.ceil(f*m[t-1]*U*3/100)}else{let U=r>110?4:3;return Math.ceil(f*m[t-1]*U/100)}}}function zt(t,{attackPower:o}){if(t===156)return o;let a=new Map([[100,102],[103,105],[105,107],[112,114],[117,121],[135,139],[169,173],[203,207],[293,297],[337,342]]).get(o);if(a===void 0)throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC744 \uBD80\uC5EC\uD560 \uC218 \uC5C6\uB294 \uD0DC\uB3C4 \uC7A5\uBE44\uC785\uB2C8\uB2E4. (Please submit issue with the gear info)");return a}function yt(t,{reqLevel:o}){return o<10?3*t:o>=250?700*t:Math.floor(o/10)*30*t}function Tt(t,{gearType:o}){if(u(o))throw TypeError("\uC774\uB3D9\uC18D\uB3C4 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function te(t,{gearType:o}){if(u(o))throw TypeError("\uC810\uD504\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function ee(t,{gearType:o}){if(!u(o))throw TypeError("\uB370\uBBF8\uC9C0(%) \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function oe(t,{reqLevel:o,gearType:r}){if(o<90||!u(r))throw TypeError("\uBCF4\uC2A4 \uACF5\uACA9 \uC2DC \uB370\uBBF8\uC9C0 \uC99D\uAC00(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 90 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return 2*t}function re(t,{reqLevel:o,gearType:r}){if(o<70&&!u(r))throw TypeError("\uC62C\uC2A4\uD0EF(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 70 \uC774\uC0C1 \uB610\uB294 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function ae(t,{reqLevel:o}){if(o<=0)throw TypeError("\uCC29\uC6A9 \uB808\uBCA8 \uAC10\uC18C \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 1 \uC774\uC0C1\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return Math.min(o,5*t)}function ne(t){return t.split("&")}function w(t,...o){let r=t;for(let a of o)for(let[n,i]of Object.entries(a))n in r?r[n]+=i:r[n]=i}function Ht(...t){let o={};return w(o,...t),o}function P(t){return t.exceptionalTotalUpgradeableCount>0}function H(t){return P(t)&&t.exceptionalUpgradeableCount>0}function y(t,o){if(!H(t))throw TypeError("\uC775\uC149\uC154\uB110 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption===void 0&&(t.data.exceptionalOption={}),w(t.data.exceptionalOption,o.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function q(t){return P(t)}function T(t){if(!q(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption={},t.data.exceptionalUpgradeableCount=t.exceptionalTotalUpgradeableCount,t.data.exceptionalUpgradeCount=void 0}function S(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function L(t){return S(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function tt(t){if(!L(t))throw TypeError("\uD669\uAE08 \uB9DD\uCE58\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.goldenHammer=t.goldenHammer+1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function M(t){return S(t)&&t.scrollUpgradeableCount>0}function et(t){if(!M(t))throw TypeError("\uC8FC\uBB38\uC11C \uC2E4\uD328\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollResilienceCount=t.scrollResilienceCount+1}function G(t){return S(t)&&t.scrollResilienceCount>0}function ot(t){if(!G(t))throw TypeError("\uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5 \uD69F\uC218\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollResilienceCount=t.scrollResilienceCount-1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function j(t){return S(t)}function rt(t){if(!j(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function B(t){return S(t)&&t.scrollUpgradeableCount>0}function _(t,o){if(!B(t))throw TypeError("\uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption===void 0&&(t.data.upgradeOption={}),w(t.data.upgradeOption,o.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}var Pt=(c=>(c.str="str",c.dex="dex",c.int="int",c.luk="luk",c.maxHp="maxHp",c.allStat="allStat",c))(Pt||{});function at(t,o,r){let a=_t(t,o,r);_(t,a)}function _t(t,o,r){if(u(t.type)||t.type===134)return ie(t,o,r);if(t.type===108)return le(t,o,r);if(h(t.type)||t.type===115)return ce(t,o,r);if(b(t.type))return se(t,o,r);if(t.type===167)return pe(t,o,r);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function ie(t,o,r){if(o==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=W(t),[n,i]=ue[r][a];o==="maxHp"&&(i*=50);let c=Rt(o),l,m;return i===0?(l=A(r,g(c)),m={[c]:n}):(l=A(r,g(c),g(o)),m={[c]:n,[o]:i}),{name:l,option:m,type:o,rate:r}}function le(t,o,r){let a=W(t),n=me[r][a],i,c;if(n===0)i=A(r,"\uBC29\uC5B4\uB825"),c={armor:3};else{let l=Rt(o);i=A(r,g(l)),c={[l]:n}}return{name:i,option:c,rate:r,type:o}}function ce(t,o,r){let a=W(t),[n,i,c]=de[r][a],l={maxHp:i,armor:c};switch(o){case"str":case"dex":case"int":case"luk":l[o]=n;break;case"maxHp":l.maxHp+=n*50;break;case"allStat":{if(!(r in qt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let f=qt[r][a];l.str=f,l.dex=f,l.int=f,l.luk=f;break}}return t.scrollUpgradeCount===3&&(t.req.beginner()?(l.attackPower=1,l.magicPower=1):t.req.magician()?l.magicPower=1:l.attackPower=1),{name:A(r,g(o)),option:l,type:o,rate:r}}function se(t,o,r){if(!(r in kt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=W(t),n=kt[r][a],i={};switch(o){case"str":case"dex":case"int":case"luk":i[o]=n;break;case"maxHp":i.maxHp=n*50;break;case"allStat":{if(!(r in Lt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let l=Lt[r][a];i.str=l,i.dex=l,i.int=l,i.luk=l;break}}return{name:A(r,g(o)),option:i,type:o,rate:r}}function pe(t,o,r){if(!(r in kt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=W(t),n=fe[r][a],i=Rt(o),c=A(r,g(i)),l={[i]:n};return{name:c,option:l,type:o,rate:r}}function A(t,o,r){return r?`${t.toString()}% ${o}(${r}) \uC8FC\uBB38\uC11C`:`${t.toString()}% ${o} \uC8FC\uBB38\uC11C`}function g(t){switch(t){case"str":return"\uD798";case"dex":return"\uBBFC\uCCA9";case"int":return"\uC9C0\uB825";case"luk":return"\uC6B4";case"maxHp":return"\uCCB4\uB825";case"allStat":return"\uC62C\uC2A4\uD0EF";case"attackPower":return"\uACF5\uACA9\uB825";case"magicPower":return"\uB9C8\uB825"}}function W(t){return t.req.level>110?2:t.req.level>70?1:0}function Rt(t){return t==="int"?"magicPower":"attackPower"}var ue={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]]},de={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]]},qt={30:[1,2,3],15:[2,3,4]},me={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},kt={100:[1,1,2],70:[2,2,3],30:[3,4,5]},Lt={30:[1,2,3]},fe={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var Mt="__GearOption_s87Ns2aQ";function d(t){return Mt in t?t:new Proxy(t,{get(o,r){if(r===Mt)return!0;if(r in vt)return o[r]??vt[r]},set(o,r,a){return r in vt?(o[r]=a,!0):!1},ownKeys(o){return Object.entries(o).filter(([,r])=>r!=0).map(([r])=>r)}})}var vt={str:0,dex:0,int:0,luk:0,strRate:0,dexRate:0,intRate:0,lukRate:0,maxHp:0,maxMp:0,maxHpRate:0,maxMpRate:0,maxDemonForce:0,attackPower:0,magicPower:0,attackPowerRate:0,magicPowerRate:0,armor:0,armorRate:0,speed:0,jump:0,knockback:0,bossDamage:0,normalDamage:0,ignoreMonsterArmor:0,allStat:0,damage:0,reqLevelDecrease:0,criticalRate:0,criticalDamage:0,cooltimeReduce:0,strLv:0,dexLv:0,intLv:0,lukLv:0};var Se=25,it=15,he=15,be=150;function k(t){return(t.data.maxStar??0)>0}function R(t,o=!1){if(!k(t))return!1;if(t.attributes.superior)return t.star<Math.min(he,t.maxStar);if(!o&&t.star>=t.maxStar)return!1;let r=t.starScroll?it:Se;return t.star<r}function V(t,o=!1){if(!R(t,o))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.star=t.star+1,t.attributes.superior?xe(t):u(t.type)||t.type===134?Oe(t):we(t)}function v(t,o=!1){return!k(t)||t.attributes.superior||t.req.level>be||!o&&t.star>=t.maxStar?!1:t.star<it}function F(t,o=!1,r=!1){if(!v(t,r))throw TypeError("\uB180\uB77C\uC6B4 \uC7A5\uBE44 \uAC15\uD654 \uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starScroll=!0,t.data.star=t.star+1;let a=x(Ce,t),n=x(Ee,t),i=u(t.type)||t.type===134;for(let l of J)Ct(t,l)>0&&(s(t)[l]+=a,o&&b(t.type)&&(s(t)[l]+=t.star>5?2:1));for(let l of jt){let m=Ct(t,l);m>0&&(i&&(s(t)[l]+=Math.floor(m/50)+1),s(t)[l]+=n,o&&(i||t.type===109)&&(s(t)[l]+=1))}o&&h(t.type)&&(s(t).maxHp+=50);let c=Ct(t,"armor");c>0&&(s(t).armor+=Math.floor(c/20)+1)}function N(t){return!!k(t)}function lt(t){if(!N(t))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starforceOption={},t.data.star=void 0,t.data.starScroll=void 0}function xe(t){let o=x(_e,t),r=x(Pe,t);for(let n of J)t.baseOption[n]>0&&(s(t)[n]+=o);for(let n of jt)t.baseOption[n]>0&&(s(t)[n]+=r);let a=nt(t,"armor");s(t).armor+=Math.floor(a/20)+1}function Oe(t){let o=x(Bt,t),r=x(ke,t),a=Gt(t);for(let c of J)(a.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(s(t)[c]+=o);let n=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)s(t).attackPower+=r,n&&(s(t).magicPower+=r);else{let c=nt(t,"attackPower");if(s(t).attackPower+=Math.floor(c/50)+1,n){let l=nt(t,"magicPower");s(t).magicPower+=Math.floor(l/50)+1}}let i=Wt[t.star];s(t).maxHp+=i,s(t).maxMp+=i}function we(t){let o=x(Bt,t),r=x(Ae,t),a=Gt(t);for(let n of J)(a.has(n)||t.star>15&&(t.baseOption[n]>0||t.upgradeOption[n]>0))&&(s(t)[n]+=o);if(s(t).attackPower+=r,s(t).magicPower+=r,t.type===108){let n=Re[t.star];t.req.beginner()?(s(t).attackPower+=n,s(t).magicPower+=n):t.req.magician()?s(t).magicPower+=n:s(t).attackPower+=n}if(t.type!==167){let n=nt(t,"armor");s(t).armor+=Math.floor(n/20)+1}if(ge.includes(t.type)){let n=Wt[t.star];s(t).maxHp+=n}if(t.type===107){let n=ve[t.star];s(t).speed+=n,s(t).jump+=n}}function Gt(t){if(t.req.beginner())return new Set(J);let o=[];return t.req.warrior()&&o.push("str","dex"),t.req.magician()&&o.push("int","luk"),t.req.bowman()&&o.push("dex","str"),t.req.thief()&&o.push("luk","dex"),t.req.pirate()&&o.push("str","dex"),new Set(o)}function x(t,o){let r=o.req.level;for(let a=t.length-1;a>=0;a--){let n=t[a];if(r>=n[0])return n[o.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function s(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),d(t.data.starforceOption)}function nt(t,o){return t.baseOption[o]+t.upgradeOption[o]+t.starforceOption[o]}function Ct(t,o){return t.baseOption[o]+t.addOption[o]+t.upgradeOption[o]+t.starforceOption[o]}var J=["str","dex","int","luk"],jt=["attackPower","magicPower"],ge=[100,104,105,106,110,111,112,113,115,109],Bt=[[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]],Ae=[[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]],ke=[[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]],Pe=[[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]],_e=[[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]],Re=[-1,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],Wt=[-1,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],ve=[-1,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],Ce=[[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]],Ee=[[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]];var C=class{data;constructor(o){this.data=o}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(o){this.data.trade=o}get onlyEquip(){return this.data.onlyEquip??!1}get share(){return this.data.share??0}get blockGoldenHammer(){return this.data.blockGoldenHammer??!1}get superior(){return this.data.superior??!1}get attackSpeed(){return this.data.attackSpeed}get cannotUpgrade(){return this.data.cannotUpgrade??!1}get canAddOption(){return this.data.canAddOption??0}get canPotential(){return this.data.canPotential??0}get canAdditionalPotential(){return this.data.canAdditionalPotential??0}get specialGrade(){return this.data.specialGrade??!1}get reqLevelIncrease(){return this.data.reqLevelIncrease??0}get cuttable(){return this.data.cuttable??0}get cuttableCount(){return this.data.cuttableCount}set cuttableCount(o){this.data.cuttableCount=o}get accountShareTag(){return this.data.accountShareTag??!1}get lucky(){return this.data.lucky??!1}get incline(){return{charisma:0,insight:0,will:0,craft:0,sense:0,charm:0,...this.data.incline}}set incline(o){this.data.incline=o}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(o){(o===void 0||0<=o&&o<=100)&&(this.data.growthExp=o)}get growthLevel(){return this.data.growthLevel}set growthLevel(o){this.data.growthLevel=o}get dateExpire(){return this.data.dateExpire}set dateExpire(o){(o===void 0||!Number.isNaN(Date.parse(o)))&&(this.data.dateExpire=o)}};var E=class{data;constructor(o){this.data=o}get level(){return this.data.level??0}get str(){return this.data.str??0}get dex(){return this.data.dex??0}get int(){return this.data.int??0}get luk(){return this.data.luk??0}get job(){return this.data.job??0}get class(){return this.data.class??0}beginner(){return this.job===0}warrior(){return this.job===0||(this.job&1)!=0}magician(){return this.job===0||(this.job&2)!=0}bowman(){return this.job===0||(this.job&4)!=0}thief(){return this.job===0||(this.job&8)!=0}pirate(){return this.job===0||(this.job&16)!=0}};function X(t){return u(t.type)&&t.req.level>=30}function $(t){return X(t)&&!t.soulEnchanted}function ct(t){if(!$(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0\uC740 \uC911\uBCF5\uD574\uC11C \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");t.data.soulSlot={}}function K(t){return t.soulEnchanted}function st(t,o){if(!K(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uC18C\uC6B8\uC744 \uC7A5\uCC29\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.soul=o,Vt(t)}function Q(t){return t.soulEnchanted}function pt(t,o){if(!Q(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uB9CC \uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC744 \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");if(o<0||o>1e3)throw TypeError("\uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC740 0 \uC774\uC0C1 1000 \uC774\uD558\uC758 \uAC12\uC73C\uB85C\uB9CC \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.charge=o,Vt(t)}function ut(t){t.data.soulSlot=void 0}function Vt(t){let o;if(t.soulCharge===0)o={};else{let r=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",a=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?o={[r]:10+a*(t.soul.chargeFactor??1)}:o={[r]:5+a}}t.data.soulSlot.chargeOption=o}var dt=class{data;constructor(o){this.data=o}get meta(){return this.data.meta}get name(){return this.data.name}get icon(){return this.data.icon??""}get desc(){return this.data.desc}get shape(){return this.data.shape}set shape(o){this.data.shape=o}get shapeIcon(){return this.shape?.icon??this.icon}get type(){return this.data.type}get req(){return new E(this.data.req)}get attributes(){return new C(this.data.attributes)}get totalOption(){return d(Ht(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return d(this.data.baseOption??{})}get addOption(){return d(this.data.addOption??{})}get upgradeOption(){return d(this.data.upgradeOption??{})}get starforceOption(){return d(this.data.starforceOption??{})}get scrollUpgradeCount(){return this.data.scrollUpgradeCount??0}get scrollResilienceCount(){return this.data.scrollResilienceCount??0}get scrollUpgradeableCount(){return this.data.scrollUpgradeableCount??0}get goldenHammer(){return this.data.goldenHammer??0}get scrollTotalUpgradeableCount(){return this.scrollUpgradeCount+this.scrollUpgradeableCount+this.scrollResilienceCount-this.goldenHammer}get star(){return this.data.star??0}get maxStar(){let o=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(it,o):o)}get starScroll(){return this.data.starScroll??!1}get soulEnchanted(){return this.data.soulSlot!==void 0}get soul(){if(this.data.soulSlot?.soul)return{...this.data.soulSlot.soul,option:d(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return d(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(o){this.data.potentialGrade=o}get potentials(){return this.data.potentials===void 0&&(this.data.potentials=[]),this.data.potentials}set potentials(o){this.data.potentials=[...o]}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(o){this.data.additionalPotentialGrade=o}get additionalPotentials(){return this.data.additionalPotentials===void 0&&(this.data.additionalPotentials=[]),this.data.additionalPotentials}set additionalPotentials(o){this.data.additionalPotentials=o}get exceptionalOption(){return d(this.data.exceptionalOption??{})}get exceptionalUpgradeCount(){return this.data.exceptionalUpgradeCount??0}get exceptionalUpgradeableCount(){return this.data.exceptionalUpgradeableCount??0}get exceptionalTotalUpgradeableCount(){return this.exceptionalUpgradeCount+this.exceptionalUpgradeableCount}get supportsAddOption(){return Z(this.type)}applyAddOption(o,r){let a=z(this,o,r);this.data.addOption||(this.data.addOption={}),w(this.data.addOption,a),this.meta.add.push([o,r])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return S(this)}get canApplyGoldenHammer(){return L(this)}applyGoldenHammer(){tt(this)}get canApplyFailScroll(){return M(this)}applyScrollFail(){et(this)}get canApplyResileScroll(){return G(this)}applyScrollResile(){ot(this)}get canResetUpgrade(){return j(this)}resetUpgrade(){rt(this)}get canApplyScroll(){return B(this)}applyScroll(o){_(this,o)}applySpellTrace(o,r){at(this,o,r)}get supportsStarforce(){return k(this)}get canApplyStarforce(){return R(this)}applyStarforce(){V(this)}get canApplyStarforceIgnoringMaxStar(){return R(this,!0)}applyStarforceIgnoringMaxStar(){V(this,!0)}get canApplyStarScroll(){return v(this)}applyStarScroll(o=!1){F(this,o)}get canApplyStarScrollIgnoringMaxStar(){return v(this,!0)}applyStarScrollIgnoringMaxStar(o=!1){F(this,o,!0)}get canResetStarforce(){return N(this)}resetStarforce(){lt(this)}get supportsSoul(){return X(this)}get canApplySoulEnchant(){return $(this)}applySoulEnchant(){ct(this)}get canSetSoul(){return K(this)}setSoul(o){st(this,o)}get canSetSoulCharge(){return Q(this)}setSoulCharge(o){pt(this,o)}resetSoulEnchant(){ut(this)}get supportsExceptional(){return P(this)}get canApplyExceptional(){return H(this)}applyExceptional(o){y(this,o)}get canResetExceptional(){return q(this)}resetExceptional(){T(this)}};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type GearAttributeData, GearTrade, GearShare, AddOptionCan, PotentialCan, GearCuttable, type GearIncline, type GearData, type GearMetadata, type GearReqData, type GearBaseOption, type GearAddOption, type GearUpgradeOption, type GearStarforceOption, type GearExceptionalOption, type GearOption, GearType, type PotentialData, type PotentialOption, PotentialGrade, type SoulSlotData, type SoulData, type ReadonlySoulData, type SoulChargeOption, type SoulOption, } from './lib/data';
|
|
1
|
+
export { type GearAttributeData, GearTrade, GearShare, AddOptionCan, PotentialCan, GearCuttable, type GearIncline, type GearData, type GearMetadata, type GearShapeData, type GearReqData, type GearBaseOption, type GearAddOption, type GearUpgradeOption, type GearStarforceOption, type GearExceptionalOption, type GearOption, GearType, type PotentialData, type PotentialOption, PotentialGrade, type SoulSlotData, type SoulData, type ReadonlySoulData, type SoulChargeOption, type SoulOption, } from './lib/data';
|
|
2
2
|
export { AddOptionType, type AddOptionGrade, supportsAddOption, getAddOption, getAddOptionValue, } from './lib/enhance/addOption';
|
|
3
3
|
export { type ExceptionalHammer, supportsExceptional, canApplyExceptional, applyExceptional, canResetExceptional, resetExceptional, } from './lib/enhance/exceptional';
|
|
4
4
|
export { SpellTraceType, type SpellTraceRate, type SpellTrace, applySpellTrace, getSpellTraceScroll, } from './lib/enhance/spellTrace';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var St=(a=>(a[a.Tradeable=0]="Tradeable",a[a.TradeBlock=1]="TradeBlock",a[a.EquipTradeBlock=2]="EquipTradeBlock",a))(St||{}),ht=(a=>(a[a.None=0]="None",a[a.AccountSharable=1]="AccountSharable",a[a.AccountSharableOnce=2]="AccountSharableOnce",a))(ht||{}),xt=(a=>(a[a.None=0]="None",a[a.Can=1]="Can",a[a.Cannot=2]="Cannot",a))(xt||{}),bt=(n=>(n[n.None=0]="None",n[n.Can=1]="Can",n[n.Cannot=2]="Cannot",n[n.Fixed=3]="Fixed",n))(bt||{}),Ot=(a=>(a[a.None=0]="None",a[a.Silver=1]="Silver",a[a.Platinum=2]="Platinum",a))(Ot||{});var g=(e=>(e[e.cap=100]="cap",e[e.faceAccessory=101]="faceAccessory",e[e.eyeAccessory=102]="eyeAccessory",e[e.earrings=103]="earrings",e[e.coat=104]="coat",e[e.longcoat=105]="longcoat",e[e.pants=106]="pants",e[e.shoes=107]="shoes",e[e.glove=108]="glove",e[e.cape=110]="cape",e[e.ring=111]="ring",e[e.pendant=112]="pendant",e[e.belt=113]="belt",e[e.medal=114]="medal",e[e.shoulder=115]="shoulder",e[e.pocket=116]="pocket",e[e.badge=118]="badge",e[e.android=166]="android",e[e.machineHeart=167]="machineHeart",e[e.shield=109]="shield",e[e.emblem=119]="emblem",e[e.powerSource=119020]="powerSource",e[e.shiningRod=1212]="shiningRod",e[e.tuner=1213]="tuner",e[e.breathShooter=1214]="breathShooter",e[e.soulShooter=122]="soulShooter",e[e.desperado=123]="desperado",e[e.energySword=124]="energySword",e[e.espLimiter=126]="espLimiter",e[e.chain=127]="chain",e[e.magicGauntlet=128]="magicGauntlet",e[e.ritualFan=129]="ritualFan",e[e.ohSword=130]="ohSword",e[e.ohAxe=131]="ohAxe",e[e.ohBlunt=132]="ohBlunt",e[e.dagger=133]="dagger",e[e.katara=134]="katara",e[e.cane=136]="cane",e[e.wand=137]="wand",e[e.staff=138]="staff",e[e.thSword=140]="thSword",e[e.chakram=1404]="chakram",e[e.thAxe=141]="thAxe",e[e.thBlunt=142]="thBlunt",e[e.spear=143]="spear",e[e.polearm=144]="polearm",e[e.bow=145]="bow",e[e.crossbow=146]="crossbow",e[e.claw=147]="claw",e[e.knuckle=148]="knuckle",e[e.gun=149]="gun",e[e.shovel=150]="shovel",e[e.pickaxe=151]="pickaxe",e[e.dualBowguns=152]="dualBowguns",e[e.handCannon=153]="handCannon",e[e.heavySword=156]="heavySword",e[e.longSword=157]="longSword",e[e.gauntletRevolver=158]="gauntletRevolver",e[e.ancientBow=159]="ancientBow",e[e.soulShield=1098]="soulShield",e[e.demonShield=1099]="demonShield",e[e.magicArrow=135200]="magicArrow",e[e.card=135210]="card",e[e.medallion=135220]="medallion",e[e.rosary=135221]="rosary",e[e.ironChain=135222]="ironChain",e[e.magicBook1=135223]="magicBook1",e[e.magicBook2=135224]="magicBook2",e[e.magicBook3=135225]="magicBook3",e[e.arrowFletching=135226]="arrowFletching",e[e.bowThimble=135227]="bowThimble",e[e.daggerScabbard=135228]="daggerScabbard",e[e.charm=135229]="charm",e[e.orb=135240]="orb",e[e.dragonEssence=135250]="dragonEssence",e[e.soulRing=135260]="soulRing",e[e.magnum=135270]="magnum",e[e.wristBand=135290]="wristBand",e[e.farSight=135291]="farSight",e[e.powderKeg=135292]="powderKeg",e[e.mass=135293]="mass",e[e.document=135294]="document",e[e.magicMarble=135295]="magicMarble",e[e.arrowhead=135296]="arrowhead",e[e.jewel=135297]="jewel",e[e.powderKeg2=135298]="powderKeg2",e[e.controller=135300]="controller",e[e.foxMarble=135310]="foxMarble",e[e.chessPiece=135320]="chessPiece",e[e.transmitter=135330]="transmitter",e[e.charge=135340]="charge",e[e.magicWing=135350]="magicWing",e[e.pathOfAbyss=135360]="pathOfAbyss",e[e.relic=135370]="relic",e[e.fanTassel=135380]="fanTassel",e[e.bracelet=135400]="bracelet",e[e.weaponBelt=135401]="weaponBelt",e[e.ornament=135402]="ornament",e[e.hexSeeker=135403]="hexSeeker",e[e.petEquip=180]="petEquip",e[e.machineEngine=161]="machineEngine",e[e.machineArms=162]="machineArms",e[e.machineLegs=163]="machineLegs",e[e.machineBody=164]="machineBody",e[e.machineTransistors=165]="machineTransistors",e[e.dragonMask=194]="dragonMask",e[e.dragonPendant=195]="dragonPendant",e[e.dragonWings=196]="dragonWings",e[e.dragonTail=197]="dragonTail",e))(g||{});var Q=(l=>(l[l.Normal=0]="Normal",l[l.Rare=1]="Rare",l[l.Epic=2]="Epic",l[l.Unique=3]="Unique",l[l.Legendary=4]="Legendary",l))(Q||{});function u(t){return wt(t)||gt(t)}function wt(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function gt(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function Gt(t){if(D(t))return!0;switch(t){case 134:return!0;default:return Math.floor(t/1e3)===135}}function D(t){switch(t){case 109:case 1099:case 1098:return!0;default:return!1}}function x(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function b(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}function jt(t){return t>=161&&t<=165}function Bt(t){return t>=194&&t<=197}var kt=(p=>(p.str="str",p.dex="dex",p.int="int",p.luk="luk",p.str_dex="str&dex",p.str_int="str&int",p.str_luk="str&luk",p.dex_int="dex&int",p.dex_luk="dex&luk",p.int_luk="int&luk",p.maxHp="maxHp",p.maxMp="maxMp",p.attackPower="attackPower",p.magicPower="magicPower",p.armor="armor",p.speed="speed",p.jump="jump",p.bossDamage="bossDamage",p.damage="damage",p.allStat="allStat",p.reqLevelDecrease="reqLevelDecrease",p))(kt||{});function Y(t){return u(t)?!0:x(t)?!D(t):b(t)?![111,115].includes(t):t===116}function Z(t,o,r){let a=Zt(o),n=Pt(t,o,r),l=a.map(c=>[c,n]);return Object.fromEntries(l)}function Pt(t,o,r){let a={type:o,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward??!1,attackPower:t.baseOption.attackPower??0,magicPower:t.baseOption.magicPower??0};switch(o){case"str":case"dex":case"int":case"luk":return At(r,a);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Wt(r,a);case"armor":return At(r,a);case"attackPower":case"magicPower":return Vt(r,a);case"maxHp":case"maxMp":return Ft(r,a);case"speed":return Jt(r,a);case"jump":return Kt(r,a);case"damage":return Xt(r,a);case"bossDamage":return yt(r,a);case"allStat":return Qt(r,a);case"reqLevelDecrease":return Yt(r,a)}}function At(t,{reqLevel:o}){return o>=250?Math.floor(o/20)*t:(Math.floor(o/20)+1)*t}function Wt(t,{reqLevel:o}){return(Math.floor(o/40)+1)*t}function Vt(t,o){let{reqLevel:r,gearType:a}=o;if(u(a))return Nt(t,o);if(r>=60)return t;throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 60 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")}function Nt(t,o){let{reqLevel:r,type:a,gearType:n,bossReward:l,attackPower:c,magicPower:i}=o,f=l?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];if(n===156||n===157){let m=$t(n,o),k=r>180?6:r>160?5:r>110?4:3;return Math.ceil(m*f[t-1]*k/100)}else{let m=a==="magicPower"&&i>c?i:c;if(l){let k=r>160?6:r>150?5:r>110?4:3;return Math.ceil(m*f[t-1]*k*3/100)}else{let k=r>110?4:3;return Math.ceil(m*f[t-1]*k/100)}}}function $t(t,{attackPower:o}){if(t===156)return o;let a=new Map([[100,102],[103,105],[105,107],[112,114],[117,121],[135,139],[169,173],[203,207],[293,297],[337,342]]).get(o);if(a===void 0)throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC744 \uBD80\uC5EC\uD560 \uC218 \uC5C6\uB294 \uD0DC\uB3C4 \uC7A5\uBE44\uC785\uB2C8\uB2E4. (Please submit issue with the gear info)");return a}function Ft(t,{reqLevel:o}){return o<10?3*t:o>=250?700*t:Math.floor(o/10)*30*t}function Jt(t,{gearType:o}){if(u(o))throw TypeError("\uC774\uB3D9\uC18D\uB3C4 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Kt(t,{gearType:o}){if(u(o))throw TypeError("\uC810\uD504\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Xt(t,{gearType:o}){if(!u(o))throw TypeError("\uB370\uBBF8\uC9C0(%) \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function yt(t,{reqLevel:o,gearType:r}){if(o<90||!u(r))throw TypeError("\uBCF4\uC2A4 \uACF5\uACA9 \uC2DC \uB370\uBBF8\uC9C0 \uC99D\uAC00(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 90 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return 2*t}function Qt(t,{reqLevel:o,gearType:r}){if(o<70&&!u(r))throw TypeError("\uC62C\uC2A4\uD0EF(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 70 \uC774\uC0C1 \uB610\uB294 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Yt(t,{reqLevel:o}){if(o<=0)throw TypeError("\uCC29\uC6A9 \uB808\uBCA8 \uAC10\uC18C \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 1 \uC774\uC0C1\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return Math.min(o,5*t)}function Zt(t){return t.split("&")}function O(t,...o){let r=t;for(let a of o)for(let[n,l]of Object.entries(a))n in r?r[n]+=l:r[n]=l}function _t(...t){let o={};return O(o,...t),o}function _(t){return t.exceptionalTotalUpgradeableCount>0}function q(t){return _(t)&&t.exceptionalUpgradeableCount>0}function z(t,o){if(!q(t))throw TypeError("\uC775\uC149\uC154\uB110 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption===void 0&&(t.data.exceptionalOption={}),O(t.data.exceptionalOption,o.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function L(t){return _(t)}function T(t){if(!L(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption={},t.data.exceptionalUpgradeableCount=t.exceptionalTotalUpgradeableCount,t.data.exceptionalUpgradeCount=void 0}function S(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function M(t){return S(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function tt(t){if(!M(t))throw TypeError("\uD669\uAE08 \uB9DD\uCE58\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.goldenHammer=t.goldenHammer+1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function G(t){return S(t)&&t.scrollUpgradeableCount>0}function et(t){if(!G(t))throw TypeError("\uC8FC\uBB38\uC11C \uC2E4\uD328\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollResilienceCount=t.scrollResilienceCount+1}function j(t){return S(t)&&t.scrollResilienceCount>0}function ot(t){if(!j(t))throw TypeError("\uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5 \uD69F\uC218\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollResilienceCount=t.scrollResilienceCount-1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function B(t){return S(t)}function rt(t){if(!B(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function W(t){return S(t)&&t.scrollUpgradeableCount>0}function R(t,o){if(!W(t))throw TypeError("\uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption===void 0&&(t.data.upgradeOption={}),O(t.data.upgradeOption,o.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}var Ct=(c=>(c.str="str",c.dex="dex",c.int="int",c.luk="luk",c.maxHp="maxHp",c.allStat="allStat",c))(Ct||{});function nt(t,o,r){let a=Et(t,o,r);R(t,a)}function Et(t,o,r){if(u(t.type)||t.type===134)return zt(t,o,r);if(t.type===108)return Tt(t,o,r);if(x(t.type)||t.type===115)return te(t,o,r);if(b(t.type))return ee(t,o,r);if(t.type===167)return oe(t,o,r);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function zt(t,o,r){if(o==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=v(t),[n,l]=re[r][a];o==="maxHp"&&(l*=50);let c=lt(o),i,f;return l===0?(i=`${r}% ${w(c)} \uC8FC\uBB38\uC11C`,f={[c]:n}):(i=`${r}% ${w(c)}(${w(o)}) \uC8FC\uBB38\uC11C`,f={[c]:n,[o]:l}),{name:i,option:f,type:o,rate:r}}function Tt(t,o,r){let a=v(t),n=ne[r][a],l,c;if(n===0)l=`${r}% \uBC29\uC5B4\uB825 \uC8FC\uBB38\uC11C`,c={armor:3};else{let i=lt(o);l=`${r}% ${w(i)} \uC8FC\uBB38\uC11C`,c={[i]:n}}return{name:l,option:c,rate:r,type:o}}function te(t,o,r){let a=v(t),[n,l,c]=ae[r][a],i={maxHp:l,armor:c};switch(o){case"str":case"dex":case"int":case"luk":i[o]=n;break;case"maxHp":i.maxHp+=n*50;break;case"allStat":if(!(r in Rt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let m=Rt[r][a];i.str=m,i.dex=m,i.int=m,i.luk=m;break}return t.scrollUpgradeCount===3&&(t.req.beginner()?(i.attackPower=1,i.magicPower=1):t.req.magician()?i.magicPower=1:i.attackPower=1),{name:`${r}% ${w(o)} \uC8FC\uBB38\uC11C`,option:i,type:o,rate:r}}function ee(t,o,r){if(!(r in at))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=v(t),n=at[r][a],l={};switch(o){case"str":case"dex":case"int":case"luk":l[o]=n;break;case"maxHp":l.maxHp=n*50;break;case"allStat":if(!(r in vt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let i=vt[r][a];l.str=i,l.dex=i,l.int=i,l.luk=i;break}return{name:`${r}% ${w(o)} \uC8FC\uBB38\uC11C`,option:l,type:o,rate:r}}function oe(t,o,r){if(!(r in at))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=v(t),n=le[r][a],l=lt(o),c=`${r}% ${w(l)} \uC8FC\uBB38\uC11C`,i={[l]:n};return{name:c,option:i,type:o,rate:r}}function w(t){switch(t){case"str":return"\uD798";case"dex":return"\uBBFC\uCCA9";case"int":return"\uC9C0\uB825";case"luk":return"\uC6B4";case"maxHp":return"\uCCB4\uB825";case"allStat":return"\uC62C\uC2A4\uD0EF";case"attackPower":return"\uACF5\uACA9\uB825";case"magicPower":return"\uB9C8\uB825"}}function v(t){return t.req.level>110?2:t.req.level>70?1:0}function lt(t){return t==="int"?"magicPower":"attackPower"}var re={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]]},ae={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]]},Rt={30:[1,2,3],15:[2,3,4]},ne={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},at={100:[1,1,2],70:[2,2,3],30:[3,4,5]},vt={30:[1,2,3]},le={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var Ut="__GearOption_s87Ns2aQ";function d(t){return t[Ut]?t:new Proxy(t,{get(o,r){if(r===Ut)return!0;if(r in it)return o[r]??it[r]},set(o,r,a){return r in it?(o[r]=a,!0):!1},ownKeys(o){return Object.entries(o).filter(([,r])=>r!=0).map(([r])=>r)}})}var it={str:0,dex:0,int:0,luk:0,strRate:0,dexRate:0,intRate:0,lukRate:0,maxHp:0,maxMp:0,maxHpRate:0,maxMpRate:0,attackPower:0,magicPower:0,attackPowerRate:0,magicPowerRate:0,armor:0,armorRate:0,speed:0,jump:0,bossDamage:0,ignoreMonsterArmor:0,allStat:0,damage:0,reqLevelDecrease:0,criticalRate:0,criticalDamage:0,cooltimeReduce:0,strLv:0,dexLv:0,intLv:0,lukLv:0};var ie=25,It=15,ce=15,se=150;function A(t){return(t.data.maxStar??0)>0}function C(t,o=!1){if(!A(t))return!1;if(t.attributes.superior)return t.star<Math.min(ce,t.maxStar);if(!o&&t.star>=t.maxStar)return!1;let r=t.starScroll?It:ie;return t.star<r}function N(t,o=!1){if(!C(t,o))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.star=t.star+1,t.attributes.superior?pe(t):u(t.type)||t.type===134?ue(t):de(t)}function E(t,o=!1){return!A(t)||t.attributes.superior||t.req.level>se||!o&&t.star>=t.maxStar?!1:t.star<It}function $(t,o=!1,r=!1){if(!E(t,r))throw TypeError("\uB180\uB77C\uC6B4 \uC7A5\uBE44 \uAC15\uD654 \uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starScroll=!0,t.data.star=t.star+1;let a=h(we,t),n=h(ge,t),l=u(t.type)||t.type===134;for(let i of U)ct(t,i)>0&&(s(t)[i]+=a,o&&b(t.type)&&(s(t)[i]+=t.star>5?2:1));for(let i of Dt){let f=ct(t,i);f>0&&(l&&(s(t)[i]+=Math.floor(f/50)+1),s(t)[i]+=n,o&&(l||t.type===109)&&(s(t)[i]+=1))}o&&x(t.type)&&(s(t).maxHp+=50);let c=ct(t,"armor");c>0&&(s(t).armor+=Math.floor(c/20)+1)}function F(t){return!!A(t)}function st(t){if(!F(t))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starforceOption={},t.data.star=void 0,t.data.starScroll=void 0}function pe(t){let o=h(xe,t),r=h(he,t);for(let n of U)t.baseOption[n]>0&&(s(t)[n]+=o);for(let n of Dt)t.baseOption[n]>0&&(s(t)[n]+=r);let a=V(t,"armor");s(t).armor+=Math.floor(a/20)+1}function ue(t){let o=h(qt,t),r=h(Se,t),a=Ht(t);for(let c of U)(a.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(s(t)[c]+=o);let n=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)s(t).attackPower+=r,n&&(s(t).magicPower+=r);else{let c=V(t,"attackPower");if(s(t).attackPower+=Math.floor(c/50)+1,n){let i=V(t,"magicPower");s(t).magicPower+=Math.floor(i/50)+1}}let l=Lt[t.star];s(t).maxHp+=l,s(t).maxMp+=l}function de(t){let o=h(qt,t),r=h(me,t),a=Ht(t);for(let n of U)(a.has(n)||t.star>15&&(t.baseOption[n]>0||t.upgradeOption[n]>0))&&(s(t)[n]+=o);if(s(t).attackPower+=r,s(t).magicPower+=r,t.type===108){let n=be[t.star];t.req.beginner()?(s(t).attackPower+=n,s(t).magicPower+=n):t.req.magician()?s(t).magicPower+=n:s(t).attackPower+=n}if(t.type!==167){let n=V(t,"armor");s(t).armor+=Math.floor(n/20)+1}if(fe.includes(t.type)){let n=Lt[t.star];s(t).maxHp+=n}if(t.type===107){let n=Oe[t.star];s(t).speed+=n,s(t).jump+=n}}function Ht(t){if(t.req.beginner())return new Set(U);let o=[];return t.req.warrior()&&o.push("str","dex"),t.req.magician()&&o.push("int","luk"),t.req.bowman()&&o.push("dex","str"),t.req.thief()&&o.push("luk","dex"),t.req.pirate()&&o.push("str","dex"),new Set(o)}function h(t,o){let r=o.req.level;for(let a=t.length-1;a>=0;a--){let n=t[a];if(r>=n[0])return n[o.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function s(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),d(t.data.starforceOption)}function V(t,o){return t.baseOption[o]+t.upgradeOption[o]+t.starforceOption[o]}function ct(t,o){return t.baseOption[o]+t.addOption[o]+t.upgradeOption[o]+t.starforceOption[o]}var U=["str","dex","int","luk"],Dt=["attackPower","magicPower"],fe=[100,104,105,106,110,111,112,113,115,109],qt=[[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]],me=[[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]],Se=[[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]],he=[[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]],xe=[[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]],be=[-1,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],Lt=[-1,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],Oe=[-1,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],we=[[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]],ge=[[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]];var I=class{data;constructor(o){this.data=o}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(o){this.data.trade=o}get onlyEquip(){return this.data.onlyEquip??!1}get share(){return this.data.share??0}get blockGoldenHammer(){return this.data.blockGoldenHammer??!1}get superior(){return this.data.superior??!1}get cannotUpgrade(){return this.data.cannotUpgrade??!1}get canAddOption(){return this.data.canAddOption??0}get canPotential(){return this.data.canPotential??0}get canAdditionalPotential(){return this.data.canAdditionalPotential??0}get specialGrade(){return this.data.specialGrade??!1}get reqLevelIncrease(){return this.data.reqLevelIncrease??0}get cuttable(){return this.data.cuttable??0}get cuttableCount(){return this.data.cuttableCount}set cuttableCount(o){this.data.cuttableCount=o}get accountShareTag(){return this.data.accountShareTag??!1}get lucky(){return this.data.lucky??!1}get incline(){return{charisma:0,insight:0,will:0,craft:0,sense:0,charm:0,...this.data.incline}}set incline(o){this.data.incline=o}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(o){(o===void 0||0<=o&&o<=100)&&(this.data.growthExp=o)}get growthLevel(){return this.data.growthLevel}set growthLevel(o){this.data.growthLevel=o}get dateExpire(){return this.data.dateExpire}set dateExpire(o){(o===void 0||!Number.isNaN(Date.parse(o)))&&(this.data.dateExpire=o)}};var H=class{data;constructor(o){this.data=o}get level(){return this.data.level??0}get str(){return this.data.str??0}get dex(){return this.data.dex??0}get int(){return this.data.int??0}get luk(){return this.data.luk??0}get job(){return this.data.job??0}get class(){return this.data.class??0}beginner(){return this.job===0}warrior(){return this.job===0||(this.job&1)!=0}magician(){return this.job===0||(this.job&2)!=0}bowman(){return this.job===0||(this.job&4)!=0}thief(){return this.job===0||(this.job&8)!=0}pirate(){return this.job===0||(this.job&16)!=0}};function J(t){return u(t.type)&&t.req.level>=30}function K(t){return J(t)&&!t.soulEnchanted}function pt(t){if(!K(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0\uC740 \uC911\uBCF5\uD574\uC11C \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");t.data.soulSlot={}}function X(t){return t.soulEnchanted}function ut(t,o){if(!X(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uC18C\uC6B8\uC744 \uC7A5\uCC29\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.soul=o,Mt(t)}function y(t){return t.soulEnchanted}function dt(t,o){if(!y(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uB9CC \uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC744 \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");if(o<0||o>1e3)throw TypeError("\uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC740 0 \uC774\uC0C1 1000 \uC774\uD558\uC758 \uAC12\uC73C\uB85C\uB9CC \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.charge=o,Mt(t)}function ft(t){t.data.soulSlot=void 0}function Mt(t){let o;if(t.soulCharge===0)o={};else{let r=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",a=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?o={[r]:10+a*(t.soul.chargeFactor??1)}:o={[r]:5+a}}t.data.soulSlot.chargeOption=o}var mt=class{data;constructor(o){this.data=o}get meta(){return this.data.meta}get name(){return this.data.name}get icon(){return this.data.icon??""}get desc(){return this.data.desc}get shapeName(){return this.data.shapeName}get shapeIcon(){return this.data.shapeIcon||this.icon}get type(){return this.data.type}get req(){return new H(this.data.req??{})}get attributes(){return new I(this.data.attributes??{})}get totalOption(){return d(_t(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return d(this.data.baseOption??{})}get addOption(){return d(this.data.addOption??{})}get upgradeOption(){return d(this.data.upgradeOption??{})}get starforceOption(){return d(this.data.starforceOption??{})}get scrollUpgradeCount(){return this.data.scrollUpgradeCount??0}get scrollResilienceCount(){return this.data.scrollResilienceCount??0}get scrollUpgradeableCount(){return this.data.scrollUpgradeableCount??0}get goldenHammer(){return this.data.goldenHammer??0}get scrollTotalUpgradeableCount(){return this.scrollUpgradeCount+this.scrollUpgradeableCount+this.scrollResilienceCount-this.goldenHammer}get star(){return this.data.star??0}get maxStar(){let o=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(15,o):o)}get starScroll(){return this.data.starScroll??!1}get soulEnchanted(){return this.data.soulSlot!==void 0}get soul(){if(this.data.soulSlot?.soul)return{...this.data.soulSlot.soul,option:d(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return d(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(o){this.data.potentialGrade=o}get potentials(){return this.data.potentials??[]}set potentials(o){this.data.potentials=o}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(o){this.data.additionalPotentialGrade=o}get additionalPotentials(){return this.data.additionalPotentials??[]}set additionalPotentials(o){this.data.additionalPotentials=o}get exceptionalOption(){return d(this.data.exceptionalOption??{})}get exceptionalUpgradeCount(){return this.data.exceptionalUpgradeCount??0}get exceptionalUpgradeableCount(){return this.data.exceptionalUpgradeableCount??0}get exceptionalTotalUpgradeableCount(){return this.exceptionalUpgradeCount+this.exceptionalUpgradeableCount}setShape(o,r){this.data.shapeName=o,this.data.shapeIcon=r}resetShape(){this.data.shapeName=void 0,this.data.shapeIcon=void 0}get supportsAddOption(){return Y(this.type)}applyAddOption(o,r){let a=Z(this,o,r);this.data.addOption||(this.data.addOption={}),O(this.data.addOption,a),this.meta.add.push([o,r])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return S(this)}get canApplyGoldenHammer(){return M(this)}applyGoldenHammer(){tt(this)}get canApplyFailScroll(){return G(this)}applyScrollFail(){et(this)}get canApplyResileScroll(){return j(this)}applyScrollResile(){ot(this)}get canResetUpgrade(){return B(this)}resetUpgrade(){rt(this)}get canApplyScroll(){return W(this)}applyScroll(o){R(this,o)}applySpellTrace(o,r){nt(this,o,r)}get supportsStarforce(){return A(this)}get canApplyStarforce(){return C(this)}applyStarforce(){N(this)}get canApplyStarforceIgnoringMaxStar(){return C(this,!0)}applyStarforceIgnoringMaxStar(){N(this,!0)}get canApplyStarScroll(){return E(this)}applyStarScroll(o=!1){$(this,o)}get canApplyStarScrollIgnoringMaxStar(){return E(this,!0)}applyStarScrollIgnoringMaxStar(o=!1){$(this,o,!0)}get canResetStarforce(){return F(this)}resetStarforce(){st(this)}get supportsSoul(){return J(this)}get canApplySoulEnchant(){return K(this)}applySoulEnchant(){pt(this)}get canSetSoul(){return X(this)}setSoul(o){ut(this,o)}get canSetSoulCharge(){return y(this)}setSoulCharge(o){dt(this,o)}resetSoulEnchant(){ft(this)}get supportsExceptional(){return _(this)}get canApplyExceptional(){return q(this)}applyExceptional(o){z(this,o)}get canResetExceptional(){return L(this)}resetExceptional(){T(this)}};export{xt as AddOptionCan,kt as AddOptionType,mt as Gear,I as GearAttribute,Ot as GearCuttable,H as GearReq,ht as GearShare,St as GearTrade,g as GearType,bt as PotentialCan,Q as PotentialGrade,Ct as SpellTraceType,z as applyExceptional,tt as applyGoldenHammer,R as applyScroll,pt as applySoulEnchant,nt as applySpellTrace,q as canApplyExceptional,W as canApplyScroll,K as canApplySoulEnchant,G as canFailScroll,M as canGoldenHammer,L as canResetExceptional,F as canResetStarforce,B as canResetUpgrade,j as canResileScroll,X as canSetSoul,y as canSetSoulCharge,E as canStarScroll,C as canStarforce,et as failScroll,Z as getAddOption,Pt as getAddOptionValue,Et as getSpellTraceScroll,b as isAccessory,x as isArmor,gt as isDoubleHandWeapon,Bt as isDragonGear,wt as isLeftWeapon,jt as isMechanicGear,D as isShield,Gt as isSubWeapon,u as isWeapon,T as resetExceptional,ft as resetSoulEnchant,st as resetStarforce,rt as resetUpgrade,ot as resileScroll,ut as setSoul,dt as setSoulCharge,$ as starScroll,N as starforce,Y as supportsAddOption,_ as supportsExceptional,J as supportsSoul,A as supportsStarforce,S as supportsUpgrade,d as toGearOption};
|
|
1
|
+
var bt=(a=>(a[a.Tradeable=0]="Tradeable",a[a.TradeBlock=1]="TradeBlock",a[a.EquipTradeBlock=2]="EquipTradeBlock",a))(bt||{}),xt=(a=>(a[a.None=0]="None",a[a.AccountSharable=1]="AccountSharable",a[a.AccountSharableOnce=2]="AccountSharableOnce",a))(xt||{}),Ot=(a=>(a[a.None=0]="None",a[a.Can=1]="Can",a[a.Cannot=2]="Cannot",a))(Ot||{}),wt=(n=>(n[n.None=0]="None",n[n.Can=1]="Can",n[n.Cannot=2]="Cannot",n[n.Fixed=3]="Fixed",n))(wt||{}),gt=(a=>(a[a.None=0]="None",a[a.Silver=1]="Silver",a[a.Platinum=2]="Platinum",a))(gt||{});var A=(e=>(e[e.cap=100]="cap",e[e.faceAccessory=101]="faceAccessory",e[e.eyeAccessory=102]="eyeAccessory",e[e.earrings=103]="earrings",e[e.coat=104]="coat",e[e.longcoat=105]="longcoat",e[e.pants=106]="pants",e[e.shoes=107]="shoes",e[e.glove=108]="glove",e[e.cape=110]="cape",e[e.ring=111]="ring",e[e.pendant=112]="pendant",e[e.belt=113]="belt",e[e.medal=114]="medal",e[e.shoulder=115]="shoulder",e[e.pocket=116]="pocket",e[e.badge=118]="badge",e[e.android=166]="android",e[e.machineHeart=167]="machineHeart",e[e.shield=109]="shield",e[e.emblem=119]="emblem",e[e.powerSource=119020]="powerSource",e[e.shiningRod=1212]="shiningRod",e[e.tuner=1213]="tuner",e[e.breathShooter=1214]="breathShooter",e[e.soulShooter=122]="soulShooter",e[e.desperado=123]="desperado",e[e.energySword=124]="energySword",e[e.espLimiter=126]="espLimiter",e[e.chain=127]="chain",e[e.magicGauntlet=128]="magicGauntlet",e[e.ritualFan=129]="ritualFan",e[e.ohSword=130]="ohSword",e[e.ohAxe=131]="ohAxe",e[e.ohBlunt=132]="ohBlunt",e[e.dagger=133]="dagger",e[e.katara=134]="katara",e[e.cane=136]="cane",e[e.wand=137]="wand",e[e.staff=138]="staff",e[e.thSword=140]="thSword",e[e.chakram=1404]="chakram",e[e.thAxe=141]="thAxe",e[e.thBlunt=142]="thBlunt",e[e.spear=143]="spear",e[e.polearm=144]="polearm",e[e.bow=145]="bow",e[e.crossbow=146]="crossbow",e[e.claw=147]="claw",e[e.knuckle=148]="knuckle",e[e.gun=149]="gun",e[e.shovel=150]="shovel",e[e.pickaxe=151]="pickaxe",e[e.dualBowguns=152]="dualBowguns",e[e.handCannon=153]="handCannon",e[e.heavySword=156]="heavySword",e[e.longSword=157]="longSword",e[e.gauntletRevolver=158]="gauntletRevolver",e[e.ancientBow=159]="ancientBow",e[e.soulShield=1098]="soulShield",e[e.demonShield=1099]="demonShield",e[e.magicArrow=135200]="magicArrow",e[e.card=135210]="card",e[e.medallion=135220]="medallion",e[e.rosary=135221]="rosary",e[e.ironChain=135222]="ironChain",e[e.magicBook1=135223]="magicBook1",e[e.magicBook2=135224]="magicBook2",e[e.magicBook3=135225]="magicBook3",e[e.arrowFletching=135226]="arrowFletching",e[e.bowThimble=135227]="bowThimble",e[e.daggerScabbard=135228]="daggerScabbard",e[e.charm=135229]="charm",e[e.orb=135240]="orb",e[e.dragonEssence=135250]="dragonEssence",e[e.soulRing=135260]="soulRing",e[e.magnum=135270]="magnum",e[e.wristBand=135290]="wristBand",e[e.farSight=135291]="farSight",e[e.powderKeg=135292]="powderKeg",e[e.mass=135293]="mass",e[e.document=135294]="document",e[e.magicMarble=135295]="magicMarble",e[e.arrowhead=135296]="arrowhead",e[e.jewel=135297]="jewel",e[e.powderKeg2=135298]="powderKeg2",e[e.controller=135300]="controller",e[e.foxMarble=135310]="foxMarble",e[e.chessPiece=135320]="chessPiece",e[e.transmitter=135330]="transmitter",e[e.charge=135340]="charge",e[e.magicWing=135350]="magicWing",e[e.pathOfAbyss=135360]="pathOfAbyss",e[e.relic=135370]="relic",e[e.fanTassel=135380]="fanTassel",e[e.bracelet=135400]="bracelet",e[e.weaponBelt=135401]="weaponBelt",e[e.ornament=135402]="ornament",e[e.hexSeeker=135403]="hexSeeker",e[e.petEquip=180]="petEquip",e[e.machineEngine=161]="machineEngine",e[e.machineArms=162]="machineArms",e[e.machineLegs=163]="machineLegs",e[e.machineBody=164]="machineBody",e[e.machineTransistors=165]="machineTransistors",e[e.dragonMask=194]="dragonMask",e[e.dragonPendant=195]="dragonPendant",e[e.dragonWings=196]="dragonWings",e[e.dragonTail=197]="dragonTail",e))(A||{});var z=(i=>(i[i.Normal=0]="Normal",i[i.Rare=1]="Rare",i[i.Epic=2]="Epic",i[i.Unique=3]="Unique",i[i.Legendary=4]="Legendary",i))(z||{});function u(t){return At(t)||kt(t)}function At(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function kt(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function jt(t){if(q(t))return!0;switch(t){case 134:return!0;default:return Math.floor(t/1e3)===135}}function q(t){switch(t){case 109:case 1099:case 1098:return!0;default:return!1}}function b(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function x(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}function Bt(t){return t>=161&&t<=165}function Wt(t){return t>=194&&t<=197}var _t=(p=>(p.str="str",p.dex="dex",p.int="int",p.luk="luk",p.str_dex="str&dex",p.str_int="str&int",p.str_luk="str&luk",p.dex_int="dex&int",p.dex_luk="dex&luk",p.int_luk="int&luk",p.maxHp="maxHp",p.maxMp="maxMp",p.attackPower="attackPower",p.magicPower="magicPower",p.armor="armor",p.speed="speed",p.jump="jump",p.bossDamage="bossDamage",p.damage="damage",p.allStat="allStat",p.reqLevelDecrease="reqLevelDecrease",p))(_t||{});function y(t){return u(t)?!0:b(t)?!q(t):x(t)?![111,115].includes(t):t===116}function T(t,o,r){let a=yt(o),n=Rt(t,o,r),i=a.map(c=>[c,n]);return Object.fromEntries(i)}function Rt(t,o,r){let a={type:o,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward,attackPower:t.baseOption.attackPower,magicPower:t.baseOption.magicPower};switch(o){case"str":case"dex":case"int":case"luk":return Pt(r,a);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Vt(r,a);case"armor":return Pt(r,a);case"attackPower":case"magicPower":return Ft(r,a);case"maxHp":case"maxMp":return Xt(r,a);case"speed":return $t(r,a);case"jump":return Kt(r,a);case"damage":return Qt(r,a);case"bossDamage":return Yt(r,a);case"allStat":return Zt(r,a);case"reqLevelDecrease":return zt(r,a)}}function Pt(t,{reqLevel:o}){return o>=250?Math.floor(o/20)*t:(Math.floor(o/20)+1)*t}function Vt(t,{reqLevel:o}){return(Math.floor(o/40)+1)*t}function Ft(t,o){let{reqLevel:r,gearType:a}=o;if(u(a))return Nt(t,o);if(r>=60)return t;throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 60 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")}function Nt(t,o){let{reqLevel:r,type:a,gearType:n,bossReward:i,attackPower:c,magicPower:l}=o,m=i?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];if(n===156||n===157){let f=Jt(n,o),P=r>180?6:r>160?5:r>110?4:3;return Math.ceil(f*m[t-1]*P/100)}else{let f=a==="magicPower"&&l>c?l:c;if(i){let P=r>160?6:r>150?5:r>110?4:3;return Math.ceil(f*m[t-1]*P*3/100)}else{let P=r>110?4:3;return Math.ceil(f*m[t-1]*P/100)}}}function Jt(t,{attackPower:o}){if(t===156)return o;let a=new Map([[100,102],[103,105],[105,107],[112,114],[117,121],[135,139],[169,173],[203,207],[293,297],[337,342]]).get(o);if(a===void 0)throw TypeError("\uACF5\uACA9\uB825/\uB9C8\uB825 \uCD94\uAC00 \uC635\uC158\uC744 \uBD80\uC5EC\uD560 \uC218 \uC5C6\uB294 \uD0DC\uB3C4 \uC7A5\uBE44\uC785\uB2C8\uB2E4. (Please submit issue with the gear info)");return a}function Xt(t,{reqLevel:o}){return o<10?3*t:o>=250?700*t:Math.floor(o/10)*30*t}function $t(t,{gearType:o}){if(u(o))throw TypeError("\uC774\uB3D9\uC18D\uB3C4 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Kt(t,{gearType:o}){if(u(o))throw TypeError("\uC810\uD504\uB825 \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30\uAC00 \uC544\uB2CC \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Qt(t,{gearType:o}){if(!u(o))throw TypeError("\uB370\uBBF8\uC9C0(%) \uCD94\uAC00 \uC635\uC158\uC740 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function Yt(t,{reqLevel:o,gearType:r}){if(o<90||!u(r))throw TypeError("\uBCF4\uC2A4 \uACF5\uACA9 \uC2DC \uB370\uBBF8\uC9C0 \uC99D\uAC00(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 90 \uC774\uC0C1\uC758 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return 2*t}function Zt(t,{reqLevel:o,gearType:r}){if(o<70&&!u(r))throw TypeError("\uC62C\uC2A4\uD0EF(%) \uCD94\uAC00 \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 70 \uC774\uC0C1 \uB610\uB294 \uBB34\uAE30 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return t}function zt(t,{reqLevel:o}){if(o<=0)throw TypeError("\uCC29\uC6A9 \uB808\uBCA8 \uAC10\uC18C \uC635\uC158\uC740 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8 1 \uC774\uC0C1\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uBD80\uC5EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return Math.min(o,5*t)}function yt(t){return t.split("&")}function O(t,...o){let r=t;for(let a of o)for(let[n,i]of Object.entries(a))n in r?r[n]+=i:r[n]=i}function vt(...t){let o={};return O(o,...t),o}function R(t){return t.exceptionalTotalUpgradeableCount>0}function L(t){return R(t)&&t.exceptionalUpgradeableCount>0}function tt(t,o){if(!L(t))throw TypeError("\uC775\uC149\uC154\uB110 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption===void 0&&(t.data.exceptionalOption={}),O(t.data.exceptionalOption,o.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function M(t){return R(t)}function et(t){if(!M(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.exceptionalOption={},t.data.exceptionalUpgradeableCount=t.exceptionalTotalUpgradeableCount,t.data.exceptionalUpgradeCount=void 0}function S(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function G(t){return S(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function ot(t){if(!G(t))throw TypeError("\uD669\uAE08 \uB9DD\uCE58\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.goldenHammer=t.goldenHammer+1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function j(t){return S(t)&&t.scrollUpgradeableCount>0}function rt(t){if(!j(t))throw TypeError("\uC8FC\uBB38\uC11C \uC2E4\uD328\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollResilienceCount=t.scrollResilienceCount+1}function B(t){return S(t)&&t.scrollResilienceCount>0}function at(t){if(!B(t))throw TypeError("\uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5 \uD69F\uC218\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.scrollResilienceCount=t.scrollResilienceCount-1,t.data.scrollUpgradeableCount=t.scrollUpgradeableCount+1}function W(t){return S(t)}function nt(t){if(!W(t))throw TypeError("\uC8FC\uBB38\uC11C \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function V(t){return S(t)&&t.scrollUpgradeableCount>0}function v(t,o){if(!V(t))throw TypeError("\uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.upgradeOption===void 0&&(t.data.upgradeOption={}),O(t.data.upgradeOption,o.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}var Ut=(c=>(c.str="str",c.dex="dex",c.int="int",c.luk="luk",c.maxHp="maxHp",c.allStat="allStat",c))(Ut||{});function lt(t,o,r){let a=It(t,o,r);v(t,a)}function It(t,o,r){if(u(t.type)||t.type===134)return Tt(t,o,r);if(t.type===108)return te(t,o,r);if(b(t.type)||t.type===115)return ee(t,o,r);if(x(t.type))return oe(t,o,r);if(t.type===167)return re(t,o,r);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function Tt(t,o,r){if(o==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=C(t),[n,i]=ae[r][a];o==="maxHp"&&(i*=50);let c=ct(o),l,m;return i===0?(l=g(r,w(c)),m={[c]:n}):(l=g(r,w(c),w(o)),m={[c]:n,[o]:i}),{name:l,option:m,type:o,rate:r}}function te(t,o,r){let a=C(t),n=ie[r][a],i,c;if(n===0)i=g(r,"\uBC29\uC5B4\uB825"),c={armor:3};else{let l=ct(o);i=g(r,w(l)),c={[l]:n}}return{name:i,option:c,rate:r,type:o}}function ee(t,o,r){let a=C(t),[n,i,c]=ne[r][a],l={maxHp:i,armor:c};switch(o){case"str":case"dex":case"int":case"luk":l[o]=n;break;case"maxHp":l.maxHp+=n*50;break;case"allStat":{if(!(r in Ct))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let f=Ct[r][a];l.str=f,l.dex=f,l.int=f,l.luk=f;break}}return t.scrollUpgradeCount===3&&(t.req.beginner()?(l.attackPower=1,l.magicPower=1):t.req.magician()?l.magicPower=1:l.attackPower=1),{name:g(r,w(o)),option:l,type:o,rate:r}}function oe(t,o,r){if(!(r in it))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=C(t),n=it[r][a],i={};switch(o){case"str":case"dex":case"int":case"luk":i[o]=n;break;case"maxHp":i.maxHp=n*50;break;case"allStat":{if(!(r in Et))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let l=Et[r][a];i.str=l,i.dex=l,i.int=l,i.luk=l;break}}return{name:g(r,w(o)),option:i,type:o,rate:r}}function re(t,o,r){if(!(r in it))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=C(t),n=le[r][a],i=ct(o),c=g(r,w(i)),l={[i]:n};return{name:c,option:l,type:o,rate:r}}function g(t,o,r){return r?`${t.toString()}% ${o}(${r}) \uC8FC\uBB38\uC11C`:`${t.toString()}% ${o} \uC8FC\uBB38\uC11C`}function w(t){switch(t){case"str":return"\uD798";case"dex":return"\uBBFC\uCCA9";case"int":return"\uC9C0\uB825";case"luk":return"\uC6B4";case"maxHp":return"\uCCB4\uB825";case"allStat":return"\uC62C\uC2A4\uD0EF";case"attackPower":return"\uACF5\uACA9\uB825";case"magicPower":return"\uB9C8\uB825"}}function C(t){return t.req.level>110?2:t.req.level>70?1:0}function ct(t){return t==="int"?"magicPower":"attackPower"}var ae={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]]},ne={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]]},Ct={30:[1,2,3],15:[2,3,4]},ie={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},it={100:[1,1,2],70:[2,2,3],30:[3,4,5]},Et={30:[1,2,3]},le={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var Dt="__GearOption_s87Ns2aQ";function d(t){return Dt in t?t:new Proxy(t,{get(o,r){if(r===Dt)return!0;if(r in st)return o[r]??st[r]},set(o,r,a){return r in st?(o[r]=a,!0):!1},ownKeys(o){return Object.entries(o).filter(([,r])=>r!=0).map(([r])=>r)}})}var st={str:0,dex:0,int:0,luk:0,strRate:0,dexRate:0,intRate:0,lukRate:0,maxHp:0,maxMp:0,maxHpRate:0,maxMpRate:0,maxDemonForce:0,attackPower:0,magicPower:0,attackPowerRate:0,magicPowerRate:0,armor:0,armorRate:0,speed:0,jump:0,knockback:0,bossDamage:0,normalDamage:0,ignoreMonsterArmor:0,allStat:0,damage:0,reqLevelDecrease:0,criticalRate:0,criticalDamage:0,cooltimeReduce:0,strLv:0,dexLv:0,intLv:0,lukLv:0};var ce=25,N=15,se=15,pe=150;function k(t){return(t.data.maxStar??0)>0}function E(t,o=!1){if(!k(t))return!1;if(t.attributes.superior)return t.star<Math.min(se,t.maxStar);if(!o&&t.star>=t.maxStar)return!1;let r=t.starScroll?N:ce;return t.star<r}function J(t,o=!1){if(!E(t,o))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.star=t.star+1,t.attributes.superior?ue(t):u(t.type)||t.type===134?de(t):me(t)}function U(t,o=!1){return!k(t)||t.attributes.superior||t.req.level>pe||!o&&t.star>=t.maxStar?!1:t.star<N}function X(t,o=!1,r=!1){if(!U(t,r))throw TypeError("\uB180\uB77C\uC6B4 \uC7A5\uBE44 \uAC15\uD654 \uC8FC\uBB38\uC11C\uB97C \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starScroll=!0,t.data.star=t.star+1;let a=h(ge,t),n=h(Ae,t),i=u(t.type)||t.type===134;for(let l of I)pt(t,l)>0&&(s(t)[l]+=a,o&&x(t.type)&&(s(t)[l]+=t.star>5?2:1));for(let l of qt){let m=pt(t,l);m>0&&(i&&(s(t)[l]+=Math.floor(m/50)+1),s(t)[l]+=n,o&&(i||t.type===109)&&(s(t)[l]+=1))}o&&b(t.type)&&(s(t).maxHp+=50);let c=pt(t,"armor");c>0&&(s(t).armor+=Math.floor(c/20)+1)}function $(t){return!!k(t)}function ut(t){if(!$(t))throw TypeError("\uC2A4\uD0C0\uD3EC\uC2A4 \uAC15\uD654\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44\uC785\uB2C8\uB2E4.");t.data.starforceOption={},t.data.star=void 0,t.data.starScroll=void 0}function ue(t){let o=h(xe,t),r=h(be,t);for(let n of I)t.baseOption[n]>0&&(s(t)[n]+=o);for(let n of qt)t.baseOption[n]>0&&(s(t)[n]+=r);let a=F(t,"armor");s(t).armor+=Math.floor(a/20)+1}function de(t){let o=h(Lt,t),r=h(he,t),a=Ht(t);for(let c of I)(a.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(s(t)[c]+=o);let n=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)s(t).attackPower+=r,n&&(s(t).magicPower+=r);else{let c=F(t,"attackPower");if(s(t).attackPower+=Math.floor(c/50)+1,n){let l=F(t,"magicPower");s(t).magicPower+=Math.floor(l/50)+1}}let i=Mt[t.star];s(t).maxHp+=i,s(t).maxMp+=i}function me(t){let o=h(Lt,t),r=h(Se,t),a=Ht(t);for(let n of I)(a.has(n)||t.star>15&&(t.baseOption[n]>0||t.upgradeOption[n]>0))&&(s(t)[n]+=o);if(s(t).attackPower+=r,s(t).magicPower+=r,t.type===108){let n=Oe[t.star];t.req.beginner()?(s(t).attackPower+=n,s(t).magicPower+=n):t.req.magician()?s(t).magicPower+=n:s(t).attackPower+=n}if(t.type!==167){let n=F(t,"armor");s(t).armor+=Math.floor(n/20)+1}if(fe.includes(t.type)){let n=Mt[t.star];s(t).maxHp+=n}if(t.type===107){let n=we[t.star];s(t).speed+=n,s(t).jump+=n}}function Ht(t){if(t.req.beginner())return new Set(I);let o=[];return t.req.warrior()&&o.push("str","dex"),t.req.magician()&&o.push("int","luk"),t.req.bowman()&&o.push("dex","str"),t.req.thief()&&o.push("luk","dex"),t.req.pirate()&&o.push("str","dex"),new Set(o)}function h(t,o){let r=o.req.level;for(let a=t.length-1;a>=0;a--){let n=t[a];if(r>=n[0])return n[o.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function s(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),d(t.data.starforceOption)}function F(t,o){return t.baseOption[o]+t.upgradeOption[o]+t.starforceOption[o]}function pt(t,o){return t.baseOption[o]+t.addOption[o]+t.upgradeOption[o]+t.starforceOption[o]}var I=["str","dex","int","luk"],qt=["attackPower","magicPower"],fe=[100,104,105,106,110,111,112,113,115,109],Lt=[[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]],Se=[[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]],he=[[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]],be=[[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]],xe=[[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]],Oe=[-1,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],Mt=[-1,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],we=[-1,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],ge=[[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]],Ae=[[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]];var D=class{data;constructor(o){this.data=o}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(o){this.data.trade=o}get onlyEquip(){return this.data.onlyEquip??!1}get share(){return this.data.share??0}get blockGoldenHammer(){return this.data.blockGoldenHammer??!1}get superior(){return this.data.superior??!1}get attackSpeed(){return this.data.attackSpeed}get cannotUpgrade(){return this.data.cannotUpgrade??!1}get canAddOption(){return this.data.canAddOption??0}get canPotential(){return this.data.canPotential??0}get canAdditionalPotential(){return this.data.canAdditionalPotential??0}get specialGrade(){return this.data.specialGrade??!1}get reqLevelIncrease(){return this.data.reqLevelIncrease??0}get cuttable(){return this.data.cuttable??0}get cuttableCount(){return this.data.cuttableCount}set cuttableCount(o){this.data.cuttableCount=o}get accountShareTag(){return this.data.accountShareTag??!1}get lucky(){return this.data.lucky??!1}get incline(){return{charisma:0,insight:0,will:0,craft:0,sense:0,charm:0,...this.data.incline}}set incline(o){this.data.incline=o}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(o){(o===void 0||0<=o&&o<=100)&&(this.data.growthExp=o)}get growthLevel(){return this.data.growthLevel}set growthLevel(o){this.data.growthLevel=o}get dateExpire(){return this.data.dateExpire}set dateExpire(o){(o===void 0||!Number.isNaN(Date.parse(o)))&&(this.data.dateExpire=o)}};var H=class{data;constructor(o){this.data=o}get level(){return this.data.level??0}get str(){return this.data.str??0}get dex(){return this.data.dex??0}get int(){return this.data.int??0}get luk(){return this.data.luk??0}get job(){return this.data.job??0}get class(){return this.data.class??0}beginner(){return this.job===0}warrior(){return this.job===0||(this.job&1)!=0}magician(){return this.job===0||(this.job&2)!=0}bowman(){return this.job===0||(this.job&4)!=0}thief(){return this.job===0||(this.job&8)!=0}pirate(){return this.job===0||(this.job&16)!=0}};function K(t){return u(t.type)&&t.req.level>=30}function Q(t){return K(t)&&!t.soulEnchanted}function dt(t){if(!Q(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0\uC740 \uC911\uBCF5\uD574\uC11C \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");t.data.soulSlot={}}function Y(t){return t.soulEnchanted}function mt(t,o){if(!Y(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uC5D0\uB9CC \uC18C\uC6B8\uC744 \uC7A5\uCC29\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.soul=o,Gt(t)}function Z(t){return t.soulEnchanted}function ft(t,o){if(!Z(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0 \uC0C1\uD0DC\uC758 \uC7A5\uBE44\uB9CC \uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC744 \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");if(o<0||o>1e3)throw TypeError("\uC18C\uC6B8 \uCDA9\uC804\uB7C9\uC740 0 \uC774\uC0C1 1000 \uC774\uD558\uC758 \uAC12\uC73C\uB85C\uB9CC \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");t.data.soulSlot.charge=o,Gt(t)}function St(t){t.data.soulSlot=void 0}function Gt(t){let o;if(t.soulCharge===0)o={};else{let r=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",a=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?o={[r]:10+a*(t.soul.chargeFactor??1)}:o={[r]:5+a}}t.data.soulSlot.chargeOption=o}var ht=class{data;constructor(o){this.data=o}get meta(){return this.data.meta}get name(){return this.data.name}get icon(){return this.data.icon??""}get desc(){return this.data.desc}get shape(){return this.data.shape}set shape(o){this.data.shape=o}get shapeIcon(){return this.shape?.icon??this.icon}get type(){return this.data.type}get req(){return new H(this.data.req)}get attributes(){return new D(this.data.attributes)}get totalOption(){return d(vt(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return d(this.data.baseOption??{})}get addOption(){return d(this.data.addOption??{})}get upgradeOption(){return d(this.data.upgradeOption??{})}get starforceOption(){return d(this.data.starforceOption??{})}get scrollUpgradeCount(){return this.data.scrollUpgradeCount??0}get scrollResilienceCount(){return this.data.scrollResilienceCount??0}get scrollUpgradeableCount(){return this.data.scrollUpgradeableCount??0}get goldenHammer(){return this.data.goldenHammer??0}get scrollTotalUpgradeableCount(){return this.scrollUpgradeCount+this.scrollUpgradeableCount+this.scrollResilienceCount-this.goldenHammer}get star(){return this.data.star??0}get maxStar(){let o=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(N,o):o)}get starScroll(){return this.data.starScroll??!1}get soulEnchanted(){return this.data.soulSlot!==void 0}get soul(){if(this.data.soulSlot?.soul)return{...this.data.soulSlot.soul,option:d(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return d(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(o){this.data.potentialGrade=o}get potentials(){return this.data.potentials===void 0&&(this.data.potentials=[]),this.data.potentials}set potentials(o){this.data.potentials=[...o]}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(o){this.data.additionalPotentialGrade=o}get additionalPotentials(){return this.data.additionalPotentials===void 0&&(this.data.additionalPotentials=[]),this.data.additionalPotentials}set additionalPotentials(o){this.data.additionalPotentials=o}get exceptionalOption(){return d(this.data.exceptionalOption??{})}get exceptionalUpgradeCount(){return this.data.exceptionalUpgradeCount??0}get exceptionalUpgradeableCount(){return this.data.exceptionalUpgradeableCount??0}get exceptionalTotalUpgradeableCount(){return this.exceptionalUpgradeCount+this.exceptionalUpgradeableCount}get supportsAddOption(){return y(this.type)}applyAddOption(o,r){let a=T(this,o,r);this.data.addOption||(this.data.addOption={}),O(this.data.addOption,a),this.meta.add.push([o,r])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return S(this)}get canApplyGoldenHammer(){return G(this)}applyGoldenHammer(){ot(this)}get canApplyFailScroll(){return j(this)}applyScrollFail(){rt(this)}get canApplyResileScroll(){return B(this)}applyScrollResile(){at(this)}get canResetUpgrade(){return W(this)}resetUpgrade(){nt(this)}get canApplyScroll(){return V(this)}applyScroll(o){v(this,o)}applySpellTrace(o,r){lt(this,o,r)}get supportsStarforce(){return k(this)}get canApplyStarforce(){return E(this)}applyStarforce(){J(this)}get canApplyStarforceIgnoringMaxStar(){return E(this,!0)}applyStarforceIgnoringMaxStar(){J(this,!0)}get canApplyStarScroll(){return U(this)}applyStarScroll(o=!1){X(this,o)}get canApplyStarScrollIgnoringMaxStar(){return U(this,!0)}applyStarScrollIgnoringMaxStar(o=!1){X(this,o,!0)}get canResetStarforce(){return $(this)}resetStarforce(){ut(this)}get supportsSoul(){return K(this)}get canApplySoulEnchant(){return Q(this)}applySoulEnchant(){dt(this)}get canSetSoul(){return Y(this)}setSoul(o){mt(this,o)}get canSetSoulCharge(){return Z(this)}setSoulCharge(o){ft(this,o)}resetSoulEnchant(){St(this)}get supportsExceptional(){return R(this)}get canApplyExceptional(){return L(this)}applyExceptional(o){tt(this,o)}get canResetExceptional(){return M(this)}resetExceptional(){et(this)}};export{Ot as AddOptionCan,_t as AddOptionType,ht as Gear,D as GearAttribute,gt as GearCuttable,H as GearReq,xt as GearShare,bt as GearTrade,A as GearType,wt as PotentialCan,z as PotentialGrade,Ut as SpellTraceType,tt as applyExceptional,ot as applyGoldenHammer,v as applyScroll,dt as applySoulEnchant,lt as applySpellTrace,L as canApplyExceptional,V as canApplyScroll,Q as canApplySoulEnchant,j as canFailScroll,G as canGoldenHammer,M as canResetExceptional,$ as canResetStarforce,W as canResetUpgrade,B as canResileScroll,Y as canSetSoul,Z as canSetSoulCharge,U as canStarScroll,E as canStarforce,rt as failScroll,T as getAddOption,Rt as getAddOptionValue,It as getSpellTraceScroll,x as isAccessory,b as isArmor,kt as isDoubleHandWeapon,Wt as isDragonGear,At as isLeftWeapon,Bt as isMechanicGear,q as isShield,jt as isSubWeapon,u as isWeapon,et as resetExceptional,St as resetSoulEnchant,ut as resetStarforce,nt as resetUpgrade,at as resileScroll,mt as setSoul,ft as setSoulCharge,X as starScroll,J as starforce,y as supportsAddOption,R as supportsExceptional,K as supportsSoul,k as supportsStarforce,S as supportsUpgrade,d as toGearOption};
|
package/dist/lib/Gear.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { GearAddOption, GearBaseOption, GearData, GearExceptionalOption, GearMetadata, GearStarforceOption, GearType, GearUpgradeOption, PotentialData, PotentialGrade, ReadonlySoulData, SoulChargeOption, SoulData } from './data';
|
|
1
|
+
import { GearAddOption, GearBaseOption, GearData, GearExceptionalOption, GearMetadata, GearShapeData, GearStarforceOption, GearType, GearUpgradeOption, PotentialData, PotentialGrade, ReadonlySoulData, SoulChargeOption, SoulData } from './data';
|
|
2
2
|
import { AddOptionGrade, AddOptionType } from './enhance/addOption';
|
|
3
3
|
import { ExceptionalHammer } from './enhance/exceptional';
|
|
4
4
|
import { SpellTraceRate, SpellTraceType } from './enhance/spellTrace';
|
|
5
5
|
import { Scroll } from './enhance/upgrade';
|
|
6
6
|
import { GearAttribute } from './GearAttribute';
|
|
7
7
|
import { GearReq } from './GearReq';
|
|
8
|
+
type _Gear = GearData;
|
|
8
9
|
/**
|
|
9
10
|
* 장비
|
|
10
11
|
*
|
|
@@ -19,7 +20,7 @@ import { GearReq } from './GearReq';
|
|
|
19
20
|
*
|
|
20
21
|
* 장비 정보의 모든 속성에 대해 읽기 전용 속성을 제공하고, 일부 속성은 장비 객체 자체에 또는 반환 객체의 속성에 쓰기가 가능합니다.
|
|
21
22
|
*/
|
|
22
|
-
export declare class Gear {
|
|
23
|
+
export declare class Gear implements _Gear {
|
|
23
24
|
/** 장비 정보 */
|
|
24
25
|
data: GearData;
|
|
25
26
|
/**
|
|
@@ -46,11 +47,12 @@ export declare class Gear {
|
|
|
46
47
|
/**
|
|
47
48
|
* 장비 외형
|
|
48
49
|
*/
|
|
49
|
-
get
|
|
50
|
+
get shape(): Readonly<GearShapeData> | undefined;
|
|
51
|
+
set shape(shape: GearShapeData | undefined);
|
|
50
52
|
/**
|
|
51
53
|
* 장비 외형 아이콘
|
|
52
54
|
*
|
|
53
|
-
*
|
|
55
|
+
* 장비 외형이 설정되었을 경우 장비 외형 아이콘, 그렇지 않을 경우 장비 아이콘.
|
|
54
56
|
*/
|
|
55
57
|
get shapeIcon(): string;
|
|
56
58
|
/**
|
|
@@ -150,7 +152,7 @@ export declare class Gear {
|
|
|
150
152
|
/**
|
|
151
153
|
* 잠재능력 목록
|
|
152
154
|
*/
|
|
153
|
-
get potentials():
|
|
155
|
+
get potentials(): PotentialData[];
|
|
154
156
|
set potentials(value: PotentialData[]);
|
|
155
157
|
/**
|
|
156
158
|
* 에디셔널 잠재능력 등급
|
|
@@ -160,7 +162,7 @@ export declare class Gear {
|
|
|
160
162
|
/**
|
|
161
163
|
* 에디셔널 잠재능력 목록
|
|
162
164
|
*/
|
|
163
|
-
get additionalPotentials():
|
|
165
|
+
get additionalPotentials(): PotentialData[];
|
|
164
166
|
set additionalPotentials(value: PotentialData[]);
|
|
165
167
|
/**
|
|
166
168
|
* 장비 익셉셔널 옵션
|
|
@@ -178,16 +180,6 @@ export declare class Gear {
|
|
|
178
180
|
* 전체 익셉셔널 강화 가능 횟수
|
|
179
181
|
*/
|
|
180
182
|
get exceptionalTotalUpgradeableCount(): number;
|
|
181
|
-
/**
|
|
182
|
-
* 장비의 외형을 설정합니다.
|
|
183
|
-
* @param name 외형 장비명.
|
|
184
|
-
* @param icon 외형 아이콘.
|
|
185
|
-
*/
|
|
186
|
-
setShape(name: string, icon: string): void;
|
|
187
|
-
/**
|
|
188
|
-
* 장비의 외형을 초기화합니다.
|
|
189
|
-
*/
|
|
190
|
-
resetShape(): void;
|
|
191
183
|
/**
|
|
192
184
|
* 장비가 추가 옵션을 지원하는지 여부
|
|
193
185
|
*
|
|
@@ -405,3 +397,4 @@ export declare class Gear {
|
|
|
405
397
|
*/
|
|
406
398
|
resetExceptional(): void;
|
|
407
399
|
}
|
|
400
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AddOptionCan, GearAttributeData, GearCuttable, GearIncline, GearShare, GearTrade, PotentialCan } from './data';
|
|
2
|
-
|
|
2
|
+
type OptionalProperty = 'attackSpeed' | 'cuttableCount' | 'growthExp' | 'growthLevel' | 'dateExpire';
|
|
3
|
+
type _GearAttribute = Omit<Required<GearAttributeData>, OptionalProperty> & Pick<GearAttributeData, OptionalProperty>;
|
|
4
|
+
export declare class GearAttribute implements _GearAttribute {
|
|
3
5
|
/** 장비 속성 정보 */
|
|
4
6
|
data: GearAttributeData;
|
|
5
7
|
constructor(data: GearAttributeData);
|
|
@@ -16,6 +18,8 @@ export declare class GearAttribute implements GearAttributeData {
|
|
|
16
18
|
get blockGoldenHammer(): boolean;
|
|
17
19
|
/** 슈페리얼 */
|
|
18
20
|
get superior(): boolean;
|
|
21
|
+
/** 공격 속도 */
|
|
22
|
+
get attackSpeed(): number | undefined;
|
|
19
23
|
/** 강화불가 */
|
|
20
24
|
get cannotUpgrade(): boolean;
|
|
21
25
|
/** 추가옵션 설정 가능 여부 */
|
|
@@ -52,3 +56,4 @@ export declare class GearAttribute implements GearAttributeData {
|
|
|
52
56
|
get dateExpire(): string | undefined;
|
|
53
57
|
set dateExpire(value: string | undefined);
|
|
54
58
|
}
|
|
59
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 장비 속성 정보
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export interface GearAttributeData {
|
|
5
5
|
/** 고유 아이템 */
|
|
6
6
|
only?: boolean;
|
|
7
7
|
/** 교환 가능 여부 */
|
|
@@ -14,6 +14,8 @@ export type GearAttributeData = {
|
|
|
14
14
|
blockGoldenHammer?: boolean;
|
|
15
15
|
/** 슈페리얼 */
|
|
16
16
|
superior?: boolean;
|
|
17
|
+
/** 공격 속도 */
|
|
18
|
+
attackSpeed?: number;
|
|
17
19
|
/** 강화불가 */
|
|
18
20
|
cannotUpgrade?: boolean;
|
|
19
21
|
/** 추가 옵션 설정 가능 여부 */
|
|
@@ -44,7 +46,7 @@ export type GearAttributeData = {
|
|
|
44
46
|
growthLevel?: number;
|
|
45
47
|
/** 장비 유효 기간(KST) */
|
|
46
48
|
dateExpire?: string;
|
|
47
|
-
}
|
|
49
|
+
}
|
|
48
50
|
export declare enum GearTrade {
|
|
49
51
|
/** 교환 가능 */
|
|
50
52
|
Tradeable = 0,
|
|
@@ -87,7 +89,7 @@ export declare enum GearCuttable {
|
|
|
87
89
|
/** 플래티넘 카르마의 가위를 사용하면 1회 교환이 가능하게 할 수 있습니다. */
|
|
88
90
|
Platinum = 2
|
|
89
91
|
}
|
|
90
|
-
export
|
|
92
|
+
export interface GearIncline {
|
|
91
93
|
/** 카리스마 */
|
|
92
94
|
charisma: number;
|
|
93
95
|
/** 통찰력 */
|
|
@@ -100,4 +102,4 @@ export type GearIncline = {
|
|
|
100
102
|
sense: number;
|
|
101
103
|
/** 매력 */
|
|
102
104
|
charm: number;
|
|
103
|
-
}
|
|
105
|
+
}
|
|
@@ -8,7 +8,7 @@ import { SoulSlotData } from './SoulSlotData';
|
|
|
8
8
|
/**
|
|
9
9
|
* 장비 정보
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export interface GearData {
|
|
12
12
|
/** 장비 메타데이터 */
|
|
13
13
|
meta: GearMetadata;
|
|
14
14
|
/** 장비명 */
|
|
@@ -18,9 +18,7 @@ export type GearData = {
|
|
|
18
18
|
/** 장비 설명 */
|
|
19
19
|
desc?: string;
|
|
20
20
|
/** 장비 외형 */
|
|
21
|
-
|
|
22
|
-
/** 장비 외형 아이콘 */
|
|
23
|
-
shapeIcon?: string;
|
|
21
|
+
shape?: GearShapeData;
|
|
24
22
|
/** 장비 분류 */
|
|
25
23
|
type: GearType;
|
|
26
24
|
/** 장비 착용 제한 */
|
|
@@ -65,7 +63,7 @@ export type GearData = {
|
|
|
65
63
|
exceptionalUpgradeCount?: number;
|
|
66
64
|
/** 익셉셔널 강화 가능 횟수 */
|
|
67
65
|
exceptionalUpgradeableCount?: number;
|
|
68
|
-
}
|
|
66
|
+
}
|
|
69
67
|
/**
|
|
70
68
|
* 장비 메타데이터
|
|
71
69
|
*
|
|
@@ -73,18 +71,27 @@ export type GearData = {
|
|
|
73
71
|
* 커스텀 속성은 해당 라이브러리가 임의로 변경하지 않습니다.
|
|
74
72
|
* 충돌을 방지하기 위해 커스텀 속성명은 하나의 `_`으로 시작해야 합니다.
|
|
75
73
|
*/
|
|
76
|
-
export
|
|
74
|
+
export interface GearMetadata {
|
|
77
75
|
/** 아이템 ID */
|
|
78
76
|
id: number;
|
|
79
77
|
/** 장비 정보 버전 */
|
|
80
78
|
version: 1;
|
|
81
79
|
/** 추가 옵션 적용 기록 */
|
|
82
80
|
add: [AddOptionType, AddOptionGrade][];
|
|
83
|
-
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 장비 외형 정보
|
|
84
|
+
*/
|
|
85
|
+
export interface GearShapeData {
|
|
86
|
+
/** 장비 외형 이름 */
|
|
87
|
+
name: string;
|
|
88
|
+
/** 장비 외형 아이콘 */
|
|
89
|
+
icon: string;
|
|
90
|
+
}
|
|
84
91
|
/**
|
|
85
92
|
* 장비 착용 제한 정보
|
|
86
93
|
*/
|
|
87
|
-
export
|
|
94
|
+
export interface GearReqData {
|
|
88
95
|
/** 착용 가능 레벨 */
|
|
89
96
|
level?: number;
|
|
90
97
|
/** 착용 가능 STR */
|
|
@@ -99,7 +106,7 @@ export type GearReqData = {
|
|
|
99
106
|
job?: number;
|
|
100
107
|
/** 착용 가능 직업 */
|
|
101
108
|
class?: number;
|
|
102
|
-
}
|
|
109
|
+
}
|
|
103
110
|
/**
|
|
104
111
|
* 장비 기본 옵션
|
|
105
112
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 장비 옵션
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export interface GearOption {
|
|
5
5
|
/** STR */
|
|
6
6
|
str: number;
|
|
7
7
|
/** DEX */
|
|
@@ -26,6 +26,8 @@ export type GearOption = {
|
|
|
26
26
|
maxHpRate: number;
|
|
27
27
|
/** 최대 MP(%) */
|
|
28
28
|
maxMpRate: number;
|
|
29
|
+
/** MaxDF */
|
|
30
|
+
maxDemonForce: number;
|
|
29
31
|
/** 공격력 */
|
|
30
32
|
attackPower: number;
|
|
31
33
|
/** 마력 */
|
|
@@ -42,8 +44,12 @@ export type GearOption = {
|
|
|
42
44
|
speed: number;
|
|
43
45
|
/** 점프력 */
|
|
44
46
|
jump: number;
|
|
47
|
+
/** %의 확률로 넉백 */
|
|
48
|
+
knockback: number;
|
|
45
49
|
/** 보스 공격 시 데미지 증가(%) */
|
|
46
50
|
bossDamage: number;
|
|
51
|
+
/** 일반 몬스터 데미지(%) */
|
|
52
|
+
normalDamage: number;
|
|
47
53
|
/** 몬스터 방어율 무시(%) */
|
|
48
54
|
ignoreMonsterArmor: number;
|
|
49
55
|
/** 올스탯(%) */
|
|
@@ -66,4 +72,4 @@ export type GearOption = {
|
|
|
66
72
|
intLv: number;
|
|
67
73
|
/** 캐릭터 기준 9레벨 당 LUK */
|
|
68
74
|
lukLv: number;
|
|
69
|
-
}
|
|
75
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GearOption } from './GearOption';
|
|
2
|
-
export
|
|
2
|
+
export interface PotentialData {
|
|
3
3
|
/** 장비에 표시되는 이름 */
|
|
4
4
|
title: string;
|
|
5
5
|
/** 잠재능력 옵션 */
|
|
6
6
|
option: Partial<PotentialOption>;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
export type PotentialOption = Pick<GearOption, 'str' | 'dex' | 'int' | 'luk' | 'strRate' | 'dexRate' | 'intRate' | 'lukRate' | 'maxHp' | 'maxMp' | 'maxHpRate' | 'maxMpRate' | 'attackPower' | 'magicPower' | 'attackPowerRate' | 'magicPowerRate' | 'armor' | 'armorRate' | 'speed' | 'jump' | 'bossDamage' | 'ignoreMonsterArmor' | 'damage' | 'criticalRate' | 'criticalDamage' | 'cooltimeReduce' | 'strLv' | 'dexLv' | 'intLv' | 'lukLv'>;
|
|
@@ -2,18 +2,18 @@ import { GearOption } from './GearOption';
|
|
|
2
2
|
/**
|
|
3
3
|
* 소울 웨폰 정보
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export interface SoulSlotData {
|
|
6
6
|
/** 소울 아이템 */
|
|
7
7
|
soul?: SoulData;
|
|
8
8
|
/** 소울 충전량 */
|
|
9
9
|
charge?: number;
|
|
10
10
|
/** 소울 충전 옵션 */
|
|
11
11
|
chargeOption?: Partial<SoulChargeOption>;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
/**
|
|
14
14
|
* 소울 정보
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export interface SoulData {
|
|
17
17
|
/** 소울 명 */
|
|
18
18
|
name: string;
|
|
19
19
|
/** 소울 스킬 명 */
|
|
@@ -22,7 +22,7 @@ export type SoulData = {
|
|
|
22
22
|
option: Partial<SoulOption>;
|
|
23
23
|
/** 소울 충전 옵션 배율 */
|
|
24
24
|
chargeFactor?: 1 | 2;
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
/**
|
|
27
27
|
* 소울 정보 (읽기 전용)
|
|
28
28
|
*/
|
|
@@ -73,14 +73,14 @@ export declare function getAddOption(gear: Gear, type: AddOptionType, grade: Add
|
|
|
73
73
|
* 장비에 부여할 수 없는 추가 옵션을 지정했을 경우.
|
|
74
74
|
*/
|
|
75
75
|
export declare function getAddOptionValue(gear: Gear, type: AddOptionType, grade: AddOptionGrade): number;
|
|
76
|
-
export
|
|
76
|
+
export interface AddOptionContext {
|
|
77
77
|
type: AddOptionType;
|
|
78
78
|
reqLevel: number;
|
|
79
79
|
gearType: GearType;
|
|
80
80
|
bossReward: boolean;
|
|
81
81
|
attackPower: number;
|
|
82
82
|
magicPower: number;
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
84
|
export declare function _getSingleStatValue(grade: AddOptionGrade, { reqLevel }: Pick<AddOptionContext, 'reqLevel'>): number;
|
|
85
85
|
export declare function _getDoubleStatValue(grade: AddOptionGrade, { reqLevel }: Pick<AddOptionContext, 'reqLevel'>): number;
|
|
86
86
|
export declare function _getPowerValue(grade: AddOptionGrade, ctx: AddOptionContext): number;
|
|
@@ -3,14 +3,14 @@ import { Gear } from '../Gear';
|
|
|
3
3
|
/**
|
|
4
4
|
* 익셉셔널 해머
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface ExceptionalHammer {
|
|
7
7
|
/** 익셉셔널 해머 이름 */
|
|
8
8
|
name: string;
|
|
9
9
|
/** 익셉셔널 해머 아이콘 */
|
|
10
10
|
icon?: string;
|
|
11
11
|
/** 익셉셔널 해머 옵션 */
|
|
12
12
|
option: Partial<GearUpgradeOption>;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
/**
|
|
15
15
|
* 장비가 익셉셔널 강화를 지원하는지 여부를 확인합니다.
|
|
16
16
|
* @param gear 확인할 장비.
|
|
@@ -9,14 +9,6 @@ export declare const MAX_REQLEVEL_STARSCROLL = 150;
|
|
|
9
9
|
* @returns 지원할 경우 `true`; 아닐 경우 `false`.
|
|
10
10
|
*/
|
|
11
11
|
export declare function supportsStarforce(gear: Gear): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* 장비에 스타포스 강화를 적용할 수 있는 상태인지 여부를 확인합니다.
|
|
14
|
-
*
|
|
15
|
-
* 업그레이드가 완료되지 않은 장비, 놀라운 장비강화 주문서가 적용된 장비에도 적용할 수 있습니다.
|
|
16
|
-
* @param gear 확인할 장비.
|
|
17
|
-
* @returns 적용할 수 있을 경우 `true`; 아닐 경우 `false`.
|
|
18
|
-
*/
|
|
19
|
-
export declare function canStarforce(gear: Gear): boolean;
|
|
20
12
|
/**
|
|
21
13
|
* 장비에 스타포스 강화를 적용할 수 있는 상태인지 여부를 확인합니다.
|
|
22
14
|
*
|
|
@@ -25,17 +17,7 @@ export declare function canStarforce(gear: Gear): boolean;
|
|
|
25
17
|
* @param exceedMaxStar 장비의 최대 강화 단계를 초과하여 강화할 지 여부.
|
|
26
18
|
* @returns 적용할 수 있을 경우 `true`; 아닐 경우 `false`.
|
|
27
19
|
*/
|
|
28
|
-
export declare function canStarforce(gear: Gear, exceedMaxStar
|
|
29
|
-
/**
|
|
30
|
-
* 장비에 스타포스 강화를 1회 적용합니다.
|
|
31
|
-
*
|
|
32
|
-
* 업그레이드가 완료되지 않은 장비, 놀라운 장비강화 주문서가 적용된 장비에도 적용할 수 있습니다.
|
|
33
|
-
* @param gear 적용할 장비.
|
|
34
|
-
*
|
|
35
|
-
* @throws {@link TypeError}
|
|
36
|
-
* 스타포스 강화를 적용할 수 없는 경우.
|
|
37
|
-
*/
|
|
38
|
-
export declare function starforce(gear: Gear): void;
|
|
20
|
+
export declare function canStarforce(gear: Gear, exceedMaxStar?: boolean): boolean;
|
|
39
21
|
/**
|
|
40
22
|
* 장비에 스타포스 강화를 1회 적용합니다.
|
|
41
23
|
*
|
|
@@ -46,17 +28,7 @@ export declare function starforce(gear: Gear): void;
|
|
|
46
28
|
* @throws {@link TypeError}
|
|
47
29
|
* 스타포스 강화를 적용할 수 없는 경우.
|
|
48
30
|
*/
|
|
49
|
-
export declare function starforce(gear: Gear, exceedMaxStar
|
|
50
|
-
/**
|
|
51
|
-
* 장비에 놀라운 장비 강화 주문서를 적용할 수 있는 상태인지 여부를 확인합니다.
|
|
52
|
-
*
|
|
53
|
-
* 착용 가능 레벨 150 이하의 장비에만 적용할 수 있습니다.
|
|
54
|
-
* 업그레이드가 완료되지 않은 장비, 놀라운 장비강화 주문서가 적용된 장비에도 적용할 수 있습니다.
|
|
55
|
-
* 슈페리얼 장비에는 적용할 수 없습니다.
|
|
56
|
-
* @param gear 확인할 장비.
|
|
57
|
-
* @returns 적용할 수 있을 경우 `true`; 아닐 경우 `false`.
|
|
58
|
-
*/
|
|
59
|
-
export declare function canStarScroll(gear: Gear): boolean;
|
|
31
|
+
export declare function starforce(gear: Gear, exceedMaxStar?: boolean): void;
|
|
60
32
|
/**
|
|
61
33
|
* 장비에 놀라운 장비 강화 주문서를 적용할 수 있는 상태인지 여부를 확인합니다.
|
|
62
34
|
*
|
|
@@ -67,37 +39,7 @@ export declare function canStarScroll(gear: Gear): boolean;
|
|
|
67
39
|
* @param exceedMaxStar 장비의 최대 강화 단계를 초과하여 강화할 지 여부.
|
|
68
40
|
* @returns 적용할 수 있을 경우 `true`; 아닐 경우 `false`.
|
|
69
41
|
*/
|
|
70
|
-
export declare function canStarScroll(gear: Gear, exceedMaxStar
|
|
71
|
-
/**
|
|
72
|
-
* 장비에 놀라운 장비 강화 주문서를 1회 적용합니다.
|
|
73
|
-
*
|
|
74
|
-
* 착용 가능 레벨 150 이하의 장비에만 적용할 수 있습니다.
|
|
75
|
-
* 업그레이드가 완료되지 않은 장비, 스타포스 강화가 적용된 장비에도 적용할 수 있습니다.
|
|
76
|
-
* 슈페리얼 장비에는 적용할 수 없습니다.
|
|
77
|
-
* @param gear 적용할 장비.
|
|
78
|
-
*
|
|
79
|
-
* @throws {@link TypeError}
|
|
80
|
-
* 놀라운 장비 강화 주문서를 적용할 수 없는 경우.
|
|
81
|
-
*/
|
|
82
|
-
export declare function starScroll(gear: Gear): void;
|
|
83
|
-
/**
|
|
84
|
-
* 장비에 놀라운 장비 강화 주문서를 1회 적용합니다.
|
|
85
|
-
*
|
|
86
|
-
* 착용 가능 레벨 150 이하의 장비에만 적용할 수 있습니다.
|
|
87
|
-
* 업그레이드가 완료되지 않은 장비, 스타포스 강화가 적용된 장비에도 적용할 수 있습니다.
|
|
88
|
-
* 슈페리얼 장비에는 적용할 수 없습니다.
|
|
89
|
-
*
|
|
90
|
-
* 보너스 스탯은 장비 분류에 따라 결정됩니다.
|
|
91
|
-
* - 방어구(방패 제외): 최대 HP +50
|
|
92
|
-
* - 장신구: 올스탯 +1 ~ +2
|
|
93
|
-
* - 무기/블레이드/방패: 공격력/마력 +1
|
|
94
|
-
* @param gear 적용할 장비.
|
|
95
|
-
* @param bonus 보너스 스탯 적용 여부.
|
|
96
|
-
*
|
|
97
|
-
* @throws {@link TypeError}
|
|
98
|
-
* 놀라운 장비 강화 주문서를 적용할 수 없는 경우.
|
|
99
|
-
*/
|
|
100
|
-
export declare function starScroll(gear: Gear, bonus: boolean): void;
|
|
42
|
+
export declare function canStarScroll(gear: Gear, exceedMaxStar?: boolean): boolean;
|
|
101
43
|
/**
|
|
102
44
|
* 장비에 놀라운 장비 강화 주문서를 1회 적용합니다.
|
|
103
45
|
*
|
|
@@ -116,7 +58,7 @@ export declare function starScroll(gear: Gear, bonus: boolean): void;
|
|
|
116
58
|
* @throws {@link TypeError}
|
|
117
59
|
* 놀라운 장비 강화 주문서를 적용할 수 없는 경우.
|
|
118
60
|
*/
|
|
119
|
-
export declare function starScroll(gear: Gear, bonus
|
|
61
|
+
export declare function starScroll(gear: Gear, bonus?: boolean, exceedMaxStar?: boolean): void;
|
|
120
62
|
/**
|
|
121
63
|
* 장비의 스타포스 강화를 초기화할 수 있는지 여부를 확인합니다.
|
|
122
64
|
* @param gear 확인할 장비.
|
|
@@ -3,14 +3,14 @@ import { Gear } from '../Gear';
|
|
|
3
3
|
/**
|
|
4
4
|
* 주문서
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface Scroll {
|
|
7
7
|
/** 주문서 이름 */
|
|
8
8
|
name: string;
|
|
9
9
|
/** 주문서 아이콘 */
|
|
10
10
|
icon?: string;
|
|
11
11
|
/** 주문서 옵션 */
|
|
12
12
|
option: Partial<GearUpgradeOption>;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
/**
|
|
15
15
|
* 장비가 주문서 강화를 지원하는지 여부를 확인합니다.
|
|
16
16
|
* @param gear 확인할 장비.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malib/gear",
|
|
3
3
|
"description": "MapleStory gear logic simulator",
|
|
4
|
-
"version": "1.0.0-next.
|
|
4
|
+
"version": "1.0.0-next.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"test:type": "tsc -p tsconfig.lib.json --noEmit && tsc -p tsconfig.test.json --noEmit"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"vitest": "^
|
|
21
|
+
"vitest": "^3.0.7"
|
|
22
22
|
}
|
|
23
23
|
}
|