location viability on Plane of Water
While testing, I noticed that I could completely fill the Water level with air elementals. Hero can't fly or levitate or water walk into/onto water locations on Water level without drowning/crawling out the water, and monsters shouldn't have been able to but could, then they were hit by drowning since minliquid used different criteria than movement. But goodpos(), used for teleport destination and new monster creation among other things, consided water locations acceptable on that level for non-aquadic creatures with Fly/Lev/Wwalk ability. It explains why so many dragons and other 'nasty' monsters have been ending up on the vanquished monsters list when hero uses level teleport to go directly there from level 1. They've either been getting created in water and then they drown when it's their turn to move or moving into it to approach the hero and drowning (not sure whether that case is immediate or on next move). There's no message since hero doesn't see it, and air elementals didn't drown since thy don't breathe.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 teleport.c $NHDT-Date: 1559227830 2019/05/30 14:50:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.87 $ */
|
||||
/* NetHack 3.6 teleport.c $NHDT-Date: 1559733391 2019/06/05 11:16:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.88 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -62,16 +62,26 @@ unsigned gpflags;
|
||||
|
||||
mdat = mtmp->data;
|
||||
if (is_pool(x, y) && !ignorewater) {
|
||||
/* [what about Breathless?] */
|
||||
if (mtmp == &youmonst)
|
||||
return (Levitation || Flying || Wwalking || Swimming
|
||||
|| Amphibious);
|
||||
return (Swimming || Amphibious
|
||||
|| (!Is_waterlevel(&u.uz)
|
||||
/* water on the Plane of Water has no surface
|
||||
so there's no way to be on or above that */
|
||||
&& (Levitation || Flying || Wwalking)));
|
||||
else
|
||||
return (is_floater(mdat) || is_flyer(mdat) || is_swimmer(mdat)
|
||||
|| is_clinger(mdat));
|
||||
return (is_swimmer(mdat)
|
||||
|| (!Is_waterlevel(&u.uz)
|
||||
&& (is_floater(mdat) || is_flyer(mdat)
|
||||
|| is_clinger(mdat))));
|
||||
} else if (mdat->mlet == S_EEL && rn2(13) && !ignorewater) {
|
||||
return FALSE;
|
||||
} else if (is_lava(x, y)) {
|
||||
if (mtmp == &youmonst)
|
||||
/* 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 FALSE;
|
||||
else if (mtmp == &youmonst)
|
||||
return (Levitation || Flying
|
||||
|| (Fire_resistance && Wwalking && uarmf
|
||||
&& uarmf->oerodeproof)
|
||||
|
||||
Reference in New Issue
Block a user