-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEkans.java
112 lines (107 loc) · 2.1 KB
/
Ekans.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
import cs1.Keyboard;
public class Ekans extends Pokemon {
public Ekans(){
_hp = 35;
_atk = 60;
_spatk = 40;
_def = 44;
_spdef = 54;
_spd = 55;
acc = 100;
_type = "poison";
type = "poison";
_type2 = "";
name = "Ekans";
updateStats();
heal();
allMoves = new String[] {"Wrap","Leer","Poison Sting","Bite","Glare", "Screech","Acid"};
levelLearn = new int[] {1,1,10,17,27,36,47};
}
public Ekans(int level){
this();
lvl = level;
giveMoves(level);
if (level >= 22) {
name = "Arbok";
_hp = 60;
_atk = 85;
_spatk = 65;
_def = 69;
_spdef = 79;
_spd = 80;
}
updateStats();
heal();
}
public void name(int level) throws InterruptedException{
if (level == 22) {
System.out.println("Your Ekans has evolved into a Arbok!");
System.out.println("---------------------------------------------");
Thread.sleep(1000);
name = "Arbok";
_hp = 60;
_atk = 85;
_spatk = 65;
_def = 69;
_spdef = 79;
_spd = 80;
}
}
public void moves(int pick, Pokemon enemy){
String move = moveSet[pick - 1];
if (move.equals("Wrap")){
normal = true;
setType("normal");
power = 15;
acc = 85;
}
if (move.equals("Poison Sting")){
special = true;
setType("poison");
power = 15;
acc = 100;
if (Math.random() * 10 < 3){
status = true;
statusName = "poisoned";
}
}
if (move.equals("Leer")){
debuff = true;
debuffStat = "def";
debuffNum = -1;
acc = 100;
}
if (move.equals("Bite")){
normal = true;
setType("normal");
power = 60;
acc = 100;
if (Math.random() * 10 < 3){
status = true;
statusName = "flinch";
}
}
if (move.equals("Glare")){
status = true;
statusName = "paralysis";
acc = 75;
}
if (move.equals("Screech")){
debuff = true;
debuffStat = "def";
debuffNum = -2;
acc = 85;
}
if (move.equals("Acid")){
special = true;
setType("poison");
power = 40;
acc = 100;
if (Math.random() * 10 < 1){
debuff = true;
debuffStat = "def";
debuffNum = -1;
}
}
}
}