/* tables.h
 * Definitions and tables for XdY+
 */

#ifndef tables_h
#define tables_h

typedef enum
{
	CLASS_WARRIOR = 0, CLASS_MAGE, CLASS_PRIEST, CLASS_ROGUE,
	CLASS_RANGER, CLASS_PALADIN
} character_class;

extern char *class_name[6];

typedef enum
{
	RACE_HUMAN = 0, RACE_HALFELF, RACE_ELF, RACE_HOBBIT, RACE_GNOME, RACE_DWARF,
	RACE_HALFORC, RACE_HALFTROLL, RACE_DUNADAN, RACE_HIGHELF
} character_race;

extern char *race_name[10];

/* Strength / SWI / +to_hit / weight_limit / +to_dam */
typedef struct
{
	int str,swi,hit_bonus; double w_limit; int dam_bonus;
} str_tableline;
extern str_tableline str_table[39];

typedef struct { int dex; int hit_bonus; } dth_tableline;
extern dth_tableline dex_modtohit[19];

/* Weapon speed modifier, indexed on class */
extern double class_wsm[6];
/* Minimum weapon weight divisor, indexed on class */
extern double class_mww[6];

/* Max attacks/round, indexed on class */
extern int max_attacks[6];

/* dex/SWI table for attacks/round ie. this[dex].bpr[SWI] == bpr, ish. */
typedef struct { int dex; int bpr[12]; } bpr_tableline;
extern bpr_tableline blows_per_round[12];

/* base melee skill, indexed on class */
extern int class_bms[6];

/* Racial melee skill modifier, indexed on race */
extern int race_msm[10];

/* melee skill level multiplier bonus, indexed on class */
extern double class_mslm[6];

typedef struct { int x, y; double w; int e; } std_weapon_info;
extern std_weapon_info std_weapons[49];
extern char* std_names[49];

#endif
