怪物数 增加, 但强度太低了 需要考虑下

This commit is contained in:
2025-07-16 23:50:21 +08:00
parent 2c09abc373
commit 8aa4edabd4
3 changed files with 17 additions and 273 deletions

View File

@@ -1,227 +1,4 @@
import { HQuality } from "./heroSet";
// 波次配置表 - 根据Design.md中的怪物波次系统设计
export const WaveConfig = {
// 第1-5波新手期
1: {
monsters: [
{ uuid: 5201, count: 3, type: "warrior" }, // 3只普通怪物
],
totalHp: 75,
totalAp: 24,
description: "新手期-基础威胁"
},
2: {
monsters: [
{ uuid: 5202, count: 4, type: "warrior" }, // 4只普通怪物
],
totalHp: 100,
totalAp: 32,
description: "新手期-数量增加"
},
3: {
monsters: [
{ uuid: 5204, count: 2, type: "warrior" }, // 2只普通
{ uuid: 5203, count: 1, type: "remote" }, // 1只远程
],
totalHp: 70,
totalAp: 28,
description: "新手期-引入远程威胁"
},
4: {
monsters: [
{ uuid: 5205, count: 5, type: "warrior" }, // 5只普通怪物
],
totalHp: 125,
totalAp: 40,
description: "新手期-数量挑战"
},
5: {
monsters: [
{ uuid: 5206, count: 3, type: "warrior" }, // 3只普通
{ uuid: 5220, count: 1, type: "remote" }, // 1只远程
],
totalHp: 95,
totalAp: 36,
description: "新手期-混合威胁"
},
// 第6-10波成长期
6: {
monsters: [
{ uuid: 5219, count: 2, type: "warrior" }, // 2只普通
{ uuid: 5224, count: 2, type: "remote" }, // 2只远程
],
totalHp: 90,
totalAp: 40,
description: "成长期-远程威胁增加"
},
7: {
monsters: [
{ uuid: 5221, count: 4, type: "warrior" }, // 4只普通
{ uuid: 5216, count: 1, type: "mage" }, // 1只法师
],
totalHp: 118,
totalAp: 47,
description: "成长期-引入法师威胁"
},
8: {
monsters: [
{ uuid: 5222, count: 1, type: "warrior" }, // 1只普通
{ uuid: 5223, count: 3, type: "remote" }, // 3只远程
],
totalHp: 85,
totalAp: 44,
description: "成长期-远程主导"
},
9: {
monsters: [
{ uuid: 5225, count: 3, type: "warrior" }, // 3只普通
{ uuid: 5226, count: 1, type: "remote" }, // 1只远程
{ uuid: 5217, count: 1, type: "mage" }, // 1只法师
],
totalHp: 113,
totalAp: 51,
description: "成长期-三类型混合"
},
10: {
monsters: [
{ uuid: 5227, count: 2, type: "warrior" }, // 2只普通
{ uuid: 5218, count: 2, type: "remote" }, // 2只远程
{ uuid: 5225, count: 1, type: "mage" }, // 1只法师
],
totalHp: 108,
totalAp: 56,
description: "成长期-平衡挑战"
},
// 第11-15波挑战期
11: {
monsters: [
{ uuid: 5201, count: 6, type: "warrior" }, // 6只普通怪物
],
totalHp: 150,
totalAp: 48,
description: "挑战期-数量压力"
},
12: {
monsters: [
{ uuid: 5202, count: 2, type: "warrior" }, // 2只普通
{ uuid: 5203, count: 3, type: "remote" }, // 3只远程
],
totalHp: 110,
totalAp: 52,
description: "挑战期-远程威胁"
},
13: {
monsters: [
{ uuid: 5204, count: 5, type: "warrior" }, // 5只普通
{ uuid: 5216, count: 2, type: "mage" }, // 2只法师
],
totalHp: 161,
totalAp: 70,
description: "挑战期-法师威胁"
},
14: {
monsters: [
{ uuid: 5205, count: 3, type: "warrior" }, // 3只普通
{ uuid: 5220, count: 2, type: "remote" }, // 2只远程
{ uuid: 5217, count: 2, type: "mage" }, // 2只法师
],
totalHp: 151,
totalAp: 74,
description: "挑战期-全面威胁"
},
15: {
monsters: [
{ uuid: 5206, count: 1, type: "warrior" }, // 1只普通
{ uuid: 5224, count: 4, type: "remote" }, // 4只远程
{ uuid: 5218, count: 2, type: "mage" }, // 2只法师
],
totalHp: 141,
totalAp: 78,
description: "挑战期-远程法师主导"
}
};
// 无限模式波次生成函数
export const getInfiniteWaveConfig = (waveNumber: number) => {
if (waveNumber <= 15) {
return WaveConfig[waveNumber];
}
// 第16波+ (无限模式)
const baseWarriorCount = 3 + Math.floor(waveNumber / 5);
const baseRemoteCount = 1 + Math.floor(waveNumber / 8);
const baseMageCount = Math.floor(waveNumber / 10);
// 最大单波总数限制: 12只
const totalMonsters = baseWarriorCount + baseRemoteCount + baseMageCount;
const maxMonsters = 12;
let warriorCount = baseWarriorCount;
let remoteCount = baseRemoteCount;
let mageCount = baseMageCount;
// 如果超过最大数量,按优先级削减
if (totalMonsters > maxMonsters) {
const excess = totalMonsters - maxMonsters;
// 优先削减普通怪物,保留远程和法师
warriorCount = Math.max(1, warriorCount - excess);
}
const monsters = [];
// 添加普通怪物
if (warriorCount > 0) {
const warriorIds = [5201, 5202, 5204, 5205, 5206, 5219, 5221, 5222, 5223];
const randomWarriorId = warriorIds[Math.floor(Math.random() * warriorIds.length)];
monsters.push({ uuid: randomWarriorId, count: warriorCount, type: "warrior" });
}
// 添加远程怪物
if (remoteCount > 0) {
const remoteIds = [5203, 5220, 5224];
const randomRemoteId = remoteIds[Math.floor(Math.random() * remoteIds.length)];
monsters.push({ uuid: randomRemoteId, count: remoteCount, type: "remote" });
}
// 添加法师怪物
if (mageCount > 0) {
const mageIds = [5216, 5217, 5218, 5225, 5226, 5227];
const randomMageId = mageIds[Math.floor(Math.random() * mageIds.length)];
monsters.push({ uuid: randomMageId, count: mageCount, type: "mage" });
}
// 计算总属性
let totalHp = 0;
let totalAp = 0;
monsters.forEach(monster => {
const baseHp = monster.type === "warrior" ? 25 : monster.type === "remote" ? 20 : 18;
const baseAp = monster.type === "warrior" ? 8 : monster.type === "remote" ? 12 : 15;
const level = 1 + Math.floor(waveNumber / 10);
const levelHp = Math.floor(baseHp * (1 + (level - 1) * 0.3));
const levelAp = Math.floor(baseAp * (1 + (level - 1) * 0.25));
totalHp += levelHp * monster.count;
totalAp += levelAp * monster.count;
});
return {
monsters: monsters,
totalHp: totalHp,
totalAp: totalAp,
description: `无限模式-第${waveNumber}`
};
};
// 获取怪物等级
export const getMonsterLevel = (waveNumber: number): number => {
return 1 + Math.floor(waveNumber / 1);
};
// 获取装备石掉落数量
export const getStoneDrops = (monsterType: number, level: number = 1): {type: string, count: number} => {
const baseDrops = {

View File

@@ -3,7 +3,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { Monster } from "../hero/Mon";
import { MonSet } from "../common/config/heroSet";
import { FightSet, WaveConfig, getInfiniteWaveConfig, getMonsterLevel } from "../common/config/Mission";
import { FightSet } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { smc } from "../common/SingletonModuleComp";
@@ -33,9 +33,7 @@ export class MissionMonCompComp extends CCComp {
private spawnTimer: number = 0; // 生成计时器
private is_fight:boolean = false;
// 肉鸽模式开关
@property
useRogueMode: boolean = true;
onLoad(){
this.on(GameEvent.FightStart,this.to_fight,this)
}
@@ -75,50 +73,14 @@ export class MissionMonCompComp extends CCComp {
do_mon_wave(){
oops.message.dispatchEvent(GameEvent.WaveUpdate)
console.log("[MissionMonComp]:怪物登场,当前波次 :",smc.vmdata.mission_data.current_wave)
const currentWave = smc.vmdata.mission_data.current_wave;
if (this.useRogueMode) {
// 使用肉鸽模式配置
const rogueWaveConfig = getRogueWaveConfig(currentWave);
console.log(`[MissionMonComp]:肉鸽模式第${currentWave}波配置:`, rogueWaveConfig.description);
this.generateRogueMonstersFromConfig(rogueWaveConfig);
} else {
// 使用原有的波次配置系统
const waveConfig = this.getWaveConfig(currentWave);
console.log(`[MissionMonComp]:普通模式第${currentWave}波配置:`, waveConfig.description);
console.log(`[MissionMonComp]:总HP: ${waveConfig.totalHp}, 总AP: ${waveConfig.totalAp}`);
this.generateMonstersFromConfig(waveConfig);
}
// 使用肉鸽模式配置
const rogueWaveConfig = getRogueWaveConfig(currentWave);
console.log(`[MissionMonComp]:肉鸽模式第${currentWave}波配置:`, rogueWaveConfig.description);
this.generateRogueMonstersFromConfig(rogueWaveConfig);
}
// 获取波次配置
private getWaveConfig(waveNumber: number) {
if (waveNumber <= 15) {
return WaveConfig[waveNumber];
} else {
return getInfiniteWaveConfig(waveNumber);
}
}
// 根据配置生成怪物(普通模式)
private generateMonstersFromConfig(waveConfig: any) {
const { monsters } = waveConfig;
const currentWave = smc.vmdata.mission_data.current_wave;
const monsterLevel = getMonsterLevel(currentWave);
monsters.forEach((monsterGroup: any) => {
const { uuid, count, type } = monsterGroup;
// 为每个怪物组生成指定数量的怪物
for (let i = 0; i < count; i++) {
// 随机选择位置 (0-9)
this.addToSpawnQueue(uuid, i, false, monsterLevel);
}
});
console.log(`[MissionMonComp]:本波次将生成 ${monsters.reduce((total: number, group: any) => total + group.count, 0)} 只怪物,等级: ${monsterLevel}`);
}
// 根据肉鸽配置生成怪物(肉鸽模式)
private generateRogueMonstersFromConfig(rogueWaveConfig: any) {

View File

@@ -212,7 +212,8 @@ export class RogueConfig {
static generateNormalWave(waveNumber: number) {
const series = getRandomSeries();
const seriesConfig = MonsterSeriesConfig[series];
const baseCount = Math.min(3 + Math.floor(waveNumber / 5), 8);
// 数量提升为原来的3倍最大数量也提升
const baseCount = Math.min((3 + Math.floor(waveNumber / 5)) * 3, 24);
const monsters = [];
// 选择怪物类型
@@ -272,7 +273,8 @@ export class RogueConfig {
if (eliteMonsters.length > 0) {
const eliteMonster = eliteMonsters[Math.floor(Math.random() * eliteMonsters.length)];
const count = Math.max(1, Math.floor(2 + waveNumber / 8));
// 数量提升为原来的3倍
const count = Math.max(1, Math.floor((2 + waveNumber / 8) * 3));
const monsterInfo = HeroInfo[eliteMonster];
// 生成精英词条
@@ -330,9 +332,10 @@ export class RogueConfig {
const enhancedBoss = this.applyAffixesToMonster(bossAffixes, bossInfo);
// Boss数量提升为3倍一般Boss只刷1只这里最多刷3只
const monsters = [{
uuid: bossMonster,
count: 1,
count: 3,
type: "boss",
series: series,
isBoss: true,
@@ -418,10 +421,12 @@ export class RogueConfig {
// 预览属性变化实际应用在Mon.ts中
switch (affix) {
case BuffAttr.ATK:
modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + config.value / 100));
// 攻击力提升幅度加大每波提升额外增加10%
modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + config.value / 100 + baseStats.lv * 0.1));
break;
case BuffAttr.HP:
modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + config.value / 100));
// 生命值提升幅度加大每波提升额外增加15%
modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + config.value / 100 + baseStats.lv * 0.15));
break;
case BuffAttr.ATK_CD:
modifiedStats.cd = Math.max(0.1, modifiedStats.cd * (1 - config.value / 100));