新增月城柳伤害计算等

This commit is contained in:
UCPr 2025-01-15 01:08:31 +08:00
parent 5bacdbbbc9
commit 208cb0ae05
5 changed files with 293 additions and 162 deletions

View file

@ -56,6 +56,8 @@ export class Calculator {
} }
if (!skill.banCache && this.damageCache[skill.type]) if (!skill.banCache && this.damageCache[skill.type])
return this.damageCache[skill.type]; return this.damageCache[skill.type];
if (skill.check && !skill.check({ avatar: this.avatar, buffM: this.buffM, calc: this }))
return;
logger.debug(`${logger.green(skill.type)}${skill.name}伤害计算:`); logger.debug(`${logger.green(skill.type)}${skill.name}伤害计算:`);
if (skill.dmg) { if (skill.dmg) {
const dmg = skill.dmg(this); const dmg = skill.dmg(this);
@ -68,74 +70,63 @@ export class Calculator {
element: skill.element, element: skill.element,
range: skill.redirect ? [skill.type, skill.redirect] : [skill.type] range: skill.redirect ? [skill.type, skill.redirect] : [skill.type]
}, this); }, this);
const detail = {};
if (skill.before) if (skill.before)
skill.before({ skill, avatar: this.avatar, usefulBuffs, calc: this }); skill.before({ avatar: this.avatar, calc: this, detail, skill, usefulBuffs, });
let Multiplier = 0;
const isAnomaly = typeof anomalyEnum[skill.type] === 'number'; const isAnomaly = typeof anomalyEnum[skill.type] === 'number';
if (skill.fixedMultiplier) if (!detail.BasicArea) {
Multiplier = skill.fixedMultiplier; if (!detail.Multiplier) {
if (skill.fixedMultiplier) {
detail.Multiplier = skill.fixedMultiplier;
}
else if (isAnomaly) { else if (isAnomaly) {
Multiplier = (skill.type === '紊乱' ? detail.Multiplier = (skill.type === '紊乱' ?
this.get_DiscoverMultiplier(skill) : this.get_DiscoverMultiplier(skill) :
this.get_AnomalyMultiplier(skill, usefulBuffs, skill.name.includes('每') ? 1 : 0)) || 0; this.get_AnomalyMultiplier(skill, usefulBuffs, skill.name.includes('每') ? 1 : 0)) || 0;
} }
else { else {
if (skill.skillMultiplier) if (skill.skillMultiplier)
Multiplier = skill.skillMultiplier[this.get_SkillLevel(skill.type[0]) - 1]; detail.Multiplier = skill.skillMultiplier[this.get_SkillLevel(skill.type[0]) - 1];
else else
Multiplier = this.get_Multiplier(skill.type); detail.Multiplier = this.get_Multiplier(skill.type);
} }
const ExtraMultiplier = this.get_ExtraMultiplier(skill, usefulBuffs); const ExtraMultiplier = this.get_ExtraMultiplier(skill, usefulBuffs);
Multiplier += ExtraMultiplier; detail.Multiplier += ExtraMultiplier;
if (!Multiplier) if (!detail.Multiplier)
return logger.warn('技能倍率缺失:', skill); return logger.warn('技能倍率缺失:', skill);
if (ExtraMultiplier) if (ExtraMultiplier)
logger.debug(`最终倍率:${Multiplier}`); logger.debug(`最终倍率:${detail.Multiplier}`);
const ATK = this.get_ATK(skill, usefulBuffs); }
let CRITRate = 0, CRITDMG = 0, AnomalyCRITRate = 0, AnomalyCRITDMG = 0; detail.ATK ??= this.get_ATK(skill, usefulBuffs);
let AnomalyProficiencyArea = 0, AnomalyBoostArea = 0, LevelArea = 0; }
let CriticalArea = 0; detail.BasicArea ??= detail.ATK * detail.Multiplier;
logger.debug(`基础伤害区:${detail.BasicArea}`);
if (isAnomaly) { if (isAnomaly) {
AnomalyProficiencyArea = this.get_AnomalyProficiencyArea(skill, usefulBuffs); detail.AnomalyProficiencyArea ??= this.get_AnomalyProficiencyArea(skill, usefulBuffs);
AnomalyBoostArea = this.get_AnomalyBoostArea(skill, usefulBuffs); detail.AnomalyBoostArea ??= this.get_AnomalyBoostArea(skill, usefulBuffs);
LevelArea = this.get_LevelArea(); detail.LevelArea ??= this.get_LevelArea();
AnomalyCRITRate = this.get_AnomalyCRITRate(skill, usefulBuffs); detail.AnomalyCRITRate ??= this.get_AnomalyCRITRate(skill, usefulBuffs);
AnomalyCRITDMG = this.get_AnomalyCRITDMG(skill, usefulBuffs); detail.AnomalyCRITDMG ??= this.get_AnomalyCRITDMG(skill, usefulBuffs);
CriticalArea = 1 + AnomalyCRITRate * (AnomalyCRITDMG - 1); detail.CriticalArea ??= 1 + detail.AnomalyCRITRate * (detail.AnomalyCRITDMG - 1);
} }
else { else {
CRITRate = this.get_CRITRate(skill, usefulBuffs); detail.CRITRate ??= this.get_CRITRate(skill, usefulBuffs);
CRITDMG = this.get_CRITDMG(skill, usefulBuffs); detail.CRITDMG ??= this.get_CRITDMG(skill, usefulBuffs);
CriticalArea = 1 + CRITRate * (CRITDMG - 1); detail.CriticalArea ??= 1 + detail.CRITRate * (detail.CRITDMG - 1);
} }
logger.debug(`暴击期望:${CriticalArea}`); logger.debug(`暴击期望:${detail.CriticalArea}`);
const BoostArea = this.get_BoostArea(skill, usefulBuffs); detail.BoostArea ??= this.get_BoostArea(skill, usefulBuffs);
const VulnerabilityArea = this.get_VulnerabilityArea(skill, usefulBuffs); detail.VulnerabilityArea ??= this.get_VulnerabilityArea(skill, usefulBuffs);
const ResistanceArea = this.get_ResistanceArea(skill, usefulBuffs); detail.ResistanceArea ??= this.get_ResistanceArea(skill, usefulBuffs);
const DefenceArea = this.get_DefenceArea(skill, usefulBuffs); detail.DefenceArea ??= this.get_DefenceArea(skill, usefulBuffs);
const { BasicArea, CRITDMG, CriticalArea, BoostArea, VulnerabilityArea, ResistanceArea, DefenceArea, AnomalyProficiencyArea, LevelArea, AnomalyBoostArea, AnomalyCRITRate, AnomalyCRITDMG } = detail;
const result = isAnomaly ? const result = isAnomaly ?
{ {
critDMG: AnomalyCRITRate ? ATK * Multiplier * AnomalyCRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0, critDMG: AnomalyCRITRate ? BasicArea * AnomalyCRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0,
expectDMG: ATK * Multiplier * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea
} : { } : {
critDMG: ATK * Multiplier * CRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea, critDMG: BasicArea * CRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea,
expectDMG: ATK * Multiplier * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea
};
const detail = {
Multiplier,
ATK,
CRITRate,
CRITDMG,
CriticalArea,
BoostArea,
VulnerabilityArea,
ResistanceArea,
DefenceArea,
AnomalyCRITRate,
AnomalyCRITDMG,
AnomalyProficiencyArea,
AnomalyBoostArea,
LevelArea
}; };
const damage = { skill, detail, result }; const damage = { skill, detail, result };
if (skill.after) { if (skill.after) {
@ -199,17 +190,17 @@ export class Calculator {
*/ */
get_Multiplier(type) { get_Multiplier(type) {
const skillLevel = this.get_SkillLevel(type[0]); const skillLevel = this.get_SkillLevel(type[0]);
logger.debug(`等级:${skillLevel}`); logger.debug(`${type[0]}等级:${skillLevel}`);
const Multiplier = charData[this.avatar.id].skill[type]?.[skillLevel - 1]; const Multiplier = charData[this.avatar.id].skill[type]?.[skillLevel - 1];
logger.debug(`倍率:${Multiplier}`); logger.debug(`技能倍率:${Multiplier}`);
return Multiplier; return Multiplier;
} }
get_AnomalyData(skill) { get_AnomalyData(type) {
let a = AnomalyData.filter(({ element_type }) => element_type === this.avatar.element_type); let a = AnomalyData.filter(({ element_type }) => element_type === this.avatar.element_type);
if (skill.type === '紊乱') if (type === '紊乱')
a = a.filter(({ discover }) => discover); a = a.filter(({ discover }) => discover);
else else
a = a.filter(({ name, multiplier }) => name === skill.type && multiplier); a = a.filter(({ name, multiplier }) => name === type && multiplier);
if (a.length === 1) if (a.length === 1)
return a[0]; return a[0];
a = a.filter(({ sub_element_type }) => sub_element_type === this.avatar.sub_element_type); a = a.filter(({ sub_element_type }) => sub_element_type === this.avatar.sub_element_type);
@ -217,7 +208,7 @@ export class Calculator {
} }
/** 获取属性异常倍率 */ /** 获取属性异常倍率 */
get_AnomalyMultiplier(skill, usefulBuffs, times = 0) { get_AnomalyMultiplier(skill, usefulBuffs, times = 0) {
const anomalyData = this.get_AnomalyData(skill); const anomalyData = this.get_AnomalyData(skill.type);
if (!anomalyData) if (!anomalyData)
return; return;
let Multiplier = anomalyData.multiplier; let Multiplier = anomalyData.multiplier;
@ -231,7 +222,7 @@ export class Calculator {
} }
/** 获取紊乱倍率 */ /** 获取紊乱倍率 */
get_DiscoverMultiplier(skill) { get_DiscoverMultiplier(skill) {
const anomalyData = this.get_AnomalyData(skill); const anomalyData = this.get_AnomalyData(skill.type);
if (!anomalyData) if (!anomalyData)
return; return;
const AnomalyDuration = this.get_AnomalyDuration({ const AnomalyDuration = this.get_AnomalyDuration({

View file

@ -28,21 +28,28 @@ export interface skill {
redirect?: string redirect?: string
/** 禁用伤害计算cache */ /** 禁用伤害计算cache */
banCache?: boolean banCache?: boolean
/** 是否计算该技能 */
check?: (({ avatar, buffM, calc }: {
avatar: ZZZAvatarInfo
buffM: BuffManager
calc: Calculator
}) => boolean)
/** 自定义计算逻辑 */ /** 自定义计算逻辑 */
dmg?: (calc: Calculator) => damage dmg?: (calc: Calculator) => damage
/** 额外处理 */ /** 额外处理 */
before?: ({ skill, avatar, usefulBuffs, calc }: { before?: ({ avatar, calc, usefulBuffs, detail, skill }: {
avatar: ZZZAvatarInfo
calc: Calculator
detail: damage['detail']
usefulBuffs: buff[]
/** 技能自身 */ /** 技能自身 */
skill: skill skill: skill
avatar: ZZZAvatarInfo
usefulBuffs: buff[]
calc: Calculator
}) => void }) => void
after?: ({ avatar, damage, calc, usefulBuffs }: { after?: ({ avatar, calc, usefulBuffs, damage }: {
avatar: ZZZAvatarInfo avatar: ZZZAvatarInfo
damage: damage
calc: Calculator calc: Calculator
usefulBuffs: buff[] usefulBuffs: buff[]
damage: damage
}) => void }) => void
} }
@ -55,6 +62,8 @@ export interface damage {
Multiplier: number Multiplier: number
/** 攻击力 */ /** 攻击力 */
ATK: number ATK: number
/** 基础伤害区 */
BasicArea: number
/** 暴击率 */ /** 暴击率 */
CRITRate: number CRITRate: number
/** 暴伤伤害 */ /** 暴伤伤害 */
@ -186,6 +195,7 @@ export class Calculator {
return this.calc_skill(MySkill) return this.calc_skill(MySkill)
} }
if (!skill.banCache && this.damageCache[skill.type]) return this.damageCache[skill.type] if (!skill.banCache && this.damageCache[skill.type]) return this.damageCache[skill.type]
if (skill.check && !skill.check({ avatar: this.avatar, buffM: this.buffM, calc: this })) return
logger.debug(`${logger.green(skill.type)}${skill.name}伤害计算:`) logger.debug(`${logger.green(skill.type)}${skill.name}伤害计算:`)
if (skill.dmg) { if (skill.dmg) {
const dmg = skill.dmg(this) const dmg = skill.dmg(this)
@ -198,68 +208,60 @@ export class Calculator {
element: skill.element, element: skill.element,
range: skill.redirect ? [skill.type, skill.redirect] : [skill.type] range: skill.redirect ? [skill.type, skill.redirect] : [skill.type]
}, this) }, this)
if (skill.before) skill.before({ skill, avatar: this.avatar, usefulBuffs, calc: this }) const detail = {} as damage['detail']
let Multiplier = 0 if (skill.before) skill.before({ avatar: this.avatar, calc: this, detail, skill, usefulBuffs, })
const isAnomaly = typeof anomalyEnum[skill.type as anomaly] === 'number' const isAnomaly = typeof anomalyEnum[skill.type as anomaly] === 'number'
if (skill.fixedMultiplier) Multiplier = skill.fixedMultiplier if (!detail.BasicArea) {
else if (isAnomaly) { if (!detail.Multiplier) {
Multiplier = ( if (skill.fixedMultiplier) {
detail.Multiplier = skill.fixedMultiplier
} else if (isAnomaly) {
detail.Multiplier = (
skill.type === '紊乱' ? skill.type === '紊乱' ?
this.get_DiscoverMultiplier(skill) : this.get_DiscoverMultiplier(skill) :
this.get_AnomalyMultiplier(skill, usefulBuffs, skill.name.includes('每') ? 1 : 0) this.get_AnomalyMultiplier(skill, usefulBuffs, skill.name.includes('每') ? 1 : 0)
) || 0 ) || 0
} else { } else {
if (skill.skillMultiplier) Multiplier = skill.skillMultiplier[this.get_SkillLevel(skill.type[0]) - 1] if (skill.skillMultiplier) detail.Multiplier = skill.skillMultiplier[this.get_SkillLevel(skill.type[0]) - 1]
else Multiplier = this.get_Multiplier(skill.type) else detail.Multiplier = this.get_Multiplier(skill.type)
} }
const ExtraMultiplier = this.get_ExtraMultiplier(skill, usefulBuffs) const ExtraMultiplier = this.get_ExtraMultiplier(skill, usefulBuffs)
Multiplier += ExtraMultiplier detail.Multiplier += ExtraMultiplier
if (!Multiplier) return logger.warn('技能倍率缺失:', skill) if (!detail.Multiplier) return logger.warn('技能倍率缺失:', skill)
if (ExtraMultiplier) logger.debug(`最终倍率:${Multiplier}`) if (ExtraMultiplier) logger.debug(`最终倍率:${detail.Multiplier}`)
const ATK = this.get_ATK(skill, usefulBuffs)
let CRITRate = 0, CRITDMG = 0, AnomalyCRITRate = 0, AnomalyCRITDMG = 0
let AnomalyProficiencyArea = 0, AnomalyBoostArea = 0, LevelArea = 0
let CriticalArea = 0
if (isAnomaly) {
AnomalyProficiencyArea = this.get_AnomalyProficiencyArea(skill, usefulBuffs)
AnomalyBoostArea = this.get_AnomalyBoostArea(skill, usefulBuffs)
LevelArea = this.get_LevelArea()
AnomalyCRITRate = this.get_AnomalyCRITRate(skill, usefulBuffs)
AnomalyCRITDMG = this.get_AnomalyCRITDMG(skill, usefulBuffs)
CriticalArea = 1 + AnomalyCRITRate * (AnomalyCRITDMG - 1)
} else {
CRITRate = this.get_CRITRate(skill, usefulBuffs)
CRITDMG = this.get_CRITDMG(skill, usefulBuffs)
CriticalArea = 1 + CRITRate * (CRITDMG - 1)
} }
logger.debug(`暴击期望:${CriticalArea}`) detail.ATK ??= this.get_ATK(skill, usefulBuffs)
const BoostArea = this.get_BoostArea(skill, usefulBuffs) }
const VulnerabilityArea = this.get_VulnerabilityArea(skill, usefulBuffs) detail.BasicArea ??= detail.ATK * detail.Multiplier
const ResistanceArea = this.get_ResistanceArea(skill, usefulBuffs) logger.debug(`基础伤害区:${detail.BasicArea}`)
const DefenceArea = this.get_DefenceArea(skill, usefulBuffs) if (isAnomaly) {
detail.AnomalyProficiencyArea ??= this.get_AnomalyProficiencyArea(skill, usefulBuffs)
detail.AnomalyBoostArea ??= this.get_AnomalyBoostArea(skill, usefulBuffs)
detail.LevelArea ??= this.get_LevelArea()
detail.AnomalyCRITRate ??= this.get_AnomalyCRITRate(skill, usefulBuffs)
detail.AnomalyCRITDMG ??= this.get_AnomalyCRITDMG(skill, usefulBuffs)
detail.CriticalArea ??= 1 + detail.AnomalyCRITRate * (detail.AnomalyCRITDMG - 1)
} else {
detail.CRITRate ??= this.get_CRITRate(skill, usefulBuffs)
detail.CRITDMG ??= this.get_CRITDMG(skill, usefulBuffs)
detail.CriticalArea ??= 1 + detail.CRITRate * (detail.CRITDMG - 1)
}
logger.debug(`暴击期望:${detail.CriticalArea}`)
detail.BoostArea ??= this.get_BoostArea(skill, usefulBuffs)
detail.VulnerabilityArea ??= this.get_VulnerabilityArea(skill, usefulBuffs)
detail.ResistanceArea ??= this.get_ResistanceArea(skill, usefulBuffs)
detail.DefenceArea ??= this.get_DefenceArea(skill, usefulBuffs)
const {
BasicArea, CRITDMG, CriticalArea, BoostArea, VulnerabilityArea, ResistanceArea, DefenceArea,
AnomalyProficiencyArea, LevelArea, AnomalyBoostArea, AnomalyCRITRate, AnomalyCRITDMG
} = detail
const result: damage['result'] = isAnomaly ? const result: damage['result'] = isAnomaly ?
{ {
critDMG: AnomalyCRITRate ? ATK * Multiplier * AnomalyCRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0, critDMG: AnomalyCRITRate ? BasicArea * AnomalyCRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0,
expectDMG: ATK * Multiplier * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea
} : { } : {
critDMG: ATK * Multiplier * CRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea, critDMG: BasicArea * CRITDMG * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea,
expectDMG: ATK * Multiplier * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea
}
const detail: damage['detail'] = {
Multiplier,
ATK,
CRITRate,
CRITDMG,
CriticalArea,
BoostArea,
VulnerabilityArea,
ResistanceArea,
DefenceArea,
AnomalyCRITRate,
AnomalyCRITDMG,
AnomalyProficiencyArea,
AnomalyBoostArea,
LevelArea
} }
const damage: damage = { skill, detail, result } const damage: damage = { skill, detail, result }
if (skill.after) { if (skill.after) {
@ -330,16 +332,16 @@ export class Calculator {
*/ */
get_Multiplier(type: string) { get_Multiplier(type: string) {
const skillLevel = this.get_SkillLevel(type[0]) const skillLevel = this.get_SkillLevel(type[0])
logger.debug(`等级:${skillLevel}`) logger.debug(`${type[0]}等级:${skillLevel}`)
const Multiplier = charData[this.avatar.id].skill[type]?.[skillLevel - 1] const Multiplier = charData[this.avatar.id].skill[type]?.[skillLevel - 1]
logger.debug(`倍率:${Multiplier}`) logger.debug(`技能倍率:${Multiplier}`)
return Multiplier return Multiplier
} }
get_AnomalyData(skill: skill) { get_AnomalyData(type: skill['type']) {
let a = AnomalyData.filter(({ element_type }) => element_type === this.avatar.element_type) let a = AnomalyData.filter(({ element_type }) => element_type === this.avatar.element_type)
if (skill.type === '紊乱') a = a.filter(({ discover }) => discover) if (type === '紊乱') a = a.filter(({ discover }) => discover)
else a = a.filter(({ name, multiplier }) => name === skill.type && multiplier) else a = a.filter(({ name, multiplier }) => name === type && multiplier)
if (a.length === 1) return a[0] if (a.length === 1) return a[0]
a = a.filter(({ sub_element_type }) => sub_element_type === this.avatar.sub_element_type) a = a.filter(({ sub_element_type }) => sub_element_type === this.avatar.sub_element_type)
return a[0] return a[0]
@ -347,7 +349,7 @@ export class Calculator {
/** 获取属性异常倍率 */ /** 获取属性异常倍率 */
get_AnomalyMultiplier(skill: skill, usefulBuffs: buff[], times = 0) { get_AnomalyMultiplier(skill: skill, usefulBuffs: buff[], times = 0) {
const anomalyData = this.get_AnomalyData(skill) const anomalyData = this.get_AnomalyData(skill.type)
if (!anomalyData) return if (!anomalyData) return
let Multiplier = anomalyData.multiplier let Multiplier = anomalyData.multiplier
if (anomalyData.duration && anomalyData.interval) { if (anomalyData.duration && anomalyData.interval) {
@ -361,7 +363,7 @@ export class Calculator {
/** 获取紊乱倍率 */ /** 获取紊乱倍率 */
get_DiscoverMultiplier(skill: skill) { get_DiscoverMultiplier(skill: skill) {
const anomalyData = this.get_AnomalyData(skill) const anomalyData = this.get_AnomalyData(skill.type)
if (!anomalyData) return if (!anomalyData) return
const AnomalyDuration = this.get_AnomalyDuration({ const AnomalyDuration = this.get_AnomalyDuration({
...skill, ...skill,

View file

@ -0,0 +1,106 @@
/** @type {import('../../BuffManager.ts').BuffManager['buffs']} */
export const buffs = [
{
name: '1影',
type: '异常精通',
value: 80
},
{
name: '2影',
type: '倍率',
value: 0.05,
isForever: true,
range: ['强化E极性紊乱']
},
{
name: '2影',
type: '倍率',
value: 0.3,
range: ['强化E极性紊乱']
},
{
name: '4影',
type: '穿透率',
value: 0.16
},
{
name: '6影',
type: '增伤',
value: 0.2,
range: ['EQ']
},
{
name: '6影',
type: '倍率',
value: 0.3,
range: ['强化E极性紊乱']
},
{
name: '核心被动:月蚀',
type: '倍率',
value: 'T1',
range: ['紊乱']
},
{
name: '核心被动:月蚀',
type: '增伤',
value: 'T2',
element: 'Electric'
},
{
name: '技能:普攻上弦',
type: '增伤',
value: 0.1,
element: 'Electric'
},
{
name: '技能:普攻下弦',
type: '穿透率',
value: 0.1
}
]
/** @type {import('../../Calculator.ts').Calculator['skills']} */
export const skills = [
{ name: '感电每次', type: '感电' },
{ name: '紊乱', type: '紊乱' },
{ name: '普攻:上弦五段', type: 'APS5' },
{ name: '普攻:下弦五段', type: 'APX5' },
{ name: '闪避反击:疾反', type: 'CF' },
{ name: '强化特殊技月华流转0', type: 'EQ0', isHide: true },
{
name: '强化特殊技:月华流转',
type: 'EQ',
after: ({ damage }) => damage.add('EQ0')
},
{
name: '强化E极性紊乱',
type: '紊乱',
banCache: true,
before: ({ calc, detail }) => {
const skill = { type: '紊乱' }
const DiscoverMultiplier = calc.get_DiscoverMultiplier(skill)
const n = calc.get('倍率', 0.15, { type: '强化E极性紊乱' })
const ATK = calc.get_ATK(skill)
const AnomalyProficiency = calc.get_AnomalyProficiency(skill)
const skillMultiplier = calc.get_Multiplier('E极性紊乱')
detail.BasicArea = DiscoverMultiplier * ATK * n + AnomalyProficiency * skillMultiplier
}
},
{ name: '连携技:星月相随', type: 'RL' },
{ name: '终结技:雷影天华', type: 'RZ' },
{
name: '终结技极性紊乱',
type: '紊乱',
banCache: true,
before: ({ calc, detail }) => {
const skill = { type: '紊乱' }
const DiscoverMultiplier = calc.get_DiscoverMultiplier(skill)
const n = calc.get('倍率', 0.15, { type: '终结技极性紊乱' })
const ATK = calc.get_ATK(skill)
const AnomalyProficiency = calc.get_AnomalyProficiency(skill)
const skillMultiplier = calc.get_Multiplier('R极性紊乱')
detail.BasicArea = DiscoverMultiplier * ATK * n + AnomalyProficiency * skillMultiplier
}
}
]

View file

@ -0,0 +1,39 @@
{
"skill": {
"APS5": [
2.369,2.585,2.801,3.017,3.233,3.449,3.665,3.881,4.097,4.313,4.529,4.745,4.961,5.177,5.393,5.609
],
"APX5": [
2.718,2.966,3.214,3.462,3.71,3.958,4.206,4.454,4.702,4.95,5.198,5.446,5.694,5.942,6.19,6.438
],
"CF": [
2.316,2.527,2.738,2.949,3.16,3.371,3.582,3.793,4.004,4.215,4.426,4.637,4.848,5.059,5.27,5.481
],
"EQ0": [
1.638,1.787,1.936,2.085,2.234,2.383,2.532,2.681,2.83,2.979,3.128,3.277,3.426,3.575,3.724,3.873
],
"EQ": [
3.778,4.122,4.466,4.81,5.154,5.498,5.842,6.186,6.53,6.874,7.218,7.562,7.906,8.25,8.594,8.938
],
"E极性紊乱": [
7.25,9.5,11.75,14,16.25,18.5,20.75,23,25.25,27.5,29.75,32,34.25,36.5,38.75,41
],
"RL": [
5.931,6.471,7.011,7.551,8.091,8.631,9.171,9.711,10.251,10.791,11.331,11.871,12.411,12.951,13.491,14.31
],
"RZ": [
5.931,6.471,7.011,7.551,8.091,8.631,9.171,9.711,10.251,10.791,11.331,11.871,12.411,12.951,13.491,14.31
],
"R极性紊乱": [
7.25,9.5,11.75,14,16.25,18.5,20.75,23,25.25,27.5,29.75,32,34.25,36.5,38.75,41
]
},
"buff": {
"T1": [
1.25,1.45,1.66,1.88,2.08,2.30,2.50
],
"T2": [
0.1,0.116,0.133,0.15,0.166,0.183,0.2
]
}
}

View file

@ -68,35 +68,28 @@ export const skills = [
type: 'EQS', type: 'EQS',
after: ({ damage }) => damage.x(0.5) after: ({ damage }) => damage.x(0.5)
}, },
{ name: '连携技:燃油熔焰', type: 'RL' }, {
{ name: '终结技:纵享盛焰', type: 'RZ' }
]
/**
* @param {import('../../BuffManager.ts').BuffManager} buffM
* @param {import('../../Calculator.ts').Calculator} calc
* @param {import('../../../avatar.js').ZZZAvatarInfo} avatar
*/
export function calc(buffM, calc, avatar) {
if (avatar.rank >= 6) {
calc.new({
name: '6影强化E双份额外余烬秒伤', name: '6影强化E双份额外余烬秒伤',
type: 'YY', type: 'YY',
fixedMultiplier: 1.2 fixedMultiplier: 1.2,
}) check: ({ avatar }) => avatar.rank >= 6
calc.new({ },
{
name: '6影强化E双份额外灼烧', name: '6影强化E双份额外灼烧',
type: 'Y灼烧', type: 'Y灼烧',
check: ({ avatar }) => avatar.rank >= 6,
dmg: (calc) => { dmg: (calc) => {
const dmg = calc.calc_skill({ const dmg = calc.calc_skill({
name: '灼烧每段', name: '灼烧每段',
element: 'Fire', element: 'Fire',
banCache: true,
type: '灼烧', type: '灼烧',
after: ({ damage }) => damage.x(18) after: ({ damage }) => damage.x(18)
}) })
dmg.skill.name = '6影强化E双份额外灼烧' dmg.skill.name = '6影强化E双份额外灼烧'
return dmg return dmg
} }
}) },
} { name: '连携技:燃油熔焰', type: 'RL' },
} { name: '终结技:纵享盛焰', type: 'RZ' }
]