新增「扳机」伤害计算

This commit is contained in:
UCPr 2025-04-01 13:25:48 +08:00
parent 952961c49a
commit b256890166
8 changed files with 132 additions and 19 deletions

View file

@ -6,7 +6,7 @@ import { nameToId } from './convert/property.js';
export const baseValueData = getMapData('EquipBaseValue');
const equipScore = getMapData('EquipScore');
/** @type {{ [charID: string]: { [propID: string]: number } }} */
export const scoreWeight = Object.create(null);
export const scoreWeight = {};
/**
* 将权重数据格式化为ID格式权重数据并处理小词条
@ -15,7 +15,7 @@ export const scoreWeight = Object.create(null);
export function formatScoreWeight(oriScoreWeight) {
if (!oriScoreWeight) return false;
if (typeof oriScoreWeight !== 'object') return false;
const weight = Object.create(null);
const weight = {};
for (const propName in oriScoreWeight) {
if (!oriScoreWeight[propName])
continue;