User prompt
haz que solo el power up que te dan los hotakos normales dure 10 segundos, el power up del jefe si dura 118 segundos como te dije, y que todos los power up te deje disparar sin delay continuamente, pero que no de lag
User prompt
haz que algunos hotakos te den el mismo power up pero que dure mucho mas poco como 10 segundos, y que solo puedan haber 30 disparos del jugador en pantalla mientras hace el power up para que no se lagee, y que el power up de los hotakos normales sea un poco raro que te aparezca ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
el laser no funciona, mejor haz que si tienes el power up y uses el rayo, puedas mantener presionado el click y lanzaras un monton de disparos sin delay y el power up completo dure 118 segundos y arriba te indique cuanto tiempo puedes usarlo ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
pon el juego en pantalla completa
User prompt
haz que los jefes aparezcan cada 10 hotakos que mates, y que cuando mates al jefe haya una pequeña pausa para darte timpo de respirar y que cuando mates al jefe tambien te de un power up que se quede en el suelo hasta que tu lo agarres y te de el poder de que tu disparo segundario con la tecla "Q" sea un laser que dispare continuamente en linea recta apuntando donde apunte el mouse por 15 segundos y luego tengas que esperar que se recargue por otros 15 segundos, y arriba en la hud aparezca cuanto le falta por recargarse ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
haz que todo sea mas grande
User prompt
haz un contador de cuantos hotakos llevas matados
User prompt
haz un nuevo proyectil que se dispare y sea de color amarillo si haces click derecho, y que ese tipo de disparo se dispare solo hacia arriba
User prompt
haz que el jefe sea muchisimo mas grande, y que cada tanto dispare unas balas gigantes que vayan lento, pero sean poco frecuentes, y que la mayoria de veces solo lanze pequeñas, y que el jugador si presiona click derecho, lance proyectiles verdes hacia arriba solamente, y ya ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
haz que los hotakos normales no aumenten su velocidad, que solo los hotakos fast lo hagan y aparezcan mas seguido
User prompt
mejor haz que esos hotakos que vayan rapido sean otros enemigos que aparezcan de manera random, que sean azules, y haz que el boss sea mucho mas grande
User prompt
que vayan un poco mas lentas las balas, y conforme vayas matando hotakos vayan subiendo la velocidad, pero solo hasta este punto, que por ejemplo, velocidad inicial del primer hotako sea 3 y luego se le sumen 3, y asi
User prompt
que aparezcan un monton de hotakos, muchos mas, que hasta llegue un punto de ser bastante dificil, y despues de matar a 10 hotakos aparezca un gigante que disparo mucho, y aguante 100 disparos, y sea un jefe, despues de matarlo sigue todo normal, y despues de matar a 10 hotakos y eliminar al primer hotako gigante, se multipleque de 10 a 20 y finalmente 30
User prompt
que los hotakos aparezcan de cualquier lugar o lado o cualquier dirrecion, y que los disparos vayan a donde esta apuntando el cursor segun su angulo
User prompt
si
User prompt
que cuando aparezcan los hotakos puedas disparar dando click y se mueran si les da un disparo
User prompt
con el mouse o puntero se mueva y lo siga
Code edit (1 edits merged)
Please save this source code
User prompt
Hotako Fire Runner
Initial prompt
genera un juego donde tu personaje se mueva en derecha a izquierda donde aparezcan enemigos llamados hotakos que lanzen fuego dorado con personalizacion de personaje y graficos ultra HD rtx
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Boss = Container.expand(function () {
var self = Container.call(this);
var bossGraphics = self.attachAsset('hotako', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 6,
scaleY: 6
});
self.health = 100;
self.maxHealth = 100;
self.fireTimer = 0;
self.fireRate = 30; // Faster shooting than normal Hotakos
self.speed = 0.5; // Slower movement
self.directionX = 0;
self.directionY = 1;
self.rapidFireCount = 0;
self.rapidFireMax = 5;
self.rapidFireDelay = 10;
self.setDirection = function (targetX, targetY) {
var dx = targetX - self.x;
var dy = targetY - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
self.directionX = dx / distance;
self.directionY = dy / distance;
}
};
self.takeDamage = function () {
self.health--;
// Flash red when taking damage
LK.effects.flashObject(self, 0xff0000, 100);
return self.health <= 0;
};
self.update = function () {
self.x += self.directionX * self.speed;
self.y += self.directionY * self.speed;
self.fireTimer++;
if (self.fireTimer >= self.fireRate) {
self.fireTimer = 0;
// Rapid fire burst
if (self.rapidFireCount < self.rapidFireMax) {
self.shouldFire = true;
self.rapidFireCount++;
self.fireTimer = -self.rapidFireDelay; // Short delay between rapid shots
} else {
self.rapidFireCount = 0;
}
}
};
return self;
});
var Bullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.attachAsset('bullet', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 12;
self.directionX = 0;
self.directionY = -1; // Default upward direction
self.update = function () {
self.x += self.directionX * self.speed;
self.y += self.directionY * self.speed;
};
return self;
});
var FastHotako = Container.expand(function () {
var self = Container.call(this);
var hotakoGraphics = self.attachAsset('hotako', {
anchorX: 0.5,
anchorY: 0.5
});
hotakoGraphics.tint = 0x0080ff; // Blue color
self.fireTimer = 0;
self.fireRate = 60; // Faster firing rate
self.speed = 6; // Fixed fast speed
self.directionX = 0;
self.directionY = 1; // Default downward direction
self.setDirection = function (targetX, targetY) {
var dx = targetX - self.x;
var dy = targetY - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
self.directionX = dx / distance;
self.directionY = dy / distance;
}
};
self.update = function () {
self.x += self.directionX * self.speed;
self.y += self.directionY * self.speed;
self.fireTimer++;
if (self.fireTimer >= self.fireRate) {
self.fireTimer = 0;
// Signal to create fire projectile
self.shouldFire = true;
}
};
return self;
});
var Fire = Container.expand(function () {
var self = Container.call(this);
var fireGraphics = self.attachAsset('fire', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 6;
self.directionX = 0;
self.directionY = 1;
self.setDirection = function (targetX, targetY, startX, startY) {
var dx = targetX - startX;
var dy = targetY - startY;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
self.directionX = dx / distance;
self.directionY = dy / distance;
}
};
self.update = function () {
self.x += self.directionX * self.speed;
self.y += self.directionY * self.speed;
};
return self;
});
var Hotako = Container.expand(function () {
var self = Container.call(this);
var hotakoGraphics = self.attachAsset('hotako', {
anchorX: 0.5,
anchorY: 0.5
});
self.fireTimer = 0;
self.fireRate = 90; // Frames between shots
self.speed = currentHotakoSpeed; // Use current game speed
self.directionX = 0;
self.directionY = 1; // Default downward direction
self.setDirection = function (targetX, targetY) {
var dx = targetX - self.x;
var dy = targetY - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
self.directionX = dx / distance;
self.directionY = dy / distance;
}
};
self.update = function () {
self.x += self.directionX * self.speed;
self.y += self.directionY * self.speed;
self.fireTimer++;
if (self.fireTimer >= self.fireRate) {
self.fireTimer = 0;
// Signal to create fire projectile
self.shouldFire = true;
}
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 8;
self.moveDirection = 0; // -1 left, 0 stop, 1 right
self.setColor = function (color) {
playerGraphics.tint = color;
};
self.update = function () {
// Smooth movement toward target position (X and Y)
var deltaX = targetX - self.x;
var deltaY = targetY - self.y;
var moveDistanceX = Math.min(Math.abs(deltaX), self.speed);
var moveDistanceY = Math.min(Math.abs(deltaY), self.speed);
if (Math.abs(deltaX) > 5) {
self.x += deltaX > 0 ? moveDistanceX : -moveDistanceX;
}
if (Math.abs(deltaY) > 5) {
self.y += deltaY > 0 ? moveDistanceY : -moveDistanceY;
}
// Keep player within screen bounds
if (self.x < 40) self.x = 40;
if (self.x > 2008) self.x = 2008;
if (self.y < 100) self.y = 100;
if (self.y > 2632) self.y = 2632;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x1a1a2e
});
/****
* Game Code
****/
game.setBackgroundColor(0x1a1a2e);
// Game variables
var player;
var hotakos = [];
var fastHotakos = [];
var fires = [];
var bullets = [];
var spawnTimer = 0;
var spawnRate = 180; // Frames between spawns
var fastSpawnTimer = 0;
var fastSpawnRate = 300; // Frames between fast hotako spawns
var gameTime = 0;
var difficultyLevel = 1;
var hotakosKilled = 0;
var bossesKilled = 0;
var currentBoss = null;
var bossSpawnTimer = 0;
var normalSpawnMultiplier = 1; // How many hotakos to spawn at once
var baseHotakoSpeed = 3; // Initial speed for first Hotako
var speedIncrement = 3; // Speed increase per kill
var currentHotakoSpeed = baseHotakoSpeed; // Current speed for new Hotakos
// UI Elements
var scoreTxt = new Text2('0', {
size: 60,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var timeTxt = new Text2('Time: 0', {
size: 40,
fill: 0xFFDD44
});
timeTxt.anchor.set(0, 0);
timeTxt.x = 120;
timeTxt.y = 20;
LK.gui.topLeft.addChild(timeTxt);
// Initialize player
player = game.addChild(new Player());
player.x = 1024;
player.y = 2500;
// Load player customization
var playerColor = storage.playerColor || 0x4a90e2;
player.setColor(playerColor);
// Mouse following controls
var targetX = 1024; // Initial target position
var targetY = 2500; // Initial target Y position
game.move = function (x, y, obj) {
targetX = x;
targetY = y;
};
game.down = function (x, y, obj) {
// Create bullet at player position
var newBullet = new Bullet();
newBullet.x = player.x;
newBullet.y = player.y - 40;
// Calculate direction toward mouse cursor
var dx = x - player.x;
var dy = y - player.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
newBullet.directionX = dx / distance;
newBullet.directionY = dy / distance;
} else {
newBullet.directionX = 0;
newBullet.directionY = -1; // Default upward
}
bullets.push(newBullet);
game.addChild(newBullet);
LK.getSound('playerShot').play();
};
game.update = function () {
gameTime++;
// Update difficulty every 10 seconds (600 frames)
if (gameTime % 600 === 0) {
difficultyLevel++;
if (spawnRate > 60) spawnRate -= 10;
}
// Update time display
var seconds = Math.floor(gameTime / 60);
timeTxt.setText('Time: ' + seconds);
// Check if boss should spawn
if (hotakosKilled >= 10 && currentBoss === null) {
// Spawn boss
currentBoss = new Boss();
currentBoss.x = 1024; // Center top
currentBoss.y = 200;
currentBoss.setDirection(player.x, player.y);
game.addChild(currentBoss);
// Update spawn multiplier based on bosses killed
if (bossesKilled === 0) {
normalSpawnMultiplier = 1;
} else if (bossesKilled === 1) {
normalSpawnMultiplier = 2;
} else {
normalSpawnMultiplier = 3;
}
// Reset kill counter and speed progression
hotakosKilled = 0;
currentHotakoSpeed = baseHotakoSpeed; // Reset speed for new cycle
}
// Spawn normal Hotakos (multiple based on difficulty)
spawnTimer++;
if (spawnTimer >= spawnRate && currentBoss === null) {
spawnTimer = 0;
// Spawn multiple Hotakos based on current multiplier
for (var spawnCount = 0; spawnCount < normalSpawnMultiplier; spawnCount++) {
var newHotako = new Hotako();
// Random spawn position from all four sides
var spawnSide = Math.floor(Math.random() * 4);
if (spawnSide === 0) {
// Top
newHotako.x = Math.random() * 1800 + 100;
newHotako.y = -50;
} else if (spawnSide === 1) {
// Bottom
newHotako.x = Math.random() * 1800 + 100;
newHotako.y = 2782;
} else if (spawnSide === 2) {
// Left
newHotako.x = -50;
newHotako.y = Math.random() * 2500 + 100;
} else {
// Right
newHotako.x = 2098;
newHotako.y = Math.random() * 2500 + 100;
}
// Set direction toward player
newHotako.setDirection(player.x, player.y);
hotakos.push(newHotako);
game.addChild(newHotako);
}
}
// Spawn fast blue Hotakos randomly
fastSpawnTimer++;
if (fastSpawnTimer >= fastSpawnRate && currentBoss === null) {
fastSpawnTimer = 0;
// 30% chance to spawn a fast hotako
if (Math.random() < 0.3) {
var newFastHotako = new FastHotako();
// Random spawn position from all four sides
var spawnSide = Math.floor(Math.random() * 4);
if (spawnSide === 0) {
// Top
newFastHotako.x = Math.random() * 1800 + 100;
newFastHotako.y = -50;
} else if (spawnSide === 1) {
// Bottom
newFastHotako.x = Math.random() * 1800 + 100;
newFastHotako.y = 2782;
} else if (spawnSide === 2) {
// Left
newFastHotako.x = -50;
newFastHotako.y = Math.random() * 2500 + 100;
} else {
// Right
newFastHotako.x = 2098;
newFastHotako.y = Math.random() * 2500 + 100;
}
// Set direction toward player
newFastHotako.setDirection(player.x, player.y);
fastHotakos.push(newFastHotako);
game.addChild(newFastHotako);
}
}
// Update Boss
if (currentBoss !== null) {
// Check if boss should fire
if (currentBoss.shouldFire) {
currentBoss.shouldFire = false;
var newFire = new Fire();
newFire.x = currentBoss.x;
newFire.y = currentBoss.y;
newFire.setDirection(player.x, player.y, currentBoss.x, currentBoss.y);
fires.push(newFire);
game.addChild(newFire);
LK.getSound('fireShot').play();
}
// Keep boss on screen and make it move around
if (currentBoss.x < 150) currentBoss.x = 150;
if (currentBoss.x > 1898) currentBoss.x = 1898;
if (currentBoss.y < 100) currentBoss.y = 100;
if (currentBoss.y > 800) currentBoss.y = 800;
}
// Update Hotakos and create fires
for (var h = hotakos.length - 1; h >= 0; h--) {
var hotako = hotakos[h];
// Check if Hotako should fire
if (hotako.shouldFire) {
hotako.shouldFire = false;
var newFire = new Fire();
newFire.x = hotako.x;
newFire.y = hotako.y;
newFire.setDirection(player.x, player.y, hotako.x, hotako.y);
fires.push(newFire);
game.addChild(newFire);
LK.getSound('fireShot').play();
}
// Remove off-screen Hotakos (expanded bounds for all directions)
if (hotako.y > 2800 || hotako.y < -100 || hotako.x < -100 || hotako.x > 2148) {
hotako.destroy();
hotakos.splice(h, 1);
}
}
// Update Fast Hotakos and create fires
for (var fh = fastHotakos.length - 1; fh >= 0; fh--) {
var fastHotako = fastHotakos[fh];
// Check if FastHotako should fire
if (fastHotako.shouldFire) {
fastHotako.shouldFire = false;
var newFire = new Fire();
newFire.x = fastHotako.x;
newFire.y = fastHotako.y;
newFire.setDirection(player.x, player.y, fastHotako.x, fastHotako.y);
fires.push(newFire);
game.addChild(newFire);
LK.getSound('fireShot').play();
}
// Remove off-screen FastHotakos (expanded bounds for all directions)
if (fastHotako.y > 2800 || fastHotako.y < -100 || fastHotako.x < -100 || fastHotako.x > 2148) {
fastHotako.destroy();
fastHotakos.splice(fh, 1);
}
}
// Update fires and check collisions
for (var f = fires.length - 1; f >= 0; f--) {
var fire = fires[f];
// Check collision with player
if (fire.intersects(player)) {
// Game Over
LK.effects.flashScreen(0xff0000, 1000);
// Save score
var finalScore = Math.floor(gameTime / 60) * 10 + Math.floor(gameTime / 10);
LK.setScore(finalScore);
LK.showGameOver();
return;
}
// Remove off-screen fires
if (fire.y > 2800 || fire.y < -50 || fire.x < -50 || fire.x > 2098) {
fire.destroy();
fires.splice(f, 1);
}
}
// Update bullets and check collisions with Hotakos and Boss
for (var b = bullets.length - 1; b >= 0; b--) {
var bullet = bullets[b];
var hitTarget = false;
// Check collision with Boss first
if (currentBoss !== null && bullet.intersects(currentBoss)) {
bullet.destroy();
bullets.splice(b, 1);
hitTarget = true;
if (currentBoss.takeDamage()) {
// Boss defeated
currentBoss.destroy();
currentBoss = null;
bossesKilled++;
LK.setScore(LK.getScore() + 500); // Big score for boss
LK.effects.flashScreen(0x00ff00, 500); // Green flash for victory
}
}
// Check collision with normal Hotakos
if (!hitTarget) {
for (var h = hotakos.length - 1; h >= 0; h--) {
var hotako = hotakos[h];
if (bullet.intersects(hotako)) {
// Hotako hit - destroy both bullet and Hotako
bullet.destroy();
bullets.splice(b, 1);
hotako.destroy();
hotakos.splice(h, 1);
// Add score for killing Hotako
LK.setScore(LK.getScore() + 50);
hotakosKilled++;
// Increase speed for next Hotakos
currentHotakoSpeed = baseHotakoSpeed + hotakosKilled * speedIncrement;
hitTarget = true;
LK.effects.flashObject(hotako, 0xffffff, 100);
break;
}
}
}
// Check collision with fast Hotakos
if (!hitTarget) {
for (var fh = fastHotakos.length - 1; fh >= 0; fh--) {
var fastHotako = fastHotakos[fh];
if (bullet.intersects(fastHotako)) {
// FastHotako hit - destroy both bullet and FastHotako
bullet.destroy();
bullets.splice(b, 1);
fastHotako.destroy();
fastHotakos.splice(fh, 1);
// Add higher score for killing FastHotako
LK.setScore(LK.getScore() + 75);
hitTarget = true;
LK.effects.flashObject(fastHotako, 0x0080ff, 100);
break;
}
}
}
// Remove off-screen bullets if not already removed
if (!hitTarget && (bullet.y < -50 || bullet.x < -50 || bullet.x > 2098)) {
bullet.destroy();
bullets.splice(b, 1);
}
}
// Update score based on survival time and dodges
var currentScore = Math.floor(gameTime / 60) * 10 + Math.floor(gameTime / 10);
LK.setScore(currentScore);
scoreTxt.setText(LK.getScore().toString());
// Create particle effects occasionally
if (gameTime % 120 === 0) {
LK.effects.flashObject(player, 0xffd700, 200);
}
}; ===================================================================
--- original.js
+++ change.js
@@ -11,10 +11,10 @@
var self = Container.call(this);
var bossGraphics = self.attachAsset('hotako', {
anchorX: 0.5,
anchorY: 0.5,
- scaleX: 3,
- scaleY: 3
+ scaleX: 6,
+ scaleY: 6
});
self.health = 100;
self.maxHealth = 100;
self.fireTimer = 0;
@@ -72,8 +72,41 @@
self.y += self.directionY * self.speed;
};
return self;
});
+var FastHotako = Container.expand(function () {
+ var self = Container.call(this);
+ var hotakoGraphics = self.attachAsset('hotako', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ hotakoGraphics.tint = 0x0080ff; // Blue color
+ self.fireTimer = 0;
+ self.fireRate = 60; // Faster firing rate
+ self.speed = 6; // Fixed fast speed
+ self.directionX = 0;
+ self.directionY = 1; // Default downward direction
+ self.setDirection = function (targetX, targetY) {
+ var dx = targetX - self.x;
+ var dy = targetY - self.y;
+ var distance = Math.sqrt(dx * dx + dy * dy);
+ if (distance > 0) {
+ self.directionX = dx / distance;
+ self.directionY = dy / distance;
+ }
+ };
+ self.update = function () {
+ self.x += self.directionX * self.speed;
+ self.y += self.directionY * self.speed;
+ self.fireTimer++;
+ if (self.fireTimer >= self.fireRate) {
+ self.fireTimer = 0;
+ // Signal to create fire projectile
+ self.shouldFire = true;
+ }
+ };
+ return self;
+});
var Fire = Container.expand(function () {
var self = Container.call(this);
var fireGraphics = self.attachAsset('fire', {
anchorX: 0.5,
@@ -174,12 +207,15 @@
game.setBackgroundColor(0x1a1a2e);
// Game variables
var player;
var hotakos = [];
+var fastHotakos = [];
var fires = [];
var bullets = [];
var spawnTimer = 0;
var spawnRate = 180; // Frames between spawns
+var fastSpawnTimer = 0;
+var fastSpawnRate = 300; // Frames between fast hotako spawns
var gameTime = 0;
var difficultyLevel = 1;
var hotakosKilled = 0;
var bossesKilled = 0;
@@ -299,8 +335,40 @@
hotakos.push(newHotako);
game.addChild(newHotako);
}
}
+ // Spawn fast blue Hotakos randomly
+ fastSpawnTimer++;
+ if (fastSpawnTimer >= fastSpawnRate && currentBoss === null) {
+ fastSpawnTimer = 0;
+ // 30% chance to spawn a fast hotako
+ if (Math.random() < 0.3) {
+ var newFastHotako = new FastHotako();
+ // Random spawn position from all four sides
+ var spawnSide = Math.floor(Math.random() * 4);
+ if (spawnSide === 0) {
+ // Top
+ newFastHotako.x = Math.random() * 1800 + 100;
+ newFastHotako.y = -50;
+ } else if (spawnSide === 1) {
+ // Bottom
+ newFastHotako.x = Math.random() * 1800 + 100;
+ newFastHotako.y = 2782;
+ } else if (spawnSide === 2) {
+ // Left
+ newFastHotako.x = -50;
+ newFastHotako.y = Math.random() * 2500 + 100;
+ } else {
+ // Right
+ newFastHotako.x = 2098;
+ newFastHotako.y = Math.random() * 2500 + 100;
+ }
+ // Set direction toward player
+ newFastHotako.setDirection(player.x, player.y);
+ fastHotakos.push(newFastHotako);
+ game.addChild(newFastHotako);
+ }
+ }
// Update Boss
if (currentBoss !== null) {
// Check if boss should fire
if (currentBoss.shouldFire) {
@@ -338,8 +406,28 @@
hotako.destroy();
hotakos.splice(h, 1);
}
}
+ // Update Fast Hotakos and create fires
+ for (var fh = fastHotakos.length - 1; fh >= 0; fh--) {
+ var fastHotako = fastHotakos[fh];
+ // Check if FastHotako should fire
+ if (fastHotako.shouldFire) {
+ fastHotako.shouldFire = false;
+ var newFire = new Fire();
+ newFire.x = fastHotako.x;
+ newFire.y = fastHotako.y;
+ newFire.setDirection(player.x, player.y, fastHotako.x, fastHotako.y);
+ fires.push(newFire);
+ game.addChild(newFire);
+ LK.getSound('fireShot').play();
+ }
+ // Remove off-screen FastHotakos (expanded bounds for all directions)
+ if (fastHotako.y > 2800 || fastHotako.y < -100 || fastHotako.x < -100 || fastHotako.x > 2148) {
+ fastHotako.destroy();
+ fastHotakos.splice(fh, 1);
+ }
+ }
// Update fires and check collisions
for (var f = fires.length - 1; f >= 0; f--) {
var fire = fires[f];
// Check collision with player
@@ -396,8 +484,26 @@
break;
}
}
}
+ // Check collision with fast Hotakos
+ if (!hitTarget) {
+ for (var fh = fastHotakos.length - 1; fh >= 0; fh--) {
+ var fastHotako = fastHotakos[fh];
+ if (bullet.intersects(fastHotako)) {
+ // FastHotako hit - destroy both bullet and FastHotako
+ bullet.destroy();
+ bullets.splice(b, 1);
+ fastHotako.destroy();
+ fastHotakos.splice(fh, 1);
+ // Add higher score for killing FastHotako
+ LK.setScore(LK.getScore() + 75);
+ hitTarget = true;
+ LK.effects.flashObject(fastHotako, 0x0080ff, 100);
+ break;
+ }
+ }
+ }
// Remove off-screen bullets if not already removed
if (!hitTarget && (bullet.y < -50 || bullet.x < -50 || bullet.x > 2098)) {
bullet.destroy();
bullets.splice(b, 1);