forked from basilnsindhu/Text-Adventure-in-the-Making
/
Warrior.java
35 lines (30 loc) · 1000 Bytes
/
Warrior.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
import java.io.Serializable;
import java.util.ArrayList;
public class Warrior implements Character, Serializable{
private int spd, str, def, lck, mag;
private String gameClass;
private ArrayList<Magic> magic;
public void createChar() {
this.gameClass = "Warrior";
this.str = 5;
this.def = 4;
this.spd = 3;
this.lck = 1;
this.mag = 1;
this.magic = new ArrayList<Magic>();
}
public int regAtk(){
return str;
}
public int getStr() { return this.str; }
public int getDef() { return this.def; }
public int getMag(){ return this.mag; }
public int getSpd() { return this.spd; }
public int getLck(){ return this.lck; }
public String getGameClass() { return this.gameClass; }
public void setStr(int x) {this.str = x; }
public void setDef(int x) {this.def = x; }
public void setMag(int x) {this.mag = x; }
public void setSpd(int x) {this.spd = x; }
public void setLck(int x) {this.lck = x; }
}