#include "human.h"

#include "constants.h"
#include "level.h"

human::human(RNG *rng, const feature enabled_features, const position &pos,
             const int gen_room_num):
        enemy_base{rng, enabled_features, HUMAN, pos, gen_room_num, "H"} {}

const char *human::get_race_name() const {
        return "Human";
}

int human::dies(level *lvl) {
        lvl->add_gold(gold{pos, GOLD_NORMAL});
        auto plist = lvl->get_available_around_all(pos);

        if (plist.size())
                lvl->add_gold(gold{rng->get_rand_in_vector(plist), GOLD_NORMAL});
        else
                lvl->add_gold(gold{pos, GOLD_NORMAL});
        return 0;
}
