kicking vs throwing vs polearms (trunk only)

Wielding a bow while kicking arrows gave a shooting bonus.  Also,
From a bug report:  applying a
polearm to hit at range never caused a pudding to split because the attack
gets treated as throwing.  Likewise, confuse monster effect (hands glowing
red) didn't kick in for applied polearms.
This commit is contained in:
nethack.rankin
2007-03-25 05:31:13 +00:00
parent 1c4907829d
commit ae9c10ea07
5 changed files with 57 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)hack.h 3.5 2007/02/21 */
/* SCCS Id: @(#)hack.h 3.5 2007/03/24 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -129,6 +129,13 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define FLASHED_LIGHT 3
#define INVIS_BEAM 4
/* attack mode for hmon() */
#define HMON_MELEE 0 /* hand-to-hand */
#define HMON_THROWN 1 /* normal ranged (or spitting while poly'd) */
#define HMON_KICKED 2 /* alternate ranged */
#define HMON_APPLIED 3 /* polearm, treated as ranged */
#define HMON_DRAGGED 4 /* attached iron ball, pulled into mon */
#define MATCH_WARN_OF_MON(mon) (Warn_of_mon && \
((context.warntype.obj && \
(context.warntype.obj & (mon)->data->mflags2)) || \