monster polearm usage (trunk only)
From newsgroup discussion, reproduced with current dev code (the missing capitalization is a post-3.4.3 buglet): The orc tries to wield a halberd. the orc's bow is welded to her hand! The orc thrusts a halberd. You are almost hit by a halberd. Caused by overloading polearm attacks with throwing. The monster throwing code didn't enforce that a polearm must be successfully wielded.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mthrowu.c 3.5 2007/03/17 */
|
||||
/* SCCS Id: @(#)mthrowu.c 3.5 2007/06/07 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -499,6 +499,7 @@ struct monst *mtmp;
|
||||
if (is_pole(otmp)) {
|
||||
int dam, hitv;
|
||||
|
||||
if (otmp != MON_WEP(mtmp)) return; /* polearm must be wielded */
|
||||
if (dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) > POLE_LIM ||
|
||||
!couldsee(mtmp->mx, mtmp->my))
|
||||
return; /* Out of range, or intervening wall */
|
||||
|
||||
Reference in New Issue
Block a user