than dying when engulfed could say "Dracula turns into Dracula"
adjust archeologist and valkyrie starting intrinsics
once per game if receiving killing blow from near-full hp, leave 1 hp
+spell of knock can knock back small monsters
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
extern int damageum(struct monst *, struct attack *, int);
extern int explum(struct monst *, struct attack *);
extern void missum(struct monst *, struct attack *, boolean);
+extern boolean m_is_steadfast(struct monst *);
extern boolean mhitm_knockback(struct monst *, struct monst *,struct attack *,
int *, boolean);
extern int passive(struct monst *, struct obj *, boolean, boolean, uchar,
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 **);
}
/* check whether equipment protects against knockback */
-static boolean
+boolean
m_is_steadfast(struct monst *mtmp)
{
boolean is_u = (mtmp == &gy.youmonst);
int
bhitm(struct monst *mtmp, struct obj *otmp)
{
+ int ret = 0;
boolean wake = TRUE; /* Most 'zaps' should wake monster */
boolean reveal_invis = FALSE, learn_it = FALSE;
boolean dbldam = Role_if(PM_KNIGHT) && u.uhave.questart;
} else if (openfallingtrap(mtmp, TRUE, &learn_it)) {
/* mtmp might now be on the migrating monsters list */
break;
+ } else if (otyp == SPE_KNOCK) {
+ wake = TRUE;
+ ret = 1;
+ if (mtmp->data->msize < MZ_HUMAN && !m_is_steadfast(mtmp)) {
+ if (canseemon(mtmp))
+ pline("%s is knocked back!",
+ Monnam(mtmp));
+ mhurtle(mtmp, mtmp->mx - u.ux, mtmp->my - u.uy, rnd(2));
+ } else {
+ if (canseemon(mtmp))
+ pline("%s doesn't budge.", Monnam(mtmp));
+ }
+ if (!DEADMONSTER(mtmp)) {
+ wakeup(mtmp, !mindless(mtmp->data));
+ abuse_dog(mtmp);
+ }
} else if ((obj = which_armor(mtmp, W_SADDLE)) != 0) {
char buf[BUFSZ];
that the wand itself has been seen */
if (learn_it)
learnwand(otmp);
- return 0;
+ return ret;
}
/* hero is held by a monster or engulfed or holding a monster and has zapped
* This function reveals the absence of a remembered invisible monster in
* necessary cases (throwing or kicking weapons). The presence of a real
* one is revealed for a weapon, but if not a weapon is left up to fhitm().
+ *
+ * If fhitm returns non-zero value, stops the beam and returns the monster
*/
struct monst *
bhit(coordxy ddx, coordxy ddy, int range, /* direction and range */
goto bhit_done;
} else {
/* ZAPPED_WAND */
- (*fhitm)(mtmp, obj);
+ if ((*fhitm)(mtmp, obj)) {
+ result = mtmp;
+ goto bhit_done;
+ }
range -= 3;
}
} else {