diff options
author | elioat <elioat@tilde.institute> | 2024-12-18 21:37:51 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-18 21:37:51 -0500 |
commit | 293df8c03c9307156f98b285674148e65ad896fa (patch) | |
tree | 473f46776801adb7b9f9e23582434bb75e5b937d /html/plains | |
parent | 143f92e75a51605bfe79edd792c0ecf9fd2891ac (diff) | |
download | tour-293df8c03c9307156f98b285674148e65ad896fa.tar.gz |
*
Diffstat (limited to 'html/plains')
-rw-r--r-- | html/plains/enemies.js | 6 | ||||
-rw-r--r-- | html/plains/game.js | 10 |
2 files changed, 8 insertions, 8 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++) { diff --git a/html/plains/game.js b/html/plains/game.js index deaebad..2b4f342 100644 --- a/html/plains/game.js +++ b/html/plains/game.js @@ -115,7 +115,7 @@ const CONFIG = { grid: { size: 100, color: 'rgba(221, 221, 221, 0.5)', - worldSize: 100, + worldSize: 20, voidColor: '#e6f3ff' }, camera: { @@ -154,7 +154,7 @@ const CONFIG = { lookRadius: 0.4 // How far to look around (in radians) }, equipment: { - swordUnlockCount: 3, // Number of rescues needed to unlock sword + swordUnlockCount: 5, // Number of rescues needed to unlock sword unlockAnimation: { duration: 1500, // Duration of unlock animation in ms glowColor: 'rgba(255, 215, 0, 0.6)', // Golden glow @@ -202,7 +202,7 @@ const CONFIG = { groundColor: '#f2f2f2' }, villagers: { - total: 1000, // Total number of villagers to spawn + total: 25, // Total number of villagers to spawn colors: [ '#4B0082', // Indigo '#483D8B', // DarkSlateBlue @@ -213,7 +213,7 @@ const CONFIG = { ], shapes: ['square', 'triangle', 'pentagon', 'hexagon'], size: 30, // Same as player size - rescueMessage: 'Congratulations! All villagers have been rescued!', + rescueMessage: 'Congratulations! You rescued all the villagers!', messageDisplayTime: 5000 // How long to show the completion message (ms) }, wilderness: { @@ -1116,7 +1116,7 @@ const renderPlayerHUD = (ctx) => { const circleSpacing = 40; const startX = 30; const startY = 30; - const totalCircles = 4; + const totalCircles = 5; const hpPerCircle = state.player.maxHp / totalCircles; // Track if we need to create explosion particles |