@malib/gear 1.0.0-next.3 → 1.0.0-next.5

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.
@@ -0,0 +1,10 @@
1
+ import { AddOptionGrade, AddOptionType, GearOption, PotentialData, PotentialGrade, SoulData } from '../data';
2
+ import { SpellTraceRate, SpellTraceType } from '../enhance/spellTrace';
3
+ import { Gear } from '../Gear';
4
+ export type Patch = (gear: Gear) => void;
5
+ export declare function starforcePatch(star: number, starScroll?: boolean, ignoreMaxStar?: boolean): Patch;
6
+ export declare function upgradePatch(options: ([SpellTraceType, SpellTraceRate] | Partial<GearOption>)[]): Patch;
7
+ export declare function addOptionPatch(options: [AddOptionType, AddOptionGrade][]): Patch;
8
+ export declare function potentialPatch(grade: PotentialGrade, options: PotentialData[]): Patch;
9
+ export declare function addiPotentialPatch(grade: PotentialGrade, options: PotentialData[]): Patch;
10
+ export declare function soulPatch(soul?: SoulData, charge?: number): Patch;
@@ -0,0 +1,6 @@
1
+ export { createExceptional } from './exceptionalFixture';
2
+ export { createGear, createReadonlyGear, type CreateGearParams, } from './gearFixture';
3
+ export { addiPotentialPatch, addOptionPatch, potentialPatch, starforcePatch, upgradePatch, } from './gearPatch';
4
+ export { createPotentialData } from './potentialFixture';
5
+ export { createScroll } from './scrollFixture';
6
+ export { createSoulData } from './soulFixture';
@@ -0,0 +1,2 @@
1
+ import { PotentialData } from '../data';
2
+ export declare function createPotentialData(data?: Partial<PotentialData>): PotentialData;
@@ -0,0 +1,2 @@
1
+ import { Scroll } from '../enhance/upgrade';
2
+ export declare function createScroll(data?: Partial<Scroll>): Scroll;
@@ -0,0 +1,2 @@
1
+ import { SoulData } from '../data';
2
+ export declare function createSoulData(data?: Partial<SoulData>): SoulData;
@@ -0,0 +1 @@
1
+ export declare function joinEach<T1 extends unknown[], T2 extends unknown[]>(prefix: [...T1], items: [...T2][]): [...T1, ...T2][];
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@malib/gear",
3
3
  "description": "MapleStory gear logic simulator",
4
- "version": "1.0.0-next.3",
4
+ "version": "1.0.0-next.5",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "typings": "dist/index.d.ts",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "typings": "src/index.ts",
9
+ "publishConfig": {
10
+ "main": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
+ "typings": "dist/index.d.ts"
13
+ },
9
14
  "files": [
10
15
  "dist"
11
16
  ],
package/src/index.ts ADDED
@@ -0,0 +1,121 @@
1
+ export {
2
+ /* AddOptionData */
3
+ AddOptionType,
4
+ type AddOptionGrade,
5
+ type AddOptionData,
6
+ /* GearAttributeData */
7
+ type GearAttributeData,
8
+ GearTrade,
9
+ GearShare,
10
+ GearCapability,
11
+ GearCuttable,
12
+ type GearIncline,
13
+ /* GearData */
14
+ type GearData,
15
+ type GearMetadata,
16
+ type GearShapeData,
17
+ type GearReqData,
18
+ type GearBaseOption,
19
+ type GearAddOption,
20
+ type GearUpgradeOption,
21
+ type GearStarforceOption,
22
+ type GearExceptionalOption,
23
+ /* GearOption */
24
+ type GearOption,
25
+ /* GearType */
26
+ GearType,
27
+ /* PotentialData */
28
+ type PotentialData,
29
+ type PotentialOption,
30
+ /* PotentialGrade */
31
+ PotentialGrade,
32
+ /* SoulSlotData */
33
+ type SoulSlotData,
34
+ type SoulData,
35
+ type ReadonlySoulData,
36
+ type SoulChargeOption,
37
+ type SoulOption,
38
+ } from './lib/data';
39
+ export {
40
+ supportsAddOption,
41
+ canApplyAddOption,
42
+ applyAddOption,
43
+ canResetAddOption,
44
+ resetAddOption,
45
+ getAddOption,
46
+ getAddOptionValue,
47
+ } from './lib/enhance/addOption';
48
+ export {
49
+ type ExceptionalHammer,
50
+ supportsExceptional,
51
+ canApplyExceptional,
52
+ applyExceptional,
53
+ canResetExceptional,
54
+ resetExceptional,
55
+ } from './lib/enhance/exceptional';
56
+ export {
57
+ type ReadonlyPotential,
58
+ supportsPotential,
59
+ canSetPotential,
60
+ setPotential,
61
+ resetPotential,
62
+ supportsAdditionalPotential,
63
+ canSetAdditionalPotential,
64
+ setAdditionalPotential,
65
+ resetAdditionalPotential,
66
+ } from './lib/enhance/potential';
67
+ export {
68
+ supportsSoul,
69
+ canApplySoulEnchant,
70
+ applySoulEnchant,
71
+ canSetSoul,
72
+ setSoul,
73
+ canSetSoulCharge,
74
+ setSoulCharge,
75
+ resetSoulEnchant,
76
+ } from './lib/enhance/soulSlot';
77
+ export {
78
+ SpellTraceType,
79
+ type SpellTraceRate,
80
+ type SpellTrace,
81
+ applySpellTrace,
82
+ getSpellTraceScroll,
83
+ } from './lib/enhance/spellTrace';
84
+ export {
85
+ supportsStarforce,
86
+ canStarforce,
87
+ starforce,
88
+ canStarScroll,
89
+ starScroll,
90
+ canResetStarforce,
91
+ resetStarforce,
92
+ getMaxStar,
93
+ } from './lib/enhance/starforce';
94
+ export {
95
+ type Scroll,
96
+ supportsUpgrade,
97
+ canFailScroll,
98
+ failScroll,
99
+ canResileScroll,
100
+ resileScroll,
101
+ canResetUpgrade,
102
+ resetUpgrade,
103
+ canApplyScroll,
104
+ applyScroll,
105
+ } from './lib/enhance/upgrade';
106
+ export { Gear } from './lib/Gear';
107
+ export { ReadonlyGear } from './lib/ReadonlyGear';
108
+ export { GearAttribute } from './lib/GearAttribute';
109
+ export { toGearOption } from './lib/gearOption';
110
+ export { GearReq } from './lib/GearReq';
111
+ export {
112
+ isWeapon,
113
+ isLeftWeapon,
114
+ isDoubleHandWeapon,
115
+ isSubWeapon,
116
+ isShield,
117
+ isArmor,
118
+ isAccessory,
119
+ isMechanicGear,
120
+ isDragonGear,
121
+ } from './lib/gearType';
@@ -1,3 +0,0 @@
1
- import { GearOption } from './data';
2
- export declare function addOptions(option: Partial<GearOption>, ...options: Partial<GearOption>[]): void;
3
- export declare function sumOptions(...options: Partial<GearOption>[]): Partial<GearOption>;