Upd:角色面板属性颜色根据词条权重切换

This commit is contained in:
UCPr 2025-03-26 13:41:08 +08:00
parent 289a0a9a6d
commit 06ec5152a0
9 changed files with 74 additions and 53 deletions

View file

@ -9,7 +9,7 @@ import { Equip, Weapon } from './equip.js';
import { Property } from './property.js';
import { Skill } from './skill.js';
import { avatar_ability } from './damage/avatar.js';
import { hasScoreData } from '../lib/score.js';
import { hasScoreData, scoreData } from '../lib/score.js';
import _ from 'lodash';
import fs from 'fs';
@ -433,6 +433,15 @@ export class ZZZAvatarInfo {
return result;
}
/** 面板属性label效果 */
get_label(propID) {
const base = scoreData[this.id][propID];
if (!base) return '';
return base === 1 ? 'yellow' :
base >= 0.75 ? 'blue' :
base >= 0.5 ? 'white' : '';
}
/**
* 获取基础资源
* @returns {Promise<void>}