digging holes

If you manage to escape a hole and then dig down with a pick-axe at
that location, finish on the first move instead of after the usual N turns.
This commit is contained in:
nethack.rankin
2005-03-10 05:18:28 +00:00
parent e0294035b0
commit 2799e8f617
2 changed files with 7 additions and 6 deletions
+1
View File
@@ -92,6 +92,7 @@ monkeys can't steal rings worn under cursed weapon
succubi will remove hero's gloves before taking worn ring; incubi will do succubi will remove hero's gloves before taking worn ring; incubi will do
so before forcing ring to be put on so before forcing ring to be put on
mbodypart should return forehoof, not foreclaw, for horselike monsters mbodypart should return forehoof, not foreclaw, for horselike monsters
further digging of an existing hole finishes in a single turn
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+6 -6
View File
@@ -1,4 +1,4 @@
/* SCCS Id: @(#)dig.c 3.5 2003/03/23 */ /* SCCS Id: @(#)dig.c 3.5 2005/03/07 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -270,9 +270,10 @@ dig()
if (Race_if(PM_DWARF)) if (Race_if(PM_DWARF))
context.digging.effort *= 2; context.digging.effort *= 2;
if (context.digging.down) { if (context.digging.down) {
register struct trap *ttmp; struct trap *ttmp = t_at(dpx, dpy);
if (context.digging.effort > 250) { if (context.digging.effort > 250 ||
(ttmp && ttmp->ttyp == HOLE)) {
(void) dighole(FALSE); (void) dighole(FALSE);
(void) memset((genericptr_t)&context.digging, 0, (void) memset((genericptr_t)&context.digging, 0,
sizeof (struct dig_info)); sizeof (struct dig_info));
@@ -280,9 +281,8 @@ dig()
} }
if (context.digging.effort <= 50 || if (context.digging.effort <= 50 ||
((ttmp = t_at(dpx,dpy)) != 0 && (ttmp && (ttmp->ttyp == TRAPDOOR ||
(ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT || ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)))
ttmp->ttyp == TRAPDOOR || ttmp->ttyp == HOLE)))
return(1); return(1);
if (IS_ALTAR(lev->typ)) { if (IS_ALTAR(lev->typ)) {