diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 9fd4f3aa0..ab3ee4870 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -85,6 +85,8 @@ making a wide-open special level with FLAGS:inaccessibles could trigger a "floodfill stack overrun" panic (no 3.6.x levels were affected) wallifying a special level might go out of map bounds (not with 3.6.x levels) and corrupt other level data +if a random grave produced during level creation included some gold, that gold + was left on the ground instead of being buried with other treasure Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/mklev.c b/src/mklev.c index 5f6afff45..5ae75498d 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1626,12 +1626,23 @@ struct mkroom *croom; return; } while (occupied(m.x, m.y) || bydoor(m.x, m.y)); - /* Put a grave at m.x, m.y */ + /* Put a grave at */ make_grave(m.x, m.y, dobell ? "Saved by the bell!" : (char *) 0); /* Possibly fill it with objects */ - if (!rn2(3)) - (void) mkgold(0L, m.x, m.y); + if (!rn2(3)) { + /* this used to use mkgold(), which puts a stack of gold on + the ground (or merges it with an existing one there if + present), and didn't bother burying it; now we create a + loose, easily buriable, stack but we make no attempt to + replicate mkgold()'s level-based formula for the amount */ + struct obj *gold = mksobj(GOLD_PIECE, TRUE, FALSE); + + gold->quan = (long) (rnd(20) + level_difficulty() * rnd(5)); + gold->owt = weight(gold); + gold->ox = m.x, gold->oy = m.y; + add_to_buried(gold); + } for (tryct = rn2(5); tryct; tryct--) { otmp = mkobj(RANDOM_CLASS, TRUE); if (!otmp)