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

View File

@ -1,5 +1,5 @@
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 def({ atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, recharge: 30 })