refactor: 重构英雄养成与卡牌系统,移除旧合成机制
1. 移除三合一英雄合成与链式合成逻辑,统一使用升级卡进行英雄等级提升 2. 重构卡池系统:移除卡池等级机制,所有英雄卡牌统一为LV1 3. 重构升级逻辑:改为按UUID精确升级场上英雄,动态生成对应升级卡 4. 更新配置常量:拆分并重构成长倍率、英雄上限等战斗配置 5. 简化抽卡逻辑:不再按卡池等级分发卡牌,改为动态混合基础卡与升级卡 6. 清理废弃代码:移除卡池升级相关的UI、逻辑与配置
This commit is contained in:
@@ -39,7 +39,7 @@ import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { SkillTriggerHelper } from "../hero/SkillTriggerHelper";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
import { SkillView } from "../skill/SkillView";
|
||||
import { FacSet, FightSet, CARD_POOL_UPGRADE_WAVES } from "../common/config/GameSet";
|
||||
import { FacSet, FightSet } from "../common/config/GameSet";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { Monster } from "../hero/Mon";
|
||||
@@ -86,8 +86,6 @@ export class MissionComp extends CCComp {
|
||||
private maxMonsterCount: number = 80;
|
||||
/** 怪物数量恢复阈值(降至此值以下恢复刷怪) */
|
||||
private resumeMonsterCount: number = 45;
|
||||
/** 卡池升级波次配置(默认值来自 GameSet.CARD_POOL_UPGRADE_WAVES,保持全局统一) */
|
||||
public cardPoolUpgradeWaves: number[] = CARD_POOL_UPGRADE_WAVES;
|
||||
|
||||
// ======================== 编辑器绑定节点 ========================
|
||||
|
||||
@@ -829,22 +827,6 @@ export class MissionComp extends CCComp {
|
||||
this.lastTimeSecond = -1;
|
||||
this.clearTime = 0;
|
||||
this.update_time();
|
||||
|
||||
// 检查并推送卡池升级事件
|
||||
this.checkCardPoolUpgrade(wave);
|
||||
}
|
||||
|
||||
/** 检查是否达到卡池升级波次,并推送升级事件 */
|
||||
private checkCardPoolUpgrade(wave: number) {
|
||||
if (!this.cardPoolUpgradeWaves || this.cardPoolUpgradeWaves.length === 0) return;
|
||||
const upgradeIndex = this.cardPoolUpgradeWaves.indexOf(wave);
|
||||
if (upgradeIndex !== -1) {
|
||||
// 根据配置的索引,计算目标等级(初始等级 + index + 1)
|
||||
// 例如 index=0,对应等级为2;index=1,对应等级为3
|
||||
const targetLv = upgradeIndex + 2;
|
||||
oops.message.dispatchEvent(GameEvent.CardPoolUpgrade, { wave, targetLv });
|
||||
mLogger.log(this.debugMode, 'MissionComp', "card pool upgrade event pushed", { wave, targetLv });
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== 怪物数量管理 ========================
|
||||
|
||||
Reference in New Issue
Block a user