User prompt
remove wait for 2 seconds between boss is destroyed and powerup menu is shown
User prompt
only apply this last big explossion and flash to boss, not all other enemies
User prompt
make boss explossion way bigger and flashier
User prompt
wait for 2 seconds between boss is destroyed and powerup menu is shown
User prompt
when boss is destroyed make 5 explosions with 100 pixels random from where boss was, with half a seconds difference. only shows powerupmenu once explosions are done
User prompt
boss 5 explosions should be half a second appart
User prompt
when a boss is destroyed, add 5 explosions and not only one. also play sound 5 times
User prompt
after boss is destroyed wait for 2 seconds before powerup screen is displayed
User prompt
boss dropped diamonds should go down slower
User prompt
add diamons gradviy effect like the ones dropped by boss
User prompt
bosses should drop between 2 to 5 diamonds, and if they should explode from the center of the boss and then just go down
User prompt
create a config place whre cost of powerups is set
User prompt
instead of hardcoding the ammount fo diamonds needed for powerup, if player tries to buy one and does not have enough, say, I need x amount of diamonds to buy this!
Code edit (1 edits merged)
Please save this source code
User prompt
move powerup menu 300 pixels right and 500 pixels down
Code edit (4 edits merged)
Please save this source code
User prompt
reduce alpha of powerup menu
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
move powerup1 2 and 3 200 pixels up inside the powerup menu
User prompt
make powerup menu 50% size bigger on code
User prompt
move powerup menu 300 pixels up
Code edit (1 edits merged)
Please save this source code
User prompt
move not now message 300 pixels down
User prompt
add more movement to boss withing the top of the screen. they should move from side to side and top down, randomly
===================================================================
--- original.js
+++ change.js
@@ -408,10 +408,10 @@
powerup1.y = screenGraphics.y - 400;
self.addChild(powerup1);
powerup1.down = function (x, y, obj) {
console.log("Powerup1 touched");
- if (diamondCount >= 10) {
- diamondCount -= 10;
+ if (diamondCount >= powerupCosts.powerup1) {
+ diamondCount -= powerupCosts.powerup1;
diamondCounterTxt.setText(diamondCount);
heroFireRate = Math.max(5, heroFireRate - 5); // Increase fire rate when the first powerup is selected, but not less than 5
isUsingHeroBullet3 = true; // Switch to HeroBullet3
// Removed incorrect attachAsset call for HeroBullet3
@@ -436,9 +436,9 @@
bullet.speed *= 2; // Double the speed of bullets
});
}
} else {
- var message = new Text2("I need ".concat(10 - diamondCount, " more diamonds for this powerup!"), {
+ var message = new Text2("I need ".concat(powerupCosts.powerup1 - diamondCount, " more diamonds for this powerup!"), {
size: 100,
fill: "#ffffff",
stroke: "#000000",
strokeThickness: 5
@@ -479,10 +479,10 @@
powerup2.y = screenGraphics.y - 400;
self.addChild(powerup2);
powerup2.down = function (x, y, obj) {
console.log("Powerup2 touched");
- if (diamondCount >= 20) {
- diamondCount -= 20;
+ if (diamondCount >= powerupCosts.powerup2) {
+ diamondCount -= powerupCosts.powerup2;
diamondCounterTxt.setText(diamondCount);
// Add action for powerup3
shield = game.addChild(new Shield());
shield = game.addChild(new Shield());
@@ -497,9 +497,9 @@
currentLevelIndex = 0;
currentLevel = levels[currentLevelIndex];
}
} else {
- var message = new Text2("I need ".concat(20 - diamondCount, " more diamonds for this powerup!"), {
+ var message = new Text2("I need ".concat(powerupCosts.powerup2 - diamondCount, " more diamonds for this powerup!"), {
size: 100,
fill: "#ffffff",
stroke: "#000000",
strokeThickness: 5
@@ -540,10 +540,10 @@
powerup3.y = screenGraphics.y - 400;
self.addChild(powerup3);
powerup3.down = function (x, y, obj) {
console.log("Powerup3 touched");
- if (diamondCount >= 30) {
- diamondCount -= 30;
+ if (diamondCount >= powerupCosts.powerup3) {
+ diamondCount -= powerupCosts.powerup3;
diamondCounterTxt.setText(diamondCount);
// Add action for powerup3
shield = game.addChild(new Shield()); // Add shield when powerup3 is selected
self.destroy(); // Close powerup menu
@@ -556,9 +556,9 @@
currentLevelIndex = 0;
currentLevel = levels[currentLevelIndex];
}
} else {
- var message = new Text2("I need ".concat(30 - diamondCount, " more diamonds for this powerup!"), {
+ var message = new Text2("I need ".concat(powerupCosts.powerup3 - diamondCount, " more diamonds for this powerup!"), {
size: 100,
fill: "#ffffff",
stroke: "#000000",
strokeThickness: 5
@@ -721,8 +721,14 @@
/****
* Game Code
****/
+// Configuration for powerup costs
+var powerupCosts = {
+ powerup1: 10,
+ powerup2: 20,
+ powerup3: 30
+};
var Level = function Level(config, levelNumber) {
this.waves = config.waves;
this.currentWaveIndex = 0;
this.boss = config.boss;
8-bit. cartoon. white star.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon 8 bit fairy dust. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon, 8bit, fireball. Black border. Cicular.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon, 8 bit, shield. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, axe. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark electric ball, 8bit, cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, treasure chest frame. very big empty center. only a fine border of chest. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
shoot
Sound effect
boom
Sound effect
Hit
Sound effect
backgroundmusic
Sound effect
bossbullet
Sound effect
bossappear
Sound effect
hit
Sound effect
diamondcollect
Sound effect
hooray
Sound effect
nono
Sound effect
letsgo
Sound effect
death
Sound effect
yes
Sound effect