更新夏洛蒂、旅行者伤害计算

This commit is contained in:
Aluxes 2023-11-13 16:37:07 +08:00
parent 2078ac56d0
commit 75a4751acb
29 changed files with 331 additions and 49 deletions

View File

@ -37,24 +37,26 @@ const ProfileChange = {
}
const game = char.game
const isGs = game === 'gs'
const keyMap = isGs ? {
artis: '圣遗物',
arti1: '花,生之花',
arti2: '毛,羽,羽毛,死之羽',
arti3: '沙,沙漏,表,时之沙',
arti4: '杯,杯子,空之杯',
arti5: '头,冠,理之冠,礼冠,帽子,帽',
weapon: '武器'
} : {
artis: '圣遗物,遗器',
arti1: '头,帽子,头部',
arti2: '手,手套,手部',
arti3: '衣,衣服,甲,躯干,',
arti4: '鞋,靴,鞋子,靴子,脚,脚部',
arti5: '球,位面球',
arti6: '绳,线,链接绳,连接绳',
weapon: '武器,光锥'
}
const keyMap = isGs
? {
artis: '圣遗物',
arti1: '花,生之花',
arti2: '毛,羽,羽毛,死之羽',
arti3: '沙,沙漏,表,时之沙',
arti4: '杯,杯子,空之杯',
arti5: '头,冠,理之冠,礼冠,帽子,帽',
weapon: '武器'
}
: {
artis: '圣遗物,遗器',
arti1: '头,帽子,头部',
arti2: '手,手套,手部',
arti3: '衣,衣服,甲,躯干,',
arti4: '鞋,靴,鞋子,靴子,脚,脚部',
arti5: '球,位面球',
arti6: '绳,线,链接绳,连接绳',
weapon: '武器,光锥'
}
let keyTitleMap = {}
lodash.forEach(keyMap, (val, key) => {
lodash.forEach(val.split(','), (v) => {
@ -156,8 +158,9 @@ const ProfileChange = {
}
// 天赋匹配
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])[ ,]?)([1][0-5]|[1-9])/).exec(txt)
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])[ ,]?)([1][0-5]|[1-9])/).exec(txt)
if (talentRet) {
char.talent = {}
lodash.forEach((isGs ? 'aeq' : 'aetq').split(''), (key, idx) => {
@ -241,7 +244,7 @@ const ProfileChange = {
level,
cons: Data.def(dc.cons, source.cons, 0),
fetter: source.fetter || 10,
elem: char.elem,
elem: source.char?.elem || char.elem,
dataSource: 'change',
_source: 'change',
promote,

View File

@ -151,7 +151,7 @@ export default class Avatar extends Base {
this.trees = this.trees || []
this._source = ds._source || this._source || '' // 数据源
this._time = ds._time || this._time || now // 面板最后更新时间
this._update = ds._update || this._update || ds._time || now //最后更新时间包括mys
this._update = ds._update || this._update || ds._time || now // 最后更新时间包括mys
this._talent = ds._talent || this._talent || ds._time || now // 最后天赋更新时间包括mys
if (ds.trees) {
@ -339,7 +339,7 @@ export default class Avatar extends Base {
// 计算当前profileData的伤害信息
async calcDmg ({ enemyLv = 91, mode = 'profile', dmgIdx = 0, idxIsInput = false }) {
if (!this.dmg || this.dmg._update !== this._update) {
let ds = this.getData('id,level,attr,cons,artis:artis.sets,trees')
let ds = this.getData('id,level,elem,attr,cons,artis:artis.sets,trees')
ds.talent = lodash.mapValues(this.talent, 'level')
ds.weapon = Data.getData(this.weapon, 'name,affix')
ds._update = this._update
@ -350,9 +350,9 @@ export default class Avatar extends Base {
// toJSON 供保存使用
toJSON () {
let keys = this.isGs ?
'name,id,elem,level,promote,fetter,costume,cons,talent:originalTalent' :
'name,id,elem,level,promote,cons,talent:originalTalent,trees'
let keys = this.isGs
? 'name,id,elem,level,promote,fetter,costume,cons,talent:originalTalent'
: 'name,id,elem,level,promote,cons,talent:originalTalent,trees'
let ret = {
...this.getData(keys),
weapon: Data.getData(this.weapon, this.isGs ? 'name,level,promote,affix' : 'id,level,promote,affix')

View File

@ -85,7 +85,11 @@ export default class ProfileDmg extends Base {
}
async getCalcRule () {
const cfgPath = ProfileDmg.dmgRulePath(this.char?.name, this.char?.game)
let ruleName = this.char?.name
if (['空', '荧'].includes(ruleName)) {
ruleName = `旅行者/${this.profile.elem}`
}
const cfgPath = ProfileDmg.dmgRulePath(ruleName, this.char?.game)
let cfg = {}
if (cfgPath) {
cfg = await import(`file://${cfgPath.path}`)

View File

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

View File

@ -46,7 +46,6 @@ export const setAbbr = {
回声之林夜话: '回声'
}
export const setAlias = {
炽烈的炎之魔女: '魔女',
昔日宗室之仪: '宗室',
@ -92,5 +91,5 @@ export const setAlias = {
逐影猎人: '逐影,猎人',
黄金剧团: '黄金,剧团',
昔时之歌: '昔时',
回声之林夜话: '回声夜话,夜话'
回声之林夜话: '回声,回声夜话,夜话'
}

View File

@ -7,7 +7,7 @@ export const details = [{
dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['治疗量2'][0] * calc(attr.atk) / 100 + talent.q['治疗量2'][1] * 1)
}, {
title: '重击伤害',
dmg: ({ talent, attr, calc }, dmg) => dmg(talent.a['重击伤害'], 'a2', 'phy')
dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2', 'phy')
}]
export const mainAttr = 'atk,cpct,cdmg,heal'

View File

@ -0,0 +1,48 @@
export const details = [{
title: 'E点按拍照伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['点按拍照伤害'], 'e')
}, {
title: 'E长按拍照伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['长按拍照伤害'], 'e')
}, {
title: 'Q释放伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q')
}, {
title: 'Q释放治疗量',
dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['施放治疗量2'][0] / 100 * calc(attr.atk) + talent.q['施放治疗量2'][1])
}, {
title: 'Q持续治疗量',
dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['相机持续治疗量2'][0] / 100 * calc(attr.atk) + talent.q['相机持续治疗量2'][1])
}, {
title: '六命额外治疗量',
cons: 6,
dmg: ({ attr, calc }, { heal }) => heal(0.42 * calc(attr.atk))
}]
export const mainAttr = 'atk,cpct,cdmg,heal'
export const defDmgIdx = 3
export const buffs = [{
title: '天赋-多样性调查按队伍存在2位枫丹角色2位非枫丹角色计算自身获得[heal]%治疗加成,[dmg]%冰元素伤害加成',
data: {
heal: 5,
dmg: 10
}
}, {
title: '夏洛蒂2命E攻击命中3名及以上敌人时自身攻击力提升[atk]%',
cons: 2,
data: {
atk: 30
}
}, {
title: '夏洛蒂4命Q命中带有E印记的敌人时Q造成的伤害提升[dmg]%',
cons: 4,
data: {
qDmg: 10
}
}, {
title: '夏洛蒂6命场上角色普攻或重击命中E标记敌人时产生相当于夏洛蒂42%攻击的额外治疗',
cons: 6
}]
export const createdBy = 'Aluxes'

View File

@ -0,0 +1,42 @@
export const details = [{
title: '短按E伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['初始爆风伤害'], 'e')
}, {
title: '长按E总伤害',
dmg: ({ talent }, dmg) => {
const td = talent.e['初始切割伤害'] * 2 + talent.e['最大切割伤害'] * 4 + talent.e['最大爆风伤害']
return dmg(td, 'e')
}
}, {
title: 'Q每段伤害',
params: { q: true },
dmg: ({ talent }, dmg) => dmg(talent.q['龙卷风伤害'], 'q')
}, {
title: 'Q转化元素每段伤害',
params: { q: true },
dmg: ({ talent }, dmg) => dmg(talent.q['附加元素伤害'], 'q', 'phy')
}, {
title: '扩散反应伤害',
dmg: ({}, { reaction }) => reaction('swirl')
}]
export const defDmgIdx = 1
export const mainAttr = 'atk,cpct,cdmg,mastery'
export const buffs = [{
title: '风主2命元素充能效率提高[recharge]%',
cons: 2,
data: {
recharge: 16
}
}, {
title: '风主6命受到Q伤害的目标风抗降低[kx]%,转化的对应元素抗性降低[kx]%',
cons: 6,
check: ({ params }) => params.q === true,
data: {
kx: 20,
fykx: 20
}
}]
export const createdBy = 'Aluxes'

View File

@ -0,0 +1,41 @@
export const details = [{
title: 'E伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
}, {
title: 'E激化伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e', 'spread')
}, {
title: 'Q每跳伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['草灯莲攻击伤害'], 'q')
}, {
title: 'Q每跳激化伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['草灯莲攻击伤害'], 'q', 'spread')
}, {
title: 'Q草灯爆炸伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['激烈爆发伤害'], 'q')
}]
export const defDmgIdx = 3
export const mainAttr = 'atk,cpct,cdmg,mastery'
export const buffs = [{
title: '天赋-蔓生的埜草:提升元素精通[mastery]点',
data: {
mastery: 60
}
}, {
title: '天赋-繁庑的丛草基于自身元素精通提高E造成的伤害[eDmg]%Q造成的伤害[qDmg]%',
sort: 9,
data: {
eDmg: ({ attr }) => attr.mastery * 0.15,
qDmg: ({ attr }) => attr.mastery * 0.1
}
}, {
title: '草主6命获得[dmg]%草元素伤害加成',
cons: 6,
data: {
dmg: 12
}
}, 'spread']
export const createdBy = 'Aluxes'

View File

@ -0,0 +1,38 @@
import { Format } from '#miao'
export const details = [{
title: 'E伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
}, {
title: 'E提供元素充能加成',
dmg: ({ attr }) => {
return {
avg: Format.percent(0.2 + attr.recharge * 0.1 / 100),
type: 'text'
}
}
}, {
title: 'Q释放伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q')
}, {
title: 'Q协同伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['威光落雷伤害'], 'q')
}]
export const defDmgIdx = 2
export const mainAttr = 'atk,cpct,cdmg'
export const buffs = [{
title: '天赋-回响的轰雷基于自身元素充能效率的10%提升E的勾玉提供的元素充能效率[_eRecharge]%',
data: {
_eRecharge: ({ attr }) => attr.recharge * 0.1
}
}, {
title: '雷主2命Q的协同攻击会使敌人的雷元素抗性降低[kx]%',
cons: 2,
data: {
kx: 15
}
}]
export const createdBy = 'Aluxes'

View File

@ -0,0 +1,19 @@
export const details = [{
title: 'E荒星伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
}, {
title: 'Q地震波单次伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['地震波单次伤害'], 'q')
}]
export const mainAttr = 'atk,cpct,cdmg,dmg'
export const buffs = [{
title: '岩主1命处于Q岩造物范围内时暴击率提高[cpct]%',
cons: 1,
data: {
cpct: 10
}
}]
export const createdBy = 'Aluxes'

View File

@ -0,0 +1,45 @@
export const details = [{
title: 'E点按伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['喷发激流伤害'], 'e')
}, {
title: 'E点按伤害·蒸发',
dmg: ({ talent }, dmg) => dmg(talent.e['喷发激流伤害'], 'e', 'vaporize')
}, {
title: 'E长按露滴伤害',
params: { talentE1: true },
dmg: ({ talent }, dmg) => dmg(talent.e['露滴伤害'], 'e')
}, {
title: 'E长按结束伤害',
params: { talentE2: true },
dmg: ({ talent }, dmg) => dmg(talent.e['喷发激流伤害'], 'e')
}, {
title: 'E长按结束伤害·蒸发',
params: { talentE2: true },
dmg: ({ talent }, dmg) => dmg(talent.e['喷发激流伤害'], 'e', 'vaporize')
}, {
title: 'Q每跳伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q')
}, {
title: 'Q每跳伤害·蒸发',
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q', 'vaporize')
}]
export const defDmgIdx = 1
export const mainAttr = 'atk,cpct,cdmg,mastery,dmg'
export const buffs = [{
title: '天赋E-水纹剑长按E释放时基于自身生命值上限的[_hpPct]%,提高伤害值[ePlus]',
check: ({ params }) => params.talentE1 === true,
data: {
_hpPct: ({ talent }) => talent.e['充盈伤害增加'],
ePlus: ({ talent, attr }) => talent.e['充盈伤害增加'] * attr.hp / 100
}
}, {
title: '天赋-澄明的净水长按E时根据消耗的生命值的45%,提高伤害值[ePlus]',
check: ({ params }) => params.talentE2 === true,
data: {
ePlus: ({ attr }) => Math.min(5000, attr.hp * 0.24 * 0.45)
}
}, 'vaporize']
export const createdBy = 'Aluxes'

View File

@ -4,7 +4,7 @@
"abbr": "旅行者",
"title": "异界的旅人",
"star": 5,
"elem": "anemo",
"elem": "hydro",
"allegiance": "——",
"weapon": "sword",
"birth": "-",

View File

@ -62,3 +62,5 @@ export const buffs = [{
a2Plus: ({ talent, attr, calc }) => talent.a['礼花术弹伤害'] / 100 * calc(attr.atk) * 0.8
}
}]
export const createdBy = 'Aluxes'

View File

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

View File

@ -13,19 +13,9 @@ export const details = [{
title: 'Q每跳护盾吸收量',
dmg: ({ talent, calc, attr }, { shield }) => shield(talent.q['无郤气护盾吸收量2'][0] * calc(attr.hp) / 100 + talent.q['无郤气护盾吸收量2'][1])
}, {
check: ({ cons }) => cons < 6,
title: 'Q每跳伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['灵气脉技能伤害'], 'q')
}, {
check: ({ cons }) => cons >= 6,
title: 'Q每跳伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['灵气脉技能伤害'], 'q')
}, {
check: ({ cons }) => cons < 6,
title: 'Q每跳激化伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['灵气脉技能伤害'], 'q', 'spread')
}, {
check: ({ cons }) => cons >= 6,
title: 'Q每跳激化伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['灵气脉技能伤害'], 'q', 'spread')
}]

View File

@ -19,14 +19,29 @@ export const details = [{
}, {
title: 'Q万众狂欢·伤害',
params: { talentQ: true },
dmg: ({ talent, attr, cons }, { basic }) => basic(attr.hp * (talent.q['技能伤害'] / 100), 'q')
dmg: ({ talent, attr }, { basic }) => basic(attr.hp * (talent.q['技能伤害'] / 100), 'q')
}, {
title: 'Q万众狂欢伤害·蒸发',
params: { talentQ: true },
dmg: ({ talent, attr, cons }, { basic }) => basic(attr.hp * (talent.q['技能伤害'] / 100), 'q', '蒸发')
dmg: ({ talent, attr }, { basic }) => basic(attr.hp * (talent.q['技能伤害'] / 100), 'q', '蒸发')
}, {
title: '六命荒刀每秒治疗',
cons: 6,
params: { talentQ: true },
dmg: ({ attr }, { heal }) => heal(attr.hp * 0.04)
}, {
title: '六命荒刀普攻伤害',
cons: 6,
params: { talentQ: true },
dmg: ({ talent, attr }, { basic }) => basic(attr.atk * talent.a['一段伤害'] / 100 + attr.hp * 0.18, 'a')
}, {
title: '六命芒刀普攻伤害',
cons: 6,
params: { talentQ: true },
dmg: ({ talent, attr }, { basic }) => basic(attr.atk * talent.a['一段伤害'] / 100 + attr.hp * 0.43, 'a')
}]
export const mainAttr = 'hp,mastery,cpct,cdmg'
export const mainAttr = 'hp,mastery,cpct,cdmg,dmg'
export const defDmgIdx = 3
export const buffs = [{
@ -53,6 +68,6 @@ export const buffs = [{
title: '芙宁娜2命万众狂欢持续期间满气氛值提升芙宁娜140%生命值',
cons: 2,
data: {
hpPct: ({ params }) => params.talentQ ? 140 : 0,
hpPct: ({ params }) => params.talentQ ? 140 : 0
}
}, 'vaporize']

View File

@ -93,3 +93,5 @@ export const buffs = [{
a2Cdmg: 80
}
}, 'melt']
export const createdBy = 'Aluxes'

View File

@ -123,3 +123,5 @@ export const buffs = [{
_ePlus: ({ attr, calc }) => calc(attr.mastery) * 2.5
}
}, 'aggravate']
export const createdBy = 'Aluxes'

View File

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

View File

@ -39,9 +39,21 @@
"80+": 37.71
}
},
"materials": {},
"materials": {
"weapon": "悠古弦音的回响",
"monster": "役人的时时刻刻",
"normal": "异色结晶石"
},
"affixData": {
"text": "在数之不尽的故事中,能够配得上传奇勇者的武器,也是开启一切门扉迈过高潮前往命运终局的钥匙。",
"datas": {}
"text": "装备者不具备「始基力」时:普通攻击、重击、下落攻击命中时,会释放芒性或荒性的能量冲击,造成$[0]攻击力的伤害。该效果每12秒至多触发一次能量冲击的类型由水仙十字之剑当前的属性决定。",
"datas": {
"0": [
"160%",
"200%",
"240%",
"280%",
"320%"
]
}
}
}

View File

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

View File

@ -57,3 +57,5 @@ export const buffs = [{
dotData: ({ weapon }) => weapon.affix * 10 + 50
}
}]
export const createdBy = 'Aluxes'

View File

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

View File

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

View File

@ -51,3 +51,5 @@ export const buffs = [{
title: '桂乃芬2命目标处于灼烧状态时持续伤害倍率提升40%',
cons: 2
}]
export const createdBy = 'Aluxes'

View File

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

View File

@ -41,3 +41,5 @@ export const buffs = [{
atkPct: ({ talent }) => talent.t['攻击力提高'] * 5 * 100
}
}]
export const createdBy = 'Aluxes'

View File

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