autoseed mit minimal-anzahl parteien

This commit is contained in:
Enno Rehling 2002-04-15 22:41:03 +00:00
parent 1bcb3ec339
commit 373606a362
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,31 @@
/* vi: set ts=2:
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
| | Enno Rehling <enno@eressea-pbem.de>
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
| (c) 1998 - 2001 | Henning Peters <faroul@beyond.kn-bremen.de>
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
+-------------------+ Stefan Reich <reich@halbling.de>
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

View File

@ -17,6 +17,7 @@
/* kernel includes */
#include <region.h>
#include <faction.h>
#include <race.h>
#include <unit.h>
/* 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)<MINFACTIONS) return;
do {
x = (rand() % 2001) - 1000;
y = (rand() % 2001) - 1000;