From: nethack.rankin Date: Sat, 13 Jul 2002 13:11:51 +0000 (+0000) Subject: plug fountain & throne SIGHUP cheat X-Git-Tag: MOVE2GIT~2646 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34149babc35bb8f258ee67971a652247bfe318ca;p=nethack plug fountain & throne SIGHUP cheat 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. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 6332f7d97..683b54d4a 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/fountain.c b/src/fountain.c index 7eafc43f1..baf5e794b 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -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); diff --git a/src/sit.c b/src/sit.c index 2ce19612d..9e2eb0b75 100644 --- 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); }