void global_warming(int severity)
{
char far *seen_f;
int sea_h, terrain_l, y_h, dir_b, x_i;
strcpy(msgtext, "Global temperature\nrises! Icecaps melt.\nSevere Drought.\n");
news_box(-1);
for (x_i = 0; x_i < 80; x_i++)
for (y_h = 0; y_h < 50; y_h++) {
terrain_l = terrain_at(x_i, y_h);
if (terrain_l > 3)
continue;
sea_h = 0;
for (dir_b = 1; dir_b <= 8; dir_b++)
if (terrain_at(x_i + spiral_x[dir_b], y_h + spiral_y[dir_b]) == 10)
sea_h++;
if (sea_h >= 7 - severity) {
seen_f = &map_visible_to[x_i][y_h];
*seen_f |= 1;
map_claim(x_i, y_h, terrain_l == 3 ? 11 : 3, 2);
unflag(6, x_i, y_h);
} else if (((unsigned char) (x_i * 11 + y_h * 13) & 7) == severity) {
seen_f = &map_visible_to[x_i][y_h];
*seen_f |= 1;
map_claim(x_i, y_h, terrain_l <= 1 ? 14 : 6, 2);
} else
continue;
if (*seen_f & (1 << civnow))
map_note(x_i, y_h);
}
}
unsigned char far story_cycles[131] = {
146, 152, 21, 183, 187, 5, 188, 191, 17, 0, 48, 56, 11, 32, 47, 10, 141, 148, 13, 176, 183, 23, 211, 215, 3, 152, 155, 1, 57, 79, 15, 0, 80, 95, 17, 96, 111, 7, 112, 127, 30, 136, 140, 10, 184, 188, 11, 0, 134, 138, 5, 139, 143, 10, 240, 241, 23, 96, 101, 25, 242, 244, 30, 245, 250, 12, 251, 252, 11, 102, 105, 21, 0, 184, 187, 21, 180, 183, 16, 135, 140, 12, 214, 215, 21, 96, 102, 17, 0, 136, 138, 21, 129, 131, 8, 246, 249, 21, 250, 254, 12, 0, 246, 249, 21, 250, 251, 10, 208, 210, 11, 135, 138, 16, 0, 208, 210, 16, 216, 218, 11, 131, 134, 16, 48, 53, 25, 246, 249, 64, 0
};
unsigned int far story_delays[45] = {
0, 192, 336, 624, 768, 912, 1104, 1200, 1440, 1632, 1872, 2016, 2256, 2352, 2496, 2688, 2880, 3168, 3456, 3648, 3744, 3840, 3936, 4032, 4224, 4416, 4608, 4800, 4992, 5184, 5376, 5568, 5760, 6000, 6192, 6336, 6528, 6720, 7008, 7296, 7584, 7872, 8064, 8512, 65535
};