forked from github/server
reduced volcano chance
This commit is contained in:
parent
0dbd20184d
commit
5c4b97dfc3
|
@ -1235,7 +1235,7 @@ randomevents(void)
|
|||
if (rng_int()%100 < 12) {
|
||||
ADDMSG(&r->msgs, msg_message("volcanostopsmoke", "region", r));
|
||||
rsetterrain(r, T_VOLCANO);
|
||||
} else if (rng_int()%100 < 8) {
|
||||
} else if (r->age>20 && rng_int()%100 < 8) {
|
||||
volcano_outbreak(r);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -659,6 +659,7 @@ read_unit(struct storage * store)
|
|||
char rname[32];
|
||||
|
||||
n = store->r_id(store);
|
||||
if (n<=0) return NULL;
|
||||
u = findunit(n);
|
||||
if (u==NULL) {
|
||||
u = calloc(sizeof(unit), 1);
|
||||
|
@ -731,7 +732,7 @@ read_unit(struct storage * store)
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue