User prompt
Si el jugador entra en colición con los guardias estando en modo gatito, los guardias no harán nada al respecto y su colición estará desactivada asta que pase el efecto
User prompt
Si el jugador toca la luz lunar tendrá la textura de gatito por 15 segundos. Al entrar en modo gatito , todos los guardias cambiarán a estado pasivo, no seguirán al jugador asta que el jugador pierda el modo gatito ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Al colicionar con la luz lunar la textura del jugador cambiará a gatito y la luz lunar no volverá a aparecer por toda la partida ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Crea un evento al azar que pase cada 15 segundos , crea una entidad llamada luz lunar , y que se mueva al azar , y luego desaparezca a los 15 segundos ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Agrega dos estados distintos de alerta distinto para cada guardia, un estado hará que el guardia persiga al jugador y otro que el guardia se dirija a la piedra
User prompt
Al caer una piedra, los guardias seran alertados y se moverán hacia donde cayó la última piedra
User prompt
As que aparezca solo una piedra por vez , y cuando tomes una, otra caiga del cielo en una ubicación random ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Cambia la textura del jugador al ser atrapado
User prompt
Duplica la velocidad del jugador al alertar a un guardia
User prompt
Establese una velocidad límite al jugador para que no pueda teletransportarse
User prompt
Cuando los guardias entren en modo persecución, aumenten su velocidad
User prompt
Agrega cambio de eje si el jugador se mueve a la izquierda o derecha
User prompt
Agrega cambio de eje si el guardia camina para la izquierda o derecha
User prompt
Cuando el guardia entre en modo persecución que cambie la textura
User prompt
Cada vez que obtenga una piedra aumente el ligeramente el tamaño del jugador ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Añade un estado extra a los guardias , si uno dice : don't run! , alertara a 3 guardas al azar.
User prompt
Agrega otro sonido al entrar en el rango del guardia, y que reproduzca uno de los 3 sonidos al azar : Stop! , Hey!, y Don't Run!
User prompt
Al entrar en el rango de un guardia que suene un sonido diciendo: stop! ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Agrega una textura al jugador por cada fase
User prompt
Agrega una textura por cada fase
User prompt
Ajusta la ubicación del cesped para que cubra todo
User prompt
As que la imagen del guardia sea 50 transparente ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Los guardias aparecen muy cerca, alwjalos del punto de inicio
User prompt
Que los guardias aparezcan lejos del spanw
User prompt
Agrega un cesped al suelo
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Guard = Container.expand(function () { var self = Container.call(this); self.patrolSpeed = 1.5; self.alertSpeed = 4; self.detectionRadius = 250; self.isAlerted = false; self.chaseTimer = 0; self.chaseDuration = 180; // 3 seconds at 60fps self.patrolDirection = Math.random() * Math.PI * 2; self.patrolTimer = 0; var guardGraphics = self.attachAsset('guard', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { self.patrolTimer++; // Check if player is in detection range and not hiding var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < self.detectionRadius + player.detectionRadius && !player.isHiding) { if (!self.isAlerted) { // Start chasing - reset timer self.chaseTimer = 0; } self.isAlerted = true; guardGraphics.tint = 0xFF4444; } else if (self.isAlerted) { // Continue chasing for the duration even if player is out of range self.chaseTimer++; if (self.chaseTimer >= self.chaseDuration) { self.isAlerted = false; guardGraphics.tint = 0xFFFFFF; self.chaseTimer = 0; } } else { guardGraphics.tint = 0xFFFFFF; } if (self.isAlerted) { // Chase player var angle = Math.atan2(dy, dx); self.x += Math.cos(angle) * self.alertSpeed; self.y += Math.sin(angle) * self.alertSpeed; } else { // Patrol behavior if (self.patrolTimer % 120 == 0) { self.patrolDirection = Math.random() * Math.PI * 2; } self.x += Math.cos(self.patrolDirection) * self.patrolSpeed; self.y += Math.sin(self.patrolDirection) * self.patrolSpeed; // Keep guards within bounds if (self.x < 100) { self.x = 100; self.patrolDirection = Math.random() * Math.PI; } if (self.x > 1948) { self.x = 1948; self.patrolDirection = Math.PI + Math.random() * Math.PI; } if (self.y < 100) { self.y = 100; self.patrolDirection = Math.PI * 0.5 + Math.random() * Math.PI; } if (self.y > 2632) { self.y = 2632; self.patrolDirection = Math.PI * 1.5 + Math.random() * Math.PI; } } }; return self; }); var Moonstone = Container.expand(function () { var self = Container.call(this); var moonstoneGraphics = self.attachAsset('moonstone', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Gentle glow animation moonstoneGraphics.alpha = 0.7 + Math.sin(LK.ticks * 0.1) * 0.3; moonstoneGraphics.rotation += 0.02; }; return self; }); var Obstacle = Container.expand(function (assetType) { var self = Container.call(this); var obstacleGraphics = self.attachAsset(assetType, { anchorX: 0.5, anchorY: 0.5 }); return self; }); var Player = Container.expand(function () { var self = Container.call(this); self.transformationLevel = 0; self.speed = 3; self.isHiding = false; self.detectionRadius = 120; var playerGraphics = self.attachAsset('child', { anchorX: 0.5, anchorY: 0.5 }); self.transform = function () { self.transformationLevel++; // Update appearance based on transformation level if (self.transformationLevel >= 7) { // Full werewolf self.removeChild(playerGraphics); playerGraphics = self.attachAsset('werewolf', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 8; self.detectionRadius = 80; } else { // Intermediate transformations - gradually change color and size var tintValue = 0xFFB366 - self.transformationLevel * 0x1A1A1A; playerGraphics.tint = tintValue; var scaleIncrease = 1 + self.transformationLevel * 0.1; playerGraphics.scaleX = scaleIncrease; playerGraphics.scaleY = scaleIncrease; self.speed = 3 + self.transformationLevel * 0.7; self.detectionRadius = 120 - self.transformationLevel * 5; } LK.getSound('transformation').play(); LK.effects.flashObject(self, 0xE6E6FA, 1000); }; self.checkHiding = function () { self.isHiding = false; // Check if player is behind any obstacle for (var i = 0; i < obstacles.length; i++) { var obstacle = obstacles[i]; var dx = self.x - obstacle.x; var dy = self.y - obstacle.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < 70) { self.isHiding = true; break; } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x191970 }); /**** * Game Code ****/ // Game variables var player; var moonstones = []; var guards = []; var obstacles = []; var dragNode = null; var moonstonesCollected = 0; var totalMoonstones = 7; // Create UI var scoreText = new Text2('Moonstones: 0/7', { size: 60, fill: 0xFFFFFF }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); var transformationText = new Text2('Human Child', { size: 50, fill: 0xE6E6FA }); transformationText.anchor.set(0.5, 0); transformationText.y = 80; LK.gui.top.addChild(transformationText); // Create grass ground var grass = game.addChild(LK.getAsset('grass', { anchorX: 0, anchorY: 0, x: 0, y: 0 })); // Create player player = game.addChild(new Player()); player.x = 1024; player.y = 1366; // Generate obstacles for hiding for (var i = 0; i < 15; i++) { var obstacle = game.addChild(new Obstacle(Math.random() > 0.5 ? 'tree' : 'rock')); obstacle.x = 200 + Math.random() * 1648; obstacle.y = 200 + Math.random() * 2332; obstacles.push(obstacle); } // Generate moonstones for (var i = 0; i < totalMoonstones; i++) { var moonstone = game.addChild(new Moonstone()); moonstone.x = 150 + Math.random() * 1748; moonstone.y = 150 + Math.random() * 2432; moonstones.push(moonstone); } // Generate guards for (var i = 0; i < 4; i++) { var guard = game.addChild(new Guard()); // Spawn guards far from player spawn (1024, 1366) var angle = Math.random() * Math.PI * 2; var distance = 800 + Math.random() * 600; // 800-1400 pixels away from center guard.x = 1024 + Math.cos(angle) * distance; guard.y = 1366 + Math.sin(angle) * distance; // Keep guards within game bounds if (guard.x < 100) guard.x = 100; if (guard.x > 1948) guard.x = 1948; if (guard.y < 100) guard.y = 100; if (guard.y > 2632) guard.y = 2632; guards.push(guard); } function updateTransformationUI() { var transformationNames = ['Human Child', 'Growing Tail', 'Wolf Ears', 'Sharp Claws', 'Wolf Paws', 'Wolf Snout', 'Growing Fur', 'Full Werewolf']; transformationText.setText(transformationNames[player.transformationLevel] || 'Full Werewolf'); } function handleMove(x, y, obj) { if (dragNode) { dragNode.x = x; dragNode.y = y; // Keep player within bounds if (dragNode.x < 40) dragNode.x = 40; if (dragNode.x > 2008) dragNode.x = 2008; if (dragNode.y < 40) dragNode.y = 40; if (dragNode.y > 2692) dragNode.y = 2692; } } game.move = handleMove; game.down = function (x, y, obj) { dragNode = player; handleMove(x, y, obj); }; game.up = function (x, y, obj) { dragNode = null; }; game.update = function () { // Update player hiding status player.checkHiding(); // Check moonstone collection for (var i = moonstones.length - 1; i >= 0; i--) { var moonstone = moonstones[i]; if (player.intersects(moonstone)) { moonstone.destroy(); moonstones.splice(i, 1); moonstonesCollected++; LK.getSound('collect').play(); LK.setScore(moonstonesCollected); scoreText.setText('Moonstones: ' + moonstonesCollected + '/' + totalMoonstones); // Transform player player.transform(); updateTransformationUI(); // Check win condition if (moonstonesCollected >= totalMoonstones) { LK.showYouWin(); return; } // Add more guards as player transforms if (moonstonesCollected % 2 == 0 && guards.length < 8) { var newGuard = game.addChild(new Guard()); // Spawn new guards far from current player position var angle = Math.random() * Math.PI * 2; var distance = 700 + Math.random() * 500; // 700-1200 pixels away from player newGuard.x = player.x + Math.cos(angle) * distance; newGuard.y = player.y + Math.sin(angle) * distance; // Keep guards within game bounds if (newGuard.x < 100) newGuard.x = 100; if (newGuard.x > 1948) newGuard.x = 1948; if (newGuard.y < 100) newGuard.y = 100; if (newGuard.y > 2632) newGuard.y = 2632; guards.push(newGuard); } } } // Check guard capture for (var g = 0; g < guards.length; g++) { var guard = guards[g]; if (player.intersects(guard)) { LK.getSound('caught').play(); LK.effects.flashScreen(0xFF0000, 1000); LK.showGameOver(); return; } } };
===================================================================
--- original.js
+++ change.js
@@ -209,10 +209,18 @@
}
// Generate guards
for (var i = 0; i < 4; i++) {
var guard = game.addChild(new Guard());
- guard.x = 300 + Math.random() * 1448;
- guard.y = 300 + Math.random() * 2132;
+ // Spawn guards far from player spawn (1024, 1366)
+ var angle = Math.random() * Math.PI * 2;
+ var distance = 800 + Math.random() * 600; // 800-1400 pixels away from center
+ guard.x = 1024 + Math.cos(angle) * distance;
+ guard.y = 1366 + Math.sin(angle) * distance;
+ // Keep guards within game bounds
+ if (guard.x < 100) guard.x = 100;
+ if (guard.x > 1948) guard.x = 1948;
+ if (guard.y < 100) guard.y = 100;
+ if (guard.y > 2632) guard.y = 2632;
guards.push(guard);
}
function updateTransformationUI() {
var transformationNames = ['Human Child', 'Growing Tail', 'Wolf Ears', 'Sharp Claws', 'Wolf Paws', 'Wolf Snout', 'Growing Fur', 'Full Werewolf'];
@@ -260,10 +268,18 @@
}
// Add more guards as player transforms
if (moonstonesCollected % 2 == 0 && guards.length < 8) {
var newGuard = game.addChild(new Guard());
- newGuard.x = 100 + Math.random() * 1848;
- newGuard.y = 100 + Math.random() * 2532;
+ // Spawn new guards far from current player position
+ var angle = Math.random() * Math.PI * 2;
+ var distance = 700 + Math.random() * 500; // 700-1200 pixels away from player
+ newGuard.x = player.x + Math.cos(angle) * distance;
+ newGuard.y = player.y + Math.sin(angle) * distance;
+ // Keep guards within game bounds
+ if (newGuard.x < 100) newGuard.x = 100;
+ if (newGuard.x > 1948) newGuard.x = 1948;
+ if (newGuard.y < 100) newGuard.y = 100;
+ if (newGuard.y > 2632) newGuard.y = 2632;
guards.push(newGuard);
}
}
}
Pixel art de árbol pero de noche. In-Game asset. 2d. High contrast. No shadows
Piedra lunar brillante pixelart. In-Game asset. 2d. High contrast. No shadows
Guardia completamente negro con linterna iluminando con un circulo de aura pixelart. In-Game asset. 2d. High contrast. No shadows
Cesped oscuro de noche pixel art. In-Game asset. 2d. High contrast. No shadows
Niño pero de noche pixelart. In-Game asset. 2d. High contrast. No shadows
Cola de lobo, pixelart
Garras de lobo, pixelart
Nariz de lobo, pixel art
Silueta corriendo
Jaula de metal oscura , pixel art. In-Game asset. 2d. High contrast. No shadows
Transformalo en un gatito
Elimina los cristales y agrega árboles , estilo pixelart
Ahora que el perro esté ladrando
Silueta de perro corriendo
Corriendo
Corriendo pixelart
Gatito corriendo pixelart
Corriendo , pixelart
Corriendo, pixelart
Corriendo, pixelart
Corriendo, pixelart
Quítale la camisa, aslo más grande y peludo, que este en cuatro patas , pixelart