mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
rebase: 优化代码,移动模型
This commit is contained in:
parent
47e76adf80
commit
52b9a5b1b3
10 changed files with 653 additions and 459 deletions
|
|
@ -1,38 +1,37 @@
|
|||
export const get_let_value = async (let_list, name) => {
|
||||
if (let_list[name]) {
|
||||
return let_list[name]
|
||||
}
|
||||
return 0
|
||||
}
|
||||
import _ from 'lodash';
|
||||
import { ZZZAvatarInfo } from '../avatar.js';
|
||||
|
||||
export const Relic = async (set_id, set_num, base_detail, bonus_detail) => {
|
||||
if (set_id == '31100'){
|
||||
if (set_num >= 4){
|
||||
let R_DmgAdd = await get_let_value(bonus_detail, 'R_DmgAdd');
|
||||
bonus_detail['R_DmgAdd'] = R_DmgAdd + 0.2;
|
||||
let AttackAddedRatio = await get_let_value(bonus_detail, 'AttackAddedRatio');
|
||||
bonus_detail['AttackAddedRatio'] = AttackAddedRatio + 0.15;
|
||||
logger.debug('relicGetter,4,R_DmgAdd');
|
||||
}
|
||||
}else if(set_id == '32500'){
|
||||
if (set_num >= 2){
|
||||
let IceDmgAdd = await get_let_value(bonus_detail, 'Ice_DmgAdd');
|
||||
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + 0.1;
|
||||
logger.debug('32500,2,Ice_DmgAdd');
|
||||
}
|
||||
if (set_num >= 4){
|
||||
let A_DmgAdd = await get_let_value(bonus_detail, 'A_DmgAdd');
|
||||
bonus_detail['A_DmgAdd'] = A_DmgAdd + 0.4;
|
||||
let C_DmgAdd = await get_let_value(bonus_detail, 'C_DmgAdd');
|
||||
bonus_detail['C_DmgAdd'] = C_DmgAdd + 0.4;
|
||||
logger.debug('32500,4,A_DmgAdd');
|
||||
logger.debug('32500,4,C_DmgAdd');
|
||||
}
|
||||
}
|
||||
return bonus_detail;
|
||||
}
|
||||
|
||||
export const relice_ability = async (set_id, set_num, base_detail, bonus_detail) => {
|
||||
bonus_detail = await Relic(set_id, set_num, base_detail, bonus_detail);
|
||||
return bonus_detail;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} set_id 套装id
|
||||
* @param {number} set_num 套装数量
|
||||
* @param {ZZZAvatarInfo['damage_basic_properties']['base_detail']} base_detail 基础属性
|
||||
* @param {ZZZAvatarInfo['damage_basic_properties']['bonus_detail']} bonus_detail 套装加成
|
||||
* @returns {ZZZAvatarInfo['damage_basic_properties']['bonus_detail']} 套装加成
|
||||
*/
|
||||
export const relice_ability = (set_id, set_num, base_detail, bonus_detail) => {
|
||||
if (set_id == '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');
|
||||
}
|
||||
} else if (set_id == '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');
|
||||
}
|
||||
}
|
||||
return bonus_detail;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue