empiremud/cnf/
empiremud/doc/
empiremud/lib/boards/
empiremud/lib/etc/
empiremud/lib/misc/
empiremud/lib/plralias/F-J/
empiremud/lib/plralias/K-O/
empiremud/lib/plralias/P-T/
empiremud/lib/plralias/U-Z/
empiremud/lib/plrobjs/
empiremud/lib/plrobjs/F-J/
empiremud/lib/plrobjs/K-O/
empiremud/lib/plrobjs/P-T/
empiremud/lib/plrobjs/U-Z/
empiremud/lib/world/
empiremud/lib/world/mob/
empiremud/lib/world/obj/
empiremud/log/
/* ************************************************************************
*   File: empire.h                                       EmpireMUD AD 1.0 *
*  Usage: header file for the empire structures and commands              *
*                                                                         *
*  All rights reserved.  See license.doc for complete information.        *
*                                                                         *
*  Code base by Paul Clarke.  EmpireMUD Project, a tbgMUD Production.     *
*  Based upon CircleMUD 3.0, beta patch level 17, by Jeremy Elson.        *
*                                                                         *
*  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
*  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.               *
************************************************************************ */


#define LAND_PER_MEMBER	35		/* Land given out per member + 1		*/
#define LAND_CAN_CLAIM(emp)		(empire[emp].members + 1) * LAND_PER_MEMBER + 10 * (int) (calculate_wealth(emp) / 100)

/* Empire Privilege Levels */
#define PRIV_CLAIM		0		/* Claim land							*/
#define PRIV_BUILD		1		/* Build/Dismantle structures			*/
#define PRIV_HARVEST	2		/* Harvest/plant things					*/
#define PRIV_PROMOTE	3		/* Promote/demote others				*/
#define PRIV_CHOP		4		/* Chop trees							*/
#define PRIV_CEDE		5		/* Cede land							*/
#define PRIV_ENROLL		6		/* Enroll new members					*/
#define PRIV_WITHDRAW	7		/* Can withdraw funds					*/
#define PRIV_DIPLOMACY	8		/* Can use diplomacy					*/


/* Diplomacy types */
#define DIPL_PEACE		(1 << 0)	/* At peace						*/
#define DIPL_WAR		(1 << 1)	/* At war						*/
#define DIPL_ALLIED		(1 << 3)	/* In an alliance				*/
#define DIPL_NONAGGR	(1 << 4)	/* In a non-aggression pact		*/
#define DIPL_TRADE		(1 << 5)	/* Open trading					*/
#define DIPL_DISTRUST	(1 << 6)	/* Distrusting of one another	*/
#define NUM_DIPL_STATES		7		/* Total 						*/


/* Editor modes */
#define EEDIT_MENU				0
#define EEDIT_TO_MENU				1	/* returns to menu on enter-press */
#define EEDIT_NAME				2
#define EEDIT_BANNER				3
#define EEDIT_RANK_MENU				4
#define EEDIT_RANK_NUMBER			5
#define EEDIT_RANK_NUMBER_CONFIRM		6
#define EEDIT_RANK_NAME				7
#define EEDIT_RANK_COLOR			8
#define EEDIT_PRIVILEGE				9
#define EEDIT_EXIT				10


/* The political structure for the empires */
struct empire_political_data {
	long id;			/* The leader number of the opposing empire	*/
	int type;			/* The type of relationship between them	*/
	int offer;			/* Suggested states of relation				*/

	struct empire_political_data *next;
	};


/* The storage structure for empires */
struct empire_storage_data {
	obj_vnum vnum;		/* what's stored	*/
	int amount;			/* how much			*/

	struct empire_storage_data *next;
	};


/* The main data structure for the empires */
struct empire_data {
	long leader;			/* ID number of the leader, also used in pfiles		*/
	char *name;				/* Name of the empire, defaults to leader's name	*/
	char *banner;			/* Color codes (maximum of 3) of the banner			*/

	byte num_ranks;			/* Total number of levels (maximum 20)				*/
	char *rank[MAX_RANKS];	/* Name of each rank								*/

	byte priv[NUM_PRIVILEGES];	/* The rank at which you can use a command		*/

	/* Unsaved data */
	int territory;			/* Total grids, calculated at boot time				*/
	int members;			/* Total members, calculated at boot time			*/
	int vault[6];			/* Wealth owned, calculated at startup				*/
	bool imm_only;			/* Don't allow imms/morts to be together			*/
	room_vnum haven;		/* Only one haven is allowed, so.. (VNUM)			*/
	int fame;				/* Empire's fame rating								*/

	struct empire_political_data *diplomacy;
	struct empire_storage_data *store;
	};


/* Externs */
extern struct empire_data *empire;
extern int top_of_empiret;
extern int real_empire(long id);
void save_empire_index(void);
void save_empire(int e);
void save_all_empires(void);
extern int create_empire(Creature ch);
extern long get_id_by_empire(Creature ch);
extern Creature is_playing(long id);
void log_to_empire(int e, const char *str, ...);
extern int get_empire_by_name(char *name);
void delete_empire(int rnum);
extern struct empire_political_data *find_relation(int a, int b);
void read_empire_territory();