koishi-plugin-toram 0.8.1 → 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.
Files changed (2) hide show
  1. package/lib/index.js +15 -10
  2. package/package.json +1 -1
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' });
27
+ }, {
28
+ primary: 'id'
29
+ });
28
30
  const ver = '0.8.1'; //当前版本
29
- const 等级_经验倍率数组 = [11, 11, 11, 11, 11, 10, 9, 7, 3];
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' });
@@ -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.1",
4
+ "version": "0.8.2-onlyTest",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],