diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index 20792c97..6c26b3d6 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -678,9 +678,8 @@ export class CardComp extends CCComp { } if(this.card_type===CardType.Hero){ - // 英雄卡:显示英雄名 + AP/HP const hero = HeroInfo[this.card_uuid]; - const heroLv = Math.max(1, hero?.lv); + const heroLv = Math.max(1, this.cardData.hero_lv ?? hero?.lv ?? 1); this.setLabel(this.name_node, `${hero?.name || ""}`); if (this.lvl_node) { this.lvl_node.string = `Lv.${heroLv}`; diff --git a/assets/script/game/map/HerosListComp.ts b/assets/script/game/map/HerosListComp.ts index f40833d9..05da6eb0 100644 --- a/assets/script/game/map/HerosListComp.ts +++ b/assets/script/game/map/HerosListComp.ts @@ -115,7 +115,11 @@ export class HerosListComp extends CCComp { this.cards_node.removeAllChildren() - for (const uuid of HeroList) { + const sorted = [...HeroList].sort((a, b) => { + return (HeroInfo[a]?.pool_lv ?? 1) - (HeroInfo[b]?.pool_lv ?? 1); + }); + + for (const uuid of sorted) { const hero = HeroInfo[uuid] if (!hero) continue