@swrpg-online/dice 0.5.0 → 1.0.3

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.
@@ -1,86 +0,0 @@
1
- import {
2
- createSkillCheck,
3
- createCombatCheck,
4
- createOpposedCheck,
5
- createDifficultyPool
6
- } from '../src/pools';
7
-
8
- describe('Dice Pool Convenience Methods', () => {
9
- describe('createSkillCheck', () => {
10
- test('creates basic skill check pool', () => {
11
- const pool = createSkillCheck(2, 1);
12
- expect(pool).toEqual({
13
- abilityDice: 2,
14
- proficiencyDice: 1
15
- });
16
- });
17
-
18
- test('creates pool with zero dice', () => {
19
- const pool = createSkillCheck(0, 0);
20
- expect(pool).toEqual({
21
- abilityDice: 0,
22
- proficiencyDice: 0
23
- });
24
- });
25
- });
26
-
27
- describe('createCombatCheck', () => {
28
- test('creates combat check pool with boost', () => {
29
- const pool = createCombatCheck(2, 1, 1);
30
- expect(pool).toEqual({
31
- abilityDice: 2,
32
- proficiencyDice: 1,
33
- boostDice: 1
34
- });
35
- });
36
-
37
- test('creates combat check pool without boost', () => {
38
- const pool = createCombatCheck(2, 1);
39
- expect(pool).toEqual({
40
- abilityDice: 2,
41
- proficiencyDice: 1,
42
- boostDice: 0
43
- });
44
- });
45
- });
46
-
47
- describe('createOpposedCheck', () => {
48
- test('creates opposed check pool with challenge', () => {
49
- const pool = createOpposedCheck(2, 1, 2, 1);
50
- expect(pool).toEqual({
51
- abilityDice: 2,
52
- proficiencyDice: 1,
53
- difficultyDice: 2,
54
- challengeDice: 1
55
- });
56
- });
57
-
58
- test('creates opposed check pool without challenge', () => {
59
- const pool = createOpposedCheck(2, 1, 2);
60
- expect(pool).toEqual({
61
- abilityDice: 2,
62
- proficiencyDice: 1,
63
- difficultyDice: 2,
64
- challengeDice: 0
65
- });
66
- });
67
- });
68
-
69
- describe('createDifficultyPool', () => {
70
- test('creates difficulty pool with challenge', () => {
71
- const pool = createDifficultyPool(2, 1);
72
- expect(pool).toEqual({
73
- difficultyDice: 2,
74
- challengeDice: 1
75
- });
76
- });
77
-
78
- test('creates difficulty pool without challenge', () => {
79
- const pool = createDifficultyPool(2);
80
- expect(pool).toEqual({
81
- difficultyDice: 2,
82
- challengeDice: 0
83
- });
84
- });
85
- });
86
- });
package/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "commonjs",
5
- "declaration": true,
6
- "outDir": "./dist",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true
11
- },
12
- "include": ["src/**/*"],
13
- "exclude": ["node_modules", "**/*.test.ts"]
14
- }