Gas clouds expand around terrain rather than being rhomboid

The gas will expand from its chosen center point via breadth-first
search instead of hardcoding a diagonal shape. The search is performed
with a randomized list of directions, and has 50% chance of not spreading
to a space it otherwise would have spread to. This has the effect of fuzzing
the cloud edges in open areas, helping the clouds on, for instance,
the Plane of Fire not be big rhombuses.

Also some other code refactoring related to stinking clouds in read.c

This comes from xNetHack by copperwater <aosdict@gmail.com>
This commit is contained in:
Pasi Kallinen
2021-09-19 13:51:51 +03:00
parent 12800bf84b
commit b23ff20c6a
6 changed files with 135 additions and 47 deletions

View File

@@ -4599,7 +4599,7 @@ zap_over_floor(xchar x, xchar y, int type, boolean *shopdamage,
/* don't create steam clouds on Plane of Water; air bubble
movement and gas regions don't understand each other */
if (!on_water_level)
create_gas_cloud(x, y, rnd(3), 0); /* radius 1..3, no damg */
create_gas_cloud(x, y, rnd(5), 0); /* 1..5, no damg */
if (lev->typ != POOL) { /* MOAT or DRAWBRIDGE_UP or WATER */
if (on_water_level)
@@ -4629,7 +4629,7 @@ zap_over_floor(xchar x, xchar y, int type, boolean *shopdamage,
newsym(x, y);
}
} else if (IS_FOUNTAIN(lev->typ)) {
create_gas_cloud(x, y, rnd(2), 0); /* radius 1..2, no damage */
create_gas_cloud(x, y, rnd(3), 0); /* 1..3, no damage */
if (see_it)
pline("Steam billows from the fountain.");
rangemod -= 1;