Make minliquid handle walls of water
This commit is contained in:
@@ -708,6 +708,7 @@ static int
|
|||||||
minliquid_core(struct monst* mtmp)
|
minliquid_core(struct monst* mtmp)
|
||||||
{
|
{
|
||||||
boolean inpool, inlava, infountain;
|
boolean inpool, inlava, infountain;
|
||||||
|
boolean waterwall = (levl[mtmp->mx][mtmp->my].typ == WATER);
|
||||||
|
|
||||||
/* [ceiling clingers are handled below] */
|
/* [ceiling clingers are handled below] */
|
||||||
inpool = (is_pool(mtmp->mx, mtmp->my)
|
inpool = (is_pool(mtmp->mx, mtmp->my)
|
||||||
@@ -723,7 +724,7 @@ minliquid_core(struct monst* mtmp)
|
|||||||
water location on the Plane of Water, flight and levitating
|
water location on the Plane of Water, flight and levitating
|
||||||
are blocked so this (Flying || Levitation) test fails there
|
are blocked so this (Flying || Levitation) test fails there
|
||||||
and steed will be subject to water effects, as intended) */
|
and steed will be subject to water effects, as intended) */
|
||||||
if (mtmp == u.usteed && (Flying || Levitation))
|
if (mtmp == u.usteed && (Flying || Levitation) && !waterwall)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Gremlin multiplying won't go on forever since the hit points
|
/* Gremlin multiplying won't go on forever since the hit points
|
||||||
@@ -801,13 +802,13 @@ minliquid_core(struct monst* mtmp)
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else if (inpool) {
|
} else if (inpool || waterwall) {
|
||||||
/* Most monsters drown in pools. flooreffects() will take care of
|
/* Most monsters drown in pools. flooreffects() will take care of
|
||||||
* water damage to dead monsters' inventory, but survivors need to
|
* water damage to dead monsters' inventory, but survivors need to
|
||||||
* be handled here. Swimmers are able to protect their stuff...
|
* be handled here. Swimmers are able to protect their stuff...
|
||||||
*/
|
*/
|
||||||
if (!is_clinger(mtmp->data) && !is_swimmer(mtmp->data)
|
if ((waterwall || !is_clinger(mtmp->data))
|
||||||
&& !amphibious(mtmp->data)) {
|
&& !is_swimmer(mtmp->data) && !amphibious(mtmp->data)) {
|
||||||
/* like hero with teleport intrinsic or spell, teleport away
|
/* like hero with teleport intrinsic or spell, teleport away
|
||||||
if possible */
|
if possible */
|
||||||
if (can_teleport(mtmp->data) && !tele_restrict(mtmp)) {
|
if (can_teleport(mtmp->data) && !tele_restrict(mtmp)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user