@dicelette/core 1.7.0 → 1.8.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/dist/index.d.mts CHANGED
@@ -78,31 +78,35 @@ interface Modifier {
78
78
  sign?: Sign;
79
79
  /**
80
80
  * Value of the modifier
81
+ * @TJS-type integer
81
82
  */
82
83
  value: number;
83
84
  }
84
85
  /**
85
86
  * Statistic object template
86
87
  */
87
- type Statistic = {
88
- [name: string]: {
89
- /**
90
- * The value of the statistic that can take the stats
91
- * @TJS-type integer
92
- */
93
- max?: number;
94
- /**
95
- * The minimal value of the statistic that can take the stats
96
- * @TJS-type integer
97
- */
98
- min?: number;
99
- /**
100
- * The combinaison that can be made with ANOTHER statistic
101
- * Automatically disable the max/min value
102
- */
103
- combinaison?: string;
104
- };
105
- };
88
+ type Statistic = Record<
89
+ /**
90
+ * The name of the statistic
91
+ * @TJS-type string
92
+ */
93
+ string, {
94
+ /**
95
+ * The value of the statistic that can take the stats
96
+ * @TJS-type integer
97
+ */
98
+ max?: number;
99
+ /**
100
+ * The minimal value of the statistic that can take the stats
101
+ * @TJS-type integer
102
+ */
103
+ min?: number;
104
+ /**
105
+ * The combinaison that can be made with ANOTHER statistic
106
+ * Automatically disable the max/min value
107
+ */
108
+ combinaison?: string;
109
+ }>;
106
110
  /**
107
111
  * @example
108
112
  * diceType: 1d20+$>=20
@@ -174,6 +178,11 @@ interface CustomCritical {
174
178
  * If "true", the comparison will be made on the natural dice result, without any modifier, including the statistics bonus if any.
175
179
  */
176
180
  onNaturalDice?: boolean;
181
+ /**
182
+ * Allow to use the custom critical on dbD command (damage)
183
+ * @default false
184
+ */
185
+ affectSkill?: boolean;
177
186
  }
178
187
 
179
188
  /**
package/dist/index.d.ts CHANGED
@@ -78,31 +78,35 @@ interface Modifier {
78
78
  sign?: Sign;
79
79
  /**
80
80
  * Value of the modifier
81
+ * @TJS-type integer
81
82
  */
82
83
  value: number;
83
84
  }
84
85
  /**
85
86
  * Statistic object template
86
87
  */
87
- type Statistic = {
88
- [name: string]: {
89
- /**
90
- * The value of the statistic that can take the stats
91
- * @TJS-type integer
92
- */
93
- max?: number;
94
- /**
95
- * The minimal value of the statistic that can take the stats
96
- * @TJS-type integer
97
- */
98
- min?: number;
99
- /**
100
- * The combinaison that can be made with ANOTHER statistic
101
- * Automatically disable the max/min value
102
- */
103
- combinaison?: string;
104
- };
105
- };
88
+ type Statistic = Record<
89
+ /**
90
+ * The name of the statistic
91
+ * @TJS-type string
92
+ */
93
+ string, {
94
+ /**
95
+ * The value of the statistic that can take the stats
96
+ * @TJS-type integer
97
+ */
98
+ max?: number;
99
+ /**
100
+ * The minimal value of the statistic that can take the stats
101
+ * @TJS-type integer
102
+ */
103
+ min?: number;
104
+ /**
105
+ * The combinaison that can be made with ANOTHER statistic
106
+ * Automatically disable the max/min value
107
+ */
108
+ combinaison?: string;
109
+ }>;
106
110
  /**
107
111
  * @example
108
112
  * diceType: 1d20+$>=20
@@ -174,6 +178,11 @@ interface CustomCritical {
174
178
  * If "true", the comparison will be made on the natural dice result, without any modifier, including the statistics bonus if any.
175
179
  */
176
180
  onNaturalDice?: boolean;
181
+ /**
182
+ * Allow to use the custom critical on dbD command (damage)
183
+ * @default false
184
+ */
185
+ affectSkill?: boolean;
177
186
  }
178
187
 
179
188
  /**
package/package.json CHANGED
@@ -1,56 +1,55 @@
1
1
  {
2
- "name": "@dicelette/core",
3
- "version": "1.7.0",
4
- "description": "Core library for the Dicelette Discord bot",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/Dicelette/core.git"
8
- },
9
- "type": "commonjs",
10
- "main": "./dist/index.js",
11
- "module": "./dist/index.mjs",
12
- "types": "./dist/index.d.ts",
13
- "files": [
14
- "dist"
15
- ],
16
- "keywords": [
17
- "discord",
18
- "roll",
19
- "library",
20
- "bot",
21
- "typescript"
22
- ],
23
- "author": "Mara-Li",
24
- "license": "GPL-3.0-only",
25
- "dependencies": {
26
- "@dice-roller/rpg-dice-roller": "^5.5.0",
27
- "mathjs": "^14.0.0",
28
- "moment": "^2.30.1",
29
- "random-js": "^2.1.0",
30
- "remove-accents": "^0.5.0",
31
- "ts-dedent": "^2.2.0",
32
- "uniformize": "^2.2.0",
33
- "vite-tsconfig-paths": "^5.1.3",
34
- "zod": "^3.23.8"
35
- },
36
- "devDependencies": {
37
- "@biomejs/biome": "1.9.4",
38
- "@types/bun": "^1.1.14",
39
- "commit-and-tag-version": "^12.5.0",
40
- "tslib": "^2.8.1",
41
- "tsup": "^8.3.5",
42
- "typescript": "^5.7.2",
43
- "typescript-json-schema": "^0.65.1",
44
- "zod-to-json-schema": "^3.23.5"
45
- },
46
- "scripts": {
47
- "test": "vitest",
48
- "build": "tsup && bun run schema",
49
- "schema": "typescript-json-schema tsconfig.json \"StatisticalSchema\" --required --includeComments -o dicelette.schema.json",
50
- "prerelease": "npm run build",
51
- "lint": "biome format --write src",
52
- "tsc": "tsc --noEmit --skipLibCheck",
53
- "release": "commit-and-tag-version",
54
- "postrelease": "git push --follow-tags origin main && pnpm publish"
55
- }
56
- }
2
+ "name": "@dicelette/core",
3
+ "version": "1.8.0",
4
+ "description": "Core library for the Dicelette Discord bot",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Dicelette/core.git"
8
+ },
9
+ "type": "commonjs",
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.mjs",
12
+ "types": "./dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "test": "vitest",
18
+ "build": "tsup",
19
+ "prerelease": "npm run build",
20
+ "lint": "biome format --write src",
21
+ "tsc": "tsc --noEmit --skipLibCheck",
22
+ "release": "commit-and-tag-version",
23
+ "postrelease": "git push --follow-tags origin main && pnpm publish"
24
+ },
25
+ "keywords": [
26
+ "discord",
27
+ "roll",
28
+ "library",
29
+ "bot",
30
+ "typescript"
31
+ ],
32
+ "author": "Mara-Li",
33
+ "license": "GPL-3.0-only",
34
+ "dependencies": {
35
+ "@dice-roller/rpg-dice-roller": "^5.5.0",
36
+ "mathjs": "^14.0.0",
37
+ "moment": "^2.30.1",
38
+ "random-js": "^2.1.0",
39
+ "remove-accents": "^0.5.0",
40
+ "ts-dedent": "^2.2.0",
41
+ "uniformize": "^2.2.0",
42
+ "vite-tsconfig-paths": "^5.1.3",
43
+ "zod": "^3.23.8"
44
+ },
45
+ "devDependencies": {
46
+ "@biomejs/biome": "1.9.4",
47
+ "@types/bun": "^1.1.14",
48
+ "commit-and-tag-version": "^12.5.0",
49
+ "tslib": "^2.8.1",
50
+ "tsup": "^8.3.5",
51
+ "typescript": "^5.7.2",
52
+ "typescript-json-schema": "^0.65.1",
53
+ "zod-to-json-schema": "^3.23.5"
54
+ }
55
+ }