mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
原神圣遗物评分-旅行者区分元素
This commit is contained in:
parent
8d84334096
commit
27ab6c1943
@ -131,6 +131,12 @@ app.reg({
|
||||
describe: '【#角色】 删除游戏橱窗详情数据',
|
||||
fn: ProfileList.del,
|
||||
rule: /^#(删除全部面板|删除面板|删除面板数据)\s*(\d{9})?$/
|
||||
},
|
||||
|
||||
profileReload:{
|
||||
name: '重新加载面板',
|
||||
fn:ProfileList.reload,
|
||||
rule: /^#(星铁|原神)?(加载|重新加载|重载)面板\s*(\d{9})?$/
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -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') {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 },
|
||||
|
14
resources/meta/character/旅行者/artis.js
Normal file
14
resources/meta/character/旅行者/artis.js
Normal 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 })
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user