Difference between revisions of "To hit"
(→Base Value: A bit short on the new formula, but removed all the mentions of strength weighting.) |
m (→Other modifiers: random2 -> Ndx) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{version030}} |
'''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 ( | + | ==To-hit vs EV== |
− | The player's to-hit in melee is determined by the following factors: | + | The higher an attack's to-hit is compared to the opponent's [[evasion]], the more likely the attack is to land:<ref>{{source ref|0.30.0|attack.cc|1197}}</ref> |
+ | |||
+ | *2.5% of the time, the attack misses regardless of the attack's to-hit or the defender's EV. | ||
+ | *2.5% of the time, the attack hits regardless of the attack's to-hit or the defender's EV. | ||
+ | *Else, the game checks if <code>1d(to-hit + 1) - 1 ≥ 2d(2 * EV - 1)/2</code>. If this equation is true, then the attack hits. Otherwise the attack misses. | ||
+ | |||
+ | ==Player To Hit (Weapons)== | ||
+ | The player's to-hit in melee and ranged combat is determined by the following factors: | ||
====Base Value==== | ====Base Value==== | ||
− | + | *Start with <code>14 + dex/2 + 1d(Fighting + 1)</code>. | |
====Weapons==== | ====Weapons==== | ||
− | * | + | *Add <code>1d(weapon skill + 1) -1 </code> (number from 0 to weapon skill). |
− | + | *Add weapon base accuracy. (Unarmed has +2, or +4 with [[Claws]]) | |
− | * | + | *Add weapon [[enchant]]ment and any [[slaying]] bonuses. |
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ==== | + | ====Other modifiers==== |
− | * | + | *If in wisp, fungus, pig, or non-vampire bat form, add <code>[1d(XL * 100 + 100) / 100] - 1</code> instead of using your weapon skill above. |
+ | *Subtract 5 for [[vertigo]]. | ||
+ | *If you have the eyeballs mutation, add <code>2 * eyeballs_level + 1</code> | ||
− | ==== | + | ====The Roll==== |
− | * | + | *Take this total and roll <code>1d(total) - 1</code>. |
− | |||
− | ==== | + | ====Post Roll==== |
− | * | + | *Subtract 5 from wearing the [[Amulet of the Air]] or if you [[Ru#Sacrifices|Sacrificed Eye]] for Ru. |
− | + | *Subtract 5 if 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 under a [[halo]]). |
− | + | *Subtract 2 + roll between 0 and 3 if the target is in umbra and you do not have night vision (from Dithmenos & Yredelemnul). | |
− | + | *The [[Confusing Touch]] spell grants +0 to +(DEX-1). | |
− | [[ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * | ||
− | |||
**Being in the following forms grant bonuses: | **Being in the following forms grant bonuses: | ||
***[[Statue Form]]: 0 to +8 | ***[[Statue Form]]: 0 to +8 | ||
Line 63: | Line 48: | ||
***[[Tree Form]]: 0 to +9 | ***[[Tree Form]]: 0 to +9 | ||
***[[Wisp Form]]: 0 to +9 | ***[[Wisp Form]]: 0 to +9 | ||
− | |||
− | |||
− | |||
==Monster To Hit (Melee)== | ==Monster To Hit (Melee)== | ||
Line 74: | Line 56: | ||
===Hit Dice=== | ===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. | + | Monsters with the [[Fighter flag|Fighter class flag]] get a bonus of +(2.5 * [[HD]]). Other monsters get +(1.5 * HD). Decimals are rounded down. |
===Situational Modifiers=== | ===Situational Modifiers=== | ||
Line 86: | Line 68: | ||
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: | 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 are invisible and the attacker can't see invisible, the to hit number is halved. | ||
− | *If you | + | *If you have [[Repel Missiles]], the to hit number is reduced ''by'' a random number between 0 and 1/2 of its value (rounded down). |
− | + | ||
+ | ==References== | ||
+ | <references /> | ||
[[Category:Game_mechanics]] | [[Category:Game_mechanics]] |
Latest revision as of 12:47, 28 August 2024
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.
Contents
To-hit vs EV
The higher an attack's to-hit is compared to the opponent's evasion, the more likely the attack is to land:[1]
- 2.5% of the time, the attack misses regardless of the attack's to-hit or the defender's EV.
- 2.5% of the time, the attack hits regardless of the attack's to-hit or the defender's EV.
- Else, the game checks if
1d(to-hit + 1) - 1 ≥ 2d(2 * EV - 1)/2
. If this equation is true, then the attack hits. Otherwise the attack misses.
Player To Hit (Weapons)
The player's to-hit in melee and ranged combat is determined by the following factors:
Base Value
- Start with
14 + dex/2 + 1d(Fighting + 1)
.
Weapons
- Add
1d(weapon skill + 1) -1
(number from 0 to weapon skill). - Add weapon base accuracy. (Unarmed has +2, or +4 with Claws)
- Add weapon enchantment and any slaying bonuses.
Other modifiers
- If in wisp, fungus, pig, or non-vampire bat form, add
[1d(XL * 100 + 100) / 100] - 1
instead of using your weapon skill above. - Subtract 5 for vertigo.
- If you have the eyeballs mutation, add
2 * eyeballs_level + 1
The Roll
- Take this total and roll
1d(total) - 1
.
Post Roll
- Subtract 5 from wearing the Amulet of the Air or if you Sacrificed Eye for Ru.
- Subtract 5 if 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 under a halo).
- Subtract 2 + roll between 0 and 3 if the target is in umbra and you do not have night vision (from Dithmenos & Yredelemnul).
- The Confusing Touch spell grants +0 to +(DEX-1).
- Being in the following forms grant bonuses:
- Statue Form: 0 to +8
- Dragon Form: 0 to +9
- Lich form: 0 to +9
- Ice Form: 0 to +9
- Spider Form: 0 to +9
- Bat Form: 0 to +11
- Blade Hands: 0 to +11
- Fungus Form: 0 to +9
- Tree Form: 0 to +9
- Wisp Form: 0 to +9
- Being in the following forms grant bonuses:
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 Repel Missiles, the to hit number is reduced by a random number between 0 and 1/2 of its value (rounded down).
References
- ↑ attack.cc:1197 (0.30.0)