* to make an extra call to goodpos()] */
#define GP_ALLOW_U 0x100000L /* don't reject hero's location */
#define MM_NOEXCLAM 0x200000L /* more sedate "<mon> appears." mesg for ^G */
+#define MM_IGNORELAVA 0x400000L /* ignore lava when positioning */
/* flags for make_corpse() and mkcorpstat(); 0..7 are recorded in obj->spe */
#define CORPSTAT_NONE 0x00
pline("Pick a monster to hurtle.");
do {
- if (mtmp && !DEADMONSTER(mtmp) && canseemon(mtmp)) {
+ if (mtmp && !DEADMONSTER(mtmp) && canspotmon(mtmp)) {
cc.x = mtmp->mx;
cc.y = mtmp->my;
}
if (ans < 0 || cc.x < 0)
return ECMD_CANCEL;
- if (((mtmp = m_at(cc.x, cc.y)) != 0) && canseemon(mtmp)) {
+ if (((mtmp = m_at(cc.x, cc.y)) != 0) && canspotmon(mtmp)) {
if (!getdir("which direction?"))
return ECMD_CANCEL;
struct monst *mon = (struct monst *) arg;
struct monst *mtmp;
- if (is_pool(x, y) || is_lava(x, y)) {
- remove_monster(mon->mx, mon->my);
- newsym(mon->mx, mon->my);
- place_monster(mon, x, y);
- newsym(mon->mx, mon->my);
- set_apparxy(mon);
- if (minliquid(mon))
- return FALSE;
- return is_waterwall(x, y) ? FALSE : TRUE;
- }
-
/* TODO: Treat walls, doors, iron bars, etc. specially
* rather than just stopping before.
*/
- if (goodpos(x, y, mon, 0) && m_in_out_region(mon, x, y)) {
+ if (goodpos(x, y, mon, MM_IGNOREWATER | MM_IGNORELAVA)
+ && m_in_out_region(mon, x, y)) {
int res;
remove_monster(mon->mx, mon->my);
place_monster(mon, x, y);
newsym(mon->mx, mon->my);
set_apparxy(mon);
+ if (is_waterwall(x, y))
+ return FALSE;
++g.force_mintrap;
res = mintrap(mon);
--g.force_mintrap;
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);
return;
}
{
struct permonst *mdat = (struct permonst *) 0;
boolean ignorewater = ((gpflags & MM_IGNOREWATER) != 0),
+ ignorelava = ((gpflags & MM_IGNORELAVA) != 0),
allow_u = ((gpflags & GP_ALLOW_U) != 0);
if (!isok(x, y))
&& !grounded(mdat)));
} else if (mdat->mlet == S_EEL && rn2(13) && !ignorewater) {
return FALSE;
- } else if (is_lava(x, y)) {
+ } else if (is_lava(x, y) && !ignorelava) {
/* 3.6.3: floating eye can levitate over lava but it avoids
that due the effect of the heat causing it to dry out */
if (mdat == &mons[PM_FLOATING_EYE])
return TRUE;
}
if (!accessible(x, y)) {
- if (!(is_pool(x, y) && ignorewater))
+ if (!(is_pool(x, y) && ignorewater)
+ && !(is_lava(x, y) && ignorelava))
return FALSE;
}