reduced volcano chance

This commit is contained in:
Enno Rehling 2009-07-12 09:09:53 +00:00
parent 0dbd20184d
commit 5c4b97dfc3
2 changed files with 3 additions and 2 deletions

View file

@ -1235,7 +1235,7 @@ randomevents(void)
if (rng_int()%100 < 12) { if (rng_int()%100 < 12) {
ADDMSG(&r->msgs, msg_message("volcanostopsmoke", "region", r)); ADDMSG(&r->msgs, msg_message("volcanostopsmoke", "region", r));
rsetterrain(r, T_VOLCANO); rsetterrain(r, T_VOLCANO);
} else if (rng_int()%100 < 8) { } else if (r->age>20 && rng_int()%100 < 8) {
volcano_outbreak(r); volcano_outbreak(r);
} }
} }

View file

@ -659,6 +659,7 @@ read_unit(struct storage * store)
char rname[32]; char rname[32];
n = store->r_id(store); n = store->r_id(store);
if (n<=0) return NULL;
u = findunit(n); u = findunit(n);
if (u==NULL) { if (u==NULL) {
u = calloc(sizeof(unit), 1); u = calloc(sizeof(unit), 1);
@ -731,7 +732,7 @@ read_unit(struct storage * store)
set_number(u, 0); set_number(u, 0);
} }
if (count_unit(u)) u->faction->no_units++; if (count_unit(u) && u->faction) u->faction->no_units++;
set_number(u, number); set_number(u, number);