chuqui@nsc.UUCP (Chuq Von Rospach) (05/21/84)
I was recently asked a question on how armor affects the monsters chance of hitting you in rogue in mail and I decided that the answer was general enough to warrant posting. Note that this is a significant spoiler. Don't read further unless you want to. You have been warned. >One thing I don't understand, though, is what determines the chances of a >monster hitting me, and how this changes with armor class. For example, an >aquator has "HD" 5. If I have armor class 12 (I wish), what would be the >chance of it hitting me? Why? near as I can tell. Rather than force you to track down a D&Der to translate them into English, here is what the source code does: A monster is given a set of damage dice. This is defined in the form "xdx" or "xdx/xdx[/...]". Each set of xdx denotes a swing on a turn. For example (I'm using 5.2 for this) a bat has hit dices of 1d2, a dragon has hit dice of 1d8/1d8/3d10. For each damage die it has the routine swing() is called, for each swing the monster has an opportunity to hit. Whether a swing hits is determined by the following: The level of the monster The armor class of the rogue The formula is: rnd(20) >= (20 - level of the monster) - armor class Here is what 5.2 thinks of its monsters: Name level number of swings giant ant 2 1 bat 1 1 centaur 4 2 dragon 10 5 floating eye 1 1 violet fungi 8 1 gnome 1 1 hobgoblin 1 1 invisible stalker 8 4 jackal 1 1 kobold 1 1 leprechaun 3 1 mimic 7 3 nymph 3 1 orc 1 1 purple worm 15 4 quasit 3 3 rust monster 5 2 snake 1 1 troll 6 4 umber hulk 8 8 vampire 8 1 wraith 5 1 xorn 7 7 yeti 4 2 zombie 2 1 In 5.2 armor starts with leather at class 8 and goes to plate at class 3 (skin is 10). With 5.3 they un-gygaxed that and made leather class 2 (skin is 0) so the armor designation in the formula is basically inverted (you add it instead of subtract it). rnd(20) >= (20 - level of the monster) - armor class Ok, lets plug this into a couple of monsters. A bat is level 1, so for a bat to hit you it must roll greater than (19 - your armor class). If you are in +0 leather (AC 8) it has to roll 11, so it is basically 50-50 whether it gets you. If you are in +0 plate (AC 3) it must roll 16 so that chances are that it will hit only once in about 20. If you get +4 plate (AC -1) the roll needed to hit goes over 20 so it will never touch you. A purple worm, on the other hand, is level 15. It therefore needs to roll a (5 - armor class) to hit. If you are in leather it will ALWAYS hit because the roll goes negative. If you are in +0 plate it has to roll 2 or better. As you can see, this is a real pain of a monster, especially when you realize it can take 4 swings at you for a maximum of 32 hit points. By using the chart above you can figure out how strong an armor you need to keep all of these monsters from hitting you and the relative chance they have of causing damage. chuq -- From the closet of anxieties of: Chuq Von Rospach {amd70,fortune,hplabs,ihnp4}!nsc!chuqui (408) 733-2600 x242 How do you know if you're really in love? Do violins swell when you're touching the one that you're loving?