forked from github/server
global warming "infection" not with regular glaciers
This commit is contained in:
parent
118230a737
commit
0ee59cf55e
3 changed files with 23 additions and 14 deletions
|
@ -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);
|
||||
|
@ -808,6 +803,18 @@ global_warming(void)
|
|||
if (d==MAXDIRECTIONS) {
|
||||
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;
|
||||
|
@ -815,7 +822,7 @@ global_warming(void)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue