-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonsters.java
More file actions
106 lines (84 loc) · 2.01 KB
/
Monsters.java
File metadata and controls
106 lines (84 loc) · 2.01 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
import java.util.ArrayList;
//define monster information
public abstract class Monsters implements Character{
private String name;
private int experiences;
private int level;
private int HP;
private int damage;
private int defense;
private int dodge;
private int monsterRow;
private int monsterCol;
private int index;
public Monsters(String name, int level, int damage, int defense, int dodge){
this.name = name;
this.level = level;
this.damage = damage;
this.defense = defense;
this.dodge = dodge;
monsterRow = 0;
monsterCol = 0;
index = 0;
this.HP = level * 100;
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public int getHP() {
return HP;
}
public void setHP(int HP) {
this.HP = HP;
}
public int getDamage() {
return damage;
}
public void setDamage(int damage) {
this.damage = damage;
}
public int getDefense() {
return defense;
}
public void setDefense(int defense) {
this.defense = defense;
}
public int getDodge() {
return dodge;
}
public void setDodge(int dodge) {
this.dodge = dodge;
}
public int getMonsterRow() {
return monsterRow;
}
public void setMonsterRow(int monsterRow) {
this.monsterRow = monsterRow;
}
public int getMonsterCol() {
return monsterCol;
}
public void setMonsterCol(int monsterCol) {
this.monsterCol = monsterCol;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
@Override
public void LeaveCurrentLocation(Map map){
map.MonsterLeave(this.monsterCol, this.monsterRow);
}
}