removed all C-style casts

This commit is contained in:
2024-07-18 17:56:00 -04:00
parent 8f00e903e8
commit 1a9c04ad5a
36 changed files with 212 additions and 92 deletions

View File

@ -87,18 +87,6 @@ long_result enemy_base::get_hit(character *ch, const int tATK,
}
int enemy_base::dies(level *lvl) {
if (race == race::rdragon) {
return 0;
} else if (race == race::rmerchant) {
lvl->add_gold(gold{pos, GOLD_MERCHANT});
return 0;
} else if (race == race::rhuman) {
lvl->add_gold(gold{pos, GOLD_NORMAL});
auto plist = lvl->get_available_around_all(pos);
lvl->add_gold(gold{rng->get_rand_in_vector(plist), GOLD_NORMAL});
return 0;
}
return rand_gold_drop(rng);
}
@ -109,3 +97,7 @@ enemy_base *get_enemy_at(const position &pos, const enemy_list &elist) {
return nullptr;
}
void enemy_base::print(output *out) {
out->print_char(pos, CHAR_REP[race], COLOR_PAIR(COLOR_RED));
}