Combat: Difference between revisions

152 bytes removed ,  28 December 2021
Update Combat Level & Accuracy Rating sections, the rest is a WIP
(Updated highest combat level monster)
(Update Combat Level & Accuracy Rating sections, the rest is a WIP)
Line 53: Line 53:
No additional {{Skill|Magic}} experience is directly generated for using [[Magic#Curses|Curses]] or [[Magic#Auroras|Auroras]], although they may indirectly generate additional experience by increasing the amount of damage the player deals.
No additional {{Skill|Magic}} experience is directly generated for using [[Magic#Curses|Curses]] or [[Magic#Auroras|Auroras]], although they may indirectly generate additional experience by increasing the amount of damage the player deals.


Players gain 0.2 {{Skill|Prayer}} experience per damage dealt per prayer point spent on prayers that affected the attack. For example, if {{PrayerIcon|Piety}} (7 prayer point cost) is active, each attack made will generate 1.4 extra experience per damage dealt. Only prayers such as {{PrayerIcon|Thick Skin}} that say 'Provides extra Prayer XP based on damage dealt to the enemy' in their description will generate experience this way - Prayers such as {{PrayerIcon|Protect from Magic}} that say 'Provides no extra Prayer XP' will not contribute towards this experience bonus.
Players gain <math>\frac{1}{30}</math> or <math>0.0\bar{3}</math> {{Skill|Prayer}} experience per damage dealt per prayer point spent on prayers that affected the attack. For example, if {{PrayerIcon|Steel Skin}} (3 prayer point cost) is active, each attack made will generate 0.1 extra experience per damage dealt. Only prayers such as {{PrayerIcon|Thick Skin}} that say 'Provides extra Prayer XP based on damage dealt to the enemy' in their description will generate experience this way - Prayers such as {{PrayerIcon|Protect from Magic}} that say 'Provides no extra Prayer XP' will not contribute towards this experience bonus.


All of the above experience will be multiplied by 1.04 while a {{ItemIcon|Gold Emerald Ring}} is equipped.
All of the above experience will be multiplied by 1.04 while a {{ItemIcon|Gold Emerald Ring}} is equipped.
Line 72: Line 72:
The first formula is used to calculate the player's Base Combat Level.
The first formula is used to calculate the player's Base Combat Level.


<math>\small{ \begin{aligned} \text{Base Combat Level} = 0.25 * (\text{Defence Skill Level} + \text{Hitpoints Skill Level} + \lfloor\text{Prayer Skill Level} / 2\rfloor) \end{aligned}}</math>
<!-- JS source: utils.js, function getPlayerCombatLevel
--><math>\small{ \begin{aligned} \text{Base Combat Level} = 0.25 \times (\text{Defence Skill Level} + \text{Hitpoints Skill Level} + \lfloor 0.5 \times \text{Prayer Skill Level} \rfloor) \end{aligned}}</math>


The second set of formulas are used to calculate the player's Offensive Combat Levels, only the highest result is used.
The second set of formulas are used to calculate the player's Offensive Combat Levels, only the highest result is used.


<math>\small{\begin{aligned}\text{Melee Combat Level} = 0.325 * (\text{Attack Skill Level} + \text{Strength Skill Level})\end{aligned}}</math>
<math>\small{\begin{aligned}
\text{Melee Combat Level} &= \text{Attack Skill Level} + \text{Strength Skill Level} \\
\text{Ranged Combat Level} &= \lfloor 1.5 \times \text{Ranged Skill Level} \rfloor \\
\text{Magic Combat Level} &= \lfloor 1.5 \times \text{Magic Skill Level} \rfloor
\end{aligned}}</math>


<math>\small{\begin{aligned}\text{Ranged Combat Level} = 0.325 * \lfloor1.5 * \text{Ranged Skill Level}\rfloor\end{aligned}}</math>
The third formula is used to calculate the player's Combat Level, rounded down to the nearest whole number.
 
<math>\small{\begin{aligned}\text{Magic Combat Level} = 0.325 * \lfloor1.5 * \text{Magic Skill Level}\rfloor\end{aligned}}</math>


The third formula is used to calculate the player's Combat Level, rounded down to the nearest whole number.
<math>\small{\begin{aligned}\text{Combat Level} = \lfloor \text{Base Combat Level} + 0.325 \times \text{Highest Offensive Combat Level} \rfloor\end{aligned}}</math>


<math>\small{\begin{aligned}\text{Combat Level} = \text{Base Combat Level} + \text{Highest Offensive Combat Level}\end{aligned}}</math>
Where: <math> \left \lfloor x \right \rfloor </math> is the [https://en.wikipedia.org/wiki/Floor_and_ceiling_functions floor function].


=== Stun (Freeze) ===
=== Stun (Freeze) ===
Line 94: Line 97:


=== Accuracy Rating ===
=== Accuracy Rating ===
==== Melee Accuracy Rating ====
<!-- JS source: character.js, function computeAccuracy
The first formula is used to calculate the player's Effective Melee Attack Level. The Attack Style Bonus is based on bonuses from other skills, such as from Agility.
-->The calculation used to determine the player's accuracy rating is broadly the same for all combat styles, with some parameters varying depending on the player's current attack type and style:
 
{| class="wikitable stickyHeader"
<math> \small{\begin{aligned} \text{Effective Melee Attack Level}=\text{Attack Skill Level} + 8 + \text{Attack Style Bonus} \end{aligned}}</math>
|- class="headerRow-0"
 
! Attack Type !! Attack Style !! Skill Level !! Attack Bonus Stat
The second formula is used to calculate the player's Melee Accuracy Rating. Melee Attack Bonus can be found in Equipment Stats and changes depending on the Attack Style selected. Simply substitute Stab Bonus, Slash Bonus, or Defend Bonus, from Equipment Stats with Melee Attack Bonus in this formula. The potion and prayer bonuses, will be the relevant numbers written in the potion and prayer descriptions.
|-
 
| rowspan="3" | {{Icon|Melee}} || {{Skill|Attack|Stab|nolink=true}} || {{Skill|Attack}} || Stab attack bonus
<math> \small{ \begin{aligned}  
|-
\text{Melee Accuracy Rating} = \big\{ &\text{Effective Melee Attack Level} * (\text{Melee Attack Bonus} +64) \\
| {{Skill|Strength|Slash|nolink=true}} || {{Skill|Strength}} || Slash attack bonus
&{}* (1 + \text{Potion Accuracy Rating Bonus} / 100) * (1 + \text{Prayer Accuracy Rating Bonus} / 100) \big\} \end{aligned} } </math>
|-
 
| {{Skill|Defence|Block|nolink=true}} || {{Skill|Defence}} || Block attack bonus
==== Ranged Accuracy Rating ====
|-
The first formula is used to calculate the player's Effective Ranged Attack Level. The Attack Style Bonus is based on bonuses from other skills, such as from Agility.
| {{Skill|Ranged}} || All || {{Skill|Ranged}} || Ranged attack bonus
|-
| {{Skill|Magic}} || All || {{Skill|Magic}} || Magic attack bonus
|}


<math> \small{\begin{aligned} \text{Effective Ranged Attack Level}=\text{Ranged Skill Level} + 8 + \text{Attack Style Bonus} \end{aligned}}</math>
The first formula is used to determine the player's effective skill level:


The second formula is used to calculate the player's Ranged Accuracy Rating. Ranged Attack Bonus can be found in Equipment Stats, under Offensive Stats with the bow and arrow icon. The potion and prayer bonuses, will be the relevant numbers written in the potion and prayer descriptions.
<math>\small{\text{Effective Skill Level} = \text{Standard Skill Level} + \text{Hidden Skill Level}}</math>


Here, 'Standard Skill Level' is the player's skill level as seen in the left-hand navigation bar (up to a maximum of 99), while 'Hidden Skill Level' is the sum of any hidden skill level bonuses, such as those granted by {{Skill|Astrology}}.


<math> \small{ \begin{aligned}  
Next, the base accuracy bonus should be calculated. This is the sum of the relevant attack bonus statistic provided by all currently equipped equipment (as seen in the "View Equipment Stats" interface), plus:
\text{Ranged Accuracy Rating} = \big\{ &\text{Effective Ranged Attack Level} * (\text{Ranged Attack Bonus} +64) \\
* {{Icon|Melee}}
&{}* (1 + \text{Potion Accuracy Rating Bonus} / 100) * (1 + \text{Prayer Accuracy Rating Bonus} / 100) \big\} \end{aligned} } </math>
** +15 if fighting a {{Skill|Ranged}} monster while the {{ItemIcon|Minotaur}}/{{ItemIcon|Centaur}} synergy is active
* {{Skill|Ranged}}
** +15 if fighting a {{Skill|Magic}} monster while the {{ItemIcon|Witch}}/{{ItemIcon|Centaur}} synergy is active
** The additional ranged attack bonus provided by {{ItemIcon|Stormsnap}} if equipped, the formula for this is included on the bow's page


==== Magic Accuracy Rating ====
In addition, the player's accuracy modifier needs to be known. This is the sum of all global accuracy rating and the relevant attack type's accuracy rating increases, provided from places such as {{Skill|Agility}} and {{Skill|Astrology}}.
The first formula is used to calculate the player's Effective Magic Attack Level. The Attack Style Bonus is based on bonuses from other skills, such as from Agility.


<math> \small{ \begin{aligned} \text{Effective Magic Attack Level}=\text{Magic Skill Level} + 8 + \text{Attack Style Bonus} \end{aligned}} </math>
Finally, the player's accuracy rating can then be calculated as:


The second formula is used to calculate the player's Magic Accuracy Rating. Magic Attack Bonus can be found in Equipment Stats, under Offensive Stats with the wizard hat icon. The potion and prayer bonuses, will be the relevant numbers written in the potion and prayer descriptions.
<math>\text{Accuracy Rating} = \left \lfloor \left (\text{Effective Skill Level} + 9 \right ) \times \left (\text{Base Accuracy Bonus} + 64 \right ) \times \left (1 + \frac{\text{Accuracy Modifier}}{100} \right ) \right \rfloor</math>


<math> \small{ \begin{aligned}
Where: <math> \left \lfloor x \right \rfloor </math> is the [https://en.wikipedia.org/wiki/Floor_and_ceiling_functions floor function].
\text{Magic Accuracy Rating} = \big\{ &\text{Effective Magic Attack Level} * (\text{Magic Attack Bonus} +64) \\
&* (1 + \text{Potion Accuracy Rating Bonus} / 100) * (1 + \text{Prayer Accuracy Rating Bonus} / 100) \big\} \end{aligned} } </math>


=== Chance to Hit ===
=== Chance to Hit ===