global warming "infection" not with regular glaciers
This commit is contained in:
Enno Rehling 2005-09-03 09:13:36 +00:00
parent 118230a737
commit 0ee59cf55e
3 changed files with 23 additions and 14 deletions

View File

@ -786,15 +786,10 @@ frame_regions(void)
#define GLOBAL_WARMING 200
#ifdef GLOBAL_WARMING
static void
global_warming(void)
iceberg(region * r)
{
region * r;
for (r=regions;r;r=r->next) {
if (r->age<GLOBAL_WARMING) continue;
if (r->terrain==T_GLACIER) {
/* 1% chance that an existing glacier gets unstable */
if (chance(0.01)) {
direction_t d;
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
@ -809,13 +804,25 @@ global_warming(void)
terraform(r, T_ICEBERG_SLEEP);
}
}
static void
global_warming(void)
{
region * r;
for (r=regions;r;r=r->next) {
if (r->age<GLOBAL_WARMING) continue;
if (r->terrain==T_GLACIER) {
/* 1% chance that an existing glacier gets unstable */
if (chance(0.01)) {
iceberg(r);
}
} else if (r->terrain==T_ICEBERG || r->terrain==T_ICEBERG_SLEEP) {
direction_t d;
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
if (rn && rn->terrain==T_GLACIER && chance(0.10)) {
/* 10% chance that a glacier next to an iceberg gets unstable */
terraform(rn, T_ICEBERG_SLEEP);
iceberg(rn);
}
}
}

View File

@ -395,6 +395,7 @@ usage(const char * prog, const char * arg)
"--nobattle : keine Kämpfe\n"
"--nomonsters : keine monster KI\n"
"--nodebug : keine Logfiles für Kämpfe\n"
"--noreports : absolut keine Reporte schreiben\n"
"--debug : schreibt Debug-Ausgaben in die Datei debug\n"
"--nocr : keine CRs\n"
"--nonr : keine Reports\n"

View File

@ -475,6 +475,7 @@ usage(const char * prog, const char * arg)
"--nobattle : keine Kämpfe\n"
"--nomonsters : keine monster KI\n"
"--nodebug : keine Logfiles für Kämpfe\n"
"--noreports : absolut keine Reporte schreiben\n"
"--debug : schreibt Debug-Ausgaben in die Datei debug\n"
"--nocr : keine CRs\n"
"--nonr : keine Reports\n"