koishi-plugin-toram 0.8.2-onlyTest → 1.0.0-alpha-2

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,42 @@
1
+ import { EnchantEffect } from './interface';
2
+ export declare class NameType {
3
+ name: string;
4
+ type: string;
5
+ }
6
+ export declare class KeyValue {
7
+ key: string;
8
+ value: number;
9
+ constructor(key: string, value: number);
10
+ }
11
+ export declare class Equipment {
12
+ abilityList: EquipmentAbility[];
13
+ potential: number;
14
+ type: string;
15
+ constructor(abilityList: EquipmentAbility[], potential: number, type: string);
16
+ }
17
+ export declare class EquipmentAbility extends KeyValue {
18
+ }
19
+ export declare class RatioMap {
20
+ playerAbility: number;
21
+ hpmp: number;
22
+ atk: number;
23
+ def: number;
24
+ hit: number;
25
+ flee: number;
26
+ speed: number;
27
+ ctr: number;
28
+ toElement: number;
29
+ }
30
+ export declare class Enchant {
31
+ name: string;
32
+ value: number;
33
+ effect: EnchantEffect;
34
+ constructor(name: string, value: number);
35
+ }
36
+ export declare class ReduceCombination {
37
+ index: number;
38
+ enchantList: Enchant[];
39
+ potentialGet: number;
40
+ ratio: number;
41
+ constructor(index: number, enchantList: Enchant[], potentialGet: number, ratio: number);
42
+ }
package/lib/classes.js ADDED
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReduceCombination = exports.Enchant = exports.RatioMap = exports.EquipmentAbility = exports.Equipment = exports.KeyValue = exports.NameType = void 0;
4
+ // 名称类型对应
5
+ class NameType {
6
+ constructor() {
7
+ this.name = ''; // 名称
8
+ this.type = ''; // 类型
9
+ }
10
+ }
11
+ exports.NameType = NameType;
12
+ // 键值对应
13
+ class KeyValue {
14
+ constructor(key, value) {
15
+ this.value = 0; // 数值
16
+ this.key = key;
17
+ this.value = value;
18
+ }
19
+ }
20
+ exports.KeyValue = KeyValue;
21
+ // 装备
22
+ class Equipment {
23
+ constructor(abilityList, potential, type) {
24
+ this.abilityList = []; // 装备词条栏目
25
+ this.potential = 0; // 剩余潜力
26
+ this.type = ''; // 装备的类型
27
+ this.abilityList = abilityList;
28
+ this.potential = potential;
29
+ this.type = type;
30
+ }
31
+ }
32
+ exports.Equipment = Equipment;
33
+ // 装备词条栏目
34
+ class EquipmentAbility extends KeyValue {
35
+ }
36
+ exports.EquipmentAbility = EquipmentAbility;
37
+ // 附魔倍率列表
38
+ class RatioMap {
39
+ constructor() {
40
+ this.playerAbility = 0; // 玩家属性项
41
+ this.hpmp = 0; // 体力/魔法值项
42
+ this.atk = 0; // 攻击项
43
+ this.def = 0; // 防御项
44
+ this.hit = 0; // 命中项
45
+ this.flee = 0; // 回避项
46
+ this.speed = 0; // 速度项
47
+ this.ctr = 0; // 暴击项
48
+ this.toElement = 0; // 对属项
49
+ }
50
+ }
51
+ exports.RatioMap = RatioMap;
52
+ // 所有附魔属性效应值
53
+ const enchantEffectMap = require('./data/enchant_effect');
54
+ // 附魔栏目
55
+ class Enchant {
56
+ constructor(name, value) {
57
+ this.name = ''; // 附魔属性名称
58
+ this.value = 0; // 附魔属性值
59
+ this.name = name;
60
+ this.value = value;
61
+ this.effect = enchantEffectMap[name];
62
+ }
63
+ }
64
+ exports.Enchant = Enchant;
65
+ // 退潜组合属性
66
+ class ReduceCombination {
67
+ constructor(index, enchantList, potentialGet, ratio) {
68
+ this.index = 0; // 组合项下标
69
+ this.enchantList = []; // 组合内容
70
+ this.potentialGet = 0; // 总获得潜力
71
+ // size: string = '' // 组合项格式
72
+ this.ratio = 0;
73
+ this.index = index;
74
+ this.enchantList = enchantList;
75
+ this.potentialGet = potentialGet;
76
+ this.ratio = ratio;
77
+ }
78
+ }
79
+ exports.ReduceCombination = ReduceCombination;
@@ -0,0 +1,41 @@
1
+ {
2
+ "炖牛肉" : "仇恨值增加",
3
+ "奶油炖菜" : "仇恨值减少",
4
+ "黄金炒饭" : "体力值上限",
5
+ "烩炒饭" : "魔法值上限",
6
+ "鲣鱼饭团" : "力量",
7
+ "梅干饭团" : "智力",
8
+ "金枪鱼蛋黄酱饭团" : "耐力",
9
+ "明太子饭团" : "敏捷",
10
+ "鲑鱼饭团" : "灵巧",
11
+ "章鱼烧" : "暴击率",
12
+ "日式炒面" : "攻击魔法回复",
13
+ "玛格丽特披萨" : "武器物理攻击",
14
+ "辣香肠披萨" : "物理攻击",
15
+ "海鲜披萨" : "魔法攻击",
16
+ "酱油拉面" : "命中",
17
+ "盐味拉面" : "回避",
18
+ "豚骨拉面" : "物理防御",
19
+ "味增拉面" : "魔法防御",
20
+ "水果百汇" : "掉宝率加成",
21
+ "巧克力百汇" : "经验值加成",
22
+ "巧克力蛋糕" : "物理屏障",
23
+ "起司蛋糕" : "魔法屏障",
24
+ "美式松饼" : "百分比屏障",
25
+ "牛肉汉堡" : "物理抗性",
26
+ "鱼排汉堡" : "魔法抗性",
27
+ "蜂蜜吐司" : "光属性抗性",
28
+ "布丁吐司" : "土属性抗性",
29
+ "香草吐司" : "无属性抗性",
30
+ "香蒜吐司" : "暗属性抗性",
31
+ "鲔鱼吐司" : "水属性抗性",
32
+ "煎蛋吐司" : "火属性抗性",
33
+ "起司吐司" : "风属性抗性",
34
+ "奶油培根意大利面" : "对光属性伤害",
35
+ "青酱意大利面" : "对地属性伤害",
36
+ "香蒜辣椒意大利面" : "对无属性伤害",
37
+ "墨鱼意大利面" : "对暗属性伤害",
38
+ "蛤蜊意大利面" : "对水属性伤害",
39
+ "肉酱意大利面" : "对火属性伤害",
40
+ "那不勒斯意大利面" : "对风属性伤害"
41
+ }
@@ -0,0 +1,452 @@
1
+ {
2
+ "力量": {
3
+ "type": "playerAbility",
4
+ "min": -25,
5
+ "max": 25,
6
+ "ExValue": 20,
7
+ "ExBefore": 1,
8
+ "ExAfter": 1,
9
+ "PotentialUse": 5,
10
+ "double": ""
11
+ },
12
+ "%力量": {
13
+ "type": "playerAbility",
14
+ "min": -10,
15
+ "max": 10,
16
+ "ExValue": 10,
17
+ "ExBefore": 1,
18
+ "ExAfter": 1,
19
+ "PotentialUse": 10,
20
+ "double": ""
21
+ },
22
+ "灵巧": {
23
+ "type": "playerAbility",
24
+ "min": -25,
25
+ "max": 25,
26
+ "ExValue": 20,
27
+ "ExBefore": 1,
28
+ "ExAfter": 1,
29
+ "PotentialUse": 5,
30
+ "double": ""
31
+ },
32
+ "%灵巧": {
33
+ "type": "playerAbility",
34
+ "min": -10,
35
+ "max": 10,
36
+ "ExValue": 10,
37
+ "ExBefore": 1,
38
+ "ExAfter": 1,
39
+ "PotentialUse": 10,
40
+ "double": ""
41
+ },
42
+ "智力": {
43
+ "type": "playerAbility",
44
+ "min": -25,
45
+ "max": 25,
46
+ "ExValue": 20,
47
+ "ExBefore": 1,
48
+ "ExAfter": 1,
49
+ "PotentialUse": 5,
50
+ "double": ""
51
+ },
52
+ "%智力": {
53
+ "type": "playerAbility",
54
+ "min": -10,
55
+ "max": 10,
56
+ "ExValue": 10,
57
+ "ExBefore": 1,
58
+ "ExAfter": 1,
59
+ "PotentialUse": 10,
60
+ "double": ""
61
+ },
62
+ "敏捷": {
63
+ "type": "playerAbility",
64
+ "min": -25,
65
+ "max": 25,
66
+ "ExValue": 20,
67
+ "ExBefore": 1,
68
+ "ExAfter": 1,
69
+ "PotentialUse": 5,
70
+ "double": ""
71
+ },
72
+ "%敏捷": {
73
+ "type": "playerAbility",
74
+ "min": -10,
75
+ "max": 10,
76
+ "ExValue": 10,
77
+ "ExBefore": 1,
78
+ "ExAfter": 1,
79
+ "PotentialUse": 10,
80
+ "double": ""
81
+ },
82
+ "耐力": {
83
+ "type": "playerAbility",
84
+ "min": -25,
85
+ "max": 25,
86
+ "ExValue": 20,
87
+ "ExBefore": 1,
88
+ "ExAfter": 1,
89
+ "PotentialUse": 5,
90
+ "double": ""
91
+ },
92
+ "%耐力": {
93
+ "type": "playerAbility",
94
+ "min": -10,
95
+ "max": 10,
96
+ "ExValue": 10,
97
+ "ExBefore": 1,
98
+ "ExAfter": 1,
99
+ "PotentialUse": 10,
100
+ "double": ""
101
+ },
102
+ "hp自然恢复": {
103
+ "type": "hpmp",
104
+ "min": -25,
105
+ "max": 25,
106
+ "ExValue": 20,
107
+ "ExBefore": 1,
108
+ "ExAfter": 1,
109
+ "PotentialUse": 5,
110
+ "double": "武器"
111
+ },
112
+ "%hp自然恢复": {
113
+ "type": "hpmp",
114
+ "min": -10,
115
+ "max": 10,
116
+ "ExValue": 10,
117
+ "ExBefore": 1,
118
+ "ExAfter": 1,
119
+ "PotentialUse": 10,
120
+ "double": "武器"
121
+ },
122
+ "mp自然恢复": {
123
+ "type": "hpmp",
124
+ "min": -12,
125
+ "max": 12,
126
+ "ExValue": 10,
127
+ "ExBefore": 1,
128
+ "ExAfter": 1,
129
+ "PotentialUse": 10,
130
+ "double": "武器"
131
+ },
132
+ "%mp自然恢复": {
133
+ "type": "hpmp",
134
+ "min": -5,
135
+ "max": 5,
136
+ "ExValue": 5,
137
+ "ExBefore": 1,
138
+ "ExAfter": 1,
139
+ "PotentialUse": 20,
140
+ "double": "武器"
141
+ },
142
+ "%物理攻击": {
143
+ "type": "atk",
144
+ "min": -12,
145
+ "max": 12,
146
+ "ExValue": 10,
147
+ "ExBefore": 1,
148
+ "ExAfter": 1,
149
+ "PotentialUse": 10,
150
+ "double": "防具"
151
+ },
152
+ "%魔法攻击": {
153
+ "type": "atk",
154
+ "min": -12,
155
+ "max": 12,
156
+ "ExValue": 10,
157
+ "ExBefore": 1,
158
+ "ExAfter": 1,
159
+ "PotentialUse": 10,
160
+ "double": "防具"
161
+ },
162
+ "%物理贯穿": {
163
+ "type": "atk",
164
+ "min": -7,
165
+ "max": 7,
166
+ "ExValue": 5,
167
+ "ExBefore": 1,
168
+ "ExAfter": 1,
169
+ "PotentialUse": 20,
170
+ "double": "防具"
171
+ },
172
+ "%魔法贯穿": {
173
+ "type": "atk",
174
+ "min": -7,
175
+ "max": 7,
176
+ "ExValue": 5,
177
+ "ExBefore": 1,
178
+ "ExAfter": 1,
179
+ "PotentialUse": 20,
180
+ "double": "防具"
181
+ },
182
+ "%物理防御": {
183
+ "type": "def",
184
+ "min": -11,
185
+ "max": 11,
186
+ "ExValue": 10,
187
+ "ExBefore": 1,
188
+ "ExAfter": 1,
189
+ "PotentialUse": 10,
190
+ "double": "武器"
191
+ },
192
+ "%魔法防御": {
193
+ "type": "def",
194
+ "min": -11,
195
+ "max": 11,
196
+ "ExValue": 10,
197
+ "ExBefore": 1,
198
+ "ExAfter": 1,
199
+ "PotentialUse": 10,
200
+ "double": "武器"
201
+ },
202
+ "命中": {
203
+ "type": "hit",
204
+ "min": -16,
205
+ "max": 16,
206
+ "ExValue": 10,
207
+ "ExBefore": 1,
208
+ "ExAfter": 2,
209
+ "PotentialUse": 10,
210
+ "double": "防具"
211
+ },
212
+ "%命中": {
213
+ "type": "hit",
214
+ "min": -5,
215
+ "max": 5,
216
+ "ExValue": 5,
217
+ "ExBefore": 1,
218
+ "ExAfter": 1,
219
+ "PotentialUse": 20,
220
+ "double": "防具"
221
+ },
222
+ "回避": {
223
+ "type": "flee",
224
+ "min": -16,
225
+ "max": 16,
226
+ "ExValue": 10,
227
+ "ExBefore": 1,
228
+ "ExAfter": 2,
229
+ "PotentialUse": 10,
230
+ "double": "武器"
231
+ },
232
+ "%回避": {
233
+ "type": "flee",
234
+ "min": -5,
235
+ "max": 5,
236
+ "ExValue": 5,
237
+ "ExBefore": 1,
238
+ "ExAfter": 1,
239
+ "PotentialUse": 20,
240
+ "double": "武器"
241
+ },
242
+ "暴击率": {
243
+ "type": "ctr",
244
+ "min": -20,
245
+ "max": 25,
246
+ "ExValue": 20,
247
+ "ExBefore": 1,
248
+ "ExAfter": 1,
249
+ "PotentialUse": 1,
250
+ "double": ""
251
+ },
252
+ "暴击伤害": {
253
+ "type": "ctr",
254
+ "min": -20,
255
+ "max": 21,
256
+ "ExValue": 20,
257
+ "ExBefore": 1,
258
+ "ExAfter": 1,
259
+ "PotentialUse": 3,
260
+ "double": ""
261
+ },
262
+ "%暴击伤害": {
263
+ "type": "ctr",
264
+ "min": -10,
265
+ "max": 10,
266
+ "ExValue": 10,
267
+ "ExBefore": 1,
268
+ "ExAfter": 1,
269
+ "PotentialUse": 10,
270
+ "double": ""
271
+ },
272
+ "%对火属性伤害": {
273
+ "type": "toElement",
274
+ "min": -21,
275
+ "max": 21,
276
+ "ExValue": 20,
277
+ "ExBefore": 1,
278
+ "ExAfter": 1,
279
+ "PotentialUse": 5,
280
+ "double": "防具"
281
+ },
282
+ "%对水属性伤害": {
283
+ "type": "toElement",
284
+ "min": -21,
285
+ "max": 21,
286
+ "ExValue": 20,
287
+ "ExBefore": 1,
288
+ "ExAfter": 1,
289
+ "PotentialUse": 5,
290
+ "double": "防具"
291
+ },
292
+ "%对风属性伤害": {
293
+ "type": "toElement",
294
+ "min": -21,
295
+ "max": 21,
296
+ "ExValue": 20,
297
+ "ExBefore": 1,
298
+ "ExAfter": 1,
299
+ "PotentialUse": 5,
300
+ "double": "防具"
301
+ },
302
+ "%对地属性伤害": {
303
+ "type": "toElement",
304
+ "min": -21,
305
+ "max": 21,
306
+ "ExValue": 20,
307
+ "ExBefore": 1,
308
+ "ExAfter": 1,
309
+ "PotentialUse": 5,
310
+ "double": "防具"
311
+ },
312
+ "%对光属性伤害": {
313
+ "type": "toElement",
314
+ "min": -21,
315
+ "max": 21,
316
+ "ExValue": 20,
317
+ "ExBefore": 1,
318
+ "ExAfter": 1,
319
+ "PotentialUse": 5,
320
+ "double": "防具"
321
+ },
322
+ "%对暗属性伤害": {
323
+ "type": "toElement",
324
+ "min": -21,
325
+ "max": 21,
326
+ "ExValue": 20,
327
+ "ExBefore": 1,
328
+ "ExAfter": 1,
329
+ "PotentialUse": 5,
330
+ "double": "防具"
331
+ },
332
+ "火属性": {
333
+ "type": "element",
334
+ "min": 0,
335
+ "max": 1,
336
+ "ExValue": 1,
337
+ "ExBefore": 1,
338
+ "ExAfter": 1,
339
+ "PotentialUse": 100,
340
+ "double": ""
341
+ },
342
+ "水属性": {
343
+ "type": "element",
344
+ "min": 0,
345
+ "max": 1,
346
+ "ExValue": 1,
347
+ "ExBefore": 1,
348
+ "ExAfter": 1,
349
+ "PotentialUse": 100,
350
+ "double": ""
351
+ },
352
+ "风属性": {
353
+ "type": "element",
354
+ "min": 0,
355
+ "max": 1,
356
+ "ExValue": 1,
357
+ "ExBefore": 1,
358
+ "ExAfter": 1,
359
+ "PotentialUse": 100,
360
+ "double": ""
361
+ },
362
+ "地属性": {
363
+ "type": "element",
364
+ "min": 0,
365
+ "max": 1,
366
+ "ExValue": 1,
367
+ "ExBefore": 1,
368
+ "ExAfter": 1,
369
+ "PotentialUse": 100,
370
+ "double": ""
371
+ },
372
+ "光属性": {
373
+ "type": "element",
374
+ "min": 0,
375
+ "max": 1,
376
+ "ExValue": 1,
377
+ "ExBefore": 1,
378
+ "ExAfter": 1,
379
+ "PotentialUse": 100,
380
+ "double": ""
381
+ },
382
+ "暗属性": {
383
+ "type": "element",
384
+ "min": 0,
385
+ "max": 1,
386
+ "ExValue": 1,
387
+ "ExBefore": 1,
388
+ "ExAfter": 1,
389
+ "PotentialUse": 100,
390
+ "double": ""
391
+ },
392
+ "火原属": {
393
+ "type": "element",
394
+ "min": 0,
395
+ "max": 1,
396
+ "ExValue": 1,
397
+ "ExBefore": 1,
398
+ "ExAfter": 1,
399
+ "PotentialUse": 10,
400
+ "double": ""
401
+ },
402
+ "水原属": {
403
+ "type": "element",
404
+ "min": 0,
405
+ "max": 1,
406
+ "ExValue": 1,
407
+ "ExBefore": 1,
408
+ "ExAfter": 1,
409
+ "PotentialUse": 10,
410
+ "double": ""
411
+ },
412
+ "风原属": {
413
+ "type": "element",
414
+ "min": 0,
415
+ "max": 1,
416
+ "ExValue": 1,
417
+ "ExBefore": 1,
418
+ "ExAfter": 1,
419
+ "PotentialUse": 10,
420
+ "double": ""
421
+ },
422
+ "地原属": {
423
+ "type": "element",
424
+ "min": 0,
425
+ "max": 1,
426
+ "ExValue": 1,
427
+ "ExBefore": 1,
428
+ "ExAfter": 1,
429
+ "PotentialUse": 10,
430
+ "double": ""
431
+ },
432
+ "光原属": {
433
+ "type": "element",
434
+ "min": 0,
435
+ "max": 1,
436
+ "ExValue": 1,
437
+ "ExBefore": 1,
438
+ "ExAfter": 1,
439
+ "PotentialUse": 10,
440
+ "double": ""
441
+ },
442
+ "暗原属": {
443
+ "type": "element",
444
+ "min": 0,
445
+ "max": 1,
446
+ "ExValue": 1,
447
+ "ExBefore": 1,
448
+ "ExAfter": 1,
449
+ "PotentialUse": 10,
450
+ "double": ""
451
+ }
452
+ }