/*
    dota-info
    Copyright (C) 2015  Sterling Pickens

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef GLOBALS_H
#define GLOBALS_H 1
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h> //memeset
#include <unistd.h> //sleep
#include <math.h>
#include "config.h"

#define HEROES 110

#define STR 0
#define AGI 1
#define INT 2

#define RANGED 1
#define MELEE 0

struct Attr{
	const char *name;
	uint8_t pri_attr;
	float base_s;
	float rate_s;
	float base_a;
	float rate_a;
	float base_i;
	float rate_i;
	uint16_t move_speed;
	float armor;
	float bat;
	uint8_t dam_min;
	uint8_t dam_max;
	uint16_t attack_range;
	uint16_t missile_speed;
	float attack_point;
	uint16_t day_sight;
	uint16_t night_sight;
	float turn_rate;
	uint8_t collision_size;
};

struct Level_Attr{
	float strength;
	float agility;
	float intelligence;
	float at_speed;
	float damage_min;
	float damage_max;
	float damage_avg;
	float damage_ps;
	float attacks_ps;
	float threesec;
	float health;
	float hp_ps;
	float armor;
	float effective_hp;
};


void Sleep(int time);
void Print_space(float num);
void Calc_Level_Attr(struct Level_Attr *level_attr, uint8_t hero, uint8_t level);

#endif
