worn gear after polymorph alignment change [2 of 2] (trunk only)

Extend rotouch_equipment() to cover all items in use, worn/carried/
invoked in addition to wielded.  Done when you change alignment, change
shape, or catch lycanthropy.  No-longer-touchable items inflict modest
damage; worn/wielded ones will be unworn/unwielded.  For the shape change
and lycanthropy cases, unwieled weapons are also dropped.  Other unworn
stuff stays in inventory, as do weapons for the alignment change case.

     It ought to force off gloves if worn silver--or hypothetical
artifact--ring has become untouchable and gets unworn.  Instead it just
curses the gloves, if necessary, so that there's some plausibility to
having the ring come off.
This commit is contained in:
nethack.rankin
2007-03-20 04:38:29 +00:00
parent c86f9ff008
commit 2bd1f86cff
3 changed files with 105 additions and 10 deletions

View File

@@ -638,7 +638,8 @@ clear_bypasses()
#endif /*0*/
}
}
/* invent and mydogs chains shouldn't matter here */
for (otmp = invent; otmp; otmp = otmp->nobj)
otmp->bypass = 0;
for (otmp = migrating_objs; otmp; otmp = otmp->nobj)
otmp->bypass = 0;
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
@@ -650,6 +651,7 @@ clear_bypasses()
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
otmp->bypass = 0;
}
/* billobjs and mydogs chains don't matter here */
context.bypasses = FALSE;
}