Why doesnt this work? NOT CLICKBAIT!


var Creeper = prompt("You're walking through the mineshaft, mining your own business and collecting that iron, and you run into a creeper! Do you FIGHT him, PAY him, or RUN away from him?").toUpperCase();

switch(Creeper) {
case 'FIGHT':
var strong = prompt("How amazing! Are you strong enough to brutally murder a creeper with a diamond sword (YES or NO)?").toUpperCase();
var intelligent = prompt("Are you smart to kill a creeper, with out him exploding and blowing up everything that you have mined?").toUpperCase();
if(strong === 'YES' || intelligent === 'YES') {
console.log("Wow you have honesly obliterated him! You beat the creeper--nice work, you now just keep mining and have a great day!");
} else {
console.log("You're not strong OR intelligent? Well, if you were smarter, you probably wouldn't have tried to fight a creeper, and if you were strong you could have killed him! You lose because you blew up!");
case 'PAY':
var money = prompt("All right, we'll pay the creeper. Do you have any extraordinary items such as ore blocks?(YES or NO)?").toUpperCase();
var dollars = prompt("Is your ore diamonds or emeralds?").toUpperCase();
if(money === 'YES' && dollars === 'YES') {
console.log("Great! You pay the creeper and continue on, but he gets scared and blows up!");
} else {
console.log("Dang! This creeper only takes ore blocks such as diamonds and emeralds. He explodes, sorry should have been a better miner!");
case 'RUN':
var fast = prompt("Let's book it! Are you fast enough to out run a creeper? (YES or NO)?").toUpperCase();
var headStart = prompt("Did you get a head start?").toUpperCase();
if(fast === 'YES' || headStart === 'YES') {
console.log("You got away--barely! You live to mine through the shaft another day.");
} else {
console.log("You're not fast and you didn't get a head start? You never had a chance! The creeper blows you up.");
console.log("I didn't understand your choice. Hit Run and try again, this time picking FIGHT, PAY, or RUN!");


I solved it thx for no-ones help!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.