Difference between revisions of "Weapon damage"

From CrawlWiki
Jump to: navigation, search
m (Damage formula)
Line 1: Line 1:
{{version029}}
+
{{version030}}
  
 
Weapon damage is your base weapon damage, multiplied by strength modifier, multiplied by weapon skill and fighting skill modifiers.  Slaying bonuses and weapon enchantment are added afterwards.  Actual damage components are randomly rolled in four places: 1d(Base * Strength modifier), Slaying bonus, Weapon skill modifier and Fighting modifier.
 
Weapon damage is your base weapon damage, multiplied by strength modifier, multiplied by weapon skill and fighting skill modifiers.  Slaying bonuses and weapon enchantment are added afterwards.  Actual damage components are randomly rolled in four places: 1d(Base * Strength modifier), Slaying bonus, Weapon skill modifier and Fighting modifier.
Line 8: Line 8:
  
 
As a shorthand <code>uniform(x) = 1d(x+1)-1</code> or a roll from 0 to x inclusive.
 
As a shorthand <code>uniform(x) = 1d(x+1)-1</code> or a roll from 0 to x inclusive.
 +
 
*'''Base damage''':
 
*'''Base damage''':
 
**Unarmed combat: 3 + UC skill (can be changed by some spells and the claws mutation, see [[Unarmed combat]])
 
**Unarmed combat: 3 + UC skill (can be changed by some spells and the claws mutation, see [[Unarmed combat]])
 
**Using a weapon: Base damage of the [[weapon]]
 
**Using a weapon: Base damage of the [[weapon]]
 
**Using a thrown weapon:<ref>No damage for darts, nets, or thrown melee weapons</ref> Base thrown missile damage + [[Throwing]] skill
 
**Using a thrown weapon:<ref>No damage for darts, nets, or thrown melee weapons</ref> Base thrown missile damage + [[Throwing]] skill
 +
**The [[heavy]] brand multiplies a weapon's base damage.
 
*'''Stat modifier''':<ref>{{source ref|0.29.0|fight.cc|1278}}</ref>
 
*'''Stat modifier''':<ref>{{source ref|0.29.0|fight.cc|1278}}</ref>
 
** <code>0.75 + (0.025 * [[Stats|Stat]])</code>, or a 2.5% boost per stat.
 
** <code>0.75 + (0.025 * [[Stats|Stat]])</code>, or a 2.5% boost per stat.
Line 38: Line 40:
  
 
==Notes==
 
==Notes==
*The main contributions to weapon damage are: base damage, weapon skill (Maximum of +108% at level 27) and fighting skill (Maximum of +67.5% at level 27).
+
*The main contributions to weapon damage are: base damage, weapon skill (avg. +54% at level 27) and fighting skill (+67.5% at level 27).
*Effect of weapon and fighting skills is random, with a linear distribution between 0 and the maximum.
+
 
*At very low skill levels, the value of 1 base damage and +1 enchantment are approximately the same. But as characters gain more skill and stats, only base damage gets multiplied, having a greater effect.
+
*At low skill values, 1 base damage roughly equals +1 slay. As you gain skill, only base damage is multiplied, resulting in a greater effect.
*In the weapon's inventory description the (Skill) bonus is the <code>Skill modifier * Fighting modifier</code> assuming an average roll for the <code>uniform()</code> function used in calculating these modifiers.
+
 
*Weapon [[brand]]s with multiplicative bonuses are applied after the damage formula, including AC reduction. The added damage then ignores AC, but can be affected by resistances and vulnerabilities.
+
*When weapon damage is viewed in the '''i'''nventory or the '''@''' command, the "Skill" bonus is <code>Skill mod * Fighting mod</code>, using the average of both rolls.
*Each term in the formula is calculated in sequence and is rounded down to an integer. This rounding is worse with a weapon with low base damage. For example, take a player with Dex = 12 and Short Blades skill = 12:  
+
 
** With no slaying bonuses, a +0 dagger with a base damage of 4 cannot do more than 5 damage. The same player wielding a +0 rapier with a base damage of 8 can do up to 13 damage. So, the stat and skill bonuses increase the dagger's damage by 25% and the rapier's damage by 62%. The dagger would deal up to 10 damage per 10 [[aut]], while the rapier would deal up to 20. For this player, a +5 dagger would be inferior to a +0 rapier (if not used for [[stab]]bing).
+
*Weapon [[brand]]s (except [[heavy]]) are applied at the end of the formula, after AC reduction. The added damage then ignores AC.
 +
:In other words, a weapon of [[flaming]] or [[freezing]] is not any better on an [[executioner's axe]] than it is on a [[quickblade]]. For example, if a +0 axe and +9 quickblade dealt the same damage, a +0 axe of flaming and +9 quickblade of flaming would also deal the same damage.
 +
 
 +
===Rounding===
 +
Each term in the formula is calculated in sequence and is rounded down to an integer. This rounding is worse with a weapon with low base damage. For example, take a player with Dex = 12 and Short Blades skill = 12:  
 +
 
 +
* With no slaying bonuses, a +0 dagger with a base damage of 4 cannot do more than 5 damage.  
 +
* The same player wielding a +0 rapier with a base damage of 8 can do up to 13 damage.  
 +
 
 +
So, the stat and skill bonuses increase the dagger's damage by 25% and the rapier's damage by 62%. The dagger would deal up to 10 damage per 10 [[aut]], while the rapier would deal up to 20. For this player, a +5 dagger would be inferior to a +0 rapier (if not used for [[stab]]bing).
  
 
==History==
 
==History==
*In [[0.29]], launcher, long blade, and short blade damage now scale with [[Dexterity]] rather than [[Strength]].
+
*In [[0.29]], launcher, long blade, and short blade damage now scale with [[dexterity]] instead of [[strength]].
 
*In [[0.27]], the strength modifier was simplified and made nonrandom.
 
*In [[0.27]], the strength modifier was simplified and made nonrandom.
 
*In [[0.13]] the effect of stats on melee was doubled.
 
*In [[0.13]] the effect of stats on melee was doubled.

Revision as of 06:15, 14 July 2023

Version 0.30: This article may not be up to date for the latest stable release of Crawl.

Weapon damage is your base weapon damage, multiplied by strength modifier, multiplied by weapon skill and fighting skill modifiers. Slaying bonuses and weapon enchantment are added afterwards. Actual damage components are randomly rolled in four places: 1d(Base * Strength modifier), Slaying bonus, Weapon skill modifier and Fighting modifier.

Damage formula

Damage = [uniform(Base damage * Stat modifier) * Skill modifier * Fighting modifier + Misc modifiers + uniform(Slaying bonuses)] * final multipliers + Stabbing bonus - AC damage reduction[1]

  • While final multipliers are applied after stabbing bonus, their bonus damage is technically added on top, in order to ignore stabbing attacks.

As a shorthand uniform(x) = 1d(x+1)-1 or a roll from 0 to x inclusive.

Notes

  • The main contributions to weapon damage are: base damage, weapon skill (avg. +54% at level 27) and fighting skill (+67.5% at level 27).
  • At low skill values, 1 base damage roughly equals +1 slay. As you gain skill, only base damage is multiplied, resulting in a greater effect.
  • When weapon damage is viewed in the inventory or the @ command, the "Skill" bonus is Skill mod * Fighting mod, using the average of both rolls.
  • Weapon brands (except heavy) are applied at the end of the formula, after AC reduction. The added damage then ignores AC.
In other words, a weapon of flaming or freezing is not any better on an executioner's axe than it is on a quickblade. For example, if a +0 axe and +9 quickblade dealt the same damage, a +0 axe of flaming and +9 quickblade of flaming would also deal the same damage.

Rounding

Each term in the formula is calculated in sequence and is rounded down to an integer. This rounding is worse with a weapon with low base damage. For example, take a player with Dex = 12 and Short Blades skill = 12:

  • With no slaying bonuses, a +0 dagger with a base damage of 4 cannot do more than 5 damage.
  • The same player wielding a +0 rapier with a base damage of 8 can do up to 13 damage.

So, the stat and skill bonuses increase the dagger's damage by 25% and the rapier's damage by 62%. The dagger would deal up to 10 damage per 10 aut, while the rapier would deal up to 20. For this player, a +5 dagger would be inferior to a +0 rapier (if not used for stabbing).

History

  • In 0.29, launcher, long blade, and short blade damage now scale with dexterity instead of strength.
  • In 0.27, the strength modifier was simplified and made nonrandom.
  • In 0.13 the effect of stats on melee was doubled.
  • Between 0.8 and 0.13, melee weapons of speed suffered a -10% penalty to damage.

References

  1. attack.cc:1184 (0.29.0)
  2. No damage for darts, nets, or thrown melee weapons
  3. fight.cc:1278 (0.29.0)
  4. melee-attack.cc:1430 (0.29.0)
  5. melee-attack.cc:1438 (0.29.0)
  6. melee-attack.cc:3425 (0.29.0)