From c89d5f2075cb34135dd2bfd5e08ec486e81755e0 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 22 May 2007 00:53:36 +0000 Subject: [PATCH] gem probabilities (trunk only) This is probably on 's bug list, but I don't remember where that lives. I found a copy of an old news message by him which pointed out that gem probabilities are set for a given dungeon level at the time it is being created, but they don't get reset when an existing level is revisited. So giants' inventory creation and any monsters' death drops generate gems using values from the level most recently made rather than from their/hero's current location. That can lead to high level gems in the main dungeon after entering the mines. --- doc/fixes35.0 | 1 + src/do.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 2e49b4fba..5ff689c12 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -230,6 +230,7 @@ breath attack directed at self by poly'd hero always hits override non-silver vs shades for artifacts which deal extra damage to undead assorted mirror fixes--mainly visibility issues some monsters can't be strangled; self-polymorph can stop/restart strangulation +re-adjust gem generation probabilities when revisiting existing dungeon levels Platform- and/or Interface-Specific Fixes diff --git a/src/do.c b/src/do.c index 6c0bbe291..1253f506d 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)do.c 3.5 2007/02/03 */ +/* SCCS Id: @(#)do.c 3.5 2007/05/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1133,6 +1133,7 @@ boolean at_stairs, falling, portal; minit(); /* ZEROCOMP */ getlev(fd, hackpid, new_ledger, FALSE); (void) close(fd); + oinit(); /* reassign level dependent obj probabilities */ } /* do this prior to level-change pline messages */ vision_reset(); /* clear old level's line-of-sight */