refactor(skill-text): 重构技能文案系统,拆分英雄/卡牌语境
1. 将原HeroSkillDesc拆分为CardSkillText(卡牌/道具通用)和HeroSkillText(英雄专属) 2. 移除废弃的HeroSkillDesc文件与相关引用 3. 统一技能文案生成逻辑,修复数值漂移问题 4. 调整英雄配置中技能解锁等级与分档规则 5. 优化技能弹窗UI与参数传递逻辑
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
*
|
||||
* 依赖:
|
||||
* - HeroAttrsComp —— 英雄属性数据模型
|
||||
* - HeroSkillDesc —— 技能描述富文本标准层
|
||||
* - HeroSkillText —— 技能描述富文本标准层(局外等级口径)
|
||||
*/
|
||||
import { _decorator, Component, Label, NodeEventType, RichText } from "cc";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { buildSkillDescMoreRich } from "../common/config/HeroSkillDesc";
|
||||
import { buildHeroSkillDesc } from "../common/HeroSkillText";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -175,7 +175,7 @@ export class HeroMoreCom extends Component {
|
||||
this.setStatRow(this.crt_all_label, this.crt_plus_label, finalCrit, finalCrit - (this.model.critical ?? 0), "%");
|
||||
|
||||
const finalCritDmg = this.model.getFinalCritDamage();
|
||||
this.setStatRow(this.crit_dmg_all_label, this.crit_dmg_plus_label, finalCritDmg, finalCritDmg - (this.model.crit_damage ?? 0), "%");
|
||||
this.setStatRow(this.crit_dmg_all_label, this.crit_dmg_plus_label, finalCritDmg, finalCritDmg - (this.model.critical_damage ?? 0), "%");
|
||||
|
||||
// ---- 冰冻率 / 击退强化 / 穿透率 ----
|
||||
const finalFreeze = this.model.getFinalFreezeChance();
|
||||
@@ -195,7 +195,7 @@ export class HeroMoreCom extends Component {
|
||||
// ---- 技能描述(技能名+技能等级 Lv.x,附升级提示 Lv.x→Lv.y 金色预览) ----
|
||||
if (this.skill_label && this.skill_label.isValid) {
|
||||
// 缓存未变则跳过重设,避免降频内 RichText 重复重解析排版
|
||||
const desc = buildSkillDescMoreRich(this.model);
|
||||
const desc = buildHeroSkillDesc(this.model.hero_uuid);
|
||||
if (desc !== this.skillDescCache) {
|
||||
this.skillDescCache = desc;
|
||||
this.skill_label.string = desc;
|
||||
|
||||
Reference in New Issue
Block a user