Code edit (1 edits merged)
Please save this source code
User prompt
update with: function getTreasureBonusMultiplier(x, y) { if (!game.treasureZones || game.treasureZones.length === 0) { return 1.0; // No bonus if no treasures } // Start with no bonus var totalBonus = 0; // Check each treasure zone game.treasureZones.forEach(function(zone) { var dx = x - zone.x; var dy = y - zone.y; var distance = Math.sqrt(dx * dx + dy * dy); // If bubble is in zone, add 30% bonus if (distance <= zone.radius) { totalBonus += 0.3; // +30% per overlapping zone } }); // Return multiplier (1.0 = no bonus, 1.3 = one zone, 1.6 = two zones, etc.) return 1.0 + totalBonus; }
Code edit (7 edits merged)
Please save this source code
User prompt
update as needed with: // In the game.update function, modify the title mode bubble spawning: if (game.titleMode) { // Just handle bubble spawning and updates during title // Random bubble spawning if (game.activeBubbles.length < game.MAX_BUBBLES) { if (LK.ticks % game.baseSpawnRate == 0) { var x = Math.random() * (game.width - 200) + 100; var titleBubble = spawnBubble(x, game.height + 100, 100, 0, true); // Apply saved color to the bubble if available if (titleBubble && game.titleColorSettings) { applyTitleScreenColor(titleBubble); } } } // ...rest of existing code }
Code edit (1 edits merged)
Please save this source code
User prompt
update with: // In the game.update function, in the title mode section: if (game.titleMode) { // Just handle bubble spawning and updates during title // Random bubble spawning if (game.activeBubbles.length < game.MAX_BUBBLES) { if (LK.ticks % game.baseSpawnRate == 0) { var x = Math.random() * (game.width - 200) + 100; var titleBubble = spawnBubble(x, game.height + 100, 100, 0, true); // Apply saved color to the bubble if available if (titleBubble && game.titleColorSettings) { applyTitleScreenColor(titleBubble); } } } // Update all active bubbles game.activeBubbles.forEach(function (bubble) { // Always apply color to ensure it's maintained, even for new bubbles from splits if (bubble.visible && game.titleColorSettings) { applyTitleScreenColor(bubble); } if (bubble.update) { bubble.update(); } }); return; // Skip rest of update when in title mode }
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particle is undefined' in or related to this line: 'particle.visible = false;' Line Number: 2238
User prompt
update with: for (var i = 0; i < game.MAX_POP_PARTICLES; i++) { var particle = LK.getAsset('zoneIndicator', { width: 15, height: 15, // Start with larger size alpha: 0, visible: false, anchorX: 0.5, anchorY: 0.5 }); game.addChild(particle); game.popParticlePool.push(particle); }
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particle is undefined' in or related to this line: 'particle.visible = false;' Line Number: 2257
Code edit (4 edits merged)
Please save this source code
User prompt
update as needed with: // In the Fish class, find the update method, and the bubble collision section self.update = function() { self.x += self.fromLeft ? self.speed : -self.speed; // Add bubble collision check game.activeBubbles.forEach(function(bubble) { if (bubble.visible) { var dx = self.x - bubble.x; var dy = self.y - bubble.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance <= bubble.size / 2 + 70) { // Add pop effect for fish pops game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint); var points = bubble.getBP(); game.addBP(points, bubble.x, bubble.y, false); // false = manual pop points // Play a random bubble pop sound var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4']; var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)]; LK.getSound(randomSound).play(); bubble.deactivate(); } } }); // Rest of function... };
User prompt
update as needed with: // In the Bubble's down method, where it handles popping the other bubble in a twin pair: if (twinPair) { // Mark as popped twinPair.popped = true; twinPair.timestamp = LK.ticks; // Find the other bubble in the pair var otherBubble = twinPair.bubble1 === self ? twinPair.bubble2 : twinPair.bubble1; // Add bonus for twin pop var twinLevel = UPGRADE_CONFIG.player.twinBubbles.currentLevel; var bonusMultiplier = 0.3 + 0.15 * twinLevel; // 30/45/60% bonus // Pop the other bubble automatically and add bonus points if (otherBubble.visible) { // Add pop effect for twin bubble pop game.createPopEffect(otherBubble.x, otherBubble.y, otherBubble.size, otherBubble.colorTint); var bonusPoints = Math.floor(otherBubble.getBP() * bonusMultiplier); game.addBP(bonusPoints, otherBubble.x, otherBubble.y, false); otherBubble.deactivate(); } }
User prompt
increase chance of twin bubble by 5% more per level
Code edit (2 edits merged)
Please save this source code
User prompt
lower base bubble value by 20%
User prompt
lower bubble BP value by 20%
User prompt
lower bubble bp value by 10%
Code edit (1 edits merged)
Please save this source code
User prompt
Make the shade for the purple bubbles a lighter purple.
Code edit (1 edits merged)
Please save this source code
User prompt
Update as needed with: self.update = function() { // ... other update logic ... if (self.y < -self.size) { // Use the deactivate method for consistent cleanup self.deactivate(); return; } // ... more update logic ... };
Code edit (3 edits merged)
Please save this source code
User prompt
Update with: bubbles: { left: [['player', 'lungCapacity'], ['player', 'quickBreath'], ['player', 'bubbleRefinement'], ['player', 'twinBubbles']], right: [['player', 'autoPop'], ['player', 'jellyfish'], ['player', 'sizeVariance'], ['machine', 'bubbleDurability']] },
===================================================================
--- original.js
+++ change.js
@@ -509,8 +509,96 @@
}
};
return self;
});
+var Jellyfish = Container.expand(function () {
+ var self = Container.call(this);
+ // Create jellyfish sprite
+ var sprite = self.attachAsset('jellyfish', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ // Initialize position and movement
+ self.x = Math.random() * (game.width - 200) + 100;
+ self.y = -100; // Start above screen
+ self.speed = 6;
+ self.wiggleAmount = 30;
+ self.wiggleSpeed = 0.05;
+ self.wiggleOffset = Math.random() * Math.PI * 2; // Random starting phase
+ self.touched = false;
+ self.update = function () {
+ if (self.touched) {
+ // Move up and away when touched
+ self.y -= self.speed * 2;
+ // Check if off screen to destroy
+ if (self.y < -100) {
+ self.destroy();
+ }
+ return;
+ }
+ // Normal movement - downward with side-to-side wiggle
+ self.y += self.speed;
+ self.x += Math.sin(LK.ticks * self.wiggleSpeed + self.wiggleOffset) * self.wiggleAmount / 60;
+ // Bubble collision check
+ game.activeBubbles.forEach(function (bubble) {
+ if (bubble.visible) {
+ var dx = self.x - bubble.x;
+ var dy = self.y - bubble.y;
+ var distance = Math.sqrt(dx * dx + dy * dy);
+ if (distance <= bubble.size / 2 + 70) {
+ // Add pop effect for jellyfish pops
+ game.createPopEffect(bubble.x, bubble.y, bubble.size, bubble.colorTint);
+ var points = bubble.getBP();
+ game.addBP(points, bubble.x, bubble.y, false);
+ // Play a random bubble pop sound
+ var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4'];
+ var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)];
+ LK.getSound(randomSound).play();
+ bubble.deactivate();
+ }
+ }
+ });
+ // Remove when off bottom of screen
+ if (self.y > game.height + 100) {
+ self.destroy();
+ }
+ };
+ // Handle being touched
+ self.down = function () {
+ if (self.touched) {
+ return true;
+ }
+ self.touched = true;
+ // Play sound
+ var bubbleSounds = ['bubble1', 'bubble2', 'bubble3', 'bubble4'];
+ var randomSound = bubbleSounds[Math.floor(Math.random() * bubbleSounds.length)];
+ LK.getSound(randomSound).play();
+ // Spawn bubbles in a jet
+ var bubbleCount = 5 + Math.floor(Math.random() * 3);
+ for (var i = 0; i < bubbleCount; i++) {
+ LK.setTimeout(function () {
+ if (!self) {
+ return;
+ } // Safety check
+ var size = 50 + Math.random() * 50;
+ var bubble = spawnBubble(self.x + (Math.random() * 40 - 20), self.y + (Math.random() * 40 - 20), size, (Math.random() * 2 - 1) * 2, false);
+ if (bubble) {
+ bubble.verticalVelocity = -(Math.random() * 6 + 4);
+ }
+ }, i * 5);
+ }
+ // Apply a "flee" animation
+ tween(sprite, {
+ scaleX: sprite.scaleX * 1.2,
+ scaleY: sprite.scaleY * 1.2,
+ alpha: 0.8
+ }, {
+ duration: 300
+ });
+ return true;
+ };
+ return self;
+});
// Pufferfish mask that follows face
var pufferMask = Container.expand(function () {
var self = Container.call(this);
var sprite = self.attachAsset('pufferfish', {
@@ -826,8 +914,15 @@
baseCost: 5000,
costScale: 3,
maxLevel: 5,
currentLevel: 0
+ },
+ jellyfish: {
+ name: "Jellyfish Bloom",
+ baseCost: 5000,
+ costScale: 4,
+ maxLevel: 6,
+ currentLevel: 0
}
},
machines: {
basicClam: {
@@ -2464,13 +2559,18 @@
}
}
// Clean up old twin bubble pairs
game.twinBubbles = game.twinBubbles.filter(function (pair) {
- // Remove pairs where both bubbles are gone or time expired (60 frames = 1 second)
- if (!pair.bubble1.visible || !pair.bubble2.visible || pair.popped && LK.ticks - pair.timestamp > 60) {
- return false;
+ // Remove pairs where one or both bubbles are invisible or time expired
+ if (!pair.bubble1.visible || !pair.bubble2.visible) {
+ return false; // Remove pair immediately when either bubble is invisible
}
- return true;
+ // Keep the pair if it hasn't been popped
+ if (!pair.popped) {
+ return true;
+ }
+ // If popped, check if enough time has passed
+ return LK.ticks - pair.timestamp <= 60;
});
// Update all active bubbles
game.activeBubbles.forEach(function (bubble) {
if (bubble.update) {
A treasure chest with gold coins. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A golden skull with diamonds for eyes. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A golden necklace with a ruby pendant. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A filled in white circle.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
A yellow star. Cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
a game logo for a game called 'Bubble Blower Tycoon' about a happy purple pufferfish with yellow fins and spines that builds an underwater empire of bubbles. Cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
an SVG of the word 'Start'. word should be yellow and the font should look like its made out of bubbles. cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
bubblelow
Sound effect
backgroundmusic
Music
bubblehigh
Sound effect
bubble1
Sound effect
bubble2
Sound effect
bubble3
Sound effect
bubble4
Sound effect
blowing
Sound effect
bubbleshoot
Sound effect
fishtank
Sound effect
menuopen
Sound effect
upgrade
Sound effect
jellyfish
Sound effect
titlemusic
Music
startbutton
Sound effect