Ausgabe von Helden im Wochenbericht

This commit is contained in:
Enno Rehling 2004-09-12 09:28:43 +00:00
parent 32e18c5f9d
commit 110198f684
3 changed files with 12 additions and 7 deletions

View File

@ -2906,6 +2906,7 @@ typedef struct summary {
int schiffe; int schiffe;
int gebaeude; int gebaeude;
int maxskill; int maxskill;
int heroes;
int inhabitedregions; int inhabitedregions;
int peasants; int peasants;
int nunits; int nunits;
@ -2994,6 +2995,9 @@ make_summary(boolean count_new)
s->nunits++; s->nunits++;
s->playerpop += u->number; s->playerpop += u->number;
if (u->flags & UFL_HERO) {
s->heroes += u->number;
}
s->spielerpferde += get_item(u, I_HORSE); s->spielerpferde += get_item(u, I_HORSE);
s->playermoney += get_money(u); s->playermoney += get_money(u);
s->armed_men += armedmen(u); s->armed_men += armedmen(u);
@ -3318,8 +3322,11 @@ report_summary(summary * s, summary * o, boolean full)
pcomp(s->playerpop, o->playerpop)); pcomp(s->playerpop, o->playerpop));
fprintf(F, " davon bewaffnet: %s\n", fprintf(F, " davon bewaffnet: %s\n",
pcomp(s->armed_men, o->armed_men)); pcomp(s->armed_men, o->armed_men));
#ifdef HEROES
fprintf(F, " Helden: %s\n", pcomp(s->heroes, o->heroes));
#endif
if (full) { if (full) {
fprintf(F, "Regionen: %d\n", listlen(regions)); fprintf(F, "Regionen: %d\n", listlen(regions));
fprintf(F, "Bewohnte Regionen: %d\n", s->inhabitedregions); fprintf(F, "Bewohnte Regionen: %d\n", s->inhabitedregions);
fprintf(F, "Landregionen: %d\n", s->landregionen); fprintf(F, "Landregionen: %d\n", s->landregionen);

View File

@ -1128,7 +1128,6 @@ unitlist_insert(struct unit_list **ul, struct unit *u)
*ul = rl2; *ul = rl2;
} }
#ifdef HEROES
int int
maxheroes(const struct faction * f) maxheroes(const struct faction * f)
{ {
@ -1146,4 +1145,3 @@ countheroes(const struct faction * f)
} }
return n; return n;
} }
#endif

View File

@ -34,7 +34,7 @@ struct skill;
#define UFL_PARTEITARNUNG (1<<4) /* 16 */ #define UFL_PARTEITARNUNG (1<<4) /* 16 */
#define UFL_DISBELIEVES (1<<5) /* 32 */ #define UFL_DISBELIEVES (1<<5) /* 32 */
#define UFL_WARMTH (1<<6) /* 64 */ #define UFL_WARMTH (1<<6) /* 64 */
/* UFL_HERO, defined below (1<<7) */ #define UFL_HERO (1<<7)
#define UFL_MOVED (1<<8) #define UFL_MOVED (1<<8)
#define UFL_FOLLOWING (1<<9) #define UFL_FOLLOWING (1<<9)
#define UFL_FOLLOWED (1<<10) #define UFL_FOLLOWED (1<<10)
@ -55,13 +55,13 @@ struct skill;
/* Flags, die gespeichert werden sollen: */ /* Flags, die gespeichert werden sollen: */
#ifndef HEROES #ifndef HEROES
#define UFL_SAVEMASK (UFL_NOAID | UFL_OWNER | UFL_PARTEITARNUNG | UFL_LOCKED | UFL_HUNGER | FFL_NOIDLEOUT | UFL_TAKEALL) # define UFL_SAVEMASK (UFL_NOAID | UFL_OWNER | UFL_PARTEITARNUNG | UFL_LOCKED | UFL_HUNGER | FFL_NOIDLEOUT | UFL_TAKEALL)
#else #else
# define UFL_HERO (1<<7)
# define UFL_SAVEMASK (UFL_NOAID | UFL_OWNER | UFL_PARTEITARNUNG | UFL_LOCKED | UFL_HUNGER | FFL_NOIDLEOUT | UFL_TAKEALL | UFL_HERO) # define UFL_SAVEMASK (UFL_NOAID | UFL_OWNER | UFL_PARTEITARNUNG | UFL_LOCKED | UFL_HUNGER | FFL_NOIDLEOUT | UFL_TAKEALL | UFL_HERO)
#endif
extern int maxheroes(const struct faction * f); extern int maxheroes(const struct faction * f);
extern int countheroes(const struct faction * f); extern int countheroes(const struct faction * f);
#endif
typedef struct unit { typedef struct unit {
struct unit *next; /* needs to be first entry, for region's unitlist */ struct unit *next; /* needs to be first entry, for region's unitlist */