User prompt
encore plus vite
User prompt
une fois que la fée a passer une ligne de potion les potion doive tomber plus vite
User prompt
encore plus
User prompt
il faut que les potion bouge beaucoup plus !
User prompt
les potion doive bouger
User prompt
il faut qu'il y a plein de potion en même temp
User prompt
il dois y avoir de plus en plus de potion
User prompt
la fée dois être sur le curser
User prompt
la fée dois avoir trois vie si elle touche une potion elle perd un vie
Initial prompt
fairy
===================================================================
--- original.js
+++ change.js
@@ -19,16 +19,17 @@
self.moveDown = function () {
self.y = Math.min(2732 - self.height / 2, self.y + self.speed);
};
});
-// EnchantedPotion class
-var EnchantedPotion = Container.expand(function () {
+// Potion class
+var Potion = Container.expand(function () {
var self = Container.call(this);
- var enchantedPotionGraphics = self.createAsset('enchantedPotion', 'Enchanted Witch potion', 0.5, 0.5);
- self.speed = 10;
+ var potionGraphics = self.createAsset('potion', 'Witch potion', 0.5, 0.5);
+ self.baseSpeed = 8;
+ self.speedMultiplier = 1;
self.move = function () {
- self.x += (Math.random() - 0.5) * self.speed * 2;
- self.y += self.speed * 1.5;
+ self.x += (Math.random() - 0.5) * self.baseSpeed * 2 * self.speedMultiplier;
+ self.y += self.baseSpeed * self.speedMultiplier;
if (self.y > 2732 + self.height || self.x < -self.width || self.x > 2048 + self.width) {
self.destroy();
}
};
@@ -75,17 +76,24 @@
potions[i].destroy();
potions.splice(i, 1);
}
}
- // Spawn enchanted potions with increasing frequency
+ // Update potion speed multiplier based on fairy's y position
+ var potionSpeedLine = 1366; // Define the y position line for increasing potion speed
+ if (fairy.y < potionSpeedLine) {
+ for (var p = 0; p < potions.length; p++) {
+ potions[p].speedMultiplier = 1.5;
+ }
+ }
+ // Spawn potions with increasing frequency
var spawnRate = Math.max(30, 120 - Math.floor(LK.ticks / 1800)); // Decrease spawn interval every 30 seconds, minimum 0.5 seconds
if (LK.ticks % spawnRate === 0) {
- for (var j = 0; j < 3; j++) {
- // Spawn 3 enchanted potions at once
- var enchantedPotion = new EnchantedPotion();
- enchantedPotion.x = Math.random() * (2048 - enchantedPotion.width) + enchantedPotion.width / 2;
- enchantedPotion.y = -enchantedPotion.height / 2;
- potions.push(enchantedPotion);
- game.addChild(enchantedPotion);
+ for (var j = 0; j < 5; j++) {
+ // Spawn 5 potions at once
+ var potion = new Potion();
+ potion.x = Math.random() * (2048 - potion.width) + potion.width / 2;
+ potion.y = -potion.height / 2;
+ potions.push(potion);
+ game.addChild(potion);
}
}
});
\ No newline at end of file
nothing
fairy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
un monde féerique. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
enleve ça
le même coeur mais vide