增加纳西妲的伤害计算,暂未包含草元素反应

This commit is contained in:
yoimiya-kokomi 2022-11-04 03:29:57 +08:00
parent 3b64eff195
commit e24726b391
17 changed files with 967 additions and 68 deletions

View File

@ -1,8 +1,11 @@
# 2.0.5
# 2.0.6
* 适配3.2的enka数据获取
* 增加纳西妲的伤害计算,
* 注:所有草元素反应伤害计算暂未支持,后续统一添加
* 增加3.3角色信息及图片,可通过`#散兵天赋`、`#珐露珊命座`查看
* 一些已知问题修复
# 2.0.1~2.0.4
# 2.0.1~2.0.5
* `#日历` 页面样式微调,功能升级
* 日历中会展示角色生日
@ -15,6 +18,7 @@
* 角色相关命令在V3下会联合V3的角色别名一同查询
* 增加妮露的伤害计算及圣遗物权重设置
* `#面板`会展示角色名命座信息
* 适配3.2的enka数据获取
* `#深渊组队`使用新版胡桃API进行组队信息获取
# 2.0.0

View File

@ -188,6 +188,7 @@ let EnkaData = {
return ret
}
let { attr, id, weapon } = ret
let count = 0
id = id * 1
switch (id) {
case 10000052:
@ -198,6 +199,14 @@ let EnkaData = {
// 莫娜被动fix
attr.dmg = Math.max(0, attr.dmg - attr.recharge * 0.2)
break
case 10000070:
// 妮露满命效果fix
if (ret.cons === 6) {
count = Math.floor(attr.hp / 1000)
attr.cpct = Math.max(5, attr.cpct - Math.min(30, count * 0.6))
attr.cdmg = Math.max(50, attr.cdmg - Math.min(60, count * 1.2))
}
break
}
let wDmg = {
息灾: 12,

View File

@ -34,7 +34,7 @@ export default class ProfileArtis extends Base {
idx = idx.toString().replace('arti', '')
let ret = {}
ret.name = ds.name || ArtifactSet.getArtiNameBySet(ds.set, idx) || ''
ret.set = ds.set || Artifact.getSetNameByArti(ret.title) || ''
ret.set = ds.set || Artifact.getSetNameByArti(ret.name) || ''
ret.level = ds.level || 1
ret.main = ArtisMark.formatAttr(ds.main || {})
ret.attrs = []

View File

@ -44,14 +44,15 @@ export default class ProfileDmg extends Base {
valArr.push(valNum)
})
let name = tr.name2 || tr.name
if (isNaN(valArr[0])) {
map[tr.name] = false
map[name] = false
} else if (valArr.length === 1) {
map[tr.name] = valArr[0]
map[name] = valArr[0]
} else {
map[tr.name] = valArr
map[name] = valArr
}
map[tr.name + '2'] = valArr2
map[name + '2'] = valArr2
})
ret[key] = map
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

@ -45,7 +45,7 @@ export const usefulAttr = {
神里绫人: { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
八重神子: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
申鹤: { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
云堇: { hp: 0, atk: 0, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 40, phy: 0, recharge: 90, heal: 0 },
云堇: { hp: 0, atk: 0, def: 100, cp: 80, cd: 80, mastery: 0, dmg: 80, phy: 0, recharge: 80, heal: 0 },
荒泷一斗: { hp: 0, atk: 50, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
五郎: { hp: 0, atk: 75, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 },
班尼特: { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 },
@ -80,11 +80,11 @@ export const usefulAttr = {
七七: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 55, heal: 100 },
凯亚: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 30, heal: 0 },
烟绯: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 30, heal: 0 },
早柚: { hp: 0, atk: 50, def: 0, cp: 50, cd: 50, mastery: 100, dmg: 80, phy: 0, recharge: 55, heal: 100 },
早柚: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 100, phy: 0, recharge: 55, heal: 100 },
安柏: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 100, recharge: 0, heal: 0 },
丽莎: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 },
埃洛伊: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 },
辛焱: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 },
辛焱: { hp: 0, atk: 75, def: 75, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 },
砂糖: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 75, phy: 0, recharge: 55, heal: 0 },
雷泽: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 },
夜兰: { hp: 80, atk: 0, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
export const details = [{
title: 'E长按伤害',
params: { e: true, q: false },
dmg: ({ talent }, dmg) => dmg(talent.e['长按伤害'], 'e')
}, {
title: '灭净三业伤害',
params: { e2: true, q: false },
dmg: ({ talent, calc, attr }, { basic }) => {
const td = talent.e['灭净三业伤害2']
const em = calc(attr.mastery)
const atk = calc(attr.atk)
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e')
}
}, {
title: '开Q灭净三业伤害',
params: { e2: true },
dmg: ({ talent, calc, attr, cons }, { basic }) => {
const td = talent.e['灭净三业伤害2']
const em = calc(attr.mastery)
const atk = calc(attr.atk)
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e')
}
}]
export const mainAttr = 'atk,mastery,cpct,cdmg'
export const buffs = [{
title: '草神1命火元素队友额外计入1位',
cons: 1
}, {
title: '草神2命激化相关反应降低敌人防御力30%',
cons: 2,
data: {
enemyDef: 30
}
}, {
title: '草神4命E4个敌人提升精通160',
cons: 4,
data: {
mastery: 160
}
}, {
title: '草神被动开Q元素精通提升[mastery]',
data: {
mastery: ({ calc, attr, params }) => (params.q === false ? 0 : 1) * Math.min(250, calc(attr.mastery) * 0.25)
}
}, {
title: '草神被动:基于元素精通提升灭净三业伤害[eDmg]%,暴击率[eCpct]%',
data: {
eDmg: ({ calc, attr, params }) => (params.e ? 0 : 1) * Math.min(80, (calc(attr.mastery) - 200) * 0.1),
eCpct: ({ calc, attr, params }) => (params.e ? 0 : 1) * Math.min(24, (calc(attr.mastery) - 200) * 0.03)
}
}, {
title: '草神Q开Q提升灭净三业伤害[eDmg]%',
data: {
eDmg: ({ cons, talent, params }) => (params.q === false ? 0 : 1) *
(cons >= 1 ? talent.q['火2伤害提升'] : talent.q['火1伤害提升'])
}
}]

View File

@ -381,6 +381,7 @@
"tables": [
{
"name": "火:伤害提升",
"name2": "火1伤害提升",
"unit": "1名角色",
"isSame": false,
"values": [
@ -403,6 +404,7 @@
},
{
"name": "火:伤害提升",
"name2": "火2伤害提升",
"unit": "2名角色",
"isSame": false,
"values": [

View File

@ -13,7 +13,7 @@ export const details = [{
dmg: ({ talent }, dmg) => dmg(talent.a['重击循环伤害'], 'a2', 'phy')
}]
export const mainAttr = 'atk,cpct,cdmg,def'
export const mainAttr = 'atk,def,cpct,cdmg'
export const enemyName = '魔偶/女士/雷神/丘丘'
export const buffs = [{

View File

@ -134,6 +134,13 @@ export default function (step) {
data: {
atkPlus: ({ attr, calc, refine }) => step(24)[refine] * calc(attr.mastery) / 100
}
},
千夜浮梦: {
title: '3个不同元素队友满层元素伤害提高[dmg]%',
buffCount: 3,
refine: {
dmg: step(10, 4)
}
}
}
}

View File

@ -126,4 +126,4 @@ async function down (sets = '') {
})
}
await down('乐园遗落之花')
await down()

View File

@ -24,38 +24,37 @@ app.use(express.static(_path + '/resources'))
app.use('/plugins', express.static('plugins'))
app.get('/', function (req, res) {
let fileList = fs.readdirSync(_path + '/data/ViewData/') || []
let pluginList = fs.readdirSync(_path + '/data/ViewData/') || []
let html = [
'在npm run web-dev模式下触发截图消息后可在下方选择页面进行调试',
'如果页面内资源路径不正确请使用{{_res_path}}作为根路径,对应之前的../../../../',
'可直接修改模板html或css刷新查看效果'
]
let li = {}
for (let pIdx in pluginList) {
const plugin = pluginList[pIdx]
let fileList = fs.readdirSync(_path + `/data/ViewData/${plugin}/`) || []
for (let idx in fileList) {
let ret = /(.+)\.json$/.exec(fileList[idx])
if (ret && ret[1]) {
let data = JSON.parse(fs.readFileSync(_path + '/data/ViewData/' + ret[1] + '.json', 'utf8'))
let text = [(data._app || 'genshin'), ret[1]]
if (data._plugin) {
text.unshift(data._plugin)
let text = [plugin, ...ret[1].split('_')]
li[text.join('')] = (`<li style="font-size:18px; line-height:30px;"><a href="/${plugin}_${ret[1]}">${text.join(' / ')}</a></li>`)
}
li[text.join('')] = (`<li style="font-size:18px; line-height:30px;"><a href="/${ret[1]}">${text.join(' / ')}</a></li>`)
}
}
res.send(html.join('</br>') + '<ul>' + lodash.values(li).join('') + '</ul>')
})
app.get('/:type', function (req, res) {
let page = req.params.type
app.get('/:page', function (req, res) {
let [plugin, app, page] = req.params.page.split('_')
if (page == 'favicon.ico') {
return res.send('')
}
let data = JSON.parse(fs.readFileSync(_path + '/data/ViewData/' + page + '.json', 'utf8'))
let data = JSON.parse(fs.readFileSync(_path + `/data/ViewData/${plugin}/${app}_${page}.json`, 'utf8'))
data = data || {}
data._res_path = ''
data._sys_res_path = data._res_path
let app = data._app || 'genshin'
if (data._plugin) {
data._res_path = `/plugins/${data._plugin}/resources/`
data.pluResPath = data._res_path