From 2c53f3a8e74196e467702c3fe172cda2aee3ce72 Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Fri, 12 Dec 2003 16:10:12 +0000 Subject: [PATCH] =?UTF-8?q?-=20Magieabschw=C3=A4chung,=20trivial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/magic.c | 14 +++++++++-- src/common/settings-wdw.h | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/common/settings-wdw.h diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index 70bf5ab1d..f780681ca 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -1102,13 +1102,15 @@ spellpower(region * r, unit * u, spell * sp, int cast_level) { curse * c; int force = cast_level; - if (sp==NULL) return 0; - else { + if (sp==NULL) { + return 0; + } else { /* Bonus durch Magieturm und gesegneten Steinkreis */ struct building * b = inside_building(u); const struct building_type * btype = b?b->type:NULL; if (btype && btype->flags & BTF_MAGIC) ++force; } + if (get_item(u, I_RING_OF_POWER) > 0) ++force; /* Antimagie in der Zielregion */ @@ -1127,6 +1129,10 @@ spellpower(region * r, unit * u, spell * sp, int cast_level) cmistake(u, findorder(u, u->thisorder), 185, MSG_MAGIC); } +#ifdef MAGICPOWER + force = force * MAGICPOWER; +#endif + return max(force, 0); } @@ -1491,6 +1497,10 @@ regeneration(unit * u) /* Würfeln */ aura = (rand() % d + rand() % d)/2 + 1; +#ifdef MAGICREGEN + aura = aura * MAGICREGEN; +#endif + return aura; } diff --git a/src/common/settings-wdw.h b/src/common/settings-wdw.h new file mode 100644 index 000000000..73aca9a23 --- /dev/null +++ b/src/common/settings-wdw.h @@ -0,0 +1,51 @@ +/* vi: set ts=2: + +-------------------+ Christian Schlittchen + | | Enno Rehling + | Eressea PBEM host | Katja Zedel + | (c) 1998 - 2003 | Henning Peters + | | Ingo Wilken + +-------------------+ Stefan Reich + + This program may not be used, modified or distributed + without prior permission by the authors of Eressea. +*/ + +/* + * Contains defines for the "alliance" vinyambar game (V3). + * Include this file from settings.h to make eressea work. + */ +#define ENTERTAINFRACTION 20 +#define IMMUN_GEGEN_ANGRIFF 8 +#define RESOURCE_CONVERSION 1 +#define NEW_RESOURCEGROWTH 1 +#define LARGE_CASTLES 1 +#define GROWING_TREES 1 +#define REDUCED_PEASANTGROWTH 1 +#define RACE_ADJUSTMENTS 1 +#define TEACHDIFFERENCE 2 +#define PEASANT_ADJUSTMENT 1 +#define GUARD_DISABLES_RECRUIT 1 +#define GUARD_DISABLES_PRODUCTION 1 +#define RESOURCE_QUANTITY 0.5 +#define RECRUITFRACTION 40 /* 100/RECRUITFRACTION% */ +#define CATAPULT_AMMUNITION 1 /* Gebaut werden kann sie auch mit 0! */ +#define CHANGED_CROSSBOWS 1 +#define NEWATSROI 0 +#define COMBAT_TURNS 5 +#define PEASANTS_DO_NOT_STARVE 0 +#define NEW_MIGRATION 1 +#define MIGRANTS_CAN_LEARN_EXPENSIVE_SKILLS 1 /* vinyambar 3 only */ +#define MAGICPOWER 0.5 +#define MAGICREGEN 0.5 + +#if NEWATSROI == 1 +#define ATSBONUS 2 +#define ROIBONUS 4 +#endif + +#define ENHANCED_QUIT +#define ALLIANCES +#undef ALLIANCEJOIN +#define AUTOALLIANCE (HELP_FIGHT) + +#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"