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.
This commit is contained in:
@@ -1533,7 +1533,7 @@ E void FDECL(Delay, (int));
|
||||
|
||||
/* ### mthrowu.c ### */
|
||||
|
||||
E int FDECL(thitu, (int, int, struct obj *, const char *));
|
||||
E int FDECL(thitu, (int, int, struct obj **, const char *));
|
||||
E int FDECL(ohitmon, (struct monst *, struct obj *, int, BOOLEAN_P));
|
||||
E void FDECL(thrwmu, (struct monst *));
|
||||
E int FDECL(spitmu, (struct monst *, struct attack *));
|
||||
@@ -1883,7 +1883,7 @@ E int FDECL(dopotion, (struct obj *));
|
||||
E int FDECL(peffects, (struct obj *));
|
||||
E void FDECL(healup, (int, int, BOOLEAN_P, BOOLEAN_P));
|
||||
E void FDECL(strange_feeling, (struct obj *, const char *));
|
||||
E void FDECL(potionhit, (struct monst *, struct obj *, BOOLEAN_P));
|
||||
E void FDECL(potionhit, (struct monst *, struct obj *, int));
|
||||
E void FDECL(potionbreathe, (struct obj *));
|
||||
E int NDECL(dodip);
|
||||
E void FDECL(mongrantswish, (struct monst **));
|
||||
|
||||
Reference in New Issue
Block a user