feat(升级奖励): 修改属性选择触发逻辑,改为通过卡片奖励触发

移除英雄升级时自动触发属性选择事件,改为在特定等级通过奖励卡片触发。调整 CardSet 配置,在更多等级提供属性卡片奖励,使属性成长更符合游戏节奏。
This commit is contained in:
panw
2026-02-06 15:39:21 +08:00
parent b85b9d8655
commit b70ac53f82
2 changed files with 21 additions and 2 deletions

View File

@@ -12,8 +12,24 @@ import { CardType, CardKind } from "./GameSet";
export function getLevelRewardType(level: number): CardType {
switch (level) {
case 2: return CardType.Talent;
case 3: return CardType.Attr;
case 4: return CardType.Attr;
case 5: return CardType.Talent;
case 6: return CardType.Attr;
case 7: return CardType.Attr;
case 8: return CardType.Attr;
case 9: return CardType.Attr;
case 10: return CardType.Talent;
case 11: return CardType.Attr;
case 12: return CardType.Attr;
case 13: return CardType.Attr;
case 14: return CardType.Attr;
case 15: return CardType.Talent;
case 16: return CardType.Attr;
case 17: return CardType.Attr;
case 18: return CardType.Attr;
case 19: return CardType.Attr;
case 20: return CardType.Attr;
default:
return null
}

View File

@@ -37,7 +37,7 @@ export class MissionComp extends CCComp {
time_node:Node = null!
@property(Node)
binfo_node:Node = null!
FightTime:number = FightSet.FiIGHT_TIME
/** 剩余复活次数 */
revive_times: number = 1;
@@ -105,7 +105,7 @@ export class MissionComp extends CCComp {
onLevelUp(event: string, args: any) {
mLogger.log(this.debugMode, 'MissionComp', ` 英雄升级到 ${args.lv} 级!`);
// 默认每级都触发属性选择
oops.message.dispatchEvent(GameEvent.AttrSelect);
// oops.message.dispatchEvent(GameEvent.AttrSelect);
this.call_cards(args.lv)
}
call_cards(lv:number){
@@ -126,6 +126,9 @@ export class MissionComp extends CCComp {
case CardType.Potion:
oops.message.dispatchEvent(GameEvent.ShopOpen);
break;
case CardType.Attr:
oops.message.dispatchEvent(GameEvent.AttrSelect);
break;
}
}