From d0f88708c61d04d54b294e9594ef57cf8dd5d2f5 Mon Sep 17 00:00:00 2001 From: walkpan Date: Fri, 16 Jan 2026 23:36:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(gameplay):=20=E9=87=8D=E6=96=B0=E5=B9=B3?= =?UTF-8?q?=E8=A1=A1=E6=B8=B8=E6=88=8F=E7=BB=8F=E6=B5=8E=E3=80=81=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=E5=B1=9E=E6=80=A7=E5=92=8C=E6=80=AA=E7=89=A9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整游戏核心平衡参数以优化15分钟游戏体验: 1. 提升抽卡和升级金币消耗(CHOU_GOLD 5→100,LVUP_GOLD 10→50) 2. 重制英雄基础属性和成长值(战士HP 200→300,法师AP 14→40) 3. 优化怪物生成逻辑和属性曲线(BOSS HP 25000→2000) 4. 更新经济系统公式和波次权重配置 --- ...elike Game Balance & Configuration Plan.md | 45 ++++++++++++++++ assets/script/game/common/config/GameSet.ts | 6 +-- assets/script/game/common/config/heroSet.ts | 54 +++++++++---------- assets/script/game/map/RogueConfig.ts | 49 ++++++++--------- 4 files changed, 97 insertions(+), 57 deletions(-) create mode 100644 .trae/documents/15-Minute Roguelike Game Balance & Configuration Plan.md diff --git a/.trae/documents/15-Minute Roguelike Game Balance & Configuration Plan.md b/.trae/documents/15-Minute Roguelike Game Balance & Configuration Plan.md new file mode 100644 index 00000000..3200bf36 --- /dev/null +++ b/.trae/documents/15-Minute Roguelike Game Balance & Configuration Plan.md @@ -0,0 +1,45 @@ +Based on the analysis of `MissionCardComp.ts`, `MissionComp.ts`, `RogueConfig.ts`, and `heroSet.ts`, I have designed a balanced configuration plan for a 15-minute roguelike game loop. + +The current configuration has some imbalances (e.g., Boss HP 25000 vs Hero AP 15, low card costs vs high drop rates). The plan aims to smooth out the difficulty curve and establish a sustainable economy. + +### 1. Economy Rebalance (GameSet.ts) +Adjust costs to prevent "infinite card spamming" while ensuring steady progression. +* **Card Draw Cost (`CHOU_GOLD`)**: Increase from `5` to **100**. +* **Level Up Cost (`LVUP_GOLD`)**: Increase from `10` to **50** (Base) + **50** (Increment). +* **Goal**: Players need to kill ~10-15 enemies to afford one card/upgrade, making choices impactful. + +### 2. Hero Configuration (heroSet.ts) +Establish distinct roles and meaningful growth to keep up with monster scaling. +* **Base Stats (`HeroInfo`)**: + * **Warrior**: HP 300, AP 25, Def 5 (Tanky) + * **Mage**: HP 150, AP 40, Range Mid (Glass Cannon) + * **Archer**: HP 180, AP 30, AS 1.0 (DPS) +* **Growth (`HeroUpSet`)**: + * **HP**: +30 per level + * **AP**: +5 per level + * **Def**: +1 per level + +### 3. Monster & Wave Configuration (RogueConfig.ts) +Implement a dynamic difficulty curve that ramps up intensity over 15 minutes. +* **Base Stats (`heroSet.ts`)**: + * **Fodder (5201)**: HP 60, AP 8, Speed 100 + * **Fast (5301)**: HP 40, AP 12, Speed 180 + * **Tank (5401)**: HP 200, AP 15, Speed 60 + * **Boss (5701)**: HP 5000 (reduced from 25k to match new scaling), AP 60 +* **Scaling Logic (`RogueConfig.ts`)**: + * **HP Growth**: Exponential (`1.15` per minute factor). + * **Spawn Logic**: + * **0-3 min**: Fodder swarm (accumulate gold). + * **3-8 min**: Fast + Tank mix (test DPS and defense). + * **8-14 min**: Elites + Special mechanics (high pressure). + * **15 min**: Final Boss. +* **Gold Drop**: + * Formula: `Base (5) + Level * 1 + TypeBonus`. + * Elite/Boss give significantly more to reward tough fights. + +### 4. Implementation Steps +1. **Modify `GameSet.ts`**: Update economy constants (`CHOU_GOLD`, `LVUP_GOLD`). +2. **Modify `heroSet.ts`**: Update `HeroConf`, `HeroUpSet`, and `HeroInfo` with new base stats. +3. **Modify `RogueConfig.ts`**: Update `DefaultRogueConfig` (budget/intervals), `getMonAttr` (scaling formulas), `calculateMonsterGold`, and `getSpawnWeights` (wave phases). + +This plan ensures the 15-minute session has a clear "Early-Mid-Late" game progression with a challenging but fair economy. \ No newline at end of file diff --git a/assets/script/game/common/config/GameSet.ts b/assets/script/game/common/config/GameSet.ts index 2a1cb3e5..820f970b 100644 --- a/assets/script/game/common/config/GameSet.ts +++ b/assets/script/game/common/config/GameSet.ts @@ -115,9 +115,9 @@ export enum FightSet { MORE_RC=10,//更多次数 广告获取的次数 HEARTPOS=-320,//基地位置 HERO_MAX_NUM=3,//英雄最大数量 - LVUP_GOLD=10,//升级需要的金币 - LVUP_GOLD_UP=10,//升级需要的金币 - CHOU_GOLD=5,//抽卡需要的金币 + LVUP_GOLD=50,//升级需要的金币 + LVUP_GOLD_UP=50,//升级需要的金币 + CHOU_GOLD=100,//抽卡需要的金币 } export enum IndexSet { /** 英雄基础层级 */ diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 9ff7206f..32d0a8a7 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -76,10 +76,10 @@ export enum MonStart { export enum HeroConf{ COST=1500, - MAX_HP=200, - MAX_MP=200, - MAX_AP=20, - MAX_DEF=20, + MAX_HP=10000, + MAX_MP=1000, + MAX_AP=2000, + MAX_DEF=500, } export const getPreAttr = (uuid:number)=>{ let hp=HeroInfo[uuid].hp/HeroConf.MAX_HP @@ -90,11 +90,11 @@ export const getPreAttr = (uuid:number)=>{ } export enum HeroUpSet { MP=5, - HP=10, - LVMP=100, - LVHP=100, - LVATK=10, - LVDEF=5, + HP=30, + LVMP=10, + LVHP=30, + LVATK=5, + LVDEF=1, } /** @@ -138,37 +138,37 @@ export const HeroInfo: Record = { // ========== 英雄角色 ========== 5001:{uuid:5001,name:"盾战士",icon:"1001",path:"hk1", fac:FacSet.HERO, kind:1,as:1.5, - type:HType.warrior,lv:1,hp:200,mp:200,def:0,ap:15,speed:120,skills:[6001,6004], + type:HType.warrior,lv:1,hp:300,mp:200,def:5,ap:25,speed:120,skills:[6001,6004], rangeType: SkillRange.Melee, buff:[],tal:[],info:"盾战士"}, 5002:{uuid:5002,name:"奥术法师",icon:"1001",path:"hm2", fac:FacSet.HERO, kind:2,as:1.5, - type:HType.mage,lv:1,hp:92,mp:135,def:0,ap:14,speed:95,skills:[6003,6101], + type:HType.mage,lv:1,hp:150,mp:135,def:0,ap:40,speed:95,skills:[6003,6101], rangeType: SkillRange.Long, buff:[],tal:[],info:"奥术法师"}, - 5003:{uuid:5003,name:"射手",icon:"1001",path:"ha1", fac:FacSet.HERO, kind:2,as:1.5, - type:HType.remote,lv:1,hp:100,mp:80,def:0,ap:18,speed:140,skills:[6002,6100], + 5003:{uuid:5003,name:"射手",icon:"1001",path:"ha1", fac:FacSet.HERO, kind:2,as:1.2, + type:HType.remote,lv:1,hp:180,mp:80,def:0,ap:30,speed:140,skills:[6002,6100], rangeType: SkillRange.Long, buff:[],tal:[],info:"射手"}, 5005:{uuid:5005,name:"牧师",icon:"1001",path:"hh1", fac:FacSet.HERO, kind:2,as:1.5, - type:HType.mage,lv:1,hp:88,mp:135,def:0,ap:15,speed:100,skills:[6003,6100], + type:HType.mage,lv:1,hp:160,mp:135,def:0,ap:25,speed:100,skills:[6003,6100], rangeType: SkillRange.Mid, buff:[],tal:[],info:"牧师"}, 5004:{uuid:5004,name:"火焰法师",icon:"1001",path:"hm1", fac:FacSet.HERO, kind:2,as:1.5, - type:HType.mage,lv:1,hp:85,mp:140,def:0,ap:16,speed:90,skills:[6003,6101], + type:HType.mage,lv:1,hp:150,mp:140,def:0,ap:45,speed:90,skills:[6003,6101], rangeType: SkillRange.Mid, buff:[],tal:[],info:"火焰法师"}, 5006:{uuid:5006,name:"召唤法师",icon:"1001",path:"hz1", fac:FacSet.HERO, kind:2,as:1.5, - type:HType.support,lv:1,hp:115,mp:145,def:0,ap:8,speed:105,skills:[6003,6101], + type:HType.support,lv:1,hp:200,mp:145,def:0,ap:20,speed:105,skills:[6003,6101], rangeType: SkillRange.Mid, buff:[],tal:[],info:"召唤法师"}, - 5007:{uuid:5007,name:"刺客",icon:"1001",path:"hc1", fac:FacSet.HERO, kind:1,as:1.5, - type:HType.assassin,lv:1,hp:80,mp:60,def:0,ap:22,speed:180,skills:[6001,6004], + 5007:{uuid:5007,name:"刺客",icon:"1001",path:"hc1", fac:FacSet.HERO, kind:1,as:1.2, + type:HType.assassin,lv:1,hp:140,mp:60,def:0,ap:50,speed:180,skills:[6001,6004], rangeType: SkillRange.Melee, buff:[],tal:[],info:"刺客"}, @@ -177,50 +177,50 @@ export const HeroInfo: Record = { // 1. 基础近战型 5201:{uuid:5201,name:"兽人战士",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.warrior,lv:1,hp:40,mp:100,def:0,ap:5,speed:180,skills:[6001], + type:HType.warrior,lv:1,hp:60,mp:100,def:0,ap:8,speed:180,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"标准炮灰:确保英雄能完成3次普攻积累天赋计数"}, // 2. 快速突击型 5301:{uuid:5301,name:"兽人斥候",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:1.2, - type:HType.assassin,lv:1,hp:30,mp:100,def:0,ap:12,speed:400,skills:[6001], + type:HType.assassin,lv:1,hp:40,mp:100,def:0,ap:12,speed:400,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"快速突击:极高移速贴脸,检测护盾(7102)刷新率"}, // 3. 重型坦克型 5401:{uuid:5401,name:"兽人卫士",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:5.0, - type:HType.warrior,lv:1,hp:400,mp:100,def:5,ap:25,speed:60,skills:[6001], + type:HType.warrior,lv:1,hp:200,mp:100,def:5,ap:15,speed:60,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"重型坦克:数值墙,检测玩家破甲(7008)与持续输出"}, // 4. 远程骚扰型 5501:{uuid:5501,name:"兽人射手",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.remote,lv:1,hp:50,mp:100,def:0,ap:15,speed:90,skills:[6203], + type:HType.remote,lv:1,hp:50,mp:100,def:0,ap:10,speed:90,skills:[6203], rangeType: SkillRange.Long, buff:[],tal:[],info:"远程骚扰:跨屏打击,迫使阵地分散或移动英雄"}, // 5. 特殊机制型 5601:{uuid:5601,name:"兽人自爆兵",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.assassin,lv:1,hp:60,mp:100,def:0,ap:250,speed:220,skills:[6001], + type:HType.assassin,lv:1,hp:80,mp:100,def:0,ap:200,speed:220,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"特殊机制:极端伤害,漏怪即秒杀,检测减伤(7103)"}, // 召唤师:持续召唤小怪(后续可在技能系统中实现 SType.zhaohuan) 5602:{uuid:5602,name:"兽人召唤师",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.mage,lv:1,hp:120,mp:300,def:5,ap:8,speed:100,skills:[6001], + type:HType.mage,lv:1,hp:150,mp:300,def:5,ap:10,speed:100,skills:[6001], rangeType: SkillRange.Mid, buff:[],tal:[],info:"战术目标:持续召唤小怪,检测英雄大招清场频率"}, // 治疗者:为周围怪物回血(此处以提升治疗效果和生命回复为基础被动) 5603:{uuid:5603,name:"兽人祭司",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.support,lv:1,hp:120,mp:300,def:5,ap:6,speed:105,skills:[6001], + type:HType.support,lv:1,hp:150,mp:300,def:5,ap:10,speed:105,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"战术目标:为怪群回血,检测玩家沉默(7006)覆盖率"}, // 光环怪:为周围怪物提供增益(此处以Buff效果提升与移动速度提升为基础被动) // Attrs.BUFF_UP=60 (RATIO=1),Attrs.SPEED=63 (RATIO=1) 5604:{uuid:5604,name:"兽人图腾师",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0, - type:HType.support,lv:1,hp:100,mp:250,def:5,ap:7,speed:110,skills:[6001], + type:HType.support,lv:1,hp:150,mp:250,def:5,ap:10,speed:110,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"战术目标:提供加速光环,改变怪群推进节奏"}, // 6. 精英/BOSS型 5701:{uuid:5701,name:"兽人首领(BOSS)",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:2.5, - type:HType.warrior,lv:3,hp:25000,mp:500,def:20,ap:80,speed:120,skills:[6001], + type:HType.warrior,lv:3,hp:2000,mp:500,def:10,ap:60,speed:120,skills:[6001], rangeType: SkillRange.Melee, buff:[],tal:[],info:"终极考验:极高HP,检测大招重置与辐射协同输出"}, }; diff --git a/assets/script/game/map/RogueConfig.ts b/assets/script/game/map/RogueConfig.ts index 845cc984..6e3dd76b 100644 --- a/assets/script/game/map/RogueConfig.ts +++ b/assets/script/game/map/RogueConfig.ts @@ -60,9 +60,9 @@ export interface MonAttrs { * 成长类型枚举 */ enum GrowthType { - EXPONENTIAL = 1.2, // 指数级 - HP - LINEAR = 1.0, // 线性 - AP - LOGARITHMIC = 0.5 // 对数级 - Speed + EXPONENTIAL = 1.15, // 指数级 - HP + LINEAR = 1.05, // 线性 - AP + LOGARITHMIC = 0.3 // 对数级 - Speed } @@ -95,11 +95,11 @@ export const DefaultRogueConfig: IRogueGlobalConfig = { maxMonsterCount: 50, // 默认同屏50只 spawnLogicInterval: 1.0, // 每秒计算一次 spawnInterval: 0.6, // 队列出怪间隔0.6秒 - baseBudget: 1.5, // 基础预算 - timeDifficultyFactor: 0.2, // 每分钟增加20%预算 + baseBudget: 5.0, // 基础预算 + timeDifficultyFactor: 0.5, // 每分钟增加50%预算 survivalHpThreshold: 0.4, // 40%血量触发保护 survivalBudgetMultiplier: 0.7, // 保护时预算打7折 - maxSpawnPerLogic: 10 // 单次最多生成10只 + maxSpawnPerLogic: 5 // 单次最多生成5只 }; // 当前配置实例 @@ -233,8 +233,10 @@ function calculateWaveFactor(stage: number, timeInSeconds: number = 0): number { * @returns 成长后的属性值 */ function applyGrowthFormula(baseStat: number, waveFactor: number, growthType: GrowthType): number { - // 公式: Current_Stat = Base_Stat * (1 + waveFactor * 0.15) ^ Growth_Type - const growthMultiplier = Math.pow(1 + waveFactor * 0.15, growthType); + // 基础倍率:15分钟成长约 16 倍 (1 + 1.0 * 15) + // waveFactor 是 0-1 (基于15分钟) + const TIME_SCALING = 15; + const growthMultiplier = Math.pow(1 + waveFactor * TIME_SCALING, growthType); return Math.floor(baseStat * growthMultiplier); } @@ -363,8 +365,8 @@ export function calculateMonsterGold(uuid: number, level: number, type: MonType) if(type == MonType.BOSS) type_ratio = 10; else if(type == MonType.ELITE) type_ratio = 3; - // 公式: 基础(5) * 类型 * 危险值 + 等级加成 - const baseGold = 5; + // 公式: 基础(10) * 类型 * 危险值 + 等级加成 + const baseGold = 10; let gold = Math.floor(baseGold * type_ratio * danger_ratio + level); return gold; @@ -396,30 +398,23 @@ interface SpawnWeight { function getSpawnWeights(timeInSeconds: number): SpawnWeight[] { const minutes = timeInSeconds / 60; - if (minutes < 2) { - // 0-2min: 匀速群落 - 100% 战士 + if (minutes < 3) { + // 0-3min: 匀速群落 - 100% 战士 return [{ uuid: 5201, weight: 100 }]; - } else if (minutes < 5) { - // 2-5min: 快速干扰 - 70% 战士, 30% 刺客 + } else if (minutes < 8) { + // 3-8min: 快速干扰 - 70% 战士, 30% 刺客 return [ { uuid: 5201, weight: 70 }, { uuid: 5301, weight: 30 } ]; - } else if (minutes < 10) { - // 5-10min: 阵地博弈 - 50% 战士, 40% 刺客, 10% 攻城/治疗 - return [ - { uuid: 5201, weight: 50 }, - { uuid: 5301, weight: 40 }, - { uuid: 5401, weight: 5 }, // 攻城 - { uuid: 5603, weight: 5 } // 治疗 - ]; } else if (minutes < 14) { - // 10-14min: 极限生存 - 30% 战士, 50% 刺客, 20% 机制/精英 + // 8-14min: 阵地博弈 - 40% 战士, 30% 刺客, 20% 攻城/治疗/精英 return [ - { uuid: 5201, weight: 30 }, - { uuid: 5301, weight: 50 }, - { uuid: 5601, weight: 10 }, // 机制怪 - { uuid: 5701, weight: 10 } // 精英 + { uuid: 5201, weight: 40 }, + { uuid: 5301, weight: 30 }, + { uuid: 5401, weight: 10 }, + { uuid: 5603, weight: 10 }, + { uuid: 5701, weight: 10 } ]; } else { // 15min: 剧情杀/决战 - 100% Boss