User prompt
Make it so I can’t unlock two achievements at the same time
User prompt
Don’t let the counter go into decimals
User prompt
Add update log
User prompt
Turn off the rainbow effects, and the emojis when Outside of autism mod
User prompt
The straw effect is still active went outside of autism mode fix this
User prompt
Add something that will make players think to play this so will be the top game on this app and more people download the app just to play this
User prompt
The stimulant effect is working outside of autism mode fix this
User prompt
Add more cool stuff
User prompt
Don’t make it auto clicks trigger without buying a multi
User prompt
Make auto clicks trigger the stimulus effect in autism mode
User prompt
Make a button called autism mode where all this chaotic stuff happens and you can toggle it on and off make every click in autism mode REALLY COLORFUL AND CAOTIC ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1
User prompt
Make it just really chaotic
User prompt
Add more stimulents for autism
User prompt
Add more stuff
User prompt
Add more stuff
User prompt
Do it
User prompt
Make more cool stuz
User prompt
Add more cool stuff you suggested in that long list
User prompt
Make the yellow circle of the achievements are in into a red square
User prompt
Add a list of achievements that you have unlocked and other achievements that you need to get
User prompt
I love this add more cool achievements and the other cool stuff you suggested
User prompt
Make the sphere the share text is in make it a square
User prompt
Move the daily rewards and share out of the dogs way
User prompt
Please fix the bug: 'storage.has is not a function. (In 'storage.has('lastDailyReward')', 'storage.has' is undefined)' in or related to this line: 'if (storage.has('lastDailyReward')) {' Line Number: 156 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Can't find variable: storage' in or related to this line: 'var lastDailyReward = null;' Line Number: 155 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ // Dog face class var DogFace = Container.expand(function () { var self = Container.call(this); // Normal face var normalFace = self.attachAsset('dog_normal', { anchorX: 0.5, anchorY: 0.5 }); // React face var reactFace = self.attachAsset('dog_react', { anchorX: 0.5, anchorY: 0.5, alpha: 0 }); // Show normal face self.showNormal = function () { normalFace.alpha = 1; reactFace.alpha = 0; }; // Show react face self.showReact = function () { normalFace.alpha = 0; reactFace.alpha = 1; }; // Flash react face for a short time, then return to normal self.react = function () { self.showReact(); // Return to normal face after 500ms LK.setTimeout(function () { self.showNormal(); // Always teleport dog to center after animation, even if spammed self.x = 2048 / 2; }, 500); }; self.showNormal(); return self; }); // Fart button class var FartButton = Container.expand(function () { var self = Container.call(this); // Button shape var btn = self.attachAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5 }); // "FART" text var fartTxt = new Text2('FART', { size: 120, fill: 0x7A5C00 }); fartTxt.anchor.set(0.5, 0.5); fartTxt.x = 0; fartTxt.y = 0; self.addChild(fartTxt); // Fart cloud effect (hidden by default) var fartCloud = self.attachAsset('centerCircle', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 0.7, x: 0, y: -110, alpha: 0, tint: 0xeeeecc }); fartCloud.width = btn.width * 0.7; fartCloud.height = btn.height * 0.7; // Show fart cloud with animation self.showFartCloud = function () { fartCloud.alpha = 0.85; fartCloud.scaleX = 1.2; fartCloud.scaleY = 0.7; fartCloud.y = -110; tween(fartCloud, { alpha: 0, y: fartCloud.y - 80, scaleX: 1.5, scaleY: 1.1 }, { duration: 420, easing: tween.cubicOut }); }; // Simple press animation self.animatePress = function () { tween(self, { scaleX: 0.92, scaleY: 0.92 }, { duration: 60, easing: tween.cubicIn, onFinish: function onFinish() { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 80, easing: tween.cubicOut }); } }); self.showFartCloud(); }; return self; }); // Person standing and recording class var PersonRecording = Container.expand(function () { var self = Container.call(this); // Single square for the person var personSquare = self.attachAsset('person_leg', { anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xE3F6FF }); /**** * Game Code ****/ // --- Fun: Fart Counter Milestone Popup every 5000 farts --- if (fartCount > 0 && fartCount % 5000 === 0) { var milestonePopup = new Container(); var milestoneBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.3, scaleY: 1.3, x: 2048 / 2, y: 2732 / 2 }); milestonePopup.addChild(milestoneBg); var milestoneTxt = new Text2('Milestone!\n' + fartCount + ' Farts!\nDog is amazed!', { size: 80, fill: 0x7A5C00, align: 'center' }); milestoneTxt.anchor.set(0.5, 0.5); milestoneTxt.x = 2048 / 2; milestoneTxt.y = 2732 / 2 - 40; milestonePopup.addChild(milestoneTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(milestonePopup); }; milestonePopup.addChild(okBtn); game.addChild(milestonePopup); LK.effects.flashObject(milestoneBg, 0xfff7b2, 120); } // --- Achievements: First 100 Farts --- // (Removed: click counter button and handler, as clicks are now counted via the FART button); // --- Leaderboard Button removed ---; // --- Daily Reward System --- // Use storage plugin to track last claim date var lastDailyReward = storage.lastDailyReward || null; var now = Date.now(); var oneDay = 24 * 60 * 60 * 1000; var showDailyReward = false; if (!lastDailyReward || now - lastDailyReward > oneDay) { showDailyReward = true; storage.lastDailyReward = now; } if (showDailyReward) { // Show a popup in the center of the screen var rewardPopup = new Container(); var popupBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.2, scaleY: 1.2, x: 2048 / 2, y: 2732 - 350 //{15} // Move to bottom center, above screen edge }); rewardPopup.addChild(popupBg); var rewardTxt = new Text2('Daily Reward!\n+100 Farts', { size: 90, fill: 0x7A5C00, align: 'center' }); rewardTxt.anchor.set(0.5, 0.5); rewardTxt.x = 2048 / 2; rewardTxt.y = 2732 - 390; rewardPopup.addChild(rewardTxt); var claimBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 - 250 //{1g} // Move claim button below popup, but still above bottom }); var claimTxt = new Text2('Claim!', { size: 70, fill: 0x7A5C00 }); claimTxt.anchor.set(0.5, 0.5); claimTxt.x = 0; claimTxt.y = 0; claimBtn.addChild(claimTxt); claimBtn.interactive = true; claimBtn.down = function () { fartCount += 100; updateUI(); game.removeChild(rewardPopup); LK.effects.flashScreen(0x83de44, 400); }; rewardPopup.addChild(claimBtn); game.addChild(rewardPopup); } // Cartoon dog face (shocked/disgusted) // Big fart button // Fart sound var dogFace = new DogFace(); dogFace.x = 2048 / 2; dogFace.y = 1100; dogFace.lastX = dogFace.x; // Track lastX for edge detection game.addChild(dogFace); // Add person standing and recording at the left side var person = new PersonRecording(); person.x = 400; person.y = 1200; game.addChild(person); // --- Dog sliding and teleport logic --- dogFace.slideSpeed = -12; // Negative: slides left game.update = function () { // Save lastX for edge detection dogFace.lastX = dogFace.x; // Only slide dog left if it is not at the center (prevents repeated sliding after rapid clicks) if (Math.abs(dogFace.x - 2048 / 2) > 1) { dogFace.x += dogFace.slideSpeed; // If dog reaches the left edge, teleport to center and react if (dogFace.lastX > 120 && dogFace.x <= 120) { // Teleport to center dogFace.x = 2048 / 2; // Fun: dog reacts dogFace.react(); // Optional: flash screen for drama LK.effects.flashScreen(0xff0000, 300); } } else { // Always keep dog exactly centered if not sliding dogFace.x = 2048 / 2; } }; // Place fart button below dog face var fartBtn = new FartButton(); fartBtn.x = 2048 / 2; fartBtn.y = 2000; game.addChild(fartBtn); // --- Social Share Button --- // Place to the right of the fart button var shareBtn = LK.getAsset('person_leg', { anchorX: 0.5, anchorY: 0.5, scaleX: 3.2, scaleY: 3.2, x: 2048 - 250, // Move to bottom right, away from dog/fart button y: 2732 - 250 }); var shareTxt = new Text2('Share', { size: 70, fill: 0x7A5C00 }); shareTxt.anchor.set(0.5, 0.5); shareTxt.x = 0; shareTxt.y = 0; shareBtn.addChild(shareTxt); shareBtn.interactive = true; shareBtn.down = function () { // Show a simple popup with share text (simulate share, as we can't use navigator.share) var popup = new Container(); var bg = LK.getAsset('person_leg', { anchorX: 0.5, anchorY: 0.5, scaleX: 7.5, scaleY: 7.5, x: 2048 / 2, y: 2732 / 2 }); popup.addChild(bg); var txt = new Text2('I made my dog react to ' + fartCount + ' farts!\nCan you beat me?\n#FartDog', { size: 70, fill: 0x7A5C00, align: 'center' }); txt.anchor.set(0.5, 0.5); txt.x = 2048 / 2; txt.y = 2732 / 2 - 40; popup.addChild(txt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(popup); }; popup.addChild(okBtn); game.addChild(popup); LK.effects.flashObject(bg, 0xfff7b2, 120); }; game.addChild(shareBtn); // Prevent accidental tap in top left (menu area): nothing is placed there // Instructions text (top center, GUI) var instrTxt = new Text2('Tap the FART button!', { size: 90, fill: 0x2D2D2D }); instrTxt.anchor.set(0.5, 0); LK.gui.top.addChild(instrTxt); // --- Clicker Game State --- var fartCount = 0; var fartPerClick = 1; // Upgrade definitions: [amount, base cost, cost multiplier] // Add Chris upgrade as the last upgrade (can only buy once) var upgrades = [{ amount: 1, base: 10, mult: 1.15, label: "x1" }, { amount: 10, base: 20, mult: 1.18, label: "x10" }, { amount: 50, base: 120, mult: 1.22, label: "x50" }, { amount: 100, base: 600, mult: 1.28, label: "x100" }, { amount: 1000, base: 4000, mult: 1.35, label: "x1000" }, { amount: 0, // Chris doesn't increase fartPerClick, but triggers special effect base: 100000, mult: 1, // Not used, can only buy once label: "Chris (CAT!)" }, { // New John upgrade amount: 10000, // Drastically increase points per click base: 50000, mult: 1, label: "John (BOOST!)" }]; // Track how many times each upgrade was bought var upgradesBought = [0, 0, 0, 0, 0, 0]; // Add slot for Chris // --- UI Elements --- var fartCountTxt = new Text2('Farts: 0', { size: 150, fill: 0x2D2D2D, fontWeight: 'bold' }); // Anchor to top right (right edge, top) fartCountTxt.anchor.set(1, 0); // Place at top right using LK.gui.topRight, which will always fit the right border regardless of device size fartCountTxt.x = 0; fartCountTxt.y = 40; LK.gui.topRight.addChild(fartCountTxt); var fartPerClickTxt = new Text2('Farts/click: 1', { size: 60, fill: 0x444444 }); fartPerClickTxt.anchor.set(0.5, 0); fartPerClickTxt.x = 2048 / 2; fartPerClickTxt.y = 340; LK.gui.top.addChild(fartPerClickTxt); // --- Upgrades UI --- var upgradeButtons = []; var upgradeTxts = []; var upgradeCostTxts = []; var upgradeYStart = 550; var upgradeSpacing = 120; // Shop toggle state var shopVisible = false; // Start with shop closed // Create upgrade shop toggle button var shopBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.45, scaleY: 0.45, // Make square: scaleX and scaleY are equal x: 400, y: upgradeYStart - 120 }); shopBtn.interactive = true; var shopBtnTxt = new Text2('Upgrade Shop', { size: 70, fill: 0x7A5C00 }); shopBtnTxt.anchor.set(0.5, 0.5); shopBtnTxt.x = 0; shopBtnTxt.y = 0; shopBtn.addChild(shopBtnTxt); game.addChild(shopBtn); // Create upgrade buttons (initially hidden) for (var i = 0; i < upgrades.length; ++i) { // Button var btn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.5, scaleY: 0.5, x: 400, y: upgradeYStart + i * upgradeSpacing }); btn.interactive = true; // Label var labelText = i === upgrades.length - 2 ? "John (BOOST!)" : i === upgrades.length - 1 ? "Chris (CAT!)" : 'Upgrade ' + upgrades[i].label; var txt = new Text2(labelText, { size: 60, fill: 0x7A5C00 }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = -20; btn.addChild(txt); // Cost var costTxt = new Text2('', { size: 44, fill: 0x444444 }); costTxt.anchor.set(0.5, 0.5); costTxt.x = 0; costTxt.y = 50; btn.addChild(costTxt); // Add to game game.addChild(btn); btn.visible = false; // Hide upgrade buttons initially upgradeButtons.push(btn); upgradeTxts.push(txt); upgradeCostTxts.push(costTxt); } // --- Chris Cat Upgrade State --- var chrisCatSpawned = false; var chrisCatContainer = null; // --- John Upgrade State --- var johnSpawned = false; var johnContainer = null; // Shop toggle logic shopBtn.down = function (x, y, obj) { shopVisible = !shopVisible; for (var i = 0; i < upgradeButtons.length; ++i) { upgradeButtons[i].visible = shopVisible; } // Feedback: flash the shop button LK.effects.flashObject(shopBtn, 0xfff7b2, 120); }; // --- Helper: Calculate upgrade cost --- function getUpgradeCost(idx) { var u = upgrades[idx]; var n = upgradesBought[idx]; // Exponential cost scaling return idx === upgrades.length - 1 ? 100000 : Math.floor(u.base * Math.pow(u.mult, n)); } // --- Helper: Update all UI --- function updateUI() { fartCountTxt.setText('Farts: ' + fartCount); fartPerClickTxt.setText('Farts/click: ' + fartPerClick); for (var i = 0; i < upgrades.length; ++i) { var cost = getUpgradeCost(i); // Special handling for Chris and John upgrades (last two) upgradeCostTxts[i].setText('Cost: ' + (isNaN(cost) || cost === Infinity ? '100,000' : cost)); upgradeButtons[i].alpha = fartCount >= cost ? 1 : 0.5; upgradeButtons[i].interactive = fartCount >= cost; } // Show cat if Chris bought if (chrisCatSpawned && chrisCatContainer && !chrisCatContainer.parent) { game.addChild(chrisCatContainer); } // Show John if bought if (johnSpawned && johnContainer && !johnContainer.parent) { game.addChild(johnContainer); } } updateUI(); // --- Upgrade Button Handlers --- for (var i = 0; i < upgrades.length; ++i) { (function (idx) { upgradeButtons[idx].down = function (x, y, obj) { var cost = getUpgradeCost(idx); // Chris upgrade (last one) if (idx === upgrades.length - 1) { if (fartCount >= cost) { fartCount -= cost; upgradesBought[idx]++; // Spawn cat if (!chrisCatSpawned) { chrisCatSpawned = true; // Create cat container chrisCatContainer = new Container(); // Use Chris asset for cat body var catBody = LK.getAsset('Chris', { anchorX: 0.5, anchorY: 0.5, scaleX: 3.2, scaleY: 2.2 }); chrisCatContainer.addChild(catBody); // Cat face (text) - Removed // var catFace = new Text2('😼', { // size: 160, // fill: 0x222222 // }); // catFace.anchor.set(0.5, 0.5); // catFace.x = 0; // catFace.y = -10; // chrisCatContainer.addChild(catFace); // Cat label var catLabel = new Text2('Chris the Cat!', { size: 60, fill: 0x444444 }); catLabel.anchor.set(0.5, 0); catLabel.x = 0; catLabel.y = 110; chrisCatContainer.addChild(catLabel); // Place cat right under the fart button chrisCatContainer.x = 2048 / 2; chrisCatContainer.y = 2000 + 170; // Position below fart button game.addChild(chrisCatContainer); // Animate cat in chrisCatContainer.alpha = 0; tween(chrisCatContainer, { alpha: 1 }, { duration: 600, easing: tween.cubicOut }); // Drastically increase auto fart rate: multiply all autoClickers' amount by 5 for (var aci = 0; aci < autoClickers.length; ++aci) { autoClickers[aci].amount *= 5; } // If any autoClicker is already running, clear and restart to apply new rate for (var aci = 0; aci < autoClickers.length; ++aci) { if (autoClickersBought[aci] > 0 && autoClickerTimers[aci]) { LK.clearInterval(autoClickerTimers[aci]); (function (aci2) { autoClickerTimers[aci2] = LK.setInterval(function () { fartCount += autoClickers[aci2].amount * autoClickersBought[aci2] * fartPerClick; updateUI(); dogFace.react(); // Dog says a random gross word if (!dogFace.speechBubble) { var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } var grossWords = ["Yuck!", "Ew!", "Disgusting!", "Nasty!", "Foul!", "Repulsive!", "Stinky!", "Revolting!", "Pee-yew!", "Ugh!", "Gross!", "Barf!", "Ick!", "Putrid!", "Rank!", "Vile!", "Sickening!", "Odious!", "No way!", "Bleh!", "Cringe!", "Yikes!", "Gag!", "Pungent!", "Awful!", "Horrid!", "Stench!", "What is that?!", "Oh no!", "Why?!", "Ewww!", "Yeesh!", "Blech!", "GROSS!", "Noxious!", "Obnoxious!", "Yowza!", "Oof!", "Gnar!", "Yow!", "Eek!", "Yowch!", "Ooze!", "Funky!", "Rancid!", "Rotten!", "Whew!", "Stank!", "Phew!", "GROSS-out!", "Repugnant!", "Skunky!", "Malodorous!", "Putrescent!", "Fetid!", "Mephitic!", "Moldy!", "Dank!", "Manky!", "Cruddy!", "Crud!", "Yuuuck!", "Ew, dude!", "Stale!", "Funky town!", "Reek!", "Stale cheese!", "Cheesy!", "Mold!", "Ew, stinky!", "Ew, gross!", "Ew, nasty!", "Ew, barf!", "Ew, icky!", "Ew, yuck!", "Ew, blech!", "Ew, pew!", "Ew, phew!", "Ew, stank!", "Ew, rotten!", "Ew, rancid!", "Ew, vile!", "Ew, sick!", "Ew, odious!", "Ew, horrid!", "Ew, foul!", "Ew, revolting!", "Ew, repulsive!", "Ew, stench!", "Ew, noxious!", "Ew, obnoxious!", "Ew, gnarly!", "Ew, yowza!", "Ew, oof!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, whew!", "Ew, gross-out!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, stank!", "Ew, phew!", "Ew, barf!", "Ew, ick!", "Ew, putrid!", "Ew, rank!", "Ew, vile!", "Ew, sickening!", "Ew, odious!", "Ew, bleh!", "Ew, gross!", "Ew, stench!", "Ew, no way!", "Ew, yuck!", "Ew, ewww!", "Ew, blech!", "Ew, GROSS!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, ewww!", "Ew, yeesh!", "Ew, blech!", "Ew, GROSS!", "Ew, noxious!", "Ew, obnoxious!", "Ew, yowza!", "Ew, oof!", "Ew, gnar!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, rancid!", "Ew, rotten!", "Ew, whew!", "Ew, stank!", "Ew, phew!", "Ew, GROSS-out!"]; var word = grossWords[Math.floor(Math.random() * grossWords.length)]; dogFace.speechBubble.setText(word); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 900, delay: 500, easing: tween.cubicIn }); dogFace.x = 2048 / 2; dogFace.lastX = dogFace.x; LK.getSound('fart_snd').play(); }, autoClickers[aci2].interval); })(aci); } } } updateUI(); LK.effects.flashObject(upgradeButtons[idx], 0xeeeecc, 120); } return; } // John upgrade (second last one) if (idx === upgrades.length - 2) { if (fartCount >= cost) { fartCount -= cost; upgradesBought[idx]++; // Spawn John if (!johnSpawned) { johnSpawned = true; // Create John container johnContainer = new Container(); // Use John asset for body var johnBody = LK.getAsset('John', { anchorX: 0.5, anchorY: 0.5, scaleX: 3.2, scaleY: 2.2 }); johnContainer.addChild(johnBody); // John label var johnLabel = new Text2('John the Booster!', { size: 60, fill: 0x444444 }); johnLabel.anchor.set(0.5, 0); johnLabel.x = 0; johnLabel.y = 110; johnContainer.addChild(johnLabel); // Place John next to Chris under the fart button johnContainer.x = 2048 / 2 + 150; // Position John next to Chris johnContainer.y = 2000 + 170; // Align with Chris's Y position game.addChild(johnContainer); // Animate John in johnContainer.alpha = 0; tween(johnContainer, { alpha: 1 }, { duration: 600, easing: tween.cubicOut }); } updateUI(); LK.effects.flashObject(upgradeButtons[idx], 0xeeeecc, 120); } return; } // Normal upgrades if (fartCount >= cost) { fartCount -= cost; upgradesBought[idx]++; fartPerClick += upgrades[idx].amount; updateUI(); // Feedback LK.effects.flashObject(upgradeButtons[idx], 0xeeeecc, 120); } }; })(i); } // --- Fart Button Handler (Clicker) --- fartBtn.down = function (x, y, obj) { // Animate button fartBtn.animatePress(); // Button color flash for feedback LK.effects.flashObject(fartBtn, 0xfff7b2, 120); // Play fart sound LK.getSound('fart_snd').play(); // Dog reacts // --- Fun: Randomize dog face (normal, react, or silly) and rare golden fart event --- var goldenFart = false; if (Math.random() < 0.01) { // 1% chance for golden fart goldenFart = true; fartCount += 1000; // Golden fart effect: flash screen gold, show special text LK.effects.flashScreen(0xffe066, 800); if (!dogFace.speechBubble) { var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } dogFace.speechBubble.setText("💛 GOLDEN FART! 💛\n+1000 Farts!"); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 1200, delay: 800, easing: tween.cubicIn }); // Dog face flashes gold tween(dogFace, { alpha: 0.5 }, { duration: 100, yoyo: true, repeat: 1, onFinish: function onFinish() { dogFace.alpha = 1; } }); } else { // 10% chance for silly face (react stays longer) if (Math.random() < 0.1) { dogFace.showReact(); LK.setTimeout(function () { dogFace.showNormal(); dogFace.x = 2048 / 2; }, 1200); } else { dogFace.react(); } } // Dog says a random synonym for 'gross' if (!dogFace.speechBubble) { // Create speech bubble if not already present var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } var grossWords = ["Yuck!", "Ew!", "Disgusting!", "Nasty!", "Foul!", "Repulsive!", "Stinky!", "Revolting!", "Pee-yew!", "Ugh!", "Gross!", "Barf!", "Ick!", "Putrid!", "Rank!", "Vile!", "Sickening!", "Odious!", "No way!", "Bleh!", "Cringe!", "Yikes!", "Gag!", "Pungent!", "Awful!", "Horrid!", "Stench!", "What is that?!", "Oh no!", "Why?!", "Ewww!", "Yeesh!", "Blech!", "GROSS!", "Noxious!", "Obnoxious!", "Yowza!", "Oof!", "Gnar!", "Yow!", "Eek!", "Yowch!", "Ooze!", "Funky!", "Rancid!", "Rotten!", "Whew!", "Stank!", "Phew!", "GROSS-out!", // More synonyms "Repugnant!", "Skunky!", "Malodorous!", "Putrescent!", "Fetid!", "Mephitic!", "Moldy!", "Dank!", "Manky!", "Cruddy!", "Crud!", "Yuuuck!", "Ew, dude!", "Stale!", "Funky town!", "Reek!", "Stale cheese!", "Cheesy!", "Mold!", "Ew, stinky!", "Ew, gross!", "Ew, nasty!", "Ew, barf!", "Ew, icky!", "Ew, yuck!", "Ew, blech!", "Ew, pew!", "Ew, phew!", "Ew, stank!", "Ew, rotten!", "Ew, rancid!", "Ew, vile!", "Ew, sick!", "Ew, odious!", "Ew, horrid!", "Ew, foul!", "Ew, revolting!", "Ew, repulsive!", "Ew, stench!", "Ew, noxious!", "Ew, obnoxious!", "Ew, gnarly!", "Ew, yowza!", "Ew, oof!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, whew!", "Ew, gross-out!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, stank!", "Ew, phew!", "Ew, barf!", "Ew, ick!", "Ew, putrid!", "Ew, rank!", "Ew, vile!", "Ew, sickening!", "Ew, odious!", "Ew, bleh!", "Ew, gross!", "Ew, stench!", "Ew, no way!", "Ew, yuck!", "Ew, ewww!", "Ew, blech!", "Ew, GROSS!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, ewww!", "Ew, yeesh!", "Ew, blech!", "Ew, GROSS!", "Ew, noxious!", "Ew, obnoxious!", "Ew, yowza!", "Ew, oof!", "Ew, gnar!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, rancid!", "Ew, rotten!", "Ew, whew!", "Ew, stank!", "Ew, phew!", "Ew, GROSS-out!"]; var word = grossWords[Math.floor(Math.random() * grossWords.length)]; dogFace.speechBubble.setText(word); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 900, delay: 500, easing: tween.cubicIn }); // Dog teleports to center and stops sliding for a moment dogFace.x = 2048 / 2; dogFace.lastX = dogFace.x; // --- Fun: Rare rainbow fart event (0.5% chance) --- if (Math.random() < 0.005) { // Rainbow fart: flash screen rainbow, show rainbow text, dog face rainbow overlay var rainbowColors = [0xff0000, 0xffa500, 0xffff00, 0x00ff00, 0x0000ff, 0x4b0082, 0xee82ee]; var idx = 0; var _rainbowFlash = function rainbowFlash() { if (idx >= rainbowColors.length) return; LK.effects.flashScreen(rainbowColors[idx], 120); idx++; LK.setTimeout(_rainbowFlash, 120); }; _rainbowFlash(); if (!dogFace.speechBubble) { var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } dogFace.speechBubble.setText("🌈 RAINBOW FART! 🌈"); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 1200, delay: 800, easing: tween.cubicIn }); // Rainbow overlay on dog face if (!dogFace.rainbowOverlay) { dogFace.rainbowOverlay = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 8, scaleY: 8, x: 0, y: 0, alpha: 0.4, tint: 0xffffff }); dogFace.addChild(dogFace.rainbowOverlay); } dogFace.rainbowOverlay.alpha = 0.7; var rainbowIdx = 0; var _rainbowTint = function rainbowTint() { if (rainbowIdx >= rainbowColors.length) { dogFace.rainbowOverlay.alpha = 0; return; } dogFace.rainbowOverlay.tint = rainbowColors[rainbowIdx]; rainbowIdx++; LK.setTimeout(_rainbowTint, 120); }; _rainbowTint(); } // Add farts according to multiplier! fartCount += fartPerClick; // --- Fun: Every 25th fart, dog face gets a random color for a while --- if (fartCount > 0 && fartCount % 25 === 0) { // Pick a fun random color (not too dark) var funColors = [0xffb347, 0x7ec850, 0x4fc3f7, 0xf06292, 0xffeb3b, 0x9c27b0, 0xff5722, 0x00bcd4, 0x8bc34a, 0xe91e63]; var color = funColors[Math.floor(Math.random() * funColors.length)]; // Animate both faces if present if (dogFace.children && dogFace.children.length > 0) { for (var i = 0; i < dogFace.children.length; ++i) { if (dogFace.children[i] && typeof dogFace.children[i].tint !== "undefined") { var facePart = dogFace.children[i]; var oldTint = facePart.tint; facePart.tint = color; // Animate back to normal after 1.2s LK.setTimeout(function (part, tint) { return function () { part.tint = tint; }; }(facePart, oldTint), 1200); } } } } // --- Fun: Every 50th fart, dog gets a random hat or glasses for a while --- if (fartCount > 0 && fartCount % 50 === 0) { if (!dogFace.accessory) { dogFace.accessory = new Container(); dogFace.addChild(dogFace.accessory); } // Remove old accessory dogFace.accessory.removeChildren(); var accType = Math.random() < 0.5 ? "hat" : "glasses"; if (accType === "hat") { // Use person_phone as a silly hat var hat = LK.getAsset('person_phone', { anchorX: 0.5, anchorY: 1, scaleX: 2.2, scaleY: 1.2, x: 0, y: -420, tint: 0x7A5C00 }); dogFace.accessory.addChild(hat); } else { // Use person_leg as glasses var glasses = LK.getAsset('person_leg', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.2, scaleY: 0.4, x: 0, y: -120, tint: 0x222222 }); dogFace.accessory.addChild(glasses); } // Remove accessory after 2 seconds LK.setTimeout(function () { if (dogFace.accessory) dogFace.accessory.removeChildren(); }, 2000); } // --- Fun: Every 75th fart, dog face flips upside down for a moment --- if (fartCount > 0 && fartCount % 75 === 0) { // Animate dog face rotation to upside down and back tween(dogFace, { rotation: Math.PI }, { duration: 220, easing: tween.cubicIn, onFinish: function onFinish() { LK.setTimeout(function () { tween(dogFace, { rotation: 0 }, { duration: 220, easing: tween.cubicOut }); }, 900); } }); } updateUI(); // --- Fun: Every 200th fart, dog barks and screen shakes --- if (fartCount > 0 && fartCount % 200 === 0) { // Bark text if (!dogFace.speechBubble) { var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } dogFace.speechBubble.setText("🐶 WOOF! 🐶"); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 900, delay: 500, easing: tween.cubicIn }); // Screen shake effect var shakeTimes = 10; var _shake = function shake(n) { if (n <= 0) { game.x = 0; return; } game.x = n % 2 === 0 ? 20 : -20; LK.setTimeout(function () { _shake(n - 1); }, 30); }; _shake(shakeTimes); } // --- Achievements: First 100 Farts --- if (!window._first100FartsShown && fartCount >= 100) { window._first100FartsShown = true; // Show achievement popup var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\nFirst 100 Farts!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Achievements: 1000 Farts --- if (!window._first1000FartsShown && fartCount >= 1000) { window._first1000FartsShown = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\n1000 Farts!\nDog is a Fart Legend!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Achievements: 10,000 Farts --- if (!window._first10kFartsShown && fartCount >= 10000) { window._first10kFartsShown = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\n10,000 Farts!\nDog is a Fart GOD!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Achievements: 1,000,000 Farts --- if (!window._first1MFartsShown && fartCount >= 1000000) { window._first1MFartsShown = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\n1,000,000 Farts!\nDog Ascends to Fart Heaven!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Fun: Achievement for first time dog hits left edge (teleport) --- if (!window._firstDogTeleport && dogFace.lastX > 120 && dogFace.x <= 120) { window._firstDogTeleport = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\nDog Teleport!\nYou made the dog run away!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Fun: Achievement for buying Chris the Cat --- if (!window._chrisCatAchievement && chrisCatSpawned) { window._chrisCatAchievement = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\nChris the Cat!\nFeline Fart Power!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } // --- Fun: Achievement for buying John the Booster --- if (!window._johnAchievement && johnSpawned) { window._johnAchievement = true; var achPopup = new Container(); var achBg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1, x: 2048 / 2, y: 2732 / 2 }); achPopup.addChild(achBg); var achTxt = new Text2('Achievement Unlocked!\nJohn the Booster!\nFart Power Overload!', { size: 80, fill: 0x7A5C00, align: 'center' }); achTxt.anchor.set(0.5, 0.5); achTxt.x = 2048 / 2; achTxt.y = 2732 / 2 - 40; achPopup.addChild(achTxt); var okBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 120 }); var okTxt = new Text2('OK', { size: 70, fill: 0x7A5C00 }); okTxt.anchor.set(0.5, 0.5); okTxt.x = 0; okTxt.y = 0; okBtn.addChild(okTxt); okBtn.interactive = true; okBtn.down = function () { game.removeChild(achPopup); }; achPopup.addChild(okBtn); game.addChild(achPopup); LK.effects.flashObject(achBg, 0xfff7b2, 120); } }; // Make the button big and easy to tap: handle press anywhere on the button fartBtn.interactive = true; // --- Auto Clicker Upgrades --- // Each auto clicker has: label, base cost, cost multiplier, interval (ms), amount per tick var autoClickers = [{ label: "Auto 1s", base: 100, mult: 1.18, interval: 1000, amount: 1 }, { label: "Auto 0.5s", base: 500, mult: 1.22, interval: 500, amount: 2 }, { label: "Auto 0.2s", base: 2000, mult: 1.28, interval: 200, amount: 5 }]; var autoClickersBought = [0, 0, 0]; var autoClickerTimers = [null, null, null]; // --- UI for Auto Clickers --- var autoClickerButtons = []; var autoClickerTxts = []; var autoClickerCostTxts = []; var autoClickerYStart = upgradeYStart + upgrades.length * upgradeSpacing + 80; var autoClickerSpacing = 120; for (var i = 0; i < autoClickers.length; ++i) { var btn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.5, scaleY: 0.5, x: 400, y: autoClickerYStart + i * autoClickerSpacing }); btn.interactive = true; var txt = new Text2(autoClickers[i].label, { size: 60, fill: 0x7A5C00 }); txt.anchor.set(0.5, 0.5); txt.x = 0; txt.y = -20; btn.addChild(txt); var costTxt = new Text2('', { size: 44, fill: 0x444444 }); costTxt.anchor.set(0.5, 0.5); costTxt.x = 0; costTxt.y = 50; btn.addChild(costTxt); game.addChild(btn); btn.visible = false; autoClickerButtons.push(btn); autoClickerTxts.push(txt); autoClickerCostTxts.push(costTxt); } // --- Helper: Calculate auto clicker cost --- function getAutoClickerCost(idx) { var ac = autoClickers[idx]; var n = autoClickersBought[idx]; return Math.floor(ac.base * Math.pow(ac.mult, n)); } // --- Update UI: add auto clickers --- var _oldUpdateUI = updateUI; updateUI = function updateUI() { _oldUpdateUI(); for (var i = 0; i < autoClickers.length; ++i) { var cost = getAutoClickerCost(i); autoClickerCostTxts[i].setText('Cost: ' + cost + ' | Owned: ' + autoClickersBought[i]); if (fartCount >= cost) { autoClickerButtons[i].alpha = 1; } else { autoClickerButtons[i].alpha = 0.5; } } }; // --- Shop toggle: show/hide auto clickers too --- var _oldShopBtnDown = shopBtn.down; shopBtn.down = function (x, y, obj) { _oldShopBtnDown(x, y, obj); for (var i = 0; i < autoClickerButtons.length; ++i) { autoClickerButtons[i].visible = shopVisible; } }; // --- Auto Clicker Button Handlers --- for (var i = 0; i < autoClickers.length; ++i) { (function (idx) { autoClickerButtons[idx].down = function (x, y, obj) { var cost = getAutoClickerCost(idx); if (fartCount >= cost) { fartCount -= cost; autoClickersBought[idx]++; updateUI(); LK.effects.flashObject(autoClickerButtons[idx], 0xeeeecc, 120); // If this is the first purchase, start the timer if (autoClickersBought[idx] === 1) { autoClickerTimers[idx] = LK.setInterval(function () { // Each auto clicker tick: add (amount * owned * fartPerClick) to fartCount fartCount += autoClickers[idx].amount * autoClickersBought[idx] * fartPerClick; updateUI(); // Fun: dog reacts every time dogFace.react(); // Dog says a random synonym for 'gross' (same as fartBtn.down) if (!dogFace.speechBubble) { // Create speech bubble if not already present var bubble = new Text2('', { size: 90, fill: 0xffffff, stroke: 0x222222, strokeThickness: 8, wordWrap: true, wordWrapWidth: 600, align: 'center' }); bubble.anchor.set(0.5, 1); bubble.x = 0; bubble.y = -420; bubble.alpha = 0; dogFace.addChild(bubble); dogFace.speechBubble = bubble; } var grossWords = ["Yuck!", "Ew!", "Disgusting!", "Nasty!", "Foul!", "Repulsive!", "Stinky!", "Revolting!", "Pee-yew!", "Ugh!", "Gross!", "Barf!", "Ick!", "Putrid!", "Rank!", "Vile!", "Sickening!", "Odious!", "No way!", "Bleh!", "Cringe!", "Yikes!", "Gag!", "Pungent!", "Awful!", "Horrid!", "Stench!", "What is that?!", "Oh no!", "Why?!", "Ewww!", "Yeesh!", "Blech!", "GROSS!", "Noxious!", "Obnoxious!", "Yowza!", "Oof!", "Gnar!", "Yow!", "Eek!", "Yowch!", "Ooze!", "Funky!", "Rancid!", "Rotten!", "Whew!", "Stank!", "Phew!", "GROSS-out!", // More synonyms "Repugnant!", "Skunky!", "Malodorous!", "Putrescent!", "Fetid!", "Mephitic!", "Moldy!", "Dank!", "Manky!", "Cruddy!", "Crud!", "Yuuuck!", "Ew, dude!", "Stale!", "Funky town!", "Reek!", "Stale cheese!", "Cheesy!", "Mold!", "Ew, stinky!", "Ew, gross!", "Ew, nasty!", "Ew, barf!", "Ew, icky!", "Ew, yuck!", "Ew, blech!", "Ew, pew!", "Ew, phew!", "Ew, stank!", "Ew, rotten!", "Ew, rancid!", "Ew, vile!", "Ew, sick!", "Ew, odious!", "Ew, horrid!", "Ew, foul!", "Ew, revolting!", "Ew, repulsive!", "Ew, stench!", "Ew, noxious!", "Ew, obnoxious!", "Ew, gnarly!", "Ew, yowza!", "Ew, oof!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, whew!", "Ew, gross-out!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, stank!", "Ew, phew!", "Ew, barf!", "Ew, ick!", "Ew, putrid!", "Ew, rank!", "Ew, vile!", "Ew, sickening!", "Ew, odious!", "Ew, bleh!", "Ew, gross!", "Ew, stench!", "Ew, no way!", "Ew, yuck!", "Ew, ewww!", "Ew, blech!", "Ew, GROSS!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, yeesh!", "Ew, yikes!", "Ew, cringe!", "Ew, gag!", "Ew, pungent!", "Ew, awful!", "Ew, horrid!", "Ew, stench!", "Ew, what is that?!", "Ew, oh no!", "Ew, why?!", "Ew, ewww!", "Ew, yeesh!", "Ew, blech!", "Ew, GROSS!", "Ew, noxious!", "Ew, obnoxious!", "Ew, yowza!", "Ew, oof!", "Ew, gnar!", "Ew, yow!", "Ew, eek!", "Ew, yowch!", "Ew, ooze!", "Ew, funky!", "Ew, rancid!", "Ew, rotten!", "Ew, whew!", "Ew, stank!", "Ew, phew!", "Ew, GROSS-out!"]; var word = grossWords[Math.floor(Math.random() * grossWords.length)]; dogFace.speechBubble.setText(word); dogFace.speechBubble.alpha = 1; tween(dogFace.speechBubble, { alpha: 0 }, { duration: 900, delay: 500, easing: tween.cubicIn }); // Dog teleports to center and stops sliding for a moment dogFace.x = 2048 / 2; dogFace.lastX = dogFace.x; LK.getSound('fart_snd').play(); }, autoClickers[idx].interval); } } }; })(i); } // --- Simple Click Counter Button --- // (Removed: click counter button and handler, as clicks are now counted via the FART button); // --- Leaderboard Button removed ---; // --- Achievements List UI --- // Define all achievements with their unlock condition and description var achievements = [{ key: "first100Farts", name: "First 100 Farts", desc: "Reach 100 farts.", unlocked: function unlocked() { return fartCount >= 100 || !!window._first100FartsShown; } }, { key: "first1000Farts", name: "Fart Legend", desc: "Reach 1,000 farts.", unlocked: function unlocked() { return fartCount >= 1000 || !!window._first1000FartsShown; } }, { key: "first10kFarts", name: "Fart GOD", desc: "Reach 10,000 farts.", unlocked: function unlocked() { return fartCount >= 10000 || !!window._first10kFartsShown; } }, { key: "first1MFarts", name: "Fart Heaven", desc: "Reach 1,000,000 farts.", unlocked: function unlocked() { return fartCount >= 1000000 || !!window._first1MFartsShown; } }, { key: "dogTeleport", name: "Dog Teleport", desc: "Make the dog run away (hit left edge).", unlocked: function unlocked() { return !!window._firstDogTeleport; } }, { key: "chrisCat", name: "Chris the Cat", desc: "Buy Chris the Cat upgrade.", unlocked: function unlocked() { return chrisCatSpawned || !!window._chrisCatAchievement; } }, { key: "johnBooster", name: "John the Booster", desc: "Buy John the Booster upgrade.", unlocked: function unlocked() { return johnSpawned || !!window._johnAchievement; } }]; // Achievements list popup container (hidden by default) var achievementsPopup = null; // Achievements button (bottom left, out of dog's way) var achievementsBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.6, scaleY: 0.6, x: 180, y: 2732 - 220 }); var achievementsBtnTxt = new Text2('Achievements', { size: 54, fill: 0x7A5C00 }); achievementsBtnTxt.anchor.set(0.5, 0.5); achievementsBtnTxt.x = 0; achievementsBtnTxt.y = 0; achievementsBtn.addChild(achievementsBtnTxt); achievementsBtn.interactive = true; game.addChild(achievementsBtn); // Show/hide achievements popup achievementsBtn.down = function () { if (achievementsPopup && achievementsPopup.parent) { game.removeChild(achievementsPopup); return; } if (achievementsPopup) { game.addChild(achievementsPopup); updateAchievementsList(); return; } // Create popup achievementsPopup = new Container(); var bg = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 2.7, x: 2048 / 2, y: 2732 / 2 }); achievementsPopup.addChild(bg); var title = new Text2('Achievements', { size: 90, fill: 0x7A5C00, align: 'center' }); title.anchor.set(0.5, 0); title.x = 2048 / 2; title.y = 2732 / 2 - 540; achievementsPopup.addChild(title); // List container var listY = 2732 / 2 - 400; achievementsPopup.achRows = []; for (var i = 0; i < achievements.length; ++i) { var ach = achievements[i]; var row = new Container(); row.x = 2048 / 2 - 500; row.y = listY + i * 120; var status = new Text2('', { size: 60, fill: 0x7A5C00 }); status.anchor.set(0, 0.5); status.x = 0; status.y = 0; row.status = status; row.addChild(status); var name = new Text2(ach.name, { size: 60, fill: 0x222222 }); name.anchor.set(0, 0.5); name.x = 90; name.y = 0; row.addChild(name); var desc = new Text2(ach.desc, { size: 38, fill: 0x444444 }); desc.anchor.set(0, 0.5); desc.x = 90; desc.y = 38; row.addChild(desc); achievementsPopup.addChild(row); achievementsPopup.achRows.push(row); } // Close button var closeBtn = LK.getAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.7, scaleY: 0.7, x: 2048 / 2, y: 2732 / 2 + 600 }); var closeTxt = new Text2('Close', { size: 70, fill: 0x7A5C00 }); closeTxt.anchor.set(0.5, 0.5); closeTxt.x = 0; closeTxt.y = 0; closeBtn.addChild(closeTxt); closeBtn.interactive = true; closeBtn.down = function () { game.removeChild(achievementsPopup); }; achievementsPopup.addChild(closeBtn); game.addChild(achievementsPopup); updateAchievementsList(); }; // Helper to update achievements list UI function updateAchievementsList() { if (!achievementsPopup || !achievementsPopup.achRows) return; for (var i = 0; i < achievements.length; ++i) { var ach = achievements[i]; var row = achievementsPopup.achRows[i]; // Remove old background if present if (row.achBg) { row.removeChild(row.achBg); row.achBg = null; } // Add red square background behind status icon var achBg = LK.getAsset('person_leg', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.2, scaleY: 1.2, x: 30, y: 0, tint: 0xd83318 // strong red }); row.addChildAt(achBg, 0); row.achBg = achBg; if (ach.unlocked()) { row.status.setText("✔️"); row.status.fill = 0x83de44; row.alpha = 1; } else { row.status.setText("❌"); row.status.fill = 0xcd544e; row.alpha = 0.5; } } } // Update achievements list UI whenever UI updates var _oldUpdateUI_ach = updateUI; updateUI = function updateUI() { _oldUpdateUI_ach(); updateAchievementsList(); };
===================================================================
--- original.js
+++ change.js
@@ -132,9 +132,54 @@
/****
* Game Code
****/
-// --- Simple Click Counter Button ---
+// --- Fun: Fart Counter Milestone Popup every 5000 farts ---
+if (fartCount > 0 && fartCount % 5000 === 0) {
+ var milestonePopup = new Container();
+ var milestoneBg = LK.getAsset('fart_btn', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 1.3,
+ scaleY: 1.3,
+ x: 2048 / 2,
+ y: 2732 / 2
+ });
+ milestonePopup.addChild(milestoneBg);
+ var milestoneTxt = new Text2('Milestone!\n' + fartCount + ' Farts!\nDog is amazed!', {
+ size: 80,
+ fill: 0x7A5C00,
+ align: 'center'
+ });
+ milestoneTxt.anchor.set(0.5, 0.5);
+ milestoneTxt.x = 2048 / 2;
+ milestoneTxt.y = 2732 / 2 - 40;
+ milestonePopup.addChild(milestoneTxt);
+ var okBtn = LK.getAsset('fart_btn', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 0.7,
+ scaleY: 0.7,
+ x: 2048 / 2,
+ y: 2732 / 2 + 120
+ });
+ var okTxt = new Text2('OK', {
+ size: 70,
+ fill: 0x7A5C00
+ });
+ okTxt.anchor.set(0.5, 0.5);
+ okTxt.x = 0;
+ okTxt.y = 0;
+ okBtn.addChild(okTxt);
+ okBtn.interactive = true;
+ okBtn.down = function () {
+ game.removeChild(milestonePopup);
+ };
+ milestonePopup.addChild(okBtn);
+ game.addChild(milestonePopup);
+ LK.effects.flashObject(milestoneBg, 0xfff7b2, 120);
+}
+// --- Achievements: First 100 Farts ---
// (Removed: click counter button and handler, as clicks are now counted via the FART button);
// --- Leaderboard Button removed ---;
// --- Daily Reward System ---
// Use storage plugin to track last claim date
@@ -815,8 +860,30 @@
_rainbowTint();
}
// Add farts according to multiplier!
fartCount += fartPerClick;
+ // --- Fun: Every 25th fart, dog face gets a random color for a while ---
+ if (fartCount > 0 && fartCount % 25 === 0) {
+ // Pick a fun random color (not too dark)
+ var funColors = [0xffb347, 0x7ec850, 0x4fc3f7, 0xf06292, 0xffeb3b, 0x9c27b0, 0xff5722, 0x00bcd4, 0x8bc34a, 0xe91e63];
+ var color = funColors[Math.floor(Math.random() * funColors.length)];
+ // Animate both faces if present
+ if (dogFace.children && dogFace.children.length > 0) {
+ for (var i = 0; i < dogFace.children.length; ++i) {
+ if (dogFace.children[i] && typeof dogFace.children[i].tint !== "undefined") {
+ var facePart = dogFace.children[i];
+ var oldTint = facePart.tint;
+ facePart.tint = color;
+ // Animate back to normal after 1.2s
+ LK.setTimeout(function (part, tint) {
+ return function () {
+ part.tint = tint;
+ };
+ }(facePart, oldTint), 1200);
+ }
+ }
+ }
+ }
// --- Fun: Every 50th fart, dog gets a random hat or glasses for a while ---
if (fartCount > 0 && fartCount % 50 === 0) {
if (!dogFace.accessory) {
dogFace.accessory = new Container();
@@ -854,8 +921,28 @@
LK.setTimeout(function () {
if (dogFace.accessory) dogFace.accessory.removeChildren();
}, 2000);
}
+ // --- Fun: Every 75th fart, dog face flips upside down for a moment ---
+ if (fartCount > 0 && fartCount % 75 === 0) {
+ // Animate dog face rotation to upside down and back
+ tween(dogFace, {
+ rotation: Math.PI
+ }, {
+ duration: 220,
+ easing: tween.cubicIn,
+ onFinish: function onFinish() {
+ LK.setTimeout(function () {
+ tween(dogFace, {
+ rotation: 0
+ }, {
+ duration: 220,
+ easing: tween.cubicOut
+ });
+ }, 900);
+ }
+ });
+ }
updateUI();
// --- Fun: Every 200th fart, dog barks and screen shakes ---
if (fartCount > 0 && fartCount % 200 === 0) {
// Bark text