TODO: modify other races constructors
did some reworking
This commit is contained in:
@ -2,9 +2,8 @@
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
||||
vampire::vampire(RNG *rng, const position_list &available_positions):
|
||||
character{rng, race::rshade} {
|
||||
pos = available_positions[rng->rand_under(available_positions.size())];
|
||||
vampire::vampire(RNG *rng, const position &pos):
|
||||
character{rng, race::rshade, pos} {
|
||||
gold = 0;
|
||||
hostile = true;
|
||||
}
|
||||
@ -13,8 +12,8 @@ result vampire::attack(const direction dir, character_list &chlist) {
|
||||
position tmp{pos + MOVE[dir]};
|
||||
|
||||
for (auto &ch : chlist)
|
||||
if (tmp == ch.get_position()) {
|
||||
auto res = ch.get_hit(race, ATK, base_hit_rate);
|
||||
if (tmp == ch->get_position()) {
|
||||
auto res = ch->get_hit(race, ATK, base_hit_rate);
|
||||
|
||||
if (res != result::miss) {
|
||||
HP += GAIN_HP;
|
||||
|
Reference in New Issue
Block a user