-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonsterObject.java
More file actions
182 lines (143 loc) · 3.94 KB
/
MonsterObject.java
File metadata and controls
182 lines (143 loc) · 3.94 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package my.quarker;
import java.util.Vector;
import net.slashie.libjcsi.CSIColor;
/**
*
* @author Eben
*/
public class MonsterObject extends BaseObject {
protected int mass, //current health of the monster
damage, //amount of base damage the monster will do
aim, agility, level, penetration, toughness, attackPower, deflection, satiation, //how full player will get from absorbing the monster
x, y; //current x,y coordinates for the monster
protected Vector<FeelingsObject> feelings = null;
protected boolean awake = false; //will tell us if the monster is active, default is not active
MonsterObject() {
super();
}
public MonsterObject(String myName, char represent, boolean passable,
CSIColor frontColor, CSIColor backColor, int hp, int damage, int attack,
int aim, int agility, int level, int penetration, int toughness,
int attackPower, int deflection,
int defense, int satiation) {
this.myName = myName;
this.represent = represent;
this.passable = passable;
this.mass = hp;
this.damage = damage;
this.satiation = satiation;
this.frontColor = frontColor;
this.backColor = backColor;
this.feelings = new Vector<FeelingsObject>();
}
public void deepCopy(MonsterObject mon) {
deepCopy((BaseObject) mon);
mass = mon.mass;
damage = mon.damage;
aim = mon.aim;
agility = mon.agility;
level = mon.level;
penetration = mon.penetration;
toughness = mon.toughness;
attackPower = mon.attackPower;
deflection = mon.deflection;
satiation = mon.satiation;
}
public int getAgility() {
return agility;
}
public void setAgility(int agility) {
this.agility = agility;
}
public int getAttackPower() {
return attackPower;
}
public void setAttackPower(int attackPower) {
this.attackPower = attackPower;
}
public boolean isAwake() {
return awake;
}
public void setAwake(boolean awake) {
this.awake = awake;
}
public int getDeflection() {
return deflection;
}
public void setDeflection(int deflection) {
this.deflection = deflection;
}
public Vector<FeelingsObject> getFeelings() {
return feelings;
}
public void setFeelings(Vector<FeelingsObject> feelings) {
this.feelings = feelings;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public int getMass() {
return mass;
}
public void setMass(int mass) {
this.mass = mass;
}
public int getPenetration() {
return penetration;
}
public void setPenetration(int penetration) {
this.penetration = penetration;
}
public int getToughness() {
return toughness;
}
public void setToughness(int toughness) {
this.toughness = toughness;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public int getAim() {
return aim;
}
public void setAim(int aim) {
this.aim = aim;
}
public int getDamage() {
return damage;
}
public void setDamage(int damage) {
this.damage = damage;
}
public int getSatiation() {
return satiation;
}
public void setSatiation(int satiation) {
this.satiation = satiation;
}
public void applyDamage(int hurts) {
mass -= hurts;
}
public void wakeUp() {
awake = true;
}
public void goToSleep() {
awake = false;
}
}