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

@@ -615,12 +615,15 @@ do_improvisation(struct obj* instr)
losehp(damage, buf, KILLED_BY); /* fire or frost damage */
}
} else {
int type = BZ_OFS_AD((instr->otyp == FROST_HORN) ? AD_COLD : AD_FIRE);
int type = BZ_OFS_AD((instr->otyp == FROST_HORN) ? AD_COLD
: AD_FIRE);
if (!Blind)
pline("A %s blasts out of the horn!", flash_str(type, FALSE));
Hero_playnotes(obj_to_instr(&itmp), improvisation, 50);
gc.current_wand = instr;
ubuzz(BZ_U_WAND(type), rn1(6, 6));
gc.current_wand = 0;
}
makeknown(instr->otyp);
break;