diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 6dd35d38e..b30fbb712 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1471,6 +1471,8 @@ interactively setting a status highlight for hunger with 'O' and choosing 'text match' could crash while setting up the menu of hunger status value strings; happened for curses or if the program was built to use C++ regex processing but not for tty+posixregex +a pet with the hides-under attribute could "move reluctantly over" a cursed + object and then hide under it Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/dogmove.c b/src/dogmove.c index f35a873b7..6e25c39c2 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1270,8 +1270,11 @@ dog_move( ? vobj_at(nix, niy) : 0; const char *what = o ? distant_name(o, doname) : something; - pline("%s %s reluctantly over %s.", noit_Monnam(mtmp), - vtense((char *) 0, locomotion(mtmp->data, "step")), what); + pline("%s %s reluctantly %s %s.", noit_Monnam(mtmp), + vtense((char *) 0, locomotion(mtmp->data, "step")), + (is_flyer(mtmp->data) || is_floater(mtmp->data)) ? "over" + : "onto", + what); } mon_track_add(mtmp, omx, omy); /* We have to know if the pet's going to do a combined eat and diff --git a/src/mon.c b/src/mon.c index a52f9a051..5d7ed1eea 100644 --- a/src/mon.c +++ b/src/mon.c @@ -4555,6 +4555,9 @@ hideunder(struct monst *mtmp) && (otmp = svl.level.objects[x][y]) != 0 /* most things can be hidden under, but not all */ && can_hide_under_obj(otmp) + /* pets won't hide under a cursed item or an item of any BUC + state that shares a pile with one or more cursed items */ + && (!mtmp->mtame || !cursed_object_at(x, y)) /* aquatic creatures don't reach here; other swimmers shouldn't hide beneath underwater objects */ && !is_pool_or_lava(x, y)) {