From 603cf47348067f2d42f2f16cc1a4b3dd7bb530ed Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Thu, 4 Sep 2025 21:05:16 -0600 Subject: [PATCH] Add wave configuration for new wave 5 with updated path threshold logic This commit introduces a new wave configuration (wave 5) with its schedule segments and enemy properties. It also adjusts the path threshold calculation in WaveManager to improve enemy movement accuracy when reaching waypoints. --- src/support/waveConfig.js | 24 +++++++++++++++++++++++- src/support/waveManager.js | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/support/waveConfig.js b/src/support/waveConfig.js index 12fa3d2..41d7126 100644 --- a/src/support/waveConfig.js +++ b/src/support/waveConfig.js @@ -64,7 +64,7 @@ export const WAVE_CONFIG = { 1: { begin: 0, basic1: 10, - basic3: 2 + basic3: 2, }, 2: { begin: 15, @@ -76,6 +76,28 @@ export const WAVE_CONFIG = { begin: 30, basic3: 4 } + }, + //Wave + 5: { + //Schedule + 1: { + begin: 0, + advanced1: 1, + }, + 2: { + begin: 20, + basic1: 8, + basic2: 3, + basic3: 2 + }, + 3: { + begin: 35, + basic1: 15 + }, + 4: { + begin: 40, + advanced2: 1 + } } } } \ No newline at end of file diff --git a/src/support/waveManager.js b/src/support/waveManager.js index fda92c1..1859386 100644 --- a/src/support/waveManager.js +++ b/src/support/waveManager.js @@ -125,7 +125,7 @@ export class WaveManager { Math.pow(enemy.y - this.scene.gridToLocation(nextPoint.y, offsetY), 2) ); - if (distToNextPoint < segmentSpeed * 0.5) { // Threshold for reaching point + if (distToNextPoint < segmentSpeed * 0.2) { // Threshold for reaching point enemy.props.pathPhase++; // Move to next path segment // If we've reached the end of the path, remove the enemy or handle accordingly