Missile weapon combat

From Caves of Qud Wiki
Revision as of 01:49, 15 July 2020 by Teamtoto (talk | contribs) (→‎Missile Weapon Accuracy: can't be negative)
Jump to navigation Jump to search
This article may need cleanup to meet quality standards.
Please help improve this page by editing it.
This article may need cleanup to meet quality standards.
Please help improve this page by editing it.

Missile Weapon Accuracy

Missile weapons calculate accuracy in a different way that melee combat. Because of the distance, there are multiple factors that play into how accurate a shot will be.

The abstracted formula for accuracy is:

Where accuracy variance is the vector in degrees affecting the original trajectory. This means that the farther the projectile travels, the more this variance will affect its path. This formula cannot go below 0. If the answer is negative, it will become 0.

Weapon Variance

Weapon variance is the accuracy attribute on all missile weapons. Counterintuitively, the numeric representation of accuracy has a greater number represent lower accuracy, where 0 accuracy means that it is a perfect shot. For easier calculation, each missile weapon on this wiki also includes the numeric accuracy.

Accuracy Numeric Version
Very High 0
High 1 to 4
Medium 5 to 9
Low 10 to 24
Very Low ≥25

Flat Variance

The bonus in this formula is a sum of different flags that depending on the attacker, weapon, and target effects:

If: Bonus
Steady Hands/Steady Hand with the respective weapon type +2
Target is marked +1
Weapon is Scoped +4
Stabilizer arm locks +3

If 2d202-40 (Avg: 21) ended up above 25 (7.5%), the accuracy is subtracted instead.

Aim Variance

Aim variance is the flat variance added to the distance traveled.

aim variance = flat variance + distance + Bonus + [weapon accuracy, -weapon accuracy]

If: Bonus
Attacker is Sprinting and does not have Sling and Run (works with any missile weapon) +(-23 to 23)
Attacker is flanked (surrounded by 2+ hostile creatures) +(-23 to 23)

Projectile Hit

When the projectile actually hits the target, regular damage calculations occur. However, there is a -5 DV penalty. If the target has Swift Reflexes, the penalty will not be inflicted. If the creature is immobile, the DV is set to a flat -100.

References

Unless specified, all information comes from XRL.World.Parts.MissileWeapon::CalculateBulletTrajectory()