From c65dbd402ddc3f391bf0db5e745ea94d265a7223 Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 21 Apr 2002 07:52:11 +0000 Subject: [PATCH] =?UTF-8?q?-=20#define=20RESOURCE=5FQUANTITY=20:?= =?UTF-8?q?=20Allgemeiner=20Multiplikator=20f=C3=BCr=20die=20=20=20Resourc?= =?UTF-8?q?enmenge=20(Eisen,=20Laen,=20Steine,=20Holz,=20Mallorn).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/laws.c | 2 +- src/common/kernel/resources.c | 4 +++- src/common/settings-eressea.h | 2 ++ src/common/settings-tutorial.h | 4 ++++ src/common/settings-vinyambar-classic.h | 2 ++ src/common/settings-vinyambar.h | 1 + 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index e79907991..9e42b0a22 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -776,7 +776,7 @@ trees(region * r, const int current_season, const int last_weeks_season) if(production(r) <= 0) return; /* Grundchance 1.0% */ - seedchance = FORESTGROWTH; + seedchance = FORESTGROWTH * RESOURCE_QUANTITY; /* Jeder Elf in der Region erhöht die Chance um 0.0008%. */ seedchance += (min(elves, (production(r)*MAXPEASANTS_PER_AREA)/8)) * 8; grownup_trees = rtrees(r, 2); diff --git a/src/common/kernel/resources.c b/src/common/kernel/resources.c index 3d45621de..e2321f644 100644 --- a/src/common/kernel/resources.c +++ b/src/common/kernel/resources.c @@ -130,8 +130,10 @@ static void use_default(rawmaterial *res, const region * r, int amount) ++res->level; res->amount = (int)(modifier * res->base * (1+(res->level-res->startlevel)*res->divisor/100.0)); /* random adjustment, +/- 91% */ +#ifdef RESOURCE_QUANTITY + res->amount = res->amount * RESOURCE_QUANTITY; +#endif } - assert(res->amount>0); } struct rawmaterial * diff --git a/src/common/settings-eressea.h b/src/common/settings-eressea.h index 9d48340a6..91222ee99 100644 --- a/src/common/settings-eressea.h +++ b/src/common/settings-eressea.h @@ -32,3 +32,5 @@ #define PEASANTS_DO_NOT_STARVE 0 #define GUARD_DISABLES_RECRUIT 0 +#define RESOURCE_QUANTITY 1.0 + diff --git a/src/common/settings-tutorial.h b/src/common/settings-tutorial.h index f1130f1c9..1f4b0dcca 100644 --- a/src/common/settings-tutorial.h +++ b/src/common/settings-tutorial.h @@ -30,3 +30,7 @@ #define SKILLPOINTS 0 #define NEW_MIGRATION 1 #define PEASANTS_DO_NOT_STARVE 0 + +#define GUARD_DISABLES_RECRUIT 0 +#define RESOURCE_QUANTITY 1.0 + diff --git a/src/common/settings-vinyambar-classic.h b/src/common/settings-vinyambar-classic.h index 400570e4e..a06072598 100644 --- a/src/common/settings-vinyambar-classic.h +++ b/src/common/settings-vinyambar-classic.h @@ -32,3 +32,5 @@ #define PEASANT_ADJUSTMENT 0 #define GUARD_DISABLES_RECRUIT 0 +#define RESOURCE_QUANTITY 1.0 + diff --git a/src/common/settings-vinyambar.h b/src/common/settings-vinyambar.h index 229a4389e..5829a1f71 100644 --- a/src/common/settings-vinyambar.h +++ b/src/common/settings-vinyambar.h @@ -32,3 +32,4 @@ #define PEASANT_ADJUSTMENT 0 #define GUARD_DISABLES_RECRUIT 0 +#define RESOURCE_QUANTITY 1.0