finished the bulk of game
This commit is contained in:
22
src/enemies/dragon.cc
Normal file
22
src/enemies/dragon.cc
Normal file
@ -0,0 +1,22 @@
|
||||
#include "dragon.h"
|
||||
|
||||
#include "../constants.h"
|
||||
|
||||
dragon::dragon(RNG *rng, const feature enabled_features, const position &pos,
|
||||
const int gen_room_num):
|
||||
enemy_base{rng, enabled_features, rdragon, pos, gen_room_num, "D"} {}
|
||||
|
||||
void dragon::print(display *out) {
|
||||
out->print_char(pos, 'D', COLOR_PAIR(COLOR_RED));
|
||||
}
|
||||
|
||||
const char *dragon::get_race_name() const {
|
||||
return "Dragon";
|
||||
}
|
||||
|
||||
long_result dragon::act(level *lvl, character *pc, bool hostile) {
|
||||
if (is_adjacent(pos, pc->get_pos()) && hostile)
|
||||
return attack(pc);
|
||||
|
||||
return {fine, ""};
|
||||
}
|
Reference in New Issue
Block a user