.0046, 4 => .0185, 5 => .0462, 6 => .0925, 7 => .1620, 8 => .2592, 9 => .3750, 10 => .5000, 11 => .6250, 12 => .7407, 13 => .8379, 14 => .9074, 15 => .9537, 16 => .9814, 17 => .9953, 18 => .100); function roll($size) { return rand(1,$size); } function printGames ($start) { global $results; // rough error checking if ($start < 0 || $start > count($results) || $results[$start] == -1) { return; } echo " \n"; echo " ".$start."\n"; $value = $results[$start]*100; echo " ".round($value, 0)."%\n"; echo " \n"; return; } $minCrit = 4; $maxCrit = 6; $maxHit = 16; $a = $attack; $d = $defense; do { $critChance = $chance[max($minCrit, min($maxCrit, $a-10))]; $hitChance = $chance[min($maxHit, $a)] - $critChance; $defenseChance = $chance[min($maxHit, $d)]; $hit = $critChance + $hitChance*(1-$defenseChance); $results[$a] = $hit; $a -= 2; $d--; } while ($a >= 10); ?>

An Analysis of GURPS attacks

The analysis subtracts 2 from the attack and 1 from the defense and calculates hit probabilities, showing the optimal amount to use for deceptive attack. It properly includes crits based on effective skill.

Attack Roll Chance of Hit
Attack:
Defense: