@bct-app/game-model 0.1.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.
@@ -0,0 +1,703 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "oneOf": [
4
+ {
5
+ "$ref": "#/definitions/AbilityChangeEffect"
6
+ },
7
+ {
8
+ "$ref": "#/definitions/AlignmentChangeEffect"
9
+ },
10
+ {
11
+ "$ref": "#/definitions/CharacterCountEffect"
12
+ },
13
+ {
14
+ "$ref": "#/definitions/CharacterChangeEffect"
15
+ },
16
+ {
17
+ "$ref": "#/definitions/CharacterPerceptionEffect"
18
+ },
19
+ {
20
+ "$ref": "#/definitions/StatusEffect"
21
+ },
22
+ {
23
+ "$ref": "#/definitions/SeatEffect"
24
+ },
25
+ {
26
+ "$ref": "#/definitions/GameEffect"
27
+ },
28
+ {
29
+ "$ref": "#/definitions/ReminderEffect"
30
+ },
31
+ {
32
+ "$ref": "#/definitions/RemoveReminderEffect"
33
+ }
34
+ ],
35
+ "definitions": {
36
+ "AbilityChangeEffect": {
37
+ "type": "object",
38
+ "properties": {
39
+ "type": {
40
+ "$ref": "#/definitions/__schema0"
41
+ },
42
+ "source": {
43
+ "$ref": "#/definitions/__schema1"
44
+ },
45
+ "target": {
46
+ "$ref": "#/definitions/TargetModel"
47
+ }
48
+ },
49
+ "required": [
50
+ "type",
51
+ "source",
52
+ "target"
53
+ ],
54
+ "additionalProperties": false,
55
+ "id": "AbilityChangeEffect",
56
+ "title": "技能变化效果模型",
57
+ "description": "表示改变目标技能的技能效果模型,包含一个来源和一个目标"
58
+ },
59
+ "__schema0": {
60
+ "type": "string",
61
+ "const": "ABILITY_CHANGE"
62
+ },
63
+ "__schema1": {
64
+ "oneOf": [
65
+ {
66
+ "$ref": "#/definitions/__schema2"
67
+ },
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "from": {
72
+ "$ref": "#/definitions/__schema3"
73
+ },
74
+ "value": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "required": [
79
+ "from",
80
+ "value"
81
+ ],
82
+ "additionalProperties": false
83
+ }
84
+ ]
85
+ },
86
+ "__schema2": {
87
+ "type": "object",
88
+ "properties": {
89
+ "from": {
90
+ "type": "string",
91
+ "const": "PAYLOAD"
92
+ },
93
+ "value": {
94
+ "anyOf": [
95
+ {
96
+ "default": 0,
97
+ "type": "number",
98
+ "minimum": 0
99
+ },
100
+ {
101
+ "default": [
102
+ 0
103
+ ],
104
+ "type": "array",
105
+ "items": {
106
+ "type": "number",
107
+ "minimum": 0
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ },
113
+ "required": [
114
+ "from",
115
+ "value"
116
+ ],
117
+ "additionalProperties": false
118
+ },
119
+ "__schema3": {
120
+ "type": "string",
121
+ "const": "CONSTANT"
122
+ },
123
+ "TargetModel": {
124
+ "oneOf": [
125
+ {
126
+ "$ref": "#/definitions/__schema4"
127
+ },
128
+ {
129
+ "$ref": "#/definitions/__schema5"
130
+ },
131
+ {
132
+ "$ref": "#/definitions/__schema6"
133
+ }
134
+ ],
135
+ "id": "TargetModel",
136
+ "title": "目标模型",
137
+ "description": "表示技能效果的目标,包含来自技能载荷、技能施放者和自定义三种来源"
138
+ },
139
+ "__schema4": {
140
+ "type": "object",
141
+ "properties": {
142
+ "from": {
143
+ "type": "string",
144
+ "const": "PAYLOAD"
145
+ },
146
+ "value": {
147
+ "anyOf": [
148
+ {
149
+ "type": "number",
150
+ "minimum": 0
151
+ },
152
+ {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "number",
156
+ "minimum": 0
157
+ }
158
+ }
159
+ ]
160
+ }
161
+ },
162
+ "required": [
163
+ "from",
164
+ "value"
165
+ ],
166
+ "additionalProperties": false
167
+ },
168
+ "__schema5": {
169
+ "type": "object",
170
+ "properties": {
171
+ "from": {
172
+ "type": "string",
173
+ "const": "EFFECTOR"
174
+ }
175
+ },
176
+ "required": [
177
+ "from"
178
+ ],
179
+ "additionalProperties": false
180
+ },
181
+ "__schema6": {
182
+ "type": "object",
183
+ "properties": {
184
+ "from": {
185
+ "type": "string",
186
+ "const": "CUSTOM"
187
+ },
188
+ "value": {
189
+ "type": "string",
190
+ "enum": [
191
+ "ALL_TOWNSFOLK",
192
+ "ALL_PLAYERS"
193
+ ]
194
+ }
195
+ },
196
+ "required": [
197
+ "from",
198
+ "value"
199
+ ],
200
+ "additionalProperties": false
201
+ },
202
+ "AlignmentChangeEffect": {
203
+ "type": "object",
204
+ "properties": {
205
+ "type": {
206
+ "$ref": "#/definitions/__schema7"
207
+ },
208
+ "source": {
209
+ "$ref": "#/definitions/__schema8"
210
+ },
211
+ "target": {
212
+ "$ref": "#/definitions/TargetModel"
213
+ }
214
+ },
215
+ "required": [
216
+ "type",
217
+ "source",
218
+ "target"
219
+ ],
220
+ "additionalProperties": false,
221
+ "id": "AlignmentChangeEffect",
222
+ "title": "阵营变化效果模型",
223
+ "description": "表示改变目标阵营的技能效果模型,包含一个来源和一个目标"
224
+ },
225
+ "__schema7": {
226
+ "type": "string",
227
+ "const": "ALIGNMENT_CHANGE"
228
+ },
229
+ "__schema8": {
230
+ "oneOf": [
231
+ {
232
+ "$ref": "#/definitions/__schema2"
233
+ },
234
+ {
235
+ "$ref": "#/definitions/__schema9"
236
+ },
237
+ {
238
+ "type": "object",
239
+ "properties": {
240
+ "from": {
241
+ "$ref": "#/definitions/__schema3"
242
+ },
243
+ "value": {
244
+ "$ref": "#/definitions/__schema10"
245
+ }
246
+ },
247
+ "required": [
248
+ "from",
249
+ "value"
250
+ ],
251
+ "additionalProperties": false
252
+ }
253
+ ]
254
+ },
255
+ "__schema9": {
256
+ "type": "object",
257
+ "properties": {
258
+ "from": {
259
+ "type": "string",
260
+ "const": "EFFECTOR"
261
+ }
262
+ },
263
+ "required": [
264
+ "from"
265
+ ],
266
+ "additionalProperties": false
267
+ },
268
+ "__schema10": {
269
+ "type": "string",
270
+ "enum": [
271
+ "GOOD",
272
+ "EVIL"
273
+ ]
274
+ },
275
+ "CharacterCountEffect": {
276
+ "type": "object",
277
+ "properties": {
278
+ "type": {
279
+ "$ref": "#/definitions/__schema11"
280
+ },
281
+ "kind": {
282
+ "$ref": "#/definitions/CharacterBasicKind"
283
+ },
284
+ "value": {
285
+ "$ref": "#/definitions/__schema12"
286
+ }
287
+ },
288
+ "required": [
289
+ "type",
290
+ "kind",
291
+ "value"
292
+ ],
293
+ "additionalProperties": false,
294
+ "id": "CharacterCountEffect",
295
+ "title": "角色数量变化效果模型",
296
+ "description": "表示改变某类角色数量的技能效果模型,包含角色类别和变化值"
297
+ },
298
+ "__schema11": {
299
+ "type": "string",
300
+ "const": "CHARACTER_COUNT_CHANGE"
301
+ },
302
+ "CharacterBasicKind": {
303
+ "type": "string",
304
+ "enum": [
305
+ "Townsfolk",
306
+ "Outsiders",
307
+ "Minions",
308
+ "Demons"
309
+ ],
310
+ "id": "CharacterBasicKind",
311
+ "title": "角色基本类别",
312
+ "description": "角色基本类别定义了游戏中角色的基本分类,通常用于技能选项中需要指定角色类别的情况"
313
+ },
314
+ "__schema12": {
315
+ "type": "number"
316
+ },
317
+ "CharacterChangeEffect": {
318
+ "type": "object",
319
+ "properties": {
320
+ "type": {
321
+ "$ref": "#/definitions/__schema13"
322
+ },
323
+ "source": {
324
+ "$ref": "#/definitions/__schema14"
325
+ },
326
+ "target": {
327
+ "$ref": "#/definitions/TargetModel"
328
+ }
329
+ },
330
+ "required": [
331
+ "type",
332
+ "source",
333
+ "target"
334
+ ],
335
+ "additionalProperties": false,
336
+ "id": "CharacterChangeEffect",
337
+ "title": "角色变化效果模型",
338
+ "description": "表示改变角色身份的技能效果模型,包含一个来源和一个目标"
339
+ },
340
+ "__schema13": {
341
+ "type": "string",
342
+ "const": "CHARACTER_CHANGE"
343
+ },
344
+ "__schema14": {
345
+ "oneOf": [
346
+ {
347
+ "$ref": "#/definitions/__schema2"
348
+ },
349
+ {
350
+ "$ref": "#/definitions/__schema9"
351
+ },
352
+ {
353
+ "type": "object",
354
+ "properties": {
355
+ "from": {
356
+ "$ref": "#/definitions/__schema3"
357
+ },
358
+ "value": {
359
+ "type": "string"
360
+ }
361
+ },
362
+ "required": [
363
+ "from",
364
+ "value"
365
+ ],
366
+ "additionalProperties": false
367
+ }
368
+ ]
369
+ },
370
+ "CharacterPerceptionEffect": {
371
+ "type": "object",
372
+ "properties": {
373
+ "type": {
374
+ "$ref": "#/definitions/__schema15"
375
+ },
376
+ "source": {
377
+ "$ref": "#/definitions/__schema14"
378
+ },
379
+ "target": {
380
+ "$ref": "#/definitions/TargetModel"
381
+ },
382
+ "followPriority": {
383
+ "$ref": "#/definitions/__schema16"
384
+ }
385
+ },
386
+ "required": [
387
+ "type",
388
+ "source",
389
+ "target"
390
+ ],
391
+ "additionalProperties": false,
392
+ "id": "CharacterPerceptionEffect",
393
+ "title": "感知角色变化效果模型",
394
+ "description": "表示改变角色感知身份的技能效果模型,包含一个来源、一个目标和可选优先级"
395
+ },
396
+ "__schema15": {
397
+ "type": "string",
398
+ "const": "PERCEIVED_CHARACTER_CHANGE"
399
+ },
400
+ "__schema16": {
401
+ "type": "boolean"
402
+ },
403
+ "StatusEffect": {
404
+ "type": "object",
405
+ "properties": {
406
+ "type": {
407
+ "$ref": "#/definitions/__schema17"
408
+ },
409
+ "source": {
410
+ "$ref": "#/definitions/__schema18"
411
+ },
412
+ "target": {
413
+ "$ref": "#/definitions/TargetModel"
414
+ }
415
+ },
416
+ "required": [
417
+ "type",
418
+ "source",
419
+ "target"
420
+ ],
421
+ "additionalProperties": false,
422
+ "id": "StatusEffect",
423
+ "title": "状态变化效果模型",
424
+ "description": "表示改变目标状态的技能效果模型,包含一个来源和一个目标"
425
+ },
426
+ "__schema17": {
427
+ "type": "string",
428
+ "const": "STATUS_CHANGE"
429
+ },
430
+ "__schema18": {
431
+ "oneOf": [
432
+ {
433
+ "$ref": "#/definitions/__schema2"
434
+ },
435
+ {
436
+ "type": "object",
437
+ "properties": {
438
+ "from": {
439
+ "$ref": "#/definitions/__schema3"
440
+ },
441
+ "value": {
442
+ "type": "string",
443
+ "enum": [
444
+ "DEAD",
445
+ "ALIVE"
446
+ ]
447
+ }
448
+ },
449
+ "required": [
450
+ "from",
451
+ "value"
452
+ ],
453
+ "additionalProperties": false
454
+ }
455
+ ]
456
+ },
457
+ "SeatEffect": {
458
+ "type": "object",
459
+ "properties": {
460
+ "type": {
461
+ "$ref": "#/definitions/__schema19"
462
+ },
463
+ "source": {
464
+ "$ref": "#/definitions/__schema20"
465
+ },
466
+ "target": {
467
+ "$ref": "#/definitions/TargetModel"
468
+ }
469
+ },
470
+ "required": [
471
+ "type",
472
+ "source",
473
+ "target"
474
+ ],
475
+ "additionalProperties": false,
476
+ "id": "SeatEffect",
477
+ "title": "座位变化效果模型",
478
+ "description": "表示改变目标座位的技能效果模型,包含一个来源和一个目标"
479
+ },
480
+ "__schema19": {
481
+ "type": "string",
482
+ "const": "SEAT_CHANGE"
483
+ },
484
+ "__schema20": {
485
+ "oneOf": [
486
+ {
487
+ "$ref": "#/definitions/__schema2"
488
+ },
489
+ {
490
+ "$ref": "#/definitions/__schema9"
491
+ },
492
+ {
493
+ "type": "object",
494
+ "properties": {
495
+ "from": {
496
+ "$ref": "#/definitions/__schema3"
497
+ },
498
+ "value": {
499
+ "type": "number",
500
+ "minimum": 1
501
+ }
502
+ },
503
+ "required": [
504
+ "from",
505
+ "value"
506
+ ],
507
+ "additionalProperties": false
508
+ }
509
+ ]
510
+ },
511
+ "GameEffect": {
512
+ "type": "object",
513
+ "properties": {
514
+ "type": {
515
+ "$ref": "#/definitions/__schema21"
516
+ },
517
+ "source": {
518
+ "$ref": "#/definitions/GameSource"
519
+ }
520
+ },
521
+ "required": [
522
+ "type",
523
+ "source"
524
+ ],
525
+ "additionalProperties": false,
526
+ "id": "GameEffect",
527
+ "title": "游戏变化效果模型",
528
+ "description": "表示改变游戏状态的技能效果模型,包含一个来源"
529
+ },
530
+ "__schema21": {
531
+ "type": "string",
532
+ "const": "GAME_CHANGE"
533
+ },
534
+ "GameSource": {
535
+ "oneOf": [
536
+ {
537
+ "$ref": "#/definitions/__schema2"
538
+ },
539
+ {
540
+ "$ref": "#/definitions/__schema22"
541
+ }
542
+ ],
543
+ "id": "GameSource",
544
+ "title": "游戏来源模型",
545
+ "description": "表示获取游戏变更信息的来源模型,包含来自技能载荷和常量两种来源"
546
+ },
547
+ "__schema22": {
548
+ "type": "object",
549
+ "properties": {
550
+ "from": {
551
+ "$ref": "#/definitions/__schema3"
552
+ },
553
+ "value": {
554
+ "$ref": "#/definitions/__schema10"
555
+ }
556
+ },
557
+ "required": [
558
+ "from",
559
+ "value"
560
+ ],
561
+ "additionalProperties": false
562
+ },
563
+ "ReminderEffect": {
564
+ "type": "object",
565
+ "properties": {
566
+ "type": {
567
+ "$ref": "#/definitions/__schema23"
568
+ },
569
+ "source": {
570
+ "$ref": "#/definitions/__schema24"
571
+ },
572
+ "target": {
573
+ "$ref": "#/definitions/TargetModel"
574
+ }
575
+ },
576
+ "required": [
577
+ "type",
578
+ "source",
579
+ "target"
580
+ ],
581
+ "additionalProperties": false,
582
+ "id": "ReminderEffect",
583
+ "title": "添加标记效果模型",
584
+ "description": "表示为目标添加标记的技能效果模型,包含一个来源和一个目标"
585
+ },
586
+ "__schema23": {
587
+ "type": "string",
588
+ "const": "REMINDER_ADD"
589
+ },
590
+ "__schema24": {
591
+ "oneOf": [
592
+ {
593
+ "$ref": "#/definitions/__schema2"
594
+ },
595
+ {
596
+ "type": "object",
597
+ "properties": {
598
+ "from": {
599
+ "$ref": "#/definitions/__schema3"
600
+ },
601
+ "value": {
602
+ "$ref": "#/definitions/Reminder"
603
+ }
604
+ },
605
+ "required": [
606
+ "from",
607
+ "value"
608
+ ],
609
+ "additionalProperties": false
610
+ }
611
+ ]
612
+ },
613
+ "Reminder": {
614
+ "type": "object",
615
+ "properties": {
616
+ "mark": {
617
+ "$ref": "#/definitions/__schema25"
618
+ },
619
+ "color": {
620
+ "$ref": "#/definitions/__schema26"
621
+ },
622
+ "description": {
623
+ "$ref": "#/definitions/__schema27"
624
+ },
625
+ "duration": {
626
+ "$ref": "#/definitions/__schema28"
627
+ }
628
+ },
629
+ "required": [
630
+ "mark"
631
+ ],
632
+ "additionalProperties": false,
633
+ "id": "Reminder",
634
+ "title": "标记模型",
635
+ "description": "表示一个标记的模型,包含标记的名称、颜色、描述和持续时间等信息"
636
+ },
637
+ "__schema25": {
638
+ "type": "string",
639
+ "minLength": 1
640
+ },
641
+ "__schema26": {
642
+ "type": "string"
643
+ },
644
+ "__schema27": {
645
+ "type": "string"
646
+ },
647
+ "__schema28": {
648
+ "type": "number",
649
+ "minimum": 0
650
+ },
651
+ "RemoveReminderEffect": {
652
+ "type": "object",
653
+ "properties": {
654
+ "type": {
655
+ "$ref": "#/definitions/__schema29"
656
+ },
657
+ "source": {
658
+ "$ref": "#/definitions/__schema30"
659
+ },
660
+ "target": {
661
+ "$ref": "#/definitions/TargetModel"
662
+ }
663
+ },
664
+ "required": [
665
+ "type",
666
+ "source",
667
+ "target"
668
+ ],
669
+ "additionalProperties": false,
670
+ "id": "RemoveReminderEffect",
671
+ "title": "移除标记效果模型",
672
+ "description": "表示从目标移除标记的技能效果模型,包含一个来源和一个目标"
673
+ },
674
+ "__schema29": {
675
+ "type": "string",
676
+ "const": "REMINDER_REMOVE"
677
+ },
678
+ "__schema30": {
679
+ "oneOf": [
680
+ {
681
+ "$ref": "#/definitions/__schema2"
682
+ },
683
+ {
684
+ "type": "object",
685
+ "properties": {
686
+ "from": {
687
+ "$ref": "#/definitions/__schema3"
688
+ },
689
+ "value": {
690
+ "type": "number",
691
+ "minimum": 0
692
+ }
693
+ },
694
+ "required": [
695
+ "from",
696
+ "value"
697
+ ],
698
+ "additionalProperties": false
699
+ }
700
+ ]
701
+ }
702
+ }
703
+ }