Add stormy level flag

Which makes clouds create lightning bolts at random.
This flag is used on the plane of air.

Breaks saves and bones.
This commit is contained in:
Pasi Kallinen
2023-03-17 20:13:29 +02:00
parent 4799fc937a
commit aa83dadc1e
6 changed files with 8 additions and 4 deletions

View File

@@ -3749,6 +3749,8 @@ lspo_level_flags(lua_State *L)
gl.level.flags.noautosearch = 1;
else if (!strcmpi(s, "fumaroles"))
gl.level.flags.fumaroles = 1;
else if (!strcmpi(s, "stormy"))
gl.level.flags.stormy = 1;
else {
char buf[BUFSZ];
Sprintf(buf, "Unknown level flag %s", s);

View File

@@ -1706,8 +1706,8 @@ do_storms(void)
int dirx, diry;
int count;
/* no lightning if not the air level or too often, even then */
if (!Is_airlevel(&u.uz) || rn2(8))
/* no lightning if not stormy level or too often, even then */
if (!gl.level.flags.stormy || rn2(8))
return;
/* the number of strikes is 8-log2(nstrike) */