#include "boost_atk.h"

#include <algorithm>
#include "constants.h"



boost_atk::boost_atk(const position &pos):
        potion{potion_type::BOOST_ATK, -1, pos} {}

void boost_atk::apply(const enum race &race, int &HP, int &ATK, int &DEF,
                      fraction &base_hit_rate) {
        if (remaining_duration != 0) {
                int tmp = BOOST_ATK;

                if (race == DROW)
                        tmp *= DROW_POTION_MUL;

                ATK  += tmp;
                --remaining_duration;
        }
}

int boost_atk::get_priority() const {
        return CALC_BASE;
}

const char *boost_atk::get_name() const {
        return "BA";
}
