From 0f88c0bffab72d4eed74442a46143f4645695b42 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 12 Mar 2002 20:48:10 +0000 Subject: [PATCH] =?UTF-8?q?*=20Plane-Flag:=20Keine=20Monster=20in=20Queste?= =?UTF-8?q?n=20*=20Meldung=20bei=20nicht=20aureichendem=20Lehrer-Talent=20?= =?UTF-8?q?ist=20missverst=C3=A4ndlich=20*=20bei=20FAHRE=20wird=20auf=20Hu?= =?UTF-8?q?nger=20geprueft=20*=20Daemonenpanik=20im=20Kampf=20nur=20noch,?= =?UTF-8?q?=20wenn=20nicht=20als=20andere=20Rasse=20getarnt.=20*=20watcher?= =?UTF-8?q?s=20kriegen=20kampfreports=20*=20fix=20der=20behandlung=20von?= =?UTF-8?q?=20einheiten=20mit=20massenhaft=20keksen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/battle.c | 42 +++++++++++++++++------------------- src/common/kernel/movement.c | 6 +++--- src/common/kernel/plane.h | 3 ++- src/eressea/korrektur.c | 8 ++++--- src/res/de/messages.xml | 4 ++-- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 06ca31c88..881a5dfb6 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -273,45 +273,43 @@ void battlerecord(battle * b, const char *s) { bfaction * bf; -#if 0 - static char * lasts = NULL; + struct message * m = msg_message("msg_battle", "string", strdup(s)); + plane * p = rplane(b->region); + watcher * w; - if (lasts!=s) { - battledebug(s); - lasts = s; - } -#endif - s = gc_add(strdup(s)); for (bf = b->factions;bf;bf=bf->next) { - faction * f = bf->faction; - struct message * m = new_message(f, "msg_battle%s:string", s); - brecord(f, b->region, m); + brecord(bf->faction, b->region, m); } + if (p) for (w=p->watchers;w;w=w->next) { + for (bf = b->factions;bf;bf=bf->next) if (bf->faction==w->faction) break; + if (bf==NULL) brecord(w->faction, b->region, m); + } + msg_release(m); } void battlemsg(battle * b, unit * u, const char * s) { bfaction * bf; + struct message * m; + plane * p = rplane(b->region); + watcher * w; sprintf(buf, "%s %s", unitname(u), s); + m = msg_message("msg_battle", "string", strdup(buf)); for (bf=b->factions;bf;bf=bf->next) { - faction * f = bf->faction; - brecord(f, u->region, new_message(f, "msg_battle%s:string", strdup(buf))); + brecord(bf->faction, u->region, m); } + if (p) for (w=p->watchers;w;w=w->next) { + for (bf = b->factions;bf;bf=bf->next) if (bf->faction==w->faction) break; + if (bf==NULL) brecord(w->faction, b->region, m); + } + msg_release(m); } static void fbattlerecord(faction * f, region * r, const char *s) { -#if 0 - static char * lasts = NULL; - - if (lasts!=s) { - battledebug(s); - lasts = s; - } -#endif s = gc_add(strdup(s)); brecord(f, r, new_message(f, "msg_battle%s:string", s)); } @@ -1181,7 +1179,7 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile) if (df->person[dt.index].hp > 0) { /* Hat überlebt */ battledebug(debugbuf); - if (old_race(au->race) == RC_DAEMON) { + if (old_race(au->irace) == RC_DAEMON) { #ifdef TODO_RUNESWORD if (select_weapon(dt, 0, -1) == WP_RUNESWORD) continue; #endif diff --git a/src/common/kernel/movement.c b/src/common/kernel/movement.c index 7e129a3a3..2135b7a22 100644 --- a/src/common/kernel/movement.c +++ b/src/common/kernel/movement.c @@ -785,7 +785,7 @@ init_drive(void) * doesn't seem to be an easy way to speed this up. */ for(u=r->units; u; u=u->next) { - if(igetkeyword(u->thisorder, u->faction->locale) == K_DRIVE && !fval(u, FL_LONGACTION)) { + if(igetkeyword(u->thisorder, u->faction->locale) == K_DRIVE && !fval(u, FL_LONGACTION) && !fval(u, FL_HUNGER)) { boolean found = false; ut = getunit(r, u->faction); if(!ut) { @@ -821,7 +821,7 @@ init_drive(void) ut = getunit(r, u->faction); if(!ut) continue; - if (igetkeyword(ut->thisorder, u->faction->locale) == K_DRIVE && !fval(ut, FL_LONGACTION)) { + if (igetkeyword(ut->thisorder, u->faction->locale) == K_DRIVE && !fval(ut, FL_LONGACTION) && !fval(ut, FL_HUNGER)) { u2 = getunit(r, u->faction); if(u2 == u) { w += weight(ut); @@ -1170,7 +1170,7 @@ travel(region * first, unit * u, region * next, int flucht) if (ut) { boolean found = false; if (igetkeyword(ut->thisorder, u->faction->locale) == K_DRIVE - && !fval(ut, FL_LONGACTION)) { + && !fval(ut, FL_LONGACTION) && !fval(ut, FL_HUNGER)) { u2 = getunit(first, ut->faction); if(u2 == u) { found = true; diff --git a/src/common/kernel/plane.h b/src/common/kernel/plane.h index 3a655ff9f..0feaf4e1e 100644 --- a/src/common/kernel/plane.h +++ b/src/common/kernel/plane.h @@ -35,8 +35,9 @@ #define PFL_NOFEED 2048 /* Kein Unterhalt nötig TODO */ #define PFL_FRIENDLY 4096 /* everyone is your ally */ #define PFL_NOORCGROWTH 8192 /* orcs don't grow */ +#define PFL_NOMONSTERS 16384 /* no monster randenc */ -#define PFL_MUSEUM PFL_NOCOORDS | PFL_NORECRUITS | PFL_NOGIVE | PFL_NOATTACK | PFL_NOTERRAIN | PFL_NOMAGIC | PFL_NOSTEALTH | PFL_NOTEACH | PFL_NOBUILD | PFL_NOFEED +#define PFL_MUSEUM PFL_NOMONSTERS | PFL_NOCOORDS | PFL_NORECRUITS | PFL_NOGIVE | PFL_NOATTACK | PFL_NOTERRAIN | PFL_NOMAGIC | PFL_NOSTEALTH | PFL_NOTEACH | PFL_NOBUILD | PFL_NOFEED typedef struct watcher { struct watcher * next; diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index f88ed0701..14b6377d5 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -143,7 +143,7 @@ warn_items(void) for (u=r->units;u;u=u->next) { item * itm; for (itm=u->items;itm;itm=itm->next) { - if (itm->number>100000) { + if (itm->number>1000000) { found = 1; log_error(("Einheit %s hat %u %s\n", unitid(u), itm->number, @@ -1792,23 +1792,25 @@ secondfaction(faction * pf) static void update_gmquests(void) { - /* gm04 will keine Orks */ faction * f = findfaction(atoi36("gm04")); if (f) { unit * u = f->units; potion_t p; attrib * permissions = a_find(f->attribs, &at_permissions); - do_once("et02", secondfaction(f)); if (u!=NULL) { plane * p = rplane(u->region); + /* gm04 will keine Orks */ if (p!=NULL) p->flags |= PFL_NOORCGROWTH; + /* gm04 will keine Monster */ + if (p!=NULL) p->flags |= PFL_NOMONSTERS; } for (p=0;p!=MAX_POTIONS;++p) { attrib * a = a_find(permissions, &at_gmcreate); while (a && a->data.v!=(void*)oldpotiontype[p]->itype) a=a->nexttype; if (!a) a_add((attrib**)&permissions->data.v, make_atgmcreate(oldpotiontype[p]->itype)); } + do_once("et02", secondfaction(f)); } do_once("rq01", regatta_quest()); } diff --git a/src/res/de/messages.xml b/src/res/de/messages.xml index b3740886a..812c87631 100644 --- a/src/res/de/messages.xml +++ b/src/res/de/messages.xml @@ -7251,8 +7251,8 @@ - "$unit($unit) in $region($region): '$command' - $unit($student) ist mindestens gleich gut wie wir." - "$unit($unit) in $region($region): '$command' - $unit($student) is at least as good as we are." + "$unit($unit) in $region($region): '$command' - $unit($unit) muß mindestens 2 Stufen besser sein als $unit($student)." + "$unit($unit) in $region($region): '$command' - $unit($unit) needs to be at least 2 levels better than $unit($student)."