chore: 调整游戏数值与配置,优化怪物与战场体验
1. 调整怪物移动速度、攻击距离等基础属性 2. 修正英雄站位坐标,优化战场布局 3. 重构分段刷怪逻辑,修复刷怪计数异常问题 4. 调整怪物属性模板与关卡掉落预算,平衡游戏难度 5. 优化刷怪波次的怪物数量配置,调整生成节奏
This commit is contained in:
@@ -55,11 +55,11 @@ export class MissionHeroComp extends CCComp {
|
||||
|
||||
/** 硬编码的6个英雄占位点 */
|
||||
public static readonly HERO_POSITIONS: Vec3[] = [
|
||||
v3(-200, BoxSet.GAME_LINE + 90, 0), // index 0 (node_index 1): Top Front
|
||||
v3(-170, BoxSet.GAME_LINE, 0), // index 1 (node_index 2): Mid Front
|
||||
v3(-200, BoxSet.GAME_LINE - 90, 0), // index 2 (node_index 3): Bot Front
|
||||
v3(-210, BoxSet.GAME_LINE + 90, 0), // index 0 (node_index 1): Top Front
|
||||
v3(-160, BoxSet.GAME_LINE, 0), // index 1 (node_index 2): Mid Front
|
||||
v3(-210, BoxSet.GAME_LINE - 90, 0), // index 2 (node_index 3): Bot Front
|
||||
v3(-300, BoxSet.GAME_LINE + 90, 0), // index 3 (node_index 4): Top Back
|
||||
v3(-270, BoxSet.GAME_LINE, 0), // index 4 (node_index 5): Mid Back
|
||||
v3(-300, BoxSet.GAME_LINE, 0), // index 4 (node_index 5): Mid Back
|
||||
v3(-300, BoxSet.GAME_LINE - 90, 0), // index 5 (node_index 6): Bot Back
|
||||
];
|
||||
|
||||
|
||||
@@ -106,6 +106,8 @@ export class MissionMonCompComp extends CCComp {
|
||||
private phaseTargetCount: number = 0;
|
||||
/** 当前阶段已生成的怪物数 */
|
||||
private phaseSpawnedCount: number = 0;
|
||||
/** 本波怪物总数量(分段计算基准,避免 shift 后长度变化) */
|
||||
private waveTotalForPhase: number = 0;
|
||||
|
||||
// ======================== 生命周期 ========================
|
||||
|
||||
@@ -136,24 +138,26 @@ export class MissionMonCompComp extends CCComp {
|
||||
|
||||
// 逐步刷怪逻辑 (分 3 段刷出)
|
||||
if (this.pendingMonsters.length > 0) {
|
||||
// 如果当前阶段的怪物已经刷完,则进入延迟等待下一阶段
|
||||
if (this.phaseSpawnedCount >= this.phaseTargetCount && this.currentSpawnPhase < 3) {
|
||||
this.phaseDelayTimer -= dt;
|
||||
if (this.phaseDelayTimer <= 0) {
|
||||
this.currentSpawnPhase++;
|
||||
this.phaseSpawnedCount = 0;
|
||||
this.phaseTargetCount = this.currentSpawnPhase === 3 ?
|
||||
this.pendingMonsters.length :
|
||||
Math.ceil(this.pendingMonsters.length / (4 - this.currentSpawnPhase));
|
||||
this.phaseDelayTimer = 3.0;
|
||||
const base = this.waveTotalForPhase;
|
||||
if (this.currentSpawnPhase === 2) {
|
||||
this.phaseTargetCount = Math.ceil(base / 3);
|
||||
} else {
|
||||
this.phaseTargetCount = base - this.phaseTargetCount * 2;
|
||||
if (this.phaseTargetCount <= 0) this.phaseTargetCount = this.pendingMonsters.length;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.spawnTimer += dt;
|
||||
// 控制刷怪速率:例如每 0.2 秒刷 1-2 只
|
||||
if (this.spawnTimer > 0.2) {
|
||||
this.spawnTimer = 0;
|
||||
// 一次出 2 只,加快进度
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (this.pendingMonsters.length === 0 || this.phaseSpawnedCount >= this.phaseTargetCount) break;
|
||||
const monData = this.pendingMonsters.shift()!;
|
||||
@@ -194,13 +198,11 @@ export class MissionMonCompComp extends CCComp {
|
||||
this.pendingMonsters = monsters;
|
||||
smc.vmdata.mission_data.pending_mon_num = this.pendingMonsters.length;
|
||||
this.waveTargetCount = monsters.length;
|
||||
this.waveTotalForPhase = monsters.length;
|
||||
|
||||
// 初始化分段刷怪状态
|
||||
this.currentSpawnPhase = 1;
|
||||
this.phaseSpawnedCount = 0;
|
||||
// 第一段生成 1/3 的怪物
|
||||
this.phaseTargetCount = Math.ceil(this.pendingMonsters.length / 3);
|
||||
// 每段之间的延迟时间,可以根据需要调整,例如 3 秒
|
||||
this.phaseTargetCount = Math.ceil(monsters.length / 3);
|
||||
this.phaseDelayTimer = 3.0;
|
||||
|
||||
let hasBoss = monsters.some(m => m.isBoss);
|
||||
|
||||
@@ -215,14 +215,14 @@ export interface MonsterBaseStats {
|
||||
* @see MonsterBaseStats 字段说明
|
||||
*/
|
||||
export const MonsterStats: Record<MonType, MonsterBaseStats> = {
|
||||
[MonType.Melee]: { hp: 220, ap: 10, cost: 18, isBoss: false },
|
||||
[MonType.Heavy]: { hp: 850, ap: 20, cost: 35, isBoss: false },
|
||||
[MonType.Long]: { hp: 190, ap: 35, cost: 25, isBoss: false },
|
||||
[MonType.Support]: { hp: 300, ap: 24, cost: 28, isBoss: false },
|
||||
[MonType.Summoner]: { hp: 270, ap: 32, cost: 35, isBoss: false },
|
||||
[MonType.Assassin]: { hp: 210, ap: 38, cost: 25, isBoss: false },
|
||||
[MonType.MeleeBoss]: { hp: 7000, ap: 26, cost: 130, isBoss: true },
|
||||
[MonType.LongBoss]: { hp: 2100, ap: 38, cost: 130, isBoss: true },
|
||||
[MonType.Melee]: { hp: 350, ap: 16, cost: 22, isBoss: false },
|
||||
[MonType.Heavy]: { hp: 1400, ap: 30, cost: 42, isBoss: false },
|
||||
[MonType.Long]: { hp: 300, ap: 52, cost: 30, isBoss: false },
|
||||
[MonType.Support]: { hp: 480, ap: 36, cost: 34, isBoss: false },
|
||||
[MonType.Summoner]: { hp: 420, ap: 48, cost: 42, isBoss: false },
|
||||
[MonType.Assassin]: { hp: 330, ap: 58, cost: 30, isBoss: false },
|
||||
[MonType.MeleeBoss]: { hp: 12000, ap: 40, cost: 160, isBoss: true },
|
||||
[MonType.LongBoss]: { hp: 3500, ap: 58, cost: 160, isBoss: true },
|
||||
}
|
||||
|
||||
// ======================== 阶梯(Tier)配置 ========================
|
||||
@@ -252,11 +252,11 @@ const MAJOR_BOSS_TIERS = new Set([3, 5])
|
||||
* 主线 15 波映射:wave 1-3 → T1, wave 4-6 → T2, ..., wave 13-15 → T5
|
||||
*/
|
||||
export const TierConfigs: Record<number, TierConfig> = {
|
||||
1: { multiplier: 1.0, budget: 350, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long], isBossTier: false },
|
||||
2: { multiplier: 2.0, budget: 1000, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support], isBossTier: true },
|
||||
3: { multiplier: 3.5, budget: 2300, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin], isBossTier: true },
|
||||
4: { multiplier: 5.5, budget: 4000, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin, MonType.Summoner], isBossTier: true },
|
||||
5: { multiplier: 8.5, budget: 6500, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin, MonType.Summoner], isBossTier: true },
|
||||
1: { multiplier: 1.0, budget: 300, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long], isBossTier: false },
|
||||
2: { multiplier: 2.0, budget: 800, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support], isBossTier: true },
|
||||
3: { multiplier: 3.5, budget: 1800, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin], isBossTier: true },
|
||||
4: { multiplier: 5.5, budget: 3200, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin, MonType.Summoner], isBossTier: true },
|
||||
5: { multiplier: 8.5, budget: 5200, availableTypes: [MonType.Melee, MonType.Heavy, MonType.Long, MonType.Support, MonType.Assassin, MonType.Summoner], isBossTier: true },
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,105 +361,95 @@ export interface BlueprintTemplate {
|
||||
* 生成引擎根据当前 Tier 和波内位置从中筛选并随机抽取
|
||||
*/
|
||||
export const BlueprintTemplates: BlueprintTemplate[] = [
|
||||
// ---- REST 类 (恢复波:少量怪,让玩家喘口气) ----
|
||||
{ id: "R1", type: TemplateType.REST, tierMin: 1, allowAffix: false,
|
||||
slots: [{ typePool: [MonType.Melee], countMin: 4, countMax: 7, weight: 1.0 }] },
|
||||
slots: [{ typePool: [MonType.Melee], countMin: 3, countMax: 5, weight: 1.0 }] },
|
||||
{ id: "R2", type: TemplateType.REST, tierMin: 2, allowAffix: false,
|
||||
slots: [{ typePool: [MonType.Melee, MonType.Heavy], countMin: 6, countMax: 10, weight: 1.0 }] },
|
||||
slots: [{ typePool: [MonType.Melee, MonType.Heavy], countMin: 4, countMax: 6, weight: 1.0 }] },
|
||||
{ id: "R3", type: TemplateType.REST, tierMin: 3, allowAffix: false,
|
||||
slots: [{ typePool: [MonType.Melee, MonType.Long], countMin: 8, countMax: 14, weight: 1.0 }] },
|
||||
slots: [{ typePool: [MonType.Melee, MonType.Long], countMin: 5, countMax: 8, weight: 1.0 }] },
|
||||
|
||||
// ---- NORMAL 类 ----
|
||||
// N1/N2: T1专用(1-5英雄)
|
||||
{ id: "N1", type: TemplateType.NORMAL, tierMin: 1, allowAffix: false,
|
||||
slots: [{ typePool: [MonType.Melee], countMin: 4, countMax: 7, weight: 1.0 }] },
|
||||
slots: [{ typePool: [MonType.Melee], countMin: 3, countMax: 5, weight: 1.0 }] },
|
||||
{ id: "N2", type: TemplateType.NORMAL, tierMin: 1, allowAffix: false,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee], countMin: 3, countMax: 6, weight: 0.6 },
|
||||
{ typePool: [MonType.Long], countMin: 2, countMax: 4, weight: 0.4 },
|
||||
{ typePool: [MonType.Melee], countMin: 2, countMax: 4, weight: 0.6 },
|
||||
{ typePool: [MonType.Long], countMin: 1, countMax: 3, weight: 0.4 },
|
||||
] },
|
||||
// N3+: T2起(5-6英雄),正常数量
|
||||
{ id: "N3", type: TemplateType.NORMAL, tierMin: 2, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 6, countMax: 12, weight: 0.5 },
|
||||
{ typePool: [MonType.Long], countMin: 4, countMax: 8, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 5, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 3, countMax: 7, weight: 0.5 },
|
||||
{ typePool: [MonType.Long], countMin: 2, countMax: 5, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 1, countMax: 3, weight: 0.2 },
|
||||
] },
|
||||
{ id: "N4", type: TemplateType.NORMAL, tierMin: 3, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 8, countMax: 14, weight: 0.4 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 5, countMax: 10, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 3, countMax: 6, weight: 0.3 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 4, countMax: 8, weight: 0.4 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 3, countMax: 6, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 4, weight: 0.3 },
|
||||
] },
|
||||
|
||||
// ---- MIXED 类 ----
|
||||
// M1: T1专用(波3,5英雄)
|
||||
{ id: "M1", type: TemplateType.MIXED, tierMin: 1, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 4, countMax: 7, weight: 0.4 },
|
||||
{ typePool: [MonType.Long], countMin: 3, countMax: 5, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 1, countMax: 3, weight: 0.3 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 3, countMax: 5, weight: 0.4 },
|
||||
{ typePool: [MonType.Long], countMin: 2, countMax: 3, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 1, countMax: 2, weight: 0.3 },
|
||||
] },
|
||||
// M2+: T3起(6英雄)
|
||||
{ id: "M2", type: TemplateType.MIXED, tierMin: 3, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 8, countMax: 14, weight: 0.3 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 6, countMax: 10, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 4, countMax: 7, weight: 0.4 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 5, countMax: 8, weight: 0.3 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 3, countMax: 6, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 4, weight: 0.4 },
|
||||
] },
|
||||
{ id: "M3", type: TemplateType.MIXED, tierMin: 4, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 10, countMax: 16, weight: 0.3 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 6, countMax: 12, weight: 0.3 },
|
||||
{ typePool: [MonType.Summoner], countMin: 3, countMax: 5, weight: 0.2 },
|
||||
{ typePool: [MonType.Support], countMin: 3, countMax: 6, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 6, countMax: 10, weight: 0.3 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 4, countMax: 7, weight: 0.3 },
|
||||
{ typePool: [MonType.Summoner], countMin: 2, countMax: 3, weight: 0.2 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 4, weight: 0.2 },
|
||||
] },
|
||||
|
||||
// ---- ELITE 类 (精英波:少但强,考验单兵质量) ----
|
||||
{ id: "E1", type: TemplateType.ELITE, tierMin: 3, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Heavy], countMin: 4, countMax: 7, weight: 0.5, forceAffix: true },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 4, countMax: 8, weight: 0.5, forceAffix: true },
|
||||
{ typePool: [MonType.Heavy], countMin: 2, countMax: 4, weight: 0.5, forceAffix: true },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 2, countMax: 5, weight: 0.5, forceAffix: true },
|
||||
] },
|
||||
{ id: "E2", type: TemplateType.ELITE, tierMin: 4, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.Heavy], countMin: 4, countMax: 7, weight: 0.3, forceAffix: true },
|
||||
{ typePool: [MonType.Assassin], countMin: 5, countMax: 8, weight: 0.4, forceAffix: true },
|
||||
{ typePool: [MonType.Support], countMin: 3, countMax: 5, weight: 0.3, forceAffix: true },
|
||||
{ typePool: [MonType.Heavy], countMin: 2, countMax: 4, weight: 0.3, forceAffix: true },
|
||||
{ typePool: [MonType.Assassin], countMin: 3, countMax: 5, weight: 0.4, forceAffix: true },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 3, weight: 0.3, forceAffix: true },
|
||||
] },
|
||||
|
||||
// ---- BOSS 类 (Boss波:1个Boss + 大量护卫小怪,制造清杂兵爽感) ----
|
||||
{ id: "B1", type: TemplateType.BOSS, tierMin: 2, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.MeleeBoss], countMin: 1, countMax: 1, weight: 1.0 },
|
||||
{ typePool: [MonType.Melee], countMin: 6, countMax: 10, weight: 0.5 },
|
||||
{ typePool: [MonType.Long], countMin: 4, countMax: 7, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 3, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee], countMin: 4, countMax: 6, weight: 0.5 },
|
||||
{ typePool: [MonType.Long], countMin: 2, countMax: 4, weight: 0.3 },
|
||||
{ typePool: [MonType.Support], countMin: 1, countMax: 2, weight: 0.2 },
|
||||
] },
|
||||
{ id: "B2", type: TemplateType.BOSS, tierMin: 2, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.MeleeBoss], countMin: 1, countMax: 1, weight: 1.0 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 8, countMax: 12, weight: 0.5 },
|
||||
{ typePool: [MonType.Long, MonType.Support], countMin: 5, countMax: 8, weight: 0.3 },
|
||||
{ typePool: [MonType.Assassin], countMin: 2, countMax: 4, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 5, countMax: 8, weight: 0.5 },
|
||||
{ typePool: [MonType.Long, MonType.Support], countMin: 3, countMax: 5, weight: 0.3 },
|
||||
{ typePool: [MonType.Assassin], countMin: 1, countMax: 3, weight: 0.2 },
|
||||
] },
|
||||
{ id: "B3", type: TemplateType.BOSS, tierMin: 3, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.MeleeBoss, MonType.LongBoss], countMin: 1, countMax: 1, weight: 1.0 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 8, countMax: 14, weight: 0.35 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 5, countMax: 10, weight: 0.35 },
|
||||
{ typePool: [MonType.Support], countMin: 3, countMax: 6, weight: 0.3 },
|
||||
{ typePool: [MonType.Melee, MonType.Heavy], countMin: 5, countMax: 8, weight: 0.35 },
|
||||
{ typePool: [MonType.Long, MonType.Assassin], countMin: 3, countMax: 6, weight: 0.35 },
|
||||
{ typePool: [MonType.Support], countMin: 2, countMax: 4, weight: 0.3 },
|
||||
] },
|
||||
{ id: "B4", type: TemplateType.BOSS, tierMin: 4, allowAffix: true,
|
||||
slots: [
|
||||
{ typePool: [MonType.MeleeBoss, MonType.LongBoss], countMin: 1, countMax: 1, weight: 1.0 },
|
||||
{ typePool: [MonType.Heavy], countMin: 6, countMax: 12, weight: 0.35 },
|
||||
{ typePool: [MonType.Assassin], countMin: 5, countMax: 8, weight: 0.3 },
|
||||
{ typePool: [MonType.Summoner, MonType.Support], countMin: 4, countMax: 8, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee], countMin: 5, countMax: 10, weight: 0.15 },
|
||||
{ typePool: [MonType.Heavy], countMin: 4, countMax: 7, weight: 0.35 },
|
||||
{ typePool: [MonType.Assassin], countMin: 3, countMax: 5, weight: 0.3 },
|
||||
{ typePool: [MonType.Summoner, MonType.Support], countMin: 2, countMax: 5, weight: 0.2 },
|
||||
{ typePool: [MonType.Melee], countMin: 3, countMax: 6, weight: 0.15 },
|
||||
] },
|
||||
|
||||
// ---- 教程专用 (波1: 1个英雄,3只弱怪热身) ----
|
||||
{ id: "TUTORIAL", type: TemplateType.NORMAL, tierMin: 1, allowAffix: false,
|
||||
slots: [{ typePool: [MonType.Melee], countMin: 3, countMax: 3, weight: 1.0 }] },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user