Hit Chance: Difference between revisions

From A KoL Wiki
imported>'Ivan
Adding note about Moxious Maneuver.
imported>DirkDiggler
Results of combat mechanics project
Line 11: Line 11:
===Hit Chance Formula===
===Hit Chance Formula===


 
The exact hit rate mechanic is not linear, but this is a useful approximation suitable for almost all gameplay purposes:
{| border="0" cellpadding="3" cellspacing="0" style="text-align:center"
{| border="0" cellpadding="3" cellspacing="0" style="text-align:center"
|rowspan="2"|Hit % =  
|rowspan="2"|Hit % =  
|style="border-bottom:1px solid black;"|9 + Attack - Defense
|style="border-bottom:1px solid black;"|6 + Attack - Defense
|rowspan="2"|* (100 - Fumble%)
|rowspan="2"|* (100 - Fumble%)
|-
|-
|18
|10.5
|}
|}


For example: your Seal Clubber has 154 Muscle, lacks [[Eye of the Stoat]], and is fighting something with 150 Defense.
For example: your Seal Clubber has 153 Muscle, lacks [[Eye of the Stoat]], and is fighting something with 150 Defense.


{| border="0" cellpadding="3" cellspacing="0" style="text-align:center"
{| border="0" cellpadding="3" cellspacing="0" style="text-align:center"
|rowspan="2"|Hit % =  
|rowspan="2"|Hit % =  
|style="border-bottom:1px solid black;"|9 + 154 - 150
|style="border-bottom:1px solid black;"|6 + 153 - 150
|rowspan="2"|* (100 - 4.545) = 68.939...%
|rowspan="2"|* (100 - 4.545) = 81.8%
|-
|-
|18
|10.5
|}
|}


In other words: of the times you do not [[Fumble Chance|fumble]], when your Attack equals your target's Defense there is a 1/2, or 50%, chance to hit. For every additional point of Attack you have, add 1/18, or 5.56%, to your non-fumble chances to hit. For every additional point of Defense your target has, subtract 1/18, or 5.56%, from your non-fumble chances to hit. Thus, having 9 more Attack than your opponent's Defense will ensure 100% accuracy (barring fumbles), and having 9 more Defense than your opponent's Attack ensures a 100% dodge rate (barring monster criticals).
In other words: of the times you do not [[Fumble Chance|fumble]], when your Attack equals your target's Defense there is a slightly better than 1/2, or 57%, chance to hit. For every additional point of Attack you have, add 1/10.5, or 9.5%, to your non-fumble chances to hit. For every additional point of Defense your target has, subtract 1/10.5, or 9.5%, from your non-fumble chances to hit. Below -6 Attack (relative to monster defense) you will always miss; above +5 Attack (relative to monster defense) you will always hit. At exactly -6 and +5 there is a small but non-zero chance of missing/hitting.  This includes monster level variation.  


Some fraction of all attack attempts will be [[Critical Hit Chance|critical hit]]s, and the rest of the hits will be normal.  Given a fumble rate of <var>fumbrate</var> and a critical rate of <var>critrate</var>, the final outcomes are:
Some fraction of all attack attempts will be [[Critical Hit Chance|critical hit]]s, and the rest of the hits will be normal.  Given a fumble rate of <var>fumbrate</var> and a critical rate of <var>critrate</var>, the final outcomes are:
<table>
<table>
  <tr>
    <td>baserate</td>
    <td>=</td>
    <td>((6+attack-defense)/10.5), minimum 0 maximum 1</td>
  </tr>
   <tr>
   <tr>
     <td>fumble chance</td>
     <td>fumble chance</td>
Line 42: Line 47:
     <td>normal hit</td>
     <td>normal hit</td>
     <td>=</td>
     <td>=</td>
     <td>((9+attack-defense)/18)*(1-fumbrate)*(1-critrate)</td>
     <td>(1-fumbrate)*(baserate-critrate)</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>critical hit</td>
     <td>critical hit</td>
     <td>=</td>
     <td>=</td>
     <td>((9+attack-defense)/18)*(1-fumbrate) or (critrate), whichever  
     <td>(baserate) or (critrate), whichever  
     is lesser</td>
     is lesser</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>miss</td>
     <td>miss</td>
     <td>= 1 -</td>
     <td>=</td>
     <td>((9+attack-defense)/18)*(1-fumbrate)</td>
     <td>(1-fumbrate)*(1-baserate)</td>
   </tr>
   </tr>
</table>
</table>


==Monster Hit Chance==
==Monster Hit Chance==
Monster hit chances are given by [http://forums.hardcoreoxygenation.com/viewtopic.php?p=38823#38823]
Monster hit chances are not exactly linear, but here is a useful approximate formula suitable for almost all gameplay purposes:[http://forums.hardcoreoxygenation.com/viewtopic.php?p=39149#39149]
* Hit&nbsp;&nbsp;&nbsp;%&nbsp;  = 87.5% * (6 + (Atk-Mox))/12 (minimum 0%, max 87.5%)
* Base&nbsp;% = (6.5 + (Atk-Mox))/12,      &nbsp;&nbsp;&nbsp;&nbsp;(minimum 0, maximum 1)
* Miss&nbsp;% = 87.5% * (6 - (Atk-Mox))/12 (minimum 0%, max 87.5%)
* Crit&nbsp;&nbsp;&nbsp;% = 6  % flat
* Crit&nbsp;&nbsp;% = 6 % flat
* Fumb% = 6  % flat
* Fumb% = 6.5% flat
* Hit&nbsp;&nbsp;&nbsp;&nbsp;% = &nbsp;&nbsp;&nbsp;(base%)&nbsp;(1 - (crit% + fumb%))  &nbsp;&nbsp;&nbsp;&nbsp;(minimum 0%, max 88%)
* Miss&nbsp;&nbsp;% = (1-base%) (1 - (crit% + fumb%)) &nbsp;&nbsp;&nbsp;&nbsp;(minimum 0%, max 88%)
 
Below -6 moxie (relative to monster level) you will always be hit; above +7 moxie (relative to monster level) you will always dodge. (At exactly 6 below or 7 above there is a tiny chance you will dodge/hit: see graphs, below).  Apart from the funny flavor text, a monster fumble is no different than an ordinary miss and a monster critical is no different than an ordinary hit.


Apart from the funny flavor text, a monster fumble is no different than an ordinary miss and a monster critical is no different than an ordinary hit.
==Probable Mechanic==
*The way this probably works is as follows.  To see if monster hits:
:*find the monster's Awesomeness, defined as Attack-Moxie.
:*determine critical hit or critical miss with 6% probability.  If neither occurs,
:*roll two eight-sided dice; add the first and subtract the other.
:*If the result is 0 or negative, the monster misses; if the result is +1 or more the monster hits.
*For math geeks: by "8-sided die" we mean "computer-generated uniform pseudorandom variate from 1 to 8".  The resulting curve is not linear but rather the [[wikipedia:Triangular_distribution|CDF of a triangular distribution]], though the linear formulas given above are a decent approximation.
*Character hit rate is determined in a similar manner except that there may be more or fewer dice rolls -- until we understand monster level variation it will be hard to give an exact picture of how this is determined.
*For the original spading and graphs showing Hit Rate vs. Awesomeness, see [http://forums.hardcoreoxygenation.com/viewtopic.php?t=2945 this HCO forum thread].


==Notes==  
==Notes==  
The monster hit chance mechanic was quietly changed when monster criticals/fumbles were introduced.
The hit rate mechanics were quietly changed at some point, probably when monster criticals/fumbles were introduced.


==See Also==
==See Also==

Revision as of 23:32, 22 February 2007

[ Return to Game Mechanics ]

The first, most important, step towards rifling through the pockets of a corpse is creating a corpse with pockets to be rifled. To achieve this lofty goal, one must first hit one's opponent. Your chances to hit a given foe are determined by comparing your Attack to your opponent's Defense; the difference determines your chances to hit.

Your Attack is the buffed stat with which you are attacking: Muscle for melee weapons, Moxie for ranged weapons, and Mysticality if you're wielding a staff and have either Spirit of Rigatoni or special sauce glove.

If you use Moxious Maneuver, your Attack is your buffed Moxie regardless of your weapon.

Your Defense is equal to your Moxie. Monsters skip all of the Muscle/Mysticality/Moxie nonsense and have straight Attack and Defense stats.

Hit Chance Formula

The exact hit rate mechanic is not linear, but this is a useful approximation suitable for almost all gameplay purposes:

Hit % = 6 + Attack - Defense * (100 - Fumble%)
10.5

For example: your Seal Clubber has 153 Muscle, lacks Eye of the Stoat, and is fighting something with 150 Defense.

Hit % = 6 + 153 - 150 * (100 - 4.545) = 81.8%
10.5

In other words: of the times you do not fumble, when your Attack equals your target's Defense there is a slightly better than 1/2, or 57%, chance to hit. For every additional point of Attack you have, add 1/10.5, or 9.5%, to your non-fumble chances to hit. For every additional point of Defense your target has, subtract 1/10.5, or 9.5%, from your non-fumble chances to hit. Below -6 Attack (relative to monster defense) you will always miss; above +5 Attack (relative to monster defense) you will always hit. At exactly -6 and +5 there is a small but non-zero chance of missing/hitting. This includes monster level variation.

Some fraction of all attack attempts will be critical hits, and the rest of the hits will be normal. Given a fumble rate of fumbrate and a critical rate of critrate, the final outcomes are:

baserate = ((6+attack-defense)/10.5), minimum 0 maximum 1
fumble chance = fumbrate
normal hit = (1-fumbrate)*(baserate-critrate)
critical hit = (baserate) or (critrate), whichever is lesser
miss = (1-fumbrate)*(1-baserate)

Monster Hit Chance

Monster hit chances are not exactly linear, but here is a useful approximate formula suitable for almost all gameplay purposes:[1]

  • Base % = (6.5 + (Atk-Mox))/12,     (minimum 0, maximum 1)
  • Crit   % = 6  % flat
  • Fumb% = 6  % flat
  • Hit    % =    (base%) (1 - (crit% + fumb%))     (minimum 0%, max 88%)
  • Miss  % = (1-base%) (1 - (crit% + fumb%))     (minimum 0%, max 88%)

Below -6 moxie (relative to monster level) you will always be hit; above +7 moxie (relative to monster level) you will always dodge. (At exactly 6 below or 7 above there is a tiny chance you will dodge/hit: see graphs, below). Apart from the funny flavor text, a monster fumble is no different than an ordinary miss and a monster critical is no different than an ordinary hit.

Probable Mechanic

  • The way this probably works is as follows. To see if monster hits:
  • find the monster's Awesomeness, defined as Attack-Moxie.
  • determine critical hit or critical miss with 6% probability. If neither occurs,
  • roll two eight-sided dice; add the first and subtract the other.
  • If the result is 0 or negative, the monster misses; if the result is +1 or more the monster hits.
  • For math geeks: by "8-sided die" we mean "computer-generated uniform pseudorandom variate from 1 to 8". The resulting curve is not linear but rather the CDF of a triangular distribution, though the linear formulas given above are a decent approximation.
  • Character hit rate is determined in a similar manner except that there may be more or fewer dice rolls -- until we understand monster level variation it will be hard to give an exact picture of how this is determined.
  • For the original spading and graphs showing Hit Rate vs. Awesomeness, see this HCO forum thread.

Notes

The hit rate mechanics were quietly changed at some point, probably when monster criticals/fumbles were introduced.

See Also