feat: 实现英雄局外成长系统
1. 新增GameEvent事件枚举HERO_GROWTH_UPDATE 2. 新增英雄局外升级所需碎片配置表 3. 新增英雄局外成长数据持久化与相关工具方法 4. 重构英雄卡片等级逻辑,统一使用局外成长等级 5. 更新英雄设计文档与相关注释
This commit is contained in:
@@ -289,7 +289,7 @@ export class CardComp extends CCComp {
|
||||
cancel: false,
|
||||
reason: "",
|
||||
uuid: this.cardData.uuid,
|
||||
hero_lv: this.cardData.hero_lv ?? 1,
|
||||
hero_lv: smc.getHeroOuterLv(this.cardData.uuid),
|
||||
card_lv: this.cardData.base_card_lv ?? this.cardData.card_lv ?? 1
|
||||
};
|
||||
oops.message.dispatchEvent(GameEvent.UseHeroCard, guard);
|
||||
@@ -540,7 +540,7 @@ export class CardComp extends CCComp {
|
||||
const heroUuid = isUpgradeCard
|
||||
? (this.queryHeroUuidByEid(this.cardData!.target_hero_eid as number) ?? this.card_uuid)
|
||||
: this.card_uuid;
|
||||
const heroLv = Math.max(1, this.cardData?.hero_lv ?? 1);
|
||||
const heroLv = Math.max(1, smc.getHeroOuterLv(heroUuid));
|
||||
const poolLv = Math.max(1, this.cardData?.base_card_lv ?? this.cardData?.card_lv ?? 1);
|
||||
oops.gui.remove(UIID.HInfo);
|
||||
oops.gui.open(UIID.HInfo, { heroUuid, heroLv, poolLv });
|
||||
@@ -756,7 +756,7 @@ export class CardComp extends CCComp {
|
||||
|
||||
if (renderType === CardType.Hero) {
|
||||
const hero = HeroInfo[renderUuid];
|
||||
const heroLv = Math.max(1, this.cardData.hero_lv ?? hero?.lv ?? 1);
|
||||
const heroLv = Math.max(1, smc.getHeroOuterLv(renderUuid) || hero?.lv || 1);
|
||||
this.setLabel(this.name_node, `${hero?.name || ""}`);
|
||||
if (this.lvl_node) {
|
||||
// 升级卡:显示「当前→升级后」;普通英雄卡:显示当前等级。统一使用默认颜色
|
||||
|
||||
Reference in New Issue
Block a user