Advertisement
Guest User

Chose your own adventure

a guest
May 27th, 2015
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var user = prompt("You are in the middle of the forrest and a fairy comes up to you and speaks. She tells you that if you go with her she will give you magical powers. What do you do? KILL, FOLLOW, SPIT ON or SMILE AT the fairy?").toUpperCase();
  2. var fairy = true;
  3. var user = true;
  4. var game = function();
  5. var meelee = math.random();
  6. switch (options){
  7.    
  8.     case 'KILL':
  9.         if (meelee <= 0.5){
  10.             console.log("You were unable to defeat the fairy, she used a magic spell and killed you");
  11.         }
  12.         else if (meelee >= 0.6){
  13.          console.log("Congratulations you used magic points and killed the fairy!");  
  14.         }
  15.         break;
  16.        
  17.     case 'FOLLOW':
  18.         console.log("You follow the fairy and guess what... SHE LIED! She is now using you as a human sacrifice.");
  19.         break;
  20.        
  21.     case 'SPIT ON':
  22.         if (meelee <= 0.5){
  23.          console.log("You spit towards the fairy but fail to hit her, she pulls out a dagger and stabs your eye.");  
  24.         }
  25.        
  26.         else if (meelee >= 0.6){
  27.             console.log("You spit at the fairy and anger her. She pulls out a dagger and kills you.");
  28.             }
  29.             break;
  30.            
  31.     case 'SMILE AT':
  32.         console.log("The fairy yells 'You have no idea what you have done to offend me but you will pay!' She pulls out a dagger and stabs you to death with it.");
  33.         break;
  34.        
  35.     case 'BLARGH':
  36.         if (user||fairy){
  37.             return true;
  38.         }
  39.         else if (!(user) && fairy){
  40.         return false;
  41.         }
  42.        
  43.         else if (user && fairy){
  44.          return true;  
  45.         }
  46.        
  47.     default:
  48.     console.log("That wasn't an option.");
  49.  
  50. }
  51.  
  52. game();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement