Difference between revisions of "Weapon damage"

From CrawlWiki
Jump to: navigation, search
(add example. feel free to check my math.)
m (Notes: note that averages are used)
 
(42 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{version014}}
+
{{version030}}
  
Weapon damage is your base weapon damage, multiplied by weapon skill and fighting skill, and your strength bonus depending on the strength weighting of the weapon type.  Slaying bonuses and weapon enchantment are added afterwards.  Actual damage is randomly rolled, 1dWeaponDamage.
+
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 formula==
Damage = {[1d(Base damage * Stat modifier)-0.66] * Weapon skill modifier * Fighting modifier
+
<code> Damage = [uniform(Base damage * Stat modifier) * Skill modifier * Fighting modifier + Misc modifiers + uniform(Slaying bonuses)] * final multipliers + Stabbing bonus - AC damage reduction</code><ref>{{source ref|0.29.0|attack.cc|1184}}</ref>
          + Misc modifiers + Slaying bonuses}
+
*''While final multipliers are applied after stabbing bonus, the stabbing bonus doesn't benefit from these multipliers.''
          * Final multipliers + Stabbing bonus - AC damage reduction
+
 
 +
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 (can be changed by some spells, 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]]
*'''Stat modifier''':
+
**Using a thrown weapon:<ref>No damage for darts, nets, or thrown melee weapons</ref> Base thrown missile damage + [[Throwing]] skill
**Stat = STR + (dex_weight/10) * (DEX - STR)/2 (a number between STR and (STR+DEX)/2)
+
***Throwing [[stone]]s: Base damage + ([[Throwing]] skill/2)
**If Stat > 11: Multiply by 1 + 1d(Stat - 11)*2/39 (average bonus: +2.6% for every point above 11)
+
**The [[heavy]] brand multiplies a weapon's base damage.
**If Stat < 11: Multiply by 1 - 1d(9 - Stat)*3/39 (average bonus: -3.8% for every point below 9)
+
*'''Stat modifier''':<ref>{{source ref|0.29.0|fight.cc|1278}}</ref>
*'''Weapon skill modifier''': Multiply by 1 + (1dSkill)/25 (not applied to unarmed combat; average bonus: +2% for every skill level)
+
** <code>0.75 + (0.025 * [[Stats|Stat]])</code>, or a 2.5% boost per stat.
*'''Fighting modifier''': Multiply by 1 + (1dFighting)/30 (average bonus: +1.67% for every skill level in fighting)
+
** [[Short Blades]], [[Long Blades]], and [[Ranged Weapons]] use [[dexterity]]. Other weapons and Unarmed Combat use [[strength]].  
*'''Misc modifiers''':
+
** There is a minimum modifier of 0.01 (1%), at -30 stat.
**Might or Berserk: +1d10
+
*'''Skill modifier''':  
**If you are starving: -1d5 + 1 (bloodless vampires don't suffer this penalty)
+
** <code>1 + uniform(Weapon [[skill]])/25</code> (not applied to unarmed or throwing)
*'''Slaying bonuses''':  
+
** The other main advantage to raising a weapon/unarmed skill is decreasing your [[attack delay]].
**Effective enchantment = Weapon enchantment + Slaying bonus
+
*'''Fighting modifier''':
**If Eff. enchantment > 0: + 1d(1 + Eff. enchantment) - 1
+
** <code>1 + uniform([[Fighting]] skill)/30</code>
**If Eff. enchantment < 0: - 1d(1 - Eff. enchantment) + 1
+
*'''Misc modifiers''':<ref>{{source ref|0.29.0|melee-attack.cc|1430}}</ref>
*'''Final multipliers''':
+
** [[Status_effects#Might|Might]] or [[Status_effects#Berserk|Berserk]]: +1d10
**If it is an additional [[cleaving]] attack: Multiply by 0.75
+
*'''Slaying bonuses''':
 +
** Weapon [[scroll of enchant weapon|enchantment bonus]]
 +
** Added or subtracted from [[Slaying#Sources|sources of slaying]].
 +
*'''Final multipliers''':<ref>{{source ref|0.29.0|melee-attack.cc|1438}}</ref>
 +
**If it is an additional [[cleaving]] attack: Multiply by 0.7<ref>{{source ref|0.29.0|melee-attack.cc|3425}}</ref>
 
**[[Statue Form]]: Multiply by 1.5
 
**[[Statue Form]]: Multiply by 1.5
**If the player has the [[Weak]] [[status effect]]: Multiply by 0.75
+
**[[Shadow Form]]: Multiply by 0.5
 +
**The [[Weak]] [[status effect]]: Multiply by 0.75
 +
**Bonuses for [[Wu Jian]] martial attacks and [[Vhi's Electric Charge]]
 +
**[[Confusing Touch]]: Set to 0
 
*'''Stabbing bonus''': See [[stabbing]].
 
*'''Stabbing bonus''': See [[stabbing]].
 
*'''AC damage reduction''': See [[AC]].
 
*'''AC damage reduction''': See [[AC]].
  
Some considerations:
+
==Notes==
*The main contributions to weapon damage are: base damage, weapon skill (+54% at level 27) and fighting skill (+45% at level 27).
+
*The main contributions to weapon damage are: base damage, weapon skill (avg. +54% at level 27) and fighting skill (avg. +45% at level 27).
*As you can see, at very low skill levels, the value of base damage and enchantment is approximately the same, but for skilled characters base damage is much more important than enchantment.
 
*Weapon [[brand]]s that use multiplicative bonuses, calculate the additional amount of damage as a percentage of the damage described in this page (including AC damage reduction). This additional amount of damage ignores [[AC]], but it can be affected by resistances or vulnerabilities.
 
 
 
==Example==
 
 
 
Disregarding weapon speed, which is better, a +5 [[War axe]] or a mundane +0 [[battleaxe]]?
 
 
 
Assume our character has both a strength and dexterity of 15, an Axes skill of 10, and a Fighting skill of 10.
 
 
 
In our damage formula (see above), we will ignore AC reduction, stabbing bonus, potions of might, berserk, and other unusual factors. This reduces our formula to:
 
 
 
Damage = {[1d(Base damage * Stat modifier)-0.66] * Weapon skill modifier * Fighting modifier + Slaying bonuses}
 
         
 
For both axes the Stat modifier will be 1 + (1d4*(2/39)); the weapon skill modifier will be 1 + ((1d10)/25); and the fighting modifier will be 1 + ((1d10)/30). The base damage for a war axe is 11; the base damage for a battleaxe is 15. The slaying bonus for the +5 war axe is (1d6)-1 and for the battle axe is 0.
 
 
 
When we factor all of these in, we get these worst case scenarios (all rolls = 1) and best case scenarios (all rolls = maximum) (and values rounded to nearest whole integer):
 
  
+5 War Axe, worst case:
+
*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. 1 base damage = <code>1 + (average of Stat mod * Skill mod * Fight mod)</code> slaying.
{[1d(11 * (1+(1*(2/39))-0.66] * 1+1/25 * 1+1/30 + (1-1)} = {[1d11] * 1.04 * 1.033 + 0} = 1 to 12
 
+5 War Axe, best case:
 
{[1d(11 * (1+(4*(2/39))-0.66] * 1+10/25 * 1+10/30 + (6-1)} = {[1d13] * 1.4 * 1.33 + 5} = 7 to 29
 
  
+0 Battleaxe, worst case:
+
*When weapon damage is viewed in the ''''i''''nventory or with the '''@''' command, the "Skill" bonus is <code>Skill mod * Fighting mod</code>, using the average of both rolls.
{[1d(15 * (1+(1*(2/39))-0.66] * 1+1/25 * 1+1/30 + 0} = {[1d15] * 1.04 * 1.033 + 0} = 1 to 16
 
+0 Battleaxe, best case:
 
{[1d(15 * (1+(4*(2/39))-0.66] * 1+10/25 * 1+10/30 + 0)} = {[1d17] * 1.4 * 1.33 + 0} = 2 to 32
 
  
The +5 war axe can't match the maximum possible damage of the regular +0 battleaxe, but the +5 war axe is more likely to have reliable lower and mid-range damage. This is not likely to be helpful against high-AC creatures, since you need to overcome AC to do any damage. The +0 war axe may be slightly more useful against high-AC targets if it hits the 30+ damage rolls; against low AC targets the war axe may be more consistently damaging.
+
*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, the [[flaming]] or [[freezing]] brands aren't any better on an [[executioner's axe]] than on a [[quickblade]]. For example, if a +0 axe and +9 quickblade dealt the same damage per turn, a +0 axe of flaming and +9 quickblade of flaming would also deal the same damage per turn.
  
This example shows how large a difference the base damage of the weapon, plus the fighting and weapon skills, make on total damage. At very high levels (weapon & fighting = 20), the maximum damage output is a multiple of 3 (1.8*1.66). A +5 war axe would have a maximum of 44; the +0 battleaxe a maximum of 51. If the battleaxe has a damage-multiplying [[brand]] like flaming or frost, the larger total means more of that brand's 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:
  
For comparison, a +20 hand axe has a maximum possible damage of 44 under the same conditions.
+
* 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==
Between [[0.8]] and [[0.13]], melee weapons of [[speed (brand)|speed]] suffered a -10% penalty to damage.
+
*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.
 +
*Prior to [[0.18]], weapons used a mix of strength and dexterity, depending on the weapon itself.
 +
*Prior to [[0.13]], stats had half the effect on melee.
 +
*Between [[0.8]] and [[0.13]], melee weapons of [[speed (brand)|speed]] suffered a -10% penalty to damage.
  
In [[0.13]] the effect of stats on melee was doubled.
+
==References==
 +
<references/>
  
 
[[Category:Game mechanics]]
 
[[Category:Game mechanics]]
 
[[Category:Combat]]
 
[[Category:Combat]]

Latest revision as of 17:28, 3 March 2024

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, the stabbing bonus doesn't benefit from these multipliers.

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 (avg. +45% 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. 1 base damage = 1 + (average of Stat mod * Skill mod * Fight mod) slaying.
  • When weapon damage is viewed in the 'i'nventory or with 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, the flaming or freezing brands aren't any better on an executioner's axe than on a quickblade. For example, if a +0 axe and +9 quickblade dealt the same damage per turn, a +0 axe of flaming and +9 quickblade of flaming would also deal the same damage per turn.

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.
  • Prior to 0.18, weapons used a mix of strength and dexterity, depending on the weapon itself.
  • Prior to 0.13, stats had half the effect on melee.
  • 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)