finished the bulk of game

This commit is contained in:
2024-07-14 21:32:41 -04:00
parent b3475b7530
commit af8bc4112c
110 changed files with 1876 additions and 1481 deletions

View File

@ -0,0 +1,27 @@
#include "restore_health.h"
#include <algorithm>
#include "../constants.h"
restore_health::restore_health(const position &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 (race == rdrow)
HP = std::min(HP + 7, MAX_HP[race]);
else
HP = std::min(HP + 5, MAX_HP[race]);
--remaining_duration;
}
}
int restore_health::get_priority() const {
return CALC_ADD_BASE;
}
const char *restore_health::get_name() const {
return "RH";
}