Melee combat

From Caves of Qud Wiki
Revision as of 06:10, 1 September 2019 by Egocarib (talk | contribs)
Jump to navigation Jump to search

Melee combat is a common form of fighting in Caves of Qud. Players and other creatures can attack one another with fists, weapons, items, or other natural weapons. Almost any item in the entire game can be wielded by a creature and used for melee fighting. Items that aren't specifically designed to be used as weapons use the Cudgel skill, have a default PV of 4, and a default damage of ♥1d2.

Overview

Combat attributes

The primary attributes that affect melee combat are agility and strength.

  • Agility affects one's accuracy, increasing the to-hit chance of striking an opponent.
  • Agility also affects one's DV, or dodge value, making it easier to avoid being hit.
  • Strength affects one's PV, or ability to penetrate the defenses of a hit opponent, causing more damage.

Offensive combat stats

Accuracy Accuracy is not a stat that appears on the character's stat sheet, but it is important to combat calculations. Accuracy equals 1d20 plus the character's agility modifier and any special to-hit bonuses on the weapon. (The amber-tipped staff is an example of a weapon with a to-hit bonus.)
PV
(penetration value)
A weapon's penetration value is displayed after the weapon name as an arrow ( ) followed by a number.
Damage A weapon's damage is displayed after the weapon name as a heart ( ♥) followed by a number or dice roll string.

Defensive combat stats

DV
(dodge value)
A character's dodge value affects how easy that character is to hit in combat, and serves as a first line of defense in melee fighting. Attacks are more likely to miss a character with a high dodge value.
AV
(armor value)
A character's armor value affects how damage is calculated after the character is hit. Hits will do less damage against a character with a high armor value, or may not do any damage at all if the attacker fails to penetrate the character's armor.
Resistances Resistances provide a percentage reduction to their corresponding damage types. For example, a character with 30% cold resistance will take 30% less damage from the cold effect of a rimewyk's bite.

Melee Attack Calculations

Number of Attacks

This article has information that is missing or not up to par.
Reason: Add some info about how the game determines the number of attacks you'll make (i.e. % chance for offhand weapons, etc.) All of the relevant info is already described in the Dual Wield, Multiple Arms, and Helping hands articles. It just should be summarized here.

Hit Roll

The game begins processing an individual weapon attack by making a simple hit roll to determine if the attack hits the target:

If the attacker's hit roll is higher than the opponent's DV, the attack hits.

At this point, all on-hit effects are applied to the target. Unlike physical damage from the melee attack, on-hit effects do not need to penetrate to be applied, they simply require the Hit Roll to succeed. On-hit effects include just about anything besides direct weapon damage, such as:

  • Elemental damage from the weapon or its mods.
  • Status effects, such as bleeding or poison.
  • Physical effects, such as disarm, trip, or forced movement.
  • Special effects, such as the those caused by memory eaters, qudzu, stun rods, gamma moths, thirst thistles, and many other creatures and items.

Guaranteed Hits

Certain scenarios result in guaranteed or near-guaranteed successful hit rolls against a target:

  • If the target is Stuck or Overburdened, the target's DV is automatically reduced to -10, which can effectively guarantee success with all attack hit rolls against them.
  • Targets affected by the attacker's Hook and Drag are automatically hit by the attacker when the attacker moves.
  • If the attacker has latched on to the target (an effect unique to madpoles and leather whips), the attacker is guaranteed to hit the target.

Penetration and Damage

After an attack is determined to have hit the target, penetration rolls are made to calculate the damage.

To begin, the game calculates the defender's armor value (AV) and the attacker's penetration value (PV).

AV Calculation

AV is calculated by adding together all of the following values. Your AV value (not including additional AV from shield block) can also be seen in-game on the sidebar or overlay bar.

  • The AV value of all of the character's equipped armor (not counting shields).
  • Additional AV from sources such as the Calloused skill or the density effect.
  • The AV value of one equipped shield if the attack is determined to be blocked by that shield.

PV Calculation

Penetration is calculated by adding together all of the following values.

  • Base penetration bonus.
    • For non-vibro weapons, the base penetration bonus is equal to the weapon penetration value shown on the equipment screen in-game, minus 4. For example, if the weapon shows 7, your base penetration bonus is 3. Typically this bonus is the same as your strength modifier (or your strength modifier + 1 for two-handed weapons), but it can be capped to a lower value depending on the weapon.
    • For vibro weapons, the base penetration bonus is always equal to the defender's AV.
  • +1 bonus penetration if the weapon has the Sharp modification.
  • +4 bonus penetration if the enemy is asleep.
  • +1 bonus penetration to swarmer attackers for each additional swarmer enemy that surrounds their opponent.
  • Additional bonus penetration from the Charge, Lunge, Long Blade Proficiency, Improved Aggressive Stance, Shank, or Slam skills.

Penetration Rolls

The penetration rolls are now processed using the AV and PV values that were calculated in the previous two sections. Penetration rolls are the most complex and peculiar part of combat calculations. Penetration rolls determine the total amount of physical damage caused by the melee weapon.

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

Damage Rolls

Melee physical damage is calculated by rolling the weapon damage times the total number of penetrations.

For example, if an attacker penetrates two times with a steel mace (4 ♥2d2), the total damage is 2d2+2d2

If the weapon did not penetrate at least once, no damage is applied, and a message appears in the message log.

The salamander doesn't penetrate your armor with his bite 2 ♥1d3! [6]

Example Attack Calculation

This article has information that is missing or not up to par.
Reason: It might be helpful to add an example here.

Critical Hits

If the initial 1d20 roll that is part of the attacker's Hit Roll is a natural 20 (or if the weapon has the Masterwork mod and the Hit Roll is a natural 19 or 20), the attack is considered a critical hit. Critical hits have the following special qualities:

  • A critical hit always hits the target, even if the total Hit Roll is not greater than the target's DV.
    • This ensures that any attacker always has at least a 5% of hitting the opponent and applying on-hit effects.
  • A critical hit performed specifically by the player (not any other creature) is guaranteed to penetrate at least one time and apply its damage, even if the penetration roll fails.

Psionic Weapons

Psionic weapons have the same to-hit calculation as normal weapons. However, their penetration mechanics differ in the following ways:

  • The attacker's penetration bonus is affected by the attacker's ego modifier instead of the attacker's strength modifier.
  • The attack penetration is rolled against the defender's mental armor (MA) instead of the defender's armor value (AV).
    • The one exception is AV provided by a shield. If the psionic attack is shield blocked, the shield's AV is added to the defender's MA for the purposes of calculating penetration defense.
  1. XRL.Rules.Stat.RollDamagePenetrations()