feat(升级奖励): 修改属性选择触发逻辑,改为通过卡片奖励触发
移除英雄升级时自动触发属性选择事件,改为在特定等级通过奖励卡片触发。调整 CardSet 配置,在更多等级提供属性卡片奖励,使属性成长更符合游戏节奏。
This commit is contained in:
@@ -12,8 +12,24 @@ import { CardType, CardKind } from "./GameSet";
|
|||||||
export function getLevelRewardType(level: number): CardType {
|
export function getLevelRewardType(level: number): CardType {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 2: return CardType.Talent;
|
case 2: return CardType.Talent;
|
||||||
|
case 3: return CardType.Attr;
|
||||||
|
case 4: return CardType.Attr;
|
||||||
case 5: return CardType.Talent;
|
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 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:
|
default:
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export class MissionComp extends CCComp {
|
|||||||
onLevelUp(event: string, args: any) {
|
onLevelUp(event: string, args: any) {
|
||||||
mLogger.log(this.debugMode, 'MissionComp', ` 英雄升级到 ${args.lv} 级!`);
|
mLogger.log(this.debugMode, 'MissionComp', ` 英雄升级到 ${args.lv} 级!`);
|
||||||
// 默认每级都触发属性选择
|
// 默认每级都触发属性选择
|
||||||
oops.message.dispatchEvent(GameEvent.AttrSelect);
|
// oops.message.dispatchEvent(GameEvent.AttrSelect);
|
||||||
this.call_cards(args.lv)
|
this.call_cards(args.lv)
|
||||||
}
|
}
|
||||||
call_cards(lv:number){
|
call_cards(lv:number){
|
||||||
@@ -126,6 +126,9 @@ export class MissionComp extends CCComp {
|
|||||||
case CardType.Potion:
|
case CardType.Potion:
|
||||||
oops.message.dispatchEvent(GameEvent.ShopOpen);
|
oops.message.dispatchEvent(GameEvent.ShopOpen);
|
||||||
break;
|
break;
|
||||||
|
case CardType.Attr:
|
||||||
|
oops.message.dispatchEvent(GameEvent.AttrSelect);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user