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.
This commit is contained in:
cohrs
2002-11-07 18:52:00 +00:00
parent f2cc8a0dbf
commit 52d1737294
2 changed files with 14 additions and 5 deletions

View 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

View 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])) &&