Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This code controls fights, and boss fights
- * @author zachary
- *
- **/
- import java.util.*;
- import java.awt.*;
- public class Fighting {
- public void Fight(){
- Scanner attack = new Scanner(System.in);
- Random rand = new Random();
- int max=10;
- int min=1;
- int bossChance = rand.nextInt(max - min + 1) + min;
- if(bossChance >= 7){
- //a boss mob has appeared
- int bossHp=200;//boss health
- int bossGold=rand.nextInt(100-50+1)+50;//boss money drop
- int bossExp=75;
- System.out.println("A boss appears! Prepare to fight!");
- while(bossHp >= 0){
- //boss is alive
- System.out.printf("Boss HP: %d!\n", bossHp);
- System.out.println("Choose attack!\n 1. Fireball (50%)\n2. Melee");
- System.out.print("Attack: ");
- attack.nextLine();
- if(attack.equals("1")){
- int critChance =
- }
- }else{
- //boss is dead
- }
- }else{
- //a normal mob has appeared
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement