-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfish.cpp
More file actions
84 lines (63 loc) · 1.24 KB
/
fish.cpp
File metadata and controls
84 lines (63 loc) · 1.24 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
#include "fish.h"
#include "host.h"
#include <iostream>
#include <string>
Host& fish::host = RetrieveHost();
void fish::setID(int id){
if (iId == INVALID_VALUE) iId = id;
}
fish::fish():iId(INVALID_VALUE){
setID(host.AllocateID(this));
}
fish::~fish(){}
bool fish::move(int x, int y){
return host.move(iId, x, y);
}
bool fish::attack(int x, int y){
return host.attack(iId, x, y);
}
int fish::getPoint(){
return host.getPropertyPoint(iId);
}
int fish::getLevel(){
return host.getLevel(iId);
}
int fish::getExp(){
return host.getExp(iId);
}
int fish::getX(){
return host.getX(iId);
}
int fish::getY(){
return host.getY(iId);
}
int fish::getHP(){
return host.getHP(iId);
}
int fish::getMaxHP(){
return host.getMaxHP(iId);
}
int fish::getAtt(){
return host.getAtt(iId);
}
int fish::getSp(){
return host.getSp(iId);
}
int fish::getID(){
return iId;
}
int fish::askWhat(int x, int y){
return host.getMapContentWithId(x, y, iId);
}
int fish::askHP(int id){
return host.getHP(id);
}
bool fish::increaseHealth(){
return host.increaseHealth(iId);
}
bool fish::increaseStrength(){
return host.increaseStrength(iId);
}
bool fish::increaseSpeed(){
return host.increaseSpeed(iId);
}