Calculator:Combat/Instability
Templates used 

Calculator:Template/Combat/Instability 
Notes
Many sources contribute to the critical hit chance of an attack for Magic. These include (nonexhaustive list):
 Forced critical hit sources
 The Biting perk (+2% per rank with a ×1.1 if it is on a piece of level 20 gear). With Biting 4, this is either +8% or +8.8%
 Erethdor's grimoire provides a +12% increase to one's critical hit
 Rings such as the Reaver's ring (+5%) and the Channeller's ring (+4%) for each successive hit of a channelled magic ability
 Attacks following Concentrated Blast (+10%) or Greater Concentrated Blast (+15%)
 The Kal'gerion demon familiar provides a passive 1% critical hit chance
 The Kal'gerion Demon scroll (CritiKal) provides a +5% critical hit chance increase for 60 seconds
 Natural critical hit chance of an ability or autoattack
 These typically take on a range between 5% and 13.5%
 A calculator for finding the probability of an ability or an autoattack to land a critical hit can be found here: Calculator:Combat/Critical hit chance
If tick 1 is considered to be the tick when the player casts the Instability special attack (50 ticks remain on the bar), then tick 2 is when the initial hit fired from the staff lands on the target (49 ticks remain on the bar). Though it is possible to have a hitsplat land on tick 1, it does not cause an autoattack to be fired if it crits. Therefore, the first tick possible for a given hit to cause an autoattack to be fired is tick 2, when there are 49 ticks remaining on the bar.
Furthermore, the time between when the player casts the spell and when the autoattack lands affects the pace at which autoattacks are fired from the staff. This in turn sets a maximum number of autoattacks that can be fired from the staff, given the amount of time left on the buff when the player lands their source hit. The (collapsed) table below shows the time in ticks between the cast and the hit landing on the target.
Combat spell speed  


template = Calculator:Template/Combat/Instability form = instabilityCalcForm result = instabilityCalcResult param = critInitSource critical hit chance (%)30number0100,0.01,0.01The critical hit chance from a single source hit. param = critAutoAutoattack critical hit chance (%)30number0100,0.01,0.01The critical hit chance from the autoattacks fired from the Instability special attack. param = ticksTime remaining on buff bar (game ticks)49int049The time remaining on the buff bar for the special attack in game ticks when the source hit lands on the target. The buff lasts for 30 seconds (50 game ticks).
However, if a hit lands on the cast tick and is a critical hit, it will not cause an autoattack to be fired. Therefore, the earliest tick that a hit can land is the next tick, when the buff has 49 ticks remaining.
This allows for a maximum of 50 recursive autoattacks for fast magic spells, 25 for slow magic spells, and 17 for slowest magic spells. param = speedSelect speed of spellSlowbuttonselectFast,Slow,SlowestThe speed of the spell affects how quickly a recursive autoattack follows the previous autoattack. For fast spells, a recursive autoattack follows 1 game tick after the previous autoattack. For slow spells, it is 2 game ticks. For slowest spells, it is 3 game ticks. param = calculateDamageCalculate total expected damagefalsetoggleswitchtrue,falsetrue=expectedDamageToggle parameters for calculating the approximate total expected damage. param = expectedDamageCalculate total expected damagegroupinitHitAverage,autoHitAverage param = initHitAverageSource hit average damage3500int032767The expected damage of the source hit. param = autoHitAverageAutoattack average damage8000int032767The expected damage of an autoattack.
Description
The purpose of this calculator is to calculate the expected number of autoattacks fired from the Fractured Staff of Armadyl special attack, Instability, given the probability that a source hit will land a critical hit and the probability of the subsequent autoattacks landing critical hits. In addition, the spell speed of the autoattacks are taken into consideration, as well as the time of the buff provided by the special attack on the player's buff bar.
There are optional parameters that can be toggled on to calculate the approximate total expected damage for a given source hit average damage and autoattack average damage.
Source critical hit chance (%)
The critical hit chance from a single source hit. Values can be between 0100 in increments of 0.1.
Autoattack critical hit chance (%)
The critical hit chance from the autoattacks fired from the Instability special attack. Values can be between 0100 in increments of 0.1.
Time reamining on the buff bar (game ticks)
The time remaining on the buff bar for the special attack in game ticks when the initial hit lands on the target. The buff lasts for 30 seconds (50 game ticks). However, if a hit lands on the cast tick and is a critical hit, it will not cause an autoattack to be fired. Therefore, the earliest tick that a hit can land is the next tick, when the buff has 49 ticks remaining. This allows for a maximum of 50 recursive autoattacks for fast magic spells, 25 for slow magic spells, and 17 for slowest magic spells.
Select speed of spell
The speed of the spell affects how quickly a recursive autoattack follows the previous autoattack. For fast spells, a recursive autoattack follows 1 game tick after the previous autoattack. For slow spells, it is 2 game ticks. For slowest spells, it is 3 game ticks.
Calculate total expected damage
Toggles the display for optional parameters used for calculating an approximated total damage from the source hit and autoattack damages. The approximation is where is the expected damage, is the source hit average damage, is the expected number of autoattacks, and is the autoattack average damage.
Source hit average damage
Value used for source hit average damage.
Autoattack average damage
Value used for autoattack average damage.