refine blocked levitation/flight (trunk only)

Levitation side-effects get skipped if Levitation toggles while it
is blocked, so BFlying (the reason Flying is blocked) could become stale
in some situations.  Enlightment feedback about latent flight capability
was the only thing affected.
This commit is contained in:
nethack.rankin
2011-10-22 23:26:17 +00:00
parent 897d527837
commit 282f8e8e70
6 changed files with 35 additions and 18 deletions

View File

@@ -1775,16 +1775,13 @@ int final;
long save_BFly = BFlying;
BFlying = 0L;
if (Flying) {
Sprintf(buf, "%s%s%s",
(save_BFly & I_SPECIAL) ?
" if you weren't levitating" : "",
((save_BFly & (FROMOUTSIDE|I_SPECIAL)) ==
(FROMOUTSIDE|I_SPECIAL)) ? " and" : "",
(save_BFly & FROMOUTSIDE) ?
if_surroundings_permitted : (const char *)"");
enl_msg(You_, "would fly", "would have flown", buf, "");
}
if (Flying)
enl_msg(You_, "would fly", "would have flown",
Levitation ? "if you weren't levitating" :
(save_BFly == FROMOUTSIDE) ?
if_surroundings_permitted :
/* both surroundings and [latent] levitation */
" if circumstances permitted", "");
BFlying = save_BFly;
}
/* actively walking on water handled earlier as a status condition */