added extra potions
This commit is contained in:
28
src/potions/tempest_tantrum.cc
Normal file
28
src/potions/tempest_tantrum.cc
Normal file
@ -0,0 +1,28 @@
|
||||
#include "tempest_tantrum.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "../constants.h"
|
||||
|
||||
tempest_tantrum::tempest_tantrum(const position &pos):
|
||||
potion{potion_type::tempest_tantrum, DURATION, pos} {}
|
||||
|
||||
void tempest_tantrum::apply(const enum race &race, int &HP, int &ATK,
|
||||
int &DEF, fraction &base_hit_rate) {
|
||||
if (remaining_duration == DURATION)
|
||||
HP -= HP_RD_PERCENTAGE * HP *
|
||||
(race == rdrow ? DROW_POTION_MUL : 1);
|
||||
|
||||
if (remaining_duration != 0) {
|
||||
ATK *= ATK_MUL * (race == rdrow ? DROW_POTION_MUL : 1);
|
||||
DEF *= DEF_MUL * (race == rdrow ? DROW_POTION_MUL : 1);
|
||||
--remaining_duration;
|
||||
}
|
||||
}
|
||||
|
||||
int tempest_tantrum::get_priority() const {
|
||||
return CALC_LAST;
|
||||
}
|
||||
|
||||
const char *tempest_tantrum::get_name() const {
|
||||
return "TT";
|
||||
}
|
Reference in New Issue
Block a user