mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 05:37:46 +00:00
尝试添加[艾莲]伤害计算
This commit is contained in:
parent
8c964e5de5
commit
bc04f1dcd0
13 changed files with 565 additions and 0 deletions
26
model/damage/weapon.js
Normal file
26
model/damage/weapon.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { getMapData } from '../../utils/file.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
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
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