B18009 animate figurine over water

>More worrying is the fact that applying a figurine over water lets
>the monster wait until its next move before it drowns (giving
>you time to teleport it to safety, or whatever) [...]
>Should there be a minliquid() check as part of make_familiar()?

Applying at the water location next to you was easy. But
applying it at your own location (triggering BY_YOU)  could
end up placing the figurine at the far side of the level if
there was lots of water.

Correcting that required the ability to pass a flag from
make_familiar to makemon() telling it to not rule out
water locations as good positions.  The flag had to
be passed on down to goodpos() and enexto().

The bulk of this patch is just adding an additional
argument to goodpos() in all of the callers.
This commit is contained in:
nethack.allison
2003-02-09 05:39:32 +00:00
parent fd22b557ed
commit c2c72d11e7
17 changed files with 58 additions and 35 deletions

View File

@@ -47,7 +47,7 @@ const char *msg;
/* this location might not be safe, if not, move revived monster */
if (revived) {
mtmp = m_at(x,y);
if (mtmp && !goodpos(x, y, mtmp) &&
if (mtmp && !goodpos(x, y, mtmp, 0) &&
enexto(&cc, x, y, mtmp->data)) {
rloc_to(mtmp, cc.x, cc.y);
}