changed all non-owned unique_ptr access to reference to the object itself
This commit is contained in:
@ -1,22 +0,0 @@
|
||||
#include "restore_health.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
restore_health::restore_health():
|
||||
potion{potion_type::restore_health, -1} {}
|
||||
|
||||
void restore_health::apply(enum race &race, int &HP, int &ATK, int &DEF,
|
||||
float &base_hit_rate) {
|
||||
if (remaining_duration > 0) {
|
||||
if (race == rdrow)
|
||||
HP = std::min(HP + 7, MAX_HP[race]);
|
||||
else
|
||||
HP = std::min(HP + 5, MAX_HP[race]);
|
||||
|
||||
--remaining_duration;
|
||||
}
|
||||
}
|
||||
|
||||
int restore_health::get_priority() const {
|
||||
return CALC_ADD_BASE;
|
||||
}
|
Reference in New Issue
Block a user