-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpLevel.java
More file actions
74 lines (57 loc) · 1.73 KB
/
Copy pathExpLevel.java
File metadata and controls
74 lines (57 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* TAG: Team Adventure Game
* Code: Don Combs
* 11-24-2019 To Current Date
*
*/
public class ExpLevel {
public static ExpArrays[] ExpConfig;
public static void main(String[] args) {
// TODO Auto-generated method stub
// Experience Point Ladder to Level Up
// Level 1 to 2 1000Exp gets battle with Boss Monster
// Formula: Exp = Level^2/0.04
int PlayerExp = Player.CHAR_EXP_POINTS;
double ExpConstant = 0.04;
int StartExpLevel = 1;
int UpperExpLevel = 100;
double Level = 0;
double ExpPoints = 0;
ExpArrays[] arr;
arr = new ExpArrays[100];
//Format arr: Level, ExpPoints Needed
for(int i=0; i<=99; i++) {
arr[i] = new ExpArrays(i,(Math.pow((i+1), 2)/0.04));
}
ExpConfig = arr.clone();
for (int i = 0; i < arr.length; i++) {
System.out.println("Element at " + i + " : " + arr[i].Level_ID +" "+ arr[i].ExpPointsNeeded);
}
for(int i = 0; i < ExpConfig.length; i++) {
System.out.println("Element at " + i + " : " + ExpConfig[i].Level_ID +" "+ ExpConfig[i].ExpPointsNeeded);
}
}
public static void LoadExpLevels() {
int PlayerExp = Player.CHAR_EXP_POINTS;
double ExpConstant = 0.04;
int StartExpLevel = 1;
int UpperExpLevel = 100;
double Level = 0;
double ExpPoints = 0;
ExpArrays[] arr;
arr = new ExpArrays[100];
//Format arr: Level, ExpPoints Needed
for(int i=0; i<=99; i++) {
arr[i] = new ExpArrays(i,(Math.pow((i+1), 2)/0.04));
}
ExpConfig = arr.clone();
}
}
class ExpArrays {
public int Level_ID;
public double ExpPointsNeeded;
ExpArrays(int Level_ID, double ExpPointsNeeded)
{
this.Level_ID = Level_ID;
this.ExpPointsNeeded = ExpPointsNeeded;
}
}