From: cohrs Date: Thu, 7 Nov 2002 18:52:00 +0000 (+0000) Subject: teleport control, confusion and stunned X-Git-Tag: MOVE2GIT~2339 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52d17372945951e375d69ef4f1911d25b5a7b643;p=nethack teleport control, confusion and stunned 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. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 83feca3aa..2120876e3 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/teleport.c b/src/teleport.c index 0fde69e09..f53a7a0c5 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -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])) &&