feat(gameplay): 重新平衡游戏经济、英雄属性和怪物配置

调整游戏核心平衡参数以优化15分钟游戏体验:
1. 提升抽卡和升级金币消耗(CHOU_GOLD 5→100,LVUP_GOLD 10→50)
2. 重制英雄基础属性和成长值(战士HP 200→300,法师AP 14→40)
3. 优化怪物生成逻辑和属性曲线(BOSS HP 25000→2000)
4. 更新经济系统公式和波次权重配置
This commit is contained in:
walkpan
2026-01-16 23:36:43 +08:00
parent 9568177b36
commit d0f88708c6
4 changed files with 97 additions and 57 deletions

View File

@@ -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 {
/** 英雄基础层级 */

View File

@@ -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<number, heroInfo> = {
// ========== 英雄角色 ==========
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<number, heroInfo> = {
// 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检测大招重置与辐射协同输出"},
};

View File

@@ -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