From 791c41e6b4492df9a7ecfbe47008348d5a6c3250 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 14 Aug 2015 19:18:12 -0700 Subject: [PATCH] branch traversal via W quest artifact Require the hero to pass the next_to_u() check when using the Eye of the Aethiopica to portal to another dungeon branch. Even though the reported exploit of having a steed which is carrying the Amulet bring it along had already been prevented, this changes the temporary portal behavior to be like level teleport. A steed carrying the Amulet or a non-adjacent pet on a cursed leash will inhibit the attempted change of location. --- src/artifact.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/artifact.c b/src/artifact.c index 0377c3ac8..e30fe2efd 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 artifact.c $NHDT-Date: 1433060653 2015/05/31 08:24:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */ +/* NetHack 3.6 artifact.c $NHDT-Date: 1439605077 2015/08/15 02:17:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.92 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1541,8 +1541,9 @@ register struct obj *obj; newlev.dlevel = dungeons[i].entry_lev; else newlev.dlevel = dungeons[i].dunlev_ureached; + if (u.uhave.amulet || In_endgame(&u.uz) || In_endgame(&newlev) - || newlev.dnum == u.uz.dnum) { + || newlev.dnum == u.uz.dnum || !next_to_u()) { You_feel("very disoriented for a moment."); } else { if (!Blind) -- 2.40.0