@malib/gear 0.15.1 → 1.0.0-next.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/dist/index.cjs +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -0
- package/dist/lib/Gear.d.ts +407 -0
- package/dist/lib/GearAttribute.d.ts +54 -0
- package/dist/lib/GearReq.d.ts +72 -0
- package/dist/lib/data/GearAttributeData.d.ts +103 -0
- package/dist/lib/data/GearData.d.ts +122 -0
- package/dist/lib/data/GearOption.d.ts +69 -0
- package/dist/lib/data/GearType.d.ts +220 -0
- package/dist/lib/data/PotentialData.d.ts +8 -0
- package/dist/lib/data/PotentialGrade.d.ts +7 -0
- package/dist/lib/data/SoulSlotData.d.ts +39 -0
- package/dist/lib/data/index.d.ts +7 -0
- package/dist/lib/enhance/addOption.d.ts +96 -0
- package/dist/lib/enhance/exceptional.d.ts +48 -0
- package/dist/lib/enhance/spellTrace.d.ts +59 -0
- package/dist/lib/enhance/starforce.d.ts +133 -0
- package/dist/lib/enhance/upgrade.d.ts +90 -0
- package/dist/lib/errors.d.ts +27 -0
- package/dist/lib/gearOption.d.ts +9 -0
- package/dist/lib/gearType.d.ts +55 -0
- package/dist/lib/soulSlot.d.ts +58 -0
- package/dist/lib/testUtils.d.ts +5 -0
- package/dist/lib/utils.d.ts +3 -0
- package/package.json +18 -10
- package/index.cjs +0 -2
- package/index.d.ts +0 -1
- package/index.js +0 -2202
- package/internal.d.ts +0 -26
- package/lib/create/create-gear.d.ts +0 -38
- package/lib/create/create-potential.d.ts +0 -32
- package/lib/create/create-soul.d.ts +0 -56
- package/lib/create/interfaces/gear.d.ts +0 -27
- package/lib/create/interfaces/itemoption.d.ts +0 -13
- package/lib/create/interfaces/soul.d.ts +0 -17
- package/lib/gear.d.ts +0 -226
- package/lib/gearoption.d.ts +0 -19
- package/lib/gearproptype.d.ts +0 -103
- package/lib/geartype.d.ts +0 -441
- package/lib/logic/bonusstat.d.ts +0 -40
- package/lib/logic/bonusstattype.d.ts +0 -47
- package/lib/logic/enhancement.d.ts +0 -40
- package/lib/logic/exceptional.d.ts +0 -16
- package/lib/logic/exceptionalparts.d.ts +0 -5
- package/lib/logic/scroll.d.ts +0 -28
- package/lib/logic/upgrade.d.ts +0 -47
- package/lib/migrate/migrate.d.ts +0 -34
- package/lib/potential.d.ts +0 -38
- package/lib/potentialgrade.d.ts +0 -29
- package/lib/serialize/fromplain.d.ts +0 -8
- package/lib/serialize/interface.d.ts +0 -95
- package/lib/serialize/toplain.d.ts +0 -8
- package/lib/serialize/util.d.ts +0 -27
- package/lib/serialize/validate.d.ts +0 -7
- package/lib/soul.d.ts +0 -73
package/lib/potential.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { GearPropType } from "./gearproptype";
|
|
2
|
-
import { GearType } from "./geartype";
|
|
3
|
-
/**
|
|
4
|
-
* 잠재옵션
|
|
5
|
-
*/
|
|
6
|
-
export declare class Potential {
|
|
7
|
-
/** 잠재옵션 코드 */
|
|
8
|
-
code: number;
|
|
9
|
-
/**
|
|
10
|
-
* 잠재옵션 분류
|
|
11
|
-
*
|
|
12
|
-
* 잠재옵션을 적용 가능한 장비 분류를 나타냅니다.
|
|
13
|
-
*/
|
|
14
|
-
optionType: number;
|
|
15
|
-
/** 장비의 최소 착용 가능 레벨 */
|
|
16
|
-
reqLevel: number;
|
|
17
|
-
/** 장비에 표시되는 문자열의 원본 */
|
|
18
|
-
summary: string;
|
|
19
|
-
/** 잠재옵션 옵션 */
|
|
20
|
-
option: Map<GearPropType, number>;
|
|
21
|
-
/**
|
|
22
|
-
* 장비에 표시되는 문자열
|
|
23
|
-
*/
|
|
24
|
-
get convertSummary(): string;
|
|
25
|
-
/**
|
|
26
|
-
* 장비의 착용 가능 레벨로부터 잠재옵션의 레벨을 계산합니다.
|
|
27
|
-
* @param gearReqLevel 장비의 착용 가능 레벨.
|
|
28
|
-
* @returns 잠재옵션 레벨. 1부터 25까지의 값입니다.
|
|
29
|
-
*/
|
|
30
|
-
static getPotentialLevel(gearReqLevel: number): number;
|
|
31
|
-
/**
|
|
32
|
-
* 잠재옵션 분류와 장비 분류를 비교합니다.
|
|
33
|
-
* @param optionType 잠재옵션 분류.
|
|
34
|
-
* @param gearType 장비 분류.
|
|
35
|
-
* @returns 잠재옵션 분류가 장비 분류에 적용 가능한 경우 `true`; 아닌 경우 `false`.
|
|
36
|
-
*/
|
|
37
|
-
static checkOptionType(optionType: number, gearType: GearType): boolean;
|
|
38
|
-
}
|
package/lib/potentialgrade.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 잠재능력 등급
|
|
3
|
-
*/
|
|
4
|
-
export declare enum PotentialGrade {
|
|
5
|
-
/**
|
|
6
|
-
* 노멀
|
|
7
|
-
*/
|
|
8
|
-
normal = 0,
|
|
9
|
-
/**
|
|
10
|
-
* 레어
|
|
11
|
-
*/
|
|
12
|
-
rare = 1,
|
|
13
|
-
/**
|
|
14
|
-
* 에픽
|
|
15
|
-
*/
|
|
16
|
-
epic = 2,
|
|
17
|
-
/**
|
|
18
|
-
* 유니크
|
|
19
|
-
*/
|
|
20
|
-
unique = 3,
|
|
21
|
-
/**
|
|
22
|
-
* 레전드리
|
|
23
|
-
*/
|
|
24
|
-
legendary = 4,
|
|
25
|
-
/**
|
|
26
|
-
* 스페셜
|
|
27
|
-
*/
|
|
28
|
-
special = 5
|
|
29
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { Anvil, GearIcon, GearReq } from "../gear";
|
|
2
|
-
import { GearPropType } from "../gearproptype";
|
|
3
|
-
import { GearType } from "../geartype";
|
|
4
|
-
import { PotentialGrade } from "../potentialgrade";
|
|
5
|
-
/**
|
|
6
|
-
* `Gear`를 나타내는 순수 객체 형식
|
|
7
|
-
*/
|
|
8
|
-
export interface GearLike {
|
|
9
|
-
/** id */
|
|
10
|
-
id: number;
|
|
11
|
-
/** name */
|
|
12
|
-
n: string;
|
|
13
|
-
/** desc */
|
|
14
|
-
d?: string;
|
|
15
|
-
/** icon */
|
|
16
|
-
i: GearIcon;
|
|
17
|
-
/** anvil */
|
|
18
|
-
an?: Anvil;
|
|
19
|
-
/** type */
|
|
20
|
-
t: GearType;
|
|
21
|
-
/** req */
|
|
22
|
-
r: GearReq;
|
|
23
|
-
/** props */
|
|
24
|
-
pr: [GearPropType, number][];
|
|
25
|
-
/** options */
|
|
26
|
-
o: [GearPropType, OptionLike][];
|
|
27
|
-
/** totalUpgradeCount */
|
|
28
|
-
c?: number;
|
|
29
|
-
/** upgradeCount */
|
|
30
|
-
up?: number;
|
|
31
|
-
/** failCount */
|
|
32
|
-
f?: number;
|
|
33
|
-
/** hammerCount */
|
|
34
|
-
h?: number;
|
|
35
|
-
/** exceptionalTotalUpgradeCount */
|
|
36
|
-
ec?: number;
|
|
37
|
-
/** exceptionalUpgradeCount */
|
|
38
|
-
eu?: number;
|
|
39
|
-
/** exceptionalOptions */
|
|
40
|
-
eo?: [GearPropType, number][];
|
|
41
|
-
/** maxStar */
|
|
42
|
-
m?: number;
|
|
43
|
-
/** star */
|
|
44
|
-
s?: number;
|
|
45
|
-
/** amazing */
|
|
46
|
-
a?: boolean;
|
|
47
|
-
/** karma */
|
|
48
|
-
k?: number;
|
|
49
|
-
/** canPotential */
|
|
50
|
-
cp?: boolean;
|
|
51
|
-
/** grade */
|
|
52
|
-
g?: PotentialGrade;
|
|
53
|
-
/** potentials */
|
|
54
|
-
p?: (PotLike | null)[];
|
|
55
|
-
/** additionalGrade */
|
|
56
|
-
g2?: PotentialGrade;
|
|
57
|
-
/** additionalPotentials */
|
|
58
|
-
p2?: (PotLike | null)[];
|
|
59
|
-
/** soulWeapon */
|
|
60
|
-
w?: SoulWeaponLike;
|
|
61
|
-
}
|
|
62
|
-
/** base, bonus, upgrade, enchant */
|
|
63
|
-
export type OptionLike = [number, number, number, number];
|
|
64
|
-
export interface PotLike {
|
|
65
|
-
/** code */
|
|
66
|
-
c: number;
|
|
67
|
-
/** optionType */
|
|
68
|
-
t: number;
|
|
69
|
-
/** reqLevel */
|
|
70
|
-
l: number;
|
|
71
|
-
/** summary */
|
|
72
|
-
s: string;
|
|
73
|
-
/** options */
|
|
74
|
-
o: [GearPropType, number][];
|
|
75
|
-
}
|
|
76
|
-
export interface SoulWeaponLike {
|
|
77
|
-
/** enchanted */
|
|
78
|
-
e?: boolean;
|
|
79
|
-
/** soul */
|
|
80
|
-
s?: SoulLike;
|
|
81
|
-
/** charge */
|
|
82
|
-
c?: number;
|
|
83
|
-
/** chargeOption */
|
|
84
|
-
o?: [GearPropType, number][];
|
|
85
|
-
}
|
|
86
|
-
export interface SoulLike {
|
|
87
|
-
/** name */
|
|
88
|
-
n: string;
|
|
89
|
-
/** skill */
|
|
90
|
-
s: string;
|
|
91
|
-
/** option */
|
|
92
|
-
o: [GearPropType, number][];
|
|
93
|
-
/** multiplier */
|
|
94
|
-
m: number;
|
|
95
|
-
}
|
package/lib/serialize/util.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Gear } from "../gear";
|
|
2
|
-
/**
|
|
3
|
-
* 장비를 문자열로 변환합니다. `JSON.stringify`를 사용합니다.
|
|
4
|
-
* @param gear 변환할 장비.
|
|
5
|
-
* @returns 장비를 나타내는 문자열.
|
|
6
|
-
*/
|
|
7
|
-
export declare function stringifyGear(gear: Gear): string;
|
|
8
|
-
/**
|
|
9
|
-
* 문자열을 장비로 변환합니다. 입력을 검사하지 않고 `JSON.parse`를 사용합니다.
|
|
10
|
-
* @param gear 변환할 문자열.
|
|
11
|
-
* @returns 장비. 입력이 잘못되었을 경우 오류가 발생하거나 장비를 반환합니다.
|
|
12
|
-
*/
|
|
13
|
-
export declare function parseGear(like: string): Gear;
|
|
14
|
-
/**
|
|
15
|
-
* 문자열을 장비로 변환합니다. 입력을 검사하고 `JSON.parse`를 사용합니다.
|
|
16
|
-
* @param gear 변환할 문자열.
|
|
17
|
-
* @returns 장비. 입력이 올바른 JSON이 아니거나 `GearLike`가 아닐 경우 `null`을 반환합니다.
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateParseGear(maybe: string): Gear | null;
|
|
20
|
-
export declare function serializeMap<K, V>(map: Map<K, V>, filterFunc?: (val: V) => boolean): [K, V][];
|
|
21
|
-
export declare function serializeMap<K, V, VLike>(map: Map<K, V>, filterFunc: ((val: V) => boolean) | undefined, convertFunc: (val: V) => VLike): [K, VLike][];
|
|
22
|
-
export declare function serializeArray<T>(arr: T[], filterFunc?: (e: T) => boolean): T[];
|
|
23
|
-
export declare function serializeArray<T, TLike>(arr: T[], filterFunc: ((e: T) => boolean) | undefined, convertFunc: (e: T) => TLike): TLike[];
|
|
24
|
-
export declare function deserializeMap<K, V>(mapLike: [K, V][]): Map<K, V>;
|
|
25
|
-
export declare function deserializeMap<K, V, VLike>(mapLike: [K, VLike][], func: (val: VLike) => V): Map<K, V>;
|
|
26
|
-
export declare function deserializeArray<T>(arr: T[]): T[];
|
|
27
|
-
export declare function deserializeArray<T, TLike>(arr: TLike[], func: (e: TLike) => T): T[];
|
package/lib/soul.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Gear } from "./gear";
|
|
2
|
-
import { GearPropType } from "./gearproptype";
|
|
3
|
-
/**
|
|
4
|
-
* 소울
|
|
5
|
-
*/
|
|
6
|
-
export interface Soul {
|
|
7
|
-
/** 소울 이름 */
|
|
8
|
-
name: string;
|
|
9
|
-
/** 스킬명 */
|
|
10
|
-
skill: string;
|
|
11
|
-
/** 소울 옵션 */
|
|
12
|
-
option: Map<GearPropType, number>;
|
|
13
|
-
multiplier: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 소울 웨폰
|
|
17
|
-
*/
|
|
18
|
-
export declare class SoulWeapon {
|
|
19
|
-
/** 소울 인챈트 여부 */
|
|
20
|
-
enchanted: boolean;
|
|
21
|
-
/** 소울 */
|
|
22
|
-
soul: Soul | undefined;
|
|
23
|
-
/** 소울 충전량 */
|
|
24
|
-
charge: number;
|
|
25
|
-
/** 소울 충전량으로 증가하는 옵션 */
|
|
26
|
-
chargeOption: Map<GearPropType, number>;
|
|
27
|
-
private gear;
|
|
28
|
-
private get can();
|
|
29
|
-
private get type();
|
|
30
|
-
constructor(gear: Gear);
|
|
31
|
-
/**
|
|
32
|
-
* 소울 인챈트를 적용합니다.
|
|
33
|
-
* @returns 적용했을 경우 `true`; 아닐 경우 `false`.
|
|
34
|
-
* 이미 소울 인챈트 상태이거나 장비 분류가 무기가 아닐 경우 `false`를 반환합니다.
|
|
35
|
-
*/
|
|
36
|
-
enchant(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* 소울 인챈트를 해제합니다.
|
|
39
|
-
* @returns 해제했을 경우 `true`; 아닐 경우 `false`.
|
|
40
|
-
* 소울 인챈트 상태가 아닐 경우 `false`를 반환합니다.
|
|
41
|
-
*/
|
|
42
|
-
disenchant(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 소울 충전량을 설정합니다.
|
|
45
|
-
* 소울 충전량으로 증가하는 옵션을 다시 계산합니다.
|
|
46
|
-
* `0`부터 `1000`까지의 값으로 설정할 수 있습니다.
|
|
47
|
-
* @param charge 소울 충전량.
|
|
48
|
-
* @returns 설정했을 경우 `true`; 아닐 경우 `false`.
|
|
49
|
-
* 소울 인챈트 상태가 아닐 경우 `false`를 반환합니다.
|
|
50
|
-
*/
|
|
51
|
-
setCharge(charge: number): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 소울을 장착합니다.
|
|
54
|
-
* 소울 충전량으로 증가하는 옵션을 다시 계산합니다.
|
|
55
|
-
* 소울 인챈트가 적용된 상태에만 장착됩니다.
|
|
56
|
-
* @param soul 장착할 소울.
|
|
57
|
-
* @returns 장착했을 경우 `true`; 아닐 경우 `false`.
|
|
58
|
-
* 소울 인챈트 상태가 아닐 경우 `false`를 반환합니다.
|
|
59
|
-
*/
|
|
60
|
-
setSoul(soul: Soul): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* 장착된 소울을 제거합니다.
|
|
63
|
-
* @returns 제거했을 경우 `true`; 아닐 경우 `false`.
|
|
64
|
-
* 소울 인챈트 상태가 아니거나 장착된 소울이 없을 경우 `false`를 반환합니다.
|
|
65
|
-
*/
|
|
66
|
-
removeSoul(): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* 소울 충전량으로 증가하는 옵션을 다시 계산합니다.
|
|
69
|
-
* @returns 적용했을 경우 `true`; 아닐 경우 `false`.
|
|
70
|
-
*/
|
|
71
|
-
updateChargeOption(): boolean;
|
|
72
|
-
private getChargeAD;
|
|
73
|
-
}
|