@malib/gear 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,127 +1,204 @@
1
- var c = /* @__PURE__ */ ((t) => (t[t.incSTR = 1] = "incSTR", t[t.incSTRr = 2] = "incSTRr", t[t.incDEX = 3] = "incDEX", t[t.incDEXr = 4] = "incDEXr", t[t.incINT = 5] = "incINT", t[t.incINTr = 6] = "incINTr", t[t.incLUK = 7] = "incLUK", t[t.incLUKr = 8] = "incLUKr", t[t.incAllStat_incMHP25 = 9] = "incAllStat_incMHP25", t[t.incAllStat = 10] = "incAllStat", t[t.incMHP_incMMP = 11] = "incMHP_incMMP", t[t.incMHPr_incMMPr = 12] = "incMHPr_incMMPr", t[t.incMHP = 13] = "incMHP", t[t.incMMP = 14] = "incMMP", t[t.incMHPr = 15] = "incMHPr", t[t.incMMPr = 16] = "incMMPr", t[t.incMDF = 17] = "incMDF", t[t.incARC = 18] = "incARC", t[t.incAUT = 19] = "incAUT", t[t.incPAD_incMAD = 20] = "incPAD_incMAD", t[t.incPAD = 21] = "incPAD", t[t.incMAD = 22] = "incMAD", t[t.incAD = 23] = "incAD", t[t.incPDD_incMDD = 24] = "incPDD_incMDD", t[t.incPDD = 25] = "incPDD", t[t.incSpeed = 26] = "incSpeed", t[t.incJump = 27] = "incJump", t[t.knockback = 28] = "knockback", t[t.bdR = 29] = "bdR", t[t.incBDR = 30] = "incBDR", t[t.imdR = 31] = "imdR", t[t.incIMDR = 32] = "incIMDR", t[t.damR = 33] = "damR", t[t.nbdR = 34] = "nbdR", t[t.statR = 35] = "statR", t[t.incCHUC = 36] = "incCHUC", t[t.incPADr = 100] = "incPADr", t[t.incMADr = 101] = "incMADr", t[t.incPDDr = 102] = "incPDDr", t[t.incMDDr = 103] = "incMDDr", t[t.incACCr = 104] = "incACCr", t[t.incEVAr = 105] = "incEVAr", t[t.incCr = 106] = "incCr", t[t.incDAMr = 107] = "incDAMr", t[t.RecoveryHP = 108] = "RecoveryHP", t[t.RecoveryMP = 109] = "RecoveryMP", t[t.face = 110] = "face", t[t.prop = 111] = "prop", t[t.time = 112] = "time", t[t.HP = 113] = "HP", t[t.MP = 114] = "MP", t[t.attackType = 115] = "attackType", t[t.ignoreTargetDEF = 116] = "ignoreTargetDEF", t[t.ignoreDAM = 117] = "ignoreDAM", t[t.ignoreDAMr = 118] = "ignoreDAMr", t[t.DAMreflect = 119] = "DAMreflect", t[t.mpconReduce = 120] = "mpconReduce", t[t.mpRestore = 121] = "mpRestore", t[t.incMesoProp = 122] = "incMesoProp", t[t.incRewardProp = 123] = "incRewardProp", t[t.incAllskill = 124] = "incAllskill", t[t.RecoveryUP = 125] = "RecoveryUP", t[t.boss = 126] = "boss", t[t.level = 127] = "level", t[t.incTerR = 128] = "incTerR", t[t.incAsrR = 129] = "incAsrR", t[t.incEXPr = 130] = "incEXPr", t[t.reduceCooltime = 131] = "reduceCooltime", t[t.incCriticaldamageMax = 132] = "incCriticaldamageMax", t[t.incCriticaldamageMin = 133] = "incCriticaldamageMin", t[t.incSTRlv = 134] = "incSTRlv", t[t.incDEXlv = 135] = "incDEXlv", t[t.incINTlv = 136] = "incINTlv", t[t.incLUKlv = 137] = "incLUKlv", t[t.incMaxDamage = 138] = "incMaxDamage", t[t.incMHPlv = 139] = "incMHPlv", t[t.incPADlv = 140] = "incPADlv", t[t.incMADlv = 141] = "incMADlv", t[t.incCriticaldamage = 142] = "incCriticaldamage", t[t.attackSpeed = 200] = "attackSpeed", t[t.tuc = 201] = "tuc", t[t.setItemID = 202] = "setItemID", t[t.durability = 203] = "durability", t[t.reduceReq = 204] = "reduceReq", t[t.growthLevel = 205] = "growthLevel", t[t.growthExp = 206] = "growthExp", t[t.mastery = 300] = "mastery", t[t.reqLevel = 1e3] = "reqLevel", t[t.reqSTR = 1001] = "reqSTR", t[t.reqDEX = 1002] = "reqDEX", t[t.reqINT = 1003] = "reqINT", t[t.reqLUK = 1004] = "reqLUK", t[t.reqJob = 1005] = "reqJob", t[t.reqPOP = 1006] = "reqPOP", t[t.reqSpecJob = 1007] = "reqSpecJob", t[t.only = 1100] = "only", t[t.tradeBlock = 1101] = "tradeBlock", t[t.accountSharable = 1102] = "accountSharable", t[t.onlyEquip = 1103] = "onlyEquip", t[t.tradeAvailable = 1104] = "tradeAvailable", t[t.equipTradeBlock = 1105] = "equipTradeBlock", t[t.tradeOnce = 1106] = "tradeOnce", t[t.sharableOnce = 1107] = "sharableOnce", t[t.charismaEXP = 1108] = "charismaEXP", t[t.senseEXP = 1109] = "senseEXP", t[t.insightEXP = 1110] = "insightEXP", t[t.willEXP = 1111] = "willEXP", t[t.craftEXP = 1112] = "craftEXP", t[t.charmEXP = 1113] = "charmEXP", t[t.accountShareTag = 1114] = "accountShareTag", t[t.bossReward = 1115] = "bossReward", t[t.noPotential = 1116] = "noPotential", t[t.fixedPotential = 1117] = "fixedPotential", t[t.specialGrade = 1118] = "specialGrade", t[t.fixedGrade = 1119] = "fixedGrade", t[t.superiorEqp = 1120] = "superiorEqp", t[t.incPQEXPr = 1121] = "incPQEXPr", t[t.jokerToSetItem = 1122] = "jokerToSetItem", t[t.blockGoldHammer = 1123] = "blockGoldHammer", t[t.exceptUpgrade = 1124] = "exceptUpgrade", t[t.onlyUpgrade = 1125] = "onlyUpgrade", t[t.noLookChange = 1126] = "noLookChange", t[t.tucIgnoreForPotential = 1127] = "tucIgnoreForPotential", t))(c || {}), l = /* @__PURE__ */ ((t) => (t[t.cap = 100] = "cap", t[t.faceAccessory = 101] = "faceAccessory", t[t.eyeAccessory = 102] = "eyeAccessory", t[t.earrings = 103] = "earrings", t[t.coat = 104] = "coat", t[t.longcoat = 105] = "longcoat", t[t.pants = 106] = "pants", t[t.shoes = 107] = "shoes", t[t.glove = 108] = "glove", t[t.cape = 110] = "cape", t[t.ring = 111] = "ring", t[t.pendant = 112] = "pendant", t[t.belt = 113] = "belt", t[t.medal = 114] = "medal", t[t.shoulder = 115] = "shoulder", t[t.pocket = 116] = "pocket", t[t.badge = 118] = "badge", t[t.android = 166] = "android", t[t.machineHeart = 167] = "machineHeart", t[t.shield = 109] = "shield", t[t.emblem = 119] = "emblem", t[t.powerSource = 119020] = "powerSource", t[t.shiningRod = 1212] = "shiningRod", t[t.tuner = 1213] = "tuner", t[t.breathShooter = 1214] = "breathShooter", t[t.soulShooter = 122] = "soulShooter", t[t.desperado = 123] = "desperado", t[t.energySword = 124] = "energySword", t[t.espLimiter = 126] = "espLimiter", t[t.chain = 127] = "chain", t[t.magicGauntlet = 128] = "magicGauntlet", t[t.ritualFan = 129] = "ritualFan", t[t.ohSword = 130] = "ohSword", t[t.ohAxe = 131] = "ohAxe", t[t.ohBlunt = 132] = "ohBlunt", t[t.dagger = 133] = "dagger", t[t.katara = 134] = "katara", t[t.cane = 136] = "cane", t[t.wand = 137] = "wand", t[t.staff = 138] = "staff", t[t.thSword = 140] = "thSword", t[t.chakram = 1404] = "chakram", t[t.thAxe = 141] = "thAxe", t[t.thBlunt = 142] = "thBlunt", t[t.spear = 143] = "spear", t[t.polearm = 144] = "polearm", t[t.bow = 145] = "bow", t[t.crossbow = 146] = "crossbow", t[t.claw = 147] = "claw", t[t.knuckle = 148] = "knuckle", t[t.gun = 149] = "gun", t[t.shovel = 150] = "shovel", t[t.pickaxe = 151] = "pickaxe", t[t.dualBowguns = 152] = "dualBowguns", t[t.handCannon = 153] = "handCannon", t[t.heavySword = 156] = "heavySword", t[t.longSword = 157] = "longSword", t[t.gauntletRevolver = 158] = "gauntletRevolver", t[t.ancientBow = 159] = "ancientBow", t[t.soulShield = 1098] = "soulShield", t[t.demonShield = 1099] = "demonShield", t[t.magicArrow = 135200] = "magicArrow", t[t.card = 135210] = "card", t[t.medallion = 135220] = "medallion", t[t.rosary = 135221] = "rosary", t[t.ironChain = 135222] = "ironChain", t[t.magicBook1 = 135223] = "magicBook1", t[t.magicBook2 = 135224] = "magicBook2", t[t.magicBook3 = 135225] = "magicBook3", t[t.arrowFletching = 135226] = "arrowFletching", t[t.bowThimble = 135227] = "bowThimble", t[t.daggerScabbard = 135228] = "daggerScabbard", t[t.charm = 135229] = "charm", t[t.orb = 135240] = "orb", t[t.dragonEssence = 135250] = "dragonEssence", t[t.soulRing = 135260] = "soulRing", t[t.magnum = 135270] = "magnum", t[t.wristBand = 135290] = "wristBand", t[t.farSight = 135291] = "farSight", t[t.powderKeg = 135292] = "powderKeg", t[t.mass = 135293] = "mass", t[t.document = 135294] = "document", t[t.magicMarble = 135295] = "magicMarble", t[t.arrowhead = 135296] = "arrowhead", t[t.jewel = 135297] = "jewel", t[t.powderKeg2 = 135298] = "powderKeg2", t[t.controller = 135300] = "controller", t[t.foxMarble = 135310] = "foxMarble", t[t.chessPiece = 135320] = "chessPiece", t[t.transmitter = 135330] = "transmitter", t[t.charge = 135340] = "charge", t[t.magicWing = 135350] = "magicWing", t[t.pathOfAbyss = 135360] = "pathOfAbyss", t[t.relic = 135370] = "relic", t[t.fanTassel = 135380] = "fanTassel", t[t.bracelet = 135400] = "bracelet", t[t.weaponBelt = 135401] = "weaponBelt", t[t.ornament = 135402] = "ornament", t[t.hexSeeker = 135403] = "hexSeeker", t[t.petEquip = 180] = "petEquip", t[t.machineEngine = 161] = "machineEngine", t[t.machineArms = 162] = "machineArms", t[t.machineLegs = 163] = "machineLegs", t[t.machineBody = 164] = "machineBody", t[t.machineTransistors = 165] = "machineTransistors", t[t.dragonMask = 194] = "dragonMask", t[t.dragonPendant = 195] = "dragonPendant", t[t.dragonWings = 196] = "dragonWings", t[t.dragonTail = 197] = "dragonTail", t))(l || {}), S = /* @__PURE__ */ ((t) => (t[t.normal = 0] = "normal", t[t.rare = 1] = "rare", t[t.epic = 2] = "epic", t[t.unique = 3] = "unique", t[t.legendary = 4] = "legendary", t[t.special = 5] = "special", t))(S || {});
2
- class D {
3
- constructor() {
4
- this.level = 0, this.str = 0, this.luk = 0, this.dex = 0, this.int = 0, this.job = 0, this.specJob = 0;
5
- }
6
- }
7
- class A {
1
+ class I {
8
2
  constructor() {
9
3
  this.base = 0, this.bonus = 0, this.upgrade = 0, this.enchant = 0;
10
4
  }
5
+ /** 모든 수치가 0일 경우 `true`; 아닐 경우 `false` */
11
6
  get empty() {
12
7
  return this.base === 0 && this.bonus === 0 && this.upgrade === 0 && this.enchant === 0;
13
8
  }
9
+ /** 모든 수치의 합; 합이 음수일 경우 `0` */
14
10
  get sum() {
15
11
  return Math.max(0, this.base + this.bonus + this.upgrade + this.enchant);
16
12
  }
13
+ /** 기본 수치 대비 변화량 */
17
14
  get diff() {
18
15
  return this.bonus + this.upgrade + this.enchant;
19
16
  }
20
17
  }
21
- const o = class {
18
+ var n = /* @__PURE__ */ ((t) => (t[t.incSTR = 1] = "incSTR", t[t.incSTRr = 2] = "incSTRr", t[t.incDEX = 3] = "incDEX", t[t.incDEXr = 4] = "incDEXr", t[t.incINT = 5] = "incINT", t[t.incINTr = 6] = "incINTr", t[t.incLUK = 7] = "incLUK", t[t.incLUKr = 8] = "incLUKr", t[t.incAllStat = 9] = "incAllStat", t[t.incMHP = 10] = "incMHP", t[t.incMMP = 11] = "incMMP", t[t.incMHPr = 12] = "incMHPr", t[t.incMMPr = 13] = "incMMPr", t[t.incMDF = 14] = "incMDF", t[t.incARC = 15] = "incARC", t[t.incAUT = 16] = "incAUT", t[t.incPAD = 17] = "incPAD", t[t.incMAD = 18] = "incMAD", t[t.incAD = 19] = "incAD", t[t.incPDD = 20] = "incPDD", t[t.incSpeed = 21] = "incSpeed", t[t.incJump = 22] = "incJump", t[t.knockback = 23] = "knockback", t[t.bdR = 24] = "bdR", t[t.incBDR = 25] = "incBDR", t[t.imdR = 26] = "imdR", t[t.incIMDR = 27] = "incIMDR", t[t.damR = 28] = "damR", t[t.nbdR = 29] = "nbdR", t[t.statR = 30] = "statR", t[t.incCHUC = 31] = "incCHUC", t[t.incPADr = 100] = "incPADr", t[t.incMADr = 101] = "incMADr", t[t.incPDDr = 102] = "incPDDr", t[t.incCr = 103] = "incCr", t[t.incDAMr = 104] = "incDAMr", t[t.RecoveryHP = 105] = "RecoveryHP", t[t.RecoveryMP = 106] = "RecoveryMP", t[t.face = 107] = "face", t[t.prop = 108] = "prop", t[t.time = 109] = "time", t[t.HP = 110] = "HP", t[t.MP = 111] = "MP", t[t.attackType = 112] = "attackType", t[t.ignoreTargetDEF = 113] = "ignoreTargetDEF", t[t.ignoreDAM = 114] = "ignoreDAM", t[t.ignoreDAMr = 115] = "ignoreDAMr", t[t.DAMreflect = 116] = "DAMreflect", t[t.mpconReduce = 117] = "mpconReduce", t[t.incMesoProp = 118] = "incMesoProp", t[t.incRewardProp = 119] = "incRewardProp", t[t.incAllskill = 120] = "incAllskill", t[t.RecoveryUP = 121] = "RecoveryUP", t[t.boss = 122] = "boss", t[t.level = 123] = "level", t[t.incTerR = 124] = "incTerR", t[t.incAsrR = 125] = "incAsrR", t[t.incEXPr = 126] = "incEXPr", t[t.reduceCooltime = 127] = "reduceCooltime", t[t.incSTRlv = 128] = "incSTRlv", t[t.incDEXlv = 129] = "incDEXlv", t[t.incINTlv = 130] = "incINTlv", t[t.incLUKlv = 131] = "incLUKlv", t[t.incMHPlv = 132] = "incMHPlv", t[t.incPADlv = 133] = "incPADlv", t[t.incMADlv = 134] = "incMADlv", t[t.incCriticaldamage = 135] = "incCriticaldamage", t[t.attackSpeed = 200] = "attackSpeed", t[t.setItemID = 201] = "setItemID", t[t.durability = 202] = "durability", t[t.reduceReq = 203] = "reduceReq", t[t.only = 1100] = "only", t[t.tradeBlock = 1101] = "tradeBlock", t[t.accountSharable = 1102] = "accountSharable", t[t.onlyEquip = 1103] = "onlyEquip", t[t.tradeAvailable = 1104] = "tradeAvailable", t[t.equipTradeBlock = 1105] = "equipTradeBlock", t[t.sharableOnce = 1106] = "sharableOnce", t[t.charismaEXP = 1107] = "charismaEXP", t[t.senseEXP = 1108] = "senseEXP", t[t.insightEXP = 1109] = "insightEXP", t[t.willEXP = 1110] = "willEXP", t[t.craftEXP = 1111] = "craftEXP", t[t.charmEXP = 1112] = "charmEXP", t[t.accountShareTag = 1113] = "accountShareTag", t[t.bossReward = 1114] = "bossReward", t[t.noPotential = 1115] = "noPotential", t[t.fixedPotential = 1116] = "fixedPotential", t[t.specialGrade = 1117] = "specialGrade", t[t.fixedGrade = 1118] = "fixedGrade", t[t.superiorEqp = 1119] = "superiorEqp", t[t.incPQEXPr = 1120] = "incPQEXPr", t[t.jokerToSetItem = 1121] = "jokerToSetItem", t[t.blockGoldHammer = 1122] = "blockGoldHammer", t[t.exceptUpgrade = 1123] = "exceptUpgrade", t[t.onlyUpgrade = 1124] = "onlyUpgrade", t[t.noLookChange = 1125] = "noLookChange", t[t.tucIgnoreForPotential = 1126] = "tucIgnoreForPotential", t))(n || {});
19
+ class K {
22
20
  constructor() {
23
- this.itemID = 0, this.name = "", this.desc = "", this.icon = 0, this.origin = [0, 0], this.type = 0, this.req = new D(), this.props = /* @__PURE__ */ new Map(), this.options = /* @__PURE__ */ new Map(), this.totalUpgradeCount = 0, this.upgradeCount = 0, this.failCount = 0, this.hammerCount = 0, this.maxStar = 0, this.star = 0, this.amazing = !1, this.canPotential = !1, this.grade = S.normal, this.potentials = [], this.additionalGrade = S.normal, this.additionalPotentials = [];
21
+ this.level = 0, this.str = 0, this.luk = 0, this.dex = 0, this.int = 0, this.job = 0, this.specJob = 0;
24
22
  }
25
- option(t) {
26
- return this.options.has(t) || this.options.set(t, new A()), this.options.get(t);
23
+ }
24
+ var i = /* @__PURE__ */ ((t) => (t[t.cap = 100] = "cap", t[t.faceAccessory = 101] = "faceAccessory", t[t.eyeAccessory = 102] = "eyeAccessory", t[t.earrings = 103] = "earrings", t[t.coat = 104] = "coat", t[t.longcoat = 105] = "longcoat", t[t.pants = 106] = "pants", t[t.shoes = 107] = "shoes", t[t.glove = 108] = "glove", t[t.cape = 110] = "cape", t[t.ring = 111] = "ring", t[t.pendant = 112] = "pendant", t[t.belt = 113] = "belt", t[t.medal = 114] = "medal", t[t.shoulder = 115] = "shoulder", t[t.pocket = 116] = "pocket", t[t.badge = 118] = "badge", t[t.android = 166] = "android", t[t.machineHeart = 167] = "machineHeart", t[t.shield = 109] = "shield", t[t.emblem = 119] = "emblem", t[t.powerSource = 119020] = "powerSource", t[t.shiningRod = 1212] = "shiningRod", t[t.tuner = 1213] = "tuner", t[t.breathShooter = 1214] = "breathShooter", t[t.soulShooter = 122] = "soulShooter", t[t.desperado = 123] = "desperado", t[t.energySword = 124] = "energySword", t[t.espLimiter = 126] = "espLimiter", t[t.chain = 127] = "chain", t[t.magicGauntlet = 128] = "magicGauntlet", t[t.ritualFan = 129] = "ritualFan", t[t.ohSword = 130] = "ohSword", t[t.ohAxe = 131] = "ohAxe", t[t.ohBlunt = 132] = "ohBlunt", t[t.dagger = 133] = "dagger", t[t.katara = 134] = "katara", t[t.cane = 136] = "cane", t[t.wand = 137] = "wand", t[t.staff = 138] = "staff", t[t.thSword = 140] = "thSword", t[t.chakram = 1404] = "chakram", t[t.thAxe = 141] = "thAxe", t[t.thBlunt = 142] = "thBlunt", t[t.spear = 143] = "spear", t[t.polearm = 144] = "polearm", t[t.bow = 145] = "bow", t[t.crossbow = 146] = "crossbow", t[t.claw = 147] = "claw", t[t.knuckle = 148] = "knuckle", t[t.gun = 149] = "gun", t[t.shovel = 150] = "shovel", t[t.pickaxe = 151] = "pickaxe", t[t.dualBowguns = 152] = "dualBowguns", t[t.handCannon = 153] = "handCannon", t[t.heavySword = 156] = "heavySword", t[t.longSword = 157] = "longSword", t[t.gauntletRevolver = 158] = "gauntletRevolver", t[t.ancientBow = 159] = "ancientBow", t[t.soulShield = 1098] = "soulShield", t[t.demonShield = 1099] = "demonShield", t[t.magicArrow = 135200] = "magicArrow", t[t.card = 135210] = "card", t[t.medallion = 135220] = "medallion", t[t.rosary = 135221] = "rosary", t[t.ironChain = 135222] = "ironChain", t[t.magicBook1 = 135223] = "magicBook1", t[t.magicBook2 = 135224] = "magicBook2", t[t.magicBook3 = 135225] = "magicBook3", t[t.arrowFletching = 135226] = "arrowFletching", t[t.bowThimble = 135227] = "bowThimble", t[t.daggerScabbard = 135228] = "daggerScabbard", t[t.charm = 135229] = "charm", t[t.orb = 135240] = "orb", t[t.dragonEssence = 135250] = "dragonEssence", t[t.soulRing = 135260] = "soulRing", t[t.magnum = 135270] = "magnum", t[t.wristBand = 135290] = "wristBand", t[t.farSight = 135291] = "farSight", t[t.powderKeg = 135292] = "powderKeg", t[t.mass = 135293] = "mass", t[t.document = 135294] = "document", t[t.magicMarble = 135295] = "magicMarble", t[t.arrowhead = 135296] = "arrowhead", t[t.jewel = 135297] = "jewel", t[t.powderKeg2 = 135298] = "powderKeg2", t[t.controller = 135300] = "controller", t[t.foxMarble = 135310] = "foxMarble", t[t.chessPiece = 135320] = "chessPiece", t[t.transmitter = 135330] = "transmitter", t[t.charge = 135340] = "charge", t[t.magicWing = 135350] = "magicWing", t[t.pathOfAbyss = 135360] = "pathOfAbyss", t[t.relic = 135370] = "relic", t[t.fanTassel = 135380] = "fanTassel", t[t.bracelet = 135400] = "bracelet", t[t.weaponBelt = 135401] = "weaponBelt", t[t.ornament = 135402] = "ornament", t[t.hexSeeker = 135403] = "hexSeeker", t[t.petEquip = 180] = "petEquip", t[t.machineEngine = 161] = "machineEngine", t[t.machineArms = 162] = "machineArms", t[t.machineLegs = 163] = "machineLegs", t[t.machineBody = 164] = "machineBody", t[t.machineTransistors = 165] = "machineTransistors", t[t.dragonMask = 194] = "dragonMask", t[t.dragonPendant = 195] = "dragonPendant", t[t.dragonWings = 196] = "dragonWings", t[t.dragonTail = 197] = "dragonTail", t))(i || {}), U = /* @__PURE__ */ ((t) => (t[t.normal = 0] = "normal", t[t.rare = 1] = "rare", t[t.epic = 2] = "epic", t[t.unique = 3] = "unique", t[t.legendary = 4] = "legendary", t[t.special = 5] = "special", t))(U || {});
25
+ class g {
26
+ constructor() {
27
+ this.enchanted = !1, this.charge = 0, this.chargeOption = /* @__PURE__ */ new Map();
27
28
  }
28
- getPropValue(t) {
29
- return this.props.get(t) ?? 0;
29
+ }
30
+ class q {
31
+ constructor() {
32
+ this.name = "", this.skill = "", this.multiplier = 0, this.option = /* @__PURE__ */ new Map();
30
33
  }
31
- getBooleanValue(t) {
32
- return Boolean(this.props.get(t));
34
+ }
35
+ const v = class {
36
+ constructor() {
37
+ this.itemID = 0, this.name = "", this.desc = "", this.icon = 0, this.origin = [0, 0], this.type = 0, this.req = new K(), this.props = /* @__PURE__ */ new Map(), this.options = /* @__PURE__ */ new Map(), this.totalUpgradeCount = 0, this.upgradeCount = 0, this.upgradeFailCount = 0, this.hammerCount = 0, this.maxStar = 0, this.star = 0, this.amazing = !1, this.canPotential = !1, this.grade = U.normal, this.potentials = [], this.additionalGrade = U.normal, this.additionalPotentials = [], this.soulSlot = new g();
33
38
  }
34
- getMaxStar() {
35
- if (this.totalUpgradeCount <= 0 || this.getBooleanValue(c.onlyUpgrade) || o.isMechanicGear(this.type) || o.isDragonGear(this.type))
36
- return 0;
37
- let t;
38
- const n = this.req.level;
39
- for (const i of o.starData)
40
- if (n >= i[0])
41
- t = i;
42
- else
43
- break;
44
- return t === void 0 ? 0 : this.getBooleanValue(c.superiorEqp) ? t[2] : t[1];
39
+ /**
40
+ * 업그레이드 가능 횟수
41
+ */
42
+ get upgradeCountLeft() {
43
+ return this.totalUpgradeCount + this.hammerCount - this.upgradeCount - this.upgradeFailCount;
45
44
  }
45
+ /**
46
+ * 현재 옵션과 기본 옵션의 차이를 가중치를 포함하여 계산합니다.
47
+ * @returns 가중치가 적용된 옵션 차이의 합
48
+ */
46
49
  get diff() {
47
50
  let t = 0;
48
- for (const [n, i] of this.options)
49
- t += Math.floor(i.diff / o.getPropTypeWeight(n));
51
+ for (const [c, s] of this.options)
52
+ t += Math.floor(s.diff / v.getPropTypeWeight(c));
50
53
  return t;
51
54
  }
55
+ /**
56
+ * 장비 옵션을 반환합니다. 존재하지 않는 옵션은 장비에 추가됩니다.
57
+ * @param type 장비 옵션 종류
58
+ * @returns 장비 옵션 객체
59
+ */
60
+ option(t) {
61
+ return this.options.has(t) || this.options.set(t, new I()), this.options.get(t);
62
+ }
63
+ /**
64
+ * 장비 속성의 값을 반환합니다.
65
+ * @param type 장비 속성
66
+ * @returns 속성의 값; 존재하지 않을 경우 `0`
67
+ */
68
+ getPropValue(t) {
69
+ return this.props.get(t) ?? 0;
70
+ }
71
+ /**
72
+ * 장비 속성의 값을 `boolean` 형식으로 반환합니다.
73
+ * @param type 장비 속성
74
+ * @returns 속성이 존재하고 값이 `0` 이상일 경우 `true`; 아닐 경우 `false`
75
+ */
76
+ getBooleanValue(t) {
77
+ return Boolean(this.props.get(t));
78
+ }
79
+ /**
80
+ * 장비가 주무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara)는 포함되지 않습니다.
81
+ * @param type 장비 분류
82
+ * @returns 주무기일 경우 `true`; 아닐 경우 `false`
83
+ */
52
84
  static isWeapon(t) {
53
85
  return this.isLeftWeapon(t) || this.isDoubleHandWeapon(t);
54
86
  }
87
+ /**
88
+ * 장비가 한손무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara)는 포함되지 않습니다.
89
+ * @param type 장비 분류
90
+ * @returns 한손무기일 경우 `true`; 아닐 경우 `false`
91
+ */
55
92
  static isLeftWeapon(t) {
56
- return t >= 121 && t <= 139 && t !== l.katara || Math.floor(t / 10) === 121;
93
+ return t >= 121 && t <= 139 && t !== i.katara || Math.floor(t / 10) === 121;
57
94
  }
95
+ /**
96
+ * 장비가 두손무기인지 여부를 나타내는 `boolean`값을 반환합니다.
97
+ * @param type 장비 분류
98
+ * @returns 두손무기일 경우 `true`; 아닐 경우 `false`
99
+ */
58
100
  static isDoubleHandWeapon(t) {
59
101
  return t >= 140 && t <= 149 || t >= 152 && t <= 159 || Math.floor(t / 10) === 140;
60
102
  }
103
+ /**
104
+ * 장비가 보조무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara), 방패류가 포함됩니다.
105
+ * @param type 장비 분류
106
+ * @returns 보조무기일 경우 `true`; 아닐 경우 `false`
107
+ */
61
108
  static isSubWeapon(t) {
62
109
  switch (t) {
63
- case l.katara:
64
- case l.shield:
65
- case l.demonShield:
66
- case l.soulShield:
110
+ case i.katara:
111
+ case i.shield:
112
+ case i.demonShield:
113
+ case i.soulShield:
67
114
  return !0;
68
115
  default:
69
116
  return Math.floor(t / 1e3) === 135;
70
117
  }
71
118
  }
119
+ /**
120
+ * 장비가 방패인지 여부를 나타내는 `boolean`값을 반환합니다.
121
+ * @param type 장비 분류
122
+ * @returns 방패일 경우 `true`; 아닐 경우 `false`
123
+ */
72
124
  static isShield(t) {
73
125
  switch (t) {
74
- case l.shield:
75
- case l.demonShield:
76
- case l.soulShield:
126
+ case i.shield:
127
+ case i.demonShield:
128
+ case i.soulShield:
77
129
  return !0;
78
130
  default:
79
131
  return !1;
80
132
  }
81
133
  }
134
+ /**
135
+ * 장비가 방어구인지 여부를 나타내는 `boolean`값을 반환합니다. 방패가 포함됩니다.
136
+ * @param type 장비 분류
137
+ * @returns 방어구일 경우 `true`; 아닐 경우 `false`
138
+ */
82
139
  static isArmor(t) {
83
140
  return t === 100 || t >= 104 && t <= 110;
84
141
  }
142
+ /**
143
+ * 장비가 장신구인지 여부를 나타내는 `boolean`값을 반환합니다.
144
+ * @param type 장비 분류
145
+ * @returns 장신구일 경우 `true`; 아닐 경우 `false`
146
+ */
85
147
  static isAccessory(t) {
86
148
  return t >= 101 && t <= 103 || t >= 111 && t <= 113 || t === 115;
87
149
  }
150
+ /**
151
+ * 장비가 메카닉 장비인지 여부를 나타내는 `boolean`값을 반환합니다.
152
+ * @param type 장비 분류
153
+ * @returns 메카닉 장비일 경우 `true`; 아닐 경우 `false`
154
+ */
88
155
  static isMechanicGear(t) {
89
156
  return t >= 161 && t <= 165;
90
157
  }
158
+ /**
159
+ * 장비가 에반 드래곤 장비인지 여부를 나타내는 `boolean`값을 반환합니다.
160
+ * @param type 장비 분류
161
+ * @returns 에반 드래곤 장비일 경우 `true`; 아닐 경우 `false`
162
+ */
91
163
  static isDragonGear(t) {
92
164
  return t >= 194 && t <= 197;
93
165
  }
94
166
  static specialCanPotential(t) {
95
167
  switch (t) {
96
- case l.soulShield:
97
- case l.demonShield:
98
- case l.katara:
99
- case l.magicArrow:
100
- case l.card:
101
- case l.orb:
102
- case l.dragonEssence:
103
- case l.soulRing:
104
- case l.magnum:
105
- case l.emblem:
168
+ case i.soulShield:
169
+ case i.demonShield:
170
+ case i.katara:
171
+ case i.magicArrow:
172
+ case i.card:
173
+ case i.orb:
174
+ case i.dragonEssence:
175
+ case i.soulRing:
176
+ case i.magnum:
177
+ case i.emblem:
106
178
  return !0;
107
179
  default:
108
180
  return !1;
109
181
  }
110
182
  }
183
+ /**
184
+ * 장비 ID로부터 장비 분류를 계산합니다.
185
+ * @param gearID 장비 ID
186
+ * @returns 장비 분류
187
+ */
111
188
  static getGearType(t) {
112
189
  switch (Math.floor(t / 1e3)) {
113
190
  case 1098:
114
- return l.soulShield;
191
+ return i.soulShield;
115
192
  case 1099:
116
- return l.demonShield;
193
+ return i.demonShield;
117
194
  case 1212:
118
- return l.shiningRod;
195
+ return i.shiningRod;
119
196
  case 1213:
120
- return l.tuner;
197
+ return i.tuner;
121
198
  case 1214:
122
- return l.breathShooter;
199
+ return i.breathShooter;
123
200
  case 1404:
124
- return l.chakram;
201
+ return i.chakram;
125
202
  }
126
203
  if (Math.floor(t / 1e4) === 135)
127
204
  switch (Math.floor(t / 100)) {
@@ -142,41 +219,54 @@ const o = class {
142
219
  }
143
220
  static GetGender(t) {
144
221
  switch (this.getGearType(t)) {
145
- case l.emblem:
146
- case l.powerSource:
222
+ case i.emblem:
223
+ case i.powerSource:
147
224
  return 2;
148
225
  }
149
226
  return Math.floor(t / 1e3) % 10;
150
227
  }
228
+ /**
229
+ * 장비의 최대 강화 수치를 계산합니다.
230
+ * @param gear 장비
231
+ * @returns 최대 장비 강화 수치
232
+ */
233
+ static getMaxStar(t) {
234
+ if (t.totalUpgradeCount <= 0 || t.getBooleanValue(n.onlyUpgrade) || v.isMechanicGear(t.type) || v.isDragonGear(t.type))
235
+ return 0;
236
+ let c;
237
+ const s = t.req.level;
238
+ for (const o of v.starData)
239
+ if (s >= o[0])
240
+ c = o;
241
+ else
242
+ break;
243
+ return c === void 0 ? 0 : t.getBooleanValue(n.superiorEqp) ? c[2] : c[1];
244
+ }
151
245
  static getPropTypeWeight(t) {
152
246
  if (t < 100)
153
247
  switch (t) {
154
- case c.incSTR:
155
- case c.incDEX:
156
- case c.incINT:
157
- case c.incLUK:
158
- case c.incPAD:
159
- case c.incMAD:
160
- case c.incSpeed:
161
- case c.incJump:
248
+ case n.incSTR:
249
+ case n.incDEX:
250
+ case n.incINT:
251
+ case n.incLUK:
252
+ case n.incPAD:
253
+ case n.incMAD:
254
+ case n.incSpeed:
255
+ case n.incJump:
162
256
  return 1;
163
- case c.incMHP:
164
- case c.incMMP:
257
+ case n.incMHP:
258
+ case n.incMMP:
165
259
  return 100;
166
- case c.incPDD_incMDD:
167
- case c.incPDD:
260
+ case n.incPDD:
168
261
  return 10;
169
- case c.incPAD_incMAD:
170
- case c.incAD:
262
+ case n.incAD:
171
263
  return 2;
172
- case c.incMHP_incMMP:
173
- return 200;
174
264
  }
175
265
  return Number.MAX_VALUE;
176
266
  }
177
267
  };
178
- let d = o;
179
- d.starData = [
268
+ let M = v;
269
+ M.starData = [
180
270
  [0, 5, 3],
181
271
  [95, 8, 5],
182
272
  [110, 10, 8],
@@ -184,528 +274,915 @@ d.starData = [
184
274
  [130, 20, 12],
185
275
  [140, 25, 15]
186
276
  ];
187
- class k {
277
+ class C {
188
278
  constructor() {
189
279
  this.code = 0, this.optionType = 0, this.reqLevel = 0, this.summary = "", this.option = /* @__PURE__ */ new Map();
190
280
  }
281
+ /**
282
+ * 장비에 표시되는 문자열
283
+ */
191
284
  get convertSummary() {
192
- const n = [...this.option.keys()];
193
- n.sort((a, m) => c[m].length - c[a].length);
194
- let i = this.summary;
195
- for (const a of n)
196
- i = i.replace(
197
- `#${c[a]}`,
198
- (this.option.get(a) ?? 0).toString()
285
+ const c = [...this.option.keys()];
286
+ c.sort((o, a) => n[a].length - n[o].length);
287
+ let s = this.summary;
288
+ for (const o of c)
289
+ s = s.replace(
290
+ `#${n[o]}`,
291
+ (this.option.get(o) ?? 0).toString()
199
292
  );
200
- return i;
293
+ return s;
201
294
  }
202
- static getPotentialLevel(n) {
203
- return n <= 0 ? 1 : n >= 200 ? 20 : Math.floor((n + 9) / 10);
295
+ /**
296
+ * 장비의 착용 가능 레벨로부터 잠재옵션의 레벨을 계산합니다.
297
+ * @param gearReqLevel 장비의 착용 가능 레벨
298
+ * @returns 잠재옵션 레벨 (1~20)
299
+ */
300
+ static getPotentialLevel(c) {
301
+ return c <= 0 ? 1 : c >= 200 ? 20 : Math.floor((c + 9) / 10);
204
302
  }
205
- static checkOptionType(n, i) {
206
- switch (n) {
303
+ /**
304
+ * 잠재옵션 분류와 장비 분류를 비교합니다.
305
+ * @param optionType 잠재옵션 분류
306
+ * @param gearType 장비 분류
307
+ * @returns 잠재옵션 분류가 장비 분류에 적용 가능한 경우 `true`; 아닌 경우 `false`
308
+ */
309
+ static checkOptionType(c, s) {
310
+ switch (c) {
207
311
  case 0:
208
312
  return !0;
209
313
  case 10:
210
- return d.isWeapon(i) || d.isSubWeapon(i) || i === l.emblem;
314
+ return M.isWeapon(s) || M.isSubWeapon(s) || s === i.emblem;
211
315
  case 11:
212
- return !k.checkOptionType(10, i);
316
+ return !C.checkOptionType(10, s);
213
317
  case 20:
214
- return d.isSubWeapon(i) || i === l.pants || i === l.shoes || i === l.cap || i === l.coat || i === l.longcoat || i === l.glove || i === l.cape || i === l.belt || i === l.shoulder;
318
+ return M.isSubWeapon(s) || s === i.cap || s === i.coat || s === i.longcoat || s === i.pants || s === i.shoes || s === i.glove || s === i.cape || s === i.belt || s === i.shoulder;
215
319
  case 40:
216
- return i === l.faceAccessory || i === l.eyeAccessory || i === l.ring || i === l.earrings || i === l.pendant;
320
+ return s === i.faceAccessory || s === i.eyeAccessory || s === i.earrings || s === i.ring || s === i.pendant;
217
321
  case 51:
218
- return i === l.cap;
322
+ return s === i.cap;
219
323
  case 52:
220
- return i === l.coat || i === l.longcoat;
324
+ return s === i.coat || s === i.longcoat;
221
325
  case 53:
222
- return i === l.pants;
326
+ return s === i.pants;
223
327
  case 54:
224
- return i === l.glove;
328
+ return s === i.glove;
225
329
  case 55:
226
- return i === l.shoes;
330
+ return s === i.shoes;
227
331
  default:
228
332
  return !1;
229
333
  }
230
334
  }
231
335
  }
232
- var s = /* @__PURE__ */ ((t) => (t.EX_PAD = "위대한 (공격력)", t.EX_MAD = "위대한 (마력)", t.EX_ALL = "위대한 (올스탯)", t.EX_MHP = "위대한 (최대 HP)", t.EX_CR = "위대한 (크리티컬 확률)", t.EX_IMD = "위대한 (몬스터 방어율 무시)", t.EX_BD = "위대한 (보스 몬스터 공격 데미지)", t.EX_AS = "위대한 (모든 스킬레벨)", t.STR = "기운찬", t.DEX = "날렵한", t.INT = "총명한", t.LUK = "놀라운", t.ALL = "화려한", t.PAD = "강력한", t.MAD = "빛나는", t.MHP = "강인한", t.MMP = "풍부한", t))(s || {});
233
- class M {
234
- constructor() {
235
- this.charge = 0, this.mobName = "", this.soulName = "", this.skillName = "", this.optionString = "", this.option = /* @__PURE__ */ new Map();
236
- }
237
- isEmpty() {
238
- return this.soulName === "";
336
+ var u = /* @__PURE__ */ ((t) => (t[t.STR = 0] = "STR", t[t.DEX = 1] = "DEX", t[t.INT = 2] = "INT", t[t.LUK = 3] = "LUK", t[t.STR_DEX = 4] = "STR_DEX", t[t.STR_INT = 5] = "STR_INT", t[t.STR_LUK = 6] = "STR_LUK", t[t.DEX_INT = 7] = "DEX_INT", t[t.DEX_LUK = 8] = "DEX_LUK", t[t.INT_LUK = 9] = "INT_LUK", t[t.PDD = 10] = "PDD", t[t.PAD = 11] = "PAD", t[t.MAD = 12] = "MAD", t[t.MHP = 13] = "MHP", t[t.MMP = 14] = "MMP", t[t.speed = 15] = "speed", t[t.jump = 16] = "jump", t[t.damR = 17] = "damR", t[t.bdR = 18] = "bdR", t[t.allStatR = 19] = "allStatR", t[t.reduceReq = 20] = "reduceReq", t))(u || {});
337
+ class X {
338
+ /**
339
+ * 장비에 1개의 추가옵션을 추가합니다. 기존에 부여된 추가옵션에 더해집니다.
340
+ * @param gear 추가옵션을 추가할 장비
341
+ * @param type 추가옵션 스탯 종류
342
+ * @param grade 추가옵션 등급; 1~7의 정수
343
+ * @returns 추가옵션 부여애 성공했을 경우 `true`; 아닐 경우 `false`
344
+ */
345
+ addBonusStat(c, s, o) {
346
+ const a = this.getBonusStatOption(c, s, o);
347
+ if (a.size === 0)
348
+ return !1;
349
+ for (const [h, e] of a)
350
+ c.option(h).bonus += e;
351
+ return !0;
239
352
  }
240
- get chargeAD() {
241
- return this.isEmpty() ? Math.floor(Math.min(500, this.charge) / 100) * 2 : u.getSoulGrade(this.mobName) <= 6 ? Math.floor(Math.min(500, this.charge) / 100) * 4 : Math.floor(Math.min(500, this.charge) / 100) * 3;
353
+ /**
354
+ * 장비에 적용된 추가옵션을 초기화합니다.
355
+ * @param gear 추가옵션을 초기화할 장비
356
+ * @returns 추가옵션 초기화에 성공했을 경우 `true`; 아닐 경우 `false`
357
+ */
358
+ resetBonusStat(c) {
359
+ for (const [, s] of c.options)
360
+ s.bonus = 0;
361
+ return !0;
242
362
  }
243
- static createFromName(n, i) {
244
- const a = new M();
245
- a.mobName = n, a.soulName = u.getSoulName(n, i), a.skillName = u.getSkillName(n, i);
246
- const { option: m, optionString: g } = u.getSoulOption(
247
- n,
248
- i
249
- );
250
- return a.option = m, a.optionString = g, a;
363
+ getBonusStatOption(c, s, o) {
364
+ const a = X.getGearPropType(s), h = this.getBonusStatValue(c, s, o);
365
+ return h === 0 ? /* @__PURE__ */ new Map() : new Map(a.map((e) => [e, h]));
251
366
  }
252
- }
253
- class u {
254
- static getSoulGrade(n) {
255
- return h[n].grade;
256
- }
257
- static hasPostfix(n) {
258
- return h[n].namePostfix;
259
- }
260
- static isGreatType(n) {
261
- return n === s.EX_PAD || n === s.EX_MAD || n === s.EX_ALL || n === s.EX_MHP || n === s.EX_CR || n === s.EX_IMD || n === s.EX_BD || n === s.EX_AS;
262
- }
263
- static getSoulName(n, i) {
264
- let a;
265
- u.isGreatType(i) ? a = "위대한" : a = i;
266
- let m;
267
- return u.hasPostfix(n) ? m = "의" : m = "", a + " " + n + m + " 소울";
268
- }
269
- static getSkillName(n, i) {
270
- return this.isGreatType(i) ? h[n].greatSkillName : h[n].normalSkillName;
271
- }
272
- static getSoulOption(n, i) {
273
- const a = /* @__PURE__ */ new Map(), m = this.getSoulOptionType(n, i), g = this.getSoulOptionValue(n, i), f = this.getSoulOptionString(m, g);
274
- return a.set(m, g), { option: a, optionString: f };
275
- }
276
- static getSoulOptionType(n, i) {
277
- const a = this.getSoulGrade(n) === 1;
278
- switch (i) {
279
- case s.EX_PAD:
280
- return a ? c.incPADr : c.incPAD;
281
- case s.EX_MAD:
282
- return a ? c.incMADr : c.incMAD;
283
- case s.EX_ALL:
284
- return a ? c.statR : c.incAllStat;
285
- case s.EX_MHP:
286
- return c.incMHP;
287
- case s.EX_CR:
288
- return c.incCr;
289
- case s.EX_IMD:
290
- return c.imdR;
291
- case s.EX_BD:
292
- return c.bdR;
293
- case s.EX_AS:
294
- return c.incAllskill;
295
- case s.STR:
296
- return c.incSTR;
297
- case s.DEX:
298
- return c.incDEX;
299
- case s.INT:
300
- return c.incINT;
301
- case s.LUK:
302
- return c.incLUK;
303
- case s.ALL:
304
- return c.incAllStat;
305
- case s.PAD:
306
- return c.incPAD;
307
- case s.MAD:
308
- return c.incMAD;
309
- case s.MHP:
310
- return c.incMHP;
311
- case s.MMP:
312
- return c.incMMP;
367
+ getBonusStatValue(c, s, o) {
368
+ const a = c.req.level, h = c.getBooleanValue(n.bossReward), e = c.type;
369
+ if (a < 0 || h && o < 3)
370
+ return 0;
371
+ switch (s) {
372
+ case u.STR:
373
+ case u.DEX:
374
+ case u.INT:
375
+ case u.LUK:
376
+ return (Math.floor(a / 20) + 1) * o;
377
+ case u.STR_DEX:
378
+ case u.STR_INT:
379
+ case u.STR_LUK:
380
+ case u.DEX_INT:
381
+ case u.DEX_LUK:
382
+ case u.INT_LUK:
383
+ return (Math.floor(a / 40) + 1) * o;
384
+ case u.PDD:
385
+ return (Math.floor(a / 20) + 1) * o;
386
+ case u.PAD:
387
+ case u.MAD:
388
+ if (M.isWeapon(e)) {
389
+ const r = h ? [0, 0, 1, 1.4666, 2.0166, 2.663, 3.4166] : [1, 2.222, 3.63, 5.325, 7.32, 8.777, 10.25];
390
+ let l = c.option(n.incPAD).base;
391
+ if (e === i.heavySword || e === i.longSword) {
392
+ if (e === i.longSword)
393
+ switch (l) {
394
+ case 100:
395
+ l = 102;
396
+ break;
397
+ case 103:
398
+ l = 105;
399
+ break;
400
+ case 105:
401
+ l = 107;
402
+ break;
403
+ case 112:
404
+ l = 114;
405
+ break;
406
+ case 117:
407
+ l = 121;
408
+ break;
409
+ case 135:
410
+ l = 139;
411
+ break;
412
+ case 169:
413
+ l = 173;
414
+ break;
415
+ case 203:
416
+ l = 207;
417
+ break;
418
+ case 293:
419
+ l = 297;
420
+ break;
421
+ case 337:
422
+ l = 342;
423
+ break;
424
+ }
425
+ const f = a > 180 ? 6 : a > 160 ? 5 : a > 110 ? 4 : 3;
426
+ return Math.ceil(l * r[o - 1] * f / 100);
427
+ } else {
428
+ const f = c.option(n.incMAD).base;
429
+ if (s === u.MAD && f >= l && (l = f), h) {
430
+ const m = a > 160 ? 18 : a > 150 ? 15 : a > 110 ? 12 : 9;
431
+ return Math.ceil(l * r[o - 1] * m / 100);
432
+ } else {
433
+ const m = a > 110 ? 4 : 3;
434
+ return Math.ceil(l * r[o - 1] * m / 100);
435
+ }
436
+ }
437
+ } else if (a < 60)
438
+ return 0;
439
+ return o;
440
+ case u.MHP:
441
+ case u.MMP:
442
+ return Math.floor(a / 10) * 30 * o;
443
+ case u.speed:
444
+ case u.jump:
445
+ return M.isWeapon(e) ? 0 : o;
446
+ case u.damR:
447
+ return M.isWeapon(e) ? o : 0;
448
+ case u.bdR:
449
+ return a < 90 || !M.isWeapon(e) ? 0 : 2 * o;
450
+ case u.allStatR:
451
+ return a < 70 && !M.isWeapon(e) ? 0 : o;
452
+ case u.reduceReq:
453
+ return Math.min(5 * o, a);
313
454
  default:
314
- throw Error();
455
+ return 0;
315
456
  }
316
457
  }
317
- static getSoulOptionString(n, i) {
318
- switch (n) {
319
- case c.incSTR:
320
- return `STR : +${i}`;
321
- case c.incDEX:
322
- return `DEX : +${i}`;
323
- case c.incINT:
324
- return `INT : +${i}`;
325
- case c.incLUK:
326
- return `LUK : +${i}`;
327
- case c.incAllStat:
328
- return `올스탯 : +${i}`;
329
- case c.statR:
330
- return `올스탯 : +${i}%`;
331
- case c.incMHP:
332
- return `최대 HP : +${i}`;
333
- case c.incMMP:
334
- return `최대 MP : +${i}`;
335
- case c.incPAD:
336
- return `공격력 : +${i}`;
337
- case c.incPADr:
338
- return `공격력 : +${i}%`;
339
- case c.incMAD:
340
- return `마력 : +${i}`;
341
- case c.incMADr:
342
- return `마력 : +${i}%`;
343
- case c.imdR:
344
- return `몬스터 방어율 무시 : +${i}%`;
345
- case c.bdR:
346
- return `보스 몬스터 공격 시 데미지 : +${i}%`;
347
- case c.incCr:
348
- return `크리티컬 확률 : +${i}%`;
349
- case c.incAllskill:
350
- return `모든 스킬레벨 : +${i}(5차 제외, 스킬의 마스터 레벨까지만 증가)`;
458
+ static getGearPropType(c) {
459
+ switch (c) {
460
+ case u.STR:
461
+ return [n.incSTR];
462
+ case u.DEX:
463
+ return [n.incDEX];
464
+ case u.INT:
465
+ return [n.incINT];
466
+ case u.LUK:
467
+ return [n.incLUK];
468
+ case u.STR_DEX:
469
+ return [n.incSTR, n.incDEX];
470
+ case u.STR_INT:
471
+ return [n.incSTR, n.incINT];
472
+ case u.STR_LUK:
473
+ return [n.incSTR, n.incLUK];
474
+ case u.DEX_INT:
475
+ return [n.incDEX, n.incINT];
476
+ case u.DEX_LUK:
477
+ return [n.incDEX, n.incLUK];
478
+ case u.INT_LUK:
479
+ return [n.incINT, n.incLUK];
480
+ case u.PDD:
481
+ return [n.incPDD];
482
+ case u.PAD:
483
+ return [n.incPAD];
484
+ case u.MAD:
485
+ return [n.incMAD];
486
+ case u.MHP:
487
+ return [n.incMHP];
488
+ case u.MMP:
489
+ return [n.incMMP];
490
+ case u.speed:
491
+ return [n.incSpeed];
492
+ case u.jump:
493
+ return [n.incJump];
494
+ case u.damR:
495
+ return [n.damR];
496
+ case u.bdR:
497
+ return [n.bdR];
498
+ case u.allStatR:
499
+ return [n.statR];
500
+ case u.reduceReq:
501
+ return [n.reduceReq];
351
502
  default:
352
- return "";
503
+ return [];
353
504
  }
354
505
  }
355
- static getSoulOptionValue(n, i) {
356
- if (this.isGreatType(i)) {
357
- if (n === "모카딘" && i === s.EX_PAD || n === "카리아인" && i === s.EX_MAD)
358
- return 10;
359
- if (n === "줄라이" && i === s.EX_MHP)
360
- return 1500;
361
- if (n === "CQ57" && i === s.EX_CR)
362
- return 10;
363
- if (n === "플레드" && i === s.EX_ALL)
364
- return 20;
365
- let a = this.getSoulGrade(n);
366
- a === 4 && n !== "반 레온" && (a = 3);
367
- let m;
368
- switch (i) {
369
- case s.EX_PAD:
370
- m = 0;
371
- break;
372
- case s.EX_MAD:
373
- m = 0;
506
+ }
507
+ const D = class {
508
+ /**
509
+ * 장비에 스타포스 강화를 1회 적용합니다.
510
+ * - 업그레이드가 완료되지 않은 장비, 놀라운 장비강화 주문서가 적용된 장비에도 적용됩니다.
511
+ * @param gear 강화를 적용할 장비
512
+ * @param ignoreMaxStar 장비의 최대 강화 수치를 초과하여 강화하는지 여부
513
+ * - 슈페리얼 장비는 최대 강화 수치를 초과할 수 없음
514
+ * @returns 성공했을 경우 `true`; 아닐 경우 `false`
515
+ */
516
+ addStarforce(t, c = !1) {
517
+ if (t.getBooleanValue(n.incCHUC))
518
+ return !1;
519
+ if (t.getBooleanValue(n.superiorEqp))
520
+ return this.addSuperiorStarforce(t);
521
+ if (t.star >= t.maxStar && !c || t.star >= D.MAX_STARFORCE)
522
+ return !1;
523
+ t.star += 1;
524
+ const s = t.star, o = D.getStatData(t, !1, !1), a = D.getStatData(t, !1, !0), h = M.isWeapon(t.type) || t.type === i.katara, e = [
525
+ [n.incSTR, n.incDEX],
526
+ [n.incINT, n.incLUK],
527
+ [n.incDEX, n.incSTR],
528
+ [n.incLUK, n.incDEX],
529
+ [n.incSTR, n.incDEX]
530
+ ], r = [
531
+ n.incSTR,
532
+ n.incDEX,
533
+ n.incINT,
534
+ n.incLUK
535
+ ];
536
+ let l;
537
+ const f = t.req.job;
538
+ if (f === 0)
539
+ l = /* @__PURE__ */ new Set([
540
+ n.incSTR,
541
+ n.incDEX,
542
+ n.incINT,
543
+ n.incLUK
544
+ ]);
545
+ else {
546
+ l = /* @__PURE__ */ new Set();
547
+ for (let d = 0; d < 5; d++)
548
+ if (f & 1 << d)
549
+ for (const A of e[d])
550
+ l.add(A);
551
+ }
552
+ for (const d of r)
553
+ (l.has(d) || s > 15 && (t.option(d).base > 0 || t.option(d).upgrade > 0)) && (t.option(d).enchant += o[s]);
554
+ if (h) {
555
+ const d = f === 0 || Math.floor(f / 2) % 2 === 1 || t.option(n.incMAD).upgrade > 0;
556
+ if (s > 15)
557
+ t.option(n.incPAD).enchant += a[s], d && (t.option(n.incMAD).enchant += a[s]);
558
+ else {
559
+ const A = t.option(n.incPAD).sum - t.option(n.incPAD).bonus;
560
+ if (t.option(n.incPAD).enchant += Math.floor(A / 50) + 1, d) {
561
+ const S = t.option(n.incMAD).sum - t.option(n.incMAD).bonus;
562
+ t.option(n.incMAD).enchant += Math.floor(S / 50) + 1;
563
+ }
564
+ }
565
+ } else
566
+ t.option(n.incPAD).enchant += a[s], t.option(n.incMAD).enchant += a[s], t.type === i.glove && (f === 0 ? (t.option(n.incPAD).enchant += D.starforceGloveBonusAttData[s], t.option(n.incMAD).enchant += D.starforceGloveBonusAttData[s]) : Math.floor(f / 2) % 2 === 1 ? t.option(n.incMAD).enchant += D.starforceGloveBonusAttData[s] : t.option(n.incPAD).enchant += D.starforceGloveBonusAttData[s]);
567
+ if (!h && t.type !== i.machineHeart) {
568
+ const d = t.option(n.incPDD).sum - t.option(n.incPDD).bonus;
569
+ t.option(n.incPDD).enchant += Math.floor(d / 20) + 1;
570
+ }
571
+ const m = [
572
+ i.cap,
573
+ i.coat,
574
+ i.longcoat,
575
+ i.pants,
576
+ i.cape,
577
+ i.ring,
578
+ i.pendant,
579
+ i.belt,
580
+ i.shoulder,
581
+ i.shield
582
+ ];
583
+ return h ? (t.option(n.incMHP).enchant += D.starforceMhpData[s], t.option(n.incMMP).enchant += D.starforceMhpData[s]) : m.includes(t.type) && (t.option(n.incMHP).enchant += D.starforceMhpData[s]), t.type === i.shoes && (t.option(n.incSpeed).enchant += D.starforceSpeedJumpData[s], t.option(n.incJump).enchant += D.starforceSpeedJumpData[s]), !0;
584
+ }
585
+ /**
586
+ * 슈페리얼 장비에 스타포스 강화를 1회 적용합니다.
587
+ */
588
+ addSuperiorStarforce(t) {
589
+ if (t.star >= t.maxStar)
590
+ return !1;
591
+ t.star += 1;
592
+ const c = t.star, s = D.getStatData(t, !1, !1), o = D.getStatData(t, !1, !0), a = [
593
+ n.incSTR,
594
+ n.incDEX,
595
+ n.incINT,
596
+ n.incLUK
597
+ ];
598
+ for (const r of a)
599
+ t.option(r).base > 0 && (t.option(r).enchant += s[c]);
600
+ const h = [n.incPAD, n.incMAD];
601
+ for (const r of h)
602
+ t.option(r).base > 0 && (t.option(r).enchant += o[c]);
603
+ const e = t.option(n.incPDD).sum - t.option(n.incPDD).bonus;
604
+ return t.option(n.incPDD).enchant += Math.floor(e / 20) + 1, !0;
605
+ }
606
+ /**
607
+ * 장비에 놀라운 장비강화 주문서를 1회 적용합니다.
608
+ *
609
+ * 스타포스가 적용된 장비에도 사용 가능합니다. 슈페리얼 장비에는 적용되지 않습니다.
610
+ * @param gear 강화를 적용할 장비
611
+ * @param ignoreMaxStar 장비의 최대 강화 수치 초과로 강화하는 지 여부
612
+ * - ex) 착용 제한 레벨이 100인 장비는 최대 강화 수치가 8성이지만 `ignoreMaxStar`가 `true`일 경우 15성까지 강화 가능
613
+ * @param bonus 보너스 스탯 적용 여부
614
+ * - 방어구(방패 제외): 최대 HP +50
615
+ * - 장신구: 올스탯 +1~2
616
+ * - 주무기, 블레이드, 방패: 공격력, 마력 +1
617
+ * @returns 성공했을 경우 `true`; 아닐 경우 `false`
618
+ */
619
+ addAmazingEnhancement(t, c = !1, s = !1) {
620
+ if (t.getBooleanValue(n.incCHUC) || t.getBooleanValue(n.superiorEqp) || t.star >= t.maxStar && !s || t.star >= D.MAX_AMAZING)
621
+ return !1;
622
+ t.amazing || (t.amazing = !0, t.maxStar = Math.min(t.maxStar, D.MAX_AMAZING)), t.star += 1;
623
+ const o = t.star, a = D.getStatData(t, !0, !1), h = D.getStatData(t, !0, !0), e = M.isWeapon(t.type) || t.type === i.katara, r = [
624
+ n.incSTR,
625
+ n.incDEX,
626
+ n.incINT,
627
+ n.incLUK
628
+ ];
629
+ for (const m of r)
630
+ if (t.option(m).sum > 0) {
631
+ let A = a[o];
632
+ c && M.isAccessory(t.type) && (A += o > 5 ? 2 : 1), t.option(m).enchant += A;
633
+ }
634
+ const l = [n.incPAD, n.incMAD];
635
+ for (const m of l) {
636
+ const d = t.option(m).sum;
637
+ if (d > 0) {
638
+ e && (t.option(m).enchant += Math.floor(d / 50) + 1);
639
+ let A = h[o];
640
+ c && (e || t.type === i.shield) && (A += 1), t.option(m).enchant += A;
641
+ }
642
+ }
643
+ c && M.isArmor(t.type) && (t.option(n.incMHP).enchant += 50);
644
+ const f = t.option(n.incPDD).sum;
645
+ return t.option(n.incPDD).enchant += Math.floor(f / 20) + 1, !0;
646
+ }
647
+ /**
648
+ * 장비 강화를 초기화합니다.
649
+ * @param 강화를 초기화할 장비
650
+ * @returns 성공했을 경우 `true`; 아닐 경우 `false`
651
+ */
652
+ resetEnhancement(t) {
653
+ if (t.getBooleanValue(n.incCHUC))
654
+ return !1;
655
+ t.star = 0, t.amazing = !1, t.maxStar = M.getMaxStar(t);
656
+ for (const [, c] of t.options)
657
+ c.enchant = 0;
658
+ return !0;
659
+ }
660
+ /**
661
+ * 스타포스 강화로 오르는 스탯을 다시 계산합니다.
662
+ *
663
+ * 놀라운 장비강화 주문서가 적용된 장비에는 적용되지 않습니다.
664
+ * @param 스탯을 다시 계산할 장비
665
+ * @returns 성공했을 경우 `true`; 아닐 경우 `false`
666
+ */
667
+ recalculate(t) {
668
+ if (t.getBooleanValue(n.incCHUC) || t.amazing)
669
+ return !1;
670
+ const c = t.star;
671
+ this.resetEnhancement(t);
672
+ for (let s = 0; s < c; s++)
673
+ this.addStarforce(t, !0);
674
+ return !0;
675
+ }
676
+ static getStatData(t, c, s) {
677
+ let o;
678
+ t.getBooleanValue(n.superiorEqp) ? s ? o = this.superiorAttData : o = this.superiorStatData : c ? s ? o = this.amazingAttData : o = this.amazingStatData : s ? M.isWeapon(t.type) || t.type === i.katara ? o = this.starforceWeaponAttData : o = this.starforceAttData : o = this.starforceStatData;
679
+ const a = t.req.level;
680
+ for (const h of [...o].reverse())
681
+ if (a >= h[0])
682
+ return h;
683
+ throw Error(`Gear has invalid reqLevel.
684
+ ` + t);
685
+ }
686
+ /* eslint-enable prettier/prettier */
687
+ };
688
+ let R = D;
689
+ R.MAX_STARFORCE = 25;
690
+ R.MAX_AMAZING = 15;
691
+ R.superiorAttData = [
692
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
693
+ [110, 0, 0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0],
694
+ [150, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 15, 17, 19, 21, 23]
695
+ ];
696
+ R.superiorStatData = [
697
+ [0, 1, 2, 4, 7, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
698
+ [80, 2, 3, 5, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
699
+ [110, 9, 10, 12, 15, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
700
+ [150, 19, 20, 22, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
701
+ ];
702
+ R.starforceWeaponAttData = [
703
+ [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],
704
+ [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],
705
+ [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],
706
+ [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],
707
+ [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],
708
+ [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],
709
+ [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],
710
+ [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],
711
+ [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]
712
+ ];
713
+ R.starforceAttData = [
714
+ [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],
715
+ [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],
716
+ [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],
717
+ [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],
718
+ [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],
719
+ [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],
720
+ [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],
721
+ [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],
722
+ [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]
723
+ ];
724
+ R.starforceStatData = [
725
+ [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],
726
+ [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],
727
+ [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],
728
+ [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],
729
+ [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],
730
+ [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],
731
+ [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],
732
+ [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],
733
+ [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]
734
+ ];
735
+ R.amazingAttData = [
736
+ [0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14],
737
+ [80, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15],
738
+ [90, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16],
739
+ [100, 0, 0, 0, 0, 0, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17],
740
+ [110, 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18],
741
+ [120, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19],
742
+ [130, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20],
743
+ [140, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 13, 15, 17, 19, 21],
744
+ [150, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22]
745
+ ];
746
+ R.amazingStatData = [
747
+ [0, 1, 2, 4, 7, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
748
+ [80, 2, 3, 5, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
749
+ [85, 3, 4, 6, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
750
+ [90, 4, 5, 7, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
751
+ [95, 5, 6, 8, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
752
+ [100, 7, 8, 10, 13, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
753
+ [105, 8, 9, 11, 14, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
754
+ [110, 9, 10, 12, 15, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
755
+ [115, 10, 11, 13, 16, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
756
+ [120, 12, 13, 15, 18, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
757
+ [125, 13, 14, 16, 19, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
758
+ [130, 14, 15, 17, 20, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
759
+ [135, 15, 16, 18, 21, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
760
+ [140, 17, 18, 20, 23, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
761
+ [145, 18, 19, 21, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
762
+ [150, 19, 20, 22, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
763
+ ];
764
+ R.starforceGloveBonusAttData = [
765
+ 0,
766
+ 0,
767
+ 0,
768
+ 0,
769
+ 0,
770
+ 1,
771
+ 0,
772
+ 1,
773
+ 0,
774
+ 1,
775
+ 0,
776
+ 1,
777
+ 0,
778
+ 1,
779
+ 1,
780
+ 1,
781
+ 0,
782
+ 0,
783
+ 0,
784
+ 0,
785
+ 0,
786
+ 0,
787
+ 0,
788
+ 0,
789
+ 0,
790
+ 0
791
+ ];
792
+ R.starforceMhpData = [
793
+ 0,
794
+ 5,
795
+ 5,
796
+ 5,
797
+ 10,
798
+ 10,
799
+ 15,
800
+ 15,
801
+ 20,
802
+ 20,
803
+ 25,
804
+ 25,
805
+ 25,
806
+ 25,
807
+ 25,
808
+ 25,
809
+ 0,
810
+ 0,
811
+ 0,
812
+ 0,
813
+ 0,
814
+ 0,
815
+ 0,
816
+ 0,
817
+ 0,
818
+ 0
819
+ ];
820
+ R.starforceSpeedJumpData = [
821
+ 0,
822
+ 0,
823
+ 0,
824
+ 1,
825
+ 1,
826
+ 1,
827
+ 1,
828
+ 1,
829
+ 1,
830
+ 1,
831
+ 1,
832
+ 2,
833
+ 2,
834
+ 2,
835
+ 2,
836
+ 2,
837
+ 0,
838
+ 0,
839
+ 0,
840
+ 0,
841
+ 0,
842
+ 0,
843
+ 0,
844
+ 0,
845
+ 0,
846
+ 0
847
+ ];
848
+ class w {
849
+ constructor(c = "", s) {
850
+ this.name = c, this.stat = s ?? /* @__PURE__ */ new Map();
851
+ }
852
+ /**
853
+ * 주문의 흔적 `Scroll`을 반환합니다.
854
+ * @param gear 적용할 장비
855
+ * @param type 주문의 흔적 스탯 종류; 다음 값 중 하나입니다:
856
+ *
857
+ * `GearPropType.incSTR` / `GearPropType.incDEX` /
858
+ * `GearPropType.incINT` / `GearPropType.incLUK` /
859
+ * `GearPropType.incAllStat` / `GearPropType.incMHP`
860
+ * @param probability 주문의 흔적 성공 확률 %; 다음 값 중 하나입니다:
861
+ *
862
+ * `100` / `70` / `30` / `15`
863
+ * @returns 주문의 흔적 `Scroll`; 존재하지 않을 경우 `undefined`
864
+ */
865
+ static getSpellTraceScroll(c, s, o) {
866
+ const a = s === n.incINT ? n.incMAD : n.incPAD, h = c.req.level >= 115 ? 2 : c.req.level >= 75 ? 1 : 0;
867
+ let e;
868
+ const r = a === n.incMAD ? "마력" : "공격력";
869
+ switch (s) {
870
+ case n.incSTR:
871
+ e = "힘";
872
+ break;
873
+ case n.incDEX:
874
+ e = "민첩";
875
+ break;
876
+ case n.incINT:
877
+ e = "지력";
878
+ break;
879
+ case n.incLUK:
880
+ e = "운";
881
+ break;
882
+ case n.incAllStat:
883
+ e = "올스탯";
884
+ break;
885
+ case n.incMHP:
886
+ e = "체력";
887
+ break;
888
+ }
889
+ if (M.isWeapon(c.type) || c.type === i.katara) {
890
+ if (s === n.incAllStat)
891
+ return;
892
+ let l;
893
+ switch (o) {
894
+ case 100:
895
+ l = [
896
+ [1, 0],
897
+ [2, 0],
898
+ [3, 1]
899
+ ];
374
900
  break;
375
- case s.EX_ALL:
376
- m = 1;
901
+ case 70:
902
+ l = [
903
+ [2, 0],
904
+ [3, 1],
905
+ [5, 2]
906
+ ];
377
907
  break;
378
- case s.EX_MHP:
379
- m = 2;
908
+ case 30:
909
+ l = [
910
+ [3, 1],
911
+ [5, 2],
912
+ [7, 3]
913
+ ];
380
914
  break;
381
- case s.EX_CR:
382
- m = 3;
915
+ case 15:
916
+ l = [
917
+ [5, 2],
918
+ [7, 3],
919
+ [9, 4]
920
+ ];
383
921
  break;
384
- case s.EX_IMD:
385
- m = 4;
922
+ }
923
+ const f = l[h][0], m = l[h][1] * (s === n.incMHP ? 50 : 1), d = m > 0 ? `${o}% ${r}(${e}) 주문서` : `${o}% ${r} 주문서`, A = /* @__PURE__ */ new Map([
924
+ [s, m],
925
+ [a, f]
926
+ ]);
927
+ return new w(d, A);
928
+ } else if (o === 15)
929
+ return;
930
+ if (c.type === i.glove) {
931
+ let l;
932
+ switch (o) {
933
+ case 100:
934
+ l = [0, 1, 1];
386
935
  break;
387
- case s.EX_BD:
388
- m = 4;
936
+ case 70:
937
+ l = [1, 2, 2];
389
938
  break;
390
- case s.EX_AS:
391
- m = 5;
939
+ case 30:
940
+ l = [2, 3, 3];
392
941
  break;
393
- default:
394
- return 0;
395
942
  }
396
- return r[a][m];
397
- } else {
398
- if (n === "모카딘" && i === s.STR || n === "카리아인" && i === s.INT || n === "줄라이" && i === s.DEX || n === "CQ57" && i === s.LUK)
399
- return 20;
400
- if (n === "플레드" && i === s.ALL)
401
- return 12;
402
- let a;
403
- switch (i) {
404
- case s.STR:
405
- a = 0;
943
+ const f = l[h];
944
+ let m, d;
945
+ return f === 0 ? (m = `${o}% 방어력 주문서`, d = /* @__PURE__ */ new Map([[n.incPDD, 3]])) : (m = `${o}% ${r} 주문서`, d = /* @__PURE__ */ new Map([[a, f]])), new w(m, d);
946
+ }
947
+ if (M.isArmor(c.type) || c.type === i.shoulder) {
948
+ if (s === n.incAllStat) {
949
+ if (o !== 30)
950
+ return;
951
+ const k = [
952
+ [1, 30, 4],
953
+ [2, 70, 7],
954
+ [3, 120, 10]
955
+ ], b = k[h][0], L = k[h][1], H = k[h][2], N = `${o}% ${e} 주문서`, E = /* @__PURE__ */ new Map([
956
+ [n.incSTR, b],
957
+ [n.incDEX, b],
958
+ [n.incINT, b],
959
+ [n.incLUK, b],
960
+ [n.incMHP, L],
961
+ [n.incPDD, H]
962
+ ]);
963
+ return c.upgradeCount === 3 && (c.req.job === 0 ? (E.set(n.incMAD, 1), E.set(n.incPAD, 1)) : Math.floor(c.req.job / 2) % 2 === 1 ? E.set(n.incMAD, 1) : E.set(n.incPAD, 1)), new w(N, E);
964
+ }
965
+ let l;
966
+ switch (o) {
967
+ case 100:
968
+ l = [
969
+ [1, 5, 1],
970
+ [2, 20, 2],
971
+ [3, 30, 3]
972
+ ];
406
973
  break;
407
- case s.DEX:
408
- a = 0;
974
+ case 70:
975
+ l = [
976
+ [2, 15, 2],
977
+ [3, 40, 4],
978
+ [4, 70, 5]
979
+ ];
409
980
  break;
410
- case s.INT:
411
- a = 0;
981
+ case 30:
982
+ l = [
983
+ [3, 30, 4],
984
+ [5, 70, 7],
985
+ [7, 120, 10]
986
+ ];
412
987
  break;
413
- case s.LUK:
414
- a = 0;
988
+ }
989
+ const f = s !== n.incMHP ? l[h][0] : 0, m = l[h][1] + (s === n.incMHP ? l[h][0] * 50 : 0), d = l[h][2], A = `${o}% ${e} 주문서`, S = /* @__PURE__ */ new Map([
990
+ [n.incMHP, m],
991
+ [n.incPDD, d]
992
+ ]);
993
+ return f > 0 && S.set(s, f), c.upgradeCount === 3 && (c.req.job === 0 ? (S.set(n.incMAD, 1), S.set(n.incPAD, 1)) : Math.floor(c.req.job / 2) % 2 === 1 ? S.set(n.incMAD, 1) : S.set(n.incPAD, 1)), new w(A, S);
994
+ }
995
+ if (M.isAccessory(c.type)) {
996
+ if (s === n.incAllStat) {
997
+ if (o !== 30)
998
+ return;
999
+ const S = [
1000
+ [1, 30, 4],
1001
+ [2, 70, 7],
1002
+ [3, 120, 10]
1003
+ ][h][0], k = `${o}% ${e} 주문서`, b = /* @__PURE__ */ new Map([
1004
+ [n.incSTR, S],
1005
+ [n.incDEX, S],
1006
+ [n.incINT, S],
1007
+ [n.incLUK, S]
1008
+ ]);
1009
+ return new w(k, b);
1010
+ }
1011
+ let l;
1012
+ switch (o) {
1013
+ case 100:
1014
+ l = [1, 1, 2];
415
1015
  break;
416
- case s.ALL:
417
- a = 1;
1016
+ case 70:
1017
+ l = [2, 2, 3];
418
1018
  break;
419
- case s.PAD:
420
- a = 2;
1019
+ case 30:
1020
+ l = [3, 4, 5];
421
1021
  break;
422
- case s.MAD:
423
- a = 2;
1022
+ }
1023
+ const f = l[h] * (s === n.incMHP ? 50 : 1), m = `${o}% ${e} 주문서`, d = /* @__PURE__ */ new Map([[s, f]]);
1024
+ return new w(m, d);
1025
+ }
1026
+ if (c.type === i.machineHeart) {
1027
+ let l;
1028
+ switch (o) {
1029
+ case 100:
1030
+ l = [1, 2, 3];
424
1031
  break;
425
- case s.MHP:
426
- a = 3;
1032
+ case 70:
1033
+ l = [2, 3, 5];
427
1034
  break;
428
- case s.MMP:
429
- a = 3;
1035
+ case 30:
1036
+ l = [3, 5, 7];
430
1037
  break;
431
- default:
432
- return 0;
433
1038
  }
434
- return N[this.getSoulGrade(n)][a];
1039
+ const f = l[h], m = `${o}% ${e} 주문서`, d = /* @__PURE__ */ new Map([[a, f]]);
1040
+ return new w(m, d);
435
1041
  }
436
1042
  }
437
- static getSoulMobNames() {
438
- return Object.keys(h);
1043
+ }
1044
+ class W {
1045
+ /**
1046
+ * 무기를 소울웨폰으로 변환합니다.
1047
+ * @param gear 적용할 장비
1048
+ * @returns 소울웨폰으로 변환되었을 경우 `true`; 아닐 경우 `false`
1049
+ */
1050
+ enchant(c) {
1051
+ return c.soulSlot.enchanted || !M.isWeapon(c.type) ? !1 : (c.soulSlot.enchanted = !0, c.soulSlot.soul = void 0, c.soulSlot.charge = 0, c.soulSlot.chargeOption.clear(), !0);
1052
+ }
1053
+ /**
1054
+ * 소울웨폰을 원래의 무기로 되돌립니다.
1055
+ * @param gear 되돌릴 장비
1056
+ * @returns 되돌렸을 경우 `true`; 아닐 경우 `false`
1057
+ */
1058
+ disenchant(c) {
1059
+ return c.soulSlot.enchanted ? (c.soulSlot.enchanted = !1, c.soulSlot.soul = void 0, c.soulSlot.charge = 0, c.soulSlot.chargeOption.clear(), !0) : !1;
1060
+ }
1061
+ /**
1062
+ * 소울웨폰에 소울을 장착합니다.
1063
+ * @param gear 소울을 장착할 장비
1064
+ * @param soul 장착할 소울
1065
+ * @returns 장착했을 경우 `true`; 아닐 경우 `false`
1066
+ */
1067
+ setSoul(c, s) {
1068
+ return c.soulSlot.enchanted ? (c.soulSlot.soul = s, this.setCharge(c, c.soulSlot.charge), !0) : !1;
1069
+ }
1070
+ /**
1071
+ * 소울이 장착된 소울웨폰에서 소울을 제거합니다.
1072
+ * @param gear 소울을 제거할 장비
1073
+ * @returns 제거했을 경우 `true`; 아닐 경우 `false`
1074
+ */
1075
+ removeSoul(c) {
1076
+ return !c.soulSlot.enchanted || !c.soulSlot.soul ? !1 : (c.soulSlot.soul = void 0, this.setCharge(c, c.soulSlot.charge), !0);
1077
+ }
1078
+ /**
1079
+ * 소울웨폰의 소울 충전량을 설정하고 옵션을 적용합니다.
1080
+ * 0부터 1000까지의 값으로 설정할 수 있습니다.
1081
+ * @param gear 소울 충전량을 설정할 장비
1082
+ * @param charge 소울 충전량
1083
+ * @returns 적용했을 경우 `true`; 아닐 경우 `false`
1084
+ */
1085
+ setCharge(c, s) {
1086
+ if (!c.soulSlot.enchanted || s < 0 || s > 1e3)
1087
+ return !1;
1088
+ c.soulSlot.charge = s;
1089
+ const a = c.option(n.incPAD).base < c.option(n.incMAD).base ? n.incMAD : n.incPAD;
1090
+ return c.soulSlot.chargeOption.clear(), c.soulSlot.chargeOption.set(a, this.getChargeAD(c.soulSlot)), !0;
1091
+ }
1092
+ getChargeAD(c) {
1093
+ if (!c.enchanted)
1094
+ return 0;
1095
+ if (c.soul) {
1096
+ const s = c.soul.multiplier;
1097
+ return 10 + Math.min(Math.ceil(c.charge / 100), 5) * s;
1098
+ }
1099
+ return 5 + Math.min(Math.ceil(c.charge / 100), 5);
439
1100
  }
440
1101
  }
441
- const h = {
442
- 시그너스: {
443
- grade: 1,
444
- namePostfix: !0,
445
- normalSkillName: "불꽃 여제",
446
- greatSkillName: "폭풍 여제"
447
- },
448
- 매그너스: {
449
- grade: 1,
450
- namePostfix: !0,
451
- normalSkillName: "진격! 그게 바로 나다",
452
- greatSkillName: "폭격! 그게 바로 나다"
453
- },
454
- 무르무르: {
455
- grade: 1,
456
- namePostfix: !0,
457
- normalSkillName: "무르무르의 이상한 동행",
458
- greatSkillName: "무르무르의 수상한 동행"
459
- },
460
- 블러디퀸: {
461
- grade: 1,
462
- namePostfix: !0,
463
- normalSkillName: "여왕의 마음은 갈대",
464
- greatSkillName: "여왕님이 함께 하셔!"
465
- },
466
- 벨룸: {
467
- grade: 1,
468
- namePostfix: !0,
469
- normalSkillName: "기가 벨룸 레이저",
470
- greatSkillName: "주니어 벨룸 소환!"
471
- },
472
- 스우: {
473
- grade: 1,
474
- namePostfix: !0,
475
- normalSkillName: "때렸스우~",
476
- greatSkillName: "화났스우~"
477
- },
478
- 데미안: {
479
- grade: 1,
480
- namePostfix: !0,
481
- normalSkillName: "사냥 개시",
482
- greatSkillName: "파멸의 검"
483
- },
484
- 루시드: {
485
- grade: 1,
486
- namePostfix: !0,
487
- normalSkillName: "악몽으로의 초대",
488
- greatSkillName: "악몽의 지배자"
489
- },
490
- 윌: {
491
- grade: 1,
492
- namePostfix: !0,
493
- normalSkillName: "파괴의 손아귀",
494
- greatSkillName: "거미의 왕"
495
- },
496
- "진 힐라": {
497
- grade: 1,
498
- namePostfix: !0,
499
- normalSkillName: "영혼 찢기",
500
- greatSkillName: "붉은 마녀"
501
- },
502
- 듄켈: {
503
- grade: 1,
504
- namePostfix: !0,
505
- normalSkillName: "지면 절단",
506
- greatSkillName: "지면 파쇄"
507
- },
508
- 칼로스: {
509
- grade: 1,
510
- namePostfix: !0,
511
- normalSkillName: "감시자의 포효",
512
- greatSkillName: "침입자 처단"
513
- },
514
- 핑크빈: {
515
- grade: 2,
516
- namePostfix: !0,
517
- normalSkillName: "까칠한 귀여움",
518
- greatSkillName: "치명적인 귀여움"
519
- },
520
- 피에르: {
521
- grade: 2,
522
- namePostfix: !0,
523
- normalSkillName: "피에르의 모자선물",
524
- greatSkillName: "깜짝 피에르!"
525
- },
526
- 반반: {
527
- grade: 2,
528
- namePostfix: !0,
529
- normalSkillName: "불닭의 따끔한 맛",
530
- greatSkillName: "치킨 날다!"
531
- },
532
- 우르스: {
533
- grade: 2,
534
- namePostfix: !0,
535
- normalSkillName: "파왕의 포효",
536
- greatSkillName: "파왕의 거친 포효"
537
- },
538
- 아카이럼: {
539
- grade: 3,
540
- namePostfix: !0,
541
- normalSkillName: "스네이크 사우론",
542
- greatSkillName: "메두사카이럼"
543
- },
544
- 모카딘: {
545
- grade: 3,
546
- namePostfix: !0,
547
- normalSkillName: "검은 기사 모카딘",
548
- greatSkillName: "어둠 기사 모카딘"
549
- },
550
- 카리아인: {
551
- grade: 3,
552
- namePostfix: !0,
553
- normalSkillName: "미친 마법사 카리아인",
554
- greatSkillName: "폭주 마법사 카리아인"
555
- },
556
- CQ57: {
557
- grade: 3,
558
- namePostfix: !0,
559
- normalSkillName: "돌격형 CQ57",
560
- greatSkillName: "상급 돌격형 CQ57"
561
- },
562
- 줄라이: {
563
- grade: 3,
564
- namePostfix: !0,
565
- normalSkillName: "인간 사냥꾼 줄라이",
566
- greatSkillName: "피의 사냥꾼 줄라이"
567
- },
568
- 플레드: {
569
- grade: 3,
570
- namePostfix: !0,
571
- normalSkillName: "싸움꾼 플레드",
572
- greatSkillName: "거친 싸움꾼 플레드"
573
- },
574
- "반 레온": {
575
- grade: 4,
576
- namePostfix: !0,
577
- normalSkillName: "야옹이 권법 : 할퀴기 초식",
578
- greatSkillName: "야옹이 권법 : 크로스 따귀 어택"
579
- },
580
- 힐라: {
581
- grade: 4,
582
- namePostfix: !0,
583
- normalSkillName: "마른 하늘에 번개 어택",
584
- greatSkillName: "마른 하늘에 벼락 어택"
585
- },
586
- 파풀라투스: {
587
- grade: 4,
588
- namePostfix: !0,
589
- normalSkillName: "공간의 지배자",
590
- greatSkillName: "시간의 지배자"
591
- },
592
- 자쿰: {
593
- grade: 5,
594
- namePostfix: !0,
595
- normalSkillName: "뜨거운 토템 투하",
596
- greatSkillName: "화끈한 토템 투하"
597
- },
598
- 발록: {
599
- grade: 6,
600
- namePostfix: !0,
601
- normalSkillName: "지옥불 트림",
602
- greatSkillName: "지옥불 재채기"
603
- },
604
- 돼지바: {
605
- grade: 6,
606
- namePostfix: !1,
607
- normalSkillName: "돼지바 스윙!",
608
- greatSkillName: "돼지바 드랍!"
609
- },
610
- 프리미엄PC방: {
611
- grade: 6,
612
- namePostfix: !1,
613
- normalSkillName: "PC방에서 메이플을 켰다!",
614
- greatSkillName: "프리미엄 PC방은 빵빵해"
615
- },
616
- 무공: {
617
- grade: 7,
618
- namePostfix: !0,
619
- normalSkillName: "회춘신공",
620
- greatSkillName: ""
621
- },
622
- 피아누스: {
623
- grade: 7,
624
- namePostfix: !0,
625
- normalSkillName: "공포의 마빡생선",
626
- greatSkillName: ""
627
- },
628
- "드래곤 라이더": {
629
- grade: 8,
630
- namePostfix: !0,
631
- normalSkillName: "손바닥 장풍",
632
- greatSkillName: ""
633
- },
634
- 렉스: {
635
- grade: 8,
636
- namePostfix: !0,
637
- normalSkillName: "내 앞길을 막지마",
638
- greatSkillName: ""
639
- },
640
- 에피네아: {
641
- grade: 9,
642
- namePostfix: !0,
643
- normalSkillName: "여왕의 향기는 나빌레라",
644
- greatSkillName: ""
645
- },
646
- 핑크몽: {
647
- grade: 9,
648
- namePostfix: !0,
649
- normalSkillName: "해피 뉴 에브리데이!",
650
- greatSkillName: ""
651
- },
652
- "락 스피릿": {
653
- grade: 10,
654
- namePostfix: !0,
655
- normalSkillName: "로큰롤 베이비",
656
- greatSkillName: ""
657
- },
658
- "교도관 아니": {
659
- grade: 10,
660
- namePostfix: !0,
661
- normalSkillName: "난 한놈만 패",
662
- greatSkillName: ""
663
- },
664
- 크세르크세스: {
665
- grade: 10,
666
- namePostfix: !0,
667
- normalSkillName: "특공 염소 어택",
668
- greatSkillName: ""
669
- },
670
- "블랙 슬라임": {
671
- grade: 10,
672
- namePostfix: !0,
673
- normalSkillName: "핑크빛 독안개",
674
- greatSkillName: ""
675
- }
676
- }, r = [
677
- [],
678
- [3, 5, 2e3, 12, 7, 2],
679
- [10, 20, 1500, 10, 5, 1],
680
- [8, 17, 1300, 8, 4, 1],
681
- [7, 15, 1200, 7, 4, 1],
682
- [6, 12, 1100, 6, 3, 1],
683
- [5, 10, 1e3, 5, 3, 1]
684
- ], N = [
685
- [],
686
- [24, 15, 6, 960],
687
- [20, 12, 5, 800],
688
- [18, 10, 4, 700],
689
- [15, 8, 3, 600],
690
- [12, 8, 3, 500],
691
- [10, 7, 3, 400],
692
- [7, 5, 0, 300],
693
- [5, 3, 0, 200],
694
- [4, 2, 0, 180],
695
- [3, 2, 0, 150]
696
- ];
697
- function E() {
698
- return u.getSoulMobNames();
1102
+ class x {
1103
+ /**
1104
+ * 장비에 황금망치를 적용합니다.
1105
+ * @param gear 황금망치를 적용할 장비
1106
+ * @returns 황금망치가 적용됐을 경우 `true`; 아닐 경우 `false`
1107
+ */
1108
+ applyGoldHammer(c) {
1109
+ return c.getBooleanValue(n.blockGoldHammer) || c.getBooleanValue(n.onlyUpgrade) || c.totalUpgradeCount <= 0 || c.hammerCount > 0 ? !1 : (c.hammerCount = 1, !0);
1110
+ }
1111
+ /**
1112
+ * 장비에 주문서를 1회 적용합니다.
1113
+ * @param gear 주문서를 적용할 장비
1114
+ * @param scroll 적용할 주문서
1115
+ * @returns 주문서가 적용됐을 경우 `true`; 아닐 경우 `false`
1116
+ */
1117
+ applyScroll(c, s) {
1118
+ if (c.upgradeCountLeft < 1)
1119
+ return !1;
1120
+ c.upgradeCount += 1;
1121
+ for (const [o, a] of s.stat)
1122
+ c.option(o).upgrade += a;
1123
+ return !0;
1124
+ }
1125
+ /**
1126
+ * 장비에 주문의 흔적 강화를 1회 적용합니다.
1127
+ * @param gear 강화를 적용할 장비
1128
+ * @param type 주문의 흔적 스탯 종류; 다음 값 중 하나입니다:
1129
+ *
1130
+ * `GearPropType.incSTR` / `GearPropType.incDEX` /
1131
+ * `GearPropType.incINT` / `GearPropType.incLUK` /
1132
+ * `GearPropType.incAllStat` / `GearPropType.incMHP`
1133
+ * @param probability 주문의 흔적 성공 확률 %; 다음 값 중 하나입니다:
1134
+ *
1135
+ * `100` / `70` / `30` / `15`
1136
+ * @returns 주문서가 적용됐을 경우 `true`; 아닐 경우 `false`
1137
+ */
1138
+ applySpellTrace(c, s, o) {
1139
+ const a = w.getSpellTraceScroll(c, s, o);
1140
+ return a ? this.applyScroll(c, a) : !1;
1141
+ }
1142
+ /**
1143
+ * 장비의 업그레이드 가능 횟수를 실패로 1회 감소합니다.
1144
+ * @param gear 감소할 장비
1145
+ * @returns 감소됐을 경우 `true`; 아닐 경우 `false`
1146
+ */
1147
+ addUpgradeFailCount(c) {
1148
+ return c.upgradeCountLeft < 1 ? !1 : (c.upgradeFailCount += 1, !0);
1149
+ }
1150
+ /**
1151
+ * 장비의 실패한 업그레이드 가능 횟수를 1회 복구합니다.
1152
+ * @param gear 복구할 장비
1153
+ * @returns 복구했을 경우 `true`; 아닐 경우 `false`
1154
+ */
1155
+ restoreUpgradeCount(c) {
1156
+ return c.upgradeFailCount < 1 ? !1 : (c.upgradeFailCount -= 1, !0);
1157
+ }
1158
+ /**
1159
+ * 장비의 주문서, 황금망치 관련 속성을 초기화합니다.
1160
+ *
1161
+ * 아크 이노센트와 동일한 효과입니다. 놀라운 장비강화 주문서가 적용된 장비도 적용 가능하지만 오차가 발생할 수 있습니다.
1162
+ * @param gear 초기화할 장비
1163
+ * @returns 초기화했을 경우 `true`; 아닐 경우 `false`
1164
+ */
1165
+ resetUpgrade(c) {
1166
+ c.upgradeCount = 0, c.upgradeFailCount = 0, c.hammerCount = 0;
1167
+ for (const [, s] of c.options)
1168
+ s.upgrade = 0;
1169
+ return !0;
1170
+ }
699
1171
  }
700
1172
  export {
701
- d as Gear,
702
- A as GearOption,
703
- c as GearPropType,
704
- D as GearReq,
705
- l as GearType,
706
- k as Potential,
707
- S as PotentialGrade,
708
- M as Soul,
709
- s as SoulType,
710
- E as getSoulMobNames
1173
+ X as BonusStatLogic,
1174
+ u as BonusStatType,
1175
+ R as EnhancementLogic,
1176
+ M as Gear,
1177
+ I as GearOption,
1178
+ n as GearPropType,
1179
+ K as GearReq,
1180
+ i as GearType,
1181
+ C as Potential,
1182
+ U as PotentialGrade,
1183
+ w as Scroll,
1184
+ q as Soul,
1185
+ W as SoulLogic,
1186
+ g as SoulSlot,
1187
+ x as UpgradeLogic
711
1188
  };