From abafc849e93941af9ba2407bf30faab62f15e884 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Thu, 16 Nov 2023 11:20:10 -0500 Subject: [PATCH] Rust gauntlets when washing hands even if Glib Make it so that washing your gloved hands in a fountain, pool, or sink can still rust your gauntlets even if it successfully removes the grease from your fingers. There wasn't much logic behind the two effects being mutually exclusive, since the oily fingers of the Glib effect don't normally protect against water damage like the item being 'greased' does, and this introduces a possible tradeoff that could make whether or not to clear Glib by washing your hands a more interesting tactical decision. --- src/fountain.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/fountain.c b/src/fountain.c index abc8d968c..2525155b1 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -551,18 +551,20 @@ wash_hands(void) { const char *hands = makeplural(body_part(HAND)); int res = ER_NOTHING; + boolean was_glib = !!Glib; You("wash your %s%s in the %s.", uarmg ? "gloved " : "", hands, hliquid("water")); if (Glib) { make_glib(0); Your("%s are no longer slippery.", fingers_or_gloves(TRUE)); - /* not what ER_GREASED is for, but the checks in dipfountain just - compare the result to ER_DESTROYED and ER_NOTHING, so it works */ - res = ER_GREASED; - } else if (uarmg) { - res = water_damage(uarmg, (const char *) 0, TRUE); } + if (uarmg) + res = water_damage(uarmg, (const char *) 0, TRUE); + /* not what ER_GREASED is for, but the checks in dipfountain just + compare the result to ER_DESTROYED and ER_NOTHING, so it works */ + if (was_glib && res == ER_NOTHING) + res = ER_GREASED; return res; }