Merge branch 'paul' into AL/races-potions

This commit is contained in:
a25liang
2024-07-13 16:04:17 -04:00
34 changed files with 1221 additions and 359 deletions

View File

@ -2,16 +2,16 @@
#include <algorithm>
restore_health::restore_health():
potion{potion_type::restore_health, 1} {}
restore_health::restore_health(const position &pos):
potion{potion_type::restore_health, -1, pos} {}
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]);
void restore_health::apply(const enum race &race, int &HP, int &ATK, int &DEF,
fraction &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]);
--remaining_duration;
}