mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 05:37:46 +00:00
rebase: 优化代码,移动模型
This commit is contained in:
parent
47e76adf80
commit
52b9a5b1b3
10 changed files with 653 additions and 459 deletions
|
|
@ -1,26 +1,27 @@
|
|||
import _ from 'lodash';
|
||||
import { getMapData } from '../../utils/file.js';
|
||||
import { ZZZAvatarInfo } from '../avatar.js';
|
||||
const weapon_effect = getMapData('weapon_effect');
|
||||
|
||||
export const get_let_value = async (let_list, name) => {
|
||||
if (let_list[name]) {
|
||||
return let_list[name]
|
||||
}
|
||||
return 0
|
||||
}
|
||||
/**
|
||||
* 武器加成
|
||||
* @param {ZZZAvatarInfo['weapon']} equipment 武器
|
||||
* @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 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');
|
||||
|
||||
export const Weapon = async (equipment, base_detail, bonus_detail) => {
|
||||
if (equipment.id == 14119){
|
||||
let IceDmgAdd = await get_let_value(bonus_detail, 'Ice_DmgAdd');
|
||||
bonus_detail['Ice_DmgAdd'] = IceDmgAdd + weapon_effect['14119']['Param']['IceDmgAdd'][equipment.star - 1];
|
||||
logger.debug('14119,IceDmgAdd');
|
||||
|
||||
let CriticalChanceBase = await get_let_value(bonus_detail, 'CriticalChanceBase');
|
||||
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['14119']['Param']['CriticalChanceBase'][equipment.star - 1];
|
||||
}
|
||||
return bonus_detail;
|
||||
};
|
||||
|
||||
export const weapon_ability = async (equipment, base_detail, bonus_detail) => {
|
||||
bonus_detail = await Weapon(equipment, base_detail, bonus_detail);
|
||||
return bonus_detail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue