View Single Post
Old March 14, 2011, 18:57   #4
Ycombinator
Adept
 
Join Date: Apr 2010
Location: Zürich, Switzerland
Age: 30
Posts: 156
Ycombinator is on a distinguished road
Combat formulas in Angband are not something you want to calculate with pen and paper, indeed. But let me try to summarize them. I assume version 3.2.0 (I haven't familiarized myself with nightlies yet).

The following applies to player's attacks vs monsters. Monsters do things in a different way.

1) There is always a 5% chance to miss and a 5% chance to hit (like natural 1 and natural 20 in D&D). Auto-hit, however, does not mean a critical hit.

2) Attack roll is 0..(N-1) vs 3*AC/4, where N is determined as follows:

N = skill + 3 * to_hit_bonus.

N is halved if target is invisible.

For ranged attacks, distance in tiles is subtracted.

Skill is determined only by character's class, race, and level (think of base attack bonus in D&D). There are separate skills for melee fighting, shooting, and throwing things. In-game character screen gives you only vague descriptions instead of actual numbers. To give you a sense of scale, "Very Bad" is below zero, "Poor" is 24..35, and "Legendary" is 216 or more.

To-hit bonus is a sum of character's inherent to-hit bonus and equipment bonuses. Inherent bonus is determined by both STR and DEX, which contribute equally. It is universal for all attacks, melee and ranged.

Monster's AC is determined solely by monster's type. Again, to give you a sense of scale, AC of a small kobold is 16 and Morgoth has AC 150. Thick hide of Tarrasque provides it with whopping AC 185.

3) Damage is calculated as follows: weapon's base dice are rolled, the best of available slays or brands multiplier is applied, then weapon to-damage bonus is added, then critical hit modifier is applied, and finally off-weapon to-damage bonus is applied.

Note that slays and brands work best with big dice weapons.

4) Your chance to land a critical blow is determined by the weapon weight (bigger is better), total to-hit bonus and character level:

critical_chance = (weight + to_hit * 5 + level * 3) in 5000.

Weight is in 1/10 lbs.

If a critical hit is scored, the second roll is made to determine how *awesome* it was. Only weapon weight affects its results. Here is a little table for melee attacks:
Code:
it was a ... hit    damage formula  min. w. required, lbs   max. possible w., lbs

good                2 * D + 5       none                    40
great               2 * D + 10      none                    70  
superb              3 * D + 15      5                       90
*GREAT*             3 * D + 20      25                      130
*SUPERB*            7 * D / 2 + 25  65                      none
That's why heavy weapons do so much more damage on average (Grond being an extreme example) than a straightforward calculation may show. In-game description already takes that into account.

5) Calculation of blows uses complex tables, but thankfully the game provides you with detailed information about stats required for the next extra blow.

Last edited by Ycombinator; March 14, 2011 at 19:16.
Ycombinator is offline   Reply With Quote