moved files out of subdirectories, added required documentation

This commit is contained in:
2024-07-25 13:08:39 -04:00
parent 546909b4aa
commit b04884e44a
96 changed files with 141 additions and 171 deletions

28
src/wound_def.cc Normal file
View File

@ -0,0 +1,28 @@
#include "wound_def.h"
#include <algorithm>
#include "constants.h"
wound_def::wound_def(const position &pos):
potion{potion_type::WOUND_DEF, -1, pos} {}
void wound_def::apply(const enum race &race, int &HP, int &ATK, int &DEF,
fraction &base_hit_rate) {
if (remaining_duration != 0) {
int tmp = WOUND_DEF;
if (race == DROW)
tmp *= DROW_POTION_MUL;
DEF = std::max(DEF - tmp, 0);
--remaining_duration;
}
}
int wound_def::get_priority() const {
return CALC_BASE;
}
const char *wound_def::get_name() const {
return "WD";
}