exploding potion of acid left in bones

Noticed while looking at the dipping code:  #dip at a pool location
gives the chance to dip into the pool, and dipping a potion of acid into
such causes the acid to explode, causing damage and posibly killing the
hero.  Use-up handling was being done after the dip had finished, so the
potion would remain in final inventory during disclosure and end up in
the resulting bones file if there was one.
This commit is contained in:
nethack.rankin
2007-02-24 05:45:34 +00:00
parent 521469f27b
commit 2dc918a6c4
2 changed files with 3 additions and 1 deletions

View File

@@ -1717,8 +1717,9 @@ dodip()
rider_cant_reach(); /* not skilled enough to reach */
#endif
} else {
if (obj->otyp == POT_ACID) obj->in_use = 1;
(void) get_wet(obj);
if (obj->otyp == POT_ACID) useup(obj);
if (obj->in_use) useup(obj);
}
return 1;
}