Miao-Yunzai下默认启用miao-plugin相关功能,以便后续功能统一

回调可莉纯火判断逻辑
This commit is contained in:
Kokomi 2023-03-15 03:11:59 +08:00
parent ca454990ba
commit d7a7d24311
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
import lodash from 'lodash' import lodash from 'lodash'
import Plugin from './common/Plugin.js' import Plugin from './common/Plugin.js'
import { Version } from '#miao'
class App { class App {
constructor (cfg) { constructor (cfg) {
@ -33,7 +34,7 @@ class App {
name: `喵喵:${cfg.name || cfg.id}`, name: `喵喵:${cfg.name || cfg.id}`,
dsc: cfg.desc || cfg.name || '喵喵插件', dsc: cfg.desc || cfg.name || '喵喵插件',
event: event === 'poke' ? 'notice.*.poke' : 'message', event: event === 'poke' ? 'notice.*.poke' : 'message',
priority: 50, priority: cfg.priority || 50,
rule: rules rule: rules
}) })
} }
@ -96,13 +97,12 @@ class App {
if (app.yzRule && app.yzCheck) { if (app.yzRule && app.yzCheck) {
let yzKey = `Yz${key}` let yzKey = `Yz${key}`
let yzRule = lodash.trim(app.yzRule.toString(), '/') let yzRule = lodash.trim(app.yzRule.toString(), '/')
rules.push({ rules.push({
reg: yzRule, reg: yzRule,
fnc: yzKey fnc: yzKey
}) })
cls.prototype[yzKey] = async function () { cls.prototype[yzKey] = async function () {
if (!app.yzCheck()) { if (Version.isMiao || !app.yzCheck()) {
return false return false
} }
let e = this.e let e = this.e
@ -120,7 +120,7 @@ class App {
return { return {
reg: 'noCheck', reg: 'noCheck',
describe: cfg.desc || '', describe: cfg.desc || '',
priority: 50, priority: cfg.priority || 50,
hashMark: true hashMark: true
} }
} }

View File

@ -1,5 +1,5 @@
export default function ({ attr, weapon, rule, def }) { export default function ({ attr, weapon, rule, def }) {
if ( attr.mastery < 110 ) { if (attr.mastery < 50 && attr.cpct * 2 + attr.cdmg > 320) {
return rule('可莉-纯火', { atk: 85, cpct: 100, cdmg: 100, dmg: 100, recharge: 55 }) return rule('可莉-纯火', { atk: 85, cpct: 100, cdmg: 100, dmg: 100, recharge: 55 })
} }
return def({ atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, recharge: 30 }) return def({ atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, recharge: 30 })