volleyballsimtypes 0.0.505 → 0.0.507
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/cjs/src/api/index.d.ts +2 -2
- package/dist/cjs/src/api/tactics-player-refs.js +2 -2
- package/dist/cjs/src/data/init-models.js +4 -0
- package/dist/cjs/src/data/models/base-position-preset.d.ts +22 -0
- package/dist/cjs/src/data/models/base-position-preset.js +54 -0
- package/dist/cjs/src/data/models/index.d.ts +1 -0
- package/dist/cjs/src/data/models/index.js +1 -0
- package/dist/cjs/src/data/models/tactics.d.ts +2 -2
- package/dist/cjs/src/data/transformers/tactics.test.js +10 -10
- package/dist/cjs/src/service/competition/competition-rewards.d.ts +20 -0
- package/dist/cjs/src/service/competition/competition-rewards.js +47 -0
- package/dist/cjs/src/service/competition/competition-rewards.test.d.ts +1 -0
- package/dist/cjs/src/service/competition/competition-rewards.test.js +32 -0
- package/dist/cjs/src/service/competition/index.d.ts +2 -0
- package/dist/cjs/src/service/competition/index.js +2 -0
- package/dist/cjs/src/service/competition/league-rewards.d.ts +21 -0
- package/dist/cjs/src/service/competition/league-rewards.js +58 -0
- package/dist/cjs/src/service/competition/league-rewards.test.d.ts +1 -0
- package/dist/cjs/src/service/competition/league-rewards.test.js +50 -0
- package/dist/cjs/src/service/team/base-config.d.ts +1 -0
- package/dist/cjs/src/service/team/blocking-preference.d.ts +3 -1
- package/dist/cjs/src/service/team/blocking-preference.js +2 -1
- package/dist/cjs/src/service/team/default-base-config.d.ts +4 -0
- package/dist/cjs/src/service/team/default-base-config.js +158 -0
- package/dist/cjs/src/service/team/index.d.ts +1 -0
- package/dist/cjs/src/service/team/index.js +1 -0
- package/dist/cjs/src/service/team/schemas/tactics.z.d.ts +11 -2
- package/dist/cjs/src/service/team/schemas/tactics.z.js +17 -5
- package/dist/cjs/src/service/team/schemas/tactics.z.test.js +29 -16
- package/dist/cjs/src/service/team/schemas/team.z.d.ts +11 -2
- package/dist/cjs/src/service/team/team-generator.js +6 -1
- package/dist/esm/src/api/index.d.ts +2 -2
- package/dist/esm/src/api/tactics-player-refs.js +2 -2
- package/dist/esm/src/data/init-models.js +5 -1
- package/dist/esm/src/data/models/base-position-preset.d.ts +22 -0
- package/dist/esm/src/data/models/base-position-preset.js +50 -0
- package/dist/esm/src/data/models/index.d.ts +1 -0
- package/dist/esm/src/data/models/index.js +1 -0
- package/dist/esm/src/data/models/tactics.d.ts +2 -2
- package/dist/esm/src/data/transformers/tactics.test.js +10 -10
- package/dist/esm/src/service/competition/competition-rewards.d.ts +20 -0
- package/dist/esm/src/service/competition/competition-rewards.js +43 -0
- package/dist/esm/src/service/competition/competition-rewards.test.d.ts +1 -0
- package/dist/esm/src/service/competition/competition-rewards.test.js +30 -0
- package/dist/esm/src/service/competition/index.d.ts +2 -0
- package/dist/esm/src/service/competition/index.js +2 -0
- package/dist/esm/src/service/competition/league-rewards.d.ts +21 -0
- package/dist/esm/src/service/competition/league-rewards.js +53 -0
- package/dist/esm/src/service/competition/league-rewards.test.d.ts +1 -0
- package/dist/esm/src/service/competition/league-rewards.test.js +48 -0
- package/dist/esm/src/service/team/base-config.d.ts +1 -0
- package/dist/esm/src/service/team/blocking-preference.d.ts +3 -1
- package/dist/esm/src/service/team/blocking-preference.js +1 -0
- package/dist/esm/src/service/team/default-base-config.d.ts +4 -0
- package/dist/esm/src/service/team/default-base-config.js +154 -0
- package/dist/esm/src/service/team/index.d.ts +1 -0
- package/dist/esm/src/service/team/index.js +1 -0
- package/dist/esm/src/service/team/schemas/tactics.z.d.ts +11 -2
- package/dist/esm/src/service/team/schemas/tactics.z.js +17 -5
- package/dist/esm/src/service/team/schemas/tactics.z.test.js +29 -16
- package/dist/esm/src/service/team/schemas/team.z.d.ts +11 -2
- package/dist/esm/src/service/team/team-generator.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultReceiveMap = defaultReceiveMap;
|
|
4
|
+
exports.defaultBaseConfig = defaultBaseConfig;
|
|
5
|
+
const lineup_function_1 = require("./lineup-function");
|
|
6
|
+
const player_1 = require("../player");
|
|
7
|
+
const match_1 = require("../match");
|
|
8
|
+
const COORDS = {
|
|
9
|
+
SERVE: {
|
|
10
|
+
1: { 1: { d: 10.00, r: 3.50 }, 2: { d: 0.50, r: -2.50 }, 3: { d: 0.50, r: 0.00 }, 4: { d: 0.50, r: 2.50 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 5.00, r: -2.50 } },
|
|
11
|
+
2: { 1: { d: 10.00, r: 3.50 }, 2: { d: 0.50, r: 0.00 }, 3: { d: 0.50, r: 2.50 }, 4: { d: 0.50, r: -2.50 }, 5: { d: 5.00, r: -2.50 }, 6: { d: 5.00, r: 2.50 } },
|
|
12
|
+
3: { 1: { d: 10.00, r: -3.50 }, 2: { d: 0.50, r: 2.50 }, 3: { d: 0.50, r: -2.50 }, 4: { d: 0.50, r: 0.00 }, 5: { d: 5.00, r: 2.50 }, 6: { d: 6.50, r: 0.00 } },
|
|
13
|
+
4: { 1: { d: 10.00, r: 3.50 }, 2: { d: 0.50, r: -2.50 }, 3: { d: 0.50, r: 0.00 }, 4: { d: 0.50, r: 2.50 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 5.00, r: -2.50 } },
|
|
14
|
+
5: { 1: { d: 10.00, r: 3.50 }, 2: { d: 0.50, r: 0.00 }, 3: { d: 0.50, r: 2.50 }, 4: { d: 0.50, r: -2.50 }, 5: { d: 5.00, r: -2.50 }, 6: { d: 5.00, r: 2.50 } },
|
|
15
|
+
6: { 1: { d: 10.00, r: -3.50 }, 2: { d: 0.50, r: 2.50 }, 3: { d: 0.50, r: -2.50 }, 4: { d: 0.50, r: 0.00 }, 5: { d: 5.00, r: 2.50 }, 6: { d: 6.50, r: 0.00 } }
|
|
16
|
+
},
|
|
17
|
+
RECEIVE: {
|
|
18
|
+
1: { 1: { d: 6.50, r: 3.50 }, 2: { d: 6.00, r: 3.00 }, 3: { d: 3.00, r: -3.50 }, 4: { d: 3.50, r: -4.00 }, 5: { d: 6.00, r: -3.00 }, 6: { d: 6.50, r: 0.00 } },
|
|
19
|
+
2: { 1: { d: 6.00, r: 3.00 }, 2: { d: 3.00, r: 4.00 }, 3: { d: 0.50, r: 0.50 }, 4: { d: 6.00, r: -3.00 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 1.25, r: 0.75 } },
|
|
20
|
+
3: { 1: { d: 6.00, r: 3.00 }, 2: { d: 3.00, r: 4.00 }, 3: { d: 6.00, r: -3.00 }, 4: { d: 0.95, r: -4.00 }, 5: { d: 1.00, r: -1.00 }, 6: { d: 6.50, r: 0.00 } },
|
|
21
|
+
4: { 1: { d: 8.50, r: 4.00 }, 2: { d: 6.00, r: -3.00 }, 3: { d: 1.25, r: -4.00 }, 4: { d: 0.75, r: -4.05 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 6.00, r: 3.00 } },
|
|
22
|
+
5: { 1: { d: 6.00, r: 3.00 }, 2: { d: 2.50, r: 4.00 }, 3: { d: 1.00, r: 1.50 }, 4: { d: 6.00, r: -3.00 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 8.50, r: 1.50 } },
|
|
23
|
+
6: { 1: { d: 6.00, r: 3.00 }, 2: { d: 1.00, r: 1.50 }, 3: { d: 6.00, r: -3.00 }, 4: { d: 3.00, r: -4.00 }, 5: { d: 8.50, r: -1.50 }, 6: { d: 6.50, r: 0.00 } }
|
|
24
|
+
},
|
|
25
|
+
DEFENCE: {
|
|
26
|
+
1: { 1: { d: 5.00, r: 3.00 }, 2: { d: 0.50, r: -2.50 }, 3: { d: 0.50, r: 0.00 }, 4: { d: 0.50, r: 2.50 }, 5: { d: 7.00, r: 0.00 }, 6: { d: 5.00, r: -3.00 } },
|
|
27
|
+
2: { 1: { d: 7.00, r: 0.00 }, 2: { d: 0.50, r: 0.00 }, 3: { d: 0.50, r: 2.50 }, 4: { d: 0.50, r: -2.50 }, 5: { d: 5.00, r: -3.00 }, 6: { d: 5.00, r: 3.00 } },
|
|
28
|
+
3: { 1: { d: 5.00, r: -3.00 }, 2: { d: 0.50, r: 2.50 }, 3: { d: 0.50, r: -2.50 }, 4: { d: 0.50, r: 0.00 }, 5: { d: 5.00, r: 3.00 }, 6: { d: 7.00, r: 0.00 } },
|
|
29
|
+
4: { 1: { d: 5.00, r: 3.00 }, 2: { d: 0.50, r: -2.50 }, 3: { d: 0.50, r: 0.00 }, 4: { d: 0.50, r: 2.50 }, 5: { d: 7.00, r: 0.00 }, 6: { d: 5.00, r: -3.00 } },
|
|
30
|
+
5: { 1: { d: 7.00, r: 0.00 }, 2: { d: 0.50, r: 0.00 }, 3: { d: 0.50, r: 2.50 }, 4: { d: 0.50, r: -2.50 }, 5: { d: 5.00, r: -3.00 }, 6: { d: 5.00, r: 3.00 } },
|
|
31
|
+
6: { 1: { d: 5.00, r: -3.00 }, 2: { d: 0.50, r: 2.50 }, 3: { d: 0.50, r: -2.50 }, 4: { d: 0.50, r: 0.00 }, 5: { d: 5.00, r: 3.00 }, 6: { d: 7.00, r: 0.00 } }
|
|
32
|
+
},
|
|
33
|
+
DEF_L: {
|
|
34
|
+
1: { 1: { d: 5.00, r: 1.50 }, 2: { d: 0.25, r: -4.00 }, 3: { d: 0.25, r: -3.25 }, 4: { d: 1.75, r: 1.25 }, 5: { d: 8.00, r: -0.50 }, 6: { d: 5.00, r: -4.20 } },
|
|
35
|
+
2: { 1: { d: 8.00, r: -0.50 }, 2: { d: 0.25, r: -3.25 }, 3: { d: 1.75, r: 1.25 }, 4: { d: 0.25, r: -4.00 }, 5: { d: 5.00, r: -4.20 }, 6: { d: 5.00, r: 1.50 } },
|
|
36
|
+
3: { 1: { d: 5.00, r: -4.20 }, 2: { d: 1.75, r: 1.25 }, 3: { d: 0.25, r: -4.00 }, 4: { d: 0.25, r: -3.25 }, 5: { d: 5.00, r: 1.50 }, 6: { d: 8.00, r: -0.50 } },
|
|
37
|
+
4: { 1: { d: 5.00, r: 1.50 }, 2: { d: 0.25, r: -4.00 }, 3: { d: 0.25, r: -3.25 }, 4: { d: 1.75, r: 1.25 }, 5: { d: 8.00, r: -0.50 }, 6: { d: 5.00, r: -4.20 } },
|
|
38
|
+
5: { 1: { d: 8.00, r: -0.50 }, 2: { d: 0.25, r: -3.25 }, 3: { d: 1.75, r: 1.25 }, 4: { d: 0.25, r: -4.00 }, 5: { d: 5.00, r: -4.20 }, 6: { d: 5.00, r: 1.50 } },
|
|
39
|
+
6: { 1: { d: 5.00, r: -4.20 }, 2: { d: 1.75, r: 1.25 }, 3: { d: 0.25, r: -4.00 }, 4: { d: 0.25, r: -3.25 }, 5: { d: 5.00, r: 1.50 }, 6: { d: 8.00, r: -0.50 } }
|
|
40
|
+
},
|
|
41
|
+
DEF_M: {
|
|
42
|
+
1: { 1: { d: 5.00, r: 2.50 }, 2: { d: 1.75, r: -2.50 }, 3: { d: 0.25, r: 0.00 }, 4: { d: 1.75, r: 2.50 }, 5: { d: 7.00, r: 0.00 }, 6: { d: 5.00, r: -2.50 } },
|
|
43
|
+
2: { 1: { d: 7.00, r: 0.00 }, 2: { d: 0.25, r: 0.00 }, 3: { d: 1.75, r: 2.50 }, 4: { d: 1.75, r: -2.50 }, 5: { d: 5.00, r: -2.50 }, 6: { d: 5.00, r: 2.50 } },
|
|
44
|
+
3: { 1: { d: 5.00, r: -2.50 }, 2: { d: 1.75, r: 2.50 }, 3: { d: 1.75, r: -2.50 }, 4: { d: 0.25, r: 0.00 }, 5: { d: 5.00, r: 2.50 }, 6: { d: 7.00, r: 0.00 } },
|
|
45
|
+
4: { 1: { d: 5.00, r: 2.50 }, 2: { d: 1.75, r: -2.50 }, 3: { d: 0.25, r: 0.00 }, 4: { d: 1.75, r: 2.50 }, 5: { d: 7.00, r: 0.00 }, 6: { d: 5.00, r: -2.50 } },
|
|
46
|
+
5: { 1: { d: 7.00, r: 0.00 }, 2: { d: 0.25, r: 0.00 }, 3: { d: 1.75, r: 2.50 }, 4: { d: 1.75, r: -2.50 }, 5: { d: 5.00, r: -2.50 }, 6: { d: 5.00, r: 2.50 } },
|
|
47
|
+
6: { 1: { d: 5.00, r: -2.50 }, 2: { d: 1.75, r: 2.50 }, 3: { d: 1.75, r: -2.50 }, 4: { d: 0.25, r: 0.00 }, 5: { d: 5.00, r: 2.50 }, 6: { d: 7.00, r: 0.00 } }
|
|
48
|
+
},
|
|
49
|
+
DEF_R: {
|
|
50
|
+
1: { 1: { d: 5.00, r: 4.20 }, 2: { d: 1.75, r: -1.25 }, 3: { d: 0.25, r: 3.25 }, 4: { d: 0.25, r: 4.00 }, 5: { d: 8.00, r: 0.50 }, 6: { d: 5.00, r: -1.50 } },
|
|
51
|
+
2: { 1: { d: 8.00, r: 0.50 }, 2: { d: 0.25, r: 3.25 }, 3: { d: 0.25, r: 4.00 }, 4: { d: 1.75, r: -1.25 }, 5: { d: 5.00, r: -1.50 }, 6: { d: 5.00, r: 4.20 } },
|
|
52
|
+
3: { 1: { d: 5.00, r: -1.50 }, 2: { d: 0.25, r: 4.00 }, 3: { d: 1.75, r: -1.25 }, 4: { d: 0.25, r: 3.25 }, 5: { d: 5.00, r: 4.20 }, 6: { d: 8.00, r: 0.50 } },
|
|
53
|
+
4: { 1: { d: 5.00, r: 4.20 }, 2: { d: 1.75, r: -1.25 }, 3: { d: 0.25, r: 3.25 }, 4: { d: 0.25, r: 4.00 }, 5: { d: 8.00, r: 0.50 }, 6: { d: 5.00, r: -1.50 } },
|
|
54
|
+
5: { 1: { d: 8.00, r: 0.50 }, 2: { d: 0.25, r: 3.25 }, 3: { d: 0.25, r: 4.00 }, 4: { d: 1.75, r: -1.25 }, 5: { d: 5.00, r: -1.50 }, 6: { d: 5.00, r: 4.20 } },
|
|
55
|
+
6: { 1: { d: 5.00, r: -1.50 }, 2: { d: 0.25, r: 4.00 }, 3: { d: 1.75, r: -1.25 }, 4: { d: 0.25, r: 3.25 }, 5: { d: 5.00, r: 4.20 }, 6: { d: 8.00, r: 0.50 } }
|
|
56
|
+
},
|
|
57
|
+
ATTACK: {
|
|
58
|
+
1: { 1: { d: 0.50, r: 1.50 }, 2: { d: 3.75, r: -5.00 }, 3: { d: 3.00, r: 0.25 }, 4: { d: 3.75, r: 5.00 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 4.50, r: -2.50 } },
|
|
59
|
+
2: { 1: { d: 6.50, r: 0.00 }, 2: { d: 3.00, r: 0.25 }, 3: { d: 3.75, r: 5.00 }, 4: { d: 3.75, r: -5.00 }, 5: { d: 4.50, r: -2.50 }, 6: { d: 0.50, r: 1.50 } },
|
|
60
|
+
3: { 1: { d: 4.50, r: -2.50 }, 2: { d: 3.75, r: 5.00 }, 3: { d: 3.75, r: -5.00 }, 4: { d: 3.00, r: 0.25 }, 5: { d: 0.50, r: 1.50 }, 6: { d: 6.50, r: 0.00 } },
|
|
61
|
+
4: { 1: { d: 6.50, r: 4.90 }, 2: { d: 3.75, r: -5.00 }, 3: { d: 3.00, r: 0.25 }, 4: { d: 0.50, r: 1.50 }, 5: { d: 6.50, r: 0.00 }, 6: { d: 4.50, r: -2.50 } },
|
|
62
|
+
5: { 1: { d: 6.50, r: 0.00 }, 2: { d: 3.00, r: 0.25 }, 3: { d: 0.50, r: 1.50 }, 4: { d: 3.75, r: -5.00 }, 5: { d: 4.50, r: -2.50 }, 6: { d: 6.50, r: 4.90 } },
|
|
63
|
+
6: { 1: { d: 4.50, r: -2.50 }, 2: { d: 0.50, r: 1.50 }, 3: { d: 3.75, r: -5.00 }, 4: { d: 3.00, r: 0.25 }, 5: { d: 6.50, r: 4.90 }, 6: { d: 6.50, r: 0.00 } }
|
|
64
|
+
},
|
|
65
|
+
ATK_L: {
|
|
66
|
+
1: { 1: { d: 0.75, r: 0.00 }, 2: { d: 0.50, r: -4.00 }, 3: { d: 1.00, r: -2.50 }, 4: { d: 3.50, r: 0.75 }, 5: { d: 6.25, r: -0.75 }, 6: { d: 3.50, r: -4.00 } },
|
|
67
|
+
2: { 1: { d: 6.25, r: -0.75 }, 2: { d: 1.00, r: -2.50 }, 3: { d: 3.50, r: 0.75 }, 4: { d: 0.50, r: -4.00 }, 5: { d: 3.50, r: -4.00 }, 6: { d: 0.75, r: 0.00 } },
|
|
68
|
+
3: { 1: { d: 3.50, r: -4.00 }, 2: { d: 3.50, r: 0.75 }, 3: { d: 0.50, r: -4.00 }, 4: { d: 1.00, r: -2.50 }, 5: { d: 0.75, r: 0.00 }, 6: { d: 6.25, r: -0.75 } },
|
|
69
|
+
4: { 1: { d: 3.50, r: 0.75 }, 2: { d: 0.50, r: -4.00 }, 3: { d: 1.00, r: -2.50 }, 4: { d: 0.75, r: 0.00 }, 5: { d: 6.25, r: -0.75 }, 6: { d: 3.50, r: -4.00 } },
|
|
70
|
+
5: { 1: { d: 6.25, r: -0.75 }, 2: { d: 1.00, r: -2.50 }, 3: { d: 0.75, r: 0.00 }, 4: { d: 0.50, r: -4.00 }, 5: { d: 3.50, r: -4.00 }, 6: { d: 3.50, r: 0.75 } },
|
|
71
|
+
6: { 1: { d: 3.50, r: -4.00 }, 2: { d: 0.75, r: 0.00 }, 3: { d: 0.50, r: -4.00 }, 4: { d: 1.00, r: -2.50 }, 5: { d: 3.50, r: 0.75 }, 6: { d: 6.25, r: -0.75 } }
|
|
72
|
+
},
|
|
73
|
+
ATK_M: {
|
|
74
|
+
1: { 1: { d: 0.75, r: 1.25 }, 2: { d: 1.25, r: -2.00 }, 3: { d: 0.75, r: 0.50 }, 4: { d: 2.25, r: 2.60 }, 5: { d: 6.50, r: 1.50 }, 6: { d: 4.00, r: -1.50 } },
|
|
75
|
+
2: { 1: { d: 6.50, r: 1.50 }, 2: { d: 0.75, r: 0.50 }, 3: { d: 2.25, r: 2.60 }, 4: { d: 1.25, r: -2.00 }, 5: { d: 4.00, r: -1.50 }, 6: { d: 0.75, r: 1.25 } },
|
|
76
|
+
3: { 1: { d: 4.00, r: -1.50 }, 2: { d: 2.25, r: 2.60 }, 3: { d: 1.25, r: -2.00 }, 4: { d: 0.75, r: 0.50 }, 5: { d: 0.75, r: 1.25 }, 6: { d: 6.50, r: 1.50 } },
|
|
77
|
+
4: { 1: { d: 2.25, r: 2.60 }, 2: { d: 1.25, r: -2.00 }, 3: { d: 0.75, r: 0.50 }, 4: { d: 0.75, r: 1.25 }, 5: { d: 6.50, r: 1.50 }, 6: { d: 4.00, r: -1.50 } },
|
|
78
|
+
5: { 1: { d: 6.50, r: 1.50 }, 2: { d: 0.75, r: 0.50 }, 3: { d: 0.75, r: 1.25 }, 4: { d: 1.25, r: -2.00 }, 5: { d: 4.00, r: -1.50 }, 6: { d: 2.25, r: 2.60 } },
|
|
79
|
+
6: { 1: { d: 4.00, r: -1.50 }, 2: { d: 0.75, r: 1.25 }, 3: { d: 1.25, r: -2.00 }, 4: { d: 0.75, r: 0.50 }, 5: { d: 2.25, r: 2.60 }, 6: { d: 6.50, r: 1.50 } }
|
|
80
|
+
},
|
|
81
|
+
ATK_R: {
|
|
82
|
+
1: { 1: { d: 1.75, r: 2.50 }, 2: { d: 1.50, r: -1.75 }, 3: { d: 0.75, r: 1.75 }, 4: { d: 0.50, r: 4.00 }, 5: { d: 5.00, r: 3.25 }, 6: { d: 5.75, r: -2.00 } },
|
|
83
|
+
2: { 1: { d: 5.00, r: 3.25 }, 2: { d: 0.75, r: 1.75 }, 3: { d: 0.50, r: 4.00 }, 4: { d: 1.50, r: -1.75 }, 5: { d: 5.75, r: -2.00 }, 6: { d: 1.75, r: 2.50 } },
|
|
84
|
+
3: { 1: { d: 5.75, r: -2.00 }, 2: { d: 0.50, r: 4.00 }, 3: { d: 1.50, r: -1.75 }, 4: { d: 0.75, r: 1.75 }, 5: { d: 1.75, r: 2.50 }, 6: { d: 5.00, r: 3.25 } },
|
|
85
|
+
4: { 1: { d: 2.25, r: 4.00 }, 2: { d: 2.25, r: -1.75 }, 3: { d: 0.75, r: 1.50 }, 4: { d: 1.50, r: 2.25 }, 5: { d: 6.00, r: 2.25 }, 6: { d: 5.00, r: -0.75 } },
|
|
86
|
+
5: { 1: { d: 6.00, r: 2.25 }, 2: { d: 0.75, r: 1.50 }, 3: { d: 1.50, r: 2.25 }, 4: { d: 2.25, r: -1.75 }, 5: { d: 5.00, r: -0.75 }, 6: { d: 2.25, r: 4.00 } },
|
|
87
|
+
6: { 1: { d: 5.00, r: -0.75 }, 2: { d: 1.50, r: 2.25 }, 3: { d: 2.25, r: -1.75 }, 4: { d: 0.75, r: 1.50 }, 5: { d: 2.25, r: 4.00 }, 6: { d: 6.00, r: 2.25 } }
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
// The default coordinate table as a BaseConfig.coords (jsonb string keys). Shared, readonly; materialized (and so
|
|
91
|
+
// serialized) per team on save, so sharing the reference in memory is safe.
|
|
92
|
+
const DEFAULT_COORDS = (() => {
|
|
93
|
+
const out = {};
|
|
94
|
+
for (const [formation, rotations] of Object.entries(COORDS)) {
|
|
95
|
+
out[formation] = {};
|
|
96
|
+
for (const [rotation, zones] of Object.entries(rotations)) {
|
|
97
|
+
out[formation][rotation] = {};
|
|
98
|
+
for (const [zone, coord] of Object.entries(zones))
|
|
99
|
+
out[formation][rotation][zone] = { d: coord.d, r: coord.r };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return out;
|
|
103
|
+
})();
|
|
104
|
+
// The owner's authored per-point-of-attack block map for the 5-1 (owner 2026-08-07), keyed
|
|
105
|
+
// [DEF_L|DEF_M|DEF_R][rotation][zone] -> canBlock. `false` = that front-row zone sits OUT of the block for an attack
|
|
106
|
+
// from that side; `true` = reads/joins the wall. Only front-row zones (2/3/4) are tagged. Same rotation convention
|
|
107
|
+
// as DEFAULT_COORDS. Generated from the finalized 5-1 sr-mapper preset's Def L/M/R block/noblock tags.
|
|
108
|
+
const DEFAULT_BLOCKING = {
|
|
109
|
+
DEF_L: {
|
|
110
|
+
1: { 2: true, 3: true, 4: false },
|
|
111
|
+
2: { 2: true, 3: false, 4: true },
|
|
112
|
+
3: { 2: false, 3: true, 4: true },
|
|
113
|
+
4: { 2: true, 3: true, 4: false },
|
|
114
|
+
5: { 2: true, 3: false, 4: true },
|
|
115
|
+
6: { 2: false, 3: true, 4: true }
|
|
116
|
+
},
|
|
117
|
+
DEF_M: {
|
|
118
|
+
1: { 2: false, 3: true, 4: false },
|
|
119
|
+
2: { 2: true, 3: false, 4: false },
|
|
120
|
+
3: { 2: false, 3: false, 4: true },
|
|
121
|
+
4: { 2: false, 3: true, 4: false },
|
|
122
|
+
5: { 2: true, 3: false, 4: false },
|
|
123
|
+
6: { 2: false, 3: false, 4: true }
|
|
124
|
+
},
|
|
125
|
+
DEF_R: {
|
|
126
|
+
1: { 2: false, 3: true, 4: true },
|
|
127
|
+
2: { 2: true, 3: true, 4: false },
|
|
128
|
+
3: { 2: true, 3: false, 4: true },
|
|
129
|
+
4: { 2: false, 3: true, 4: true },
|
|
130
|
+
5: { 2: true, 3: true, 4: false },
|
|
131
|
+
6: { 2: true, 3: false, 4: true }
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
// Rotation index -> the setter's rotational zone (inverse of SETTER_ZONE_TO_ROTATION {1:1,6:2,5:3,4:4,3:5,2:6}).
|
|
135
|
+
const ROTATION_TO_SETTER_ZONE = { 1: 1, 2: 6, 3: 5, 4: 4, 5: 3, 6: 2 };
|
|
136
|
+
// The default serve-receive participation map: the standard 3-passer formation. A rotational slot passes iff its
|
|
137
|
+
// slot function is an OUTSIDE_HITTER (either row) or a BACK-ROW MIDDLE_BLOCKER (the libero's slot). The setter, the
|
|
138
|
+
// opposite and the front-row middle hide. slotFunctionAt maps the opposite slot to SETTER in 4-2/6-2, so the
|
|
139
|
+
// second setter is excluded too, giving the same 3-passer map for every system.
|
|
140
|
+
function defaultReceiveMap(system) {
|
|
141
|
+
const receive = {};
|
|
142
|
+
for (let rotation = 1; rotation <= 6; rotation++) {
|
|
143
|
+
const setterZone = ROTATION_TO_SETTER_ZONE[rotation];
|
|
144
|
+
const perZone = {};
|
|
145
|
+
for (let zone = 1; zone <= 6; zone++) {
|
|
146
|
+
const fn = (0, lineup_function_1.slotFunctionAt)(system, setterZone, zone);
|
|
147
|
+
perZone[String(zone)] = fn === player_1.RoleEnum.OUTSIDE_HITTER || (fn === player_1.RoleEnum.MIDDLE_BLOCKER && (0, match_1.isBackRow)(zone));
|
|
148
|
+
}
|
|
149
|
+
receive[String(rotation)] = perZone;
|
|
150
|
+
}
|
|
151
|
+
return receive;
|
|
152
|
+
}
|
|
153
|
+
// The default base config a team of the given system starts with. Every team always has one (materialized on team
|
|
154
|
+
// creation and by the backfill migration); the coordinates are the same 5-1 table for every system, only the
|
|
155
|
+
// receive map is derived per system.
|
|
156
|
+
function defaultBaseConfig(system) {
|
|
157
|
+
return { coords: DEFAULT_COORDS, receive: defaultReceiveMap(system), blocking: DEFAULT_BLOCKING };
|
|
158
|
+
}
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./team-generator"), exports);
|
|
|
19
19
|
__exportStar(require("./formation"), exports);
|
|
20
20
|
__exportStar(require("./tactics"), exports);
|
|
21
21
|
__exportStar(require("./base-config"), exports);
|
|
22
|
+
__exportStar(require("./default-base-config"), exports);
|
|
22
23
|
__exportStar(require("./team-name"), exports);
|
|
23
24
|
__exportStar(require("./energy-band"), exports);
|
|
24
25
|
__exportStar(require("./pinch-condition"), exports);
|
|
@@ -282,11 +282,19 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
282
282
|
}, z.core.$strip>>>>;
|
|
283
283
|
blockingPreferences: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
284
284
|
rotation: z.ZodNumber;
|
|
285
|
-
targets: z.
|
|
285
|
+
targets: z.ZodObject<{
|
|
286
|
+
DEF_L: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
287
|
+
DEF_M: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
288
|
+
DEF_R: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
289
|
+
}, z.core.$strip>;
|
|
286
290
|
}, z.core.$strip>>>;
|
|
287
291
|
blockingPreferenceSets: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
288
292
|
rotation: z.ZodNumber;
|
|
289
|
-
targets: z.
|
|
293
|
+
targets: z.ZodObject<{
|
|
294
|
+
DEF_L: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
295
|
+
DEF_M: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
296
|
+
DEF_R: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof RoleEnum> & z.ZodType<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum, z.core.$ZodTypeInternals<RoleEnum.SETTER | RoleEnum.OUTSIDE_HITTER | RoleEnum.OPPOSITE_HITTER | RoleEnum.MIDDLE_BLOCKER, RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
290
298
|
}, z.core.$strip>>>>;
|
|
291
299
|
basePositions: z.ZodOptional<z.ZodObject<{
|
|
292
300
|
coords: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -294,6 +302,7 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
294
302
|
r: z.ZodNumber;
|
|
295
303
|
}, z.core.$strip>>>>;
|
|
296
304
|
receive: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
305
|
+
blocking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>>;
|
|
297
306
|
}, z.core.$strip>>;
|
|
298
307
|
replaceKnockedImmediately: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
299
308
|
injuryReplacements: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -68,9 +68,16 @@ const blockingFunctionSchema = zod_1.z.union([
|
|
|
68
68
|
]);
|
|
69
69
|
// One rotation's dedicated-blocking assignments: `targets` maps my front-row starter ids to the opposing function
|
|
70
70
|
// each commits to block. Cross-field checks (keys are starters) live in the superRefine below.
|
|
71
|
+
const blockingTargetsSchema = zod_1.z.record(zod_1.z.string(), blockingFunctionSchema);
|
|
72
|
+
// Per point-of-attack defence (owner 2026-08-06): a separate front-row commit map for an attack from my left /
|
|
73
|
+
// middle / right. Each defaults to {} so a partial config stays valid.
|
|
71
74
|
const blockingPreferenceSchema = zod_1.z.object({
|
|
72
75
|
rotation: zod_1.z.number().int().min(1).max(6),
|
|
73
|
-
targets: zod_1.z.
|
|
76
|
+
targets: zod_1.z.object({
|
|
77
|
+
DEF_L: blockingTargetsSchema.default({}),
|
|
78
|
+
DEF_M: blockingTargetsSchema.default({}),
|
|
79
|
+
DEF_R: blockingTargetsSchema.default({})
|
|
80
|
+
})
|
|
74
81
|
});
|
|
75
82
|
// One set's rotation-system override (per-set tactics): system + its designated setters travel together.
|
|
76
83
|
const systemSetSchema = zod_1.z.object({
|
|
@@ -84,7 +91,10 @@ const systemSetSchema = zod_1.z.object({
|
|
|
84
91
|
const baseCoordSchema = zod_1.z.object({ d: zod_1.z.number().finite(), r: zod_1.z.number().finite() });
|
|
85
92
|
const baseConfigSchema = zod_1.z.object({
|
|
86
93
|
coords: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), baseCoordSchema))),
|
|
87
|
-
receive: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.boolean()))
|
|
94
|
+
receive: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.boolean())),
|
|
95
|
+
// Optional per-point-of-attack blocking (owner 2026-08-07): [DEF_L|DEF_M|DEF_R][rotation][zone] -> canBlock.
|
|
96
|
+
// Optional so presets/tactics saved before this field validate unchanged.
|
|
97
|
+
blocking: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.boolean()))).optional()
|
|
88
98
|
});
|
|
89
99
|
exports.TacticsInputSchema = zod_1.z.object({
|
|
90
100
|
lineup: lineupSchema,
|
|
@@ -213,9 +223,11 @@ exports.TacticsInputSchema = zod_1.z.object({
|
|
|
213
223
|
ctx.addIssue({ code: 'custom', message: 'BLOCKING_PREFERENCE_DUPLICATE_ROTATION', path });
|
|
214
224
|
}
|
|
215
225
|
seenRotations.add(pref.rotation);
|
|
216
|
-
for (const
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
for (const form of ['DEF_L', 'DEF_M', 'DEF_R']) {
|
|
227
|
+
for (const id of Object.keys(pref.targets[form] ?? {})) {
|
|
228
|
+
if (!starterIds.has(id)) {
|
|
229
|
+
ctx.addIssue({ code: 'custom', message: 'BLOCKING_PREFERENCE_BLOCKER_NOT_A_STARTER', path });
|
|
230
|
+
}
|
|
219
231
|
}
|
|
220
232
|
}
|
|
221
233
|
}
|
|
@@ -236,18 +236,31 @@ const test_helpers_1 = require("../../test-helpers");
|
|
|
236
236
|
...overrides
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
(0, globals_1.it)('accepts a blocking preference that keys starters to attacking functions', () => {
|
|
239
|
+
(0, globals_1.it)('accepts a blocking preference that keys starters to attacking functions, per defence side', () => {
|
|
240
240
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
241
|
-
blockingPreferences: [{ rotation: 1, targets: { [p4.id]: player_1.RoleEnum.OUTSIDE_HITTER, [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } }]
|
|
241
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_L: { [p4.id]: player_1.RoleEnum.OUTSIDE_HITTER }, DEF_M: {}, DEF_R: { [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } } }]
|
|
242
242
|
}));
|
|
243
243
|
(0, globals_1.expect)(res.success).toBe(true);
|
|
244
244
|
if (res.success) {
|
|
245
|
-
(0, globals_1.expect)(res.data.blockingPreferences[0].targets[p4.id]).toBe(player_1.RoleEnum.OUTSIDE_HITTER);
|
|
245
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_L[p4.id]).toBe(player_1.RoleEnum.OUTSIDE_HITTER);
|
|
246
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_R[p3.id]).toBe(player_1.RoleEnum.MIDDLE_BLOCKER);
|
|
247
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_M).toEqual({}); // the middle side is independent (empty here)
|
|
246
248
|
}
|
|
247
249
|
});
|
|
248
|
-
(0, globals_1.it)('
|
|
250
|
+
(0, globals_1.it)('defaults the omitted defence sides to empty maps', () => {
|
|
249
251
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
250
|
-
blockingPreferences: [{ rotation: 1, targets: { [
|
|
252
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_L: { [p4.id]: blocking_preference_1.NO_BLOCK } } }]
|
|
253
|
+
}));
|
|
254
|
+
(0, globals_1.expect)(res.success).toBe(true);
|
|
255
|
+
if (res.success) {
|
|
256
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_L[p4.id]).toBe(blocking_preference_1.NO_BLOCK);
|
|
257
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_M).toEqual({});
|
|
258
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_R).toEqual({});
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
(0, globals_1.it)('rejects a blocking target (on any side) that is not a starter', () => {
|
|
262
|
+
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
263
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_M: { [reserve.id]: player_1.RoleEnum.OUTSIDE_HITTER } } }]
|
|
251
264
|
}));
|
|
252
265
|
(0, globals_1.expect)(res.success).toBe(false);
|
|
253
266
|
if (!res.success) {
|
|
@@ -256,7 +269,7 @@ const test_helpers_1 = require("../../test-helpers");
|
|
|
256
269
|
});
|
|
257
270
|
(0, globals_1.it)('rejects a blocking target function of libero', () => {
|
|
258
271
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
259
|
-
blockingPreferences: [{ rotation: 1, targets: { [p4.id]: player_1.RoleEnum.LIBERO } }]
|
|
272
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_L: { [p4.id]: player_1.RoleEnum.LIBERO } } }]
|
|
260
273
|
}));
|
|
261
274
|
(0, globals_1.expect)(res.success).toBe(false);
|
|
262
275
|
if (!res.success) {
|
|
@@ -266,8 +279,8 @@ const test_helpers_1 = require("../../test-helpers");
|
|
|
266
279
|
(0, globals_1.it)('rejects a duplicate rotation in blocking preferences', () => {
|
|
267
280
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
268
281
|
blockingPreferences: [
|
|
269
|
-
{ rotation: 1, targets: { [p4.id]: player_1.RoleEnum.OUTSIDE_HITTER } },
|
|
270
|
-
{ rotation: 1, targets: { [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } }
|
|
282
|
+
{ rotation: 1, targets: { DEF_L: { [p4.id]: player_1.RoleEnum.OUTSIDE_HITTER } } },
|
|
283
|
+
{ rotation: 1, targets: { DEF_M: { [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } } }
|
|
271
284
|
]
|
|
272
285
|
}));
|
|
273
286
|
(0, globals_1.expect)(res.success).toBe(false);
|
|
@@ -277,29 +290,29 @@ const test_helpers_1 = require("../../test-helpers");
|
|
|
277
290
|
});
|
|
278
291
|
(0, globals_1.it)('accepts per-set blocking preference overrides', () => {
|
|
279
292
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
280
|
-
blockingPreferenceSets: [[{ rotation: 1, targets: { [p4.id]: player_1.RoleEnum.OPPOSITE_HITTER } }], []]
|
|
293
|
+
blockingPreferenceSets: [[{ rotation: 1, targets: { DEF_R: { [p4.id]: player_1.RoleEnum.OPPOSITE_HITTER } } }], []]
|
|
281
294
|
}));
|
|
282
295
|
(0, globals_1.expect)(res.success).toBe(true);
|
|
283
296
|
});
|
|
284
|
-
(0, globals_1.it)('accepts NO_BLOCK as an assignment, alongside a commit on another starter', () => {
|
|
297
|
+
(0, globals_1.it)('accepts NO_BLOCK as an assignment, alongside a commit on another starter, on the same side', () => {
|
|
285
298
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
286
|
-
blockingPreferences: [{ rotation: 1, targets: { [p4.id]: blocking_preference_1.NO_BLOCK, [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } }]
|
|
299
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_L: { [p4.id]: blocking_preference_1.NO_BLOCK, [p3.id]: player_1.RoleEnum.MIDDLE_BLOCKER } } }]
|
|
287
300
|
}));
|
|
288
301
|
(0, globals_1.expect)(res.success).toBe(true);
|
|
289
302
|
if (res.success) {
|
|
290
|
-
(0, globals_1.expect)(res.data.blockingPreferences[0].targets[p4.id]).toBe(blocking_preference_1.NO_BLOCK);
|
|
291
|
-
(0, globals_1.expect)(res.data.blockingPreferences[0].targets[p3.id]).toBe(player_1.RoleEnum.MIDDLE_BLOCKER);
|
|
303
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_L[p4.id]).toBe(blocking_preference_1.NO_BLOCK);
|
|
304
|
+
(0, globals_1.expect)(res.data.blockingPreferences[0].targets.DEF_L[p3.id]).toBe(player_1.RoleEnum.MIDDLE_BLOCKER);
|
|
292
305
|
}
|
|
293
306
|
});
|
|
294
307
|
(0, globals_1.it)('accepts NO_BLOCK in a per-set override', () => {
|
|
295
308
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
296
|
-
blockingPreferenceSets: [[{ rotation: 1, targets: { [p4.id]: blocking_preference_1.NO_BLOCK } }], []]
|
|
309
|
+
blockingPreferenceSets: [[{ rotation: 1, targets: { DEF_M: { [p4.id]: blocking_preference_1.NO_BLOCK } } }], []]
|
|
297
310
|
}));
|
|
298
311
|
(0, globals_1.expect)(res.success).toBe(true);
|
|
299
312
|
});
|
|
300
313
|
(0, globals_1.it)('still rejects a NO_BLOCK assignment on a player who is not a starter', () => {
|
|
301
314
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
302
|
-
blockingPreferences: [{ rotation: 1, targets: { [reserve.id]: blocking_preference_1.NO_BLOCK } }]
|
|
315
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_R: { [reserve.id]: blocking_preference_1.NO_BLOCK } } }]
|
|
303
316
|
}));
|
|
304
317
|
(0, globals_1.expect)(res.success).toBe(false);
|
|
305
318
|
if (!res.success) {
|
|
@@ -308,7 +321,7 @@ const test_helpers_1 = require("../../test-helpers");
|
|
|
308
321
|
});
|
|
309
322
|
(0, globals_1.it)('rejects an unknown assignment string', () => {
|
|
310
323
|
const res = tactics_z_1.TacticsInputSchema.safeParse(baseInput({
|
|
311
|
-
blockingPreferences: [{ rotation: 1, targets: { [p4.id]: 'NO_BLOCKING' } }]
|
|
324
|
+
blockingPreferences: [{ rotation: 1, targets: { DEF_L: { [p4.id]: 'NO_BLOCKING' } } }]
|
|
312
325
|
}));
|
|
313
326
|
(0, globals_1.expect)(res.success).toBe(false);
|
|
314
327
|
});
|
|
@@ -290,11 +290,19 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
290
290
|
}, z.core.$strip>>>>;
|
|
291
291
|
blockingPreferences: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
292
292
|
rotation: z.ZodNumber;
|
|
293
|
-
targets: z.
|
|
293
|
+
targets: z.ZodObject<{
|
|
294
|
+
DEF_L: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
295
|
+
DEF_M: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
296
|
+
DEF_R: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
294
298
|
}, z.core.$strip>>>;
|
|
295
299
|
blockingPreferenceSets: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
296
300
|
rotation: z.ZodNumber;
|
|
297
|
-
targets: z.
|
|
301
|
+
targets: z.ZodObject<{
|
|
302
|
+
DEF_L: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
303
|
+
DEF_M: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
304
|
+
DEF_R: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<typeof import("../../player").RoleEnum> & z.ZodType<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum, z.core.$ZodTypeInternals<import("../../player").RoleEnum.SETTER | import("../../player").RoleEnum.OUTSIDE_HITTER | import("../../player").RoleEnum.OPPOSITE_HITTER | import("../../player").RoleEnum.MIDDLE_BLOCKER, import("../../player").RoleEnum>>, z.ZodLiteral<"NO_BLOCK">]>>>;
|
|
305
|
+
}, z.core.$strip>;
|
|
298
306
|
}, z.core.$strip>>>>;
|
|
299
307
|
basePositions: z.ZodOptional<z.ZodObject<{
|
|
300
308
|
coords: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -302,6 +310,7 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
302
310
|
r: z.ZodNumber;
|
|
303
311
|
}, z.core.$strip>>>>;
|
|
304
312
|
receive: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
313
|
+
blocking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>>;
|
|
305
314
|
}, z.core.$strip>>;
|
|
306
315
|
replaceKnockedImmediately: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
307
316
|
injuryReplacements: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -11,6 +11,8 @@ const team_1 = require("./team");
|
|
|
11
11
|
const tactics_1 = require("./tactics");
|
|
12
12
|
const energy_band_1 = require("./energy-band");
|
|
13
13
|
const formation_1 = require("./formation");
|
|
14
|
+
const rotation_system_1 = require("./rotation-system");
|
|
15
|
+
const default_base_config_1 = require("./default-base-config");
|
|
14
16
|
const match_1 = require("../match");
|
|
15
17
|
const logger_1 = __importDefault(require("../../logger"));
|
|
16
18
|
const buildBlock = (rarity, count) => Array.from({ length: count }, () => rarity);
|
|
@@ -68,7 +70,10 @@ class TeamGenerator {
|
|
|
68
70
|
return tactics_1.Tactics.create({
|
|
69
71
|
lineup,
|
|
70
72
|
liberoReplacements: [lineup[3], lineup[6]],
|
|
71
|
-
substitutionBand: TeamGenerator.BOT_SUB_BANDS[Math.floor(Math.random() * TeamGenerator.BOT_SUB_BANDS.length)]
|
|
73
|
+
substitutionBand: TeamGenerator.BOT_SUB_BANDS[Math.floor(Math.random() * TeamGenerator.BOT_SUB_BANDS.length)],
|
|
74
|
+
// basePositions is never null: a team always carries the default base config for its system. createTactics
|
|
75
|
+
// makes 6-0 teams (Tactics.create default); when a user picks another system the API re-materializes.
|
|
76
|
+
basePositions: (0, default_base_config_1.defaultBaseConfig)(rotation_system_1.RotationSystemEnum.SIX_ZERO)
|
|
72
77
|
});
|
|
73
78
|
}
|
|
74
79
|
static createLineup(players, formation) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConfig, BoxScore, DataProps, DeclineStatus, Division as _Division, League as _League, Match as _Match, MatchSet as _MatchSet, Player as _Player, PlayerPosition, Qualifier as _Qualifier, QualifierMatch as _QualifierMatch, Rally as _Rally, RallyEvent as _RallyEvent, PointBreakdown, RallyMetrics, Season as _Season, Standing as _Standing, Team as _Team, Tournament as _Tournament, TournamentMatch as _TournamentMatch, National as _National, NationalMatch as _NationalMatch, Country as _Country, BlockingAssignment, CourtPosition, ConditionLogic, EnergyBand, MatchForfeitType, PerformanceStats, PinchCondition, RotationSystemEnum, SubBackMode, SubBand } from '../service';
|
|
1
|
+
import { BaseConfig, BoxScore, DataProps, DeclineStatus, Division as _Division, League as _League, Match as _Match, MatchSet as _MatchSet, Player as _Player, PlayerPosition, Qualifier as _Qualifier, QualifierMatch as _QualifierMatch, Rally as _Rally, RallyEvent as _RallyEvent, PointBreakdown, RallyMetrics, Season as _Season, Standing as _Standing, Team as _Team, Tournament as _Tournament, TournamentMatch as _TournamentMatch, National as _National, NationalMatch as _NationalMatch, Country as _Country, BlockingAssignment, DefenceFormation, CourtPosition, ConditionLogic, EnergyBand, MatchForfeitType, PerformanceStats, PinchCondition, RotationSystemEnum, SubBackMode, SubBand } from '../service';
|
|
2
2
|
export * from './tactics-player-refs';
|
|
3
3
|
export type Rally = DataProps<_Rally> & {
|
|
4
4
|
homePlayerPosition: PlayerPosition[];
|
|
@@ -102,7 +102,7 @@ export interface ApiOffensivePreference {
|
|
|
102
102
|
}
|
|
103
103
|
export interface ApiBlockingPreference {
|
|
104
104
|
rotation: number;
|
|
105
|
-
targets: Record<string, BlockingAssignment
|
|
105
|
+
targets: Record<DefenceFormation, Record<string, BlockingAssignment>>;
|
|
106
106
|
}
|
|
107
107
|
export interface ApiSystemSet {
|
|
108
108
|
rotationSystem: RotationSystemEnum;
|
|
@@ -26,8 +26,8 @@ export function collectTacticsPlayerIds(config) {
|
|
|
26
26
|
...((config.offensivePreferences ?? []).flatMap(p => Object.keys(p.weights))),
|
|
27
27
|
...((config.systemSets ?? []).flatMap(s => s.designatedSetters)),
|
|
28
28
|
...((config.offensivePreferenceSets ?? []).flat().flatMap(p => Object.keys(p.weights))),
|
|
29
|
-
...((config.blockingPreferences ?? []).flatMap(p => Object.
|
|
30
|
-
...((config.blockingPreferenceSets ?? []).flat().flatMap(p => Object.
|
|
29
|
+
...((config.blockingPreferences ?? []).flatMap(p => Object.values(p.targets).flatMap(m => Object.keys(m ?? {})))),
|
|
30
|
+
...((config.blockingPreferenceSets ?? []).flat().flatMap(p => Object.values(p.targets).flatMap(m => Object.keys(m ?? {})))),
|
|
31
31
|
// Injury replacements reference reserves (roster players outside the lineup); roster membership is the only
|
|
32
32
|
// player check possible here (the schema enforces the bench/reserve role rules).
|
|
33
33
|
...((config.injuryReplacements ?? []).flatMap(ir => [ir.starterId, ir.replacementId, ir.benchBackfillId])),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthIdentityModel, AuthSessionModel, AuthUserModel, BoxScoreModel, CoachModel, ScoutModel, PhysicianModel, PhysiotherapistModel, BoxScoreTotalsModel, CompetitionChampionModel, CurrencyTransactionModel, GachaPityModel, GachaPullHistoryModel, WishlistModel, UserSettingsModel, UserDeviceTokenModel, CompetitionMatchModel, CompetitionMVPModel, CompetitionModel, CompetitionStandingsMatchModel, CompetitionStandingsModel, CompetitionTeamsModel, CountryModel, DivisionModel, DivisionSeasonModel, IterationModel, LeagueModel, MatchModel, MatchRatingModel, MatchResultModel, MatchSetModel, PerformanceStatsModel, PlayerModel, PlayerImprovementLogModel, PlayerDeclineLogModel, PlayerTeamModel, RetiredPlayerModel, PromotionMatchModel, FriendlyModel, RegionQualifierModel, NationalCountryModel, RallyModel, TacticsModel, LineupPresetModel, MatchPresetModel, EventModel, EventCompetitionModel, EventSquadModel, EventPackModel, EventPackPlayerModel, EventResultModel, EventBotTeamModel, TeamModel, TeamReplacementModel, UserCurrencyModel, UserPlayerProgressModel, UserPullGrantModel, UserTeamModel, VPERModel, NotificationModel, AppConfigModel, LegacyTeamFlagModel } from './models';
|
|
1
|
+
import { AuthIdentityModel, AuthSessionModel, AuthUserModel, BoxScoreModel, CoachModel, ScoutModel, PhysicianModel, PhysiotherapistModel, BoxScoreTotalsModel, CompetitionChampionModel, CurrencyTransactionModel, GachaPityModel, GachaPullHistoryModel, WishlistModel, UserSettingsModel, UserDeviceTokenModel, BasePositionPresetModel, CompetitionMatchModel, CompetitionMVPModel, CompetitionModel, CompetitionStandingsMatchModel, CompetitionStandingsModel, CompetitionTeamsModel, CountryModel, DivisionModel, DivisionSeasonModel, IterationModel, LeagueModel, MatchModel, MatchRatingModel, MatchResultModel, MatchSetModel, PerformanceStatsModel, PlayerModel, PlayerImprovementLogModel, PlayerDeclineLogModel, PlayerTeamModel, RetiredPlayerModel, PromotionMatchModel, FriendlyModel, RegionQualifierModel, NationalCountryModel, RallyModel, TacticsModel, LineupPresetModel, MatchPresetModel, EventModel, EventCompetitionModel, EventSquadModel, EventPackModel, EventPackPlayerModel, EventResultModel, EventBotTeamModel, TeamModel, TeamReplacementModel, UserCurrencyModel, UserPlayerProgressModel, UserPullGrantModel, UserTeamModel, VPERModel, NotificationModel, AppConfigModel, LegacyTeamFlagModel } from './models';
|
|
2
2
|
export function initModels(sequelize) {
|
|
3
3
|
const Coach = CoachModel.initModel(sequelize);
|
|
4
4
|
const Scout = ScoutModel.initModel(sequelize);
|
|
@@ -24,6 +24,7 @@ export function initModels(sequelize) {
|
|
|
24
24
|
const Wishlist = WishlistModel.initModel(sequelize);
|
|
25
25
|
const UserSettings = UserSettingsModel.initModel(sequelize);
|
|
26
26
|
const UserDeviceToken = UserDeviceTokenModel.initModel(sequelize);
|
|
27
|
+
const BasePositionPreset = BasePositionPresetModel.initModel(sequelize);
|
|
27
28
|
const Notification = NotificationModel.initModel(sequelize);
|
|
28
29
|
const AuthIdentity = AuthIdentityModel.initModel(sequelize);
|
|
29
30
|
const AuthSession = AuthSessionModel.initModel(sequelize);
|
|
@@ -72,8 +73,10 @@ export function initModels(sequelize) {
|
|
|
72
73
|
AuthUser.hasOne(Wishlist, { as: 'Wishlist', foreignKey: 'user_id' });
|
|
73
74
|
AuthUser.hasOne(UserSettings, { as: 'UserSettings', foreignKey: 'user_id' });
|
|
74
75
|
AuthUser.hasMany(UserDeviceToken, { as: 'UserDeviceTokens', foreignKey: 'user_id' });
|
|
76
|
+
AuthUser.hasMany(BasePositionPreset, { as: 'BasePositionPresets', foreignKey: 'user_id' });
|
|
75
77
|
AuthUser.hasMany(Notification, { as: 'Notifications', foreignKey: 'user_id' });
|
|
76
78
|
UserDeviceToken.belongsTo(AuthUser, { as: 'user', foreignKey: 'user_id' });
|
|
79
|
+
BasePositionPreset.belongsTo(AuthUser, { as: 'user', foreignKey: 'user_id' });
|
|
77
80
|
Notification.belongsTo(AuthUser, { as: 'user', foreignKey: 'user_id' });
|
|
78
81
|
AuthUser.hasMany(GachaPullHistory, { as: 'GachaPullHistory', foreignKey: 'user_id' });
|
|
79
82
|
AuthUser.hasMany(UserPullGrant, { as: 'UserPullGrants', foreignKey: 'user_id' });
|
|
@@ -351,6 +354,7 @@ export function initModels(sequelize) {
|
|
|
351
354
|
Wishlist,
|
|
352
355
|
UserSettings,
|
|
353
356
|
UserDeviceToken,
|
|
357
|
+
BasePositionPreset,
|
|
354
358
|
Notification,
|
|
355
359
|
Coach,
|
|
356
360
|
Scout,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import { BaseConfig } from '../../service';
|
|
4
|
+
export interface BasePositionPresetAttributes {
|
|
5
|
+
preset_id: string;
|
|
6
|
+
user_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
config: BaseConfig;
|
|
9
|
+
created_at?: Date;
|
|
10
|
+
}
|
|
11
|
+
export type BasePositionPresetPk = 'preset_id';
|
|
12
|
+
export type BasePositionPresetId = BasePositionPresetModel[BasePositionPresetPk];
|
|
13
|
+
export type BasePositionPresetOptionalAttributes = 'preset_id' | 'created_at';
|
|
14
|
+
export type BasePositionPresetCreationAttributes = Optional<BasePositionPresetAttributes, BasePositionPresetOptionalAttributes>;
|
|
15
|
+
export declare class BasePositionPresetModel extends Model<BasePositionPresetAttributes, BasePositionPresetCreationAttributes> implements BasePositionPresetAttributes {
|
|
16
|
+
preset_id: string;
|
|
17
|
+
user_id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
config: BaseConfig;
|
|
20
|
+
created_at?: Date;
|
|
21
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof BasePositionPresetModel;
|
|
22
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DataTypes, Model } from 'sequelize';
|
|
2
|
+
export class BasePositionPresetModel extends Model {
|
|
3
|
+
static initModel(sequelize) {
|
|
4
|
+
return BasePositionPresetModel.init({
|
|
5
|
+
preset_id: {
|
|
6
|
+
type: DataTypes.UUID,
|
|
7
|
+
allowNull: false,
|
|
8
|
+
primaryKey: true,
|
|
9
|
+
defaultValue: DataTypes.UUIDV4
|
|
10
|
+
},
|
|
11
|
+
user_id: {
|
|
12
|
+
type: DataTypes.UUID,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
references: {
|
|
15
|
+
model: 'AuthUser',
|
|
16
|
+
key: 'user_id'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
type: DataTypes.STRING,
|
|
21
|
+
allowNull: false
|
|
22
|
+
},
|
|
23
|
+
config: {
|
|
24
|
+
type: DataTypes.JSONB,
|
|
25
|
+
allowNull: false
|
|
26
|
+
},
|
|
27
|
+
created_at: {
|
|
28
|
+
type: DataTypes.DATE,
|
|
29
|
+
allowNull: false,
|
|
30
|
+
defaultValue: DataTypes.NOW
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
sequelize,
|
|
34
|
+
tableName: 'BasePositionPreset',
|
|
35
|
+
schema: 'public',
|
|
36
|
+
timestamps: false,
|
|
37
|
+
indexes: [
|
|
38
|
+
{
|
|
39
|
+
name: 'BasePositionPreset_pk',
|
|
40
|
+
unique: true,
|
|
41
|
+
fields: [{ name: 'preset_id' }]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'BasePositionPreset_user_id_idx',
|
|
45
|
+
fields: [{ name: 'user_id' }]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -38,6 +38,7 @@ export * from './team';
|
|
|
38
38
|
export * from './team-replacement';
|
|
39
39
|
export * from './tactics';
|
|
40
40
|
export * from './lineup-preset';
|
|
41
|
+
export * from './base-position-preset';
|
|
41
42
|
export * from './event';
|
|
42
43
|
export * from './event-competition';
|
|
43
44
|
export * from './event-bot-team';
|
|
@@ -38,6 +38,7 @@ export * from './team';
|
|
|
38
38
|
export * from './team-replacement';
|
|
39
39
|
export * from './tactics';
|
|
40
40
|
export * from './lineup-preset';
|
|
41
|
+
export * from './base-position-preset';
|
|
41
42
|
export * from './event';
|
|
42
43
|
export * from './event-competition';
|
|
43
44
|
export * from './event-bot-team';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import { PlayerId, TeamId, TeamModel } from '.';
|
|
4
|
-
import { BaseConfig, BlockingAssignment, ConditionLogic, CourtPosition, EnergyBand, PinchCondition, RotationSystemEnum, SubBackMode, SubBand, SubMode } from '../../service';
|
|
4
|
+
import { BaseConfig, BlockingAssignment, ConditionLogic, CourtPosition, DefenceFormation, EnergyBand, PinchCondition, RotationSystemEnum, SubBackMode, SubBand, SubMode } from '../../service';
|
|
5
5
|
export interface TacticsLineupAttributes {
|
|
6
6
|
[CourtPosition.LIBERO_ZONE]?: PlayerId;
|
|
7
7
|
[CourtPosition.LEFT_BACK]: PlayerId;
|
|
@@ -36,7 +36,7 @@ export interface OffensivePreferenceAttributes {
|
|
|
36
36
|
}
|
|
37
37
|
export interface BlockingPreferenceAttributes {
|
|
38
38
|
rotation: number;
|
|
39
|
-
targets: Record<PlayerId, BlockingAssignment
|
|
39
|
+
targets: Record<DefenceFormation, Record<PlayerId, BlockingAssignment>>;
|
|
40
40
|
}
|
|
41
41
|
export interface SystemSetAttributes {
|
|
42
42
|
rotationSystem: RotationSystemEnum;
|