This commit is contained in:
a25liang
2024-07-12 16:41:42 -04:00
parent e7865b0c57
commit 50f058e7ea
57 changed files with 853 additions and 871 deletions

View File

@ -3,20 +3,20 @@
#include <algorithm>
restore_health::restore_health():
potion{potion_type::restore_health, 1} {}
potion{potion_type::restore_health, 1} {}
void restore_health::apply(enum race &race, int &HP, int &ATK, int &DEF,
float &base_hit_rate) {
if (remaining_duration > 0) {
if (race == rdrow)
HP = std::min(HP + 7, MAX_HP[race]);
else
HP = std::min(HP + 5, MAX_HP[race]);
if (remaining_duration > 0) {
if (race == rdrow)
HP = std::min(HP + 7, MAX_HP[race]);
else
HP = std::min(HP + 5, MAX_HP[race]);
--remaining_duration;
}
--remaining_duration;
}
}
int restore_health::get_priority() const {
return CALC_ADD_BASE;
return CALC_ADD_BASE;
}