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:
@@ -273,6 +273,8 @@ always update map display and use up turn if open or close command attempted
|
||||
while blind reveals change in door state or discloses non-door spot
|
||||
secret door detection's trap finding is no longer blocked by water or clouds
|
||||
on the Planes of Water and Air
|
||||
potion thrown by monster which hit a long worm's tail gave feedback about
|
||||
hitting its head
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mthrowu.c 3.5 2007/06/07 */
|
||||
/* SCCS Id: @(#)mthrowu.c 3.5 2007/12/17 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -26,6 +26,8 @@ STATIC_OVL NEARDATA const char *breathwep[] = {
|
||||
"strange breath #9"
|
||||
};
|
||||
|
||||
extern boolean notonhead; /* for long worms */
|
||||
|
||||
/* hero is hit by something other than a monster */
|
||||
int
|
||||
thitu(tlev, dam, obj, name)
|
||||
@@ -129,7 +131,7 @@ int x,y;
|
||||
return 1 if the object has stopped moving (hit or its range used up) */
|
||||
int
|
||||
ohitmon(mtmp, otmp, range, verbose)
|
||||
struct monst *mtmp; /* accidental target */
|
||||
struct monst *mtmp; /* accidental target, located at <bhitpos.x,.y> */
|
||||
struct obj *otmp; /* missile; might be destroyed by drop_throw */
|
||||
int range; /* how much farther will object travel if it misses */
|
||||
/* Use -1 to signify to keep going even after hit, */
|
||||
@@ -140,6 +142,7 @@ boolean verbose; /* give message(s) even when you can't see what happened */
|
||||
boolean vis, ismimic;
|
||||
int objgone = 1;
|
||||
|
||||
notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my);
|
||||
ismimic = mtmp->m_ap_type && mtmp->m_ap_type != M_AP_MONSTER;
|
||||
vis = cansee(bhitpos.x, bhitpos.y);
|
||||
|
||||
@@ -245,6 +248,7 @@ struct obj *obj; /* missile (or stack providing it) */
|
||||
|
||||
bhitpos.x = x;
|
||||
bhitpos.y = y;
|
||||
notonhead = FALSE; /* reset potentially stale value */
|
||||
|
||||
if (obj->quan == 1L) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user