# Difference between revisions of "Disruption"

m (add 0.23 source code link; not sure the quoted figures are correct though?) |
(update for 0.23, including statistical parsing of formula (s/o to IRC for setting me straight)) |
||

Line 1: | Line 1: | ||

− | {{ | + | {{version023}} |

− | '''Disruption''' is a special [[brand]] found only on the [[artefact]] [[great mace]], '''[[Undeadhunter]]'''. Each time it strikes an [[undead]] target, there is a | + | '''Disruption''' is a special [[brand]] found only on the [[artefact]] [[great mace]], '''[[Undeadhunter]]'''. Each time it strikes an [[undead]] target and deals damage <code>dam</code>, there is a 2/3 probability for the target to be blasted with disruptive energy up to an additional 3× damage (4× damage in total). On average, you deal 1.67× damage. |

+ | |||

+ | ==Damage Calculation== | ||

+ | Additional damage is calculated according to the formula: | ||

+ | random2avg((1 + (dam * 3)), 3))<ref>{{source ref|0.23.0|art-func.h|765}}</ref> | ||

+ | <code>random2avg</code><ref>{{source ref|0.23.0|random.cc|288}}</ref> takes the average of 3 rolls, here, which means the resulting extra damage ''approximates'' a Gaussian distribution with a mean of <code>3/2 × dam</code><ref><code>random2avg</code> returns an int, which shifts the mean slightly downwards from this value due to the effect of integer truncation for division in C++.</ref> and a standard deviation of approximately <code>1/2 × dam</code><ref>More exactly: <code>1/2 × sqrt[(dam × dam) + (dam / 3)]</code>. The difference between the two calculations is negligible, as the increase is between 0.08 and 0.083(3) for any <code>dam</code> above 1.</ref>. | ||

+ | |||

+ | Following the 68–95–99.7 rule<ref>https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule</ref>, additional damage dealt is between 1× and 2× damage 68% of the time and between 0.5× and 2.5× damage 95% of the time. | ||

==History== | ==History== |

## Revision as of 22:37, 9 May 2019

*Dungeon Crawl Stone Soup*

**Version 0.23**: This article is up to date for the latest stable release of*.*

**Disruption** is a special brand found only on the artefact great mace, **Undeadhunter**. Each time it strikes an undead target and deals damage `dam`

, there is a 2/3 probability for the target to be blasted with disruptive energy up to an additional 3× damage (4× damage in total). On average, you deal 1.67× damage.

## Damage Calculation

Additional damage is calculated according to the formula:

random2avg((1 + (dam * 3)), 3))^{[1]}

`random2avg`

^{[2]} takes the average of 3 rolls, here, which means the resulting extra damage *approximates* a Gaussian distribution with a mean of `3/2 × dam`

^{[3]} and a standard deviation of approximately `1/2 × dam`

^{[4]}.

Following the 68–95–99.7 rule^{[5]}, additional damage dealt is between 1× and 2× damage 68% of the time and between 0.5× and 2.5× damage 95% of the time.

## History

Disruption was once a normal brand found on random melee weapons. In 0.4, it was removed and the holy wrath brand was enhanced instead. It was returned in 0.9 for this particular artefact.

## References

- ↑ art-func.h:765 (0.23.0)
- ↑ random.cc:288 (0.23.0)
- ↑
`random2avg`

returns an int, which shifts the mean slightly downwards from this value due to the effect of integer truncation for division in C++. - ↑ More exactly:
`1/2 × sqrt[(dam × dam) + (dam / 3)]`

. The difference between the two calculations is negligible, as the increase is between 0.08 and 0.083(3) for any`dam`

above 1. - ↑ https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule

Brands | |
---|---|

Melee weapons | Antimagic • Chaos • Distortion • Dragon slaying • Draining • Electrocution • Flaming • Freezing • Holy wrath • Pain • Protection • Reaching • Reaping • Returning • Speed • Vampiric • Venom • Vorpal |

Launchers | Electrocution • Evasion • Flame • Frost • Penetration • Speed • Venom • Vorpal |

Throwing weapons | Confusion • Curare • Dispersal • Exploding • Frenzy • Paralysis • Penetration • Poisoned • Returning • Silver • Sleep • Steel |