fixed potions not working properly

need to test: vampire draining
This commit is contained in:
2024-07-15 10:35:28 -04:00
parent a97e30c8a7
commit 8e52309626
9 changed files with 12 additions and 10 deletions

View File

@ -4,11 +4,11 @@
#include "../constants.h"
restore_health::restore_health(const position &pos):
potion{potion_type::restore_health, -1, pos} {}
potion{potion_type::restore_health, 1, pos} {}
void restore_health::apply(const enum race &race, int &HP, int &ATK, int &DEF,
fraction &base_hit_rate) {
if (remaining_duration > 0) {
if (remaining_duration != 0) {
if (race == rdrow)
HP = std::min(HP + 7, MAX_HP[race]);
else