Penetration (PV): Difference between revisions

455 bytes added ,  17:00, 8 October 2019
copying some stuff from melee combat over here, and corrected that the base 4 pv isn't actually in the calculation
m (use PV template for symbol)
(copying some stuff from melee combat over here, and corrected that the base 4 pv isn't actually in the calculation)
Line 1: Line 1:
{{missing info| waiting for math extention to make this page look pretty. What is a critical hit's role in all of this?
{{missing info|What is a critical hit's role in all of this?
TODO: add probability calculation table for quick reference}}
TODO: add probability calculation table for quick reference}}
'''PV''' or '''Penetration Value''' or {{PV}} is a value assigned to all weapons and plays a key part in damage calculation during attacking.
'''PV''' or '''Penetration Value''' or {{PV}} is a value assigned to all weapons and plays a key part in damage calculation during attacking.
Line 5: Line 5:
==Melee Weapon PV Calculation==
==Melee Weapon PV Calculation==


Melee weapons have a base PV of 4. The PV will increase by the creature's [[Strength]] [[modifier]] with an upper limit dictated by the weapon's bonus cap. Two handed weapons and the [[Sharp]] mod also increase base PV by 1.
Melee weapons have a base PV of 4. The PV will increase by the creature's [[Strength]] [[modifier]] with an upper limit dictated by the weapon's bonus cap. Two handed weapons and the [[Sharp]] mod also increase base PV by 1. However, during penetration calculations, the base 4 PV is not calculated, making the 4 starting PV merely cosmetic. This means that a sword with 7 PV and a {{favilink|vibro blade}} (which PV matches AV) against a creature with 7 AV do not have the same PV value (in this case, the vibro blade has 4 more PV).


A critical hit(natural 10) is guaranteed one penetration.
A critical hit(natural 10) is guaranteed one penetration.
Line 23: Line 23:
Each roll is then compared to the target's AV.  If at least one roll is higher than the AV, the attack penetrates a single time.  Then, if all three rolls are higher than the AV, the whole process is repeated; this allows the attack to penetrate more than once.  However, each time this happens, the PV value is reduced by 2.
Each roll is then compared to the target's AV.  If at least one roll is higher than the AV, the attack penetrates a single time.  Then, if all three rolls are higher than the AV, the whole process is repeated; this allows the attack to penetrate more than once.  However, each time this happens, the PV value is reduced by 2.


The chance of <math alt="n">n</math> penetrations goes by the formula:
===Step by Step Process===
{{Qud text|&amp;GStep 1}} - Roll the attacker's PV value against the defender's AV value 3 times (let's call this a '''''triplet''''').
: {{Qud text|&amp;GStep 1a}} - Each individual roll within the triplet works as follows (let's call each roll a '''''singlet'''''):
:: {{Qud text|&amp;GStep 1a.i}} - Roll <code>1d10-2</code>. Each time that the maximum result of <code>8</code> is rolled, perform the <code>1d10-2</code> roll again and continue adding the results together.
:: {{Qud text|&amp;GStep 1a.ii}} - Add the attacker's PV value to the total roll calculated in {{Qud text|&amp;gStep 1a.i|unbolded}}.
:: {{Qud text|&amp;GStep 1a.iii}} - Note whether the total PV roll from {{Qud text|&amp;gStep 1a.ii|unbolded}} is greater than the target's AV.
: {{Qud text|&amp;GStep 1b}} - If at least one '''''singlet''''' roll was greater than the target's AV, the attack penetrates one time (or one ''more'' time if this is a subsequent triplet). If all three '''''singlet''''' rolls were greater than the target's AV, reduce the PV value by 2, return to {{Qud text|&amp;gStep 1|unbolded}}, and perform another '''''triplet''''' of rolls to determine if the attack penetrates an additional time. ''(Continue this loop, reducing PV by 2 each time, until at least one '''''singlet''''' fails to roll higher than the target's AV.)''


<math>3 \left ( 1-\frac{AV-(PV-2n)}{10}\right ) - 3 \left ( 1-\frac{AV-(PV-2n)}{10} \right ) ^2 + \left ( 1-\frac{AV-(PV-2n)}{10}\right ) ^3\times\left ( \frac{AV-(PV-2(n+1))}{10}\right ) ^3</math>
In summary, the attack penetrates once for each '''''triplet''''' of rolls where at least one '''''singlet''''' was higher than the target's AV. <ref><code>XRL.Rules.Stat.RollDamagePenetrations()</code></ref>


If PV = AV, the formula simplifies to
If all three rolls in the first '''''triplet''''' are equal to or lower than the target's AV, the attack fails to penetrate at all.
 
<math>3 \left ( 1-\frac{2n}{10}\right ) - 3 \left ( 1-\frac{2n}{10} \right ) ^2 + \left ( 1-\frac{2n}{10}\right ) ^3\times\left ( \frac{2(n+1)}{10}\right ) ^3</math>
 
The probability table would be
 
{|
! Penetrations
! Probability distribution
! Probability (cumulative)
|-
|0
|0.008
|0.008
|-
|1
|0.512768
|0.520768
|-
|2
|0.392527872
|0.913295872
|-
|3
|0.083250119
|0.996545991
|-
|4
|0.003454009
|1.000000000
|-
|5
|0
|1
|}
 
 
===Derivation===
 
<math>\frac{AV-(PV-2n)}{10}</math> is the probability that a single roll at <math alt="n">n</math> rounds of penetration fails.
 
If <math alt="A sub n">A_n</math>, <math alt="B sub N">B_n</math>, <math alt="C sub N">C_n</math>, are each the probability 1 successful roll at n rounds of penetration:
 
<math>\rightarrow A_n=B_n=C_n = 1-\frac{AV-(PV-2n)}{10}</math>
 
The probability of n penetrations becomes a sum of the chance that that 1 or 2 out of 3 rolls hit:
 
<math>(A_n \or B_n\or C_n) - \big( (A_n \and B_n) \or (B_n \and C_n) \or (A_n \and C_n) \big)</math>
 
OR the probability that all 3 rolls hit, but the second round of penetration fails to penetrate at all:
 
<math>(A_n \and B_n \and C_n) \and (\sim A_{n+1} \and \sim B_{n+1} \and \sim C_{n+1}) </math>


==References==
<references/>
[[Category:Battle Mechanics]]
[[Category:Battle Mechanics]]