Difference between revisions of "To hit"

From CrawlWiki
Jump to: navigation, search
(Cleaned up, reorganized)
 
(Undo revision 50906 by Pinkbeast (talk) revert self, clear from Discord discussion this correction was, er, wrong.)
 
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 +
{{version019}}
 
'''To hit''' (short for 'chance to hit') is the probability that an attack will hit a target. It is one of the two key factors in determining the success of an attack, the other being damage.
 
'''To hit''' (short for 'chance to hit') is the probability that an attack will hit a target. It is one of the two key factors in determining the success of an attack, the other being damage.
  
The to hit can be calculated for melee and ranged attacks, and is calculated differently for players and monsters.
+
The to hit can be calculated for melee and ranged attacks, and is calculated differently for players and monsters.  The largest factors for players are weapon (or unarmed) skill and fighting skill - with good training on both skills and decent dexterity, it should be rare to miss most targets.
  
==Player To Hit (Melee)==
+
==Player To Hit (Melee and Ranged)==
The player's to-hit in melee is determined by the following factors:
+
The player's to-hit in melee and ranged combat is determined by the following factors:
  
 
====Base Value====
 
====Base Value====
The base of the calculation is determined by the player's [[dexterity]] AND their [[strength]], and is somewhere around the average of the two. It is weighted toward either STR or DEX, depending on the [[strength weight]] of the weapon. Weapons with a low strength weight will benefit more from DEX for its to hit value, while weapons with a high strength weighting rely more on STR. A half-handed weapon will rely even further on STR if used without a shield. Unarmed attacks are weighted slightly toward DEX. For the sake of completeness, the base to-hit is something like
+
*Start with 15 + dexterity/2 + a random roll between 0 and your fighting skill.
 
 
15 + (Weighted Average of STR & DEX)
 
 
 
with the weighting determined by the weapon's strength weight.
 
  
 
====Weapons====
 
====Weapons====
*If not wielding a weapon, the player gets:
+
*Add a random roll from 0 to your weapon skill (unarmed is considered a weapon skill here).
**Between +1 and +[[Unarmed Combat]]
+
*Add the weapon's base accuracy; unarmed has +2, or +4 if you have claws.
***+4 if a [[troll]] or [[ghoul]]
+
*Add your weapon enchantment level and slaying bonuses.
***+2 if any other species
 
*If wielding a weapon, the player gets that weapon's intrinsic accuracy, plus any accuracy enchantment (the first plus on the weapon).
 
*If the player is elven and is wielding an [[elven]] weapon, they get +1d2.
 
*If the player is an orcish worshipper of [[Beogh]] (and not under [[penance]]), they get +1.
 
 
 
====Jewellery====
 
*If the player is wearing an [[amulet of inaccuracy]], they get a random penalty ranging from -0 to -5.
 
*If the player is wearing a [[ring of slaying]], they get the ring's hit bonus/penalty.
 
 
 
====Skills====
 
*[[Fighting]] gives you a bonus of +1 to +Fighting.
 
*Weapon skills give you a bonus of +1 to +Your Skill (if you are wielding the matching weapon).
 
 
 
====Environmental====
 
*When both combatants are in water and only the player is capable of swimming, the player get a +5 bonus.
 
 
 
====Status Effects====
 
*If the player is starving, they get a -3 penalty.
 
*If the player is invisible but cannot [[see invisible]], they get a -5 penalty (because they cannot see what they are doing).
 
  
====Armour Penalty====
+
====Other modifiers====
*The player's [[armour]] penalty is then calculated:
+
*If in wisp, fungus, pig, or non-vampire bat form, add random2(XL*100+100)/100 instead of using your weapon skill above.
**If the player is wearing a normal sized shield, they have a (6-''Shields skill'')/7 chance of incurring a -1 armour penalty (a player with Shields skill of 6+ will not have this penalty).
+
*Subtract 3 if starving, bloodless, or fainting.  Subtract 5 for vertigo.
**If the player is wearing a [[large shield]]:
+
*The player's shield penalty is -1d(ASP) where ASP is the Adjusted Shield Penalty. It is ASP = (Shield EV penalty) - (Shields skill)/(5 + (Size factor)) as explained in the [[Shields]] page. This penalty can be removed completely with enough skill levels in Shields.
***If they are an [[ogre]], troll, or [[draconian]], they have a (12-''Shields skill'')/13 chance of incurring a -1 armour penalty.
+
*The player's [[armour]] penalty is then calculated: -1d(ABAP) where ABAP is the Adjusted Body Armour Penalty.  
***Otherwise, they have three (12-''shields skill'')/13 chances of incurring between -2 and 0 to their armour penalty each time.
+
ABAP = (body_armour_base_penalty + max(0, 3*body_armour_base_penalty - str)) * (45 - armour_skill)/45
**An evasion penalty is now calculated, using the evasion modifier of the currently worn body armour as a base. This only applies to body armour, such as [[leather armour]] or mail: [[cloak]]s, [[helmet]]s, [[gloves]] and so forth do not have an evasion modifier. [[Barding]] does not affect the to hit penalty despite having an evasion modifier.
+
*[[Barding]] does not affect the to hit penalty despite having an evasion modifier.
**If the player is a [[merfolk]] and is swimming in [[deep water]], the evasion penalty of their armour is doubled.
+
*If you have the eyeballs mutation, add 2*[eyeballs level]+1.
**The player now has an ''evasion penalty''/''armour skill'' chance that the some or all of the evasion penalty will be added to their armour penalty.
 
**If the player is wielding a weapon, the armour penalty will then be multiplied by 2 or 3 (50% chance of either). Unarmed fighters do not get this penalty.
 
*The armour penalty is added to the player's chance to hit.
 
  
===The Roll===
+
====The Roll====
This completes the to hit calculation. The value is now 'rolled' (ie. a number from 0 to ''to hit''-1 is randomly generated). If this number exceeds the evasion value of the monster they are attacking, they hit lands.
+
*Take this total and roll a random number from 0 to total - 1.
  
====Post-Roll====
+
====Post Roll====
There are additional effects which can modify the to hit score AFTER it has been rolled:
+
*If the player is wearing an [[amulet of inaccuracy]], they get a -5 penalty.
*Wielding a non-cursed, half-handed weapon without a shield gives you +0 to +2.
+
*Subtract 5 if missing an eye (Ru sacrifice) or you are confused.
 +
*Subtract 6 if you cannot see the target (invisibility).
 +
*Add 2 + roll between 0 and 7 if the target is backlit (corona, sticky flame, or haloed and not affected by umbra).
 +
*Subtract 2 + roll between 0 and 3 if the target is in umbra and you do not have night vision (Dithmenos power).
 
*If the player is bonded to their weapon with the [[Sure Blade]] spell, they get +(5 + remaining duration of Sure Blade (MAX: +15)).
 
*If the player is bonded to their weapon with the [[Sure Blade]] spell, they get +(5 + remaining duration of Sure Blade (MAX: +15)).
 
*If the player is not wielding a weapon:
 
*If the player is not wielding a weapon:
Line 66: Line 44:
 
***[[Bat Form]]: 0 to +11
 
***[[Bat Form]]: 0 to +11
 
***[[Blade Hands]]: 0 to +11
 
***[[Blade Hands]]: 0 to +11
*Attacking a target under the effects of the [[Corona]] spell grants +2 to +9.
+
***[[Fungus Form]]: 0 to +9
*Attacking an invisible monster without being able to see invisible gives you -6.
+
***[[Tree Form]]: 0 to +9
 +
***[[Wisp Form]]: 0 to +9
  
 
==Monster To Hit (Melee)==
 
==Monster To Hit (Melee)==
Line 82: Line 61:
 
*A monster wielding a weapon receives that weapon's inherent and magical to hit modifiers.
 
*A monster wielding a weapon receives that weapon's inherent and magical to hit modifiers.
 
*A [[confused]] monster gets -5.
 
*A [[confused]] monster gets -5.
*A monster attacking a [[backlit]] defender gets +2 to +9.
+
*A monster attacking a [[Corona|backlit]] defender gets +2 to +9.
 
*A monster attacking an invisible target suffers a 35% penalty to its to hit number.
 
*A monster attacking an invisible target suffers a 35% penalty to its to hit number.
  

Latest revision as of 07:05, 28 September 2019

Version 0.19: This article may not be up to date for the latest stable release of Crawl.

To hit (short for 'chance to hit') is the probability that an attack will hit a target. It is one of the two key factors in determining the success of an attack, the other being damage.

The to hit can be calculated for melee and ranged attacks, and is calculated differently for players and monsters. The largest factors for players are weapon (or unarmed) skill and fighting skill - with good training on both skills and decent dexterity, it should be rare to miss most targets.

Player To Hit (Melee and Ranged)

The player's to-hit in melee and ranged combat is determined by the following factors:

Base Value

  • Start with 15 + dexterity/2 + a random roll between 0 and your fighting skill.

Weapons

  • Add a random roll from 0 to your weapon skill (unarmed is considered a weapon skill here).
  • Add the weapon's base accuracy; unarmed has +2, or +4 if you have claws.
  • Add your weapon enchantment level and slaying bonuses.

Other modifiers

  • If in wisp, fungus, pig, or non-vampire bat form, add random2(XL*100+100)/100 instead of using your weapon skill above.
  • Subtract 3 if starving, bloodless, or fainting. Subtract 5 for vertigo.
  • The player's shield penalty is -1d(ASP) where ASP is the Adjusted Shield Penalty. It is ASP = (Shield EV penalty) - (Shields skill)/(5 + (Size factor)) as explained in the Shields page. This penalty can be removed completely with enough skill levels in Shields.
  • The player's armour penalty is then calculated: -1d(ABAP) where ABAP is the Adjusted Body Armour Penalty.
ABAP = (body_armour_base_penalty + max(0, 3*body_armour_base_penalty - str)) * (45 - armour_skill)/45
  • Barding does not affect the to hit penalty despite having an evasion modifier.
  • If you have the eyeballs mutation, add 2*[eyeballs level]+1.

The Roll

  • Take this total and roll a random number from 0 to total - 1.

Post Roll

  • If the player is wearing an amulet of inaccuracy, they get a -5 penalty.
  • Subtract 5 if missing an eye (Ru sacrifice) or you are confused.
  • Subtract 6 if you cannot see the target (invisibility).
  • Add 2 + roll between 0 and 7 if the target is backlit (corona, sticky flame, or haloed and not affected by umbra).
  • Subtract 2 + roll between 0 and 3 if the target is in umbra and you do not have night vision (Dithmenos power).
  • If the player is bonded to their weapon with the Sure Blade spell, they get +(5 + remaining duration of Sure Blade (MAX: +15)).
  • If the player is not wielding a weapon:

Monster To Hit (Melee)

A monster's to hit is calculated as follows:

Base Value

The base value is 18.

Hit Dice

Monsters with the Fighter class flag get a bonus of +(2.5 * HD). Other monsters get +(1.5 * HD). Decimals are rounded down.

Situational Modifiers

  • An aquatic monster "using the terrain to its advantage" gets +5.
  • A monster wielding a weapon receives that weapon's inherent and magical to hit modifiers.
  • A confused monster gets -5.
  • A monster attacking a backlit defender gets +2 to +9.
  • A monster attacking an invisible target suffers a 35% penalty to its to hit number.

Monster To Hit (Ranged)

Ranged attacks ("beams", to use the game's internal terminology) have a to hit number, just like melee attacks do. This is modified as follows:

  • If you are invisible and the attacker can't see invisible, the to hit number is halved.
  • If you have Deflect Missiles running, the to hit number is reduced to a random number between 0 and 2/3 of its value.
  • If you don't have Deflect Missiles running, but do have Repel Missiles running or the Repulsion Field mutation at level 3, the to hit number is reduced by a random number between 0 and 1/2 of its value (rounded down).