feature:%XX伤害

This commit is contained in:
UCPr 2025-05-02 18:01:04 +08:00
parent 83ca22c3b8
commit 9b7e609f6a
35 changed files with 1849 additions and 114 deletions

View file

@ -5,8 +5,8 @@ import {
getSquareAvatar,
} from '../lib/download.js';
import { baseValueData, formatScoreWeight, scoreWeight } from '../lib/score.js';
import { avatar_ability, scoreFnc } from './damage/avatar.js';
import { idToShortName } from '../lib/convert/property.js';
import { avatar_calc, scoreFnc } from './damage/avatar.js';
import { idToShortName2 } from '../lib/convert/property.js';
import { imageResourcesPath } from '../lib/path.js';
import { Equip, Weapon } from './equip.js';
import { Property } from './property.js';
@ -352,9 +352,10 @@ export class ZZZAvatarInfo {
}
}
/** @type {import("./damage/Calculator.ts").damage} */
/** @type {import("./damage/Calculator.ts").damage[]} */
get damages() {
return avatar_ability(this);
if (this._damages) return this._damages;
return this._damages = avatar_calc(this)?.calc();
}
/** @type {number|boolean} */
@ -449,7 +450,7 @@ export class ZZZAvatarInfo {
const propID = property.property_id
stats[propID] ??= {
id: propID,
name: idToShortName(propID),
name: idToShortName2(propID),
weight: this.scoreWeight[propID] || 0,
value: '0',
count: 0