-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPokemon.java
261 lines (241 loc) · 5.12 KB
/
Pokemon.java
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/*
*
* @author Alex Twomey
*
*/
public class Pokemon{
//-----------------------------------------------------------
//name
private String name = "";
//number stats
private int hp = 0;
private int att = 0;
private int def = 0;
//private int acc = 0;
private int spd = 0;
private String type = "";
private int m1PP = 0;
private int m2PP = 0;
private int m3PP = 0;
private int m4PP = 0;
private String m1Name = "";
private String m2Name = "";
private String m3Name = "";
private String m4Name = "";
private boolean alive = true;
/*********************
* Stats Key
* hp - Health
* att - Attack
* def - Defense
* acc - Accuracy
* spd - Speed
********************/
//-----------------------------------------------------------
public Pokemon(){
/*
name = statsIn[0];
hp = Integer.parseInt(statsIn[1]);
att = Integer.parseInt(statsIn[2]);
def = Integer.parseInt(statsIn[3]);
acc = Integer.parseInt(statsIn[4]);
spd = Integer.parseInt(statsIn[5]);
*/
}
//-----------------------------------------------------------
//name getter/setter
public String getName(){
return name;
}
public void setName(String nameIn){
name = nameIn;
}
//Move 1
public String getM1Name(){
return m1Name;
}
public void setM1Name(String nameIn){
m1Name = nameIn;
}
//Move 2
public String getM2Name(){
return m2Name;
}
public void setM2Name(String nameIn){
m2Name = nameIn;
}
//Move 3
public String getM3Name(){
return m3Name;
}
public void setM3Name(String nameIn){
m3Name = nameIn;
}
//Move 4
public String getM4Name(){
return m4Name;
}
public void setM4Name(String nameIn){
m4Name = nameIn;
}
//-----------------------------------------------------------------
//PP section
public int getM1PP(){
return m1PP;
}
public void setM1PP(int in){
m1PP = in;
}
public void lowerM1PP(){
m1PP -= 1;
}
//
public int getM2PP(){
return m2PP;
}
public void setM2PP(int in){
m2PP = in;
}
public void lowerM2PP(){
m2PP -= 1;
}
//
public int getM3PP(){
return m3PP;
}
public void setM3PP(int in){
m3PP = in;
}
public void lowerM3PP(){
m3PP -= 1;
}
//
public int getM4PP(){
return m4PP;
}
public void setM4PP(int in){
m4PP = in;
}
public void lowerM4PP(){
m4PP -= 1;
}
//-----------------------------------------------------
//Types
public String getType(){
return type;
}
public void setType(String t){
type = t;
}
//-----------------------------------------------------------
//att getter/setter/increment/decrement
public int getAtt(){
return att;
}
public void setAtt(int attIn){
att = attIn;
}
public void raiseAtt(int attUp){
att += attUp;
}
public void lowerAtt(int attDown){
att -= attDown;
}
//-----------------------------------------------------------
//def getter/setter/increment/decrement
public int getDef(){
return def;
}
public void setDef(int defIn){
def = defIn;
}
public void raiseDef(int defUp){
def += defUp;
}
public void lowerDef(int defDown){
def -= defDown;
}
//-----------------------------------------------------------
//spd getter/setter/increment/decrement
public int getSpd(){
return spd;
}
public void setSpd(int spdIn){
spd = spdIn;
}
public void raiseSpd(int spdUp){
spd += spdUp;
}
public void lowerSpd(int spdDown){
spd -= spdDown;
}
/*
//acc getter/setter/increment/decrement
public int getAcc(){
return acc;
}
public void setAcc(int accIn){
acc = accIn;
}
public void raiseAcc(int accUp){
acc += accUp;
}
public void lowerAcc(int accDown){
acc -= accDown;
}
*/
//-----------------------------------------------------------
//hp getter/setter/increment/decrement
public int getHp(){
return hp;
}
public void setHp(int hpIn){
hp = hpIn;
}
public void raiseHp(int hpUp){
hp += hpUp;
}
public void lowerHp(int hpDown){
hp -= hpDown;
alive = checkIfDead();
}
public boolean getAlive(){
return alive;
}
public boolean checkIfDead(){
if(getHp() <= 0){
return false;
}
else return true;
}
//-----------------------------------------------------------
//Abstract movelist
public void move1(Pokemon enemy){};
public void move2(Pokemon enemy){};
public void move3(Pokemon enemy){};
public void move4(Pokemon enemy){};
}
/*
Steel
normal
bug
poison
dark
electric
water
fairy
psychic
ice
flying
ghost
fire
grass
fire
water
psychic
bug
electric
ghost
dark
grass
*/