@vnejs/contracts.rpg.damage 0.1.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/const.d.ts +13 -0
- package/dist/const.js +12 -0
- package/dist/events.d.ts +5 -0
- package/dist/events.js +4 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +7 -0
- package/package.json +35 -0
- package/src/const.ts +14 -0
- package/src/events.ts +6 -0
- package/src/index.ts +40 -0
- package/tsconfig.json +9 -0
package/dist/const.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const CONSTANTS: {
|
|
2
|
+
readonly SOURCES: {
|
|
3
|
+
readonly PHYSICAL: "physical";
|
|
4
|
+
readonly MAGIC: "magic";
|
|
5
|
+
};
|
|
6
|
+
readonly SUBSOURCES: {
|
|
7
|
+
readonly FIRE: "fire";
|
|
8
|
+
readonly ICE: "ice";
|
|
9
|
+
readonly PIERCING: "piercing";
|
|
10
|
+
readonly FIST: "fist";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type Constants = typeof CONSTANTS;
|
package/dist/const.js
ADDED
package/dist/events.d.ts
ADDED
package/dist/events.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "@vnejs/module";
|
|
2
|
+
import "@vnejs/shared";
|
|
3
|
+
import { CONSTANTS } from "./const.js";
|
|
4
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
5
|
+
export declare const PLUGIN_NAME: "DAMAGE";
|
|
6
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
7
|
+
export { CONSTANTS };
|
|
8
|
+
export type { Constants } from "./const.js";
|
|
9
|
+
export { SUBSCRIBE_EVENTS };
|
|
10
|
+
export type { SubscribeEvents } from "./events.js";
|
|
11
|
+
export type DamageModifier = {
|
|
12
|
+
shiftBase?: number;
|
|
13
|
+
multiplicator?: number;
|
|
14
|
+
shiftFinal?: number;
|
|
15
|
+
};
|
|
16
|
+
export type DamageEmitPayload = {
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
damage?: number;
|
|
20
|
+
} & Record<string, unknown>;
|
|
21
|
+
export type DamageCalcPayload = {
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
value: number;
|
|
25
|
+
other: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
export type DamageResult = number;
|
|
28
|
+
declare module "@vnejs/shared" {
|
|
29
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {
|
|
30
|
+
}
|
|
31
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {
|
|
32
|
+
}
|
|
33
|
+
}
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vnejs/contracts.rpg.damage",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Contracts for @vnejs/plugins.rpg.damage",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"src",
|
|
18
|
+
"tsconfig.json"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "npx @vnejs/monorepo package",
|
|
22
|
+
"publish:major": "npx @vnejs/monorepo publish major --access public",
|
|
23
|
+
"publish:minor": "npx @vnejs/monorepo publish minor --access public",
|
|
24
|
+
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
25
|
+
},
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@vnejs/module": "~0.1.0",
|
|
30
|
+
"@vnejs/shared": "~0.1.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@vnejs/configs.ts-common": "~0.1.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/const.ts
ADDED
package/src/events.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "@vnejs/module";
|
|
2
|
+
import "@vnejs/shared";
|
|
3
|
+
|
|
4
|
+
import { CONSTANTS } from "./const.js";
|
|
5
|
+
import { SUBSCRIBE_EVENTS } from "./events.js";
|
|
6
|
+
|
|
7
|
+
export const PLUGIN_NAME = "DAMAGE" as const;
|
|
8
|
+
export type PluginName = typeof PLUGIN_NAME;
|
|
9
|
+
|
|
10
|
+
export { CONSTANTS };
|
|
11
|
+
export type { Constants } from "./const.js";
|
|
12
|
+
export { SUBSCRIBE_EVENTS };
|
|
13
|
+
export type { SubscribeEvents } from "./events.js";
|
|
14
|
+
|
|
15
|
+
export type DamageModifier = {
|
|
16
|
+
shiftBase?: number;
|
|
17
|
+
multiplicator?: number;
|
|
18
|
+
shiftFinal?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type DamageEmitPayload = {
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
damage?: number;
|
|
25
|
+
} & Record<string, unknown>;
|
|
26
|
+
|
|
27
|
+
export type DamageCalcPayload = {
|
|
28
|
+
from: string;
|
|
29
|
+
to: string;
|
|
30
|
+
value: number;
|
|
31
|
+
other: Record<string, unknown>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type DamageResult = number;
|
|
35
|
+
|
|
36
|
+
declare module "@vnejs/shared" {
|
|
37
|
+
interface VnePluginEventsMap extends Record<typeof PLUGIN_NAME, typeof SUBSCRIBE_EVENTS> {}
|
|
38
|
+
|
|
39
|
+
interface VnePluginConstantsMap extends Record<typeof PLUGIN_NAME, typeof CONSTANTS> {}
|
|
40
|
+
}
|