Penetration (PV): Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
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]]

Revision as of 17:00, 8 October 2019

This article has information that is missing or not up to par.
Reason: What is a critical hit's role in all of this? TODO: add probability calculation table for quick reference

PV or Penetration Value or is a value assigned to all weapons and plays a key part in damage calculation during attacking.

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. 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 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.

Ranged Weapon PV Calculation

This article has information that is missing or not up to par.
Reason: is this the same for grenade launchers, thrown weapons, or bows?

Ranged weapon PV is determined by the PV of the gun itself. The PV of the bullet does not matter.

Critical hits on ranged weapons add a flat +4 PV to the shot.

Penetration Formula

This article has information that is missing or not up to par.
Reason: This formula is close the actual formula, but isn't quite correct. Until this page gets updated, see the Melee combat article for a more accurate description of how PV rolls work.

To check how many times an attack penetrates, the game rolls the following value three times:

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.

Step by Step Process

Step 1 - Roll the attacker's PV value against the defender's AV value 3 times (let's call this a triplet).

Step 1a - Each individual roll within the triplet works as follows (let's call each roll a singlet):
Step 1a.i - Roll 1d10-2. Each time that the maximum result of 8 is rolled, perform the 1d10-2 roll again and continue adding the results together.
Step 1a.ii - Add the attacker's PV value to the total roll calculated in Step 1a.i.
Step 1a.iii - Note whether the total PV roll from Step 1a.ii is greater than the target's AV.
Step 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 Step 1, 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.)

In summary, the attack penetrates once for each triplet of rolls where at least one singlet was higher than the target's AV. [1]

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.

References

  1. XRL.Rules.Stat.RollDamagePenetrations()