@malib/gear 0.13.0 → 0.14.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.cjs +2 -2
- package/index.d.ts +1 -1
- package/index.js +437 -379
- package/internal.d.ts +1 -0
- package/lib/migrate/migrate.d.ts +34 -0
- package/lib/soul.d.ts +12 -8
- package/package.json +1 -1
package/internal.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./lib/logic/exceptional";
|
|
|
12
12
|
export * from "./lib/logic/exceptionalparts";
|
|
13
13
|
export * from "./lib/logic/scroll";
|
|
14
14
|
export * from "./lib/logic/upgrade";
|
|
15
|
+
export * from "./lib/migrate/migrate";
|
|
15
16
|
export * from "./lib/serialize/fromplain";
|
|
16
17
|
export * from "./lib/serialize/interface";
|
|
17
18
|
export * from "./lib/serialize/toplain";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Gear } from "../gear";
|
|
2
|
+
import { GearPropType } from "../gearproptype";
|
|
3
|
+
import { Potential } from "../potential";
|
|
4
|
+
type GetPotentialFunc = (code: number, potentialLevel: number) => Potential | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* 이전 옵션
|
|
7
|
+
*/
|
|
8
|
+
export interface MigrateOption {
|
|
9
|
+
/** 코드에 해당하는 잠재능력을 반환하는 함수; `undefined`일 경우 기존 잠재능력을 복사합니다. */
|
|
10
|
+
getPotentialFunc?: GetPotentialFunc;
|
|
11
|
+
/** 이전 시 제외할 `GearPropType` 목록 */
|
|
12
|
+
ignorePropTypes?: GearPropType[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 장비의 강화 상태를 새로운 장비로 이전합니다.
|
|
16
|
+
* `target`의 상태만을 변경합니다.
|
|
17
|
+
* `original`과 `target`의 `itemID`가 동일해야 합니다.
|
|
18
|
+
*
|
|
19
|
+
* `original`에 놀라운 장비 강화가 적용되었을 경우 재계산 없이 수치를 그대로 이전합니다.
|
|
20
|
+
* @param original 강화가 적용된 기존 장비.
|
|
21
|
+
* @param target 강화를 이전할 장비.
|
|
22
|
+
* @param options 이전 시 적용할 옵션.
|
|
23
|
+
* @returns 강화가 적용된 상태의 `target` 장비.
|
|
24
|
+
*/
|
|
25
|
+
export declare function migrate(original: Gear, target: Gear, options?: MigrateOption): Gear;
|
|
26
|
+
export declare function migrateProps(original: Gear, target: Gear, ignorePropTypes?: GearPropType[]): void;
|
|
27
|
+
export declare function migrateAnvil(original: Gear, target: Gear): void;
|
|
28
|
+
export declare function migrateBonus(original: Gear, target: Gear): void;
|
|
29
|
+
export declare function migrateUpgrade(original: Gear, target: Gear): void;
|
|
30
|
+
export declare function migrateEnhancement(original: Gear, target: Gear): void;
|
|
31
|
+
export declare function migrateExceptional(original: Gear, target: Gear): void;
|
|
32
|
+
export declare function migratePotential(original: Gear, target: Gear, getPotentialFunc?: GetPotentialFunc): void;
|
|
33
|
+
export declare function migrateSoul(original: Gear, target: Gear): void;
|
|
34
|
+
export {};
|
package/lib/soul.d.ts
CHANGED
|
@@ -20,18 +20,13 @@ export declare class SoulWeapon {
|
|
|
20
20
|
enchanted: boolean;
|
|
21
21
|
/** 소울 */
|
|
22
22
|
soul: Soul | undefined;
|
|
23
|
-
private _charge;
|
|
24
23
|
/** 소울 충전량 */
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 소울 충전량
|
|
28
|
-
*
|
|
29
|
-
* `0`부터 `1000`까지의 값으로 설정할 수 있습니다.
|
|
30
|
-
*/
|
|
31
|
-
set charge(value: number);
|
|
24
|
+
charge: number;
|
|
32
25
|
/** 소울 충전량으로 증가하는 옵션 */
|
|
33
26
|
chargeOption: Map<GearPropType, number>;
|
|
34
27
|
private gear;
|
|
28
|
+
private get can();
|
|
29
|
+
private get type();
|
|
35
30
|
constructor(gear: Gear);
|
|
36
31
|
/**
|
|
37
32
|
* 소울 인챈트를 적용합니다.
|
|
@@ -45,6 +40,15 @@ export declare class SoulWeapon {
|
|
|
45
40
|
* 소울 인챈트 상태가 아닐 경우 `false`를 반환합니다.
|
|
46
41
|
*/
|
|
47
42
|
disenchant(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 소울 충전량을 설정합니다.
|
|
45
|
+
* 소울 충전량으로 증가하는 옵션을 다시 계산합니다.
|
|
46
|
+
* `0`부터 `1000`까지의 값으로 설정할 수 있습니다.
|
|
47
|
+
* @param charge 소울 충전량.
|
|
48
|
+
* @returns 설정했을 경우 `true`; 아닐 경우 `false`.
|
|
49
|
+
* 소울 인챈트 상태가 아닐 경우 `false`를 반환합니다.
|
|
50
|
+
*/
|
|
51
|
+
setCharge(charge: number): boolean;
|
|
48
52
|
/**
|
|
49
53
|
* 소울을 장착합니다.
|
|
50
54
|
* 소울 충전량으로 증가하는 옵션을 다시 계산합니다.
|