mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-24 09:15:14 +00:00
修复万叶默认通用评分标准被自定义通用标准覆盖导致默认标准修改后未生效的问题 (#768)
* feature: 添加老婆 在原来的基础上添加而非直接设置为此次指定的老婆(们) * fix issue #761 (pr #754 中万叶通用评分标准未生效) 修复万叶默认评分标准被自定义通用标准覆盖的问题 * fix: 可能会找不到模块导入失败 * 枫原万叶这里原来的 import from 可能报错找不到模块,明明之前还可以突然就不行了(
This commit is contained in:
parent
91cc389d2b
commit
a43e4b66e0
@ -32,7 +32,7 @@ const relationMap = {
|
||||
}
|
||||
|
||||
const relation = lodash.flatMap(relationMap, (d) => d.keyword)
|
||||
const wifeReg = `^#?\\s*(${relation.join('|')})\\s*(设置|选择|指定|列表|查询|列表|是|是谁|照片|相片|图片|写真|图像)?\\s*([^\\d]*)\\s*(\\d*)$`
|
||||
const wifeReg = `^#?\\s*(${relation.join('|')})\\s*(设置|选择|指定|添加|列表|查询|列表|是|是谁|照片|相片|图片|写真|图像)?\\s*([^\\d]*)\\s*(\\d*)$`
|
||||
|
||||
async function getAvatarList (player, type) {
|
||||
await player.refreshMysDetail()
|
||||
@ -78,7 +78,7 @@ const Wife = {
|
||||
let action = msgRet[2] || '卡片'
|
||||
let actionParam = msgRet[3] || ''
|
||||
|
||||
if (!'设置,选择,挑选,指定'.split(',').includes(action) && actionParam) {
|
||||
if (!'设置,选择,挑选,指定,添加'.split(',').includes(action) && actionParam) {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -136,10 +136,15 @@ const Wife = {
|
||||
case '选择':
|
||||
case '挑选':
|
||||
case '指定':
|
||||
case '添加':
|
||||
if (!isSelf) {
|
||||
e.reply('只能指定自己的哦~')
|
||||
return true
|
||||
}
|
||||
let existingWife = []
|
||||
if (action === '添加') {
|
||||
existingWife = await selfUser.getCfg(`wife.${targetCfg.key}`, [])
|
||||
}
|
||||
// 选择老婆
|
||||
actionParam = actionParam.replace(/(,|、|;|;)/g, ',')
|
||||
wifeList = actionParam.split(',')
|
||||
@ -152,6 +157,7 @@ const Wife = {
|
||||
return char.name
|
||||
}
|
||||
})
|
||||
wifeList = wifeList.concat(existingWife)
|
||||
wifeList = lodash.filter(lodash.uniq(wifeList), (d) => !!d)
|
||||
addRet = wifeList
|
||||
if (addRet.length === 0) {
|
||||
|
@ -34,6 +34,9 @@ export default class MysApi {
|
||||
return new User({ id: this.e.user_id, uid: this.uid })
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<MysApi>}
|
||||
*/
|
||||
static async init (e, auth = 'all') {
|
||||
if (!e.runtime) {
|
||||
Version.runtime()
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { usefulAttr } from "../../artifact/artis-mark.js"
|
||||
|
||||
export default function ({ cons, rule, def }) {
|
||||
if (cons === 6) {
|
||||
return rule('万叶-满命', { atk: 75, cpct: 100, cdmg: 100, mastery: 100, dmg: 100, recharge: 55 })
|
||||
}
|
||||
return def({ hp: 0, atk: 75, def: 0, cpct: 50, cdmg: 50, mastery: 100, dmg: 100, phy: 0, recharge: 55, heal: 0 })
|
||||
return def(usefulAttr['枫原万叶'])
|
||||
}
|
Loading…
Reference in New Issue
Block a user