allow big humanoids to wear mummy wrappings

A giant mummy starts out with a mummy wrapping but couldn't wear it.
Allow humanoids who are bigger than human size (including poly'd hero
when applicable) to wear such cloaks.  They won't do so if they are
invisible and the cloak would let hero start seeing them.
This commit is contained in:
PatR
2022-10-22 17:14:22 -07:00
parent f1e2c393f2
commit 84fabf764a
5 changed files with 72 additions and 38 deletions
+8 -8
View File
@@ -1876,16 +1876,16 @@ canwearobj(struct obj *otmp, long *mask, boolean noisy)
return 0;
}
which = is_cloak(otmp)
? c_cloak
: is_shirt(otmp)
? c_shirt
: is_suit(otmp)
? c_suit
: 0;
which = is_cloak(otmp) ? c_cloak
: is_shirt(otmp) ? c_shirt
: is_suit(otmp) ? c_suit
: 0;
if (which && cantweararm(g.youmonst.data)
/* same exception for cloaks as used in m_dowear() */
&& (which != c_cloak || g.youmonst.data->msize != MZ_SMALL)
&& (which != c_cloak
|| ((otmp->otyp != MUMMY_WRAPPING)
? g.youmonst.data->msize != MZ_SMALL
: !WrappingAllowed(g.youmonst.data)))
&& (racial_exception(&g.youmonst, otmp) < 1)) {
if (noisy)
pline_The("%s will not fit on your body.", which);