From ea99e6d6631947150b0677625e64df59a8ab4461 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 13 Jan 2002 09:14:13 +0000 Subject: [PATCH] =?UTF-8?q?Vin=20I,=20II:=20*=20Parteien=20mit=203=20NMR?= =?UTF-8?q?=20werden=20nicht=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vin II: * Hunger halbiert Lernerfolg * Hunger verhindert ZAUBERE nicht --- src/common/gamecode/laws.c | 15 ++++++++++----- src/common/gamecode/study.c | 11 ++++++++--- src/common/kernel/eressea.c | 2 +- src/common/kernel/magic.c | 2 ++ src/common/settings-eressea.h | 4 +++- src/common/settings-vinyambar-classic.h | 4 +++- src/common/settings-vinyambar.h | 4 +++- 7 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 698a86031..cc98a3b68 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -1082,16 +1082,18 @@ quit(void) remove("inactive"); for (f = factions; f; f = f->next) if(!fval(f, FL_NOIDLEOUT)) { +#if REMOVENMRTIMEOUT if (turn - f->lastorders >= ORDERGAP) { destroyfaction(f); continue; } +#endif if (turn - f->lastorders >= (ORDERGAP - 1)) { inactivefaction(f); continue; } } -#ifdef REMOVENMRNEWBIE +#if REMOVENMRNEWBIE puts(" - beseitige Spieler, die sich nach der Anmeldung nicht " "gemeldet haben..."); @@ -2957,6 +2959,7 @@ setdefaults (void) set_string(&u->thisorder, u->lastorder); for(S = u->orders; S; S = S->next) { + const char * cmd; keyword_t keyword = igetkeyword(S->s, u->faction->locale); switch (keyword) { @@ -3010,11 +3013,13 @@ setdefaults (void) case K_WORK: case K_DRIVE: case K_MOVE: - if(!global.disabled[K_WORK] && fval(u, FL_HUNGER)) { - set_string(&u->thisorder, locale_string(u->faction->locale, "defaultorder")); - } else { - set_string(&u->thisorder, S->s); + cmd = S->s; +#if HUNGER_DISABLES_LONGORDERS + if (fval(u, FL_HUNGER)) { + cmd = locale_string(u->faction->locale, "defaultorder"); } +#endif + set_string(&u->thisorder, cmd); break; /* Wird je diese Ausschliesslichkeit aufgehoben, muss man aufpassen diff --git a/src/common/gamecode/study.c b/src/common/gamecode/study.c index 02eb06323..003c66092 100644 --- a/src/common/gamecode/study.c +++ b/src/common/gamecode/study.c @@ -455,6 +455,7 @@ learn(void) for (r = regions; r; r = r->next) { for (u = r->units; u; u = u->next) { + int days; if (rterrain(r) == T_OCEAN){ /* sonderbehandlung aller die auf Ozeanen lernen können */ if (u->race != new_race[RC_AQUARIAN] @@ -666,13 +667,17 @@ learn(void) lmod += 5; } learning = max(0, 30 + lmod); - change_skill(u, (skill_t)i, (int)((u->number * dice(2,learning) + a->data.i) * multi)); + days = (int)((u->number * dice(2, learning) + a->data.i) * multi); #else - change_skill(u, (skill_t)i, (int)((u->number * dice(2,30) + a->data.i) * multi)); + days = (int)((u->number * dice(2, 30) + a->data.i) * multi); #endif #else - change_skill(u, (skill_t)i, (int)((u->number * 30 + a->data.i) * multi)); + days = (int)((u->number * 30 + a->data.i) * multi); #endif +#if HUNGER_DISABLES_LONGORDERS + days = days / 2; +#endif + change_skill(u, (skill_t)i, days); if (a) { a_remove(&u->attribs, a); a = NULL; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 29f62137d..3d796ce6b 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1202,7 +1202,7 @@ findkeyword(const char *s, const struct locale * lang) struct lstr * lnames = get_lnames(lang); int i; #ifdef AT_PERSISTENT - if(*s == '@') s++; + if (*s == '@') s++; #endif if (findtoken(&lnames->keywords, s, (void**)&i)==E_TOK_NOMATCH) return NOKEYWORD; if (global.disabled[i]) return NOKEYWORD; diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index 17a079829..a9f2862f7 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -2929,10 +2929,12 @@ magic(void) for (so = u->orders; so; so = so->next) { if (igetkeyword(so->s, u->faction->locale) == K_CAST) { +#if HUNGER_DISABLES_LONGORDERS if (fval(u, FL_HUNGER)) { cmistake(u, so->s, 224, MSG_MAGIC); continue; } +#endif if (r->planep && fval(r->planep, PFL_NOMAGIC)) { cmistake(u, so->s, 269, MSG_MAGIC); continue; diff --git a/src/common/settings-eressea.h b/src/common/settings-eressea.h index 7c5ec71ac..350ab955a 100644 --- a/src/common/settings-eressea.h +++ b/src/common/settings-eressea.h @@ -18,4 +18,6 @@ #define NEW_RESOURCEGROWTH 1 #define LARGE_CASTLES 1 #define GROWING_TREES 1 -#define REMOVENMRNEWBIE +#define REMOVENMRNEWBIE 1 +#define REMOVENMRTIMEOUT 1 +#define HUNGER_DISABLES_LONGORDERS 1 diff --git a/src/common/settings-vinyambar-classic.h b/src/common/settings-vinyambar-classic.h index 409a8c0a7..fae383065 100644 --- a/src/common/settings-vinyambar-classic.h +++ b/src/common/settings-vinyambar-classic.h @@ -18,4 +18,6 @@ #define NEW_RESOURCEGROWTH 0 #define LARGE_CASTLES 0 #define GROWING_TREES 0 -#undef REMOVENMRNEWBIE +#define REMOVENMRNEWBIE 0 +#define REMOVENMRTIMEOUT 0 +#define HUNGER_DISABLES_LONGORDERS 1 diff --git a/src/common/settings-vinyambar.h b/src/common/settings-vinyambar.h index c7500f76e..7555060f8 100644 --- a/src/common/settings-vinyambar.h +++ b/src/common/settings-vinyambar.h @@ -18,4 +18,6 @@ #define NEW_RESOURCEGROWTH 1 #define LARGE_CASTLES 1 #define GROWING_TREES 1 -#undef REMOVENMRNEWBIE +#define REMOVENMRNEWBIE 0 +#define REMOVENMRTIMEOUT 0 +#define HUNGER_DISABLES_LONGORDERS 0