User prompt
If there is a total of 6 soils, put it on top and add it downwards when we get more soil.
User prompt
add a new button "new soil" when we click on it we pay 50$ and buy a new soil, the price increases by +25$ for each soil we buy
User prompt
Delete all lands, only 3 lands remain
User prompt
Add "Advanced Sprinkler" to the Gear Shop and fruits in a 5x5 area will grow 4 times faster.
User prompt
remove gold fruits from game
User prompt
Add all the golden fruits to the assets and they will come out of the golden fruits ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Golden fruits must be yellow ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
remove it so that the plants are no longer big Instead, there is a 10% chance that the plants will turn gold, which will increase the sales price by 35%. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When the fruits grow too big, they appear behind the soil. Move the soil down one layer. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
make sprinklers bigger ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When the fruits grow too big, they are behind the soil, change that bug ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
delete top row soil
User prompt
Put "gear shop" below
User prompt
Let's slide the top buttons to the right and left. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Add a new button "gear shop", a screen will appear in front of us and sprinklers will be sold, the price will be $35. If we buy it and put it somewhere, all the fruits we plant in a 3x3 area will grow twice as fast. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
There is a 10% chance that the fruits will grow twice as big and the sales price will be twice as high. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Play "Buy" sound when you buy a seed from seed shop
User prompt
Make the color of the prices in the seed shop yellow
User prompt
When the bananas are planted and harvested, they will come out again, but after 19 seconds Same for dragon fruit and coconut but dragon fruit 22 seconds ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
carrots should not grow again after being planted and harvested strawberries too
User prompt
After planting and collecting bananas, let's not delete them, let's collect them again after a few seconds. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
The selling price of fruits will be 10% more with a 30% probability
User prompt
Move the names of the fruits a little to the left
User prompt
enlarge the writings in the seed shop
User prompt
move inventory to bottom left
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Button = Container.expand(function (text, onClick) { var self = Container.call(this); var buttonBg = self.attachAsset('button', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2(text, { size: 30, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function () { if (onClick) onClick(); }; return self; }); var PlantSpot = Container.expand(function (x, y) { var self = Container.call(this); self.x = x; self.y = y; self.planted = false; self.plantType = null; self.plantTime = 0; self.grown = false; var dirtGraphics = self.attachAsset('dirt', { anchorX: 0.5, anchorY: 0.5 }); var plantGraphics = null; self.plantSeed = function (seedType) { if (self.planted) return false; self.planted = true; self.plantType = seedType; self.plantTime = LK.ticks; self.grown = false; self.isColorful = false; // 5% chance for colorful fruit (3x price) if (Math.random() < 0.05) { self.isColorful = true; self.plantType = 'colorful_' + seedType; } plantGraphics = self.attachAsset(self.plantType, { anchorX: 0.5, anchorY: 0.5, alpha: 0.5, scaleX: 0.3, scaleY: 0.3 }); // Animate plant growth over 5 seconds tween(plantGraphics, { scaleX: 1, scaleY: 1 }, { duration: 5000, easing: tween.easeOut }); // Add rainbow tint animation for colorful fruits if (self.isColorful) { var colorfulAnimation = function colorfulAnimation() { var colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff, 0x00ffff]; var currentColor = 0; var _animateColor = function animateColor() { if (plantGraphics) { tween(plantGraphics, { tint: colors[currentColor] }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { currentColor = (currentColor + 1) % colors.length; _animateColor(); } }); } }; _animateColor(); }; // Start colorful animation after growth completes LK.setTimeout(colorfulAnimation, 5000); } LK.getSound('plant').play(); return true; }; self.harvest = function () { if (!self.grown) return null; var harvestedType = self.plantType; var isColorfulHarvest = self.isColorful; if (plantGraphics) { plantGraphics.destroy(); plantGraphics = null; } self.planted = false; self.plantType = null; self.plantTime = 0; self.grown = false; self.isColorful = false; LK.getSound('harvest').play(); return { type: harvestedType, colorful: isColorfulHarvest }; }; self.update = function () { if (self.planted && !self.grown) { if (LK.ticks - self.plantTime > 300) { // 5 seconds at 60fps self.grown = true; if (plantGraphics) { plantGraphics.alpha = 1.0; } } } }; self.down = function () { if (self.grown) { var harvested = self.harvest(); if (harvested) { var harvestType = harvested.type; if (harvested.colorful) { // Store colorful fruits separately for 3x price var baseType = harvestType.replace('colorful_', ''); inventory['colorful_' + baseType] = (inventory['colorful_' + baseType] || 0) + 1; } else { inventory[harvestType] = (inventory[harvestType] || 0) + 1; } updateInventoryDisplay(); } } else if (!self.planted && selectedSeed && money >= seedPrices[selectedSeed]) { if (self.plantSeed(selectedSeed)) { money -= seedPrices[selectedSeed]; updateMoneyDisplay(); selectedSeed = null; seedShop.visible = false; } } }; return self; }); var SeedShop = Container.expand(function () { var self = Container.call(this); var background = self.attachAsset('seedShopBg', { anchorX: 0.5, anchorY: 0.5 }); var titleText = new Text2('SEED SHOP', { size: 80, fill: 0x000000 }); titleText.anchor.set(0.5, 0.5); titleText.y = -600; self.addChild(titleText); var seedTypes = ['carrot', 'strawberry', 'banana', 'coconut', 'dragonfruit']; var seedNames = ['Carrot', 'Strawberry', 'Banana', 'Coconut', 'Dragon Fruit']; // Use uniform medium size for all seeds in shop var uniformScale = 0.5; // Medium size for all seeds for (var i = 0; i < seedTypes.length; i++) { var seedButton = new Container(); seedButton.x = 0; seedButton.y = -400 + i * 150; // Use uniform scale for all seed icons var seedIcon = LK.getAsset(seedTypes[i], { anchorX: 0.5, anchorY: 0.5, scaleX: uniformScale, scaleY: uniformScale }); seedIcon.x = -300; seedButton.addChild(seedIcon); var nameText = new Text2(seedNames[i], { size: 70, fill: 0x000000 }); nameText.anchor.set(0, 0.5); nameText.x = -250; seedButton.addChild(nameText); var priceText = new Text2('$' + seedPrices[seedTypes[i]], { size: 70, fill: 0x006400 }); priceText.anchor.set(1, 0.5); priceText.x = 300; seedButton.addChild(priceText); seedButton.seedType = seedTypes[i]; seedButton.down = function () { if (money >= seedPrices[this.seedType]) { selectedSeed = this.seedType; self.visible = false; } }; self.addChild(seedButton); } var closeButton = new Button('CLOSE', function () { self.visible = false; }); closeButton.y = 500; self.addChild(closeButton); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x228B22 }); /**** * Game Code ****/ // Add grass background var grassBackground = game.attachAsset('grass_bg', { anchorX: 0, anchorY: 0, x: 0, y: 0 }); var money = 0; var inventory = {}; var selectedSeed = null; var seedPrices = { carrot: 10, strawberry: 50, banana: 80, coconut: 160, dragonfruit: 250 }; var sellPrices = { carrot: 15, strawberry: 35, banana: 60, coconut: 135, dragonfruit: 200, colorful_carrot: 45, colorful_strawberry: 105, colorful_banana: 180, colorful_coconut: 405, colorful_dragonfruit: 600 }; // Create plant spots in a grid var plantSpots = []; var gridCols = 8; var gridRows = 10; var startX = 300; var startY = 400; var spacing = 220; for (var row = 0; row < gridRows; row++) { for (var col = 0; col < gridCols; col++) { var spot = new PlantSpot(startX + col * spacing, startY + row * spacing); plantSpots.push(spot); game.addChild(spot); } } // Plant initial carrots plantSpots[0].plantSeed('carrot'); plantSpots[1].plantSeed('carrot'); // UI Elements var moneyText = new Text2('Money: $0', { size: 50, fill: 0x000000 }); moneyText.anchor.set(0, 0); moneyText.x = 150; moneyText.y = 50; LK.gui.topLeft.addChild(moneyText); var inventoryText = new Text2('Inventory: Empty', { size: 50, fill: 0x000000 }); inventoryText.anchor.set(0, 1); inventoryText.x = 100; inventoryText.y = -100; LK.gui.bottomLeft.addChild(inventoryText); // Make inventory alive with pulsing animation function animateInventory() { tween(inventoryText, { scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(inventoryText, { scaleX: 1.0, scaleY: 1.0 }, { duration: 1000, easing: tween.easeInOut, onFinish: animateInventory }); } }); } animateInventory(); var sellButton = new Button('SELL ALL', function () { var totalSale = 0; // Check if we get the 10% price boost (30% chance) var priceBoost = Math.random() < 0.3 ? 1.1 : 1.0; for (var itemType in inventory) { if (inventory[itemType] > 0) { var basePrice = sellPrices[itemType] * priceBoost; totalSale += inventory[itemType] * basePrice; inventory[itemType] = 0; } } if (totalSale > 0) { money += totalSale; updateMoneyDisplay(); updateInventoryDisplay(); LK.getSound('sell').play(); } }); sellButton.x = 600; sellButton.y = 100; sellButton.scaleX = 1.3; sellButton.scaleY = 1.3; LK.gui.topLeft.addChild(sellButton); var seedButton = new Button('SEEDS', function () { seedShop.visible = true; }); seedButton.x = 900; seedButton.y = 100; seedButton.scaleX = 1.3; seedButton.scaleY = 1.3; LK.gui.topLeft.addChild(seedButton); var freeCoinsButton = new Button('FREE COINS', function () { money += 500; updateMoneyDisplay(); }); freeCoinsButton.x = 1200; freeCoinsButton.y = 100; freeCoinsButton.scaleX = 1.3; freeCoinsButton.scaleY = 1.3; LK.gui.topLeft.addChild(freeCoinsButton); var seedShop = new SeedShop(); seedShop.x = 1024; seedShop.y = 1366; seedShop.visible = false; game.addChild(seedShop); function updateMoneyDisplay() { moneyText.setText('Money: $' + money); } function updateInventoryDisplay() { var inventoryStr = 'Inventory: '; var hasItems = false; for (var itemType in inventory) { if (inventory[itemType] > 0) { if (hasItems) inventoryStr += ', '; inventoryStr += itemType + ' x' + inventory[itemType]; hasItems = true; } } if (!hasItems) { inventoryStr += 'Empty'; } inventoryText.setText(inventoryStr); } // Play background music LK.playMusic('Music'); game.update = function () { // Plant spots update automatically through their update methods };
===================================================================
--- original.js
+++ change.js
@@ -301,11 +301,14 @@
}
animateInventory();
var sellButton = new Button('SELL ALL', function () {
var totalSale = 0;
+ // Check if we get the 10% price boost (30% chance)
+ var priceBoost = Math.random() < 0.3 ? 1.1 : 1.0;
for (var itemType in inventory) {
if (inventory[itemType] > 0) {
- totalSale += inventory[itemType] * sellPrices[itemType];
+ var basePrice = sellPrices[itemType] * priceBoost;
+ totalSale += inventory[itemType] * basePrice;
inventory[itemType] = 0;
}
}
if (totalSale > 0) {
8 bit dragon fruit tree. In-Game asset. 2d. High contrast. No shadows
8 bit carrot. In-Game asset. 2d. High contrast. No shadows
background grass 8 bit. In-Game asset. 2d. High contrast. No shadows
8 bit Straw berry. In-Game asset. 2d. High contrast. No shadows
8 bit banana tree. In-Game asset. 2d. High contrast. No shadows
8 bit coconut tree. In-Game asset. 2d. High contrast. No shadows
Neon
Neon
Neon
Neon
Neon
Stone 8 bit. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
8 bit fish. In-Game asset. 2d. High contrast. No shadows
Neon
8 bit orange. In-Game asset. 2d. High contrast. No shadows
Neon
Apple tree 8 bit. In-Game asset. 2d. High contrast. No shadows
Choco
Choco but all parts of the carrot are visible and only the carrot is painted brown
Neon
different color