surviving petrification (trunk only)

From the newsgroup:  if you were wielding a cockatrice corpse without
gloves while polymorphed into something capable of doing that, then were
turned to stone when rehumanizing, you'd be left wielding the untouchable
corpse if life-saving kept the game going.  This causes it to stop being
wielded if you get that far.  Likewise for monsters.
This commit is contained in:
nethack.rankin
2006-10-13 05:39:16 +00:00
parent 93eccebe84
commit 624a1b31d9
5 changed files with 32 additions and 6 deletions

View File

@@ -706,6 +706,20 @@ register struct monst *mon;
return 0;
}
/* force monster to stop wielding current weapon, if any */
void
mwepgone(mon)
struct monst *mon;
{
struct obj *mwep = MON_WEP(mon);
if (mwep) {
setmnotwielded(mon, mwep);
MON_NOWEP(mon);
mon->weapon_check = NEED_WEAPON;
}
}
int
abon() /* attack bonus for strength & dexterity */
{