]> granicus.if.org Git - nethack/commit
fix #H6104 - no potion handling in thitu()
authorPatR <rankin@nethack.org>
Mon, 25 Sep 2017 17:42:43 +0000 (10:42 -0700)
committerPatR <rankin@nethack.org>
Mon, 25 Sep 2017 17:42:43 +0000 (10:42 -0700)
commit719af503e763b316cc6642c7584fff8402dd5955
tree344b99d47c246eabf671867cd1e83385455e65be
parent596bc643412465261ebffb6e726360e17ff14508
fix #H6104 - no potion handling in thitu()

thitu() is mostly used for arrows and darts "thrown" by traps, but
scatter() uses it on items launched by a land mine explosion.  Traps
had no need for potion handling, but scattering does.  Changing thitu()
to call potionhit() required that more information be passed to the
latter in case killer reason was needed, and thitu()'s callers needed
to be updated since it now might use up its missile (only when that's
a potion, so scatter() is only caller which actually needed to care).

Quite a bit of work--especially the testing--for something which will
never be noticed in actual play.  In hindsight, it would have been
much simpler just to make scatter destroy all potions rather than
allow the 1% chance of remaining intact (via obj_resists()), or else
leave any intact ones at the explosion spot instead of launching them.
doc/fixes36.1
include/extern.h
include/obj.h
src/apply.c
src/dothrow.c
src/explode.c
src/mthrowu.c
src/potion.c
src/trap.c
src/uhitm.c
src/zap.c