30 lines
662 B
C++
30 lines
662 B
C++
#include "boost_def.h"
|
|
|
|
#include <algorithm>
|
|
#include "../constants.h"
|
|
|
|
|
|
boost_def::boost_def(const position &pos):
|
|
potion{potion_type::BOOST_DEF, -1, pos} {}
|
|
|
|
void boost_def::apply(const enum race &race, int &HP, int &ATK, int &DEF,
|
|
fraction &base_hit_rate) {
|
|
if (remaining_duration != 0) {
|
|
int tmp = BOOST_DEF;
|
|
|
|
if (race == DROW)
|
|
tmp *= DROW_POTION_MUL;
|
|
|
|
DEF += tmp;
|
|
--remaining_duration;
|
|
}
|
|
}
|
|
|
|
int boost_def::get_priority() const {
|
|
return CALC_BASE;
|
|
}
|
|
|
|
const char *boost_def::get_name() const {
|
|
return "BD";
|
|
}
|