long worm tail hit by potion thrown by monster (trunk only)

From the newsgroup:  when a monster throws a potion at the hero and
it hits a long worm's tail, you'd get "The bottle|flask|&c crashes on the
long worm's _head_ and breaks into shards."  The relevant code changes
"head" to "body" when appropriate, but monster throwing wasn't setting up
`notonhead' so that alteration only kicked in for player throwing.
This commit is contained in:
nethack.rankin
2007-12-17 23:43:31 +00:00
parent d454ca0d6e
commit faa3543063
3 changed files with 9 additions and 2 deletions

View File

@@ -929,6 +929,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
impaired = (Confusion || Stunned || Blind ||
Hallucination || Fumbling);
notonhead = FALSE; /* reset potentially stale value */
if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) {
boolean slipok = TRUE;
if (ammo_and_launcher(obj, uwep))