At what point do reductions in armour class stop being eff..

spud

Distinguished
Feb 17, 2001
3,406
0
20,780
Archived from groups: rec.games.roguelike.nethack (More info?)

I'm AC -31 right now and I know I could go lower. At what point does
reducing AC become redundant?
I've got down to about -45 before but I still got hit or swallowed. If
it's worth getting an extremely low AC (less than -45)how do I go about
it?
I donate to priests for AC1 and I generally have most stuff enchanted
to +5 including hawaiian shirt. I don't use protection rings cos I save
my fingers for levitation or whatever.
Any help would be appreciated.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Spud wrote:
> I'm AC -31 right now and I know I could go lower. At what point does
> reducing AC become redundant?

About -40 is usually enough for not loosing hit points rapidly.

> I've got down to about -45 before but I still got hit or swallowed. If
> it's worth getting an extremely low AC (less than -45)how do I go about
> it?

You'll get hit or swallowed even at -100. It doesn't change much at
this point.

> I donate to priests for AC1 and I generally have most stuff enchanted
> to +5 including hawaiian shirt. I don't use protection rings cos I save
> my fingers for levitation or whatever.
> Any help would be appreciated.

You can pray for unlimited AC too. (well, -128 is the limit)
 

spud

Distinguished
Feb 17, 2001
3,406
0
20,780
Archived from groups: rec.games.roguelike.nethack (More info?)

>
> You can pray for unlimited AC too. (well, -128 is the limit)

I didn't know you can pray for lowered AC. How do you do this?
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Michal Brzozowski wrote:
>
> Spud wrote:
>
>>I'm AC -31 right now and I know I could go lower. At what point does
>>reducing AC become redundant?
>
> About -40 is usually enough for not loosing hit points rapidly.
>
>>I've got down to about -45 before but I still got hit or swallowed. If
>>it's worth getting an extremely low AC (less than -45)how do I go about
>>it?
>
> You'll get hit or swallowed even at -100. It doesn't change much at
> this point.

It helps to understand the way AC works in NH. From 10 down to 0 (or
-1?) the AC works like you expect from Dungeons and Dragons-style games,
decreasing the chance your opponent has to hit you.

After you pass AC-0, the foes all have the same chance to hit you, but
additional AC reduces the damage you take from attacks. Each time you're
hit, a random number between 0 and your AC is added to the damage from
the attack. So with an AC of -20, you should average about -10 damage to
each recieved attack.

Lower AC will give you a chance to take even less damage but it's still
possible to take full damage. I don't think AC affects other sources of
damage (spells, acid, etc).


I think that -30 to -40 is fine. The best way to reduce damage from
attacks is to use a ranged attack and kill your foes before they reach you.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Spud" <colin_fuidge@hotmail.com> writes:

> >
> > You can pray for unlimited AC too. (well, -128 is the limit)
>
> I didn't know you can pray for lowered AC. How do you do this?

Find an altar, pray. If your luck is well-adjusted, there's
some chance your god (if well-pleased) will grant you a gift;
you'll get some intrinsic, or, if you already have them, a
point of 'protection' (which lowers naked AC by one). Details
can be found in the praying spoiler,

http://www.steelypips.org/nethack/pray.html

Best,
Jakob
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Correct me if I'm wrong, but doesn't enchanting your armor beyond about
+2 carry a 2/3 chance of destroying the armor?

So how do you enchant all your stuff to +5?
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Quoting Andy Johnson <swervy.aTAKE@this-out.gmail.com>:
>After you pass AC-0, the foes all have the same chance to hit you,

Where'd you get *that* from?
--
David Damerell <damerell@chiark.greenend.org.uk> flcl?
Today is Second Oneiros, July.
 

Sean

Distinguished
Dec 31, 2007
1,007
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

cactus of doom wrote:
> Correct me if I'm wrong, but doesn't enchanting your armor beyond about
> +2 carry a 2/3 chance of destroying the armor?
>
> So how do you enchant all your stuff to +5?

It's +3, not +2, so you can always safely enchant it at +3, hopefully
gaining two points of enchantment with a blessed scroll.
Beyond that it's a 1/enchantment chance that it doesn't evaporate.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

cactus of doom wrote:

> Correct me if I'm wrong, but doesn't enchanting your armor beyond about
> +2 carry a 2/3 chance of destroying the armor?
>
> So how do you enchant all your stuff to +5?

Enchanting armor is safe if the current enchantment is +3 or lower (+5
to elven armor and cornuthaums for wizards). Beyond that there is 1 in
current enchantment chance not to vaporize the armor.

The amount of added enchantment is in the following table:

current enchantment[1] blessed scroll uncursed scroll
-5 - -3 +1 - +4 +1
-2 - +2 +1 - +3 +1
+3 - +5 +1 - +2 +1
+6 - +8 +1 +1
>= +9 +0 / +1 +0 / +1 [2]

[1] You can add to the table more rows for lower enchantments, but why
one wouldn't cancel the armor before enchanting beats me.
[2] There is 1 in current enchantment chance to get +1.

Topi


--
"The whole problem with the world is that fools and fanatics are
always so certain of themselves, but wiser people so full of doubts."
- Bertrand Russell
"How come he didn't put 'I think' at the end of it?" - Anonymous
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

This being a nice small part of the code I decided to write annotations
to the actual code so that everyone can see what nethack does when you
read a scroll of enchant armor. If you like this I might do others for
other similiar easy parts of the code.

So here goes:

1: case SCR_ENCHANT_ARMOR:
2: {

This is the start of enchant armor scroll handling. First some needed
variables are defined.

3: register schar s;

Used as scratch variable to hold the absolute value of the current
enchantment and further in the code to hold the amount enchanting done.

4: boolean special_armor;

Flag that is set to reflect elven armor or cornuthaums for wizards.

5: boolean same_color;

Flag used to reflect if the armor and the effect of the scroll are in
same color.

6: otmp = some_armor(&youmonst);

From this point otmp holds a pointer to some armor the the character
was wearing if any.

7: if(!otmp) {

If the character wasn't wearing anything do the following.

8: strange_feeling(sobj,
9: !Blind ? "Your skin glows then fades." :
10: "Your skin feels warm for a moment.");

This is the message you see on the screen. Different messages if the
character is blind or not. sobj is pointer to the scroll read.

11: exercise(A_CON, !sobj->cursed);
12: exercise(A_STR, !sobj->cursed);

Exercise constitution and strength postively if the scroll was
non-cursed negatively otherwise.

13: return(1);

If no armor was weared then we're done.

14: }
15: if(confused) {

Here we have a piece of armor and this part of the code handles what
happens if the character is confused. Notice that stunning has no effect
on the outcome.

16: otmp->oerodeproof = !(sobj->cursed);

The piece of armor is made fooproof if the scroll is non-cursed
otherwise the fooproofing is removed.

17: if(Blind) {
18: otmp->rknown = FALSE;
19: Your("%s %s warm for a moment.",
20: xname(otmp), otense(otmp, "feel"));

If the character is blind he feels something but don't know what
happened. This doesn't take account that if the buc-status of the scroll
is known then even blind character would know what happened.

21: } else {
22: otmp->rknown = TRUE;
23: Your("%s %s covered by a %s %s %s!",
24: xname(otmp), otense(otmp, "are"),
25: sobj->cursed ? "mottled" : "shimmering",
26: hcolor(sobj->cursed ? NH_BLACK : NH_GOLDEN),
27: sobj->cursed ? "glow" :
28: (is_shield(otmp) ? "layer" : "shield"));
29: }

If the character is not blind the the effect is known and the message
tells what you see. The message is composed by using the name of the
armor, the right tense of 'are', 'covered by a', description based on
cursedness of the scroll and shields are layered other armor shielded.

30: if (otmp->oerodeproof &&
31: (otmp->oeroded || otmp->oeroded2)) {
32: otmp->oeroded = otmp->oeroded2 = 0;
33: Your("%s %s as good as new!",
34: xname(otmp),
35: otense(otmp, Blind ? "feel" : "look"));
36: }

If the armor is fooproofed and was damaged all damage is removed and a
approprite message based on blindness is generated.

37: break;
38: }

This end the case if the character was confused.

39: /* elven armor vibrates warningly when enchanted beyond a limit */
40: special_armor = is_elven_armor(otmp) ||
41: (Role_if(PM_WIZARD) && otmp->otyp == CORNUTHAUM);

Here the flag covering elven armor and cornuthaums for wizards is set.

42: if (sobj->cursed)
43: same_color =
44: (otmp->otyp == BLACK_DRAGON_SCALE_MAIL ||
45: otmp->otyp == BLACK_DRAGON_SCALES);
46: else
47: same_color =
48: (otmp->otyp == SILVER_DRAGON_SCALE_MAIL ||
49: otmp->otyp == SILVER_DRAGON_SCALES ||
50: otmp->otyp == SHIELD_OF_REFLECTION);
51: if (Blind) same_color = FALSE;

If the scroll is cursed then the effect is same colour as a black armor,
otherwise it is same color as a silver armor. The effect is never same
color as the armor for blind characters.

52: /* KMH -- catch underflow */
53: s = sobj->cursed ? -otmp->spe : otmp->spe;

Here the scratch variable s is set to the absolute walue of the current
enchantment of the armor piece. Absolute value is used so that you
cannot negatively curse armor until the value underflows from -128 to
+127. Notice that there still is a very slim chance to pull this off.
Some extinctionist might try this.

54: if (s > (special_armor ? 5 : 3) && rn2(s)) {

Here is the famous check if the armor evaporates. If the absolute value
of the current enchantment is higher than 3 (5 for the special armor)
and rn2(s) returns non-zero value then the armor evaporates.

rn2(x) returns a random number in the range 0..x-1

55: Your("%s violently %s%s%s for a while, then %s.",
56: xname(otmp),
57: otense(otmp, Blind ? "vibrate" : "glow"),
58: (!Blind && !same_color) ? " " : nul,
59: (Blind || same_color) ? nul :
60: hcolor(sobj->cursed ? NH_BLACK : NH_SILVER),
61: otense(otmp, "evaporate"));

Here is the message given if the armor evaporates. The armor 'violently'
vibrates or glows in the right tense (based on the blindness) in colour
of the effect (unless it would be the same color as the armor) 'for a
while, then' evaporates in the right tense.

So we get messages like:

"The gauntlets of power violently glow silver for a while, then evaporate."
"The black dragon scale mail violently glows for a while then evaporates."
"The hard hat violently vibrates for a while, then evaporates."

62: if(is_cloak(otmp)) (void) Cloak_off();
63: if(is_boots(otmp)) (void) Boots_off();
64: if(is_helmet(otmp)) (void) Helmet_off();
65: if(is_gloves(otmp)) (void) Gloves_off();
66: if(is_shield(otmp)) (void) Shield_off();
67: if(otmp == uarm) (void) Armor_gone();

These handle the various effects that removing pieces of armor have.
Unreflecting if shield of reflection disappears, removing speed if speed
boots disapper and so on.

68: useup(otmp);

This removes the piece of armor from existense so that it does not
appear on any internal structures that nethack uses to keep track of the
items and releases all the memory that was used to store the item
information.

69: break;
70: }

If the armor disappeared we're done.

71: s = sobj->cursed ? -1 :
72: otmp->spe >= 9 ? (rn2(otmp->spe) == 0) :
73: sobj->blessed ? rnd(3-otmp->spe/3) : 1;

Here the scratch variable s is set to the value of enchantment gained.
If the scroll is cursed then s = -1. If the current enchantment is
higher than +8 then there is 1 in the current enchantment chance to get
+1. rn2(otmp->spe) returns a value from 0..current enchantment and if
that is 0 then s = 1 othervise s = 0. Otherwise if the scroll is not
blessed then s = 1. If the scroll is blessed then s is set randomly.

rnd(x) returns a random number in the range 1..x

Here the range is calculated by 3 - current enchantment/3,
so for blessed scrolls the ranges are:

Current enchantment Range
+8 - +6 1
+5 - +3 2
+2 - -2 3
-3 - -5 4
etc.

74: if (s >= 0 && otmp->otyp >= GRAY_DRAGON_SCALES &&
75: otmp->otyp <= YELLOW_DRAGON_SCALES) {
76: /* dragon scales get turned into dragon scale mail */

If the resulted enchantment change is postive and the selected armor is
dragon scales then it is changed into the appropriate dragon scale mail.

77: Your("%s merges and hardens!", xname(otmp));

This is the message.

78: setworn((struct obj *)0, W_ARM);

Remove the body armor ie. set non existent armor to be worn.

79: /* assumes same order */
80: otmp->otyp = GRAY_DRAGON_SCALE_MAIL +
81: otmp->otyp - GRAY_DRAGON_SCALES;

The item type of the selected armor is changed from dragon scales to
dragon scale mail and like the comment says the scales and the scale
mails are in same order so that simple difference calculation can obtain
the right color for the scale mail from the scales.

82: otmp->cursed = 0;

The resulting dragon scale mail is uncursed.

83: if (sobj->blessed) {
84: otmp->spe++;
85: otmp->blessed = 1;
86: }

If the scroll was blessed then the resulting dragon scale mail is
blessed and its enchantment is increased by one.

87: otmp->known = 1;

The resulting dragon scale mail is known.

88: setworn(otmp, W_ARM);

This makes the dragon scale mail as the worn armor.

89: break;
90: }

This ends the scroll handling in case of making dragon scale mail.

Here starts the non-confused non-scalemerging handling for a armor that
wasn't evaporated.

91: Your("%s %s%s%s%s for a %s.",
92: xname(otmp),
93: s == 0 ? "violently " : nul,
94: otense(otmp, Blind ? "vibrate" : "glow"),
95: (!Blind && !same_color) ? " " : nul,
96: (Blind || same_color) ? nul : hcolor(sobj->cursed ?
NH_BLACK : NH_SILVER),
97: (s*s>1) ? "while" : "moment");

Here is the code that generates the correct message for the event.
Notice that if there is no change in the enchantment of the armor then
the glow or vibration is violent like in the case of evaporation and
that the glow or vibration takes a while if the enchantment addition is
greater than 1. Also black and silver armor are handled correctly.

98: otmp->cursed = sobj->cursed;

The armor is cursed if the scroll was cursed

99: if (!otmp->blessed || sobj->cursed)
100: otmp->blessed = sobj->blessed;

If the armor isn't blessed or the scroll was cursed then the armor gets
the same blessed value as the scroll.

101: if (s) {
102: otmp->spe += s;
103: adj_abon(otmp, s);
104: known = otmp->known;
105: }

If there is a change to the enchantment (s != 0) then add that change,
adjust all the bonuses that this change gives (Helm of Brilliance etc.)
and make the change known.

106: if ((otmp->spe > (special_armor ? 5 : 3)) &&
107: (special_armor || !rn2(7)))
108: Your("%s suddenly %s %s.",
109: xname(otmp), otense(otmp, "vibrate"),
110: Blind ? "again" : "unexpectedly");

If the armor was enchanted over the safe limit (3,5) then give a
warning. In a case of special armor the warning is always given
otherwise there 1 in 7 chance to get the warning. Notice that for a
blind character the message tells that the item vibrates a second time.

111: break;
112: }

This ends the handling in the normal case.

That's how the scroll of enchant armor is handled in the NetHack 3.4.3
code. Tell me if you want to see this kind of messages in future.

Topi
--
"The whole problem with the world is that fools and fanatics are
always so certain of themselves, but wiser people so full of doubts."
- Bertrand Russell
"How come he didn't put 'I think' at the end of it?" - Anonymous