fix more "drops to the floor" cases when there is no floor

- make the code in apply.c and zap.c consistent
- use the "drops away from you" case whenever the location type does not
lend itself to using the word "floor"
This commit is contained in:
cohrs
2002-03-31 04:18:02 +00:00
parent c335aa5b43
commit 531f703cd0
2 changed files with 10 additions and 4 deletions

View File

@@ -2798,9 +2798,12 @@ doapply()
otmp->blessed = obj->blessed;
otmp->cursed = obj->cursed;
otmp->owt = weight(otmp);
otmp = hold_another_object(otmp,
(u.uswallow || Is_airlevel(&u.uz) ||
u.uinwater || Is_waterlevel(&u.uz)) ?
otmp = hold_another_object(otmp, u.uswallow ?
"Oops! %s out of your reach!" :
(Is_airlevel(&u.uz) ||
Is_waterlevel(&u.uz) ||
levl[u.ux][u.uy].typ < IRONBARS ||
levl[u.ux][u.uy].typ >= ICE) ?
"Oops! %s away from you!" :
"Oops! %s to the floor!",
The(aobjnam(otmp, "slip")),

View File

@@ -4073,7 +4073,10 @@ retry:
/* The(aobjnam()) is safe since otmp is unidentified -dlc */
(void) hold_another_object(otmp, u.uswallow ?
"Oops! %s out of your reach!" :
Is_airlevel(&u.uz) || u.uinwater ?
(Is_airlevel(&u.uz) ||
Is_waterlevel(&u.uz) ||
levl[u.ux][u.uy].typ < IRONBARS ||
levl[u.ux][u.uy].typ >= ICE) ?
"Oops! %s away from you!" :
"Oops! %s to the floor!",
The(aobjnam(otmp,