]> granicus.if.org Git - nethack/commitdiff
branch traversal via W quest artifact
authorPatR <rankin@nethack.org>
Sat, 15 Aug 2015 02:18:12 +0000 (19:18 -0700)
committerPatR <rankin@nethack.org>
Sat, 15 Aug 2015 02:18:12 +0000 (19:18 -0700)
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

index 0377c3ac866d09884eafe7f2754c4bf5df50f9a1..e30fe2efd515677a689fa4017707724da42cf2bd 100644 (file)
@@ -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)