23 lines
600 B
C++
23 lines
600 B
C++
#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(output *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, ""};
|
|
}
|