]> granicus.if.org Git - nethack/commitdiff
disoriented teleport attempt
authorPatR <rankin@nethack.org>
Sat, 30 May 2015 19:30:54 +0000 (12:30 -0700)
committerPatR <rankin@nethack.org>
Sat, 30 May 2015 19:30:54 +0000 (12:30 -0700)
Reported for pre-beta, getting "you feel disoriented" when attempting
to teleport within a level while carrying the Amulet, you still ended
up teleporting.  Wizard mode allows the disorientation to be overridden
but the logic was wrong.  It worked as intended when in wizard mode but
unintentionally always overrode disorientation when not in that mode.

src/teleport.c

index ade0ee2916836e3081c8d3fdb084294dd32e2c75..146f9a68e126b76e1a87ea8f6b471483c9df1060 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 teleport.c      $NHDT-Date: 1432512774 2015/05/25 00:12:54 $  $NHDT-Branch: master $:$NHDT-Revision: 1.58 $ */
+/* NetHack 3.6 teleport.c      $NHDT-Date: 1433014241 2015/05/30 19:30:41 $  $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -440,7 +440,7 @@ struct obj *scroll;
 
     if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) {
         You_feel("disoriented for a moment.");
-        if (wizard && yn("Override?") != 'y')
+        if (!wizard || yn("Override?") != 'y')
             return FALSE;
     }
     if ((Teleport_control && !Stunned) || wizard) {