010,6 +1013,10 @@ #ifdef TOURIST || ((otmp == uarmu) && (uarmc || uarm)) #endif + || ((otmp == uarmh) && uarmc && + OBJ_DESCR(objects[uarmc->otyp]) && + !strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak")) ) { You_cant("take that off."); return 0; @@ -1210,6 +1217,11 @@ pline_The("%s won't fit over your horn%s.", c_helmet, plur(num_horns(youmonst.data))); err++; + } else if (uarmc && OBJ_DESCR(objects[uarmc->otyp]) && + !strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak")) { + if (noisy) You_cant("wear that over your hood."); + err++; } else *mask = W_ARMH; } else if (is_shield(otmp)) { @@ -1591,9 +1603,14 @@ some_armor(victim) struct monst *victim; { - register struct obj *otmph, *otmp; + register struct obj *otmph, *otmp, *hood; otmph = (victim == &youmonst) ? uarmc : which_armor(victim, W_ARMC); + if (otmph && OBJ_DESCR(objects[otmph->otyp]) + && !strcmp(OBJ_DESCR(objects[otmph->otyp]), + "hooded cloak") ) + hood = otmph; + else hood = NULL; if (!otmph) otmph = (victim == &youmonst) ? uarm : which_armor(victim, W_ARM); #ifdef TOURIST @@ -1601,7 +1618,8 @@ otmph = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU); #endif - otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH); + if (hood) otmp = hood; + else otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH); if(otmp && (!otmph || !rn2(4))) otmph = otmp; otmp = (victim == &youmonst) ? uarmg : which_armor(victim, W_ARMG); if(otmp && (!otmph || !rn2(4))) otmph = otmp; diff -ur nethack-3.4.1-orig/src/invent.c nethack-3.4.1/src/invent.c --- nethack-3.4.1-orig/src/invent.c Sun Feb 23 14:43:27 2003 +++ nethack-3.4.1/src/invent.c Tue Apr 15 16:57:30 2003 @@ -825,6 +825,10 @@ #ifdef TOURIST || (otmp==uarmu && (uarm || uarmc)) #endif + || (otmp==uarmh && uarmc && + OBJ_DESCR(objects[uarmc->otyp]) && + !strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak")) )) || (putting_on(word) && (otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL))) diff -ur nethack-3.4.1-orig/src/steal.c nethack-3.4.1/src/steal.c --- nethack-3.4.1-orig/src/steal.c Sun Feb 23 14:43:30 2003 +++ nethack-3.4.1/src/steal.c Tue Apr 15 23:52:58 2003 @@ -293,6 +293,9 @@ otmp = uwep; /* can't steal armor while wearing cloak - so steal the cloak. */ else if(otmp == uarm && uarmc) otmp = uarmc; + else if(otmp == uarmh && uarmc && OBJ_DESCR(objects[uarmc->otyp]) && + !strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak") ) otmp = uarmc; #ifdef TOURIST else if(otmp == uarmu && uarmc) otmp = uarmc; else if(otmp == uarmu && uarm) otmp = uarm; diff -ur nethack-3.4.1-orig/src/trap.c nethack-3.4.1/src/trap.c --- nethack-3.4.1-orig/src/trap.c Sun Feb 23 14:43:31 2003 +++ nethack-3.4.1/src/trap.c Tue Apr 15 16:57:30 2003 @@ -717,7 +717,14 @@ case 0: pline("%s you on the %s!", A_gush_of_water_hits, body_part(HEAD)); - (void) rust_dmg(uarmh, "hediff -ur nethack-3.4.1-orig/src/do_wear.c nethack-3.4.1/src/do_wear.c --- nethack-3.4.1-orig/src/do_wear.c Sun Feb 23 14:43:26 2003 +++ nethack-3.4.1/src/do_wear.c Tue Apr 15 16:57:30 2003 @@ -970,7 +970,10 @@ int armorpieces = 0; #define MOREARM(x) if (x) { armorpieces++; otmp = x; } - MOREARM(uarmh); + if (!uarmc || ( OBJ_DESCR(objects[uarmc->otyp]) && + strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak") ) ) + MOREARM(uarmh); MOREARM(uarms); MOREARM(uarmg); MOREARM(uarmf); @@ -1lmet", 1, TRUE, &youmonst); + if (uarmc && OBJ_DESCR(objects[uarmc->otyp]) && + !strcmp(OBJ_DESCR(objects[uarmc->otyp]), + "hooded cloak")) + (void) rust_dmg(uarmc, cloak_simple_name(uarmc), + 1, TRUE, &youmonst); + else + (void) rust_dmg(uarmh, "helmet", + 1, TRUE, &youmonst); break; case 1: pline("%s your left %s!", A_gush_of_water_hits,