refactor: 将代码中的card_lv统一替换为rarity

本次提交完成了全项目范围内术语的统一替换,将原本指代卡牌品质/等级的card_lv字段全部重命名为rarity,对齐了设计文档中的命名规范,避免了术语混淆:
1.  更新了所有配置文件、组件类、数据结构中的字段定义
2.  同步修改了注释、文档说明中的相关表述
3.  修正了英雄、技能、装备卡牌的品质显示逻辑
4.  调整了背景颜色切换、属性计算等相关业务逻辑
This commit is contained in:
pan
2026-09-02 16:42:54 +08:00
parent 6620b67103
commit d9bccd7c93
36 changed files with 312 additions and 312 deletions

View File

@@ -46,7 +46,7 @@ export class SSkillBoxComp extends CCComp {
* 弹窗按槽位精确取档,避免自动定位命中错误分组 */
private hero_slot?: SkillTriggerType;
/** 卡牌等级 */
private card_lv: number = 1;
private rarity: number = 1;
/** 卡牌自定义图标ID(优先级最高,未定义则按 trigger_type 自动取) */
private card_icon?: string;
/** 技能名称(装备卡取卡牌名,英雄图鉴取技能名) */
@@ -75,7 +75,7 @@ export class SSkillBoxComp extends CCComp {
oops.audio.playEffect("music/button");
oops.gui.open(UIID.SInfo, {
uuid: this.s_uuid,
skill_lv: this.card_lv,
skill_lv: this.rarity,
card_icon: this.card_icon,
skill_name: this.resolveSkillName(),
field: this.field,
@@ -112,7 +112,7 @@ export class SSkillBoxComp extends CCComp {
this.s_uuid = s_uuid;
this.hero_uuid = heroUuid;
this.hero_slot = slot;
this.card_lv = s_lv;
this.rarity = s_lv;
this.hero_icon_source = isField ? "field" : "skill";
this.updateUI();
this.setLocked(locked);
@@ -244,7 +244,7 @@ export class SSkillBoxComp extends CCComp {
// 显示技能等级(Lv.x 样式)
if (this.lv_label) {
this.lv_label.string = `Lv.${this.card_lv}`;
this.lv_label.string = `Lv.${this.rarity}`;
}
}