diff -Ndru nethack-3.4.3/src/dothrow.c nethack-patched/src/dothrow.c --- nethack-3.4.3/src/dothrow.c 2005-11-18 22:36:46.000000000 +0000 +++ nethack-patched/src/dothrow.c 2005-12-19 23:13:30.000000000 +0000 @@ -1583,6 +1583,195 @@ } } /* monster breathing isn't handled... [yet?] */ + + /* Throwing water on scrolls and metal has an effect. */ + if (obj->otyp == POT_WATER && level.objects[x][y]) { + register struct obj *otmp, *next_obj; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + if (otmp->oclass == SCROLL_CLASS && otmp->otyp != SCR_BLANK_PAPER +#ifdef MAIL + && otmp->otyp != SCR_MAIL +#endif + && rn2(3)) { + if (!Blind) { + boolean oq1 = otmp->quan == 1L; + pline("You see %s scroll%s fade.", oq1?"a":"some", oq1?"":"s"); + makeknown(obj->otyp); + } + if(otmp->unpaid && costly_spot(x, y)) { + You("erase it, you pay for it."); + bill_dummy_object(otmp); + } + otmp->otyp = SCR_BLANK_PAPER; + otmp->spe = 0; + } + else if (!otmp->oerodeproof && is_rustprone(otmp) && + (otmp->oeroded < MAX_ERODE) && !rn2(2)) + { + if (!Blind) { + boolean oq1 = otmp->quan == 1L; + char *somex = otmp->oeroded? " more": "what"; + if (oq1) + pline("You see %s rust some%s.", an(aobjnam(otmp, NULL)), somex); + else + pline("You see some %s rust some%s.", xname(otmp), somex); + makeknown(obj->otyp); + } + /* (Rusting shop goods ought to be charged for.) */ + otmp->oeroded++; + } + } + } + + /* Throwing acid on corrodeables has an effect. */ + else if (obj->otyp == POT_ACID && level.objects[x][y]) { + register struct obj *otmp, *next_obj; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + if (!otmp->oerodeproof && is_corrodeable(otmp) && + (otmp->oeroded2 < MAX_ERODE) && !rn2(2)) + { + if (!Blind) { + boolean oq1 = otmp->quan == 1L; + char *somex = otmp->oeroded2? " more": "what"; + if (oq1) + pline("You see %s corrode some%s.", an(aobjnam(otmp, NULL)), somex); + else + pline("You see some %s corrode some%s.", xname(otmp), somex); + makeknown(obj->otyp); + } + /* (Corroding shop goods ought to be charged for.) */ + otmp->oeroded2++; + } + } + } + + /* Throwing oil on damaged objects has an effect... */ + else if (obj->otyp == POT_OIL && level.objects[x][y]) { + register struct obj *otmp, *next_obj; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + if ((!is_rustprone(otmp) && !is_corrodeable(otmp)) || + is_ammo(otmp) || (!otmp->oeroded && !otmp->oeroded2)) + continue; + /* ...but the effect is highly unlikely! */ + if (rn2(10)) continue; + if (!Blind) { + boolean oq1 = otmp->quan == 1L; + pline("%s %s less %s.", An(aobjnam(otmp, NULL)), otense(otmp, "look"), + (otmp->oeroded && otmp->oeroded2) ? "corroded and rusty" : + otmp->oeroded ? "rusty" : "corroded"); + makeknown(obj->otyp); + } + if (otmp->oeroded > 0) otmp->oeroded--; + if (otmp->oeroded2 > 0) otmp->oeroded2--; + } + } + + /* + Throwing polymorph could have an effect, but that + would be mean, because shopkeepers get angry when + you inadvertently polymorph their inventory. + */ + else if (obj->otyp == POT_POLYMORPH && level.objects[x][y] && !Blind) { + register struct obj *otmp, *next_obj; + struct obj *olast; + int npolyed = 0; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + if (otmp->otyp == POT_POLYMORPH || + otmp->otyp == WAN_POLYMORPH || + otmp->otyp == SPE_POLYMORPH || + otmp == uball || + obj_resists(otmp, 5, 95)) + continue; + if (!rn2(10)) { + npolyed++; + olast = otmp; + } + } + if (npolyed > 1) { + const char *flr = surface(x,y); + const char *on = "on"; + if (!strcmp(flr, "air") || !strcmp(flr, "water")) + on = "in"; + pline("Some of the objects %s the %s seem to shimmer for a moment.", + on, flr); + } + else if (npolyed) { + pline("%s %s to shimmer for a moment.", + An(aobjnam(olast, NULL)), otense(olast, "seem")); + } + } + +#ifdef INVISIBLE_OBJECTS + else if (obj->otyp == POT_INVISIBILITY) { + register struct obj *otmp, *next_obj; + struct obj *olast; + int nhere = 0, ninvis = 0; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + nhere++; + if (!otmp->oinvis && !rn2(3)) { + otmp->oinvis = TRUE; + if (!Blind && !See_invisible) + pline("%s %s!", An(aobjname(otmp, NULL)), + otense(otmp, "vanish"); + ninvis++; + olast = otmp; + } + } + if (!Blind && See_invisible && ninvis) { + const char *flr = surface(x,y); + const char *on = "on"; + if (!strcmp(flr, "air") || !strcmp(flr, "water")) + on = "in"; + if (ninvis > 1) { + pline("%s objects %s the %s look a little hazy.", + nvis==nhere?"The":"Some of the" on, flr); + } + else { + pline_You("notice a little haziness around %s.", an(xname(olast))); + } + } + } + else if (obj->otyp == POT_SEE_INVISIBLE) { + register struct obj *otmp, *next_obj; + struct obj *olast; + int nhere = 0, nvis = 0; + for(otmp = level.objects[x][y]; otmp; otmp = next_obj) { + next_obj = otmp->nexthere; + nhere++; + if (otmp->oinvis && !rn2(2)) { + otmp->oinvis = FALSE; + nvis++; + olast = otmp; + } + } + if (!Blind && nvis) { + const char *flr = surface(x,y); + const char *on = "on"; + if (!strcmp(flr, "air") || !strcmp(flr, "water")) + on = "in"; + if (nvis > 1) { + if (!See_invisible) + pline("Some objects appear %s the %s!", on, flr); + else + pline("%s objects %s the %s look less hazy.", + nvis==nhere?"The":"Some of the" on, flr); + } + else { + if (!See_invisible) + pline("%s %s %s the %s!", An(aobjnam(olast, NULL)), + otense(olast, "appear"), on, flr); + else + pline_The("haziness around %s disappears.", the(xname(olast))); + } + } + } +#endif + break; case EGG: /* breaking your own eggs is bad luck */