2002-08-26 16:16:16 +02:00
|
|
|
/* vi: set ts=2:
|
|
|
|
*
|
|
|
|
*
|
2003-07-29 11:48:03 +02:00
|
|
|
* Eressea PB(E)M host Copyright (C) 1998-2003
|
2002-08-26 16:16:16 +02:00
|
|
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
|
|
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
|
|
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
|
|
|
* Enno Rehling (enno@eressea-pbem.de)
|
|
|
|
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
|
|
|
*
|
|
|
|
* This program may not be used, modified or distributed without
|
|
|
|
* prior permission by the authors of Eressea.
|
|
|
|
*/
|
2003-07-29 11:48:03 +02:00
|
|
|
#ifndef H_MOD_ALLIANCE
|
|
|
|
#define H_MOD_ALLIANCE
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALLIANCES
|
|
|
|
#error "must define ALLIANCES to use this module"
|
|
|
|
#endif
|
2002-08-26 16:16:16 +02:00
|
|
|
struct plane;
|
|
|
|
struct attrib;
|
|
|
|
struct unit;
|
|
|
|
struct faction;
|
|
|
|
struct region;
|
2002-09-02 22:36:12 +02:00
|
|
|
struct faction_list;
|
2002-08-26 16:16:16 +02:00
|
|
|
|
|
|
|
typedef struct alliance {
|
|
|
|
struct alliance * next;
|
2002-09-02 22:36:12 +02:00
|
|
|
struct faction_list * members;
|
|
|
|
unsigned int flags;
|
2002-08-26 16:16:16 +02:00
|
|
|
int id;
|
|
|
|
char * name;
|
|
|
|
} alliance;
|
|
|
|
|
|
|
|
extern alliance * alliances;
|
|
|
|
extern alliance * findalliance(int id);
|
|
|
|
extern alliance * makealliance(int id, const char * name);
|
2002-09-02 22:36:12 +02:00
|
|
|
extern const char * alliancename(const struct alliance * al);
|
|
|
|
extern void setalliance(struct faction * f, alliance * al);
|
2002-08-26 16:16:16 +02:00
|
|
|
|
|
|
|
extern void alliancejoin(void);
|
|
|
|
extern void alliancekick(void);
|
2002-09-02 22:36:12 +02:00
|
|
|
extern void alliancevictory(void);
|
2003-12-15 23:59:15 +01:00
|
|
|
|
|
|
|
extern int victorycondition(const alliance * al, const char * name);
|
2002-08-26 16:16:16 +02:00
|
|
|
/* execute commands */
|
|
|
|
|
2003-07-29 11:48:03 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2002-09-02 23:10:53 +02:00
|
|
|
#endif
|