finished the bulk of game
This commit is contained in:
30
src/potions/boost_atk.cc
Normal file
30
src/potions/boost_atk.cc
Normal file
@ -0,0 +1,30 @@
|
||||
#include "boost_atk.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "../constants.h"
|
||||
|
||||
const int BOOST_ATK = 5;
|
||||
const int BOOST_ATK_DROW = 7;
|
||||
|
||||
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) {
|
||||
if (race == rdrow)
|
||||
ATK += BOOST_ATK_DROW;
|
||||
else
|
||||
ATK += BOOST_ATK;
|
||||
|
||||
--remaining_duration;
|
||||
}
|
||||
}
|
||||
|
||||
int boost_atk::get_priority() const {
|
||||
return CALC_ADD_BASE;
|
||||
}
|
||||
|
||||
const char *boost_atk::get_name() const {
|
||||
return "BA";
|
||||
}
|
Reference in New Issue
Block a user