Path: ulcc.ac.uk!server3.netnews.ja.net!server4.netnews.ja.net!news5-gui.server.ntli.net!ntli.net!news-lond.gip.net!news.gsl.net!gip.net!newsfeed.gamma.ru!Gamma.RU!news.maxwell.syr.edu!newsxfer.eecs.umich.edu!news.bu.edu!newshost.Dartmouth.EDU!tyler.cs.dartmouth.edu!nathan
From: Nathan T Moore <nathan@cs.dartmouth.edu>
Newsgroups: rec.games.roguelike.nethack
Subject: [patch] acid harms items
Date: Fri, 5 May 2000 21:29:22 -0400
Organization: Dartmouth College, Hanover, NH, USA
Lines: 51
Message-ID: <Pine.LNX.4.10.10005052119520.1889-100000@tyler.cs.dartmouth.edu>
NNTP-Posting-Host: tyler.cs.dartmouth.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: merrimack.Dartmouth.EDU 957576563 6560 129.170.192.174 (6 May 2000 01:29:23 GMT)
X-Complaints-To: abuse@Dartmouth.EDU
NNTP-Posting-Date: 6 May 2000 01:29:23 GMT
To: devteam@nethack.org
Xref: ulcc.ac.uk rec.games.roguelike.nethack:97333


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);
>           }
> 
>           
>         



