From ac37aba4bd3428eecb09f116eb7806ba37433e57 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 17 Mar 2021 09:14:22 -0700 Subject: [PATCH] sanity_check of steed For wizard mode sanity_check, add a check for steed's saddle when hero is riding. --- src/mon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) {