wand/spell/breath killer reason

Extend "killed by the touch of death inflicted by <monster>" to buzz().
"Killed by a bolt of cold" becomes "killed by a bolt of cold zapped by
<monster>" or "killed by a blast of cold" becomes "killed by a blast
of cold exhaled by <monster>" and so forth.

More work than expected; the zap code isn't passed enough context.

BZ_M_WAND() was producing the wrong value for wands zapped by monsters.
This commit is contained in:
PatR
2023-03-07 02:47:42 -08:00
parent 8e6cf385b1
commit 4021a63bcf
12 changed files with 135 additions and 52 deletions

View File

@@ -753,9 +753,11 @@ in_your_sanctuary(
void
ghod_hitsu(struct monst *priest)
{
struct mkroom *troom;
struct monst *oldbuzzer;
struct obj *oldcurrwand;
coordxy x, y, ax, ay;
int roomno = (int) temple_occupied(u.urooms);
struct mkroom *troom;
if (!roomno || !has_shrine(priest))
return;
@@ -818,8 +820,14 @@ ghod_hitsu(struct monst *priest)
break;
}
buzz(BZ_M_SPELL(BZ_OFS_AD(AD_ELEC)), 6, x, y, sgn(gt.tbx),
sgn(gt.tby)); /* bolt of lightning */
/* bolt of lightning cast by unspecified monster */
oldcurrwand = gc.current_wand;
gc.current_wand = 0;
oldbuzzer = gb.buzzer;
gb.buzzer = 0;
buzz(BZ_M_SPELL(BZ_OFS_AD(AD_ELEC)), 6, x, y, sgn(gt.tbx), sgn(gt.tby));
gb.buzzer = oldbuzzer;
gc.current_wand = oldcurrwand;
exercise(A_WIS, FALSE);
}