-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStuyvesant.java
44 lines (40 loc) · 987 Bytes
/
Stuyvesant.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
//Andreas Wang, Kyle Oleksiuk, Cardi Wei
//Pd 8
//HW 26
//2013-11-18
public class Stuyvesant extends Character {
private String name;
public Stuyvesant() {
HP = 300;
str= 100;
def= 70;
crt= 0;
}
public Stuyvesant(String n) {
this();
name = n;
}
public String getName() {
return name;
}
public void specialize(){
str = 125;
def = 50;
}
public void normalize() {
str = 100;
def = 70;
}
public String about() {
String a = "The Stuyvesant Student is very sleepy; he passes out every other turn. \n";
String b = "Hit Points: " + HP + "\n";
String c = "Strength: " + str + "\n";
String d = "Defense: " + def + "\n";
String e = "Critical Hit Rating: " + crt + "\n";
return a + b + c + d + e;
}
public int heal(){
lowerHP(-25);
return 25;
}
}