]> granicus.if.org Git - nethack/commitdiff
teleport control, confusion and stunned
authorcohrs <cohrs>
Thu, 7 Nov 2002 18:52:00 +0000 (18:52 +0000)
committercohrs <cohrs>
Thu, 7 Nov 2002 18:52:00 +0000 (18:52 +0000)
Being Stunned now disallows teleport control.  Confusion may affect ability
to control level teleports, but only after asking for the destination.
Made confused level teleport failures based on luck too.

doc/fixes34.1
src/teleport.c

index 83feca3aa10bb7c446d553ea6e77336708bc1331..2120876e3238b220d96cd595d8a0945e02f79124 100644 (file)
@@ -294,7 +294,8 @@ cancelled yellow lights should not explode against other monsters, as well as
        not exploding against you
 becoming confused, eg from nausia, while reading a spellbook should result
        in the usual confusion effects
-level teleports should not be controlled if you're confused
+teleports should not be controlled if you're stunned, confusion should have
+       some effect on your ability to control level teleports
 vault wall repair should remove traps subsequently created at affected spots
 don't reveal deity name when a high priest(ess) gives temple entry greeting
 for ordinary remove curse, don't uncurse quivered object unless it is suitable
index 0fde69e09f0a7ada880fc512b55982d134151247..f53a7a0c504c6605851cc68184bdd7118dcc6680 100644 (file)
@@ -398,7 +398,7 @@ tele()
            You_feel("disoriented for a moment.");
            return;
        }
-       if (Teleport_control
+       if ((Teleport_control && !Stunned)
 #ifdef WIZARD
                            || wizard
 #endif
@@ -556,7 +556,7 @@ level_tele()
            You_feel("very disoriented for a moment.");
            return;
        }
-       if ((Teleport_control && !Confusion)
+       if ((Teleport_control && !Stunned)
 #ifdef WIZARD
           || wizard
 #endif
@@ -568,10 +568,18 @@ level_tele()
            do {
                if (++trycnt == 2) Strcat(qbuf, " [type a number]");
                getlin(qbuf, buf);
-               if (!strcmp(buf,"\033"))        /* cancelled */
+               if (!strcmp(buf,"\033")) {      /* cancelled */
+                   if (Confusion && rnl(5)) {
+                       pline("Oops...");
+                       goto random_levtport;
+                   }
                    return;
-               else if (!strcmp(buf,"*"))
+               } else if (!strcmp(buf,"*")) {
+                   goto random_levtport;
+               } else if (Confusion && rnl(5)) {
+                   pline("Oops...");
                    goto random_levtport;
+               }
                if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf);
            } while (!newlev && !digit(buf[0]) &&
                     (buf[0] != '-' || !digit(buf[1])) &&