From 177a5bcaf7a4008e7b842d0503cc022a22326716 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 1 Nov 2025 10:09:30 +0000 Subject: [PATCH] Wielded vegetables do no damage It makes sense that a vegetable would do less damage than a hard object would, as they're generally fairly soft, so it seems like a likely thing for players to try if they're *intentionally* trying to hit for zero damage (which could be useful in certain niche cases, e.g. to wake up a sleeping monster without damaging it). --- src/uhitm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/uhitm.c b/src/uhitm.c index 26f3cfeac..8d2feb1fa 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1316,6 +1316,13 @@ hmon_hitmon_misc_obj( hmd->get_dmg_bonus = FALSE; break; default: + if (objects[obj->otyp].oc_material == VEGGY) { + /* vegetables (and similar) do no damage, because they + aren't rigid enough */ + hmd->dmg = 0; + hmd->get_dmg_bonus = FALSE; + break; + } /* non-weapons can damage because of their weight */ /* (but not too much) */ hmd->dmg = (obj->owt + 99) / 100;