Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class Battle1
  5. {
  6.     static String EnemyPoke = "Zebstrika";
  7.     static Scanner scan = new Scanner(System.in);
  8.  
  9.     public static void main(String[] args)
  10.     {
  11.         PokemonQ1();
  12.         String poke1 = userPoke();
  13.         PokemonQ1Mk2(poke1);
  14.         int PokeLevel = Level();
  15.         int AttackLevel = Attack();
  16.         int DefenseLevel = Defense();
  17.         int BaseLevel = Base();
  18.         int STABtf = STAB();
  19.         int HP = Health();
  20.         double modifier = 0;
  21.         modifier = ModiferCalculation(STAB);
  22.        
  23.         DamageCalculations(PokeLevel, AttackLevel, DefenseLevel, BaseLevel, modifier);
  24.     }
  25.  
  26.     public static void PokemonQ1()
  27.     {
  28.         System.out.println("Another Trainer is Issuing a Challenge! \n");
  29.         System.out.println("Zebstrika Appeared.\n");
  30.         System.out.println("Which Pokemon do you choose?\n");
  31.     }
  32.  
  33.     public static String userPoke()
  34.     {
  35.         Scanner scanner = new Scanner(System.in);
  36.         String poke1 = scanner.nextLine();
  37.         return poke1;
  38.     }
  39.  
  40.     public static void PokemonQ1Mk2(String poke1)
  41.     {
  42.         System.out.println(" ");
  43.         System.out.println("You chose " + poke1 + "! \n");
  44.         System.out.println("It's a battle between " + poke1 + " and " + EnemyPoke + "!" + " Go! \n");
  45.     }
  46.    
  47.     public static int Level()
  48.     {
  49.         System.out.println("Level:");
  50.         int PokeLevel = scan.nextInt();
  51.         return PokeLevel;
  52.     }
  53.    
  54.     public static int Attack()
  55.     {
  56.         System.out.println("Attack:");
  57.         int AttackLevel = scan.nextInt();
  58.         return AttackLevel;
  59.     }
  60.    
  61.     public static int Defense()
  62.     {
  63.         System.out.println("Defense:");
  64.         int DefenseLevel = scan.nextInt();
  65.         return DefenseLevel;
  66.     }
  67.    
  68.     public static int Base()
  69.     {
  70.         System.out.println("Base:");
  71.         int BaseLevel = scan.nextInt();
  72.         return BaseLevel;
  73.     }
  74.    
  75.     public static int STAB()
  76.     {
  77.         System.out.println("STAB:");
  78.         int STABtf = scan.nextInt();
  79.         return STABtf;
  80.     }
  81.    
  82.     public static int Health()
  83.     {
  84.         System.out.println("HP:");
  85.         int HP = scan.nextInt();
  86.         return HP;
  87.     }
  88.    
  89.     public static double ModiferCalculation(double STABtf)
  90.     {
  91.         double r = (double) (Math.random() * (1.0 - 0.85)) + 0.85;
  92.         double modifier = (double) (r * STABtf);
  93.         return modifier;
  94.     }
  95.  
  96.     public static void DamageCalculations(int PokeLevel, int AttackLevel, int DefenseLevel, int BaseLevel, double Modifier)
  97.     {
  98.         double DamageDealt = (double) ((2 * PokeLevel * 10 / 250) * (AttackLevel / DefenseLevel) * BaseLevel + 2) * Modifier;
  99.         System.out.println("Damage Dealt:" + DamageDealt);
  100.     }
  101. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top