Magical breathing helps fish survive out of water
The hero in an aquatic polyform loses HP for time spent out of the water; allow magical breathing to prevent this, just as it allows the hero in her non-aquatic natural form to breathe underwater. Also add a similar rule for monster fish-out-of-water HP loss, even though currently monsters can't use amulets of magical breathing and there's no non-breathing fish/eel -- just in case this changes at some point.
This commit is contained in:
+2
-1
@@ -528,7 +528,8 @@ regen_hp(int wtcap)
|
|||||||
if (u.mh < 1) { /* shouldn't happen... */
|
if (u.mh < 1) { /* shouldn't happen... */
|
||||||
rehumanize();
|
rehumanize();
|
||||||
} else if (g.youmonst.data->mlet == S_EEL
|
} else if (g.youmonst.data->mlet == S_EEL
|
||||||
&& !is_pool(u.ux, u.uy) && !Is_waterlevel(&u.uz)) {
|
&& !is_pool(u.ux, u.uy) && !Is_waterlevel(&u.uz)
|
||||||
|
&& !Breathless) {
|
||||||
/* eel out of water loses hp, similar to monster eels;
|
/* eel out of water loses hp, similar to monster eels;
|
||||||
as hp gets lower, rate of further loss slows down */
|
as hp gets lower, rate of further loss slows down */
|
||||||
if (u.mh > 1 && !Regeneration && rn2(u.mh) > rn2(8)
|
if (u.mh > 1 && !Regeneration && rn2(u.mh) > rn2(8)
|
||||||
|
|||||||
@@ -828,7 +828,8 @@ minliquid_core(struct monst* mtmp)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* but eels have a difficult time outside */
|
/* but eels have a difficult time outside */
|
||||||
if (mtmp->data->mlet == S_EEL && !Is_waterlevel(&u.uz)) {
|
if (mtmp->data->mlet == S_EEL && !Is_waterlevel(&u.uz)
|
||||||
|
&& !breathless(mtmp->data)) {
|
||||||
/* as mhp gets lower, the rate of further loss slows down */
|
/* as mhp gets lower, the rate of further loss slows down */
|
||||||
if (mtmp->mhp > 1 && rn2(mtmp->mhp) > rn2(8))
|
if (mtmp->mhp > 1 && rn2(mtmp->mhp) > rn2(8))
|
||||||
mtmp->mhp--;
|
mtmp->mhp--;
|
||||||
|
|||||||
Reference in New Issue
Block a user