koishi-plugin-toram 0.8.0 → 0.8.2-onlyTest

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.
@@ -12090,17 +12090,17 @@
12090
12090
  [
12091
12091
  1191,
12092
12092
  "update",
12093
- "赏月活动结束,配方额外持续1周至10月6日。",
12093
+ "暂无",
12094
12094
  null,
12095
12095
  null,
12096
12096
  null,
12097
12097
  null,
12098
- "1695978000000"
12098
+ null
12099
12099
  ],
12100
12100
  [
12101
12101
  1192,
12102
12102
  "update",
12103
- "①新剧情任务\/地图\/配方(12章:带孩子的龙人夫妻),等级上限提升至255。②万圣节活动开启,持续5周至11月10日。③秋季美食活动结束,配方额外持续1周至10月13日。④撤除赏月活动配方。",
12103
+ "①新剧情任务\/地图\/配方(12章:带孩子的龙人夫妻),等级上限提升至255。②万圣节活动开启,持续5周至11月10日。③秋季美食活动结束,配方额外持续1周至10月13日。④赏月活动结束,配方额外持续1周至10月13日。",
12104
12104
  null,
12105
12105
  null,
12106
12106
  null,
@@ -12110,7 +12110,7 @@
12110
12110
  [
12111
12111
  1193,
12112
12112
  "update",
12113
- "①史东迪的实验开放210级难度。②撤除秋季美食活动的配方。",
12113
+ "①史东迪的实验开放210级难度。②撤除秋季美食活动的配方。③撤除赏月活动配方。",
12114
12114
  null,
12115
12115
  null,
12116
12116
  null,
package/lib/index.js CHANGED
@@ -24,14 +24,16 @@ async function apply(ctx, config) {
24
24
  Type: 'string',
25
25
  SubType: 'string',
26
26
  Values: 'string' // 对象的值
27
- }, { primary: 'id' });
28
- const ver = '0.8.0'; //当前版本
29
- const 等级_经验倍率数组 = [11, 11, 11, 11, 11, 10, 9, 7, 3];
27
+ }, {
28
+ primary: 'id'
29
+ });
30
+ const ver = '0.8.1'; //当前版本
31
+ const 等级_经验倍率 = [11, 11, 11, 11, 11, 10, 9, 7, 3];
30
32
  const 简中_数字转化 = { '一': '1', '二': '2', '三': '3', '四': '4', '五': '5', '六': '6', '七': '7', '八': '8', '九': '9', '十': '10' };
31
- const InfoSetting = [{ 'type': '定点王', 'setting': config.升级_定点王数量 }, { 'type': '野王', 'setting': config.升级_野王数量 }];
33
+ const 升级_传回配置 = [{ type: '定点王', setting: config.升级_定点王数量 }, { type: '野王', setting: config.升级_野王数量 }];
32
34
  // 随手用到的变量
33
- var n, x, y, a, b, c, d, e, f, g, text, aa;
34
- var arr1 = [], arr2 = [], arr3 = [];
35
+ let n, x, y, a, b, c, d, e, f, g, text, aa;
36
+ let arr1 = [], arr2 = [], arr3 = [];
35
37
  // 外援资料
36
38
  const DishesEffect = require('./data/DishesEffect.json'); //料理对应效果
37
39
  const AbilityType = require('./data/AbilityType.json'); //能力简称对应能力
@@ -265,6 +267,9 @@ async function apply(ctx, config) {
265
267
  }
266
268
  return next();
267
269
  });
270
+ ctx.command('test18740').action(async ({ session }, ...args) => {
271
+ a = 1;
272
+ });
268
273
  // 挂狗名单指令
269
274
  ctx.command('挂狗名单').action(async ({ session }, ...args) => {
270
275
  var dogs = await ctx.database.get('toram', { Database: 'dog' });
@@ -293,7 +298,7 @@ async function apply(ctx, config) {
293
298
  const DishesType = GetDishesType[0]?.Type || 'none';
294
299
  if (DishesType == 'none') {
295
300
  var regex = new RegExp(DishesName);
296
- var GetOnesDishes = GetDishes.filter(dishes => regex.test(dishes));
301
+ var GetOnesDishes = GetDishes.filter(dishes => regex.test(dishes.Name));
297
302
  a = GetOnesDishes.length;
298
303
  // 判断玩家昵称是否匹配有料理 是 返回信息
299
304
  if (a != 0) {
@@ -311,7 +316,7 @@ async function apply(ctx, config) {
311
316
  }
312
317
  // 判断参数是否为料理简写 是 获取该简写相关料理
313
318
  var AllLevelDishes = GetDishes
314
- .filter(player => { player.Type == DishesType; })
319
+ .filter(player => player.Type == DishesType)
315
320
  .sort((player1, player2) => { return player1.Name.localeCompare(player2.Name); });
316
321
  // 检查是否存在指定等级 否 开始返回预设列表
317
322
  if (DishesLevelChoice == undefined) {
@@ -413,7 +418,7 @@ async function apply(ctx, config) {
413
418
  // 计算经验
414
419
  .map(boss => {
415
420
  var bossValues = JSON.parse(boss.Values);
416
- x = 等级_经验倍率数组[Math.abs(PlayerLevel - bossValues.level)] || 0;
421
+ x = 等级_经验倍率[Math.abs(PlayerLevel - bossValues.level)] || 0;
417
422
  return {
418
423
  ...boss,
419
424
  Values: JSON.stringify({
@@ -430,18 +435,18 @@ async function apply(ctx, config) {
430
435
  });
431
436
  // 根据配置获取头目信息并返回
432
437
  text = `${PlayerLevel}级升级所需经验为${LevelUpExp}`;
433
- for (var i = 0; i < 2; i++) {
438
+ for (var i = 0; i < 升级_传回配置.length; i++) {
434
439
  var TypeBoss = FitLevelBoss.filter(boss => {
435
- return boss.Type == InfoSetting[i].type;
440
+ return boss.Type == 升级_传回配置[i].type;
436
441
  });
437
442
  n = TypeBoss.length - 1;
438
443
  var TypeBossInfo = TypeBoss
439
- .slice(0, Math.min(n + 1, InfoSetting[i].setting))
444
+ .slice(0, Math.min(n + 1, 升级_传回配置[i].setting))
440
445
  .map(boss => {
441
446
  var bossValues = JSON.parse(boss.Values);
442
447
  return `${boss?.Name} 等级${bossValues?.level} ${bossValues?.map} 经验值${bossValues?.baseExp} ${bossValues?.element}属性`;
443
448
  }).join('\n');
444
- text += `\n\n${InfoSetting[i].type}:\n${TypeBossInfo}`;
449
+ text += `\n\n${升级_传回配置[i].type}:\n${TypeBossInfo}`;
445
450
  }
446
451
  return text;
447
452
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-toram",
3
3
  "description": "托拉姆物语小工具",
4
- "version": "0.8.0",
4
+ "version": "0.8.2-onlyTest",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],