confirmation for polearm attacks (trunk only)

From a bug report, 2005:  applying a
polearm towards a monster ignores the `confirm' option.  It's a wielded
weapon attack but is handled internally as a throw since it's also a
ranged attack.  The report included a small patch for use_pole() but I'm
calling the regular attack confirmation routine instead.

     Also, move the penalty for samurai attacking peaceful monsters into
the same routine that handles knight attacking defenseless monsters so
that they're more consistent.
This commit is contained in:
nethack.rankin
2007-05-28 00:20:43 +00:00
parent 2b29d99315
commit bb5ade4293
4 changed files with 27 additions and 20 deletions

View File

@@ -1397,6 +1397,7 @@ register struct obj *obj; /* thrownobj or kickobj or uwep */
}
if (tmp >= rnd(20)) {
if (hmode == HMON_APPLIED) u.uconduct.weaphit++;
if (hmon(mon, obj, hmode)) { /* mon still alive */
cutworm(mon, bhitpos.x, bhitpos.y, obj);
}
@@ -1429,6 +1430,7 @@ register struct obj *obj; /* thrownobj or kickobj or uwep */
passive_obj(mon, obj, (struct attack *)0);
} else {
tmiss(obj, mon, TRUE);
if (hmode == HMON_APPLIED) wakeup(mon);
}
} else if (otyp == HEAVY_IRON_BALL) {