B06005 - cancelling getdir prompt

- Changed a cancelled chat direction to abort the chat -- it seemed odd
that the old behavior would sometimes take time, sometimes not, depending
on the previous direction.
- Documented the current spelleffects behavior of re-using the last
direction after a cancelled getdir() & added a message.
This commit is contained in:
cohrs
2002-08-11 23:17:23 +00:00
parent ded4f66822
commit 5a42dcef98
3 changed files with 9 additions and 2 deletions

View File

@@ -860,7 +860,10 @@ dochat()
return(1);
}
(void) getdir("Talk to whom? (in what direction)");
if (!getdir("Talk to whom? (in what direction)")) {
/* decided not to chat */
return(0);
}
#ifdef STEED
if (u.usteed && u.dz > 0)

View File

@@ -814,7 +814,10 @@ boolean atme;
case SPE_STONE_TO_FLESH:
if (!(objects[pseudo->otyp].oc_dir == NODIR)) {
if (atme) u.dx = u.dy = u.dz = 0;
else (void) getdir((char *)0);
else if (!getdir((char *)0)) {
/* getdir cancelled, re-use previous direction */
pline_The("magical energy is released!");
}
if(!u.dx && !u.dy && !u.dz) {
if ((damage = zapyourself(pseudo, TRUE)) != 0) {
char buf[BUFSZ];