]> granicus.if.org Git - nethack/commitdiff
plug fountain & throne SIGHUP cheat
authornethack.rankin <nethack.rankin>
Sat, 13 Jul 2002 13:11:51 +0000 (13:11 +0000)
committernethack.rankin <nethack.rankin>
Sat, 13 Jul 2002 13:11:51 +0000 (13:11 +0000)
     When using a fountain or throne, getting a --More-- prompt
usually means that you're about to be told that it has just dried
up or vanished.  But since that topology change didn't occur until
after the message, players could cheat by forcing SIGHUP instead
of answering the prompt; the resulting save file would retain the
original topology.  So change the dungeon prior to telling the user
about it.

     The `fixes' entry possibly belongs in the tty-specific category
but since the change is to core code I put it in the general section.

doc/fixes34.1
src/fountain.c
src/sit.c

index 6332f7d97b98c1fb7380dd9e3d0b37b25daf7612..683b54d4ab3b96f0723fb1253dbe4fd13a70afe1 100644 (file)
@@ -157,6 +157,7 @@ applying a lance against a long worm could cause an impossible
 a knight applying a lance did not do a caitiff check
 blessed gain level when already at level 30 won't reduce experience points
 keep counting spell skill exercise even after expert status is reached
+when a fountain dries up or a throne vanishes, make sure it really happens
 
 
 Platform- and/or Interface-Specific Fixes
index 7eafc43f1940449a3926772f774398c81e49357a..baf5e794bd7106500f9e42ecd1f3f732a0e4a390 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)fountain.c 3.4     2001/09/06      */
+/*     SCCS Id: @(#)fountain.c 3.4     2002/07/10      */
 /*     Copyright Scott R. Turner, srt@ucla, 10/27/86 */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -179,10 +179,11 @@ boolean isyou;
                                return;
                }
 #endif
-               if (cansee(x,y)) pline_The("fountain dries up!");
+               /* replace the fountain with ordinary floor */
                levl[x][y].typ = ROOM;
                levl[x][y].looted = 0;
                levl[x][y].blessedftn = 0;
+               if (cansee(x,y)) pline_The("fountain dries up!");
                /* The location is seen if the hero/monster is invisible */
                /* or felt if the hero is blind.                         */
                newsym(x, y);
index 2ce19612d853bddf9045e5d977d85337b9a41530..9e2eb0b75255b1be89a6c49afa64257c2ea920c9 100644 (file)
--- a/src/sit.c
+++ b/src/sit.c
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)sit.c      3.4     2000/11/09      */
+/*     SCCS Id: @(#)sit.c      3.4     2002/07/12      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -270,8 +270,8 @@ dosit()
 
            if (!rn2(3) && IS_THRONE(levl[u.ux][u.uy].typ)) {
                /* may have teleported */
-               pline_The("throne vanishes in a puff of logic.");
                levl[u.ux][u.uy].typ = ROOM;
+               pline_The("throne vanishes in a puff of logic.");
                newsym(u.ux,u.uy);
            }