mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
新增伊芙琳伤害计算
This commit is contained in:
parent
1e09912b84
commit
fb5970a7d9
5 changed files with 127 additions and 3 deletions
|
|
@ -10,6 +10,8 @@ export class Calculator {
|
||||||
skills = [];
|
skills = [];
|
||||||
cache = {};
|
cache = {};
|
||||||
props = {};
|
props = {};
|
||||||
|
/** 当前正在计算的技能 */
|
||||||
|
skill;
|
||||||
defaultSkill = {};
|
defaultSkill = {};
|
||||||
enemy;
|
enemy;
|
||||||
constructor(buffM) {
|
constructor(buffM) {
|
||||||
|
|
@ -54,6 +56,7 @@ export class Calculator {
|
||||||
return;
|
return;
|
||||||
return this.calc_skill(MySkill);
|
return this.calc_skill(MySkill);
|
||||||
}
|
}
|
||||||
|
this.skill = skill;
|
||||||
if (!skill.banCache && this.cache[skill.type])
|
if (!skill.banCache && this.cache[skill.type])
|
||||||
return this.cache[skill.type];
|
return this.cache[skill.type];
|
||||||
if (skill.check && !skill.check({ avatar: this.avatar, buffM: this.buffM, calc: this }))
|
if (skill.check && !skill.check({ avatar: this.avatar, buffM: this.buffM, calc: this }))
|
||||||
|
|
@ -129,9 +132,9 @@ export class Calculator {
|
||||||
critDMG: (CriticalArea !== 1) ? BasicArea * 异常暴击伤害 * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0,
|
critDMG: (CriticalArea !== 1) ? BasicArea * 异常暴击伤害 * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea : 0,
|
||||||
expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea
|
expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea * AnomalyProficiencyArea * LevelArea * AnomalyBoostArea
|
||||||
} : {
|
} : {
|
||||||
critDMG: BasicArea * 暴击伤害 * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea,
|
critDMG: BasicArea * 暴击伤害 * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea,
|
||||||
expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea
|
expectDMG: BasicArea * CriticalArea * BoostArea * VulnerabilityArea * ResistanceArea * DefenceArea
|
||||||
};
|
};
|
||||||
const damage = { skill, props, areas, result };
|
const damage = { skill, props, areas, result };
|
||||||
if (skill.after) {
|
if (skill.after) {
|
||||||
damage.add = (d) => {
|
damage.add = (d) => {
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@ export class Calculator {
|
||||||
readonly skills: skill[] = []
|
readonly skills: skill[] = []
|
||||||
private cache: { [type: string]: damage } = {}
|
private cache: { [type: string]: damage } = {}
|
||||||
private props: damage['props'] = {}
|
private props: damage['props'] = {}
|
||||||
|
/** 当前正在计算的技能 */
|
||||||
|
skill: skill
|
||||||
defaultSkill: { [key in keyof skill]?: skill[key] } = {}
|
defaultSkill: { [key in keyof skill]?: skill[key] } = {}
|
||||||
enemy: enemy
|
enemy: enemy
|
||||||
|
|
||||||
|
|
@ -191,6 +193,7 @@ export class Calculator {
|
||||||
if (!MySkill) return
|
if (!MySkill) return
|
||||||
return this.calc_skill(MySkill)
|
return this.calc_skill(MySkill)
|
||||||
}
|
}
|
||||||
|
this.skill = skill
|
||||||
if (!skill.banCache && this.cache[skill.type]) return this.cache[skill.type]
|
if (!skill.banCache && this.cache[skill.type]) return this.cache[skill.type]
|
||||||
if (skill.check && !skill.check({ avatar: this.avatar, buffM: this.buffM, calc: this })) return
|
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}伤害计算:`)
|
||||||
|
|
|
||||||
71
model/damage/character/伊芙琳/calc.js
Normal file
71
model/damage/character/伊芙琳/calc.js
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
/** @type {import('../../BuffManager.ts').BuffManager['buffs']} */
|
||||||
|
export const buffs = [
|
||||||
|
{
|
||||||
|
name: '1影',
|
||||||
|
type: '无视防御',
|
||||||
|
value: 0.12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '2影',
|
||||||
|
type: '攻击力',
|
||||||
|
value: 0.15,
|
||||||
|
isForever: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '4影',
|
||||||
|
type: '暴击伤害',
|
||||||
|
value: 0.4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '核心被动:缠丝',
|
||||||
|
type: '暴击率',
|
||||||
|
value: 'T'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '额外能力:潜袭支点',
|
||||||
|
type: '增伤',
|
||||||
|
value: 0.3,
|
||||||
|
range: ['RL', 'RZ']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '额外能力:潜袭支点',
|
||||||
|
type: '倍率',
|
||||||
|
check: ({ calc }) => calc.get_CRITRate() >= 0.8,
|
||||||
|
value: ({ calc }) => calc.skill.name !== '连携技:月辉丝·绊' ? 0 : calc.get_SkillMultiplier('RL') * 0.25,
|
||||||
|
range: ['RL']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '额外能力:潜袭支点',
|
||||||
|
type: '倍率',
|
||||||
|
check: ({ calc }) => calc.get_CRITRate() >= 0.8,
|
||||||
|
value: ({ calc }) => calc.get_SkillMultiplier('RZ') * 0.25,
|
||||||
|
range: ['RZ']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
/** @type {import('../../Calculator.ts').Calculator['skills']} */
|
||||||
|
export const skills = [
|
||||||
|
{ name: '普攻:割弦五段', type: 'AP5' },
|
||||||
|
{ name: '蓄力普攻:绞勒式·Ⅰ型', type: 'AX1' },
|
||||||
|
{ name: '蓄力普攻:绞勒式·Ⅱ型', type: 'AX2' },
|
||||||
|
{ name: '闪避反击:绞缢反制', type: 'CF' },
|
||||||
|
{
|
||||||
|
name: '强化特殊技:束裂式·终型(引爆)',
|
||||||
|
type: 'EQ0',
|
||||||
|
isHide: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '强化特殊技:束裂式·终型',
|
||||||
|
type: 'EQ',
|
||||||
|
after: ({ damage }) => damage.add('EQ0')
|
||||||
|
},
|
||||||
|
{ name: '连携技:月辉丝·绊', type: 'RL' },
|
||||||
|
{ name: '终结技:月辉丝·弦音', type: 'RZ' },
|
||||||
|
{
|
||||||
|
name: '6影月辉丝·弦',
|
||||||
|
type: 'Y6',
|
||||||
|
redirect: 'RL',
|
||||||
|
fixedMultiplier: 3.75,
|
||||||
|
check: ({ avatar }) => avatar.rank >= 6
|
||||||
|
}
|
||||||
|
]
|
||||||
33
model/damage/character/伊芙琳/data.json
Normal file
33
model/damage/character/伊芙琳/data.json
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"skill": {
|
||||||
|
"AP5": [
|
||||||
|
2.234,2.438,2.642,2.846,3.05,3.254,3.458,3.662,3.866,4.07,4.274,4.478,4.682,4.886,5.09,5.294
|
||||||
|
],
|
||||||
|
"AX1": [
|
||||||
|
2.264,2.47,2.676,2.882,3.088,3.294,3.5,3.706,3.912,4.118,4.324,4.53,4.736,4.942,5.148,5.354
|
||||||
|
],
|
||||||
|
"AX2": [
|
||||||
|
2.452,2.675,2.898,3.121,3.344,3.567,3.79,4.013,4.236,4.459,4.682,4.905,5.128,5.351,5.574,5.797
|
||||||
|
],
|
||||||
|
"CF": [
|
||||||
|
2.102,2.294,2.486,2.678,2.87,3.062,3.254,3.446,3.638,3.83,4.022,4.214,4.406,4.598,4.79,4.982
|
||||||
|
],
|
||||||
|
"EQ0": [
|
||||||
|
0.596,0.651,0.706,0.761,0.816,0.871,0.926,0.981,1.036,1.091,1.146,1.201,1.256,1.311,1.366,1.421
|
||||||
|
],
|
||||||
|
"EQ": [
|
||||||
|
5.412,5.904,6.396,6.888,7.38,7.872,8.364,8.856,9.348,9.84,10.332,10.824,11.316,11.808,12.3,12.792
|
||||||
|
],
|
||||||
|
"RL": [
|
||||||
|
8.293,9.047,9.801,10.555,11.309,12.063,12.817,13.571,14.325,15.079,15.833,16.587,17.341,18.095,18.849,19.603
|
||||||
|
],
|
||||||
|
"RZ": [
|
||||||
|
19.885,21.693,23.501,25.309,27.117,28.925,30.733,32.541,34.349,36.157,37.965,39.773,41.581,43.389,45.197,47.005
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"buff": {
|
||||||
|
"T": [
|
||||||
|
0.125,0.146,0.167,0.188,0.208,0.23,0.25
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
14
model/damage/weapon/心弦夜响.js
Normal file
14
model/damage/weapon/心弦夜响.js
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
/** @type {import('../BuffManager.ts').BuffManager['buffs']} */
|
||||||
|
export const buffs = [
|
||||||
|
{
|
||||||
|
type: '暴击伤害',
|
||||||
|
value: [0.5, 0.575, 0.65, 0.725, 0.8],
|
||||||
|
isForever: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '无视抗性',
|
||||||
|
value: [0.125, 0.145, 0.165, 0.185, 0.2].map(v => v * 2),
|
||||||
|
element: 'Fire',
|
||||||
|
range: ['RL', 'RZ']
|
||||||
|
}
|
||||||
|
]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue