From 7dfb177044e14331a3184991a79dd1d1c60a2412 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 14 Apr 2001 12:11:45 +0000 Subject: [PATCH] dev-version: einbau allen neuen sources aus beta-branch. otherfaction.h fehlt, corwin --- src/Makefile.include | 3 +- src/common/attributes/attributes.c | 3 ++ src/common/gamecode/creport.c | 13 +++++- src/common/gamecode/economy.c | 8 ++-- src/common/gamecode/laws.c | 30 ++++++++++++- src/common/gamecode/monster.c | 4 +- src/common/gamecode/randenc.c | 10 +++-- src/common/gamecode/report.c | 19 ++++++--- src/common/gamecode/spy.c | 29 +++++++++++-- src/common/gamecode/study.c | 1 + src/common/items/lmsreward.c | 1 + src/common/kernel/battle.c | 4 +- src/common/kernel/eressea.h | 2 +- src/common/kernel/faction.c | 68 ++++++++++++++++++++++++++++++ src/common/kernel/faction.h | 1 + src/common/kernel/karma.c | 4 +- src/common/kernel/message.c | 6 +-- src/common/kernel/reports.c | 48 ++++++++++++++------- src/common/kernel/reports.h | 2 +- src/eressea/korrektur.c | 7 ++- src/files | 24 +++-------- src/mapper/map_partei.c | 1 - src/res/de/messages.txt | 3 +- 23 files changed, 226 insertions(+), 65 deletions(-) diff --git a/src/Makefile.include b/src/Makefile.include index 62592f0bf..bc795fc5e 100644 --- a/src/Makefile.include +++ b/src/Makefile.include @@ -26,7 +26,8 @@ LDFLAGS = $(LIBS) LIBS = -L$(PUBLISH_DIR) LINTFLAGS = -booltype boolean -boolops +posixlib +matchanyintegral \ - -predboolint -retvalint -retvalother -realcompare -exportlocal + -predboolint -retvalint -retvalother -realcompare -exportlocal \ + -DHAVE_READDIR ARCHITECTURE = Linux diff --git a/src/common/attributes/attributes.c b/src/common/attributes/attributes.c index 53158d47b..cdd474eb7 100644 --- a/src/common/attributes/attributes.c +++ b/src/common/attributes/attributes.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -25,6 +26,7 @@ #include "iceberg.h" #include "hate.h" #include "overrideroads.h" +#include "otherfaction.h" #include "racename.h" #ifdef AT_OPTION # include "option.h" @@ -53,6 +55,7 @@ init_attributes(void) init_orcification(); init_hate(); init_reduceproduction(); + init_otherfaction(); init_racename(); #ifdef AT_MOVED init_moved(); diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index 1367d7cad..129adec76 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -24,6 +25,7 @@ /* attributes include */ #include +#include #include /* gamecode includes */ @@ -413,7 +415,7 @@ cr_output_unit(FILE * F, region * r, if (strlen(u->display)) fprintf(F, "\"%s\";Beschr\n", u->display); - if ((u->faction == f || omniscient(f)) || !fval(u, FL_PARTEITARNUNG)) { + if( u->faction == f || omniscient(f)) { #ifdef GROUPS if (u->faction == f) { const attrib * a = a_find(u->attribs, &at_group); @@ -424,6 +426,13 @@ cr_output_unit(FILE * F, region * r, } #endif fprintf(F, "%d;Partei\n", u->faction->no); + } else if(!fval(u, FL_PARTEITARNUNG)) { + attrib *a = a_find(u->attribs, &at_otherfaction); + if(a) { + fprintf(F, "%d;Partei\n", a->data.i); + } else { + fprintf(F, "%d;Partei\n", u->faction->no); + } } if(u->faction != f && a_fshidden @@ -463,6 +472,8 @@ cr_output_unit(FILE * F, region * r, unit * u = (unit*)a->data.v; if (u) fprintf(F, "%d;folgt\n", u->no); } + a = a_find(u->attribs, &at_otherfaction); + if(a) fprintf(F, "%d;verkleidung\n", a->data.i); i = ualias(u); if (i>0) fprintf(F, "%d;temp\n", i); diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index d8205c144..4102da5ca 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -254,16 +254,16 @@ expandrecruit(region * r, request * recruitorders) race_t rc = u->faction->race; int recruitcost = race[rc].rekrutieren; - /* check if recruiting is limited. either horses or peasant fraction or not at all */ + /* check if recruiting is limited. + * either horses or peasant fraction or not at all */ if ((race[rc].ec_flags & ECF_REC_UNLIMITED)==0) { /* not unlimited, and everything's gone: */ if (race[rc].ec_flags & ECF_REC_HORSES) { /* recruit from horses if not all gone */ if (h <= 0) continue; - } - else if ((race[rc].ec_flags & ECF_REC_ETHEREAL) == 0) { + } else if ((race[rc].ec_flags & ECF_REC_ETHEREAL) == 0) { /* recruit from peasants if any space left */ - if (n > rfrac) continue; + if (n >= rfrac) continue; } } if (recruitcost) { diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index a20708379..823efb5a2 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -80,6 +81,8 @@ #include #include +#include + /* - external symbols ------------------------------------------ */ extern int dropouts[2]; extern int * age; @@ -96,6 +99,7 @@ findoption(char *s) static void destroyfaction(faction * f) { + region *rc; unit *u; faction *ff; @@ -198,16 +202,27 @@ destroyfaction(faction * f) } #endif } + + /* units of other factions that were disguised as this faction + * have their disguise replaced by ordinary faction hiding. */ + for(rc=regions; rc; rc=rc->next) { + for(u=rc->units; u; u=u->next) { + attrib *a = a_find(u->attribs, &at_otherfaction); + if(!a) continue; + if(a->data.i == f->no) { + a_removeall(&u->attribs, &at_otherfaction); + fset(u, FL_PARTEITARNUNG); + } + } + } } void restart(unit *u, int race) { -#ifdef ALLOW_RESTART faction *f = addplayer(u->region, u->faction->email, race)->faction; f->magiegebiet = u->faction->magiegebiet; destroyfaction(u->faction); -#endif } /* ------------------------------------------------------------- */ @@ -2246,7 +2261,18 @@ renumber_factions(void) } } for (rp=renum;rp;rp=rp->next) { + region *r; + unit *u; a_remove(&rp->faction->attribs, rp->attrib); + /* all units disguised as belonging to this faction have their + * attribute changed */ + for(r=regions; r; r=r->next) { + for(u=r->units; u; u=u->next) { + attrib *a = a_find(u->attribs, &at_otherfaction); + if(!a) continue; + a->data.i = rp->want; + } + } rp->faction->no = rp->want; register_faction_id(rp->want); fset(rp->faction, FF_NEWID); diff --git a/src/common/gamecode/monster.c b/src/common/gamecode/monster.c index b262bfa03..a71574e88 100644 --- a/src/common/gamecode/monster.c +++ b/src/common/gamecode/monster.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -488,8 +489,9 @@ monster_seeks_target(region *r, unit *u) } /* TODO: prüfen, ob target überhaupt noch existiert... */ + if(!target) return; /* this is a bug workaround! remove!! */ - if( r == target->region ) { /* Wir haben ihn! */ + if(r == target->region ) { /* Wir haben ihn! */ switch( u->race ) { case RC_ALP: alp_findet_opfer(u, r); diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index ce4ff6cce..1356eeba6 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -1282,8 +1283,9 @@ randomevents(void) set_skill(u, SK_OBSERVATION, u->number * (rand() % 180)); set_skill(u, SK_AUSDAUER, u->number * 30); set_skill(u, SK_STEALTH, u->number * 30); - fprintf(stderr, "%d %s in %s.\n", u->number, + log_printf("%d %s in %s.\n", u->number, race[u->race].name[1], regionname(r, NULL)); + name_unit(u); set_string(&u->lastorder, "WARTEN"); @@ -1362,8 +1364,9 @@ randomevents(void) set_string(&u->lastorder, "WARTEN"); name_unit(u); - fprintf(stderr, "%d %s in %s.\n", u->number, + log_printf("%d %s in %s.\n", u->number, race[u->race].name[1], regionname(r, NULL)); + add_message(&r->msgs, new_message(NULL, "undeadrise%r:region", r)); for (u=r->units;u;u=u->next) freset(u->faction, FL_DH); @@ -1414,7 +1417,8 @@ randomevents(void) else set_string(&u->name, "Wütende Ents"); - fprintf(stderr, "%d Ents in %s.\n", u->number, regionname(r, NULL)); + log_printf("%d Ents in %s.\n", u->number, regionname(r, NULL)); + add_message(&r->msgs, new_message(NULL, "entrise%r:region", r)); for (u=r->units;u;u=u->next) freset(u->faction, FL_DH); diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index 1baa3fedc..ded6dc898 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -22,6 +23,7 @@ /* attributes includes */ #include +#include #ifdef AT_OPTION # include #endif @@ -62,6 +64,7 @@ #include #include #include +#include /* libc includes */ #include @@ -101,7 +104,7 @@ read_datenames(const char *filename) int i, l; if( (namesFP=fopen(filename,"r")) == NULL) { - fprintf(stderr, "Kann Datei '%s' nicht öffnen, Abbruch\n",filename); + log_error(("Kann Datei '%s' nicht öffnen, Abbruch\n", filename)); return -1; } @@ -2778,10 +2781,9 @@ can_find(faction * f, faction * f2) } void -add_find(faction * f, unit * u) +add_find(faction * f, unit * u, faction *f2) { /* faction f sees f2 through u */ - faction * f2 = u->faction; int key = f->no % FMAXHASH; struct fsee ** fp = &fsee[key]; struct fsee * fs; @@ -2817,8 +2819,15 @@ update_find(void) if (u2->faction==lastf || u2->faction==u->faction) continue; if (seefaction(u->faction, r, u2, 0)) { - lastf=u2->faction; - add_find(u->faction, u2); + attrib *a = a_find(u2->attribs, &at_otherfaction); + if(a) { + faction *f = findfaction(a->data.i); + lastf=f; + add_find(u->faction, u2, f); + } else { + lastf=u2->faction; + add_find(u->faction, u2, u2->faction); + } } } } diff --git a/src/common/gamecode/spy.c b/src/common/gamecode/spy.c index 9fe3fd3f0..f8032c7c4 100644 --- a/src/common/gamecode/spy.c +++ b/src/common/gamecode/spy.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -51,6 +52,8 @@ #include #include +#include + void spy(region * r, unit * u) { @@ -136,12 +139,30 @@ setstealth(unit * u, strlist * S) switch(findparam(s)) { case P_FACTION: - /* TARNE PARTEI [NICHT] */ + /* TARNE PARTEI [NICHT|NUMMER abcd] */ s = getstrtoken(); - if (findparam(s) == P_NOT) { - freset(u, FL_PARTEITARNUNG); - } else { + if(!s || *s == 0) { fset(u, FL_PARTEITARNUNG); + } else if (findparam(s) == P_NOT) { + freset(u, FL_PARTEITARNUNG); + } else if (findkeyword(s) == K_NUMBER) { + char *s2 = getstrtoken(); + int nr; + if(!s2 || *s2 == 0 || (nr = atoi36(s2)) == u->faction->no) { + a_removeall(&u->faction->attribs, &at_otherfaction); + } else { + /* TODO: Prüfung ob Partei sichtbar */ + if(!findfaction(nr)) { + cmistake(u, S->s, 66, MSG_EVENT); + } else { + attrib *a; + a = a_find(u->attribs, &at_otherfaction); + if(!a) a = a_add(&u->attribs, a_new(&at_otherfaction)); + a->data.i = nr; + } + } + } else { + cmistake(u, S->s, 289, MSG_EVENT); } break; case P_ANY: diff --git a/src/common/gamecode/study.c b/src/common/gamecode/study.c index f89e1b726..e018e448e 100644 --- a/src/common/gamecode/study.c +++ b/src/common/gamecode/study.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) diff --git a/src/common/items/lmsreward.c b/src/common/items/lmsreward.c index 24ca609d2..8b6f3c531 100644 --- a/src/common/items/lmsreward.c +++ b/src/common/items/lmsreward.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index ac2e27950..d1917602f 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -1,5 +1,6 @@ /* vi: set ts=2: * + * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -59,6 +60,7 @@ typedef enum combatmagic { #include #include #include +#include /* attributes includes */ #include @@ -3020,7 +3022,7 @@ make_battle(region * r) sprintf(zFilename, "%s/battle-%d-%s.log", zText, obs_count, simplename(r)); bdebug = fopen(zFilename, "w"); #endif - if (!bdebug) fputs("battles können nicht debugged werden\n", stderr); + if (!bdebug) log_error(("battles können nicht debugged werden\n")); else { dbgprintf((bdebug, "In %s findet ein Kampf statt:", rname(r, NULL))); } diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index c10e100a9..18f17d67d 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -846,7 +846,7 @@ typedef struct skillvalue { löschen müssen! (Ist dafür nicht eigentlich FL_DH gedacht?) */ #define FL_NOIDLEOUT (1<<24) /* Partei stirbt nicht an NMRs */ #define FL_TAKEALL (1<<25) /* Einheit nimmt alle Gegenstände an */ -#define FL_UNNAMED (1<<26) /* Partei/Einheit/Gebäude/Schiff ist unbenannt */ +#define FL_UNNAMED (1<<26) /* Partei/Einheit/Gebäude/Schiff ist unbenannt */ /* Flags, die gespeichert werden sollen: */ #ifdef NOAID diff --git a/src/common/kernel/faction.c b/src/common/kernel/faction.c index 25c68b3d0..ca62b14c4 100644 --- a/src/common/kernel/faction.c +++ b/src/common/kernel/faction.c @@ -11,15 +11,21 @@ * This program may not be used, modified or distributed without * prior permission by the authors of Eressea. */ + #include #include "eressea.h" #include "faction.h" +#include "unit.h" +#include "race.h" +#include "region.h" +#include "plane.h" /* util includes */ #include /* libc includes */ #include +#include const char * factionname(const faction * f) @@ -42,3 +48,65 @@ void * resolve_faction(void * id) { return findfaction((int)id); } + +#define MAX_FACTION_ID (36*36*36*36) + +static int +unused_faction_id(void) +{ + int id = rand()%MAX_FACTION_ID; + + while(!faction_id_is_unused(id)) { + id++; if(id == MAX_FACTION_ID) id = 0; + } + + return id; +} + +unit * +addplayer(region *r, char *email, race_t frace) +{ + int i; + unit *u; + + faction *f = (faction *) calloc(1, sizeof(faction)); + + set_string(&f->email, email); + + for (i = 0; i < 6; i++) buf[i] = (char) (97 + rand() % 26); buf[i] = 0; + set_string(&f->passw, buf); + + f->lastorders = turn; + f->alive = 1; + f->age = 0; + f->race = frace; + f->magiegebiet = 0; + set_ursprung(f, 0, r->x, r->y); + + f->options = Pow(O_REPORT) | Pow(O_ZUGVORLAGE) | Pow(O_SILBERPOOL); + + f->no = unused_faction_id(); + register_faction_id(f->no); + + f->unique_id = max_unique_id + 1; + max_unique_id++; + + sprintf(buf, "Partei %s", factionid(f)); + set_string(&f->name, buf); + fset(f, FL_UNNAMED); + + addlist(&factions, f); + + u = createunit(r, f, 1, f->race); + give_starting_equipment(r, u); + fset(u, FL_ISNEW); + if (f->race == RC_DAEMON) { + do + u->irace = (char) (rand() % MAXRACES); + while (u->irace == RC_DAEMON || race[u->irace].nonplayer); + } + fset(u, FL_PARTEITARNUNG); + + return u; +} + diff --git a/src/common/kernel/faction.h b/src/common/kernel/faction.h index f937dedb6..a8af37983 100644 --- a/src/common/kernel/faction.h +++ b/src/common/kernel/faction.h @@ -65,5 +65,6 @@ typedef struct faction { extern const char * factionname(const struct faction * f); extern void * resolve_faction(void * data); +extern struct unit * addplayer(struct region *r, char *email, race_t frace); #endif diff --git a/src/common/kernel/karma.c b/src/common/kernel/karma.c index 1d69b4d27..4ff8ef1e3 100644 --- a/src/common/kernel/karma.c +++ b/src/common/kernel/karma.c @@ -251,8 +251,8 @@ struct fspecialdata fspecials[MAXFACTIONSPECIALS] = { "komplett.", 100 }, - { /* TODO: Namen ändern */ - "Schnell", + { + "Windvolk", "Ein solches Volk ist sehr athletisch und die Kinder üben besonders " "den Langstreckenlauf von kleinauf. Nach jahrelangem Training sind " "sie dann in der Lage, sich zu Fuß so schnell zu bewegen als würden " diff --git a/src/common/kernel/message.c b/src/common/kernel/message.c index 7f94987d6..09d3515e4 100644 --- a/src/common/kernel/message.c +++ b/src/common/kernel/message.c @@ -1,6 +1,5 @@ /* vi: set ts=2: * - * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) @@ -31,11 +30,12 @@ #include "building.h" /* util includes */ -#include #include +#include #include #include #include +#include /* libc includes */ #include @@ -428,7 +428,7 @@ caddmessage(region * r, faction * f, char *s, msg_t mtype, int level) m = add_message(&r->msgs, new_message(f, "msg_event%s:string", s)); break; default: - fprintf(stderr, "Warnung: Ungültige Msg-Klasse!"); + assert(!"Ungültige Msg-Klasse!"); } } diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index 5e7a6416c..f3da6a5e0 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -44,6 +44,7 @@ /* attributes includes */ #include +#include #include const char * g_reportdir; @@ -124,8 +125,10 @@ hp_status(const unit * u) { double p = (double) ((double) u->hp / (double) (u->number * unit_max_hp(u))); - if (p > 1.25) - return "magisch gestärkt"; + if (p > 2.00) + return "sehr stark"; + if (p > 1.50) + return "stark"; if (p < 0.50) return "schwer verwundet"; if (p < 0.75) @@ -178,6 +181,8 @@ bufunit(const faction * f, const unit * u, int indent, int i, dh; skill_t sk; int getarnt = fval(u, FL_PARTEITARNUNG); + attrib *a_otherfaction = NULL; + const char *c; const char *pzTmp; spell *sp; building * b; @@ -187,28 +192,41 @@ bufunit(const faction * f, const unit * u, int indent, attrib *a_fshidden = NULL; item * itm; item * show; - + if(fspecial(u->faction, FS_HIDDEN)) a_fshidden = a_find(u->attribs, &at_fshidden); strcpy(buf, unitname(u)); + + a_otherfaction = a_find(u->attribs, &at_otherfaction); - if (!getarnt && (u->faction != f)) { - scat(", "); - scat(factionname(u->faction)); - } else { + if (u->faction == f) { #ifdef GROUPS - if (u->faction==f) { - attrib * a = a_find(u->attribs, &at_group); - if (a) { - group * g = (group*)a->data.v; - scat(", "); - scat(groupid(g, f)); - } + attrib *a = a_find(u->attribs, &at_group); + if (a) { + group * g = (group*)a->data.v; + scat(", "); + scat(groupid(g, f)); } #endif - if (getarnt) scat(", parteigetarnt"); + if (getarnt) { + scat(", parteigetarnt"); + } else if (a_otherfaction) { + scat(", "); + scat(factionname(findfaction(a_otherfaction->data.i))); + } + } else { + if (getarnt) { + scat(", parteigetarnt"); + } else if(a_otherfaction) { + scat(", "); + scat(factionname(findfaction(a_otherfaction->data.i))); + } else { + scat(", "); + scat(factionname(u->faction)); + } } + scat(", "); if(u->faction != f && a_fshidden && a_fshidden->data.ca[0] == 1 && effskill(u, SK_STEALTH) >= 6) { diff --git a/src/common/kernel/reports.h b/src/common/kernel/reports.h index 5dbeca025..37f2a3fa6 100644 --- a/src/common/kernel/reports.h +++ b/src/common/kernel/reports.h @@ -32,7 +32,7 @@ extern const char *neue_gebiete[]; /* kann_finden speedups */ extern boolean kann_finden(struct faction * f1, struct faction * f2); -extern void add_find(struct faction *, struct unit *); +extern void add_find(struct faction *, struct unit *, struct faction *); extern struct unit * can_find(struct faction *, struct faction *); /* funktionen zum schreiben eines reports */ extern int read_datenames(const char *filename); diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index b304df69b..16da11bf3 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -1134,7 +1134,7 @@ fix_age(void) for (f=factions;f;f=f->next) { if (f->no!=MONSTER_FACTION && !nonplayer_race(f->race)) continue; if (f->age!=turn) { - fprintf(stderr, " - Alter von Partei %s anpassen", factionid(f)); + log_printf("Alter von Partei %s auf %d angepasst.\n", factionid(f), turn); f->age = turn; } } @@ -1915,7 +1915,10 @@ fix_herbs(void) for (r=regions; r; r=r->next) if (rterrain(r) == T_PLAIN) { const herb_type *htype = rherbtype(r); - assert(htype); + if (htype==NULL) { + htype = htypes[i]; + rsetherbtype(r, htype); + } for (i=0;i!=6;++i) if (htypes[i]==htype) break; assert(i!=6); herbs[i]++; diff --git a/src/files b/src/files index da2d07240..0dcd38838 100644 --- a/src/files +++ b/src/files @@ -1,17 +1,7 @@ -alchemy.h -creation.h -economy.h -magic.h -race.h -randenc.h -alp.c -build.c -creation.c -creport.c -economy.c -laws.c -monster.c -randenc.c -report.c -spy.c -study.c +common/gamecode/economy.c +common/gamecode/randenc.c +common/gamecode/report.c +common/kernel/karma.c +common/kernel/message.c +common/kernel/reports.c +mapper/map_partei.c diff --git a/src/mapper/map_partei.c b/src/mapper/map_partei.c index 1ed91dda4..5b896401a 100644 --- a/src/mapper/map_partei.c +++ b/src/mapper/map_partei.c @@ -1,6 +1,5 @@ /* vi: set ts=2: * - * * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) diff --git a/src/res/de/messages.txt b/src/res/de/messages.txt index 554810766..b60fb97dc 100644 --- a/src/res/de/messages.txt +++ b/src/res/de/messages.txt @@ -54,7 +54,7 @@ error48;errors:0;de;{unit} in {region}: '{command}' - Die Einheit ist nicht bewa error49;errors:0;de;{unit} in {region}: '{command}' - Die Einheit ist nicht der Eigentümer. error50;errors:0;de;{unit} in {region}: '{command}' - Die Einheit ist nicht erfahren genug dafür. error51;errors:0;de;{unit} in {region}: '{command}' - Die Einheit hat nicht genug Silber. -error52;errors:0;de;{unit} in {region}: '{command}' - Die Einheit ist vom Kampf erschöpft. +error52;errors:0;de;{unit} in {region}: '{command}' - Die Einheit kann keinen langen Befehl mehr ausführen. error53;errors:0;de;{unit} in {region}: '{command}' - Die Einheit kann keine Tränke herstellen. error54;errors:0;de;{unit} in {region}: '{command}' - Die Einheit kann nicht handeln. error55;errors:0;de;{unit} in {region}: '{command}' - Die Einheit kann sich nicht fortbewegen. @@ -287,6 +287,7 @@ error285;errors:0;de;{unit} in {region}: '{command}' - Diese Einheit kennt keine error286;errors:0;de;{unit} in {region}: '{command}' - Die Einheit transportiert uns nicht. error287;errors:0;de;{unit} in {region}: '{command}' - Dorthin können wir die Einheit nicht transportieren. error288;errors:0;de;{unit} in {region}: '{command}' - Wieviel sollen wir einreißen? +error289;errors:0;de;{unit} in {region}: '{command}' - Tarne wie? # Meldungen und Ereignisse msg_event;events:0;de;{string}