Combat: Difference between revisions

1,553 bytes added ,  1 January 2022
Add Minimum hit section & update DR section
(→‎Max Hit: Simplify formulas)
(Add Minimum hit section & update DR section)
Line 8: Line 8:
{{PAGENAME}} involves fighting various [[monsters]] throughout the [[combat areas]], [[slayer areas]], and [[dungeons]] of Melvor. [[Food]] and [[Equipment]] cannot be changed while in a [[dungeon]] unless an [[Dungeon Equipment Swapping|upgrade]] has been purchased from the [[shop]].
{{PAGENAME}} involves fighting various [[monsters]] throughout the [[combat areas]], [[slayer areas]], and [[dungeons]] of Melvor. [[Food]] and [[Equipment]] cannot be changed while in a [[dungeon]] unless an [[Dungeon Equipment Swapping|upgrade]] has been purchased from the [[shop]].


Combat stats—viewable from the combat page—are affected by the player's combat skills and any [[Equipment]] worn. The combat skills are {{Skill|Attack}}, {{Skill|Strength}}, {{Skill|Defence}}, {{Skill|Hitpoints}}, {{Skill|Ranged}}, {{Skill|Magic}}, {{Skill|Prayer}}, and {{Skill|Slayer}}. These skills are factored in when calculating the player's combat level, which is an approximation of the player's power. Players start at combat level 3 and can reach a maximum of combat level 126, while [[monsters]] range from combat level [[Chicken (monster)|1]] to [[Bane, Instrument of Fear|1300]]. The player's combat level affects the difficulty of [[monsters]] given in [[Slayer]] Tasks.
Combat stats — viewable from the combat page — are affected by the player's combat skills and any [[Equipment]] worn. The combat skills are {{Skill|Attack}}, {{Skill|Strength}}, {{Skill|Defence}}, {{Skill|Hitpoints}}, {{Skill|Ranged}}, {{Skill|Magic}}, {{Skill|Prayer}}, and {{Skill|Slayer}}. These skills are factored in when calculating the player's combat level, which is an approximation of the player's power. Players start at combat level 3 and can reach a maximum of combat level 126, while [[monsters]] range from combat level [[Chicken (monster)|1]] to [[Bane, Instrument of Fear|1300]]. The player's combat level affects the difficulty of [[monsters]] given in [[Slayer]] Tasks.


== Combat Info ==
== Combat Info ==
Line 92: Line 92:


=== Stun (Freeze) ===
=== Stun (Freeze) ===
{{Main|Reference=Combat Debuff}}
Stun, also known as freeze, is a status effect that can be inflicted by both players and [[monsters]]. Stun can be applied for a number of turns by a [[Special Attacks|special attack]] or a normal attack by the player if the {{ItemIcon|Fighter Amulet}} is equipped. When an attack applies stun the current attack of the target is interrupted, including special attacks that are in progress. If the target is already stunned, it will not be applied again. When stunned, a stun timer counts down with a period equivalent to the target's attack speed. On completion of the timer the number of stun turns is decreased by one, and the status is removed if the resulting amount is zero. In addition to not being able to attack while stunned, a character cannot evade any attacks.
Stun, also known as freeze, is a status effect that can be inflicted by both players and [[monsters]]. Stun can be applied for a number of turns by a [[Special Attacks|special attack]] or a normal attack by the player if the {{ItemIcon|Fighter Amulet}} is equipped. When an attack applies stun the current attack of the target is interrupted, including special attacks that are in progress. If the target is already stunned, it will not be applied again. When stunned, a stun timer counts down with a period equivalent to the target's attack speed. On completion of the timer the number of stun turns is decreased by one, and the status is removed if the resulting amount is zero. In addition to not being able to attack while stunned, a character cannot evade any attacks.


Line 184: Line 185:


<math>\text{Max Hit} = \left \lfloor \text{Base Max Hit} \times \left ( 1 + \frac{\text{Percentage Max Hit Modifier}}{100} \right ) \right \rfloor + \text{Flat Max Hit Modifier}</math>
<math>\text{Max Hit} = \left \lfloor \text{Base Max Hit} \times \left ( 1 + \frac{\text{Percentage Max Hit Modifier}}{100} \right ) \right \rfloor + \text{Flat Max Hit Modifier}</math>
=== Minimum Hit ===
<!-- JS source: character.js, function computeMinHit
-->For [[Special Attacks]] the minimum hit varies depending on the attack. Otherwise, for normal attacks the base minimum hit starts at 1. To this base value, both modifiers for "+X% of Maximum Hit added to Minimum Hit" as well as increased flat minimum hit damage are applied. In addition, if a spell from the [[Magic#Standard Magic|standard spellbook]] is being used then element specific modifiers granting flat minimum hit damage for the same element as the spell being used are also included. The minimum hit is at least 1, and no more than the max hit.
The minimum hit calculation for normal attacks is therefore:
<math>\begin{aligned}\text{Min Hit} = \min(\max(&\left \lfloor 1 + \text{Max Hit} \times \text{Percentage Max Hit added to Min Hit Modifier} \right \rfloor \\
&+ \text{Flat Min Hit Modifier}, 1), \text{Max Hit})\end{aligned}</math>


===Calculating Damage Dealt===
===Calculating Damage Dealt===
Line 190: Line 199:


====Post-Roll Modifiers====
====Post-Roll Modifiers====
Some effects are applied after the damage roll is done. The main two are enemy Damage Reduction and [[Player Modifiers]] that affect damage to all monsters or to a subset of monsters such as Slayer Monsters or Boss Monsters. These modifiers can increase the player's damage beyond their listed maximum hit.
Some effects are applied after the damage roll is done. The main two are enemy Damage Reduction and [[Player Modifiers]] that affect damage to all monsters or to a subset of monsters such as Slayer Monsters or Boss Monsters. These modifiers can increase the player's damage beyond their listed maximum hit.


[[Magic#Ancient Magicks|Ancient Magick spells]] are not affected by post-roll modifiers aside from enemy Damage Reduction, although weapon special attacks that do a fixed amount of damage are.
[[Magic#Ancient Magicks|Ancient Magick spells]] are not affected by post-roll modifiers aside from enemy Damage Reduction, although weapon special attacks that do a fixed amount of damage are.


=== Damage Reduction ===
==== Damage Reduction ====
{{Main|Reference=Damage Reduction}}
Damage Reduction (often abbreviated as 'DR') is a stat that does exactly what it suggests: It reduces the amount of damage taken by a player or monster. Unlike other combat numbers that are complex calculations, a player's damage reduction is determined by simply adding together all damage reduction bonuses the player has, whether from equipment or something else like a {{ItemIcon|Damage Reduction Potion|img=Damage Reduction Potion IV}} or {{PetIcon|Defence}}.


Damage Reduction is a stat that does exactly what it suggests: It reduces the amount of damage taken by a player or monster. Unlike other combat numbers that are complex calculations, a player's Damage Reduction is determined by simply adding together all Damage Reduction bonuses the player has, whether from equipment or something else like a [[Damage Reduction Potion]] or {{PetIcon|Defence}}.
A number of monsters in the game have natural damage reduction. With the exception of boss monsters, whose damage reduction is always at least 20%, a monsters' damage reduction is determined by their combat level. Some monsters also have [[Special Attack#Monster Special Attacks|special attacks]] which temporarily grant additional damage reduction, such as Stone Wall used by {{MonsterIcon|Terran}}.
 
{| class="wikitable sortable"
As of v0.17.0, there are no monsters in the game with natural Damage Reduction. However, {{MonsterIcon|Earth Guard}}s and {{MonsterIcon|Terran}} in the {{ZoneIcon|type=Dungeon|Earth God Dungeon}} have special attacks that grant them temporary Damage Reduction.
|- class="headerRow-0"
! Combat Level !! DR
|-
| data-sort-value="0" | 0 - 99
| data-sort-value="0" style="text-align:right" | 0%
|-
| data-sort-value="100" | 100 - 200
| data-sort-value="5" style="text-align:right" | 5%
|-
| data-sort-value="201" | 201 - 300
| data-sort-value="10" style="text-align:right" | 10%
|-
| data-sort-value="301" | 301 - 400
| data-sort-value="15" style="text-align:right" | 15%
|-
| data-sort-value="401" | 401 - 500
| data-sort-value="20" style="text-align:right" | 20%
|-
| data-sort-value="501" | 501+
| data-sort-value="25" style="text-align:right" | 25%
|}


Whenever a player or monster with Damage Reduction greater than 0% would receive damage, instead the damage the damage they take is equal to:
Whenever a player or monster with Damage Reduction greater than 0% would receive damage, instead the damage the damage they take is equal to:


<math>\text{Damage Taken} = \text{Base Damage} * (1 - \text{Damage Reduction})</math>
<math>\text{Damage Taken} = \text{Base Damage} \times (1 - \text{Damage Reduction})</math>


Note that the [[Combat Triangle]] will affect how much damage reduction the player has if they are using a different style from the monster.
Note that the [[Combat Triangle]] will affect how much damage reduction the player has if they are using a different style from the monster.
==== Damage Per Hit, Average Hit, and Damage Per Second ====
If a player or monster successfully connects with an attack, the damage dealt will be a random integer value between their minimum and maximum hit. This random value is uniformly distributed, or in other words any value between and including the minimum and maximum hit is equally likely to be rolled.
Damage Reduction is applied after this initial damage per hit is calculated, which means it is possible for a player to deal less than their minimum hit against a monster that has Damage Reduction.
The player's average hit is thus:
<math>\text{Average Hit} = \frac{\text{Max Hit} + \text{Min Hit}}{2} \times (1 - \text{Enemy DR})</math>
And their damage per second can be calculated as:
<math>\text{DPS} = \frac{\text{Average Hit}}{\text{Attack Speed (Seconds)}} \times \text{Hit Chance}</math>


=== Evasion Rating ===
=== Evasion Rating ===
Line 237: Line 280:
<math> \small{\begin{aligned} \text{Magic Evasion Rating} = \big\{ &\text{Effective Magic Defence Level} * (\text{Magic Defence Bonus} + 64)\\
<math> \small{\begin{aligned} \text{Magic Evasion Rating} = \big\{ &\text{Effective Magic Defence Level} * (\text{Magic Defence Bonus} + 64)\\
&* (1 + \text{Potion Evasion Rating Bonus} / 100) * (1 + \text{Prayer Evasion Rating Bonus} / 100) \big\} \end{aligned}}</math>
&* (1 + \text{Potion Evasion Rating Bonus} / 100) * (1 + \text{Prayer Evasion Rating Bonus} / 100) \big\} \end{aligned}}</math>
=== Damage Per Hit, Average Hit, and Damage Per Second ===
If a player or monster successfully connects with an attack, the damage dealt will be a random value between their minimum and maximum hit. If no relevant equipment or [[Magic#Auroras|Auroras]] are active, the player's minimum hit is 1. The minimum hit is applied after all strength and damage bonuses are calculated, which means that only bonuses that directly impact minimum hit will affect minimum hit. (in other words, if a player's minimum hit is 40 and they have +10% damage, they still have a minimum hit of 40 rather than 44)
Damage Reduction is applied after this initial damage per hit is calculated, which means it is possible for a player to deal less than their minimum hit against a monster that has Damage Reduction.
The player's average hit is thus:
<math>\small{\begin{aligned} \text{Average Hit} = ((\text{Max Hit} + \text{Min Hit}) / 2) * (1 - \text{Enemy DR}) \end{aligned}}</math>
And their damage per second can be calculated as:
<math>\small{\begin{aligned} \text{DPS} = (\text{Average Hit} / \text{Attack Speed}) * \text{Hit Chance} \end{aligned}}</math>


{{Menu}}
{{Menu}}