mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
星铁面板替换支持点满行迹,如*黄泉面板换满行迹
This commit is contained in:
parent
07673d2f99
commit
c95efa90fe
@ -94,7 +94,7 @@ app.reg({
|
|||||||
refreshTalent: {
|
refreshTalent: {
|
||||||
name: '强制刷新天赋',
|
name: '强制刷新天赋',
|
||||||
fn: ProfileStat.refreshTalent,
|
fn: ProfileStat.refreshTalent,
|
||||||
rule: /^#(星铁|原神)?(强制)?(刷新|更新)(所有|角色)*(天赋|技能)$/
|
rule: /^#(星铁|原神)?(强制)?(刷新|更新)(所有|角色)*(天赋|技能|行迹)$/
|
||||||
},
|
},
|
||||||
|
|
||||||
profileHelp: {
|
profileHelp: {
|
||||||
|
@ -155,6 +155,13 @@ const ProfileChange = {
|
|||||||
txt = txt.replace(consRet[0], '')
|
txt = txt.replace(consRet[0], '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 行迹树匹配
|
||||||
|
let treeRet = /满行迹/.exec(txt)
|
||||||
|
if (!isGs && treeRet) {
|
||||||
|
char.trees = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210']
|
||||||
|
txt = txt.replace(treeRet[0], '')
|
||||||
|
}
|
||||||
|
|
||||||
// 天赋匹配
|
// 天赋匹配
|
||||||
let talentRet = (isGs
|
let talentRet = (isGs
|
||||||
? /(?:天赋|技能|行迹)((?:[1][0-5]|[1-9])[ ,]?)((?:[1][0-5]|[1-9])[ ,]?)([1][0-5]|[1-9])/
|
? /(?:天赋|技能|行迹)((?:[1][0-5]|[1-9])[ ,]?)((?:[1][0-5]|[1-9])[ ,]?)([1][0-5]|[1-9])/
|
||||||
@ -246,7 +253,7 @@ const ProfileChange = {
|
|||||||
dataSource: 'change',
|
dataSource: 'change',
|
||||||
_source: 'change',
|
_source: 'change',
|
||||||
promote,
|
promote,
|
||||||
trees: lodash.extend([], source.trees)
|
trees: lodash.extend([], Data.def(dc.trees, source.trees))
|
||||||
}, char.game)
|
}, char.game)
|
||||||
|
|
||||||
// 设置武器
|
// 设置武器
|
||||||
|
@ -24,7 +24,7 @@ const ProfileStat = {
|
|||||||
if (refreshCount && !e.isSr) {
|
if (refreshCount && !e.isSr) {
|
||||||
e.reply(`角色天赋更新成功,共${refreshCount}个角色\n你现在可以通过【#练度统计】【#天赋统计】来查看角色信息了...`)
|
e.reply(`角色天赋更新成功,共${refreshCount}个角色\n你现在可以通过【#练度统计】【#天赋统计】来查看角色信息了...`)
|
||||||
} else if (e.isSr) {
|
} else if (e.isSr) {
|
||||||
e.reply(`角色天赋更新成功,共${refreshCount}个角色\n你现在可以通过【*练度统计】来查看角色信息了...`)
|
e.reply(`角色行迹更新成功,共${refreshCount}个角色\n你现在可以通过【*练度统计】来查看角色信息了...`)
|
||||||
} else {
|
} else {
|
||||||
e.reply('角色天赋未能更新...')
|
e.reply('角色天赋未能更新...')
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import DmgCalc from './dmg/DmgCalc.js'
|
|||||||
import { MiaoError, Meta, Common } from '#miao'
|
import { MiaoError, Meta, Common } from '#miao'
|
||||||
|
|
||||||
export default class ProfileDmg extends Base {
|
export default class ProfileDmg extends Base {
|
||||||
constructor (profile = {}, game = 'gs') {
|
constructor(profile = {}, game = 'gs') {
|
||||||
super()
|
super()
|
||||||
this.profile = profile
|
this.profile = profile
|
||||||
this.game = game
|
this.game = game
|
||||||
@ -136,7 +136,9 @@ export default class ProfileDmg extends Base {
|
|||||||
|
|
||||||
let { id, weapon, attr, artis } = profile
|
let { id, weapon, attr, artis } = profile
|
||||||
|
|
||||||
defParams = defParams || {}
|
defDmgKey = lodash.isFunction(defDmgKey) ? defDmgKey(meta) : defDmgKey
|
||||||
|
defDmgIdx = lodash.isFunction(defDmgIdx) ? defDmgIdx(meta) : defDmgIdx
|
||||||
|
defParams = lodash.isFunction(defParams) ? defParams(meta) : defParams || {}
|
||||||
|
|
||||||
let originalAttr = DmgAttr.getAttr({ id, weapon, attr, char: this.char, game, sp })
|
let originalAttr = DmgAttr.getAttr({ id, weapon, attr, char: this.char, game, sp })
|
||||||
|
|
||||||
@ -176,7 +178,7 @@ export default class ProfileDmg extends Base {
|
|||||||
let ds = lodash.merge({ talent }, DmgAttr.getDs(attr, meta))
|
let ds = lodash.merge({ talent }, DmgAttr.getDs(attr, meta))
|
||||||
detail = detail({ ...ds, attr, profile })
|
detail = detail({ ...ds, attr, profile })
|
||||||
}
|
}
|
||||||
let params = lodash.merge({}, defParams, detail?.params || {})
|
let params = lodash.merge({}, defParams, lodash.isFunction(detail?.params) ? detail?.params(meta) : detail?.params || {})
|
||||||
let { attr, msg } = DmgAttr.calcAttr({ originalAttr, buffs, artis, meta, params, talent: detail.talent || '', game })
|
let { attr, msg } = DmgAttr.calcAttr({ originalAttr, buffs, artis, meta, params, talent: detail.talent || '', game })
|
||||||
if (detail.isStatic) {
|
if (detail.isStatic) {
|
||||||
return
|
return
|
||||||
|
@ -135,7 +135,7 @@ export default {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
筑城者的贝洛伯格: {
|
筑城者的贝洛伯格: {
|
||||||
2: [attr('defPct', 12), {
|
2: [attr('defPct', 15), {
|
||||||
title: '效果命中大于50%时,提高防御力15%',
|
title: '效果命中大于50%时,提高防御力15%',
|
||||||
check: ({ calc, attr }) => calc(attr.effPct) > 50,
|
check: ({ calc, attr }) => calc(attr.effPct) > 50,
|
||||||
data: {
|
data: {
|
||||||
|
@ -751,6 +751,7 @@
|
|||||||
"id": 1211,
|
"id": 1211,
|
||||||
"key": "bailu",
|
"key": "bailu",
|
||||||
"name": "白露",
|
"name": "白露",
|
||||||
|
"star": 5,
|
||||||
"elem": "雷",
|
"elem": "雷",
|
||||||
"weapon": "丰饶",
|
"weapon": "丰饶",
|
||||||
"sp": 100,
|
"sp": 100,
|
||||||
|
@ -21,6 +21,7 @@ export const details = [{
|
|||||||
|
|
||||||
export const mainAttr = 'cpct,cdmg,def'
|
export const mainAttr = 'cpct,cdmg,def'
|
||||||
export const defDmgIdx = 1
|
export const defDmgIdx = 1
|
||||||
|
export const defParams = ({ cons }) => cons < 4 ? { tArtisBuffCount: 4 } : { tArtisBuffCount: 5.5 }
|
||||||
|
|
||||||
export const buffs = [{
|
export const buffs = [{
|
||||||
title: '终结技-惊惶:击中【惊惶】状态下的敌方目标时,造成的暴击伤害提高[cdmg]%',
|
title: '终结技-惊惶:击中【惊惶】状态下的敌方目标时,造成的暴击伤害提高[cdmg]%',
|
||||||
|
@ -16,7 +16,10 @@ export const details = [{
|
|||||||
}, {
|
}, {
|
||||||
title: '终结技伤害·对单',
|
title: '终结技伤害·对单',
|
||||||
params: { q: true },
|
params: { q: true },
|
||||||
dmg: ({ talent }, dmg) => dmg(talent.q['单体伤害'] + 1.5, 'q')
|
dmg: ({ talent, trees }, dmg) => {
|
||||||
|
let extraTd = trees['103'] ? 1.5 : 0
|
||||||
|
return dmg(talent.q['单体伤害'] + extraTd, 'q')
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
title: '终结技伤害·对无花目标',
|
title: '终结技伤害·对无花目标',
|
||||||
params: { q: true },
|
params: { q: true },
|
||||||
|
Loading…
Reference in New Issue
Block a user