koishi-plugin-toram 0.6.4 → 0.6.6

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/lib/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export interface Config {
7
7
  升级_野王数量: number;
8
8
  料理_最低返回数量要求: number;
9
9
  天气预报_更新数量: number;
10
+ 武器附魔_潜力锁: number;
10
11
  }
11
12
  export declare const Config: Schema<Config>;
12
13
  export declare function apply(ctx: any, config: Config): Promise<void>;
package/lib/index.js CHANGED
@@ -9,7 +9,8 @@ exports.Config = koishi_1.Schema.object({
9
9
  升级_定点王数量: koishi_1.Schema.number().default(6).description('使用升级指令时返回的定点王数量'),
10
10
  升级_野王数量: koishi_1.Schema.number().default(4).description('使用升级指令时返回的野王数量'),
11
11
  料理_最低返回数量要求: koishi_1.Schema.number().default(15).description('使用料理指令且不指定等级时最少返回的玩家昵称数量(如果数据库数量满足)'),
12
- 天气预报_更新数量: koishi_1.Schema.number().default(4).description('使用天气预报指令时返回的更新内容数量(如果数据库数量满足)')
12
+ 天气预报_更新数量: koishi_1.Schema.number().default(4).description('使用天气预报指令时返回的更新内容数量(如果数据库数量满足)'),
13
+ 武器附魔_潜力锁: koishi_1.Schema.number().default(110).description('当前版本的潜力锁')
13
14
  });
14
15
  // 插件本体
15
16
  async function apply(ctx, config) {
@@ -152,54 +153,54 @@ async function apply(ctx, config) {
152
153
  // 能力简称对应能力列表
153
154
  const AbilityType = {
154
155
  's': '力量', 'S': '力量', 'str': '力量', 'STR': '力量', '力': '力量', '力量': '力量',
155
- 's%': '力量%', 'S%': '力量%', 'str%': '力量%', 'STR%': '力量%', '力%': '力量%', '力量%': '力量%', '%s': '力量%', '%S': '力量%', '%str': '力量%', '%STR': '力量%', '%力': '力量%', '%力量': '力量%',
156
- 'd': '灵巧', 'D': '灵巧', 'dex': '灵巧', 'DEX': '灵巧', '灵': '灵巧', '灵巧': '灵巧', 'd%': '灵巧%', 'D%': '灵巧%', 'dex%': '灵巧%', 'DEX%': '灵巧%', '灵%': '灵巧%', '灵巧%': '灵巧%',
157
- '%d': '灵巧%', '%D': '灵巧%', '%dex': '灵巧%', '%DEX': '灵巧%', '%灵': '灵巧%', '%灵巧': '灵巧%',
158
- 'i': '智力', 'I': '智力', 'int': '智力', 'INT': '智力', '智': '智力', '智力': '智力', 'i%': '智力%', 'I%': '智力%', 'int%': '智力%', 'INT%': '智力%', '智%': '智力%', '智力%': '智力%',
159
- '%i': '智力%', '%I': '智力%', '%int': '智力%', '%INT': '智力%', '%智': '智力%', '%智力': '智力%',
156
+ 's%': '%力量', 'S%': '%力量', 'str%': '%力量', 'STR%': '%力量', '力%': '%力量', '%力量': '%力量', '%s': '%力量', '%S': '%力量', '%str': '%力量', '%STR': '%力量', '%力': '%力量', '力量%': '%力量',
157
+ 'd': '灵巧', 'D': '灵巧', 'dex': '灵巧', 'DEX': '灵巧', '灵': '灵巧', '灵巧': '灵巧',
158
+ 'd%': '%灵巧', 'D%': '%灵巧', 'dex%': '%灵巧', 'DEX%': '%灵巧', '灵%': '%灵巧', '%灵巧': '%灵巧', '%d': '%灵巧', '%D': '%灵巧', '%dex': '%灵巧', '%DEX': '%灵巧', '%灵': '%灵巧', '灵巧%': '%灵巧',
159
+ 'i': '智力', 'I': '智力', 'int': '智力', 'INT': '智力', '智': '智力', '智力': '智力',
160
+ 'i%': '%智力', 'I%': '%智力', 'int%': '%智力', 'INT%': '%智力', '智%': '%智力', '%智力': '%智力', '%i': '%智力', '%I': '%智力', '%int': '%智力', '%INT': '%智力', '%智': '%智力', '智力%': '%智力',
160
161
  'ag': '敏捷', 'AG': '敏捷', 'agi': '敏捷', 'AGI': '敏捷', '敏': '敏捷', '敏捷': '敏捷',
161
- 'ag%': '敏捷%', 'AG%': '敏捷%', 'agi%': '敏捷%', 'AGI%': '敏捷%', '敏%': '敏捷%', '敏捷%': '敏捷%', '%ag': '敏捷%', '%AG': '敏捷%', '%agi': '敏捷%', '%AGI': '敏捷%', '%敏': '敏捷%', '%敏捷': '敏捷%',
162
+ 'ag%': '%敏捷', 'AG%': '%敏捷', 'agi%': '%敏捷', 'AGI%': '%敏捷', '敏%': '%敏捷', '%敏捷': '%敏捷', '%ag': '%敏捷', '%AG': '%敏捷', '%agi': '%敏捷', '%AGI': '%敏捷', '%敏': '%敏捷', '敏捷%': '%敏捷',
162
163
  'v': '耐力', 'V': '耐力', 'vit': '耐力', 'VIT': '耐力', '耐': '耐力', '耐力': '耐力',
163
- 'v%': '耐力%', 'V%': '耐力%', 'vit%': '耐力%', 'VIT%': '耐力%', '耐%': '耐力%', '耐力%': '耐力%', '%v': '耐力%', '%V': '耐力%', '%vit': '耐力%', '%VIT': '耐力%', '%耐': '耐力%', '%耐力': '耐力%',
164
- 'a%': '物理攻击%', 'A%': '物理攻击%', 'atk%': '物理攻击%', 'ATK%': '物理攻击%', '物攻%': '物理攻击%', '物理攻击%': '物理攻击%', '%a': '物理攻击%', '%A': '物理攻击%', '%atk': '物理攻击%', '%ATK': '物理攻击%', '%物攻': '物理攻击%', '%物理攻击': '物理攻击%',
165
- 'ma%': '魔法攻击%', 'MA%': '魔法攻击%', 'matk%': '魔法攻击%', 'MATK%': '魔法攻击%', '魔攻%': '魔法攻击%', '魔法攻击%': '魔法攻击%', '%ma': '魔法攻击%', '%MA': '魔法攻击%', '%matk': '魔法攻击%', '%MATK': '魔法攻击%', '%魔攻': '魔法攻击%', '%魔法攻击': '魔法攻击%',
166
- 'cd': '暴击伤害', 'CD': '暴击伤害', '暴伤': '暴击伤害', '暴击伤害': '暴击伤害',
167
- 'cd%': '暴击伤害%', 'CD%': '暴击伤害%', '暴伤%': '暴击伤害%', '暴击伤害%': '暴击伤害%', '%cd': '暴击伤害%', '%CD': '暴击伤害%', '%暴伤': '暴击伤害%', '%暴击伤害': '暴击伤害%',
168
- 'c': '暴击率', 'C': '暴击率', 'ctr': '暴击率', 'CTR': '暴击率', '暴击': '暴击率', '暴击率': '暴击率',
169
- '对火': '对火属性伤害%', '%对火': '对火属性伤害%', '对火%': '对火属性伤害%', '对水': '对水属性伤害%', '%对水': '对水属性伤害%', '对水%': '对水属性伤害%', '对风': '对风属性伤害%', '%对风': '对风属性伤害%', '对风%': '对风属性伤害%', '对地': '对地属性伤害%', '%对地': '对地属性伤害%', '对地%': '对地属性伤害%', '对光': '对光属性伤害%', '%对光': '对光属性伤害%', '对光%': '对光属性伤害%', '对暗': '对暗属性伤害%', '%对暗': '对暗属性伤害%', '对暗%': '对暗属性伤害%',
164
+ 'v%': '%耐力', 'V%': '%耐力', 'vit%': '%耐力', 'VIT%': '%耐力', '耐%': '%耐力', '%耐力': '%耐力', '%v': '%耐力', '%V': '%耐力', '%vit': '%耐力', '%VIT': '%耐力', '%耐': '%耐力', '耐力%': '%耐力',
165
+ 'a%': '%物理攻击', 'A%': '%物理攻击', 'atk%': '%物理攻击', 'ATK%': '%物理攻击', '物攻%': '%物理攻击', '%物理攻击': '%物理攻击', '%a': '%物理攻击', '%A': '%物理攻击', '%atk': '%物理攻击', '%ATK': '%物理攻击', '%物攻': '%物理攻击', '物理攻击%': '%物理攻击',
166
+ 'ma%': '%魔法攻击', 'MA%': '%魔法攻击', 'matk%': '%魔法攻击', 'MATK%': '%魔法攻击', '魔攻%': '%魔法攻击', '%魔法攻击': '%魔法攻击', '%ma': '%魔法攻击', '%MA': '%魔法攻击', '%matk': '%魔法攻击', '%MATK': '%魔法攻击', '%魔攻': '%魔法攻击', '魔法攻击%': '%魔法攻击',
167
+ 'cd': '暴击伤害', 'CD': '暴击伤害', '暴伤': '暴击伤害', '暴击伤害': '暴击伤害', '爆伤': '暴击伤害', '爆击伤害': '暴击伤害',
168
+ 'cd%': '%暴击伤害', 'CD%': '%暴击伤害', '暴伤%': '%暴击伤害', '%暴击伤害': '%暴击伤害', '爆伤%': '%暴击伤害', '%爆击伤害': '%暴击伤害', '%cd': '%暴击伤害', '%CD': '%暴击伤害', '%暴伤': '%暴击伤害', '暴击伤害%': '%暴击伤害', '%爆伤': '%暴击伤害', '爆击伤害%': '%暴击伤害',
169
+ 'c': '暴击率', 'C': '暴击率', 'ctr': '暴击率', 'CTR': '暴击率', '暴击': '暴击率', '暴击率': '暴击率', '爆击': '暴击率', '爆击率': '暴击率',
170
+ '对火': '%对火属性伤害', '%对火': '%对火属性伤害', '对火%': '%对火属性伤害', '%对火属性伤害': '%对火属性伤害', '对火属性伤害%': '%对火属性伤害', '对水': '%对水属性伤害', '%对水': '%对水属性伤害', '对水%': '%对水属性伤害', '%对水属性伤害': '%对水属性伤害', '对水属性伤害%': '%对水属性伤害', '对风': '%对风属性伤害', '%对风': '%对风属性伤害', '对风%': '%对风属性伤害', '%对风属性伤害': '%对风属性伤害', '对风属性伤害%': '%对风属性伤害', '对地': '%对地属性伤害', '%对地': '%对地属性伤害', '对地%': '%对地属性伤害', '%对地属性伤害': '%对地属性伤害', '对地属性伤害%': '%对地属性伤害', '对光': '%对光属性伤害', '%对光': '%对光属性伤害', '对光%': '%对光属性伤害', '%对光属性伤害': '%对光属性伤害', '对光属性伤害%': '%对光属性伤害', '对暗': '%对暗属性伤害', '%对暗': '%对暗属性伤害', '对暗%': '%对暗属性伤害', '%对暗属性伤害': '%对暗属性伤害', '对暗属性伤害%': '%对暗属性伤害',
170
171
  '火属': '火属性', '火属性': '火属性', '火原属': '火原属', '水属': '水属性', '水属性': '水属性', '水原属': '水原属', '风属': '风属性', '风属性': '风属性', '风原属': '风原属', '地属': '地属性', '地属性': '地属性', '地原属': '地原属', '光属': '光属性', '光属性': '光属性', '光原属': '光原属', '暗属': '暗属性', '暗属性': '暗属性', '暗原属': '暗原属'
171
172
  };
172
173
  // 附魔能力列表
173
174
  const EnchantAbilityEffect = {
174
175
  '力量': { "name": "力量", "type": "PlayerAbility", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": null, "MaterialUse": null, "MaterialType": null },
175
- '力量%': { "name": "力量%", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
176
+ '%力量': { "name": "%力量", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
176
177
  '灵巧': { "name": "灵巧", "type": "PlayerAbility", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": null, "MaterialUse": null, "MaterialType": null },
177
- '灵巧%': { "name": "灵巧%", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
178
+ '%灵巧': { "name": "%灵巧", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
178
179
  '智力': { "name": "智力", "type": "PlayerAbility", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": null, "MaterialUse": null, "MaterialType": null },
179
- '智力%': { "name": "智力%", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
180
+ '%智力': { "name": "%智力", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
180
181
  '敏捷': { "name": "敏捷", "type": "PlayerAbility", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": null, "MaterialUse": null, "MaterialType": null },
181
- '敏捷%': { "name": "敏捷%", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
182
+ '%敏捷': { "name": "%敏捷", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
182
183
  '耐力': { "name": "耐力", "type": "PlayerAbility", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": null, "MaterialUse": null, "MaterialType": null },
183
- '耐力%': { "name": "耐力%", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
184
+ '%耐力': { "name": "%耐力", "type": "PlayerAbility", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
184
185
  'hp自然恢复': { "name": "hp自然恢复", "type": "hpmp", "min": -25, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "武器", "MaterialUse": null, "MaterialType": null },
185
- 'hp自然恢复%': { "name": "hp自然恢复%", "type": "hpmp", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
186
+ 'hp自然恢复%': { "name": "%hp自然恢复", "type": "hpmp", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
186
187
  'mp自然恢复': { "name": "mp自然恢复", "type": "hpmp", "min": -12, "max": 12, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
187
- 'mp自然恢复%': { "name": "mp自然恢复%", "type": "hpmp", "min": -5, "max": 5, "ExValue": 5, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 20, "double": "武器", "MaterialUse": null, "MaterialType": null },
188
- '物理攻击%': { "name": "物理攻击%", "type": "atk", "min": -12, "max": 12, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "防具", "MaterialUse": null, "MaterialType": null },
189
- '魔法攻击%': { "name": "魔法攻击%", "type": "atk", "min": -12, "max": 12, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "防具", "MaterialUse": null, "MaterialType": null },
190
- '物理防御%': { "name": "物理防御%", "type": "def", "min": -11, "max": 11, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
191
- '魔法防御%': { "name": "魔法防御%", "type": "def", "min": -11, "max": 11, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
188
+ 'mp自然恢复%': { "name": "%mp自然恢复", "type": "hpmp", "min": -5, "max": 5, "ExValue": 5, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 20, "double": "武器", "MaterialUse": null, "MaterialType": null },
189
+ '%物理攻击': { "name": "%物理攻击", "type": "atk", "min": -12, "max": 12, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "防具", "MaterialUse": null, "MaterialType": null },
190
+ '%魔法攻击': { "name": "%魔法攻击", "type": "atk", "min": -12, "max": 12, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "防具", "MaterialUse": null, "MaterialType": null },
191
+ '%物理防御': { "name": "%物理防御", "type": "def", "min": -11, "max": 11, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
192
+ '%魔法防御': { "name": "%魔法防御", "type": "def", "min": -11, "max": 11, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
192
193
  '回避': { "name": "回避", "type": "flee", "min": -16, "max": 16, "ExValue": 10, "ExBefore": 1, "ExAfter": 2, "PotentialUse": 10, "double": "武器", "MaterialUse": null, "MaterialType": null },
193
- '回避%': { "name": "回避%", "type": "flee", "min": -5, "max": 5, "ExValue": 5, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 20, "double": "武器", "MaterialUse": null, "MaterialType": null },
194
+ '%回避': { "name": "%回避", "type": "flee", "min": -5, "max": 5, "ExValue": 5, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 20, "double": "武器", "MaterialUse": null, "MaterialType": null },
194
195
  '暴击率': { "name": "暴击率", "type": "ctr", "min": -20, "max": 25, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 1, "double": null, "MaterialUse": null, "MaterialType": null },
195
196
  '暴击伤害': { "name": "暴击伤害", "type": "ctr", "min": -20, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 3, "double": null, "MaterialUse": null, "MaterialType": null },
196
- '暴击伤害%': { "name": "暴击伤害%", "type": "ctr", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
197
- '对火属性伤害%': { "name": "对火属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
198
- '对水属性伤害%': { "name": "对水属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
199
- '对风属性伤害%': { "name": "对风属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
200
- '对地属性伤害%': { "name": "对地属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
201
- '对光属性伤害%': { "name": "对光属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
202
- '对暗属性伤害%': { "name": "对暗属性伤害%", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
197
+ '%暴击伤害': { "name": "%暴击伤害", "type": "ctr", "min": -10, "max": 10, "ExValue": 10, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 10, "double": null, "MaterialUse": null, "MaterialType": null },
198
+ '%对火属性伤害': { "name": "%对火属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
199
+ '%对水属性伤害': { "name": "%对水属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
200
+ '%对风属性伤害': { "name": "%对风属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
201
+ '%对地属性伤害': { "name": "%对地属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
202
+ '%对光属性伤害': { "name": "%对光属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
203
+ '%对暗属性伤害': { "name": "%对暗属性伤害", "type": "to", "min": -21, "max": 21, "ExValue": 20, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 5, "double": "防具", "MaterialUse": null, "MaterialType": null },
203
204
  '火属性': { "name": "火属性", "type": "element", "min": 0, "max": 1, "ExValue": 1, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 100, "double": null, "MaterialUse": null, "MaterialType": null },
204
205
  '水属性': { "name": "水属性", "type": "element", "min": 0, "max": 1, "ExValue": 1, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 100, "double": null, "MaterialUse": null, "MaterialType": null },
205
206
  '风属性': { "name": "风属性", "type": "element", "min": 0, "max": 1, "ExValue": 1, "ExBefore": 1, "ExAfter": 1, "PotentialUse": 100, "double": null, "MaterialUse": null, "MaterialType": null },
@@ -230,23 +231,6 @@ async function apply(ctx, config) {
230
231
  combine(0, []);
231
232
  return result;
232
233
  }
233
- // 返回不指定长度的组合
234
- function combinations(arr) {
235
- const result = [];
236
- function generateCombinations(current, remaining) {
237
- if (remaining.length === 0) {
238
- result.push(current.slice()); // 将当前组合添加到结果数组中
239
- return;
240
- }
241
- const [first, ...rest] = remaining;
242
- // 包含第一个元素的情况
243
- generateCombinations([...current, first], rest);
244
- // 不包含第一个元素的情况
245
- generateCombinations(current, rest);
246
- }
247
- generateCombinations([], arr);
248
- return result;
249
- }
250
234
  // 模拟一个对象 {NowEnchant:[{type,value},...],potential,type} 进行附魔 [{type,value},...] 返回附魔后的对象
251
235
  function EnchantSimulate(CurrentStatus, AddEnchant) {
252
236
  var NewStatus = CopyObject(CurrentStatus);
@@ -400,6 +384,7 @@ async function apply(ctx, config) {
400
384
  return FirstStepList;
401
385
  }
402
386
  }
387
+ return FirstStepList;
403
388
  }
404
389
  // 更新数据库指令
405
390
  ctx.command('数据文件写入').action(async ({ session }, ...args) => {
@@ -741,7 +726,11 @@ async function apply(ctx, config) {
741
726
  potential = potential.replace(/潜/g, "");
742
727
  }
743
728
  if (/^\+?(0|[1-9]\d*)$/.test(potential) != true) {
744
- return "你要不要看一眼你的潜力?";
729
+ return "你要不要看一眼你的潜力?嗯?";
730
+ }
731
+ // 附魔的潜力大于潜力锁
732
+ if (potential > config.武器附魔_潜力锁) {
733
+ return "书建议你找个999潜力的装备来附哦~那样什么都能附呢!";
745
734
  }
746
735
  var EnchantName = enchant.replace(EnchantNum, "");
747
736
  // 附魔不在简称列表内
@@ -927,7 +916,7 @@ async function apply(ctx, config) {
927
916
  }
928
917
  // 尝试还原附魔步骤
929
918
  var Equipment = { "NowEnchant": [], "potential": potential, "type": "武器" };
930
- let TextList = [], FirstList = [];
919
+ let TextList = [], FirstList = [], FirstFirst = [];
931
920
  var RatioCountList = {}, RatioCountList2 = [], RatioCountList3 = [];
932
921
  let EquipmentBefore, EquipmentAfter;
933
922
  switch (SuccessRateList[0].type) {
@@ -981,13 +970,13 @@ async function apply(ctx, config) {
981
970
  step.push({ "type": EnchantAbility.type, "value": 1, "PotentialUse": EnchantAbility.PotentialUse });
982
971
  EquipmentAfter = EnchantSimulate(EquipmentBefore, step);
983
972
  if (EquipmentBefore.potential - EquipmentAfter.potential == EnchantAbilityEffect[EnchantAbility.type].PotentialUse) {
984
- GiveList.push({ "index": a, "type": EnchantAbility.type, "PotentialUse": EnchantAbilityEffect[EnchantAbility.type].PotentialUse, "max": EnchantAbilityEffect[EnchantAbility.type].max });
973
+ GiveList.push({ "index": a, "type": EnchantAbility.type, "PotentialUse": EnchantAbilityEffect[EnchantAbility.type].PotentialUse, "max": EnchantAbility.value });
985
974
  EquipmentBefore = CopyObject(EquipmentAfter);
986
975
  b = 1;
987
976
  }
988
977
  }
989
978
  if (b == 0) {
990
- GiveList.push({ "index": a, "type": EnchantAbility.type, "PotentialUse": 0, "max": EnchantAbilityEffect[EnchantAbility.type].max });
979
+ GiveList.push({ "index": a, "type": EnchantAbility.type, "PotentialUse": 0, "max": EnchantAbility.value });
991
980
  }
992
981
  a += 1;
993
982
  }
@@ -1001,11 +990,12 @@ async function apply(ctx, config) {
1001
990
  FirstLists.push(ReturnFirst1);
1002
991
  FirstLists.push(ReturnFirst2);
1003
992
  }
1004
- a = 0;
993
+ a = 0, b = 0;
1005
994
  for (const ReturnList of FirstLists) {
1006
- for (var i = 0; i < ReturnList.length; i++) {
995
+ for (var i = 0; i < ReturnList?.length ?? 0; i++) {
1007
996
  if (ReturnList[i] != 0) {
1008
997
  a = 1;
998
+ b = 1;
1009
999
  FirstListNum = ReturnList;
1010
1000
  break;
1011
1001
  }
@@ -1020,59 +1010,52 @@ async function apply(ctx, config) {
1020
1010
  }
1021
1011
  }
1022
1012
  }
1013
+ // 判断分步是否过多
1014
+ for (var FirstStep of FirstList) {
1015
+ if (FirstStep.value > 6 && EnchantAbilityEffect[FirstStep.type].PotentialUse < 5) {
1016
+ b = 0;
1017
+ }
1018
+ }
1023
1019
  // 若仅用无损倍率无法消耗完毕
1024
- if (FirstList.length == 0) {
1025
- FirstLists = [], GiveLists = [];
1026
- var NewGiveList = CopyObject(GiveList);
1020
+ if (b == 0) {
1027
1021
  var EnchantList = [];
1022
+ FirstList = [];
1028
1023
  for (const EnchantAbility of EnchantAbilityList) {
1029
1024
  if (RatioCountList[EnchantAbilityEffect[EnchantAbility.type].type] < 2) {
1030
1025
  EnchantList.push(EnchantAbility);
1031
1026
  }
1032
1027
  }
1033
- var APEnchantLists = combinations(EnchantList);
1034
- APEnchantLists.sort(function (a, b) {
1035
- let aL = a.length;
1036
- let bL = b.length;
1037
- return aL - bL;
1038
- });
1039
- for (const APEnchantList of APEnchantLists) {
1040
- var NewGiveList = CopyObject(GiveList);
1041
- if (APEnchantList.length != 0) {
1042
- for (const APEnchant of APEnchantList) {
1043
- NewGiveList.push(APEnchant);
1044
- }
1045
- }
1046
- NewGiveList.sort(function (a, b) {
1047
- let aPU = EnchantAbilityEffect[a.type].PotentialUse;
1048
- let bPU = EnchantAbilityEffect[b.type].PotentialUse;
1049
- return bPU - aPU;
1050
- });
1051
- for (const PotentialUseList of NewGiveList) {
1052
- ReturnFirst1 = MakeFirst(PotentialUseList, CanUse1);
1053
- ReturnFirst2 = MakeFirst(PotentialUseList, CanUse2);
1028
+ c = Math.floor(CanUse2 / EnchantList[0].PotentialUse);
1029
+ a = 0;
1030
+ for (var i = 0; i < c; i++) {
1031
+ var CanUse3 = CanUse1 - (c - i) * EnchantList[0].PotentialUse;
1032
+ var CanUse4 = CanUse2 - (c - i) * EnchantList[0].PotentialUse;
1033
+ for (const PotentialUseList of GiveLists) {
1034
+ FirstLists = [];
1035
+ ReturnFirst1 = MakeFirst(PotentialUseList, CanUse3);
1036
+ ReturnFirst2 = MakeFirst(PotentialUseList, CanUse4);
1054
1037
  FirstLists.push(ReturnFirst1);
1055
1038
  FirstLists.push(ReturnFirst2);
1056
1039
  }
1057
- b = 0;
1058
1040
  for (const ReturnList of FirstLists) {
1059
- for (var i = 0; i < ReturnList.length; i++) {
1060
- if (ReturnList[i] != 0) {
1061
- b = 1;
1041
+ for (var j = 0; j < ReturnList?.length ?? 0; j++) {
1042
+ if (ReturnList[j] != 0) {
1043
+ a = 1;
1062
1044
  FirstListNum = ReturnList;
1063
1045
  break;
1064
1046
  }
1065
1047
  }
1066
- if (b == 1) {
1048
+ if (a == 1) {
1067
1049
  break;
1068
1050
  }
1069
1051
  }
1070
- for (var i = 0; i < FirstListNum.length; i++) {
1071
- if (FirstListNum[i] != 0) {
1072
- FirstList.push({ "type": EnchantAbilityList[i].type, "value": FirstListNum[i] + 1 });
1052
+ if (a == 1) {
1053
+ for (var j = 0; j < FirstListNum.length; j++) {
1054
+ if (FirstListNum[j] != 0) {
1055
+ FirstList.push({ "type": EnchantAbilityList[j].type, "value": FirstListNum[j] + 1 });
1056
+ }
1073
1057
  }
1074
- }
1075
- if (FirstList.length != 0) {
1058
+ FirstFirst.push({ "type": EnchantList[0].type, "value": c - i });
1076
1059
  break;
1077
1060
  }
1078
1061
  }
@@ -1080,12 +1063,36 @@ async function apply(ctx, config) {
1080
1063
  // 第一步消耗潜力
1081
1064
  EquipmentBefore = CopyObject(Equipment);
1082
1065
  if (a == 1) {
1066
+ var addFirst = [];
1067
+ for (const Enchant of RatioCountList3) {
1068
+ if (EnchantAbilityEffect[Enchant.type].PotentialUse != 1) {
1069
+ b = 0;
1070
+ for (const EnchantAbility of FirstList) {
1071
+ if (EnchantAbility.type == Enchant.type) {
1072
+ b = 1;
1073
+ }
1074
+ }
1075
+ if (b == 0) {
1076
+ addFirst.unshift({ "type": Enchant.type, "value": 1 });
1077
+ }
1078
+ }
1079
+ }
1080
+ for (const Enchant of addFirst) {
1081
+ FirstList.unshift(Enchant);
1082
+ }
1083
1083
  for (var i = 0; i < FirstList.length; i++) {
1084
- if (i == 0) {
1084
+ if (i == 0 || FirstList[i].value == 1) {
1085
1085
  var step = [];
1086
1086
  step.push(FirstList[i]);
1087
+ if (i == 0 && FirstFirst.length != 0) {
1088
+ step.push(FirstFirst[0]);
1089
+ }
1087
1090
  EquipmentAfter = EnchantSimulate(EquipmentBefore, step);
1088
- text = "附" + FirstList[i].value + FirstList[i].type + ",剩余" + EquipmentAfter.potential + "潜力;\n";
1091
+ text = "附" + FirstList[i].value + FirstList[i].type;
1092
+ if (i == 0 && FirstFirst.length != 0) {
1093
+ text += "、" + FirstFirst[0].value + FirstFirst[0].type;
1094
+ }
1095
+ text += ",剩余" + EquipmentAfter.potential + "潜力;\n";
1089
1096
  EquipmentBefore = CopyObject(EquipmentAfter);
1090
1097
  TextList.push(text);
1091
1098
  }
@@ -1096,7 +1103,7 @@ async function apply(ctx, config) {
1096
1103
  EquipmentAfter = EnchantSimulate(EquipmentBefore, step);
1097
1104
  EquipmentBefore = CopyObject(EquipmentAfter);
1098
1105
  }
1099
- text = "分" + FirstList[i].value + "次附,每次附1" + FirstList[i].type + "直到" + FirstList[i].value + FirstList[i].type + ",剩余" + EquipmentAfter.potential + "潜力;\n";
1106
+ text = "分" + FirstList[i].value + "次附,每次附1" + FirstList[i].type + ",直到" + FirstList[i].value + FirstList[i].type + ",剩余" + EquipmentAfter.potential + "潜力;\n";
1100
1107
  TextList.push(text);
1101
1108
  }
1102
1109
  }
@@ -1176,7 +1183,7 @@ async function apply(ctx, config) {
1176
1183
  }
1177
1184
  }
1178
1185
  var EquipmentAfter1 = EnchantSimulate(EquipmentBefore, arr1);
1179
- x = Math.max(0, Math.min(100, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter1.potential)));
1186
+ x = Math.max(0, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter1.potential));
1180
1187
  arr2.push({ "value": 0, "rate": x });
1181
1188
  // 若倍率满足
1182
1189
  if (y > 1 && y < 2) {
@@ -1248,7 +1255,7 @@ async function apply(ctx, config) {
1248
1255
  a = EnchantAbility.value;
1249
1256
  }
1250
1257
  }
1251
- text = "分" + Enchant.value + "次附,每次附1" + Enchant.type + "直到" + a + Enchant.type + ",剩余" + EquipmentAfter.potential + "潜力;\n";
1258
+ text = "分" + Enchant.value + "次附,每次附1" + Enchant.type + ",直到" + a + Enchant.type + ",剩余" + EquipmentAfter.potential + "潜力;\n";
1252
1259
  TextList.push(text);
1253
1260
  }
1254
1261
  }
@@ -1259,8 +1266,8 @@ async function apply(ctx, config) {
1259
1266
  for (i = 0; i < arr1.length; i++) {
1260
1267
  text += (arr1[i].now + arr1[i].value) + arr1[i].type + "、";
1261
1268
  }
1262
- x = Math.max(0, Math.min(100, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter.potential)));
1263
- y = Math.round((0.01 * x) ** EnchantAbilityList.length * 10000) / 100;
1269
+ x = Math.max(0, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter.potential));
1270
+ y = Math.min(100, Math.round((0.01 * x) ** EnchantAbilityList.length * 10000) / 100);
1264
1271
  text = text.substring(0, text.length - 1) + ",剩余" + EquipmentAfter.potential + "潜力。\n单项成功率" + x + "%,总成功率" + y + "%\n";
1265
1272
  TextList.push(text);
1266
1273
  break;
@@ -1321,8 +1328,8 @@ async function apply(ctx, config) {
1321
1328
  for (i = 0; i < arr1.length; i++) {
1322
1329
  text += (arr1[i].now + arr1[i].value) + arr1[i].type + "、";
1323
1330
  }
1324
- x = Math.max(0, Math.min(100, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter.potential)));
1325
- y = Math.round((0.01 * x) ** EnchantAbilityList.length * 10000) / 100;
1331
+ x = Math.max(0, Math.floor(160 + 230 / EquipmentBefore.potential * EquipmentAfter.potential));
1332
+ y = Math.min(100, Math.round((0.01 * x) ** EnchantAbilityList.length * 10000) / 100);
1326
1333
  text = text.substring(0, text.length - 1) + ",剩余" + EquipmentAfter.potential + "潜力。\n单项成功率" + x + "%,总成功率" + y + "%\n";
1327
1334
  TextList.push(text);
1328
1335
  }
@@ -1336,8 +1343,22 @@ async function apply(ctx, config) {
1336
1343
  }
1337
1344
  text = "附魔步骤如下:\n" + text;
1338
1345
  switch (true) {
1339
- case y >= 100:
1340
- text += "稳附呀!";
1346
+ case y == 100:
1347
+ switch (true) {
1348
+ case x >= 170:
1349
+ text += "书看了看这个附魔,觉得你是一条咸鱼而且没有追求";
1350
+ break;
1351
+ case 170 > x && x >= 130:
1352
+ text += "嗯...就是说你确定要附这个吗?有没有更好的选择?";
1353
+ break;
1354
+ case 130 > x && x >= 105:
1355
+ text += "看起来还有一些潜力容量呢,要再往上加点附魔吗?";
1356
+ break;
1357
+ case 105 > x && x >= 100:
1358
+ text += "稳附呀!";
1359
+ break;
1360
+ }
1361
+ ;
1341
1362
  break;
1342
1363
  case 100 > y && y >= 80:
1343
1364
  text += "小炸呢~";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-toram",
3
3
  "description": "托拉姆物语小工具",
4
- "version": "0.6.4",
4
+ "version": "0.6.6",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],