merged AL-races

This commit is contained in:
2024-07-11 12:32:12 -04:00
9 changed files with 122 additions and 19 deletions

View File

@ -33,7 +33,7 @@ int character::get_gold() const {
}
float character::get_hitrate() const {
return base_hitrate;
return base_hit_rate;
}
bool character::is_hostile() const {
@ -61,7 +61,7 @@ void character::set_gold(const int ngold) {
}
void character::set_hitrate(const float nhitrate) {
base_hitrate = nhitrate;
base_hit_rate = nhitrate;
}
void character::set_hostile(const bool is_hostile) {
@ -174,3 +174,9 @@ result character::move_or_attack(const direction dir,
return this->attack(dir, chlist);
}
int calc_dmg(const int ATK, const int DEF) {
return ceil((100 / (100 + DEF)) * ATK);
}