-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonsterList.java
346 lines (295 loc) · 9.88 KB
/
MonsterList.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
import java.util.ArrayList;
import java.util.Random;
//MonsterList: defines monsters and randomly selects them
public class MonsterList{
private ArrayList<Monster> monsters;//the list of all possible monsters in the game
public static Player g_player;
//getmonster --> returns a random monster form are list
public Monster getMonster(Player p){
boolean validMonster = false;
int result = 0;
Random rand = new Random();
while(!validMonster){
result = rand.nextInt(monsters.size());
if(monsters.get(result).level <= p.level){
validMonster = true;
}
}
//return the monster
return monsters.get(result);
}
//constructor (cunstructs the list of monsters)
public MonsterList(){
monsters = new ArrayList();
addGiantRat();
addCyclops();
addAngry_Zombie();
addFast_Zombie();
addZombie();
addDragon();
addBaby_Dragon();
addUnicorn();
addTinyBat();
addGiantSpider();
}
//adds a Giant Rat monster
private void addGiantRat(){
String name = "Giant Rat";
String desc = "A foul rat, as big as a small child reares up before you. it looks at you with hunger in it eyes." +
"\n __ __ "+
"\n / \\_____/ \\ "+
"\n | o o | "+
"\n \\ (o) (o) / "+
"\n _| ___ |_ "+
"\n / | ___ | \\ "+
"\n | \\ / | "+
"\n ===== () ===== "+
"\n / || || \\ "+
"\n/ \\\\ // \\ "+
"\n| ^^ ^^ | "+
"\n\\ / "+
"\n \\ _________ /==============----- "+
"\n /// \\\\\\ ";
String attackDesc = "bites You";
int level = 1;
int health = 5;
int attack = 8;
int damage = 2;
int defense = 10;
int protection = 1;
int speed = 12;
int xp = 10;
int gold = 5;
int food = 50;
int basic = 1;
int advanced = 0;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//adds to list
monsters.add(temp);
}
//adds a MicroScopic Bat monster
private void addTinyBat(){
String name = "Tiny Bat";
String desc = "A microscopic bat, as small as a grain of salt reares down befor you. it looks at you with hunger in it eyes." +
"\n /( )\\ " +
"\n | -^^- | " +
"\n \\_ `' _/ " +
"\n \\ ) " +
"\n )/ " +
"\n (' ";
String attackDesc = "bites You";
int level = 1;
int health = 5;
int attack = 5;
int damage = 1;
int defense = 8;
int protection = 1;
int speed = 16;
int xp = 10;
int gold = 5;
int food = 50;
int basic = 1;
int advanced = 0;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//adds to list
monsters.add(temp);
}
//adds a Gaint Spider monster
private void addGiantSpider(){
String name = "Giant Spider";
String desc = "A hidious Spider, as big as a small child reares up befor you. it looks at you with hunger in it eyes.";
String attackDesc = "bites You";
int level = 1;
int health = 10;
int attack = 10;
int damage = 5;
int defense = 8;
int protection = 4;
int speed = 8;
int xp = 30;
int gold = 15;
int food = 100;
int basic = 2;
int advanced = 0;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//adds to list
monsters.add(temp);
}
//adds a Cyclops monster
private void addCyclops(){
String name = "Cyclops";
String desc = "A twenty foot tall gaint peers menacingly at you with his single large eye.";
String attackDesc = "swings his hammer at you";
int level = 10;
int health = 50;
int attack = 18;
int damage = 20;
int defense = 8;
int protection = 15;
int speed = -5;
int xp = 300;
int gold = 2000;
int food = 1000;
int basic = 0;
int advanced = 1;
int epic = 1;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds an Angry_Zombie monster
private void addAngry_Zombie(){
String name = "Angry Zombie";
String desc = "A Once Living person got lost in this dungeon with firends that anggered him and he has been wondering around looking for BRAINS!!";
String attackDesc = "Swings Branch at you";
int level = 4;
int health = 35;
int attack = 20;
int damage = 12;
int defense = 10;
int protection = 2;
int speed = 5;
int xp = 150;
int gold = 150;
int food = 10;
int basic = 2;
int advanced = 2;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds a Zombie monster
private void addZombie(){
String name = "Zombie";
String desc = "A Once Living person got lost in this dungeon and has been wondering around looking for BRAINS!!";
String attackDesc = "swings his arms at you";
int level = 2;
int health = 20;
int attack = 10;
int damage = 5;
int defense = 5;
int protection = 2;
int speed = 5;
int xp = 150;
int gold = 100;
int food = 10;
int basic = 3;
int advanced = 1;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc,level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds a Fast_Zombie monster
private void addFast_Zombie(){
String name = "Fast Zombie";
String desc = "A Once Living athlete got lost in this dungeon and has been wondering around looking for BRAINS!!";
String attackDesc = "swings his arms at you";
int level = 3;
int health = 20;
int attack = 5;
int damage = 5;
int defense = 5;
int protection = 5;
int speed = 20;
int xp = 50;
int gold = 100;
int food = 10;
int basic = 3;
int advanced = 1;
int epic = 0;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds a Dragon monster
private void addDragon(){
String name = "Dragon";
String desc = "This mystical creature is asleep... it awakens will you be burnt to a crisp!!";
String attackDesc = "Blows Fire at you";
int level = 15;
int health = 400;
int attack = 200;
int damage = 170;
int defense = 150;
int protection = 60;
int speed = 0;
int xp = 3000;
int gold = 1000;
int food = 160;
int basic = 1;
int advanced = 2;
int epic = 5;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds a Baby_Dragon monster
private void addBaby_Dragon(){
String name = "Baby Dragon";
String desc = "This mystical creature is asleep... it awakens will you be burnt to a crisp.";
String attackDesc = "Blows Fire at you";
int level = 10;
int health = 200;
int attack = 100;
int damage = 85;
int defense = 75;
int protection = 30;
int speed = 1;
int xp = 1500;
int gold = 500;
int food = 80;
int basic = 0;
int advanced = 3;
int epic = 2;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
//adds a Unicron monster
private void addUnicorn(){
String name = "Unicorn";
String desc = "This mystical creature has been locked down here for ages and so it is easily anngered buy the slightest movement.";
String attackDesc = "Stabs You With It's Horn";
int level = 15;
int health = 200;
int attack = 100;
int damage = 85;
int defense = 75;
int protection = 15;
int speed = 8;
int xp = 500;
int gold = 250;
int food = 65;
int basic = 3;
int advanced = 1;
int epic = 1;
Monster temp = new Monster(name, desc, attackDesc, level,
health, attack, damage, defense, protection, speed,
xp, gold, food, basic, advanced, epic);
//add list
monsters.add(temp);
}
}