Subject: [patch] acid harms items
From: Nathan T Moore <[email-masked]>
To: [email-masked]
Date: Fri, 5 May 2000 21:29:22 -0400
Newsgroups: rec.games.roguelike.nethack

OK, so this may be fairly trivial and such, but I always thought, in the
spirit of nethack, being able to do strange things: something dipped into
a potion of acid should damage the item.

Going with that, I wrote and tested a small patch to do just that. Right
now, it will rot/corrode anything rottable or corrodeable dipped into
acid. Some restrictions may be nice, but I didn't put any in (ie put keys
in acid, they'll corrode, though that doesn't accomplish anything. Plus I
could extend this to destroy items, but don't at this time). Rust/rot
proof things are not affected.

As usual, comments/feedback are welcome, email is good, I'll try to catch
things on rgrn.

patch (just simple diff, as I don't know how to make "real" patches)

1554a1555,1584
>         if (potion->otyp == POT_ACID)
>           /* Dipping things in acid is a bad idea */
>           {
>             if (obj->oerodeproof || obj_resists(obj, 5, 95))
>                 {
>                   /* Fair enough, object didn't take any damage */
>                   Your("%s in the potion", aobjnam(obj, "fizze"));
>                 }
>             else if ( (is_corrodeable(obj) || is_rottable(obj) )
>                       && obj->oeroded2 < MAX_ERODE)
>               {
>                 Your("%s some%s.",
>                      aobjnam(obj, is_metallic(obj) ?
>                              "corrode" : "rot" ),
>                      obj->oeroded2 ? " more" : "what");
>                 obj->oeroded2++;
>               }
>             else
>               {
>                 /* There ain't nothing left to take ? Not erodeproof,
possibly
>                    fully eroded ? */
>                 goto poof;
>               }
>             makeknown(potion->otyp);
>             useup(potion);
>             return (1);
>           }
> 
>           
>