[go: up one dir, main page]

Menu

[r4]: / grueworld / thing.cpp  Maximize  Restore  History

Download this file

39 lines (29 with data), 756 Bytes

 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
#include "common.hpp"
bool Thing::execute(Thing& src,Thing& dst){
//maybe this isn't needed or should this have been an eat
return false;
}
bool Thing::execute (Thing& dest) {
//maybe this isn't needed or should this have been an eat
return false;
}
bool Thing::EatMe(Avatar &hungry) {
return false;//does nothing
}
Thing::~Thing() {
}
void Thing::privateMessage(SENSES sense, string msg){
}
void Thing::tick(shared_ptr<Container> & location, unsigned int whichiteminlocation){
}
bool Thing::takeMe(Container&destination, Container&currentLocation) {
return true;//take me, baby
}
bool Poison::EatMe(Avatar &hungry){
hungry.addHealth(-2);
return true;
}
bool Food::EatMe(Avatar &hungry){
hungry.addHealth(1);
return true;
}