Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EncPlan {
- int partycount;
- int[] levels;
- int enemycount;
- int[] CRs;
- int[] medExpTarget = {50,100,150,250,500,
- 600,750,900,1100,1200,1600,2000,
- 2200,2500,2800,3200,3900,4200,4900,5700};
- int[] hardExpTarget = {75,150,225,375,750,900,
- 1100,1400,1600,1900,2400,3000,3400,3800,4300,
- 4800,5900,6300,7300,8500};
- double[] multipliers = {.5, 1, 1.5, 2, 2.5, 3, 4};
- String[] monstCountDesc = {"1 monster", "2 monsters", "3-6 monsters", "7-10 monsters", "11-14 monsters"};
- public static void main(String[] args){
- EncPlan e = new EncPlan();
- try(Scanner s = new Scanner(System.in)){
- System.out.println("Enter party count");
- e.partycount = s.nextInt();
- System.out.println("Enter level of each party member.");
- e.levels = new int[e.partycount];
- for (int i = 0; i < e.levels.length; ++i){
- e.levels[i] = s.nextInt();
- }
- int medExpBudget = 0;
- for (int i = 0; i < e.levels.length; ++i){
- medExpBudget += e.medExpTarget[e.levels[i] - 1];
- }
- int hardExpBudget = 0;
- for (int i = 0; i < e.levels.length; ++i){
- hardExpBudget += e.hardExpTarget[e.levels[i] - 1];
- }
- System.out.println("For medium encounters, shoot for one of the following:");
- for (int i = 0; i < e.monstCountDesc.length; ++i){
- int multiplierIndex = i+1;
- if (e.partycount < 3) ++multiplierIndex;
- if (e.partycount > 5) --multiplierIndex;
- double currMult = e.multipliers[multiplierIndex];
- double budget = medExpBudget/currMult;
- System.out.println(e.monstCountDesc[i] + " worth a total of " + (int)budget + " exp.");
- }
- System.out.println("\n\nFor hard encounters, shoot for one of the following:");
- for (int i = 0; i < e.monstCountDesc.length; ++i){
- int multiplierIndex = i+1;
- if (e.partycount < 3) ++multiplierIndex;
- if (e.partycount > 5) --multiplierIndex;
- double currMult = e.multipliers[multiplierIndex];
- double budget = hardExpBudget/currMult;
- System.out.println(e.monstCountDesc[i] + " worth a total of " + (int)budget + " exp.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement