User prompt
Add a button to reset your ending count
User prompt
Add new endings: Quit ending: quit when you see that your roast is ruined and get a job at either Krusty Burger or Jerry's bait shop (each one a different ending); Play Pokemon: play Pokemon on your 3DS while eating lunch with Chalmers. Pee yourself ending: pee yourself when chalmers is suspicious of your actions
User prompt
Add new endings: Loud music ending: play loud music in the entire neighborhood while talking about your old family recipe! Swear ending: swear at superintendent Chalmers in all of the times he's suspicious of you, however, this is highly not recommended. Admit it was from reddit ending: while talking about your old family recipe, you can always admit that it's from reddit (AKA the truth)
User prompt
Add 4 new endings of your choice
User prompt
Make bubblegum ending choice and scammed ending choice visible
User prompt
Add support for 4 endings
User prompt
Make the buttons small enough to fit 2 of them per row
User prompt
Add new endings: Bubblegum ending: eat bubble gum during the luncheon to piss Chalmers off and get fired. Scammed ending: at the start, you can buy roasted beef online, but you will get scammed, causing you to not have enough money to buy fast food. Kill Chalmers: When in the reddit ending, you can actually kill Chalmers if you tap the red button exactly 17 times
User prompt
Allow the Burnt roast ending to activate more than once
User prompt
Increase the chance of the Burnt roast ending to 25% and you can now get it more than once
User prompt
Add new endings: Burnt Roast Ending: there is a 10% chance, instead of making progress, the roast just burns and you get this embarrassing ending. Reddit ending: You say that you learned your recipe from reddit, but chalmers knows nobody can trust redditors, so he fires you. Death ending: you DIE from the FIRE
User prompt
The delightfully devilish ending doesn't give me an ending
User prompt
Then change it to 16
User prompt
Add a button to reset ending count ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Make the win condition 14 endings
User prompt
Make the win condition 13 endings
User prompt
Remove the later ending and the Albany ending cause they're impossible to be gotten
User prompt
But they aren't visible
User prompt
Add new endings: Kick out ending (at the start you can kick out chalmers because your roast is ruined!), Fired Ending (if you don't say anything about the smoke, you will definitely get fired), Jerry's bait shop ending (find an Easter egg)
Code edit (1 edits merged)
Please save this source code
User prompt
Steamed Hams: The Choice Game
Initial prompt
Steamed hams: the choice game
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Character = Container.expand(function () { var self = Container.call(this); self.sprite = self.attachAsset('character', { anchorX: 0.5, anchorY: 0.5 }); return self; }); var ChoiceButton = Container.expand(function () { var self = Container.call(this); var button = self.attachAsset('choiceButton', { anchorX: 0.5, anchorY: 0.5 }); self.textObj = new Text2('', { size: 50, fill: 0xFFFFFF }); self.textObj.anchor.set(0.5, 0.5); self.addChild(self.textObj); self.choice = null; self.callback = null; self.setChoice = function (text, choice, callback) { self.textObj.setText(text); self.choice = choice; self.callback = callback; self.alpha = 1; }; self.down = function () { if (self.callback) { self.callback(self.choice); } }; return self; }); var DialogBox = Container.expand(function () { var self = Container.call(this); var box = self.attachAsset('dialogBox', { anchorX: 0.5, anchorY: 0.5 }); self.textObj = new Text2('', { size: 60, fill: 0xFFFFFF }); self.textObj.anchor.set(0.5, 0.5); self.addChild(self.textObj); self.setText = function (text) { self.textObj.setText(text); // Word wrap manually var maxWidth = 1600; var words = text.split(' '); var line = ''; var lines = []; for (var i = 0; i < words.length; i++) { var testLine = line + words[i] + ' '; self.textObj.setText(testLine); if (self.textObj.width > maxWidth) { lines.push(line); line = words[i] + ' '; } else { line = testLine; } } lines.push(line); self.textObj.setText(lines.join('\n')); }; return self; }); var SmokeEffect = Container.expand(function () { var self = Container.call(this); var smoke = self.attachAsset('smoke', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { self.y -= 2; self.alpha -= 0.01; if (self.alpha <= 0) { self.shouldDestroy = true; } }; return self; }); var Superintendent = Container.expand(function () { var self = Container.call(this); self.sprite = self.attachAsset('superintendent', { anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a1a }); /**** * Game Code ****/ // Story data structure var storyData = { start: { text: "Oh egads! My roast is ruined! But what if I were to purchase fast food and disguise it as my own cooking?", choices: [{ text: "That's a brilliant idea!", next: "kitchen" }, { text: "No, I should tell the truth", next: "truth_ending" }, { text: "Just kick Chalmers out!", next: "kickout_ending" }] }, kitchen: { text: "Superintendent Chalmers arrives! 'SEYMOUR! Why is there smoke coming out of your oven?'", choices: [{ text: "Oh, that isn't smoke, it's steam!", next: "steam" }, { text: "I'm trying a new cooking technique", next: "technique" }, { text: "...", next: "fired_ending" }] }, steam: { text: "Steam? Steam from the steamed clams we're having? Mmm, steamed clams!", choices: [{ text: "Yes, steamed clams!", next: "clams" }, { text: "Actually, I said steamed hams", next: "hams" }] }, technique: { text: "A new technique? In the middle of a luncheon?", choices: [{ text: "It's a family recipe", next: "family" }, { text: "I learned it from TV", next: "tv_ending" }] }, clams: { text: "You serve hamburgers. 'These are quite similar to Krusty Burger...'", choices: [{ text: "Oh no, patented Skinner burgers!", next: "patented" }, { text: "Pure coincidence!", next: "coincidence_ending" }, { text: "Actually, they're from Jerry's Bait Shop", next: "jerrys_ending" }] }, hams: { text: "Steamed hams? I thought we were having steamed clams.", choices: [{ text: "It's a regional dialect", next: "dialect" }, { text: "I misspoke earlier", next: "misspoke_ending" }] }, family: { text: "Your mother's recipe?", choices: [{ text: "Yes, an old family recipe", next: "old_recipe" }, { text: "Well, my grandmother's actually", next: "grandmother_ending" }] }, dialect: { text: "What region?", choices: [{ text: "Upstate New York", next: "upstate" }, { text: "Albany", next: "albany_ending" }] }, patented: { text: "For steamed hams?", choices: [{ text: "Yes!", next: "success_ending" }, { text: "Despite the fact they're grilled", next: "grilled_ending" }] }, old_recipe: { text: "The kitchen suddenly bursts into flames! 'Good Lord, what is happening in there?!'", choices: [{ text: "Aurora Borealis", next: "aurora" }, { text: "Just the oven timer!", next: "timer_ending" }] }, upstate: { text: "Really? Well I'm from Utica and I've never heard anyone use the phrase 'steamed hams'", choices: [{ text: "Oh, not in Utica, no. It's an Albany expression", next: "albany_success" }, { text: "You must not get out much", next: "rude_ending" }] }, aurora: { text: "Aurora Borealis?! At this time of year, at this time of day, in this part of the country, localized entirely within your kitchen?!", choices: [{ text: "Yes!", next: "aurora_yes" }, { text: "...No?", next: "aurora_no_ending" }] }, albany_success: { text: "I see. Well, these steamed hams are delicious!", choices: [{ text: "Thank you!", next: "success_ending" }, { text: "Help! The house is on fire!", next: "fire_ending" }] }, aurora_yes: { text: "May I see it?", choices: [{ text: "No.", next: "aurora_final" }, { text: "Maybe later", next: "later_ending" }] }, aurora_final: { text: "Well Seymour, you are an odd fellow, but I must say - you steam a good ham!", choices: [{ text: "Continue", next: "success_ending" }] }, // Endings truth_ending: { text: "You tell Chalmers the truth. He appreciates your honesty and suggests ordering pizza instead. THE END - Honest Ending", choices: [] }, tv_ending: { text: "Chalmers is unimpressed by your TV chef aspirations and leaves. THE END - Failed Impression", choices: [] }, coincidence_ending: { text: "Chalmers doesn't buy it and storms out. THE END - Caught Red-Handed", choices: [] }, misspoke_ending: { text: "Chalmers questions your competence as a principal. THE END - Professional Disaster", choices: [] }, grandmother_ending: { text: "You bond over family recipes and have a pleasant lunch. THE END - Family Connection", choices: [] }, albany_ending: { text: "Chalmers, being from Albany, knows you're lying and leaves disappointed. THE END - Geographic Failure", choices: [] }, grilled_ending: { text: "Your admission ruins the illusion. Chalmers leaves confused. THE END - Unnecessary Honesty", choices: [] }, timer_ending: { text: "The house burns down. THE END - Fire Department Called", choices: [] }, rude_ending: { text: "Chalmers is offended by your rudeness and leaves immediately. THE END - Social Disaster", choices: [] }, aurora_no_ending: { text: "Your uncertainty makes Chalmers suspicious. He investigates and finds the fire. THE END - Caught in Lies", choices: [] }, fire_ending: { text: "You both escape the burning house. Chalmers calls 911. THE END - Emergency Response", choices: [] }, later_ending: { text: "Chalmers grows suspicious of your deflection. THE END - Trust Lost", choices: [] }, success_ending: { text: "Despite everything, the luncheon is a success! Chalmers leaves satisfied. THE END - Delightfully Devilish!", choices: [] }, kickout_ending: { text: "You slam the door in Chalmers' face. 'SKINNER!' he yells from outside. Your career is over but at least you're honest about your cooking. THE END - No Visitors Today", choices: [] }, fired_ending: { text: "You stand there silently as smoke billows out. Chalmers immediately calls the school board. You're fired on the spot for endangerment. THE END - Speechless Disaster", choices: [] }, jerrys_ending: { text: "Chalmers' eyes widen. 'Jerry's Bait Shop? The one by the lake?' You bond over fishing stories and forget all about the lunch. THE END - Gone Fishing", choices: [] } }; // Game state var currentScene = "start"; var dialogBox = null; var choiceButtons = []; var skinner = null; var chalmers = null; var smokeEffects = []; var kitchenBg = null; // Initialize kitchen background kitchenBg = game.addChild(LK.getAsset('kitchenBg', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 750 })); // Initialize characters skinner = game.addChild(new Character()); skinner.x = 600; skinner.y = 1000; chalmers = game.addChild(new Superintendent()); chalmers.x = 1400; chalmers.y = 1000; chalmers.alpha = 0; // Initialize dialog box dialogBox = game.addChild(new DialogBox()); dialogBox.x = 1024; dialogBox.y = 2200; // Initialize choice buttons for (var i = 0; i < 2; i++) { var button = game.addChild(new ChoiceButton()); button.x = 1024; button.y = 1600 + i * 200; choiceButtons.push(button); } // Score tracking for endings reached var endingsReached = storage.endingsReached || 0; var endingsSeen = storage.endingsSeen || {}; // Score display var scoreText = new Text2('Endings: ' + endingsReached + '/18', { size: 80, fill: 0xFFFFFF }); scoreText.anchor.set(1, 0); LK.gui.topRight.addChild(scoreText); scoreText.x = -20; scoreText.y = 20; function showScene(sceneId) { currentScene = sceneId; var scene = storyData[sceneId]; // Update dialog dialogBox.setText(scene.text); // Show Chalmers after start if (sceneId !== "start" && chalmers.alpha === 0) { tween(chalmers, { alpha: 1 }, { duration: 500 }); } // Hide all choice buttons first for (var i = 0; i < choiceButtons.length; i++) { choiceButtons[i].alpha = 0; } // Show choices for (var j = 0; j < scene.choices.length; j++) { if (j < choiceButtons.length) { choiceButtons[j].setChoice(scene.choices[j].text, scene.choices[j].next, handleChoice); tween(choiceButtons[j], { alpha: 1 }, { duration: 300 }); } } // Check if this is an ending if (scene.choices.length === 0) { // This is an ending if (!endingsSeen[sceneId]) { endingsSeen[sceneId] = true; endingsReached++; storage.endingsReached = endingsReached; storage.endingsSeen = endingsSeen; scoreText.setText('Endings: ' + endingsReached + '/18'); LK.setScore(endingsReached); } // Show restart button choiceButtons[0].setChoice("Play Again", "start", handleChoice); tween(choiceButtons[0], { alpha: 1 }, { duration: 300 }); // Check win condition if (endingsReached >= 18) { LK.showYouWin(); } } // Add smoke effects for certain scenes if (sceneId === "kitchen" || sceneId === "old_recipe" || sceneId === "aurora") { createSmoke(); } } function handleChoice(nextScene) { showScene(nextScene); } function createSmoke() { for (var i = 0; i < 3; i++) { var smoke = game.addChild(new SmokeEffect()); smoke.x = 800 + Math.random() * 400; smoke.y = 800; smoke.scaleX = smoke.scaleY = 0.5 + Math.random() * 0.5; smokeEffects.push(smoke); } } // Game update game.update = function () { // Update smoke effects for (var i = smokeEffects.length - 1; i >= 0; i--) { if (smokeEffects[i].shouldDestroy) { smokeEffects[i].destroy(); smokeEffects.splice(i, 1); } } // Occasional smoke generation in fire scenes if ((currentScene === "old_recipe" || currentScene === "aurora") && LK.ticks % 30 === 0) { createSmoke(); } }; // Start the game showScene("start");
===================================================================
--- original.js
+++ change.js
@@ -119,8 +119,11 @@
next: "kitchen"
}, {
text: "No, I should tell the truth",
next: "truth_ending"
+ }, {
+ text: "Just kick Chalmers out!",
+ next: "kickout_ending"
}]
},
kitchen: {
text: "Superintendent Chalmers arrives! 'SEYMOUR! Why is there smoke coming out of your oven?'",
@@ -129,8 +132,11 @@
next: "steam"
}, {
text: "I'm trying a new cooking technique",
next: "technique"
+ }, {
+ text: "...",
+ next: "fired_ending"
}]
},
steam: {
text: "Steam? Steam from the steamed clams we're having? Mmm, steamed clams!",
@@ -159,8 +165,11 @@
next: "patented"
}, {
text: "Pure coincidence!",
next: "coincidence_ending"
+ }, {
+ text: "Actually, they're from Jerry's Bait Shop",
+ next: "jerrys_ending"
}]
},
hams: {
text: "Steamed hams? I thought we were having steamed clams.",
@@ -310,8 +319,20 @@
},
success_ending: {
text: "Despite everything, the luncheon is a success! Chalmers leaves satisfied. THE END - Delightfully Devilish!",
choices: []
+ },
+ kickout_ending: {
+ text: "You slam the door in Chalmers' face. 'SKINNER!' he yells from outside. Your career is over but at least you're honest about your cooking. THE END - No Visitors Today",
+ choices: []
+ },
+ fired_ending: {
+ text: "You stand there silently as smoke billows out. Chalmers immediately calls the school board. You're fired on the spot for endangerment. THE END - Speechless Disaster",
+ choices: []
+ },
+ jerrys_ending: {
+ text: "Chalmers' eyes widen. 'Jerry's Bait Shop? The one by the lake?' You bond over fishing stories and forget all about the lunch. THE END - Gone Fishing",
+ choices: []
}
};
// Game state
var currentScene = "start";
@@ -350,9 +371,9 @@
// Score tracking for endings reached
var endingsReached = storage.endingsReached || 0;
var endingsSeen = storage.endingsSeen || {};
// Score display
-var scoreText = new Text2('Endings: ' + endingsReached + '/15', {
+var scoreText = new Text2('Endings: ' + endingsReached + '/18', {
size: 80,
fill: 0xFFFFFF
});
scoreText.anchor.set(1, 0);
@@ -394,9 +415,9 @@
endingsSeen[sceneId] = true;
endingsReached++;
storage.endingsReached = endingsReached;
storage.endingsSeen = endingsSeen;
- scoreText.setText('Endings: ' + endingsReached + '/15');
+ scoreText.setText('Endings: ' + endingsReached + '/18');
LK.setScore(endingsReached);
}
// Show restart button
choiceButtons[0].setChoice("Play Again", "start", handleChoice);
@@ -405,9 +426,9 @@
}, {
duration: 300
});
// Check win condition
- if (endingsReached >= 15) {
+ if (endingsReached >= 18) {
LK.showYouWin();
}
}
// Add smoke effects for certain scenes