#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
#define VIASITTING 0x20 /* #sit while at trap location (affects message) */
#define FAILEDUNTRAP 0x40 /* trap activated by failed untrap attempt */
+#define HURTLING 0x80 /* monster is hurtling through air */
/* Flags to control test_move in hack.c */
#define DO_MOVE 0 /* really doing the move */
set_apparxy(mon);
if (is_waterwall(x, y))
return FALSE;
- res = mintrap(mon, NO_TRAP_FLAGS); /* TODO: TEMPFLIGHT? */
+ res = mintrap(mon, HURTLING);
if (res == Trap_Killed_Mon
|| res == Trap_Caught_Mon
|| res == Trap_Moved_Mon)
cc.x = mon->mx + (dx * range);
cc.y = mon->my + (dy * range);
(void) walk_path(&mc, &cc, mhurtle_step, (genericptr_t) mon);
- (void) minliquid(mon);
+ if (!DEADMONSTER(mon) && t_at(mon->mx, mon->my))
+ mintrap(mon, FORCEBUNGLE);
+ else
+ (void) minliquid(mon);
return;
}
return (is_floater(mtmp->data)
|| (is_flyer(mtmp->data) && !plunged)
+ || (trflags & HURTLING) != 0
|| (mtmp == &g.youmonst ?
(Levitation || (Flying && !plunged)) : 0));
}
} else {
register int tt = trap->ttyp;
boolean forcetrap = ((mintrapflags & FORCETRAP) != 0);
+ boolean forcebungle = (mintrapflags & FORCEBUNGLE) != 0;
/* monster has seen such a trap before */
boolean already_seen = ((mtmp->mtrapseen & (1 << (tt - 1))) != 0
|| (tt == HOLE && !mindless(mptr)));
if (floor_trigger(tt) && check_in_air(mtmp, mintrapflags)) {
return Trap_Effect_Finished;
}
- if (already_seen && rn2(4))
+ if (already_seen && rn2(4) && !forcebungle)
return Trap_Effect_Finished;
}