follow-up to #1343 fix for telepathic hero

telepathic hero can discern which particular monster just
read a scroll, even though he cannot see the monster
This commit is contained in:
nhmall
2024-12-20 15:30:37 -05:00
parent a35e5779f6
commit f6a5236beb
5 changed files with 30 additions and 16 deletions

View File

@@ -5848,4 +5848,18 @@ shieldeff_mon(struct monst *mtmp)
pline_mon(mtmp, "%s resists!", Monnam(mtmp));
}
void
flash_mon(struct monst *mtmp)
{
coordxy mx = mtmp->mx, my = mtmp->my;
int count = couldsee(mx, my) ? 8 : 4;
char saveviz = gv.viz_array[my][mx];
if (!flags.sparkle)
count /= 2;
gv.viz_array[my][mx] |= (IN_SIGHT | COULD_SEE);
flash_glyph_at(mx, my, mon_to_glyph(mtmp, newsym_rn2), count);
gv.viz_array[my][mx] = saveviz;
newsym(mx, my);
}
/*mon.c*/