diff options
Diffstat (limited to 'html/plains/enemies.js')
-rw-r--r-- | html/plains/enemies.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/html/plains/enemies.js b/html/plains/enemies.js index e3be9af..c2299f0 100644 --- a/html/plains/enemies.js +++ b/html/plains/enemies.js @@ -45,7 +45,7 @@ const generateEnemies = (villagers, collisionMap) => { targetVillager: villager, patrolAngle: Math.random() * Math.PI * 2, isChasing: false, - hp: 2 + Math.floor(Math.random() * 9), + hp: 2 + Math.floor(Math.random() * 4), stunned: false, stunEndTime: 0, attacking: false, @@ -292,7 +292,7 @@ const updateEnemies = (enemies, deltaTime) => { if (progress >= 1) { enemy.attacking = false; enemy.attackCooldown = true; - enemy.attackCooldownUntil = animationTime + 1000; // 1 second cooldown + enemy.attackCooldownUntil = animationTime + 500; // 0.5 second cooldown // Check if attack hit the player const finalDx = state.player.x - enemy.x; @@ -433,7 +433,7 @@ const renderEnemies = (ctx, enemies) => { }; const generateDiamonds = () => { - const diamondCount = Math.floor(Math.random() * 5); // 0 to 4 diamonds + const diamondCount = Math.floor(Math.random() * 3); // 0 to 2 diamonds const diamonds = []; for (let i = 0; i < diamondCount; i++) { |