From 8f4c0f22159da2db6219e6c2eb23e7241e0647b2 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 16 Aug 2025 01:24:58 +0100 Subject: [PATCH] You can throw objects at mimics if you know there's a monster there Part of the reasoning behind thrown objects not hitting mimics is that a character who doesn't know there's a mimic there wouldn't aim at it. But if you know there's a monster there (e.g. via telepathy or monster detection), you would aim at it. Pushing a boulder at it and hearing a monster works too (which is important in cases where a mimic is trapped behind a boulder in the Sokoban corridors). --- src/zap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/zap.c b/src/zap.c index efd60f1fe..a1a5c3380 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3854,6 +3854,7 @@ bhit( while (range-- > 0) { coordxy x, y; + int xyglyph; gb.bhitpos.x += ddx; gb.bhitpos.y += ddy; @@ -3962,10 +3963,15 @@ bhit( because the hero is likely aiming to throw over what seems to be an object rather than at it, and for balance because otherwise mimics are too easy to identify by throwing gold at - them) */ + them); exception: if the hero knows there is a monster there, + they will be aiming at the monster */ + xyglyph = glyph_at(x, y); if (mtmp && (((weapon == THROWN_WEAPON || weapon == KICKED_WEAPON) && (shade_miss(&gy.youmonst, mtmp, obj, TRUE, TRUE) - || M_AP_TYPE(mtmp) == M_AP_OBJECT)) + || (M_AP_TYPE(mtmp) == M_AP_OBJECT + && !glyph_is_monster(xyglyph) + && !glyph_is_warning(xyglyph) + && !glyph_is_invisible(xyglyph)))) || (weapon == FLASHED_LIGHT && M_AP_TYPE(mtmp) == M_AP_OBJECT))) mtmp = (struct monst *) 0;