fix issue #332 - mon vs mon double hit message

One monster hitting another with an artifact within the hero's view
gave "<Mon1> swings his <Artifact> at <Mon2>." followed either by
"<Mon1> misses <Mon2>." _or_ the two messages "<Mon1> hits <Mon2>."
and "The <Artifact> hits <Mon2>."  Defer the <Mon1> hits <Mon2> one
when Mon1 is using an artifact and only deliver it if there is no
artifact hit message.

Tested but not exhaustively so....

Fixes #332
This commit is contained in:
PatR
2020-04-25 19:06:18 -07:00
parent 978cf23cc9
commit 7b9ce40388
3 changed files with 22 additions and 4 deletions

View File

@@ -808,6 +808,9 @@ int dieroll;
if (obj->oartifact
&& artifact_hit(&g.youmonst, mon, obj, &tmp, dieroll)) {
/* artifact_hit updates 'tmp' but doesn't inflict any
damage; however, it might cause carried items to be
destroyed and they might do so */
if (DEADMONSTER(mon)) /* artifact killed monster */
return FALSE;
if (tmp == 0)