some large monsters can knock back smaller monsters with a hit
change Demonbane to a mace, make it the first sac gift for priests,
and give it an invoke ability to banish demons
+wielding Giantslayer prevents knockback from larger monsters
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
static void start_engulf(struct monst *);
static void end_engulf(void);
static int gulpum(struct monst *, struct attack *);
+static boolean m_is_steadfast(struct monst *);
static boolean hmonas(struct monst *);
static void nohandglow(struct monst *);
static boolean mhurtle_to_doom(struct monst *, int, struct permonst **);
wakeup(mdef, TRUE);
}
+static boolean
+m_is_steadfast(struct monst *mtmp)
+{
+ boolean is_u = (mtmp == &g.youmonst);
+ struct obj *otmp = is_u ? uwep : MON_WEP(mtmp);
+
+ /* must be on the ground */
+ if ((is_u && (Flying || Levitation))
+ || (!is_u && (is_flyer(mtmp->data) || is_floater(mtmp->data))))
+ return FALSE;
+
+ if (otmp && otmp->oartifact == ART_GIANTSLAYER)
+ return TRUE;
+ return FALSE;
+}
+
/* monster hits another monster hard enough to knock it back? */
boolean
mhitm_knockback(struct monst *magr,
if ((u_agr || u_def) && !(*hitflags & MM_HIT))
return FALSE;
+ /* steadfast defender cannot be pushed around */
+ if (m_is_steadfast(mdef))
+ return FALSE;
+
/* give the message */
if (u_def || canseemon(mdef)) {
boolean dosteed = u_def && u.usteed;