General Information
Archery has the following effects:
- Increases probability of critical hits.
- Reduces the chance of ammo breakage, to a minimum of 4% (arrows) or 2% (shots, bolts).
Affects the probability of ../Piercing Shots actually piercing (p = (45 + skill)%).
Allows the creation of ammo (together with the Ammo creation ability): Archery level 10 allows arrows, and level 20 allows bolts.
- Affects probability of hitting in ranged combat.
Strategic Recommendations
Archery is practically a must for any character who lacks offensive spells. It may be obtained from Fumblefingers.
Code-related Information
The to-hit calculation looks like this.
p_ptr->skill_thb += (50 * (((7 * get_skill(SKILL_ARCHERY)) + (3 * get_skill(SKILL_COMBAT))) / 10) / 10);
In addition to this basic chance of hitting, the game adds 3 points for each plus to-hit on the launcher, the ammo, any other equipment, modifiers based on the character's STR and DEX, and half the specific *-mastery subskill. (E.g. with a (+21,+23) heavy crossbow and a (+13,+11) seeker bolt, and (+4,+3) gloves of slaying, and 18/160 DEX, and 18/*** STR, and a Crossbow-mastery skill of 16, the game adds 3 * (21 + 13 + 4 + 11 + 16 + 16/2) = 219.)
There are other modifiers for various conditions which can affect the player (blessing, heroism, stunned, etc.). They are too numerous to list here.
The monster's distance is subtracted from this total. The result is called chance.
chance is passed to the test_hit_fire function along with the monster's AC. This function rolls a random number from 0 to 99. If the result is 0-4, it's an automatic hit. If it's 5-9, it's an automatic miss.
Otherwise, if the monster is not visible to the player, chance is divided by 2 (rounding up).
chance is modified by up to 10 points (in either direction) based on your luck. This result is passed to rand_int to generate yet another random number. If this final number is less than 3/4 of the monster's AC, you missed. Otherwise, you hit.
ToME Wiki