moved files out of subdirectories, added required documentation
This commit is contained in:
24
src/berzerk_brew.cc
Normal file
24
src/berzerk_brew.cc
Normal file
@ -0,0 +1,24 @@
|
||||
#include "berzerk_brew.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "constants.h"
|
||||
|
||||
berzerk_brew::berzerk_brew(const position &pos):
|
||||
potion{potion_type::BERZERK_BREW, DURATION, pos} {}
|
||||
|
||||
void berzerk_brew::apply(const enum race &race, int &HP, int &ATK,
|
||||
int &DEF, fraction &base_hit_rate) {
|
||||
if (remaining_duration != 0) {
|
||||
ATK *= ATK_MUL * (race == DROW ? DROW_POTION_MUL : 1);
|
||||
DEF *= DEF_MUL * (race == DROW ? DROW_POTION_MUL : 1);
|
||||
--remaining_duration;
|
||||
}
|
||||
}
|
||||
|
||||
int berzerk_brew::get_priority() const {
|
||||
return CALC_MID;
|
||||
}
|
||||
|
||||
const char *berzerk_brew::get_name() const {
|
||||
return "BB";
|
||||
}
|
Reference in New Issue
Block a user