mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
Upd:角色面板属性颜色根据词条权重切换
This commit is contained in:
parent
289a0a9a6d
commit
06ec5152a0
9 changed files with 74 additions and 53 deletions
|
|
@ -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>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue