aboutsummaryrefslogtreecommitdiff
path: root/backend/ExpConsumableObject.cpp
blob: 77aa37ed402defbf51bd7e82f73db1511790714f (plain)
1
2
3
4
5
6
7
8
9
10
#include "Player.h"
#include "RNG.h"
#include "ExpConsumableObject.h"

void ExpConsumableObject::consume(Player & player) {
	float min = static_cast<float>(this->get_potency().min) / 100;
	float max = static_cast<float>(this->get_potency().max) / 100;
	player.add_attack(RNG::get().rand_double(min, max));
}