metaltraitor

shepcraft adventure game :D

Jul 29th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. package me.shepcraft.adventure;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6. public static void main(String[] args){
  7. System.out.println("Welcome To Shepcraft!!");
  8.  
  9. Scanner s = new Scanner(System.in);
  10. int Health=10;
  11. double money = 19.99;
  12. String name;
  13. System.out.println("What is your name?");
  14. name = s.nextLine();
  15. System.out.println("Nice to meet you, " + name + "! You have " + Health + "!" );
  16. System.out.println("[1] Go To Red Sheep");
  17. System.out.println("[1] Go To Yellow Sheep");
  18. System.out.println("[1] Go To Purple Sheep");
  19. int input = s.nextInt();
  20. if (input == 1){
  21. System.out.println("You payed 2 dollars for health potion");
  22. money -= 1;
  23. Health += 1;
  24.  
  25. }
  26.  
  27. else if (input == 2){
  28. System.out.println("You discovered a Goblin in the forest and you get ambushed by Goblins and kill them! You gain 5 Money at the cost of 3 health");
  29. money += 5;
  30. Health -= 3;
  31.  
  32. }
  33. else if (input == 3){
  34. System.out.println("lel hi there" + name);
  35. }
  36. else {
  37. System.out.println("Invalid input!");
  38. }
Advertisement
Add Comment
Please, Sign In to add comment