Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Player
- {
- String playerName;
- int playerHP;
- int playerLevel;
- int playerAttack;
- int playerDefence;
- int playerMoney;
- int playerRange;
- public Player(String name, int hP, int level, int attack, int defence,int range, int money)
- {
- playerName = name;
- playerHP = hP;
- playerLevel = level;
- playerAttack = attack;
- playerDefence = defence;
- playerMoney = money;
- playerRange = range;
- }
- public String getName()
- {
- return playerName;
- }
- public int getHP()
- {
- return playerHP;
- }
- public void changeHP(int amount)
- {
- playerHP = playerHP+amount;
- }
- public int getLevel()
- {
- return playerLevel;
- }
- public int getAttack()
- {
- return playerAttack;
- }
- public void changeAttack(int amount)
- {
- playerAttack = playerAttack+amount;
- }
- public int getDefence()
- {
- return playerDefence;
- }
- public void changeDefence(int amount)
- {
- playerDefence = playerDefence+amount;
- }
- public int getRange()
- {
- return playerRange;
- }
- public void changeRange(int amount)
- {
- playerRange = playerRange+amount;
- }
- public int getMoney()
- {
- return playerMoney;
- }
- public void changeMoney(int amount)
- {
- playerMoney = playerMoney+amount;
- }
- }
- public class Monster
- {
- String monsterName;
- int monsterHP;
- int monsterLevel;
- int monsterAttack;
- int monsterDefence;
- int monsterMoney;
- int monsterExperence;
- public Monster(String name, int hP, int level, int attack, int defence,int money,int experence)
- {
- monsterName = name;
- monsterHP = hP;
- monsterLevel = level;
- monsterAttack = attack;
- monsterDefence = defence;
- monsterMoney = money;
- monsterExperence = experence;
- }
- public String getName()
- {
- return monsterName;
- }
- public int getHP()
- {
- return monsterHP;
- }
- public int getLevel()
- {
- return monsterLevel;
- }
- public int getAttack()
- {
- return monsterAttack;
- }
- public int getDefence()
- {
- return monsterDefence;
- }
- public int getMoney()
- {
- return monsterMoney;
- }
- public int getExperence()
- {
- return monsterExperence;
- }
- public void takeDamage(int damageTaken)
- {
- monsterHP = monsterHP - damageTaken;
- }
- }
- import java.util.Scanner;
- import java.util.Random;
- public class FuturamaGame
- {
- static Scanner text = new Scanner(System.in);
- static Random RNG = new Random();
- static Player jon;
- public static void main(String []agrs)
- {
- System.out.println("Planet Express Delivery Company RPG");
- System.out.println("Professor: Good news everyone, today you will be delvering a package"+
- "\nto Omicron Persei 8. The package contains the rest of the popplers, so make sure to be"+
- "carefull with the goods!");
- System.out.println("Please pick a character! (Leela, Fry, Bender, Nibbler, Scruffy");
- String charPick = text.next();
- if(charPick.equalsIgnoreCase("Leela"))
- {
- System.out.println("You picked Leela! She is great at melee combat!");
- jon = new Player("Leela",75,80,80,80,0,100);
- }
- if(charPick.equalsIgnoreCase("Fry"))
- {
- System.out.println("You picked Fry! He is bad at everything!");
- jon = new Player("Fry",40,40,40,40,40,500);
- }
- if(charPick.equalsIgnoreCase("Bender"))
- {
- System.out.println("You picked Bender! He is good at stealing things and running away!");
- jon = new Player("Bender",60,70,70,85,10,250);
- }
- if(charPick.equalsIgnoreCase("Nibbler"))
- {
- System.out.println("You picked Nibbler! He is great at eating massive things!");
- jon = new Player("Nibbler",50,80,75,90,100,100);
- }
- if(charPick.equalsIgnoreCase("Scruffy"))
- {
- System.out.println("You picked Scruffy! He is good at mopping the floor!");
- System.out.println("You stay home all day mopping the floor and doing nothing.");
- System.exit(0);
- }
- else
- {
- System.out.println("Invalid option you automatically pick Nibbler.");
- }
- System.out.println("Welcome to the shop! 5 levels in any skill (Range,Attack,Defence, HP) costs $25");
- int loop1 = 5;
- while(loop1==5)
- {
- System.out.println("Please print out what skill you would like to improve!\nIf you wouldnt like to buy anything simply type *");
- if(jon.getMoney()>=25)
- {
- String shopResponse = text.next();
- if(shopResponse.equalsIgnoreCase("Range"))
- {
- jon.changeMoney(-25);
- jon.changeRange(5);
- }
- else if(shopResponse.equalsIgnoreCase("Attack"))
- {
- jon.changeMoney(-25);
- jon.changeAttack(5);
- }
- else if(shopResponse.equalsIgnoreCase("Defence"))
- {
- jon.changeMoney(-25);
- jon.changeDefence(5);
- }
- else if(shopResponse.equalsIgnoreCase("HP"))
- {
- jon.changeMoney(-25);
- jon.changeHP(5);
- }
- else if(shopResponse.equalsIgnoreCase("*"))
- {
- loop1++;
- }
- }
- else
- {
- System.out.println("YOU DO NOT HAVE ENOUGH CASH");
- loop1++;
- }
- }
- System.out.println("Leela: Lets get on the ship!");
- System.out.println("You take off on the long journey to Omicron Persei 8");
- for(int delay = 0; delay<2;delay++)
- {
- 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(" / \\");
- 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("You land on Omicron Persei 8!");
- Monster brain = new Monster("Giant Brain", 150, 25, 50, 50, 100, 20000);
- System.out.println("YOU RUN INTO A GIANT BRAIN!!!");
- while(brain.getHP()>0)
- {
- if(charPick.equalsIgnoreCase("Leela"))
- {
- System.out.println("Would you like to kick, punch, or headbutt?");
- String attackPick = text.next();
- if(attackPick.equalsIgnoreCase("kick"))
- {
- int missOrHit = RNG.nextInt(4);
- if(missOrHit==0)
- {
- System.out.println("You missed!");
- }
- else
- {
- int damage = RNG.nextInt(jon.getAttack()/2)+40;
- brain.takeDamage(damage);
- }
- }
- if(attackPick.equalsIgnoreCase("punch"))
- {
- int damage = RNG.nextInt(jon.getAttack()/2)+20;
- brain.takeDamage(damage);
- }
- if(attackPick.equalsIgnoreCase("headbutt"))
- {
- int missOrHit = RNG.nextInt(2);
- if(missOrHit==0)
- {
- System.out.println("You missed!");
- }
- else
- {
- int damage = RNG.nextInt(jon.getAttack()/2)+100;
- brain.takeDamage(damage);
- }
- }
- }
- if(charPick.equalsIgnoreCase("Fry"))
- {
- System.out.println("The brain cannot hurt fry as he is the dumbest person in the world."+
- "\nThe brain dies on the spot, you then go and pick up: $!"+brain.getMoney());
- brain.takeDamage(brain.getHP());
- }
- if(charPick.equalsIgnoreCase("Bender"))
- {
- System.out.println("Would you like to bend, smack, or steal the brain?");
- String attackPick = text.next();
- if(attackPick.equalsIgnoreCase("bend"))
- {
- int missOrHit = RNG.nextInt(2);
- if(missOrHit==0)
- {
- System.out.println("You missed!");
- }
- else
- {
- int damage = RNG.nextInt(jon.getAttack()/2)+100;
- brain.takeDamage(damage);
- }
- }
- if(attackPick.equalsIgnoreCase("smack"))
- {
- int damage = RNG.nextInt(jon.getAttack()/2)+20;
- brain.takeDamage(damage);
- }
- if(attackPick.equalsIgnoreCase("steal"))
- {
- int missOrHit = RNG.nextInt(3);
- if(missOrHit==0)
- {
- System.out.println("YOU STEEL THE BRAIN!");
- }
- else
- {
- System.out.println("You failed to steel the brain :'(");
- }
- }
- }
- if(charPick.equalsIgnoreCase("Nibbler"))
- {
- System.out.println("Would you like to shoot, drop dark matter, or eat?");
- String attackPick = text.next();
- if(attackPick.equalsIgnoreCase("shoot"))
- {
- int missOrHit = RNG.nextInt(4);
- if(missOrHit==0)
- {
- System.out.println("You missed!");
- }
- else
- {
- int damage = RNG.nextInt(jon.getRange()/2)+40;
- brain.takeDamage(damage);
- }
- }
- if(attackPick.equalsIgnoreCase("drop"))
- {
- }
- if(attackPick.equalsIgnoreCase("eat"))
- {
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement