-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeach.java
66 lines (55 loc) · 2.28 KB
/
Peach.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
import java.util.Random;
public class Peach extends Adventurer {
int starsMax, stars;
public Peach(String Input){
super(Input, 14);
starsMax = 3;
stars = starsMax;
}
public Peach(){
super("Peach", 14);
starsMax = 3;
stars = starsMax;
}
public String getSpecialName(){
return "stars";
}
public int getSpecial(){
return stars;
}
public int getSpecialMax(){
return starsMax;
}
public void setSpecial(int n){
stars = n;
}
public String attack(Adventurer other){
int damage = (int) (Math.random() + 1);
other.applyDamage(damage);
return this.getName() + " pierces " + other.getName() + " with her colorful bright pink parasol, dealing " + damage + " points of damage.";
}
public String support(Adventurer other){
// maybe we could give her like 3-5 pts of instant healing before healing over time
int instantHealing = (int) (Math.random() * 2) +3;
other.heal(instantHealing);
// something to apply healing status effect
return this.getName() + " blesses " + other.getName() + " with with the power of peach nectar, healing " + instantHealing + " health to " + other.getName() + ".";
}
public String support(){
// maybe we could give her like 3-5 pts of instant healing before healing over time
int instantHealing = (int) (Math.random() * 2) +3;
this.heal(instantHealing);
// something to apply healing status effect
return this.getName() + " blesses herself with with the power of peach nectar, healing " + instantHealing + " health to herself.";
}
public String specialAttack(Adventurer other){
if (this.getSpecial() <= 0)return this.getName() + " wastes her turn looking for stars that no longer exist in the night sky";
else if (this.getSpecial() > 0){
other.setSleep(true);
setSpecial(getSpecial() - 1);
return this.getName() + " uses the power of the beautiful night sky to lull " + other.getName() + " to sleep, consuming one " + this.getSpecialName() + ". ";
}
// smth with the status effect
return "Unable to use this move due to insufficient " + this.getSpecialName();
}
}