diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index d569b3a69..c620671a7 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1208,6 +1208,8 @@ wizard mode wish for terrain while on a fountain|sink spot made the counter sound messages if all fountains|sinks were eventually destroyed add a level arrival region to the Gnone King's Wine Cellar variation of the Mines' End level so that hero can't end up in the treature chamber +make potion of water become discovered if dipping a carried container into an + uncursed one reports that water gets inside or slides right off Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/include/decl.h b/include/decl.h index 1b3d1aae3..075e8a996 100644 --- a/include/decl.h +++ b/include/decl.h @@ -613,6 +613,11 @@ struct instance_globals_m { /* region.c */ int max_regions; + /* trap.c */ + boolean mentioned_water; /* set to True by water_damage() if it issues + * a message about water; dodip() should make + * POT_WATER should become discovered */ + boolean havestate; unsigned long magic; /* validate that structure layout is preserved */ }; diff --git a/src/decl.c b/src/decl.c index e5a27440d..07ff63806 100644 --- a/src/decl.c +++ b/src/decl.c @@ -551,6 +551,8 @@ const struct instance_globals_m g_init_m = { UNDEFINED_VALUES, /* mapped_menu_op */ /* region.c */ 0, /* max_regions */ + /* trap.c */ + FALSE, /* mentioned_water */ TRUE, /* havestate*/ IVMAGIC /* m_magic to validate that structure layout has been preserved */ }; diff --git a/src/potion.c b/src/potion.c index 296928717..6e65c4019 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1512,8 +1512,12 @@ H2Opotion_dip( } else { /* dipping into uncursed water; carried() check skips steed saddle */ if (carried(targobj)) { + gm.mentioned_water = FALSE; /* water_damage() might set this */ if (water_damage(targobj, 0, TRUE) != ER_NOTHING) res = TRUE; + if (gm.mentioned_water) + makeknown(POT_WATER); + gm.mentioned_water = FALSE; } } if (func) { diff --git a/src/trap.c b/src/trap.c index ec5175222..6d671dd36 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4208,8 +4208,7 @@ acid_damage(struct obj* obj) /* Get an object wet and damage it appropriately. * "obj": if null, returns ER_NOTHING - * "ostr", if present, is used instead of the object name in some - * messages. + * "ostr", if present, is used instead of the object name in some messages. * "force" means not to roll luck to protect some objects. * Returns an erosion return value (ER_*) */ @@ -4253,14 +4252,18 @@ water_damage( return ER_GREASED; } else if (Is_container(obj) && (!Waterproof_container(obj) || (obj->cursed && !rn2(3)))) { - if (in_invent) + if (in_invent) { pline("Some %s gets into your %s!", hliquid("water"), ostr); + gm.mentioned_water = !Hallucination; + } water_damage_chain(obj->cobj, FALSE); return ER_DAMAGED; /* contents were damaged */ } else if (Waterproof_container(obj)) { if (in_invent) { pline_The("%s slides right off your %s.", hliquid("water"), ostr); - makeknown(obj->otyp); + gm.mentioned_water = !Hallucination; + makeknown(obj->otyp); /* if an oilskin sack, discover it; doesn't + * matter for chest, large box, ice box */ } /* not actually damaged, but because we /didn't/ get the "water gets into!" message, the player now has more information and