Skip to content
Snippets Groups Projects
Commit a15c18cf authored by Ian Prins's avatar Ian Prins
Browse files

uncomment monster attack code

parent f603fe07
No related branches found
No related tags found
No related merge requests found
......@@ -64,13 +64,13 @@ void Monster::attack(Mob* mob) {
// TODO
/*
if (std::abs(this->location[0] - mob->getLocation()[0]) <= 1 && std::abs(this->location[1] - mob->getLocation()[1]) <= 1) {
if (rand() % 2 == 0) {
mob->hit(1);
}
}
*/
}
int Monster::calculateDamage() {
......@@ -123,4 +123,4 @@ int Monster::turn(Level* level) {
}
return 1;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment