@malib/gear 0.0.1

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/lib/gear.d.ts ADDED
@@ -0,0 +1,188 @@
1
+ import { GearPropType } from "./gearproptype";
2
+ import { GearType } from "./geartype";
3
+ import { Potential } from "./potential";
4
+ import { PotentialGrade } from "./potentialgrade";
5
+ import { Soul } from "./soul";
6
+ /**
7
+ * 장비 착용 제한
8
+ */
9
+ export declare class GearReq {
10
+ /** 착용 가능 레벨 */
11
+ level: number;
12
+ /** REQ STR */
13
+ str: number;
14
+ /** REQ LUK */
15
+ luk: number;
16
+ /** REQ DEX */
17
+ dex: number;
18
+ /** REQ INT */
19
+ int: number;
20
+ /** 착용 가능 직업 분류 */
21
+ job: number;
22
+ /** 착용 가능 직업 */
23
+ specJob: number;
24
+ }
25
+ /**
26
+ * 장비 옵션
27
+ */
28
+ export declare class GearOption {
29
+ /** 기본 수치 */
30
+ base: number;
31
+ /** 추가옵션 수치 */
32
+ bonus: number;
33
+ /** 주문서 강화 수치 */
34
+ upgrade: number;
35
+ /** 장비 강화 수치 */
36
+ enchant: number;
37
+ /** 모든 수치가 0일 경우 `true`; 아닐 경우 `false` */
38
+ get empty(): boolean;
39
+ /** 모든 수치의 합; 합이 음수일 경우 `0` */
40
+ get sum(): number;
41
+ /** 기본 수치 대비 변화량 */
42
+ get diff(): number;
43
+ }
44
+ /**
45
+ * 장비
46
+ */
47
+ export declare class Gear {
48
+ /** 장비 ID */
49
+ itemID: number;
50
+ /** 장비명 */
51
+ name: string;
52
+ /** 설명 */
53
+ desc: string;
54
+ /** 아이콘 */
55
+ icon: number;
56
+ /** 아이콘 오프셋 */
57
+ origin: [number, number];
58
+ /** 장비 분류 */
59
+ type: GearType;
60
+ /** 장비 착용 제한 */
61
+ req: GearReq;
62
+ /** 장비 속성 */
63
+ props: Map<GearPropType, number>;
64
+ /** 장비 옵션 */
65
+ options: Map<GearPropType, GearOption>;
66
+ /** 최대 업그레이드 가능 횟수 */
67
+ totalUpgradeCount: number;
68
+ /** 업그레이드 횟수 */
69
+ upgradeCount: number;
70
+ /** 복구 가능 횟수 */
71
+ failCount: number;
72
+ /** 황금망치 횟수 */
73
+ hammerCount: number;
74
+ /** 최대 장비 강화 수치 */
75
+ maxStar: number;
76
+ /** 장비 강화 수치 */
77
+ star: number;
78
+ /** 놀라운 장비 강화 적용 여부 */
79
+ amazing: boolean;
80
+ /** 잠재능력 설정 가능 여부 */
81
+ canPotential: boolean;
82
+ /** 잠재능력 등급 */
83
+ grade: PotentialGrade;
84
+ /** 잠재옵션 목록 */
85
+ potentials: Potential[];
86
+ /** 에디셔널 잠재능력 등급 */
87
+ additionalGrade: PotentialGrade;
88
+ /** 에디셔널 잠재옵션 목록 */
89
+ additionalPotentials: Potential[];
90
+ /** 소울 */
91
+ soul: Soul | undefined;
92
+ /**
93
+ * 장비 옵션을 반환합니다. 존재하지 않는 옵션은 장비에 추가됩니다.
94
+ * @param type 장비 옵션 종류
95
+ * @returns 장비 옵션 객체
96
+ */
97
+ option(type: GearPropType): GearOption;
98
+ /**
99
+ * 장비 속성의 값을 반환합니다.
100
+ * @param type 장비 속성
101
+ * @returns 속성의 값; 존재하지 않을 경우 `0`
102
+ */
103
+ getPropValue(type: GearPropType): number;
104
+ /**
105
+ * 장비 속성의 값을 `boolean` 형식으로 반환합니다.
106
+ * @param type 장비 속성
107
+ * @returns 속성이 존재하고 값이 `0` 이상일 경우 `true`; 아닐 경우 `false`
108
+ */
109
+ getBooleanValue(type: GearPropType): boolean;
110
+ /**
111
+ * 장비의 최대 강화 수치를 계산합니다.
112
+ * @returns 최대 장비 강화 수치
113
+ */
114
+ getMaxStar(): number;
115
+ private static readonly starData;
116
+ /**
117
+ * 현재 옵션과 기본 옵션의 차이를 가중치를 포함하여 계산합니다.
118
+ * @returns 가중치가 적용된 옵션 차이의 합
119
+ */
120
+ get diff(): number;
121
+ /**
122
+ * 업그레이드 가능 횟수
123
+ */
124
+ get upgradeLeft(): number;
125
+ /**
126
+ * 장비가 주무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara)는 포함되지 않습니다.
127
+ * @param type 장비 분류
128
+ * @returns 주무기일 경우 `true`; 아닐 경우 `false`
129
+ */
130
+ static isWeapon(type: GearType): boolean;
131
+ /**
132
+ * 장비가 한손무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara)는 포함되지 않습니다.
133
+ * @param type 장비 분류
134
+ * @returns 한손무기일 경우 `true`; 아닐 경우 `false`
135
+ */
136
+ static isLeftWeapon(type: GearType): boolean;
137
+ /**
138
+ * 장비가 두손무기인지 여부를 나타내는 `boolean`값을 반환합니다.
139
+ * @param type 장비 분류
140
+ * @returns 두손무기일 경우 `true`; 아닐 경우 `false`
141
+ */
142
+ static isDoubleHandWeapon(type: GearType): boolean;
143
+ /**
144
+ * 장비가 보조무기인지 여부를 나타내는 `boolean`값을 반환합니다. 블레이드(katara), 방패류가 포함됩니다.
145
+ * @param type 장비 분류
146
+ * @returns 보조무기일 경우 `true`; 아닐 경우 `false`
147
+ */
148
+ static isSubWeapon(type: GearType): boolean;
149
+ /**
150
+ * 장비가 방패인지 여부를 나타내는 `boolean`값을 반환합니다.
151
+ * @param type 장비 분류
152
+ * @returns 방패일 경우 `true`; 아닐 경우 `false`
153
+ */
154
+ static isShield(type: GearType): boolean;
155
+ /**
156
+ * 장비가 방어구인지 여부를 나타내는 `boolean`값을 반환합니다. 방패가 포함됩니다.
157
+ * @param type 장비 분류
158
+ * @returns 방어구일 경우 `true`; 아닐 경우 `false`
159
+ */
160
+ static isArmor(type: GearType): boolean;
161
+ /**
162
+ * 장비가 장신구인지 여부를 나타내는 `boolean`값을 반환합니다.
163
+ * @param type 장비 분류
164
+ * @returns 장신구일 경우 `true`; 아닐 경우 `false`
165
+ */
166
+ static isAccessory(type: GearType): boolean;
167
+ /**
168
+ * 장비가 메카닉 장비인지 여부를 나타내는 `boolean`값을 반환합니다.
169
+ * @param type 장비 분류
170
+ * @returns 메카닉 장비일 경우 `true`; 아닐 경우 `false`
171
+ */
172
+ static isMechanicGear(type: GearType): boolean;
173
+ /**
174
+ * 장비가 에반 드래곤 장비인지 여부를 나타내는 `boolean`값을 반환합니다.
175
+ * @param type 장비 분류
176
+ * @returns 에반 드래곤 장비일 경우 `true`; 아닐 경우 `false`
177
+ */
178
+ static isDragonGear(type: GearType): boolean;
179
+ static specialCanPotential(type: GearType): boolean;
180
+ /**
181
+ * 장비 ID로부터 장비 분류를 계산합니다.
182
+ * @param gearID 장비 ID
183
+ * @returns 장비 분류
184
+ */
185
+ static getGearType(gearID: number): GearType;
186
+ static GetGender(gearID: number): number;
187
+ private static getPropTypeWeight;
188
+ }
@@ -0,0 +1,128 @@
1
+ /**
2
+ * 장비 속성
3
+ */
4
+ export declare enum GearPropType {
5
+ incSTR = 1,
6
+ incSTRr = 2,
7
+ incDEX = 3,
8
+ incDEXr = 4,
9
+ incINT = 5,
10
+ incINTr = 6,
11
+ incLUK = 7,
12
+ incLUKr = 8,
13
+ incAllStat_incMHP25 = 9,
14
+ incAllStat = 10,
15
+ incMHP_incMMP = 11,
16
+ incMHPr_incMMPr = 12,
17
+ incMHP = 13,
18
+ incMMP = 14,
19
+ incMHPr = 15,
20
+ incMMPr = 16,
21
+ incMDF = 17,
22
+ incARC = 18,
23
+ incAUT = 19,
24
+ incPAD_incMAD = 20,
25
+ incPAD = 21,
26
+ incMAD = 22,
27
+ incAD = 23,
28
+ incPDD_incMDD = 24,
29
+ incPDD = 25,
30
+ incSpeed = 26,
31
+ incJump = 27,
32
+ knockback = 28,
33
+ bdR = 29,
34
+ incBDR = 30,
35
+ imdR = 31,
36
+ incIMDR = 32,
37
+ damR = 33,
38
+ nbdR = 34,
39
+ statR = 35,
40
+ incCHUC = 36,
41
+ incPADr = 100,
42
+ incMADr = 101,
43
+ incPDDr = 102,
44
+ incMDDr = 103,
45
+ incACCr = 104,
46
+ incEVAr = 105,
47
+ incCr = 106,
48
+ incDAMr = 107,
49
+ RecoveryHP = 108,
50
+ RecoveryMP = 109,
51
+ face = 110,
52
+ prop = 111,
53
+ time = 112,
54
+ HP = 113,
55
+ MP = 114,
56
+ attackType = 115,
57
+ ignoreTargetDEF = 116,
58
+ ignoreDAM = 117,
59
+ ignoreDAMr = 118,
60
+ DAMreflect = 119,
61
+ mpconReduce = 120,
62
+ mpRestore = 121,
63
+ incMesoProp = 122,
64
+ incRewardProp = 123,
65
+ incAllskill = 124,
66
+ RecoveryUP = 125,
67
+ boss = 126,
68
+ level = 127,
69
+ incTerR = 128,
70
+ incAsrR = 129,
71
+ incEXPr = 130,
72
+ reduceCooltime = 131,
73
+ incCriticaldamageMax = 132,
74
+ incCriticaldamageMin = 133,
75
+ incSTRlv = 134,
76
+ incDEXlv = 135,
77
+ incINTlv = 136,
78
+ incLUKlv = 137,
79
+ incMaxDamage = 138,
80
+ incMHPlv = 139,
81
+ incPADlv = 140,
82
+ incMADlv = 141,
83
+ incCriticaldamage = 142,
84
+ attackSpeed = 200,
85
+ tuc = 201,
86
+ setItemID = 202,
87
+ durability = 203,
88
+ reduceReq = 204,
89
+ growthLevel = 205,
90
+ growthExp = 206,
91
+ mastery = 300,
92
+ reqLevel = 1000,
93
+ reqSTR = 1001,
94
+ reqDEX = 1002,
95
+ reqINT = 1003,
96
+ reqLUK = 1004,
97
+ reqJob = 1005,
98
+ reqPOP = 1006,
99
+ reqSpecJob = 1007,
100
+ only = 1100,
101
+ tradeBlock = 1101,
102
+ accountSharable = 1102,
103
+ onlyEquip = 1103,
104
+ tradeAvailable = 1104,
105
+ equipTradeBlock = 1105,
106
+ tradeOnce = 1106,
107
+ sharableOnce = 1107,
108
+ charismaEXP = 1108,
109
+ senseEXP = 1109,
110
+ insightEXP = 1110,
111
+ willEXP = 1111,
112
+ craftEXP = 1112,
113
+ charmEXP = 1113,
114
+ accountShareTag = 1114,
115
+ bossReward = 1115,
116
+ noPotential = 1116,
117
+ fixedPotential = 1117,
118
+ specialGrade = 1118,
119
+ fixedGrade = 1119,
120
+ superiorEqp = 1120,
121
+ incPQEXPr = 1121,
122
+ jokerToSetItem = 1122,
123
+ blockGoldHammer = 1123,
124
+ exceptUpgrade = 1124,
125
+ onlyUpgrade = 1125,
126
+ noLookChange = 1126,
127
+ tucIgnoreForPotential = 1127
128
+ }