@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.
- package/README.md +33 -0
- package/dist/index.d.ts +633 -0
- package/dist/schemas/character-basic-kind.schema.json +13 -0
- package/dist/schemas/character-kind.schema.json +11 -0
- package/dist/schemas/effect.schema.json +703 -0
- package/dist/schemas/game.schema.json +113 -0
- package/dist/schemas/index.json +9 -0
- package/dist/schemas/input.schema.json +523 -0
- package/dist/schemas/message.schema.json +358 -0
- package/dist/schemas/view.schema.json +382 -0
- package/package.json +49 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"targets": {
|
|
6
|
+
"$ref": "#/definitions/__schema0"
|
|
7
|
+
},
|
|
8
|
+
"content": {
|
|
9
|
+
"$ref": "#/definitions/__schema4"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"targets",
|
|
14
|
+
"content"
|
|
15
|
+
],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"id": "Message",
|
|
18
|
+
"title": "技能消息模型",
|
|
19
|
+
"description": "技能消息模型定义了技能执行过程中需要展示的信息内容和相关的目标",
|
|
20
|
+
"definitions": {
|
|
21
|
+
"__schema0": {
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "#/definitions/TargetModel"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"TargetModel": {
|
|
29
|
+
"oneOf": [
|
|
30
|
+
{
|
|
31
|
+
"$ref": "#/definitions/__schema1"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"$ref": "#/definitions/__schema2"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"$ref": "#/definitions/__schema3"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"id": "TargetModel",
|
|
41
|
+
"title": "目标模型",
|
|
42
|
+
"description": "表示技能效果的目标,包含来自技能载荷、技能施放者和自定义三种来源"
|
|
43
|
+
},
|
|
44
|
+
"__schema1": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"from": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"const": "PAYLOAD"
|
|
50
|
+
},
|
|
51
|
+
"value": {
|
|
52
|
+
"anyOf": [
|
|
53
|
+
{
|
|
54
|
+
"type": "number",
|
|
55
|
+
"minimum": 0
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "number",
|
|
61
|
+
"minimum": 0
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": [
|
|
68
|
+
"from",
|
|
69
|
+
"value"
|
|
70
|
+
],
|
|
71
|
+
"additionalProperties": false
|
|
72
|
+
},
|
|
73
|
+
"__schema2": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"from": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"const": "EFFECTOR"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"from"
|
|
83
|
+
],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"__schema3": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"from": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"const": "CUSTOM"
|
|
92
|
+
},
|
|
93
|
+
"value": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": [
|
|
96
|
+
"ALL_TOWNSFOLK",
|
|
97
|
+
"ALL_PLAYERS"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"from",
|
|
103
|
+
"value"
|
|
104
|
+
],
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"__schema4": {
|
|
108
|
+
"minItems": 1,
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"$ref": "#/definitions/MessageTemplateSegmentModel"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"MessageTemplateSegmentModel": {
|
|
115
|
+
"anyOf": [
|
|
116
|
+
{
|
|
117
|
+
"$ref": "#/definitions/__schema5"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"$ref": "#/definitions/__schema6"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"$ref": "#/definitions/__schema9"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"$ref": "#/definitions/__schema10"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"id": "MessageTemplateSegmentModel",
|
|
130
|
+
"title": "消息模板段模型",
|
|
131
|
+
"description": "消息模板段模型定义了技能消息中每个段的内容和类型,可以是纯文本、带有特定格式的玩家信息、其他类型的数值信息,或者特殊的预设信息"
|
|
132
|
+
},
|
|
133
|
+
"__schema5": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"type": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"const": "TEXT"
|
|
139
|
+
},
|
|
140
|
+
"value": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"type",
|
|
146
|
+
"value"
|
|
147
|
+
],
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
},
|
|
150
|
+
"__schema6": {
|
|
151
|
+
"oneOf": [
|
|
152
|
+
{
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"type": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"const": "PAYLOAD"
|
|
158
|
+
},
|
|
159
|
+
"value": {
|
|
160
|
+
"$ref": "#/definitions/__schema7"
|
|
161
|
+
},
|
|
162
|
+
"payloadType": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"const": "PLAYER"
|
|
165
|
+
},
|
|
166
|
+
"options": {
|
|
167
|
+
"$ref": "#/definitions/__schema8"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"type",
|
|
172
|
+
"value",
|
|
173
|
+
"payloadType",
|
|
174
|
+
"options"
|
|
175
|
+
],
|
|
176
|
+
"additionalProperties": false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"type": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"const": "PAYLOAD"
|
|
184
|
+
},
|
|
185
|
+
"value": {
|
|
186
|
+
"$ref": "#/definitions/__schema7"
|
|
187
|
+
},
|
|
188
|
+
"payloadType": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"const": "BOOLEAN"
|
|
191
|
+
},
|
|
192
|
+
"options": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"texts": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"items": [
|
|
198
|
+
{
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"type": "string"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"style": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": [
|
|
211
|
+
"ICON",
|
|
212
|
+
"TEXT"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"colors": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": [
|
|
219
|
+
{
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "string"
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"additionalProperties": false
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"type",
|
|
233
|
+
"value",
|
|
234
|
+
"payloadType"
|
|
235
|
+
],
|
|
236
|
+
"additionalProperties": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"type": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"const": "PAYLOAD"
|
|
244
|
+
},
|
|
245
|
+
"value": {
|
|
246
|
+
"$ref": "#/definitions/__schema7"
|
|
247
|
+
},
|
|
248
|
+
"payloadType": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"enum": [
|
|
251
|
+
"CHARACTER",
|
|
252
|
+
"CHARACTER_KIND",
|
|
253
|
+
"ALIGNMENT",
|
|
254
|
+
"NUMBER",
|
|
255
|
+
"TEXT",
|
|
256
|
+
"STATUS",
|
|
257
|
+
"REMINDER",
|
|
258
|
+
"PLAYER_REMINDER"
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"options": {
|
|
262
|
+
"default": {},
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {},
|
|
265
|
+
"additionalProperties": false
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": [
|
|
269
|
+
"type",
|
|
270
|
+
"value",
|
|
271
|
+
"payloadType",
|
|
272
|
+
"options"
|
|
273
|
+
],
|
|
274
|
+
"additionalProperties": false
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
"__schema7": {
|
|
279
|
+
"anyOf": [
|
|
280
|
+
{
|
|
281
|
+
"type": "number",
|
|
282
|
+
"minimum": 0
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "array",
|
|
286
|
+
"items": {
|
|
287
|
+
"type": "number",
|
|
288
|
+
"minimum": 0
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"__schema8": {
|
|
294
|
+
"default": {
|
|
295
|
+
"format": "NUMBER_AND_CHARACTER"
|
|
296
|
+
},
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"format": {
|
|
300
|
+
"$ref": "#/definitions/PlayerDisplayFormat"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"format"
|
|
305
|
+
],
|
|
306
|
+
"additionalProperties": false
|
|
307
|
+
},
|
|
308
|
+
"PlayerDisplayFormat": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"enum": [
|
|
311
|
+
"NUMBER_AND_CHARACTER",
|
|
312
|
+
"NUMBER_ONLY",
|
|
313
|
+
"CHARACTER_ONLY",
|
|
314
|
+
"ALIGNMENT_ONLY"
|
|
315
|
+
],
|
|
316
|
+
"id": "PlayerDisplayFormat",
|
|
317
|
+
"title": "玩家显示格式",
|
|
318
|
+
"description": "定义了玩家信息在技能消息中的显示格式"
|
|
319
|
+
},
|
|
320
|
+
"__schema9": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"properties": {
|
|
323
|
+
"type": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"const": "EFFECTOR"
|
|
326
|
+
},
|
|
327
|
+
"options": {
|
|
328
|
+
"$ref": "#/definitions/__schema8"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"required": [
|
|
332
|
+
"type",
|
|
333
|
+
"options"
|
|
334
|
+
],
|
|
335
|
+
"additionalProperties": false
|
|
336
|
+
},
|
|
337
|
+
"__schema10": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"properties": {
|
|
340
|
+
"type": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"const": "SPECIAL"
|
|
343
|
+
},
|
|
344
|
+
"kind": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"enum": [
|
|
347
|
+
"SPY"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"required": [
|
|
352
|
+
"type",
|
|
353
|
+
"kind"
|
|
354
|
+
],
|
|
355
|
+
"additionalProperties": false
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|