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

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

@ -14,192 +14,341 @@ const skilldict = getMapData('SkillData');
* }[]} 伤害列表
*/
export const avatar_ability = (data, base_detail, bonus_detail) => {
const damagelist = [];
switch (data.id) {
case 1191:
/** 处理命座加成 */
if (data.rank >= 1) {
const CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
bonus_detail['CriticalChanceBase'] = CriticalChanceBase + 0.12;
}
if (data.rank >= 2) {
const ES_CriticalDamageBase = _.get(
bonus_detail,
'ES_CriticalDamageBase',
0
);
bonus_detail['ES_CriticalDamageBase'] = ES_CriticalDamageBase + 0.6;
const EH_CriticalDamageBase = _.get(
bonus_detail,
'EH_CriticalDamageBase',
0
);
bonus_detail['EH_CriticalDamageBase'] = EH_CriticalDamageBase + 0.6;
}
if (data.rank >= 6) {
const PenRatio = _.get(bonus_detail, 'PenRatioBase', 0);
bonus_detail['PenRatioBase'] = PenRatio + 0.2;
const damagelist = [];
switch (data.id) {
case 1191:{
/** 处理命座加成 */
if (data.rank >= 1) {
const CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
bonus_detail['CriticalChanceBase'] = CriticalChanceBase + 0.12;
}
if (data.rank >= 2) {
const ES_CriticalDamageBase = _.get(
bonus_detail,
'ES_CriticalDamageBase',
0
);
bonus_detail['ES_CriticalDamageBase'] = ES_CriticalDamageBase + 0.6;
const EH_CriticalDamageBase = _.get(
bonus_detail,
'EH_CriticalDamageBase',
0
);
bonus_detail['EH_CriticalDamageBase'] = EH_CriticalDamageBase + 0.6;
}
if (data.rank >= 6) {
const PenRatio = _.get(bonus_detail, 'PenRatioBase', 0);
bonus_detail['PenRatioBase'] = PenRatio + 0.2;
const C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + 2.5;
}
const C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + 2.5;
}
/** 处理天赋加成 */
/** 获取天赋等级与加成倍率 */
const CDB = getskilllevelnum(data.id, data.skills, 'T', 'T');
const C_CriticalDamageBase = _.get(
bonus_detail,
'C_CriticalDamageBase',
0
);
bonus_detail['C_CriticalDamageBase'] = C_CriticalDamageBase + CDB;
const A_CriticalDamageBase = _.get(
bonus_detail,
'A_CriticalDamageBase',
0
);
bonus_detail['A_CriticalDamageBase'] = A_CriticalDamageBase + CDB;
/** 处理天赋加成 */
/** 获取天赋等级与加成倍率 */
const CDB = getskilllevelnum(data.id, data.skills, 'T', 'T');
const C_CriticalDamageBase = _.get(
bonus_detail,
'C_CriticalDamageBase',
0
);
bonus_detail['C_CriticalDamageBase'] = C_CriticalDamageBase + CDB;
const A_CriticalDamageBase = _.get(
bonus_detail,
'A_CriticalDamageBase',
0
);
bonus_detail['A_CriticalDamageBase'] = A_CriticalDamageBase + CDB;
const IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.3;
const IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.3;
/** 计算伤害 */
/** 计算普攻伤害 */
const skill_multiplier1 = getskilllevelnum(
data.id,
data.skills,
'A',
'A'
);
const damagelist1 = calculate_damage(
base_detail,
bonus_detail,
'A',
'A',
'Ice',
skill_multiplier1,
data.level
);
const damage1 = {
title: '普通攻击:急冻修剪法',
value: damagelist1,
};
damagelist.push(damage1);
/** 计算伤害 */
/** 计算普攻伤害 */
const skill_multiplier1 = getskilllevelnum(
data.id,
data.skills,
'A',
'A'
);
const damagelist1 = calculate_damage(
base_detail,
bonus_detail,
'A',
'A',
'Ice',
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',
'Ice',
skill_multiplier2,
data.level
);
const damage2 = {
title: '冲刺攻击:冰渊潜袭',
value: damagelist2,
};
damagelist.push(damage2);
/** 计算冲刺伤害 */
const skill_multiplier2 = getskilllevelnum(
data.id,
data.skills,
'C',
'C'
);
const damagelist2 = calculate_damage(
base_detail,
bonus_detail,
'C',
'C',
'Ice',
skill_multiplier2,
data.level
);
const damage2 = {
title: '冲刺攻击:冰渊潜袭',
value: damagelist2,
};
damagelist.push(damage2);
/** 计算特殊技伤害 */
const skill_multiplier3 = getskilllevelnum(
data.id,
data.skills,
'E',
'EH'
);
const damagelist3 = calculate_damage(
base_detail,
bonus_detail,
'E',
'EH',
'Ice',
skill_multiplier3,
data.level
);
const damage3 = {
title: '强化特殊技:横扫',
value: damagelist3,
};
damagelist.push(damage3);
/** 计算特殊技伤害 */
const skill_multiplier3 = getskilllevelnum(
data.id,
data.skills,
'E',
'EH'
);
const damagelist3 = calculate_damage(
base_detail,
bonus_detail,
'EUP',
'EH',
'Ice',
skill_multiplier3,
data.level
);
const damage3 = {
title: '强化特殊技:横扫',
value: damagelist3,
};
damagelist.push(damage3);
const skill_multiplier4 = getskilllevelnum(
data.id,
data.skills,
'E',
'ES'
);
const damagelist4 = calculate_damage(
base_detail,
bonus_detail,
'E',
'ES',
'Ice',
skill_multiplier4,
data.level
);
const damage4 = {
title: '强化特殊技:鲨卷风',
value: damagelist4,
};
damagelist.push(damage4);
const skill_multiplier4 = getskilllevelnum(
data.id,
data.skills,
'E',
'ES'
);
const damagelist4 = calculate_damage(
base_detail,
bonus_detail,
'EUP',
'ES',
'Ice',
skill_multiplier4,
data.level
);
const damage4 = {
title: '强化特殊技:鲨卷风',
value: damagelist4,
};
damagelist.push(damage4);
/** 计算连携技伤害 */
const skill_multiplier5 = getskilllevelnum(
data.id,
data.skills,
'R',
'RL'
);
const damagelist5 = calculate_damage(
base_detail,
bonus_detail,
'RL',
'RL',
'Ice',
skill_multiplier5,
data.level
);
const damage5 = {
title: '连携技:雪崩',
value: damagelist5,
};
damagelist.push(damage5);
/** 计算连携技伤害 */
const skill_multiplier5 = getskilllevelnum(
data.id,
data.skills,
'R',
'RL'
);
const damagelist5 = calculate_damage(
base_detail,
bonus_detail,
'RL',
'RL',
'Ice',
skill_multiplier5,
data.level
);
const damage5 = {
title: '连携技:雪崩',
value: damagelist5,
};
damagelist.push(damage5);
/** 计算终结技伤害 */
const skill_multiplier6 = getskilllevelnum(
data.id,
data.skills,
'R',
'R'
);
const damagelist6 = calculate_damage(
base_detail,
bonus_detail,
'R',
'R',
'Ice',
skill_multiplier6,
data.level
);
const damage6 = {
title: '终结技:永冬狂宴',
value: damagelist6,
};
damagelist.push(damage6);
logger.debug('伤害', damagelist);
break;
}
return damagelist;
/** 计算终结技伤害 */
const skill_multiplier6 = getskilllevelnum(
data.id,
data.skills,
'R',
'R'
);
const damagelist6 = calculate_damage(
base_detail,
bonus_detail,
'R',
'R',
'Ice',
skill_multiplier6,
data.level
);
const damage6 = {
title: '终结技:永冬狂宴',
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;
};
export const getskilllevelnum = (avatarId, skills, skilltype, skillname) => {

View file

@ -10,31 +10,100 @@ import { ZZZAvatarInfo } from '../avatar.js';
* @returns {ZZZAvatarInfo['damage_basic_properties']['bonus_detail']} 套装加成
*/
export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
switch (set_id) {
case '31100':
if (set_num >= 4) {
let R_DmgAdd = _.get(bonus_detail, 'R_DmgAdd', 0);
bonus_detail['R_DmgAdd'] = R_DmgAdd + 0.2;
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.15;
logger.debug('relicGetter,4,R_DmgAdd');
}
break;
case '32500':
if (set_num >= 2) {
let IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.1;
logger.debug('32500,2,Ice_DmgAdd');
}
if (set_num >= 4) {
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + 0.4;
let C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + 0.4;
logger.debug('32500,4,A_DmgAdd');
logger.debug('32500,4,C_DmgAdd');
}
break;
}
return bonus_detail;
switch (set_id) {
case '31100':
if (set_num >= 4) {
let R_DmgAdd = _.get(bonus_detail, 'R_DmgAdd', 0);
bonus_detail['R_DmgAdd'] = R_DmgAdd + 0.2;
let AttackAddedRatio = _.get(bonus_detail, 'AttackAddedRatio', 0);
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.15;
logger.debug('relicGetter,4,R_DmgAdd');
}
break;
case '32500':
if (set_num >= 2) {
let IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.1;
logger.debug('32500,2,Ice_DmgAdd');
}
if (set_num >= 4) {
let A_DmgAdd = _.get(bonus_detail, 'A_DmgAdd', 0);
bonus_detail['A_DmgAdd'] = A_DmgAdd + 0.4;
let C_DmgAdd = _.get(bonus_detail, 'C_DmgAdd', 0);
bonus_detail['C_DmgAdd'] = C_DmgAdd + 0.4;
logger.debug('32500,4,A_DmgAdd');
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 IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] =
IceDmgAdd +
weapon_effect['14119']['Param']['IceDmgAdd'][equipment.star - 1];
logger.debug('14119,IceDmgAdd');
let equipid = equipment.id
switch (equipid) {
case 14119:{
let IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
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];
}
return bonus_detail;
let CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
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;
};