From 340060c2d211c8a9fa80e2ddcf4c806a7134189e Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 3 Apr 2026 10:47:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E7=AD=89=E7=BA=A7=E6=98=BE=E7=A4=BA=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 英雄卡等级现在使用星号后缀表示(例如 "★" 表示二级) - 特殊卡等级现在使用加号后缀表示(例如 "+" 表示二级) - 统一处理等级下限为1,避免显示异常 --- assets/script/game/map/CardComp.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index 71764956..5a61729f 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -405,7 +405,8 @@ export class CardComp extends CCComp { if(this.card_type===CardType.Hero){ const hero = HeroInfo[this.card_uuid]; const heroLv = Math.max(1, Math.floor(this.cardData.hero_lv ?? hero?.lv ?? 1)); - this.setLabel(this.name_node, `${hero?.name || ""}Lv.${heroLv}`); + const suffix = heroLv >= 2 ? "★".repeat(heroLv - 1) : ""; + this.setLabel(this.name_node, `${suffix}${hero?.name || ""}${suffix}`); this.info_node.active = true; this.oinfo_node.active = false; this.info_node.getChildByName("ap").getChildByName("val").getComponent(Label).string = `${(hero?.ap ?? 0) * heroLv}`; @@ -414,7 +415,9 @@ export class CardComp extends CCComp { const specialCard = this.card_type === CardType.SpecialUpgrade ? SpecialUpgradeCardList[this.card_uuid] : SpecialRefreshCardList[this.card_uuid]; - this.setLabel(this.name_node, `${specialCard?.name || ""}Lv.${this.cardData.pool_lv}`); + const poolLv = Math.max(1, Math.floor(this.cardData.pool_lv ?? 1)); + const spSuffix = poolLv >= 2 ? "+".repeat(poolLv - 1) : ""; + this.setLabel(this.name_node, `${specialCard?.name || ""}${spSuffix}`); this.info_node.active = false; this.oinfo_node.active = true; this.oinfo_node.getChildByName("info").getComponent(Label).string = `${specialCard?.info || ""}`;