changes to characters and potions, work in progress

This commit is contained in:
2024-07-13 00:59:52 -04:00
parent afc2b9fa12
commit f2d2f6f72d
22 changed files with 215 additions and 76 deletions

View File

@ -3,10 +3,10 @@
#include <algorithm>
restore_health::restore_health():
potion{potion_type::restore_health, -1} {}
potion{potion_type::restore_health, -1, {0, 0}} {}
void restore_health::apply(enum race &race, int &HP, int &ATK, int &DEF,
float &base_hit_rate) {
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]);