原神圣遗物评分-旅行者区分元素

This commit is contained in:
Kokomi 2023-09-22 04:03:01 +08:00
parent 8d84334096
commit 27ab6c1943
7 changed files with 35 additions and 7 deletions

View File

@ -131,6 +131,12 @@ app.reg({
describe: '【#角色】 删除游戏橱窗详情数据',
fn: ProfileList.del,
rule: /^#(删除全部面板|删除面板|删除面板数据)\s*(\d{9})?$/
},
profileReload:{
name: '重新加载面板',
fn:ProfileList.reload,
rule: /^#(星铁|原神)?(加载|重新加载|重载)面板\s*(\d{9})?$/
}
})

View File

@ -148,7 +148,7 @@ let ProfileDetail = {
attr[`${key}Base`] = fn(base[key])
attr[`${key}Plus`] = fn(a[key] - base[key])
})
lodash.forEach((isGs ? 'cpct,cdmg,recharge,dmg' : 'cpct,cdmg,recharge,dmg,effPct,stance').split(','), (key) => {
lodash.forEach((isGs ? 'cpct,cdmg,recharge,dmg' : 'cpct,cdmg,recharge,dmg,effPct,effDef,heal,stance').split(','), (key) => {
let fn = Format.pct
let key2 = key
if (key === 'dmg') {

View File

@ -169,6 +169,16 @@ const ProfileList = {
Player.delByUid(targetUid)
e.reply(`UID${targetUid}的本地数据已删除,排名数据已清除...`)
return true
},
async reload (e) {
let uid = await getTargetUid(e)
if (!uid) {
return true
}
let player = Player.create(e)
player.reload()
return ProfileList.render(e)
}
}
export default ProfileList

View File

@ -43,7 +43,7 @@ await cfgMap.init()
let CharCfg = {
// 获取角色伤害计算相关配置
getCalcRule (char) {
let cfg = cfgMap.char[char.name]?.calc
let cfg = cfgMap.char[char.isTraveler ? '旅行者' : char.name]?.calc
if (!cfg || lodash.isEmpty(cfg)) {
return false
}
@ -58,7 +58,7 @@ let CharCfg = {
}
},
getArtisCfg (char) {
return cfgMap.char[char.name]?.artis || false
return cfgMap.char[char.isTraveler ? '旅行者' : char.name]?.artis || false
}
}
export default CharCfg

View File

@ -5,7 +5,7 @@ import lodash from 'lodash'
const CharArtis = {
getCharArtisCfg (char, profile, artis) {
let { attr, weapon } = profile
let { attr, weapon, elem } = profile
let { isGs } = char
let usefulAttr = isGs ? usefulAttrGS : usefulAttrSR
@ -89,7 +89,7 @@ const CharArtis = {
}
if (charRule) {
return charRule({ attr, artis, rule, def, weapon, cons: profile.cons })
return charRule({ attr, elem, artis, rule, def, weapon, cons: profile.cons })
}
}
}

View File

@ -53,8 +53,6 @@ export const usefulAttr = {
鹿野院平藏: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, heal: 0 },
提纳里: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 90, dmg: 100, phy: 0, recharge: 30, heal: 0 },
柯莱: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, heal: 0 },
: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
赛诺: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
坎蒂丝: { hp: 75, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
妮露: { hp: 100, atk: 0, def: 0, cpct: 100, cdmg: 100, mastery: 80, dmg: 100, phy: 0, recharge: 30, heal: 0 },

View File

@ -0,0 +1,14 @@
export default function ({ elem, attr, weapon, rule, def }) {
switch (elem) {
case 'anemo':
return rule('风主', { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 })
case 'geo':
return rule('岩主', { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 })
case 'electro':
return rule('雷主', { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 })
case 'dendro':
return rule('草主', { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 })
case 'hydro':
return rule('水主', { hp: 75, atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, recharge: 55 })
}
}