kick evasion shouldn't move monsters through walls
kick evasion and jousting/staggering blows shouldn't move grid bugs diagonally
#untrap didn't check whether hero could reach the ground
-digging/chopping a closed drawbridge message mentioned diggin a "wall"
+digging/chopping a closed drawbridge message mentioned digging a "wall"
+attacking via applied polearm now honors the "confirm" option
Platform- and/or Interface-Specific Fixes
/* Attack the monster there */
if ((mtmp = m_at(cc.x, cc.y)) != (struct monst *)0) {
- int oldhp = mtmp->mhp;
-
bhitpos = cc;
+ if (attack_checks(mtmp, uwep)) return res;
check_caitiff(mtmp);
(void) thitmonst(mtmp, uwep);
- /* check the monster's HP because thitmonst() doesn't return
- * an indication of whether it hit. Not perfect (what if it's a
- * non-silver weapon on a shade?)
- */
- if (mtmp->mhp < oldhp)
- u.uconduct.weaphit++;
} else
/* Now you know that nothing is there... */
pline(nothing_happens);
struct obj *obj;
{
int res = 0, typ, max_range = 4, tohit;
+ boolean save_confirm;
coord cc;
struct monst *mtmp;
struct obj *otmp;
}
break;
case 2: /* Monster */
+ bhitpos = cc;
if ((mtmp = m_at(cc.x, cc.y)) == (struct monst *)0) break;
+ save_confirm = flags.confirm;
if (verysmall(mtmp->data) && !rn2(4) &&
enexto(&cc, u.ux, u.uy, (struct permonst *)0)) {
+ flags.confirm = FALSE;
+ (void) attack_checks(mtmp, uwep);
+ flags.confirm = save_confirm;
+ check_caitiff(mtmp); /* despite fact there's no damage */
You("pull in %s!", mon_nam(mtmp));
mtmp->mundetected = 0;
rloc_to(mtmp, cc.x, cc.y);
return (1);
} else if ((!bigmonst(mtmp->data) && !strongmonst(mtmp->data)) ||
rn2(4)) {
+ flags.confirm = FALSE;
+ (void) attack_checks(mtmp, uwep);
+ flags.confirm = save_confirm;
+ check_caitiff(mtmp);
(void) thitmonst(mtmp, uwep);
return (1);
}
}
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);
}
passive_obj(mon, obj, (struct attack *)0);
} else {
tmiss(obj, mon, TRUE);
+ if (hmode == HMON_APPLIED) wakeup(mon);
}
} else if (otyp == HEAVY_IRON_BALL) {
/* if it was an invisible mimic, treat it as if we stumbled
* onto a visible mimic
*/
- if(mtmp->m_ap_type && !Protection_from_shape_changers) {
+ if (mtmp->m_ap_type && !Protection_from_shape_changers &&
+ /* applied pole-arm attack is too far to get stuck */
+ distu(mtmp->mx, mtmp->my) <= 2) {
if(!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data,AD_STCK))
u.ustuck = mtmp;
}
check_caitiff(mtmp)
struct monst *mtmp;
{
+ if (u.ualign.record <= -10) return;
+
if (Role_if(PM_KNIGHT) && u.ualign.type == A_LAWFUL &&
(!mtmp->mcanmove || mtmp->msleeping ||
- (mtmp->mflee && !mtmp->mavenge)) &&
- u.ualign.record > -10) {
+ (mtmp->mflee && !mtmp->mavenge))) {
You("caitiff!");
adjalign(-1);
+ } else if (Role_if(PM_SAMURAI) && mtmp->mpeaceful) {
+ /* attacking peaceful creatures is bad for the samurai's giri */
+ You("dishonorably attack the innocent!");
+ adjalign(-1);
}
}
/* some actions should occur only once during multiple attacks */
if (!(*attk_count)++) {
- /* knight's chivalry */
+ /* knight's chivalry or samurai's giri */
check_caitiff(mtmp);
-
- /* attacking peaceful creatures is bad for the samurai's giri */
- if (Role_if(PM_SAMURAI) && mtmp->mpeaceful &&
- u.ualign.record > -10) {
- You("dishonorably attack the innocent!");
- adjalign(-1);
- }
}
/* adjust vs. (and possibly modify) monster state */