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

30
src/potions/wound_atk.cc Normal file
View File

@ -0,0 +1,30 @@
#include "wound_atk.h"
#include <algorithm>
#include "../constants.h"
const int WOUND_ATK = 5;
const int WOUND_ATK_DROW = 7;
wound_atk::wound_atk(const position &pos):
potion{potion_type::wound_atk, -1, pos} {}
void wound_atk::apply(const enum race &race, int &HP, int &ATK, int &DEF,
fraction &base_hit_rate) {
if (remaining_duration > 0) {
if (race == rdrow)
ATK = std::max(ATK - WOUND_ATK_DROW, 0);
else
ATK = std::max(ATK - WOUND_ATK, 0);
--remaining_duration;
}
}
int wound_atk::get_priority() const {
return CALC_ADD_BASE;
}
const char *wound_atk::get_name() const {
return "WA";
}