rebase: 优化

This commit is contained in:
bietiaop 2024-07-26 17:22:19 +08:00
parent 62952f33b1
commit 5a3d7502f9
2 changed files with 194 additions and 150 deletions

View file

@ -15,7 +15,8 @@ const skilldict = getMapData('SkillData');
*/
export const avatar_ability = (data, base_detail, bonus_detail) => {
const damagelist = [];
if (data.id == 1191) {
switch (data.id) {
case 1191:
/** 处理命座加成 */
if (data.rank >= 1) {
const CriticalChanceBase = _.get(bonus_detail, 'CriticalChanceBase', 0);
@ -46,9 +47,17 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
/** 处理天赋加成 */
/** 获取天赋等级与加成倍率 */
const CDB = getskilllevelnum(data.id, data.skills, 'T', 'T');
const C_CriticalDamageBase = _.get(bonus_detail, 'C_CriticalDamageBase', 0);
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);
const A_CriticalDamageBase = _.get(
bonus_detail,
'A_CriticalDamageBase',
0
);
bonus_detail['A_CriticalDamageBase'] = A_CriticalDamageBase + CDB;
const IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
@ -56,7 +65,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
/** 计算伤害 */
/** 计算普攻伤害 */
const skill_multiplier1 = getskilllevelnum(data.id, data.skills, 'A', 'A');
const skill_multiplier1 = getskilllevelnum(
data.id,
data.skills,
'A',
'A'
);
const damagelist1 = calculate_damage(
base_detail,
bonus_detail,
@ -73,7 +87,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
damagelist.push(damage1);
/** 计算冲刺伤害 */
const skill_multiplier2 = getskilllevelnum(data.id, data.skills, 'C', 'C');
const skill_multiplier2 = getskilllevelnum(
data.id,
data.skills,
'C',
'C'
);
const damagelist2 = calculate_damage(
base_detail,
bonus_detail,
@ -90,7 +109,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
damagelist.push(damage2);
/** 计算特殊技伤害 */
const skill_multiplier3 = getskilllevelnum(data.id, data.skills, 'E', 'EH');
const skill_multiplier3 = getskilllevelnum(
data.id,
data.skills,
'E',
'EH'
);
const damagelist3 = calculate_damage(
base_detail,
bonus_detail,
@ -106,7 +130,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
};
damagelist.push(damage3);
const skill_multiplier4 = getskilllevelnum(data.id, data.skills, 'E', 'ES');
const skill_multiplier4 = getskilllevelnum(
data.id,
data.skills,
'E',
'ES'
);
const damagelist4 = calculate_damage(
base_detail,
bonus_detail,
@ -123,7 +152,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
damagelist.push(damage4);
/** 计算连携技伤害 */
const skill_multiplier5 = getskilllevelnum(data.id, data.skills, 'R', 'RL');
const skill_multiplier5 = getskilllevelnum(
data.id,
data.skills,
'R',
'RL'
);
const damagelist5 = calculate_damage(
base_detail,
bonus_detail,
@ -140,7 +174,12 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
damagelist.push(damage5);
/** 计算终结技伤害 */
const skill_multiplier6 = getskilllevelnum(data.id, data.skills, 'R', 'R');
const skill_multiplier6 = getskilllevelnum(
data.id,
data.skills,
'R',
'R'
);
const damagelist6 = calculate_damage(
base_detail,
bonus_detail,
@ -157,7 +196,9 @@ export const avatar_ability = (data, base_detail, bonus_detail) => {
damagelist.push(damage6);
logger.debug('伤害', damagelist);
break;
}
return damagelist;
};

View file

@ -10,7 +10,8 @@ import { ZZZAvatarInfo } from '../avatar.js';
* @returns {ZZZAvatarInfo['damage_basic_properties']['bonus_detail']} 套装加成
*/
export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
if (set_id == '31100') {
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;
@ -18,7 +19,8 @@ export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.15;
logger.debug('relicGetter,4,R_DmgAdd');
}
} else if (set_id == '32500') {
break;
case '32500':
if (set_num >= 2) {
let IceDmgAdd = _.get(bonus_detail, 'Ice_DmgAdd', 0);
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.1;
@ -32,6 +34,7 @@ export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
logger.debug('32500,4,A_DmgAdd');
logger.debug('32500,4,C_DmgAdd');
}
break;
}
return bonus_detail;
};