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.
This commit is contained in:
nethack.rankin
2002-07-13 13:11:51 +00:00
parent 0dd070271b
commit 34149babc3
3 changed files with 6 additions and 4 deletions

View 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

View 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);

View File

@@ -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);
}