Saturday, June 10, 2017

Pseudocode from Final Project

// The Quest of Nede (made possibly by Josh Lim and David Liu)

import java.util.Scanner;
import java.lang.Math;

public class pseudocode{
private String name;
public void BEGINNING() {
    // Done by Josh Lim
    //The Beginning of the game (tutorial)
     
    // greets user and asks for its name
    // include the name entered by the user into the game
    // introduce the tutorial battle

 
    if (e == 0) {  
        while (b > 0) {
        //Mention the HP the user has
        //Talk about the HP the monster has
        // Talk about the damage by both sides of the game.
        if (c <= 0) {
  //Tell the user that they died.
  //Respawn them back in the level
  //Introduce the battle variables and revert them back to normal
 } else {
             
        if (d == 2) {
            //Tell the user ran away from the monster
        } else {
            if (d==1) {
            //Inflicted 5 damage to the monster
            //Monster inflicted 2 damage to the user
            if (b == 0) {
            //Tell them that they beat the tutorial
            //Ask them which route they are going
if (fate == 1) {
//Leads user to dunegon/sea level
}
else {
//Leads user to fields/castle level
}
        }
    }else {
            if (d==3) {
            //Inflicted 1 damage to the monster (slap attack)
            //Monster inflicted 2 damage to the user
            if (b == 0) {
                //Killed monster with a slap
                //Move on throughout the game

    }
}
}
}
}
}
}
} public void fieldquest() {
     
    Scanner input = new Scanner(System.in);
    int num1;
    int num2;
    int num4;
    int num5;
    int num6;

    //Choice #1
     
    if (num1 == 1) {
        FollowTheSign();
    }

   
    else if (num1 == 2) {
//Choice #2
        }
    } public void SpongebobBoss() {
 // Done by Josh Lim
 // Spongebob- Field Boss
        int a = 0;
    int b = 16; // Monster's HP
    int c = 12; // User's health points
    int d;
    int e = 0;
    int f = 4; // Monster's damage
    int g;
    int h;
            Scanner input = new Scanner(System.in);
    if (e == 0) {  
        while (b > 0) {
        System.out.println ("\nYou have " + c +" health points");
        System.out.println ("The health of the monster has " +b);
        System.out.println("This particular sponge that bulks up at random moments, giving it a random range of defense from 2 to 7.");
        System.out.println ("The following actions you can do are: \n1.) Attack with your sword. (5 damage) \n2.) Slap it (1 damage) \n3.) Attack it with boomerang (4 damage*2)  \n4.) Steal HP (+3 HP)");
        d = input.nextInt();    
       
        if (c <= 0) {
//Respawn room


  b = 15;
  c = 12;
  e = 0;
 } else {
          if (d == 2) {
            //Monster did damage to user
            if (b == 0) {
//Monster kill with a slap
    }
        } else {

            if (d==1) {
 //User damage
            if (b <= 0) {
                System.out.println("You just ended one of the most successful kids' shows of all time.");
                 
                PostSpongebobFight();
            }
        }
    }
}  
}
}

} public void PostSpongebobFight() {
// Done by Josh Lim
// The remaining decisions after Spongebob fight
        Scanner input = new Scanner(System.in);
int num3;
int num6;
int b;
int c;
int e;
            if (num3 == 2) {
                    //Choice #3
                    if (num6 == 1) {
                        //Move user onto the castle level
                    }
                    else if (num6== 2) {
                        //Respawn room
   b = 15;
  c = 12;
  e = 0;
          System.out.println("\n▄▄▄▄▄███▄▄███▄▄▄▄▄▄▄░▄▄▄▄░▄▄▄░");
            System.out.println("█░░░░░░░░░░░░░░▀░░░▀▀▀░░░▀▀▀██");
            System.out.println("██░░░▄░░░░░░░░░░░░░░░░░░░▄░░█░");
            System.out.println("█▄░░░░░░▄▀▀▀▄▄░░▄▄▄▄▄▄░░░▀░░█▄");
            System.out.println("░█░▄▀░▄▀░░▄▄▄▄██▀▄▄▄░░▀▄░░░█▀░");
            System.out.println("██░░░▄█░░░█████▄████░░░█░░░██░");
            System.out.println("░███▀███░░░▀▀░█░█▀▀▀░░█▀██▄█░░");
            System.out.println("░█░░░░▀▄▀▀▄▀▀▀░▀▀▀▄▄▄▀██▀▀░█░░");
            System.out.println("░▀█▄░░▄░▀▀▄▄▄▄▄▄▄▄▄▄▀▀░▄░░█▀░░");
            System.out.println("░░█░░▀▀░░░░░█▄██▄▄█░░░██░░█▄░░");
            System.out.println("░░███░░▀█░░▀▀▄▀▀░░░░░░▄░░██░░░");
            System.out.println("░░███▄██▄▄▄▄▄▄░░▄▄░░░▄█░░██░░░");
            System.out.println("░░▀███▀░▀▀▀▀██████▀▀▀▀▀▀██▀░░░");
            System.out.println("░░░▀█████▀█████▀██████████░░░░");
            System.out.println("░░░░██▄▄▄▄▄░░░▀▀░░░░░░░▄██░░░░");
            System.out.println("░░░░█▄██▀▀███▀▀▀▀████▀████░░░░");
            System.out.println("░░░░████░░░██░░░░███░░████░░░░");
            System.out.println("░░░░░▀▀▀░░░█▀█░░░██░░░▀▀▀░░░░░");
            System.out.println("░░░░░░░█████▄█░░▄██████▄░░░░░░");
            SpongebobBoss();
}
                }
                else if (num3 == 1) {
                    System.out.println("\nYou tried going underwater to see the house but you realized you couldn't breathe.");
                    System.out.println("You dead.");
                      System.out.println ("Respawning you to last checkpoint (before boss battle)\n");

 System.out.println("________");
 System.out.println(" ( )");
 System.out.println("  \\../");
 System.out.println("   )(");
 System.out.println("  /  \\");
 System.out.println(" (::::)");
 System.out.println("~~~~~~~~");

          System.out.println("\n▄▄▄▄▄███▄▄███▄▄▄▄▄▄▄░▄▄▄▄░▄▄▄░");
            System.out.println("█░░░░░░░░░░░░░░▀░░░▀▀▀░░░▀▀▀██");
            System.out.println("██░░░▄░░░░░░░░░░░░░░░░░░░▄░░█░");
            System.out.println("█▄░░░░░░▄▀▀▀▄▄░░▄▄▄▄▄▄░░░▀░░█▄");
            System.out.println("░█░▄▀░▄▀░░▄▄▄▄██▀▄▄▄░░▀▄░░░█▀░");
            System.out.println("██░░░▄█░░░█████▄████░░░█░░░██░");
            System.out.println("░███▀███░░░▀▀░█░█▀▀▀░░█▀██▄█░░");
            System.out.println("░█░░░░▀▄▀▀▄▀▀▀░▀▀▀▄▄▄▀██▀▀░█░░");
            System.out.println("░▀█▄░░▄░▀▀▄▄▄▄▄▄▄▄▄▄▀▀░▄░░█▀░░");
            System.out.println("░░█░░▀▀░░░░░█▄██▄▄█░░░██░░█▄░░");
            System.out.println("░░███░░▀█░░▀▀▄▀▀░░░░░░▄░░██░░░");
            System.out.println("░░███▄██▄▄▄▄▄▄░░▄▄░░░▄█░░██░░░");
            System.out.println("░░▀███▀░▀▀▀▀██████▀▀▀▀▀▀██▀░░░");
            System.out.println("░░░▀█████▀█████▀██████████░░░░");
            System.out.println("░░░░██▄▄▄▄▄░░░▀▀░░░░░░░▄██░░░░");
            System.out.println("░░░░█▄██▀▀███▀▀▀▀████▀████░░░░");
            System.out.println("░░░░████░░░██░░░░███░░████░░░░");
            System.out.println("░░░░░▀▀▀░░░█▀█░░░██░░░▀▀▀░░░░░");
            System.out.println("░░░░░░░█████▄█░░▄██████▄░░░░░░");


 //Introduce Field Boss Fight

  b = 15;
  c = 12;
  e = 0;
 SpongebobBoss();
        }
}
 public void FollowTheSign() {
  // Done by Josh Lim
  //Followed the sign to death
    Scanner input = new Scanner(System.in);
    int num1;
    int num4;
    int num5;
    int b;
    int c;
    int d;
    int e;
// Choice #4
            if (num4 == 1) {
                //Choice #5
                if (num5 == 1) {
                    //Respawn room
    }
    else if (num5 == 2) {
        //Respawn room
    }
}
    else if (num4 == 2) {
        //Respawn room
    }
}






























public void castlequest() {
    // Done by Josh Lim
    Scanner input = new Scanner(System.in);
    int num7;
    int num8;

    System.out.println ("\nAfter a set of long and 'smart' decisions," + name + " made his way to the outside of the castle with much more fatal decisions up ahead.");
    System.out.println("When coming across the field, you see a fallen soldier lying with a boomerang and a magic rod.");
    System.out.println("The boomerang does 4 damage, but has a 50% chance of it doubling. The magic rod steals 3 HP from the enemy to the user.");
    System.out.println("\n" + name + " made his way to the bridge but he needs to bring it down. He sees a guard up on a post though.");
    System.out.println("What should you do? (1= Throw a rock at him, 2= Wave and shout to the guard)");
    num7 = input.nextInt();
     
    if (num7 == 1) {
System.out.println("\nYou threw a rock at the guard's head. However, the guard immediantly saw you as a threat and shot you.");
System.out.println("You ded. Respawing back to the level.");
 System.out.println("________");
 System.out.println(" ( )");
 System.out.println("  \\../");
 System.out.println("   )(");
 System.out.println("  /  \\");
 System.out.println(" (::::)");
 System.out.println("~~~~~~~~");
castlequest();
}
else if (num7 == 2) {
//Option #1
    if (num8 == 2) {
//Respawn room
    }
    else if (num8 == 1) {
//Option #2
        if (num9 == 1) {
//Respawn room in case you died.
}
        else if (num9 == 2 ) {
// Introduce the castle boss fight
            if (num10 == 2) {
                PepeBoss();
}
            else {
// take them to castle level
                castlequest();
}
}
}
}
}
}

No comments:

Post a Comment