From: PatR Date: Wed, 17 Mar 2021 16:14:22 +0000 (-0700) Subject: sanity_check of steed X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac37aba4bd3428eecb09f116eb7806ba37433e57;p=nethack sanity_check of steed For wizard mode sanity_check, add a check for steed's saddle when hero is riding. --- diff --git a/src/mon.c b/src/mon.c index f145308bb..68b650ae9 100644 --- a/src/mon.c +++ b/src/mon.c @@ -107,6 +107,18 @@ sanity_check_single_mon( /* guardian angel on astral level is tame but has emin rather than edog */ if (mtmp->mtame && !has_edog(mtmp) && !mtmp->isminion) impossible("pet without edog (%s)", msg); + /* steed should be tame and saddled */ + if (mtmp == u.usteed) { + const char *ns, *nt = !mtmp->mtame ? "not tame" : 0; + + ns = !m_carrying(mtmp, SADDLE) ? ns = "no saddle" + : !which_armor(mtmp, W_SADDLE) ? ns = "saddle not worn" + : 0; + if (ns || nt) + impossible("steed: %s%s%s (%s)", + ns ? ns : "", (ns && nt) ? ", " : "", nt ? nt : "", + msg); + } if (mtmp->mtrapped) { if (mtmp->wormno) {