@malib/gear 1.0.0-next.0 → 1.0.0-next.2

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 CHANGED
@@ -1 +1 @@
1
- "use strict";var it=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Dt=Object.prototype.hasOwnProperty;var qt=(t,e)=>{for(var o in e)it(t,o,{get:e[o],enumerable:!0})},Lt=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ht(e))!Dt.call(t,r)&&r!==o&&it(t,r,{get:()=>e[r],enumerable:!(a=It(e,r))||a.enumerable});return t};var Mt=t=>Lt(it({},"__esModule",{value:!0}),t);var Oe={};qt(Oe,{Gear:()=>lt,GearAttribute:()=>P,GearReq:()=>_,applyExceptional:()=>K,applyGoldenHammer:()=>Q,applyScroll:()=>g,applySoulEnchant:()=>ot,applySpellTrace:()=>T,canApplyExceptional:()=>E,canApplyScroll:()=>L,canApplySoulEnchant:()=>N,canFailScroll:()=>H,canGoldenHammer:()=>I,canResetExceptional:()=>U,canResetStarforce:()=>B,canResetUpgrade:()=>q,canResileScroll:()=>D,canSetSoul:()=>$,canSetSoulCharge:()=>F,canStarScroll:()=>k,canStarforce:()=>A,failScroll:()=>Y,getAddOption:()=>J,getAddOptionValue:()=>ut,getSpellTraceScroll:()=>ft,isAccessory:()=>S,isArmor:()=>m,isDoubleHandWeapon:()=>pt,isDragonGear:()=>Ot,isLeftWeapon:()=>st,isMechanicGear:()=>bt,isShield:()=>R,isSubWeapon:()=>xt,isWeapon:()=>s,resetExceptional:()=>X,resetSoulEnchant:()=>nt,resetStarforce:()=>et,resetUpgrade:()=>z,resileScroll:()=>Z,setSoul:()=>rt,setSoulCharge:()=>at,starScroll:()=>j,starforce:()=>G,supportsAddOption:()=>y,supportsExceptional:()=>w,supportsSoul:()=>V,supportsStarforce:()=>O,supportsUpgrade:()=>f,toGearOption:()=>p});module.exports=Mt(Oe);function s(t){return st(t)||pt(t)}function st(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function pt(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function xt(t){if(R(t))return!0;switch(t){case 134:return!0;default:return Math.floor(t/1e3)===135}}function R(t){switch(t){case 109:case 1099:case 1098:return!0;default:return!1}}function m(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function S(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}function bt(t){return t>=161&&t<=165}function Ot(t){return t>=194&&t<=197}function y(t){return s(t)?!0:m(t)?!R(t):S(t)?![111,115].includes(t):t===116}function J(t,e,o){let a=Xt(e),r=ut(t,e,o),l=a.map(c=>[c,r]);return Object.fromEntries(l)}function ut(t,e,o){let a={type:e,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward??!1,attackPower:t.baseOption.attackPower??0,magicPower:t.baseOption.magicPower??0};switch(e){case"str":case"dex":case"int":case"luk":return wt(o,a);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Gt(o,a);case"armor":return wt(o,a);case"attackPower":case"magicPower":return jt(o,a);case"maxHp":case"maxMp":return Vt(o,a);case"speed":return Nt(o,a);case"jump":return $t(o,a);case"damage":return Ft(o,a);case"bossDamage":return yt(o,a);case"allStat":return Jt(o,a);case"reqLevelDecrease":return Kt(o,a)}}function wt(t,{reqLevel:e}){return e>=250?Math.floor(e/20)*t:(Math.floor(e/20)+1)*t}function Gt(t,{reqLevel:e}){return(Math.floor(e/40)+1)*t}function jt(t,e){let{reqLevel:o,gearType:a}=e;if(s(a))return Bt(t,e);if(o>=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 Bt(t,e){let{reqLevel:o,type:a,gearType:r,bossReward:l,attackPower:c,magicPower:n}=e,u=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(r===156||r===157){let d=Wt(r,e),v=o>180?6:o>160?5:o>110?4:3;return Math.ceil(d*u[t-1]*v/100)}else{let d=a==="magicPower"&&n>c?n:c;if(l){let v=o>160?6:o>150?5:o>110?4:3;return Math.ceil(d*u[t-1]*v*3/100)}else{let v=o>110?4:3;return Math.ceil(d*u[t-1]*v/100)}}}function Wt(t,{attackPower:e}){if(t===156)return e;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(e);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 Vt(t,{reqLevel:e}){return e<10?3*t:e>=250?700*t:Math.floor(e/10)*30*t}function Nt(t,{gearType:e}){if(s(e))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 $t(t,{gearType:e}){if(s(e))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 Ft(t,{gearType:e}){if(!s(e))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:e,gearType:o}){if(e<90||!s(o))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 Jt(t,{reqLevel:e,gearType:o}){if(e<70&&!s(o))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 Kt(t,{reqLevel:e}){if(e<=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(e,5*t)}function Xt(t){return t.split("&")}function x(t,...e){let o=t;for(let a of e)for(let[r,l]of Object.entries(a))r in o?o[r]+=l:o[r]=l}function gt(...t){let e={};return x(e,...t),e}function w(t){return t.exceptionalTotalUpgradeableCount>0}function E(t){return w(t)&&t.exceptionalUpgradeableCount>0}function K(t,e){if(!E(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={}),x(t.data.exceptionalOption,e.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function U(t){return w(t)}function X(t){if(!U(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 f(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function I(t){return f(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function Q(t){if(!I(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 H(t){return f(t)&&t.scrollUpgradeableCount>0}function Y(t){if(!H(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 D(t){return f(t)&&t.scrollResilienceCount>0}function Z(t){if(!D(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 q(t){return f(t)}function z(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.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function L(t){return f(t)&&t.scrollUpgradeableCount>0}function g(t,e){if(!L(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={}),x(t.data.upgradeOption,e.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}function T(t,e,o){let a=ft(t,e,o);g(t,a)}function ft(t,e,o){if(s(t.type)||t.type===134)return Qt(t,e,o);if(t.type===108)return Yt(t,e,o);if(m(t.type)||t.type===115)return Zt(t,e,o);if(S(t.type))return zt(t,e,o);if(t.type===167)return Tt(t,e,o);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function Qt(t,e,o){if(e==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=M(t),[r,l]=te[o][a];e==="maxHp"&&(l*=50);let c=mt(e),n,u;return l===0?(n=`${o}% ${b(c)} \uC8FC\uBB38\uC11C`,u={[c]:r}):(n=`${o}% ${b(c)}(${b(e)}) \uC8FC\uBB38\uC11C`,u={[c]:r,[e]:l}),{name:n,option:u,type:e,rate:o}}function Yt(t,e,o){let a=M(t),r=oe[o][a],l,c;if(r===0)l=`${o}% \uBC29\uC5B4\uB825 \uC8FC\uBB38\uC11C`,c={armor:3};else{let n=mt(e);l=`${o}% ${b(n)} \uC8FC\uBB38\uC11C`,c={[n]:r}}return{name:l,option:c,rate:o,type:e}}function Zt(t,e,o){let a=M(t),[r,l,c]=ee[o][a],n={maxHp:l,armor:c};switch(e){case"str":case"dex":case"int":case"luk":n[e]=r;break;case"maxHp":n.maxHp+=r*50;break;case"allStat":if(!(o in At))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let d=At[o][a];n.str=d,n.dex=d,n.int=d,n.luk=d;break}return t.scrollUpgradeCount===3&&(t.req.beginner()?(n.attackPower=1,n.magicPower=1):t.req.magician()?n.magicPower=1:n.attackPower=1),{name:`${o}% ${b(e)} \uC8FC\uBB38\uC11C`,option:n,type:e,rate:o}}function zt(t,e,o){if(!(o in dt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=M(t),r=dt[o][a],l={};switch(e){case"str":case"dex":case"int":case"luk":l[e]=r;break;case"maxHp":l.maxHp=r*50;break;case"allStat":if(!(o in kt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let n=kt[o][a];l.str=n,l.dex=n,l.int=n,l.luk=n;break}return{name:`${o}% ${b(e)} \uC8FC\uBB38\uC11C`,option:l,type:e,rate:o}}function Tt(t,e,o){if(!(o in dt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let a=M(t),r=re[o][a],l=mt(e),c=`${o}% ${b(l)} \uC8FC\uBB38\uC11C`,n={[l]:r};return{name:c,option:n,type:e,rate:o}}function b(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 M(t){return t.req.level>110?2:t.req.level>70?1:0}function mt(t){return t==="int"?"magicPower":"attackPower"}var te={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]]},ee={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]]},At={30:[1,2,3],15:[2,3,4]},oe={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},dt={100:[1,1,2],70:[2,2,3],30:[3,4,5]},kt={30:[1,2,3]},re={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var Pt="__GearOption_s87Ns2aQ";function p(t){return t[Pt]?t:new Proxy(t,{get(e,o){if(o===Pt)return!0;if(o in St)return e[o]??St[o]},set(e,o,a){return o in St?(e[o]=a,!0):!1},ownKeys(e){return Object.entries(e).filter(([,o])=>o!=0).map(([o])=>o)}})}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,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 ae=25,_t=15,ne=15,le=150;function O(t){return(t.data.maxStar??0)>0}function A(t,e=!1){if(!O(t))return!1;if(t.attributes.superior)return t.star<Math.min(ne,t.maxStar);if(!e&&t.star>=t.maxStar)return!1;let o=t.starScroll?_t:ae;return t.star<o}function G(t,e=!1){if(!A(t,e))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?ie(t):s(t.type)||t.type===134?ce(t):se(t)}function k(t,e=!1){return!O(t)||t.attributes.superior||t.req.level>le||!e&&t.star>=t.maxStar?!1:t.star<_t}function j(t,e=!1,o=!1){if(!k(t,o))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(xe,t),r=h(be,t),l=s(t.type)||t.type===134;for(let n of W)ht(t,n)>0&&(i(t)[n]+=a,e&&S(t.type)&&(i(t)[n]+=t.star>5?2:1));for(let n of Rt){let u=ht(t,n);u>0&&(l&&(i(t)[n]+=Math.floor(u/50)+1),i(t)[n]+=r,e&&(l||t.type===109)&&(i(t)[n]+=1))}e&&m(t.type)&&(i(t).maxHp+=50);let c=ht(t,"armor");c>0&&(i(t).armor+=Math.floor(c/20)+1)}function B(t){return!!O(t)}function et(t){if(!B(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 ie(t){let e=h(me,t),o=h(fe,t);for(let r of W)t.baseOption[r]>0&&(i(t)[r]+=e);for(let r of Rt)t.baseOption[r]>0&&(i(t)[r]+=o);let a=tt(t,"armor");i(t).armor+=Math.floor(a/20)+1}function ce(t){let e=h(Ct,t),o=h(de,t),a=vt(t);for(let c of W)(a.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(i(t)[c]+=e);let r=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)i(t).attackPower+=o,r&&(i(t).magicPower+=o);else{let c=tt(t,"attackPower");if(i(t).attackPower+=Math.floor(c/50)+1,r){let n=tt(t,"magicPower");i(t).magicPower+=Math.floor(n/50)+1}}let l=Et[t.star];i(t).maxHp+=l,i(t).maxMp+=l}function se(t){let e=h(Ct,t),o=h(ue,t),a=vt(t);for(let r of W)(a.has(r)||t.star>15&&(t.baseOption[r]>0||t.upgradeOption[r]>0))&&(i(t)[r]+=e);if(i(t).attackPower+=o,i(t).magicPower+=o,t.type===108){let r=Se[t.star];t.req.beginner()?(i(t).attackPower+=r,i(t).magicPower+=r):t.req.magician()?i(t).magicPower+=r:i(t).attackPower+=r}if(t.type!==167){let r=tt(t,"armor");i(t).armor+=Math.floor(r/20)+1}if(pe.includes(t.type)){let r=Et[t.star];i(t).maxHp+=r}if(t.type===107){let r=he[t.star];i(t).speed+=r,i(t).jump+=r}}function vt(t){if(t.req.beginner())return new Set(W);let e=[];return t.req.warrior()&&e.push("str","dex"),t.req.magician()&&e.push("int","luk"),t.req.bowman()&&e.push("dex","str"),t.req.thief()&&e.push("luk","dex"),t.req.pirate()&&e.push("str","dex"),new Set(e)}function h(t,e){let o=e.req.level;for(let a=t.length-1;a>=0;a--){let r=t[a];if(o>=r[0])return r[e.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function i(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),p(t.data.starforceOption)}function tt(t,e){return t.baseOption[e]+t.upgradeOption[e]+t.starforceOption[e]}function ht(t,e){return t.baseOption[e]+t.addOption[e]+t.upgradeOption[e]+t.starforceOption[e]}var W=["str","dex","int","luk"],Rt=["attackPower","magicPower"],pe=[100,104,105,106,110,111,112,113,115,109],Ct=[[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]],ue=[[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]],de=[[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]],fe=[[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]],me=[[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]],Se=[-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],Et=[-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],he=[-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],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],[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]],be=[[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 P=class{data;constructor(e){this.data=e}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(e){this.data.trade=e}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(e){this.data.cuttableCount=e}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(e){this.data.incline=e}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(e){(e===void 0||0<=e&&e<=100)&&(this.data.growthExp=e)}get growthLevel(){return this.data.growthLevel}set growthLevel(e){this.data.growthLevel=e}get dateExpire(){return this.data.dateExpire}set dateExpire(e){(e===void 0||!Number.isNaN(Date.parse(e)))&&(this.data.dateExpire=e)}};var _=class{data;constructor(e){this.data=e}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 V(t){return s(t.type)&&t.req.level>=30}function N(t){return V(t)&&!t.soulEnchanted}function ot(t){if(!N(t))throw TypeError("\uC18C\uC6B8\uC6E8\uD3F0\uC740 \uC911\uBCF5\uD574\uC11C \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");t.data.soulSlot={}}function $(t){return t.soulEnchanted}function rt(t,e){if(!$(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=e,Ut(t)}function F(t){return t.soulEnchanted}function at(t,e){if(!F(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(e<0||e>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=e,Ut(t)}function nt(t){t.data.soulSlot=void 0}function Ut(t){let e;if(t.soulCharge===0)e={};else{let o=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",a=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?e={[o]:10+a*(t.soul.chargeFactor??1)}:e={[o]:5+a}}t.data.soulSlot.chargeOption=e}var lt=class{data;constructor(e){this.data=e}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 _(this.data.req??{})}get attributes(){return new P(this.data.attributes??{})}get totalOption(){return p(gt(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return p(this.data.baseOption??{})}get addOption(){return p(this.data.addOption??{})}get upgradeOption(){return p(this.data.upgradeOption??{})}get starforceOption(){return p(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 e=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(15,e):e)}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:p(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return p(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(e){this.data.potentialGrade=e}get potentials(){return this.data.potentials}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(e){this.data.additionalPotentialGrade=e}get additionalPotentials(){return this.data.additionalPotentials}get exceptionalOption(){return p(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(e,o){this.data.shapeName=e,this.data.shapeIcon=o}resetShape(){this.data.shapeName=void 0,this.data.shapeIcon=void 0}get supportsAddOption(){return y(this.type)}applyAddOption(e,o){let a=J(this,e,o);this.data.addOption||(this.data.addOption={}),x(this.data.addOption,a),this.meta.add.push([e,o])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return f(this)}get canApplyGoldenHammer(){return I(this)}applyGoldenHammer(){Q(this)}get canApplyFailScroll(){return H(this)}applyScrollFail(){Y(this)}get canApplyResileScroll(){return D(this)}applyScrollResile(){Z(this)}get canResetUpgrade(){return q(this)}resetUpgrade(){z(this)}get canApplyScroll(){return L(this)}applyScroll(e){g(this,e)}applySpellTrace(e,o){T(this,e,o)}get supportsStarforce(){return O(this)}get canApplyStarforce(){return A(this)}applyStarforce(){G(this)}get canApplyStarforceIgnoringMaxStar(){return A(this,!0)}applyStarforceIgnoringMaxStar(){G(this,!0)}get canApplyStarScroll(){return k(this)}applyStarScroll(e=!1){j(this,e)}get canApplyStarScrollIgnoringMaxStar(){return k(this,!0)}applyStarScrollIgnoringMaxStar(e=!1){j(this,e,!0)}get canResetStarforce(){return B(this)}resetStarforce(){et(this)}get supportsSoul(){return V(this)}get canApplySoulEnchant(){return N(this)}applySoulEnchant(){ot(this)}get canSetSoul(){return $(this)}setSoul(e){rt(this,e)}get canSetSoulCharge(){return F(this)}setSoulCharge(e){at(this,e)}resetSoulEnchant(){nt(this)}get supportsExceptional(){return w(this)}get canApplyExceptional(){return E(this)}applyExceptional(e){K(this,e)}get canResetExceptional(){return U(this)}resetExceptional(){X(this)}};
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)}};
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { type GearAttributeData, type GearTrade, type GearShare, type AddOptionCan, type PotentialCan, type GearCuttable, type GearIncline, type GearData, type GearMetadata, type GearReqData, type GearBaseOption, type GearAddOption, type GearUpgradeOption, type GearStarforceOption, type GearExceptionalOption, type GearOption, type GearType, type PotentialData, type PotentialOption, type PotentialGrade, type SoulSlotData, type SoulData, type ReadonlySoulData, type SoulChargeOption, type SoulOption, } from './lib/data';
2
- export { type AddOptionType, type AddOptionGrade, supportsAddOption, getAddOption, getAddOptionValue, } from './lib/enhance/addOption';
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';
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
- export { type SpellTraceType, type SpellTraceRate, type SpellTrace, applySpellTrace, getSpellTraceScroll, } from './lib/enhance/spellTrace';
4
+ export { SpellTraceType, type SpellTraceRate, type SpellTrace, applySpellTrace, getSpellTraceScroll, } from './lib/enhance/spellTrace';
5
5
  export { supportsStarforce, canStarforce, starforce, canStarScroll, starScroll, canResetStarforce, resetStarforce, } from './lib/enhance/starforce';
6
6
  export { type Scroll, supportsUpgrade, canGoldenHammer, applyGoldenHammer, canFailScroll, failScroll, canResileScroll, resileScroll, canResetUpgrade, resetUpgrade, canApplyScroll, applyScroll, } from './lib/enhance/upgrade';
7
7
  export { Gear } from './lib/Gear';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- function s(t){return dt(t)||ft(t)}function dt(t){return 121<=t&&t<=139&&t!==134||Math.floor(t/10)===121}function ft(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}function Rt(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 S(t){return t===100||t>=104&&t<=110||t===1098||t===1099}function h(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}function K(t){return s(t)?!0:S(t)?!U(t):h(t)?![111,115].includes(t):t===116}function X(t,e,o){let r=Vt(e),a=St(t,e,o),l=r.map(c=>[c,a]);return Object.fromEntries(l)}function St(t,e,o){let r={type:e,reqLevel:t.req.level,gearType:t.type,bossReward:t.attributes.bossReward??!1,attackPower:t.baseOption.attackPower??0,magicPower:t.baseOption.magicPower??0};switch(e){case"str":case"dex":case"int":case"luk":return mt(o,r);case"str&dex":case"str&int":case"str&luk":case"dex&int":case"dex&luk":case"int&luk":return Ut(o,r);case"armor":return mt(o,r);case"attackPower":case"magicPower":return It(o,r);case"maxHp":case"maxMp":return qt(o,r);case"speed":return Lt(o,r);case"jump":return Mt(o,r);case"damage":return Gt(o,r);case"bossDamage":return jt(o,r);case"allStat":return Bt(o,r);case"reqLevelDecrease":return Wt(o,r)}}function mt(t,{reqLevel:e}){return e>=250?Math.floor(e/20)*t:(Math.floor(e/20)+1)*t}function Ut(t,{reqLevel:e}){return(Math.floor(e/40)+1)*t}function It(t,e){let{reqLevel:o,gearType:r}=e;if(s(r))return Ht(t,e);if(o>=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 Ht(t,e){let{reqLevel:o,type:r,gearType:a,bossReward:l,attackPower:c,magicPower:n}=e,u=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(a===156||a===157){let d=Dt(a,e),w=o>180?6:o>160?5:o>110?4:3;return Math.ceil(d*u[t-1]*w/100)}else{let d=r==="magicPower"&&n>c?n:c;if(l){let w=o>160?6:o>150?5:o>110?4:3;return Math.ceil(d*u[t-1]*w*3/100)}else{let w=o>110?4:3;return Math.ceil(d*u[t-1]*w/100)}}}function Dt(t,{attackPower:e}){if(t===156)return e;let r=new Map([[100,102],[103,105],[105,107],[112,114],[117,121],[135,139],[169,173],[203,207],[293,297],[337,342]]).get(e);if(r===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 r}function qt(t,{reqLevel:e}){return e<10?3*t:e>=250?700*t:Math.floor(e/10)*30*t}function Lt(t,{gearType:e}){if(s(e))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 Mt(t,{gearType:e}){if(s(e))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 Gt(t,{gearType:e}){if(!s(e))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 jt(t,{reqLevel:e,gearType:o}){if(e<90||!s(o))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 Bt(t,{reqLevel:e,gearType:o}){if(e<70&&!s(o))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 Wt(t,{reqLevel:e}){if(e<=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(e,5*t)}function Vt(t){return t.split("&")}function x(t,...e){let o=t;for(let r of e)for(let[a,l]of Object.entries(r))a in o?o[a]+=l:o[a]=l}function ht(...t){let e={};return x(e,...t),e}function A(t){return t.exceptionalTotalUpgradeableCount>0}function I(t){return A(t)&&t.exceptionalUpgradeableCount>0}function Q(t,e){if(!I(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={}),x(t.data.exceptionalOption,e.option),t.data.exceptionalUpgradeableCount=t.exceptionalUpgradeableCount-1,t.data.exceptionalUpgradeCount=t.exceptionalUpgradeCount+1}function H(t){return A(t)}function Y(t){if(!H(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 f(t){return!t.attributes.cannotUpgrade&&t.scrollTotalUpgradeableCount>0}function D(t){return f(t)&&!t.attributes.blockGoldenHammer&&t.goldenHammer===0}function Z(t){if(!D(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 q(t){return f(t)&&t.scrollUpgradeableCount>0}function z(t){if(!q(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 L(t){return f(t)&&t.scrollResilienceCount>0}function T(t){if(!L(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 M(t){return f(t)}function tt(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.upgradeOption={},t.data.scrollUpgradeableCount=t.scrollTotalUpgradeableCount,t.data.scrollUpgradeCount=void 0,t.data.scrollResilienceCount=void 0,t.data.goldenHammer=void 0}function G(t){return f(t)&&t.scrollUpgradeableCount>0}function k(t,e){if(!G(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={}),x(t.data.upgradeOption,e.option),t.data.scrollUpgradeableCount=t.scrollUpgradeableCount-1,t.data.scrollUpgradeCount=t.scrollUpgradeCount+1}function ot(t,e,o){let r=Ot(t,e,o);k(t,r)}function Ot(t,e,o){if(s(t.type)||t.type===134)return Nt(t,e,o);if(t.type===108)return $t(t,e,o);if(S(t.type)||t.type===115)return Ft(t,e,o);if(h(t.type))return yt(t,e,o);if(t.type===167)return Jt(t,e,o);throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC7A5\uBE44 \uBD84\uB958\uC785\uB2C8\uB2E4.")}function Nt(t,e,o){if(e==="allStat")throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let r=P(t),[a,l]=Kt[o][r];e==="maxHp"&&(l*=50);let c=rt(e),n,u;return l===0?(n=`${o}% ${b(c)} \uC8FC\uBB38\uC11C`,u={[c]:a}):(n=`${o}% ${b(c)}(${b(e)}) \uC8FC\uBB38\uC11C`,u={[c]:a,[e]:l}),{name:n,option:u,type:e,rate:o}}function $t(t,e,o){let r=P(t),a=Qt[o][r],l,c;if(a===0)l=`${o}% \uBC29\uC5B4\uB825 \uC8FC\uBB38\uC11C`,c={armor:3};else{let n=rt(e);l=`${o}% ${b(n)} \uC8FC\uBB38\uC11C`,c={[n]:a}}return{name:l,option:c,rate:o,type:e}}function Ft(t,e,o){let r=P(t),[a,l,c]=Xt[o][r],n={maxHp:l,armor:c};switch(e){case"str":case"dex":case"int":case"luk":n[e]=a;break;case"maxHp":n.maxHp+=a*50;break;case"allStat":if(!(o in xt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let d=xt[o][r];n.str=d,n.dex=d,n.int=d,n.luk=d;break}return t.scrollUpgradeCount===3&&(t.req.beginner()?(n.attackPower=1,n.magicPower=1):t.req.magician()?n.magicPower=1:n.attackPower=1),{name:`${o}% ${b(e)} \uC8FC\uBB38\uC11C`,option:n,type:e,rate:o}}function yt(t,e,o){if(!(o in et))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let r=P(t),a=et[o][r],l={};switch(e){case"str":case"dex":case"int":case"luk":l[e]=a;break;case"maxHp":l.maxHp=a*50;break;case"allStat":if(!(o in bt))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let n=bt[o][r];l.str=n,l.dex=n,l.int=n,l.luk=n;break}return{name:`${o}% ${b(e)} \uC8FC\uBB38\uC11C`,option:l,type:e,rate:o}}function Jt(t,e,o){if(!(o in et))throw TypeError("\uC8FC\uBB38\uC758 \uD754\uC801\uC744 \uC7A5\uBE44\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");let r=P(t),a=Yt[o][r],l=rt(e),c=`${o}% ${b(l)} \uC8FC\uBB38\uC11C`,n={[l]:a};return{name:c,option:n,type:e,rate:o}}function b(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 P(t){return t.req.level>110?2:t.req.level>70?1:0}function rt(t){return t==="int"?"magicPower":"attackPower"}var Kt={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]]},Xt={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]]},xt={30:[1,2,3],15:[2,3,4]},Qt={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},et={100:[1,1,2],70:[2,2,3],30:[3,4,5]},bt={30:[1,2,3]},Yt={100:[1,2,3],70:[2,3,5],30:[3,5,7]};var wt="__GearOption_s87Ns2aQ";function p(t){return t[wt]?t:new Proxy(t,{get(e,o){if(o===wt)return!0;if(o in at)return e[o]??at[o]},set(e,o,r){return o in at?(e[o]=r,!0):!1},ownKeys(e){return Object.entries(e).filter(([,o])=>o!=0).map(([o])=>o)}})}var at={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 Zt=25,gt=15,zt=15,Tt=150;function O(t){return(t.data.maxStar??0)>0}function _(t,e=!1){if(!O(t))return!1;if(t.attributes.superior)return t.star<Math.min(zt,t.maxStar);if(!e&&t.star>=t.maxStar)return!1;let o=t.starScroll?gt:Zt;return t.star<o}function B(t,e=!1){if(!_(t,e))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?te(t):s(t.type)||t.type===134?ee(t):oe(t)}function v(t,e=!1){return!O(t)||t.attributes.superior||t.req.level>Tt||!e&&t.star>=t.maxStar?!1:t.star<gt}function W(t,e=!1,o=!1){if(!v(t,o))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 r=m(pe,t),a=m(ue,t),l=s(t.type)||t.type===134;for(let n of R)nt(t,n)>0&&(i(t)[n]+=r,e&&h(t.type)&&(i(t)[n]+=t.star>5?2:1));for(let n of kt){let u=nt(t,n);u>0&&(l&&(i(t)[n]+=Math.floor(u/50)+1),i(t)[n]+=a,e&&(l||t.type===109)&&(i(t)[n]+=1))}e&&S(t.type)&&(i(t).maxHp+=50);let c=nt(t,"armor");c>0&&(i(t).armor+=Math.floor(c/20)+1)}function V(t){return!!O(t)}function lt(t){if(!V(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 te(t){let e=m(ie,t),o=m(le,t);for(let a of R)t.baseOption[a]>0&&(i(t)[a]+=e);for(let a of kt)t.baseOption[a]>0&&(i(t)[a]+=o);let r=j(t,"armor");i(t).armor+=Math.floor(r/20)+1}function ee(t){let e=m(Pt,t),o=m(ne,t),r=At(t);for(let c of R)(r.has(c)||t.star>15&&(t.baseOption[c]>0||t.upgradeOption[c]>0))&&(i(t)[c]+=e);let a=t.req.magician()||t.upgradeOption.magicPower>0;if(t.star>15)i(t).attackPower+=o,a&&(i(t).magicPower+=o);else{let c=j(t,"attackPower");if(i(t).attackPower+=Math.floor(c/50)+1,a){let n=j(t,"magicPower");i(t).magicPower+=Math.floor(n/50)+1}}let l=_t[t.star];i(t).maxHp+=l,i(t).maxMp+=l}function oe(t){let e=m(Pt,t),o=m(ae,t),r=At(t);for(let a of R)(r.has(a)||t.star>15&&(t.baseOption[a]>0||t.upgradeOption[a]>0))&&(i(t)[a]+=e);if(i(t).attackPower+=o,i(t).magicPower+=o,t.type===108){let a=ce[t.star];t.req.beginner()?(i(t).attackPower+=a,i(t).magicPower+=a):t.req.magician()?i(t).magicPower+=a:i(t).attackPower+=a}if(t.type!==167){let a=j(t,"armor");i(t).armor+=Math.floor(a/20)+1}if(re.includes(t.type)){let a=_t[t.star];i(t).maxHp+=a}if(t.type===107){let a=se[t.star];i(t).speed+=a,i(t).jump+=a}}function At(t){if(t.req.beginner())return new Set(R);let e=[];return t.req.warrior()&&e.push("str","dex"),t.req.magician()&&e.push("int","luk"),t.req.bowman()&&e.push("dex","str"),t.req.thief()&&e.push("luk","dex"),t.req.pirate()&&e.push("str","dex"),new Set(e)}function m(t,e){let o=e.req.level;for(let r=t.length-1;r>=0;r--){let a=t[r];if(o>=a[0])return a[e.star]}throw TypeError("\uC7A5\uBE44\uC758 \uCC29\uC6A9 \uAC00\uB2A5 \uB808\uBCA8\uC740 0 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.")}function i(t){return t.data.starforceOption===void 0&&(t.data.starforceOption={}),p(t.data.starforceOption)}function j(t,e){return t.baseOption[e]+t.upgradeOption[e]+t.starforceOption[e]}function nt(t,e){return t.baseOption[e]+t.addOption[e]+t.upgradeOption[e]+t.starforceOption[e]}var R=["str","dex","int","luk"],kt=["attackPower","magicPower"],re=[100,104,105,106,110,111,112,113,115,109],Pt=[[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]],ne=[[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]],le=[[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]],ie=[[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]],ce=[-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],_t=[-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],se=[-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],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],[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]],ue=[[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(e){this.data=e}get only(){return this.data.only??!1}get trade(){return this.data.trade??0}set trade(e){this.data.trade=e}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(e){this.data.cuttableCount=e}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(e){this.data.incline=e}get bossReward(){return this.data.bossReward??!1}get growthExp(){return this.data.growthExp}set growthExp(e){(e===void 0||0<=e&&e<=100)&&(this.data.growthExp=e)}get growthLevel(){return this.data.growthLevel}set growthLevel(e){this.data.growthLevel=e}get dateExpire(){return this.data.dateExpire}set dateExpire(e){(e===void 0||!Number.isNaN(Date.parse(e)))&&(this.data.dateExpire=e)}};var E=class{data;constructor(e){this.data=e}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 N(t){return s(t.type)&&t.req.level>=30}function $(t){return N(t)&&!t.soulEnchanted}function it(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 F(t){return t.soulEnchanted}function ct(t,e){if(!F(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=e,vt(t)}function y(t){return t.soulEnchanted}function st(t,e){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(e<0||e>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=e,vt(t)}function pt(t){t.data.soulSlot=void 0}function vt(t){let e;if(t.soulCharge===0)e={};else{let o=t.baseOption.attackPower>=t.baseOption.magicPower?"attackPower":"magicPower",r=Math.min(5,Math.ceil(t.soulCharge/100)-1);t.soul?e={[o]:10+r*(t.soul.chargeFactor??1)}:e={[o]:5+r}}t.data.soulSlot.chargeOption=e}var ut=class{data;constructor(e){this.data=e}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 E(this.data.req??{})}get attributes(){return new C(this.data.attributes??{})}get totalOption(){return p(ht(this.baseOption,this.addOption,this.upgradeOption,this.starforceOption))}get baseOption(){return p(this.data.baseOption??{})}get addOption(){return p(this.data.addOption??{})}get upgradeOption(){return p(this.data.upgradeOption??{})}get starforceOption(){return p(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 e=this.data.maxStar??0;return Math.max(this.star,this.starScroll?Math.min(15,e):e)}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:p(this.data.soulSlot.soul.option)}}get soulCharge(){return this.data.soulSlot?.charge??0}get soulChargeOption(){return p(this.data.soulSlot?.chargeOption??{})}get potentialGrade(){return this.data.potentialGrade??0}set potentialGrade(e){this.data.potentialGrade=e}get potentials(){return this.data.potentials}get additionalPotentialGrade(){return this.data.additionalPotentialGrade??0}set additionalPotentialGrade(e){this.data.additionalPotentialGrade=e}get additionalPotentials(){return this.data.additionalPotentials}get exceptionalOption(){return p(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(e,o){this.data.shapeName=e,this.data.shapeIcon=o}resetShape(){this.data.shapeName=void 0,this.data.shapeIcon=void 0}get supportsAddOption(){return K(this.type)}applyAddOption(e,o){let r=X(this,e,o);this.data.addOption||(this.data.addOption={}),x(this.data.addOption,r),this.meta.add.push([e,o])}resetAddOption(){this.data.addOption=void 0,this.meta.add=[]}get supportsUpgrade(){return f(this)}get canApplyGoldenHammer(){return D(this)}applyGoldenHammer(){Z(this)}get canApplyFailScroll(){return q(this)}applyScrollFail(){z(this)}get canApplyResileScroll(){return L(this)}applyScrollResile(){T(this)}get canResetUpgrade(){return M(this)}resetUpgrade(){tt(this)}get canApplyScroll(){return G(this)}applyScroll(e){k(this,e)}applySpellTrace(e,o){ot(this,e,o)}get supportsStarforce(){return O(this)}get canApplyStarforce(){return _(this)}applyStarforce(){B(this)}get canApplyStarforceIgnoringMaxStar(){return _(this,!0)}applyStarforceIgnoringMaxStar(){B(this,!0)}get canApplyStarScroll(){return v(this)}applyStarScroll(e=!1){W(this,e)}get canApplyStarScrollIgnoringMaxStar(){return v(this,!0)}applyStarScrollIgnoringMaxStar(e=!1){W(this,e,!0)}get canResetStarforce(){return V(this)}resetStarforce(){lt(this)}get supportsSoul(){return N(this)}get canApplySoulEnchant(){return $(this)}applySoulEnchant(){it(this)}get canSetSoul(){return F(this)}setSoul(e){ct(this,e)}get canSetSoulCharge(){return y(this)}setSoulCharge(e){st(this,e)}resetSoulEnchant(){pt(this)}get supportsExceptional(){return A(this)}get canApplyExceptional(){return I(this)}applyExceptional(e){Q(this,e)}get canResetExceptional(){return H(this)}resetExceptional(){Y(this)}};export{ut as Gear,C as GearAttribute,E as GearReq,Q as applyExceptional,Z as applyGoldenHammer,k as applyScroll,it as applySoulEnchant,ot as applySpellTrace,I as canApplyExceptional,G as canApplyScroll,$ as canApplySoulEnchant,q as canFailScroll,D as canGoldenHammer,H as canResetExceptional,V as canResetStarforce,M as canResetUpgrade,L as canResileScroll,F as canSetSoul,y as canSetSoulCharge,v as canStarScroll,_ as canStarforce,z as failScroll,X as getAddOption,St as getAddOptionValue,Ot as getSpellTraceScroll,h as isAccessory,S as isArmor,ft as isDoubleHandWeapon,Et as isDragonGear,dt as isLeftWeapon,Ct as isMechanicGear,U as isShield,Rt as isSubWeapon,s as isWeapon,Y as resetExceptional,pt as resetSoulEnchant,lt as resetStarforce,tt as resetUpgrade,T as resileScroll,ct as setSoul,st as setSoulCharge,W as starScroll,B as starforce,K as supportsAddOption,A as supportsExceptional,N as supportsSoul,O as supportsStarforce,f as supportsUpgrade,p as toGearOption};
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};
@@ -150,11 +150,8 @@ export declare class Gear {
150
150
  /**
151
151
  * 잠재능력 목록
152
152
  */
153
- get potentials(): [
154
- PotentialData | null,
155
- PotentialData | null,
156
- PotentialData | null
157
- ];
153
+ get potentials(): Readonly<PotentialData[]>;
154
+ set potentials(value: PotentialData[]);
158
155
  /**
159
156
  * 에디셔널 잠재능력 등급
160
157
  */
@@ -163,11 +160,8 @@ export declare class Gear {
163
160
  /**
164
161
  * 에디셔널 잠재능력 목록
165
162
  */
166
- get additionalPotentials(): [
167
- PotentialData | null,
168
- PotentialData | null,
169
- PotentialData | null
170
- ];
163
+ get additionalPotentials(): Readonly<PotentialData[]>;
164
+ set additionalPotentials(value: PotentialData[]);
171
165
  /**
172
166
  * 장비 익셉셔널 옵션
173
167
  */
@@ -45,7 +45,7 @@ export type GearAttributeData = {
45
45
  /** 장비 유효 기간(KST) */
46
46
  dateExpire?: string;
47
47
  };
48
- export declare const enum GearTrade {
48
+ export declare enum GearTrade {
49
49
  /** 교환 가능 */
50
50
  Tradeable = 0,
51
51
  /** 교환 불가 */
@@ -53,7 +53,7 @@ export declare const enum GearTrade {
53
53
  /** 장착 시 교환 불가 */
54
54
  EquipTradeBlock = 2
55
55
  }
56
- export declare const enum GearShare {
56
+ export declare enum GearShare {
57
57
  /** 없음 */
58
58
  None = 0,
59
59
  /** 월드 내 나의 캐릭터 간 이동 가능 */
@@ -61,7 +61,7 @@ export declare const enum GearShare {
61
61
  /** 월드 내 나의 캐릭터 간 1회 이동 가능 (이동 후 교환불가) */
62
62
  AccountSharableOnce = 2
63
63
  }
64
- export declare const enum AddOptionCan {
64
+ export declare enum AddOptionCan {
65
65
  /** 없음 (장비 분류를 따름) */
66
66
  None = 0,
67
67
  /** 설정 가능 */
@@ -69,7 +69,7 @@ export declare const enum AddOptionCan {
69
69
  /** 설정 불가 */
70
70
  Cannot = 2
71
71
  }
72
- export declare const enum PotentialCan {
72
+ export declare enum PotentialCan {
73
73
  /** 없음 (장비 분류를 따름) */
74
74
  None = 0,
75
75
  /** 설정 가능 */
@@ -79,7 +79,7 @@ export declare const enum PotentialCan {
79
79
  /** 재설정 불가 */
80
80
  Fixed = 3
81
81
  }
82
- export declare const enum GearCuttable {
82
+ export declare enum GearCuttable {
83
83
  /** 없음 */
84
84
  None = 0,
85
85
  /** 카르마의 가위 또는 실버 카르마의 가위를 사용하면 1회 교환이 가능하게 할 수 있습니다. */
@@ -54,19 +54,11 @@ export type GearData = {
54
54
  /** 잠재능력 등급 */
55
55
  potentialGrade?: PotentialGrade;
56
56
  /** 잠재능력 목록 */
57
- potentials: [
58
- PotentialData | null,
59
- PotentialData | null,
60
- PotentialData | null
61
- ];
57
+ potentials?: PotentialData[];
62
58
  /** 에디셔널 잠재능력 등급 */
63
59
  additionalPotentialGrade?: PotentialGrade;
64
60
  /** 에디셔널 잠재능력 목록 */
65
- additionalPotentials: [
66
- PotentialData | null,
67
- PotentialData | null,
68
- PotentialData | null
69
- ];
61
+ additionalPotentials?: PotentialData[];
70
62
  /** 장비 익셉셔널 옵션 */
71
63
  exceptionalOption?: Partial<GearExceptionalOption>;
72
64
  /** 익셉셔널 강화 횟수 */
@@ -1,4 +1,4 @@
1
- export declare const enum GearType {
1
+ export declare enum GearType {
2
2
  /** 모자 */
3
3
  cap = 100,
4
4
  /** 얼굴장식 */
@@ -1,4 +1,4 @@
1
- export declare const enum PotentialGrade {
1
+ export declare enum PotentialGrade {
2
2
  Normal = 0,
3
3
  Rare = 1,
4
4
  Epic = 2,
@@ -1,6 +1,6 @@
1
1
  import { GearAddOption, GearType } from '../data';
2
2
  import { Gear } from '../Gear';
3
- export declare const enum AddOptionType {
3
+ export declare enum AddOptionType {
4
4
  /** STR */
5
5
  str = "str",
6
6
  /** DEX */
@@ -3,7 +3,7 @@ import { Scroll } from './upgrade';
3
3
  /**
4
4
  * 주문의 흔적 종류
5
5
  */
6
- export declare const enum SpellTraceType {
6
+ export declare enum SpellTraceType {
7
7
  /** STR */
8
8
  str = "str",
9
9
  /** DEX */
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.0",
4
+ "version": "1.0.0-next.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -9,6 +9,11 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/Lechros/malib",
15
+ "directory": "packages/gear"
16
+ },
12
17
  "scripts": {
13
18
  "test:type": "tsc -p tsconfig.lib.json --noEmit && tsc -p tsconfig.test.json --noEmit"
14
19
  },