From 90e3abdf9b4521da12e82c352823af5fd0076244 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 29 May 2025 18:15:24 +0100 Subject: [PATCH] Hidden (object-form) mimics aren't hit by thrown objects This is both a bugfix (the hero would be unlikely to aim their throw at what appeared to be an object) and a balance fix (it was possible to, somewhat tediously, defend yourself from mimics by throwing gold pieces at them, and for many players this became standard strategy in shops, negating the threat from mimics). --- src/zap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/zap.c b/src/zap.c index a6935402f..67eac9bbe 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3957,9 +3957,15 @@ bhit( give message and skip it in order to keep going; if attack is light and mtmp is a mimic pretending to be an object, behave as if there is no monster here (if pretending - to be furniture, it will be revealed by flash_hits_mon()) */ + to be furniture, it will be revealed by flash_hits_mon()); + thrown objects don't hit mimics pretending to be objects (both + 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) */ if (mtmp && (((weapon == THROWN_WEAPON || weapon == KICKED_WEAPON) - && shade_miss(&gy.youmonst, mtmp, obj, TRUE, TRUE)) + && (shade_miss(&gy.youmonst, mtmp, obj, TRUE, TRUE) + || M_AP_TYPE(mtmp) == M_AP_OBJECT)) || (weapon == FLASHED_LIGHT && M_AP_TYPE(mtmp) == M_AP_OBJECT))) mtmp = (struct monst *) 0;