添加[朱鸢]伤害计算,完善驱动盘与强攻武器的计算

This commit is contained in:
a376148946 2024-07-27 00:15:58 +08:00
parent 96dd423b84
commit e76a9ed7ed
5 changed files with 627 additions and 216 deletions

View file

@ -16,7 +16,7 @@ const skilldict = getMapData('SkillData');
export const avatar_ability = (data, base_detail, bonus_detail) => {
const damagelist = [];
switch (data.id) {
case 1191:
case 1191:{
/** 处理命座加成 */
if (data.rank >= 1) {
const CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
@ -118,7 +118,7 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
const damagelist3 = calculate_damage(
base_detail,
bonus_detail,
'E',
'EUP',
'EH',
'Ice',
skill_multiplier3,
@ -139,7 +139,7 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
const damagelist4 = calculate_damage(
base_detail,
bonus_detail,
'E',
'EUP',
'ES',
'Ice',
skill_multiplier4,
@ -194,11 +194,160 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
value: damagelist6,
};
damagelist.push(damage6);
logger.debug('伤害', damagelist);
break;
}
case 1241:{
/** 处理命座加成 */
if (data.rank >= 2) {
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + 0.5;
let C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + 0.5;
}
if (data.rank >= 4) {
let Ether_ResistancePenetration = _.get(bonus_detail, 'Ether_ResistancePenetration', 0);
bonus_detail['Ether_ResistancePenetration'] = Ether_ResistancePenetration + 0.25;
}
/** 处理天赋加成 */
/** 获取天赋等级与加成倍率 */
const DMG_ADD = getskilllevelnum(data.id, data.skills, 'T', 'T');
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + DMG_ADD;
let C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + DMG_ADD;
let CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
bonus_detail['CriticalChanceBase'] = CriticalChanceBase + 0.3;
/** 计算伤害 */
/** 计算普攻伤害 */
const skill_multiplier1 = getskilllevelnum(
data.id,
data.skills,
'A',
'A'
);
const damagelist1 = calculate_damage(
base_detail,
bonus_detail,
'A',
'A',
'Ether',
skill_multiplier1,
data.level
);
const damage1 = {
title: '普通攻击:请勿抵抗',
value: damagelist1,
};
damagelist.push(damage1);
/** 计算冲刺伤害 */
const skill_multiplier2 = getskilllevelnum(
data.id,
data.skills,
'C',
'C'
);
const damagelist2 = calculate_damage(
base_detail,
bonus_detail,
'C',
'C',
'Ether',
skill_multiplier2,
data.level
);
const damage2 = {
title: '冲刺攻击:火力压制',
value: damagelist2,
};
damagelist.push(damage2);
/** 计算强化特殊技伤害 */
const skill_multiplier3 = getskilllevelnum(
data.id,
data.skills,
'E',
'EUP'
);
let damagelist3 = calculate_damage(
base_detail,
bonus_detail,
'EUP',
'EUP',
'Ether',
skill_multiplier3,
data.level
);
if (data.rank >= 6) {
let damagelist_add = calculate_damage(
base_detail,
bonus_detail,
'EUP',
'EUP',
'Ether',
2.2,
data.level
);
damagelist3['cd'] = damagelist3['cd'] + damagelist_add['cd'] * 4
damagelist3['qw'] = damagelist3['qw'] + damagelist_add['qw'] * 4
}
const damage3 = {
title: '强化特殊技:全弹连射',
value: damagelist3,
};
damagelist.push(damage3);
/** 计算连携技伤害 */
const skill_multiplier4 = getskilllevelnum(
data.id,
data.skills,
'R',
'RL'
);
const damagelist4 = calculate_damage(
base_detail,
bonus_detail,
'RL',
'RL',
'Ether',
skill_multiplier4,
data.level
);
const damage4 = {
title: '连携技:歼灭模式',
value: damagelist4,
};
damagelist.push(damage4);
/** 计算终结技伤害 */
const skill_multiplier5 = getskilllevelnum(
data.id,
data.skills,
'R',
'R'
);
const damagelist5 = calculate_damage(
base_detail,
bonus_detail,
'R',
'R',
'Ether',
skill_multiplier5,
data.level
);
const damage5 = {
title: '终结技歼灭模式MAX',
value: damagelist5,
};
damagelist.push(damage5);
break;
}
}
return damagelist;
};

View file

@ -35,6 +35,75 @@ export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
logger.debug('32500,4,C_DmgAdd');
}
break;
case '32600':
if (set_num >= 2) {
let PhysicalDmgAdd = _.get(bonus_detail, 'Physical_DmgAdd', 0);
bonus_detail['Physical_DmgAdd'] = PhysicalDmgAdd + 0.1;
logger.debug('32600,2,Physical_DmgAdd');
}
if (set_num >= 4) {
let AllDmgAdd = _.get(bonus_detail, 'All_DmgAdd', 0);
bonus_detail['All_DmgAdd'] = AllDmgAdd + 0.35;
logger.debug('32600,4,All_DmgAdd');
}
break;
case '32400':
if (set_num >= 2) {
let Electric_DmgAdd = _.get(bonus_detail, 'Electric_DmgAdd', 0);
bonus_detail['Electric_DmgAdd'] = Electric_DmgAdd + 0.1;
logger.debug('32400,2,Electric_DmgAdd');
}
if (set_num >= 4) {
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.28;
logger.debug('32400,4,AttackAddedRatio');
}
break;
case '32200':
if (set_num >= 2) {
let Fire_DmgAdd = _.get(bonus_detail, 'Fire_DmgAdd', 0);
bonus_detail['Fire_DmgAdd'] = Fire_DmgAdd + 0.1;
logger.debug('32200,4,Fire_DmgAdd');
}
if (set_num >= 4) {
let CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
bonus_detail['CriticalChanceBase'] = CriticalChanceBase + 0.28;
logger.debug('32200,4,CriticalChanceBase');
}
break;
case '32300':
if (set_num >= 2) {
let Ether_DmgAdd = _.get(bonus_detail, 'Ether_DmgAdd', 0);
bonus_detail['Ether_DmgAdd'] = Ether_DmgAdd + 0.1;
logger.debug('32300,4,Ether_DmgAdd');
}
if (set_num >= 4) {
let CriticalDamageBase = _.get(bonus_detail, 'CriticalDamageBase', 0);
bonus_detail['CriticalDamageBase'] = CriticalDamageBase + 0.53;
logger.debug('32300,4,CriticalDamageBase');
}
break;
case '31600':
if (set_num >= 4) {
let All_DmgAdd = _.get(bonus_detail, 'All_DmgAdd', 0);
bonus_detail['All_DmgAdd'] = All_DmgAdd + 0.53;
logger.debug('31600,4,All_DmgAdd');
}
break;
case '31400':
if (set_num >= 4) {
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.25;
logger.debug('31400,4,AttackAddedRatio');
}
break;
case '31000':
if (set_num >= 4) {
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.27;
logger.debug('31400,4,AttackAddedRatio');
}
break;
}
return bonus_detail;
};

View file

@ -11,17 +11,66 @@ const weapon_effect = getMapData('weapon_effect');
* @returns {ZZZAvatarInfo['damage_basic_properties']['bonus_detail']} 套装加成
*/
export const weapon_ability = (equipment, base_detail, bonus_detail) => {
if (equipment.id == 14119) {
let equipid = equipment.id
switch (equipid) {
case 14119:{
let IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] =
IceDmgAdd +
weapon_effect['14119']['Param']['IceDmgAdd'][equipment.star - 1];
logger.debug('14119,IceDmgAdd');
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + weapon_effect[equipment.id]['Param']['IceDmgAdd'][equipment.star - 1];
let CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
bonus_detail['CriticalChanceBase'] =
CriticalChanceBase +
weapon_effect['14119']['Param']['CriticalChanceBase'][equipment.star - 1];
bonus_detail['CriticalChanceBase'] = CriticalChanceBase +weapon_effect[equipment.id]['Param']['CriticalChanceBase'][equipment.star - 1];
break;
}
case 14102:{
let Physical_DmgAdd = _.get(bonus_detail, 'Physical_DmgAdd', 0);
bonus_detail['Physical_DmgAdd'] = Physical_DmgAdd + weapon_effect[equipment.id]['Param']['Physical_DmgAdd'][equipment.star - 1];
let All_DmgAdd = _.get(bonus_detail, 'All_DmgAdd', 0);
bonus_detail['All_DmgAdd'] = All_DmgAdd + weapon_effect[equipment.id]['Param']['All_DmgAdd'][equipment.star - 1];
break;
}
case 14104:{
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + weapon_effect[equipment.id]['Param']['AttackAddedRatio'][equipment.star - 1] * 8;
break;
}
case 14124:{
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + weapon_effect[equipment.id]['Param']['A_DmgAdd'][equipment.star - 1] * 8;
break;
}
case 13001:{
let R_DmgAdd = _.get(bonus_detail, 'R_DmgAdd', 0);
bonus_detail['R_DmgAdd'] = R_DmgAdd + weapon_effect[equipment.id]['Param']['R_DmgAdd'][equipment.star - 1] * 3;
break;
}
case 13004:{
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + weapon_effect[equipment.id]['Param']['AttackAddedRatio'][equipment.star - 1];
break;
}
case 13013:{
let EUP_DmgAdd = _.get(bonus_detail, 'EUP_DmgAdd', 0);
bonus_detail['EUP_DmgAdd'] = EUP_DmgAdd + weapon_effect[equipment.id]['Param']['EUP_DmgAdd'][equipment.star - 1];
break;
}
case 13106:{
let EUP_DmgAdd = _.get(bonus_detail, 'EUP_DmgAdd', 0);
bonus_detail['EUP_DmgAdd'] = EUP_DmgAdd + weapon_effect[equipment.id]['Param']['EUP_DmgAdd'][equipment.star - 1] * 15;
break;
}
case 13108:{
let Physical_DmgAdd = _.get(bonus_detail, 'Physical_DmgAdd', 0);
bonus_detail['Physical_DmgAdd'] = Physical_DmgAdd + weapon_effect[equipment.id]['Param']['Physical_DmgAdd'][equipment.star - 1];
break;
}
case 13111:{
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + weapon_effect[equipment.id]['Param']['A_DmgAdd'][equipment.star - 1];
let C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + weapon_effect[equipment.id]['Param']['A_DmgAdd'][equipment.star - 1];
break;
}
}
return bonus_detail;
};

View file

@ -21,5 +21,25 @@
"T": [
0.5, 0.583, 0.666, 0.75, 0.833, 0.916, 1
]
},
"1241": {
"A": [
4.077,4.448,4.819,5.19,5.561,5.932,6.303,6.674,7.045,7.416,7.787,8.158,8.529,8.9,9.271,9.642
],
"C": [
1.359,1.483,1.607,1.731,1.855,1.979,2.103,2.227,2.351,2.475,2.599,2.723,2.847,2.971,3.095,3.219
],
"EUP": [
5.874,6.408,6.942,7.476,8.01,8.544,9.078,9.612,10.146,10.68,11.214,11.748,12.282,12.816,13.35,13.88
],
"R": [
19.776,21.574,23.372,25.17,26.968,28.766,30.564,32.362,34.16,35.958,37.756,39.554,41.352,43.15,44.948,46.746
],
"RL": [
5.875,6.41,6.945,7.48,8.015,8.55,9.085,9.62,10.155,10.69,11.225,11.76,12.295,12.83,13.35,13.9
],
"T": [
0.4, 0.466, 0.532, 0.6, 0.666, 0.732, 0.8
]
}
}

View file

@ -16,5 +16,129 @@
0.4
]
}
},
"14102": {
"Param": {
"All_DmgAdd": [
0.25,
0.315,
0.38,
0.445,
0.5
],
"Physical_DmgAdd": [
0.2,
0.25,
0.3,
0.35,
0.4
]
}
},
"14104": {
"Param": {
"AttackAddedRatio": [
0.035,
0.044,
0.052,
0.06,
0.07
]
}
},
"14124": {
"Param": {
"A_DmgAdd": [
0.35,
0.435,
0.52,
0.605,
0.7
]
}
},
"13001": {
"Param": {
"R_DmgAdd": [
0.15,
0.172,
0.195,
0.217,
0.24
]
}
},
"13004": {
"Param": {
"AttackAddedRatio": [
0.12,
0.138,
0.156,
0.174,
0.192
]
}
},
"13013": {
"Param": {
"EUP_DmgAdd": [
0.15,
0.172,
0.195,
0.217,
0.24
]
}
},
"13106": {
"Param": {
"EUP_DmgAdd": [
0.03,
0.035,
0.04,
0.044,
0.048
]
}
},
"13108": {
"Param": {
"Physical_DmgAdd": [
0.36,
0.41,
0.465,
0.52,
0.575
]
}
},
"13111": {
"Param": {
"A_DmgAdd": [
0.50,
0.575,
0.65,
0.725,
0.80
]
}
},
"14121": {
"Param": {
"All_DmgAdd": [
0.1,
0.125,
0.15,
0.175,
0.20
],
"All_DmgAdd_Max": [
0.102,
0.12,
0.15,
0.18,
0.198
]
}
}
}