一些已知问题修正

This commit is contained in:
Kokomi 2023-11-01 04:07:47 +08:00
parent d58c9e1fdb
commit 4fb155af69
11 changed files with 29 additions and 16 deletions

View File

@ -41,6 +41,10 @@ let Avatar = {
return false return false
} }
let bg = char.getCardImg(Cfg.get('charPicSe', false)) let bg = char.getCardImg(Cfg.get('charPicSe', false))
if (!bg) {
e.reply(`${char.name}暂无角色图片`)
return true
}
if (renderType === 'photo') { if (renderType === 'photo') {
e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/${bg.img}`)) e.reply(segment.image(`file://${process.cwd()}/plugins/miao-plugin/resources/${bg.img}`))
return true return true

View File

@ -277,7 +277,7 @@ const ProfileChange = {
} }
// 设置圣遗物 // 设置圣遗物
let artis = getSource(ds.artis)?.artis?.artis || {} let artis = getSource(ds.artis)?.artis?.toJSON() || {}
for (let idx = 1; idx <= (isGs ? 5 : 6); idx++) { for (let idx = 1; idx <= (isGs ? 5 : 6); idx++) {
if (ds['arti' + idx]) { if (ds['arti' + idx]) {
let source = getSource(ds['arti' + idx]) let source = getSource(ds['arti' + idx])
@ -290,8 +290,8 @@ const ProfileChange = {
let as = ArtifactSet.get(ds.artisSet[artisIdx], game) let as = ArtifactSet.get(ds.artisSet[artisIdx], game)
if (as) { if (as) {
artis[idx].id = as.getArti(idx)?.getIdByStar(artis[idx].star || 5) artis[idx].id = as.getArti(idx)?.getIdByStar(artis[idx].star || 5)
artis[idx]._name = artis[idx].name = as.getArtiName(idx) artis[idx].name = as.getArtiName(idx)
artis[idx]._set = artis[idx].set = as.name artis[idx].set = as.name
} }
} }
} }

View File

@ -76,6 +76,10 @@ const CharWiki = {
e.reply('暂不支持该角色图鉴展示') e.reply('暂不支持该角色图鉴展示')
return true return true
} }
if (char.isSr) {
e.reply('暂不支持星铁角色')
return true
}
return await CharWiki.render({ e, char }) return await CharWiki.render({ e, char })
} else if (mode === 'material') { } else if (mode === 'material') {
return CharMaterial.render({ e, char }) return CharMaterial.render({ e, char })

View File

@ -22,11 +22,12 @@ try {
} }
let Cfg = { let Cfg = {
get (rote) { get (rote, def = '') {
if (Version.isMiao && miaoCfg[rote]) { if (Version.isMiao && miaoCfg[rote]) {
return true return true
} }
return lodash.get(cfg, rote) let ret = lodash.get(cfg, rote)
return lodash.isUndefined(cfg) ? def : ret
}, },
set (rote, val) { set (rote, val) {
cfg[rote] = val cfg[rote] = val

View File

@ -44,7 +44,8 @@ const CharImg = {
let img = lodash.sample(list) let img = lodash.sample(list)
if (!img) { if (!img) {
if (def) { if (def) {
img = '/character-img/default/01.jpg' // img = '/character-img/default/01.jpg'
return false
} else { } else {
return false return false
} }

View File

@ -36,7 +36,7 @@ const Serv = {
let servType = { 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 2, 7: 2, 8: 2, 9: 2 }[uid[0]] let servType = { 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 2, 7: 2, 8: 2, 9: 2 }[uid[0]]
// 获取原神、星铁对应服务选择的配置 // 获取原神、星铁对应服务选择的配置
let servCfg = Cfg.get(isGs ? 'profileServer' : 'srProfileServer', '0').toString() || '0' let servCfg = (Cfg.get(isGs ? 'profileServer' : 'srProfileServer', '0') || '0').toString()
let servIdx = servCfg[servType] || servCfg[0] || '0' let servIdx = servCfg[servType] || servCfg[0] || '0'
// 设置为自动或1时如果具备token则使用miao // 设置为自动或1时如果具备token则使用miao

View File

@ -29,3 +29,5 @@ export const buffs = [{
tPlus: ({ calc, attr }) => calc(attr.def) * 0.3 tPlus: ({ calc, attr }) => calc(attr.def) * 0.3
} }
}] }]
export const createdBy = 'Aluxes'

View File

@ -96,3 +96,5 @@ export const buffs = [{
tPlus: ({ attr, calc }) => calc(attr.hp) * 0.5 tPlus: ({ attr, calc }) => calc(attr.hp) * 0.5
} }
}] }]
export const createdBy = 'Aluxes'

View File

@ -8,20 +8,13 @@ export const details = [{
title: '战技治疗量(目标生命<=30%)', title: '战技治疗量(目标生命<=30%)',
params: { tBuff: true }, params: { tBuff: true },
dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['治疗·百分比生命'] + talent.e['治疗·固定值']) dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['治疗·百分比生命'] + talent.e['治疗·固定值'])
}, {
title: '战技持续治疗量',
dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['复活·百分比生命'] + talent.e['复活·固定值'])
}, {
title: '战技持续治疗量(目标生命<=30%)',
params: { tBuff: true },
dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['复活·百分比生命'] + talent.e['复活·固定值'])
}, { }, {
title: '终结技治疗量', title: '终结技治疗量',
dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['百分比生命'] + talent.e['固定值']) dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.q['百分比生命'] + talent.q['固定值'])
}, { }, {
title: '终结技治疗量(目标生命<=30%)', title: '终结技治疗量(目标生命<=30%)',
params: { tBuff: true }, params: { tBuff: true },
dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.e['百分比生命'] + talent.e['固定值']) dmg: ({ talent, calc, attr }, { heal }) => heal(calc(attr.hp) * talent.q['百分比生命'] + talent.q['固定值'])
}, { }, {
title: '1命治疗量', title: '1命治疗量',
params: { tBuff: true }, params: { tBuff: true },
@ -54,3 +47,5 @@ export const buffs = [{
heal: 10 heal: 10
} }
}] }]
export const createdBy = 'Aluxes'

View File

@ -41,3 +41,5 @@ export const buffs = [{
kx: 20 kx: 20
} }
}] }]
export const createdBy = 'Aluxes'

View File

@ -56,3 +56,5 @@ export const buffs = [{
atkPct: 25 atkPct: 25
} }
}] }]
export const createdBy = 'Aluxes'