#include "Basic.h"
#include <Utils/Random.h>

Stat::Stat(): str(0.0f), dex(0.0f), acc(0.0f), spe(0.0f), intl(0.0f), vit(0.0f) {}

Stat::Stat(float given_str,
		   float given_dex,
		   float given_acc,
		   float given_spe,
		   float given_intl,
		   float given_vit):
	str(given_str),
	dex(given_dex), 
	acc(given_acc),
	spe(given_spe),
	intl(given_intl),
	vit(given_vit) {}


Range::Range(): value(0.0f), range(0.0f) {}

Range::Range(float given_value, float given_range): value(given_value), range(given_range) {}

LevelInfo::LevelInfo(): base(0.0f), increment(0.0f), multiplier(0.0f), modifier(0.0f) {}

LevelInfo::LevelInfo(float given_base, float given_increment, float given_multiplier, float given_modifier):
	base(given_base),
	increment(given_increment),
	multiplier(given_multiplier),
	modifier(given_modifier) {}
float LevelInfo::calculate(int level) const
{
	float value = base;

	for(int i = 0; i < level; ++i)
	{
		value += (value * multiplier + increment) * (gge::utils::Random<float>(-modifier, modifier) + 1);
	}

	return value;
}

unsigned int currentGameTime;
unsigned int inGameTime;
