Difference between revisions of "To-hit"

From NetHackWiki
Jump to navigation Jump to search
m
(bare-hands and martial arts to-hit boni never apply in vanilla.)
Line 30: Line 30:
 
* A bonus or penalty from -4 to +3 ([[#Weapon skill bonus|see table]]), depending on your [[skill]] with the wielded weapon, if you are not two-weaponing.<ref>[[weapon.c#line1109]] (skill bonus)</ref>
 
* A bonus or penalty from -4 to +3 ([[#Weapon skill bonus|see table]]), depending on your [[skill]] with the wielded weapon, if you are not two-weaponing.<ref>[[weapon.c#line1109]] (skill bonus)</ref>
 
* A penalty from -9 to -3 ([[#Two weapon penalty|see table]]), depending on your [[two weapon combat]] skill (or your weapon skill, if it is lower), if you are two-weaponing.<ref>[[weapon.c#line1118]] (two weapon penalty)</ref>
 
* A penalty from -9 to -3 ([[#Two weapon penalty|see table]]), depending on your [[two weapon combat]] skill (or your weapon skill, if it is lower), if you are two-weaponing.<ref>[[weapon.c#line1118]] (two weapon penalty)</ref>
* A bonus from +1 to +7 ([[#Bare hands bonus|see table]]), depending on your [[bare hands]] or [[martial arts]] skill, if you attack without any wielded item.<ref>[[weapon.c#line1129]] (bare hands bonus)</ref>
+
* No bonus for [[bare hands]] or [[martial arts]] skill<ref>The bonus would be added by {{function|weapon.c|weapon_hit_bonus}}, but this is never called because {{sourcecode|uhitm.c|283}} checks if you're wielding something.</ref>
 
* A penalty if riding a steed: -2 if restricted or unskilled in [[riding]], -1 if basic, and no penalty if skilled or better.<ref>[[weapon.c#line1146]] (base riding penalty)</ref>
 
* A penalty if riding a steed: -2 if restricted or unskilled in [[riding]], -1 if basic, and no penalty if skilled or better.<ref>[[weapon.c#line1146]] (base riding penalty)</ref>
 
* An additional -2 if you engage in two weapon combat while riding a steed.<ref>[[weapon.c#line1154]] (two weapon riding penalty)</ref>
 
* An additional -2 if you engage in two weapon combat while riding a steed.<ref>[[weapon.c#line1154]] (two weapon riding penalty)</ref>
Line 220: Line 220:
  
  
=== Bare hands bonus ===
+
=== Monster size bonus ===
  
The bare handed combat bonus applies when hitting in melee without any wielded item. [[Monk]]s and [[Samurai]] get the [[martial arts]] bonus; other [[role]]s get the [[bare hands]] bonus.
+
The monster size bonus applies to ranged attacks only.
 +
 
 +
{|class="prettytable"
 +
!Size
 +
!Bonus
 +
|-
 +
|Tiny
 +
| -2
 +
|-
 +
|Small
 +
| -1
 +
|-
 +
|Medium
 +
|0
 +
|-
 +
|Large
 +
| +1
 +
|-
 +
|Huge
 +
| +2
 +
|-
 +
|Gigantic
 +
| +5
 +
|}
 +
 
 +
==Variants==
 +
[[SporkHack]] does grant to-hit bonues for bare-hands or martial arts skill when hitting in melee without any wielded item. [[Monk]]s and [[Samurai]] get the [[martial arts]] bonus; other [[role]]s get the [[bare hands]] bonus.
  
 
{|class="prettytable"
 
{|class="prettytable"
Line 254: Line 280:
 
|}
 
|}
  
 
=== Monster size bonus ===
 
 
The monster size bonus applies to ranged attacks only.
 
 
{|class="prettytable"
 
!Size
 
!Bonus
 
|-
 
|Tiny
 
| -2
 
|-
 
|Small
 
| -1
 
|-
 
|Medium
 
|0
 
|-
 
|Large
 
| +1
 
|-
 
|Huge
 
| +2
 
|-
 
|Gigantic
 
| +5
 
|}
 
  
  

Revision as of 22:52, 21 August 2011

When attacking a monster, you must make a successful to-hit roll in order to actually strike it. To do this, your to-hit bonus must exceed the roll of 1d20.[1]

Melee

These are some of the factors that might affect your chance to hit in melee:

Weapon and equipment

Your characteristics and status

Skills

  • A bonus or penalty from -4 to +3 (see table), depending on your skill with the wielded weapon, if you are not two-weaponing.[15]
  • A penalty from -9 to -3 (see table), depending on your two weapon combat skill (or your weapon skill, if it is lower), if you are two-weaponing.[16]
  • No bonus for bare hands or martial arts skill[17]
  • A penalty if riding a steed: -2 if restricted or unskilled in riding, -1 if basic, and no penalty if skilled or better.[18]
  • An additional -2 if you engage in two weapon combat while riding a steed.[19]

Monster characteristics and status

  • The target monster's AC.[20]
  • +2 (cumulative) against a stunned, fleeing, or sleeping monster.[21]
  • +4 against a paralysed monster.[22]

Monster-specific

Ranged

These are some of the factors that might affect your chance to hit when throwing or kicking items, or when applying a polearm:

  • -1 for all ranged attacks.[28]
  • A bonus equal to the enchantment level(s) of any rings of increase accuracy you are wearing.[29]
  • The target monster's AC.[30]
  • A bonus based on your dexterity.
  • A bonus equal to your Luck.[31]
  • A bonus equal to your experience level, if you are in your natural form.
  • A bonus equal to your monster type's "level" if you are polymorphed.[32]
  • A bonus based on how far away the target is. A target adjacent to you gives a +2 bonus; this decreases by 1 for each move's worth of distance, to a maximum penalty of -4.
  • -2 if you are wielding any bow while wearing gauntlets of power.
  • -3 if you are wielding any bow while wearing gauntlets of fumbling.
  • A bonus or penalty from -2 to +5 (see table), depending on the size of the target monster.
  • +2 against a sleeping monster.
  • +4 against a paralysed monster.
  • +2 if the item used is a heavy iron ball.
  • +6 if the item used is a boulder.
  • A bonus (or penalty) equal to the weapon's enchantment, if using a weapon.
  • The natural to-hit bonus of the item, if it is a weapon or gem.
  • +2 for using a blessed weapon against a demon or undead.[33]
  • +2 for using any spear against a "kebabable" monster: xorns, nagas, dragons, jabberwocks, and giants.[34]
  • +4 for using a trident against any swimmer that is in water.[35]
  • +2 for using a trident against any S or ; that is not in water.
  • +2 for using a pick-axe or mattock against a xorn or earth elemental.[36]
  • The artifact's to-hit bonus, if using an artifact weapon (or artifact gem) against an appropriate target.[37]
  • +1 if you are hitting any orc as an elven hero currently in natural form, or polymorphed into an elven monster.[38]
  • If you throw any gem at a unicorn, it will always be caught.
  • If you throw your quest artifact at your quest leader, and he/she is peaceful and not paralysed, it will be caught and returned to you.
  • -4 if you throw ammo without wielding the appropriate launcher.
  • A bonus (or penalty) equal to the enchantment of your launcher, if firing ammo from it.
  • A penalty based on the erosion of your launcher, if firing ammo from it: -1 if eroded, -2 if thoroughly eroded, or -3 if completely eroded.
  • The artifact's to-hit bonus, if firing appropriate ammo from an artifact launcher, against an appropriate target.
  • +1 if you are an elf or Samurai firing any arrows from any bow.
  • An additional +1 if you are an elf firing elven arrows from an elven bow.
  • An additional +1 if you are a Samurai firing ya from a yumi.
  • +4 if throwing or kicking a boomerang.
  • +2 if throwing or kicking an item that counts as a throwing weapon.
  • -2 if throwing or kicking an item that is neither a throwing weapon nor ammo.
  • A bonus or penalty from -4 to +3 (see table), depending on your skill with the thrown item, unless you throw ammo without wielding the appropriate launcher.

Bonus tables

Strength bonus

The strength bonus applies to melee attacks only.

Strength Bonus
3 to 5 -2
6 to 7 -1
8 to 16 0
17 to 18/50 +1
18/51 to 18/99 +2
18/** to 25 +3


Dexterity bonus

The dexterity bonus applies to both melee and ranged attacks.

Dexterity Bonus
3 -3
4 to 5 -2
6 to 7 -1
8 to 14 0
15 +1
16 +2
17 +3
18 +4
19 +5
20 +6
21 +7
22 +8
23 +9
24 +10
25 +11


Weapon skill bonus

The weapon skill bonus applies to both melee and ranged attacks.

Skill Bonus
Restricted or
Unskilled
-4
Basic 0
Skilled +2
Expert +3


Two weapon penalty

The two weapon combat penalty applies to melee attacks only. It uses the lesser of the two weapon combat skill and your primary weapon's skill.

Skill Penalty
Restricted or
Unskilled
-9
Basic -7
Skilled -5
Expert -3


Monster size bonus

The monster size bonus applies to ranged attacks only.

Size Bonus
Tiny -2
Small -1
Medium 0
Large +1
Huge +2
Gigantic +5

Variants

SporkHack does grant to-hit bonues for bare-hands or martial arts skill when hitting in melee without any wielded item. Monks and Samurai get the martial arts bonus; other roles get the bare hands bonus.

Skill Bare hands
bonus
Martial arts
bonus
Unskilled +1 (n/a)
Basic +1 +3
Skilled +2 +4
Expert +2 +5
Master +3 +6
Grand Master +3 +7


References

  1. uhitm.c#line478 (to-hit roll)
  2. weapon.c#line133 (enchantment bonus for weapons)
  3. weapon.c#line137 (item to-hit bonus)
  4. weapon.c#line164 (artifact bonus)
  5. uhitm.c#line236 (your to-hit bonus from rings, u.uhitinc)
  6. uhitm.c#line267 (monk penalty and bonus)
  7. uhitm.c#line236 (base +1 for melee)
  8. weapon.c#line688 (strength and dexterity bonuses)
  9. uhitm.c#line236 (Luck bonus)
  10. uhitm.c#line237 (natural and polymorphed level bonuses)
  11. weapon.c#line703 (beginner to-hit bonus)
  12. uhitm.c#line277 (weight penalty)
  13. uhitm.c#line278 (trap penalty)
  14. uhitm.c#line478 (always hit if engulfed)
  15. weapon.c#line1109 (skill bonus)
  16. weapon.c#line1118 (two weapon penalty)
  17. The bonus would be added by weapon_hit_bonus in weapon.c, but this is never called because uhitm.c, line 283 checks if you're wielding something.
  18. weapon.c#line1146 (base riding penalty)
  19. weapon.c#line1154 (two weapon riding penalty)
  20. uhitm.c#line236 (monster AC)
  21. uhitm.c#line250 (monster status bonuses)
  22. uhitm.c#line257 (paralysed monster bonus)
  23. weapon.c#line142 (blessed bonus against demons/undead)
  24. weapon.c#line145 (spear versus "kebabable" monster)
  25. weapon.c#line149 (trident versus swimmers)
  26. weapon.c#line155 (pick versus phasing and thick-skinned)
  27. uhitm.c#line264 (elves versus orcs)
  28. dothrow.c#line1198 (base -1 for ranged)
  29. uhitm.c#line236 (your to-hit bonus from rings, u.uhitinc)
  30. uhitm.c#line236 (monster AC)
  31. uhitm.c#line236 (Luck bonus)
  32. uhitm.c#line237 (natural and polymorphed level bonuses)
  33. weapon.c#line142 (blessed bonus against demons/undead)
  34. weapon.c#line145 (spear versus "kebabable" monster)
  35. weapon.c#line149 (trident versus swimmers)
  36. weapon.c#line155 (pick versus phasing and thick-skinned)
  37. weapon.c#line164 (artifact bonus)
  38. uhitm.c#line264 (elves versus orcs)