Melee combat

From Caves of Qud Wiki
Jump to navigation Jump to search
This information is reliable as of patch 2.0.201.49. If this is no longer the current patch, you can help by updating it.
As of Patch This information is reliable as of patch 2.0.201.49.

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

By base, the primary hand and weapons wielded at least in part with them is the attack that is guaranteed to be made by a creature when bump-attacking; the offhand has only a 15% chance to make an attack by base.

The Dual Wield tree increases the chance of offhand attacks made with the regular offhand only (and certain additional offhand slots that exclude mutated limbs and robotic arms - see Offhand). Flurry, however, makes use of all available weapons wielded in any slot (Stingers being an exception due to technically not being true weapons).

Stingers have a 20% chance of hitting whenever a regular melee attack is made; however, other limbs will never hit when the "Sting" action the mutations grant is used.

Helping hands and weapons wielded in them have a static 8% to attack, which is not modified by the Dual Wield tree.

Jab doubles the chance of offhand attacks made with short blades, except when the short blade is wielded by helping hands.

Attacks made with weapons wielded in Multiple Arms slots (or made with the bare hands provided by it) are unaffected by Dual Wield: their base chance for attacking is determined solely by the mutation level; they are however affected by Jab and wielding a two-handed weapon so the weapon is held with one hand from Multiple Arms and one regular off hand will result in Dual Wield's chance being used (and if one hand is from Multiple Arms and the other is the primary hand, the chance of attacking with the weapon will be 100%).

Horns have a 20% chance to attack when bump-attacking, boosted to 100% when using Charge, and are eligible for Jab.

A Bilge Sphincter has a static 15% chance to attack.

If an offhand weapon should ever have over a 100% chance to attack, it is guaranteed to attack once for each 100% and may also make an additional attack based on how much is left over. For instance, a character with Offhand Strikes, Ambidexterity, and Jab who is offhand wielding a short blade will have a 110% chance to attack with it. This guarantees one attack, and there is an additional 10% chance to immediately attack again.[1] This bonus does not apply to primary weapons, which always attack exactly once.

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.

While less common, there are also on-penetration effects. These do not occur on a successful hit, but instead also require a successful penetration. An example is the stat-draining effect of a life sap or stat sap.

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 penetrates once for each triplet of rolls where at least one singlet was higher than the target's AV. [2]

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.

If the attacker's Strength bonus is capped by their weapon, Step 1b becomes slightly different: instead of PV, it's the Strength bonus that is temporarily reduced by 2, and PV is only reduced if the bonus is now below the weapon's cap. This means that very high Strength can have a limited positive effect on penetration rolls even if the weapon doesn't support it.

Damage Rolls

Melee physical damage is calculated by rolling the weapon damage for each penetration and summing the result.

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

The creature being attacked is a snapjaw warlord with ♦2 AV and ○9 DV. Our attacker is a salamander with 14 (-1) strength, 18 (+1) agility and its bite, a ♥1d3 axe with no strength cap and no base penetration, as its only weapon; this bite, due to the strength modifier of the salamander, has a PV of -1. The salamander rolls a 15 for its bite’s hit roll, and the hit roll gets a +1 bonus from the salamander’s agility modifier; 16 is higher than the snapjaw’s 9 DV, so the attack hits.

  • Now the first triplet of penetration rolls occurs:
    • The first singlet within the triplet rolls 6 out of 10, which becomes 4 after the -2 is applied, and 3 after the -1 PV from the bite is applied; 3 is higher than the 2 AV the snapjaw has.
    • The next singlet rolls 10, which becomes 8 after the -2, prompting another roll, which is 6 and which after the -2 becomes 4, so the total is 12, and 11 after the -1 PV, which is more than the 2 AV.
    • The final singlet in the triplet rolls 7, which becomes 5 due to the -2 and 4 due to the -1 PV, which is more than the 2 AV.
    • All three singlets in the triplet exceeded the target’s AV, thus the attack penetrates at least once, and a new triplet is rolled with the -1 PV decreased to -3.
  • The second triplet occurs as follows:
    • The first singlet rolls 7, which becomes 5 due to the -2 and 2 due to the -3 PV, which is not more than the 2 AV of the target.
    • The second singlet rolls 9, which becomes 7 due to the -2 and 4 due to the -3 PV, which is more than the 2 AV of the target.
    • The final singlet rolls 4, which becomes 2 due to the -2 and -1 due to the -3 PV, which is not more than the 2 AV of the target.
    • Thus the attack penetrates an additional time, but not more.

As such, the attack penetrates twice, and the 1d3 of the bite is rolled twice; a 2 and a 3 are rolled, so the attack deals 2+3=5 damage.

Critical Hits

Main article: Critical hit

If the initial 1d201-20 (Avg: 10.5) 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.
  • The cap on strength's bonus to penetration is increased by 1 for this attack.
  • Additional special effects occur based on the weapon type (for more information, refer to the critical hit page).
  • 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.

References

  1. XRL.World.Parts.Combat, method FireEvent, in the "PerformMeleeAttack" case
  2. XRL.Rules.Stat.RollDamagePenetrations()