From 373606a362d4302710364cf590e341efda97b996 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 15 Apr 2002 22:41:03 +0000 Subject: [PATCH] autoseed mit minimal-anzahl parteien --- src/common/settings-tutorial.h | 31 +++++++++++++++++++++++++++++++ src/mapper/autoseed.c | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/common/settings-tutorial.h diff --git a/src/common/settings-tutorial.h b/src/common/settings-tutorial.h new file mode 100644 index 000000000..eac61b4d5 --- /dev/null +++ b/src/common/settings-tutorial.h @@ -0,0 +1,31 @@ +/* vi: set ts=2: + +-------------------+ Christian Schlittchen + | | Enno Rehling + | Eressea PBEM host | Katja Zedel + | (c) 1998 - 2001 | 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 "free" game (Eressea) . + * Include this file from settings.h to make eressea work. + */ +#define GAME_ID 1 +#define RESOURCE_CONVERSION 1 +#define NEW_RESOURCEGROWTH 1 +#define LARGE_CASTLES 1 +#define GROWING_TREES 1 +#define REMOVENMRNEWBIE 1 +#define NMRTIMEOUT 4 +#define HUNGER_DISABLES_LONGORDERS 1 +#define REDUCED_PEASANTGROWTH 1 +#define RACE_ADJUSTMENTS 1 +#define TEACHDIFFERENCE 2 +#define PEASANT_ADJUSTMENT 1 +#define SKILLPOINTS 0 +#define NEW_MIGRATION 1 +#define PEASANTS_DO_NOT_STARVE 0 diff --git a/src/mapper/autoseed.c b/src/mapper/autoseed.c index 45d450a42..40d289e8c 100644 --- a/src/mapper/autoseed.c +++ b/src/mapper/autoseed.c @@ -17,6 +17,7 @@ /* kernel includes */ #include #include +#include #include /* libc includes */ @@ -265,10 +266,15 @@ autoseed(struct regionlist * rlist) static terrain_t preferred_terrain(const struct race * rc) { + if (rc==rc_find("dwarf")) return T_MOUNTAIN; + if (rc==rc_find("insect")) return T_DESERT; + if (rc==rc_find("halfling")) return T_SWAMP; + if (rc==rc_find("troll")) return T_MOUNTAIN; return T_PLAIN; } #define REGIONS_PER_FACTION 2 +#define MINFACTIONS 1 void mkisland(int nsize) @@ -277,6 +283,8 @@ mkisland(int nsize) region * r; regionlist * rlist = NULL; int rsize; + + if (listlen(newfactions)