-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerObject.java
More file actions
88 lines (74 loc) · 1.69 KB
/
PlayerObject.java
File metadata and controls
88 lines (74 loc) · 1.69 KB
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
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package my.quarker;
import net.slashie.libjcsi.CSIColor;
/**
*
* @author ehoward
*/
public class PlayerObject extends MonsterObject {
private int maxHp = 40;
private int size = 1;
private int nextSize = 8;
private int viewRange = 5;
public PlayerObject() {
myName = "Player";
represent = '@';
passable = true;
frontColor = CSIColor.WHITE;
}
public void initialize(){
setMass(maxHp);
setLevel(1);
setDamage(5);
setAim(5);
setAgility(5);
setPenetration(5);
setToughness(5);
setAttackPower(5);
setDeflection(5);
}
public void levelUp(){
maxHp +=10;
damage +=2;
aim +=3;
agility +=3;
penetration +=2;
toughness+=2;
attackPower+=3;
deflection+=2;
}
public void deepCopy(PlayerObject obj){
deepCopy((MonsterObject)obj);
maxHp = obj.maxHp;
size = obj.size;
nextSize = obj.nextSize;
viewRange = obj.viewRange;
}
public int getMaxHp() {
return maxHp;
}
public void setMaxHp(int maxHp) {
this.maxHp = maxHp;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public int getNextSize() {
return nextSize;
}
public void setNextSize(int nextSize) {
this.nextSize = nextSize;
}
public int getViewRange() {
return viewRange;
}
public void setViewRange(int viewRange) {
this.viewRange = viewRange;
}
}