Talk:Scroll of enchant armor

From NetHackWiki
Jump to navigation Jump to search

Rewrite with effects

Have rewritten all of it, and included a complete detailing of effects. I think this format is more useful than the verbose discussion, as when trying to remember what happens if I read a cursed scroll of enchant armor whilst confused and wearing Dragon Scale Mail is easier to look up. (Answer; nothing, you can't remove erode proofing of dragon armor). There is probably a place for a Tips section detailing how people often use the spell, though that is covered in the first few paragraphs. Zaffle 04:28, 9 June 2008 (UTC)

Changes for 3.6.0 - A bug or a feature?

I noticed this yesterday while playing 3.6, and just confirmed it in Wizard mode. I'm not sure if it's the intent of the DevTeam, or a bug. I put this here in case it's a bug.

I was playing as a low-level Wizard last night. Picked up two scrolls with the same name, but that wound up in different inventory letters. OK, I thought, I can live with a cursed identify. I didn't BUC check them, and wound up reading a cursed scroll of enchant armor. My cloak of magic resistance is now cursed and -1. No big, I thought. I'll read the other one to bring it back to +0 and uncurse it. However, while it did go back to +0, the cloak is still cursed. I've also confirmed this with a studded leather armor: cursed scroll curses it, uncursed scroll raises the enchantment but doesn't uncurse it. Blessed scroll will still bless the cursed armor.

Lines 1061-1067 in read.c indicate that reading an uncursed scroll of enchant armor while wearing cursed dragon scales will not only harden the scales into scale mail, but remove the curse. I've also confirmed this behavior in Wizard mode.

——Twonk (talk) 16:51, 12 December 2015 (UTC)

The relevant line for non-dragon armor is at src/read.c in NetHack 3.6.0, line 1085, and the 3.4.3 equivalent is at read.c, line 767. The original code is pretty obtuse, so they may have just been trying to simplify it; whether or not the loss of uncursing is deliberate is unclear, but you're right that it's inconsistent with the scales-to-mail behavior. --Darth l33t (talk) 19:23, 12 December 2015 (UTC)
According to the email from the DevTeam I got over the weekend, this has been fixed:
"This change was unintentional and has now been fixed. Thanks.
"The enchant armor code used to manipulate the armor's blessed and cursed flags directly. When it was changed to go through the blessed()/uncursed()/cursed() functions instead, the uncursing case was accidentally missed."
Checking the bug list, this was given the bug number C360-12. Glad I could be of some help.

——Twonk (talk) 20:56, 14 December 2015 (UTC)

Typo?

The description of the formula for blessed scrolls says:

  equal to 9rnd(3) − current enchantment3),

How does that not mean 9 rolls of 1-3 minus a fraction, i.e., 9-27 minus 2/3 (for +2)? Clearly that would be wrong... is the 9 a typoed '(' ? — Preceding unsigned comment added by Pyrzax (talk • contribs) 2026-06-10T01:03:09

I feel like it isn't exactly rocket science to determine that it is indeed a typo and fix it accordingly. Also, please remember to sign your posts. --Umbire the Phantom (talk) 05:55, 10 June 2026 (UTC)

Well, I also wasn't entirely sure that the parentheses made sense, even with the typo fix, so I was inclined to have others who know the game better take a look. The page now says 1 point plus the (corrected) formula. However, the formula could go negative at +6 since rnd(3) could have a value of one. That would mean +6 could result in any of

 1 + (1 - 2) = 0
 1 + (2 - 2) = 1
 1 + (3 - 2) = 2

And that contradicts the table below the text. The table seems to correspond to rnd(3 − current enchantment3), but which is correct, the table or the formula in the text?

——Pyrzax (talk) 00:47, 11 June 2026 (UTC)

5.0.0 rewrite

For pity's sake, Umbrie, you treat your own words like holy scripture! I strongly feel that cutting down on trivial ramblings would significantly improve the article's readability, but we're not having an edit war over this. Key points you still need to amend:

  • It would seem that "base power" only refers to the initial (4-s)/2 in the code, not to everything done to s afterwards. I also tried to not use that term later so as to avoid ambiguity when mentioning it in the C99 division paragraph.
  • The whole paragraph on lines 1212 to 1218 is not great. The first sentence is an illustrative example of literally describing the code and doubling text length thereby, but whatever. Saying "if s is positive or scroll is cursed" is factually incorrect, BUC plays no factor here except indirectly at 1214. Singling out blessed scrolls is redundant and may confuse someone into thinking they get some other bonus here beyond the ++s earlier.
  • Cursed scrolls can transform dragon scales. It's a significant change from 3.6, and I feel this is worth mentioning somewhere, even if it's impractical (as to reach s==0 for non-magical armor one would have to brave evaporation).
  • The fact that non-elven magical armor can only be safely enchanted to +4 now is obviously very important and must be mentioned explicitly. They way you wrote that part may confuse careless readers into thinking it can still jump from +3 to +5, then wasting several scrolls trying and failing to do that.

If you disagree with any of the above, feel free to just ignore it instead of also starting an argument on the discussion page. Thanks. Tomsod (talk) 08:17, 25 October 2026 (UTC)

"Cursed scrolls can transform dragon scales. It's a significant change from 3.6, and I feel this is worth mentioning somewhere" ...except this is not true in 5.0 (and to my recollection is untrue in 3.6 as well), and while reading the code I observed that behavior for dragon scales targeted by a cursed scroll of enchant armor is in fact unaltered—if (s >= 0 && Is_dragon_scales(otmp)) means the scroll has to be enchanting the scales positively for the transformation to occur, and simple testing in wizard mode bears that out, which I took the liberty of uploading for the sake of both our reference. Have what quibbles you will about my editing style, but where that specific matter is concerned, by all appearances it looks to be a factually incorrect claim and I corrected it accordingly. --Umbire the Phantom (talk) 08:39, 25 October 2026 (UTC)
Ugh, I hoped to wait on installing 5.0 locally until my distro fixes its package, but fine:
For what do you wish? -6 dragon scales
h - a set of yellow dragon scales.
What do you want to wear? [eh or ?*] h
You finish your dressing maneuver.
What do you want to read? [g or ?*] g
As you read the scroll, it disappears.  Your set of yellow dragon scales violently glows black for a while, then evaporates.
For what do you wish? -6 dragon scales
i - a set of green dragon scales.
What do you want to wear? [ei or ?*] i
You finish your dressing maneuver.
What do you want to read? [g or ?*] g
As you read the scroll, it disappears.  Your set of green dragon scales violently glows black for a while, then evaporates.
For what do you wish? -6 dragon scales
j - a set of orange dragon scales.
What do you want to wear? [ej or ?*] j
You finish your dressing maneuver.
What do you want to read? [g or ?*] g
As you read the scroll, it disappears.  Your set of orange dragon scales merges and hardens!
j - a -6 orange dragon scale mail (being worn).
See, they have to be at least -6 like I originally wrote in the article (and your gif had -4 at most I think?) - this is the only way to reach s==0 for non-magical armor (the comparison is s >= 0 and of course it cannot be strictly positive for cursed scrolls!) Please try to be more attentive, to either other editors or the game code. Obviously I wouldn't be arguing about this or anything else if I weren't at least 95% sure I know what I'm talking about! Tomsod (talk) 16:11, 26 October 2026 (UTC)

Right, I'll update with that in mind, then. --Umbire the Phantom (talk) 16:33, 26 October 2026 (UTC)

I had it at -4 because I recall that being the negative limit for non-magical non-elven armor to start making evaporation checks if subjected to cursed scrolls of enchant armor—so you're absolutely certain it's -6, then? --Umbire the Phantom (talk) 17:23, 26 October 2026 (UTC)
With rounding to 0, yes. It's evident from the new table: dragon scales are non-magical, so the bonus is 1, therefore the final s is 0 (not 0-1 for cursed scrolls, just 0) at +6 or above, but it's taken with the opposite sign because the scroll is cursed, so -6. Frankly this might be a bug, as there's no practical value to this feature, but it made it into the release and I found it interesting enough to mention. Tomsod (talk) 21:08, 26 October 2026 (UTC)

Sure then, I'd file a report about it just to be safe. While I'm at it, I'll apologize for the needlessly confrontational tone I took, that was only a "response in kind" approach to what I read as confrontational but it still wasn't necessary on my part. My bad. --Umbire the Phantom (talk) 21:16, 26 October 2026 (UTC)

I might have indeed been rude at the time, sorry, as I was a bit miffed that you didn't let me finish editing in peace. There's been like five months since 5.0, so I figured nobody else is up to it, but if you're motivated now, that's also agreeable! Tomsod (talk) 14:46, 27 October 2026 (UTC)
The motivation does come and go a bit, but it's more the sheer amount of updating to be done in general, never mind with respect to 5.0 specifically. But I digress on that note - best we continue this on our talk pages. --Umbire the Phantom (talk) 09:03, 28 October 2026 (UTC)