-impl all potions, and race: drow
This commit is contained in:
26
src/wound_atk.cc
Normal file
26
src/wound_atk.cc
Normal file
@ -0,0 +1,26 @@
|
||||
#include "wound_atk.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
const int WOUND_ATK = 5;
|
||||
const int WOUND_ATK_DROW = 7;
|
||||
|
||||
wound_atk::wound_atk():
|
||||
potion{potion_type::wound_atk, -1} {}
|
||||
|
||||
void wound_atk::apply(enum race &race, int &HP, int &ATK, int &DEF,
|
||||
float &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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user