Difference between revisions of "Magic contamination"

From CrawlWiki
Jump to: navigation, search
(Spell Effects: Clarity)
m (Clarify line)
 
(43 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{version016}}
+
{{version034}}
'''Magic contamination''' is a potential side effect of powerful magic, [[divine retribution]] or favour, or the incompetent use of [[magic]].
+
 
 +
'''Magic contamination''' is a dangerous condition caused by miscasts and some magical effects.
  
 
==Overview==
 
==Overview==
Various activities cause harmful magical energies to accumulate in your body. A small amount of magical contamination (a dark grey "Glow" status) is mostly harmless, and will dissipate over time without any further effect. Larger amounts (5+ points) of accumulated magic contamination (a yellow, red, or dark red "Glow" status) will make you start to glow with magical energy.
+
Various activities cause harmful magical energies to accumulate in your body. A small amount of magical contamination (a grey "% Contam" status) is harmless and will dissipate over time without any further effect. Larger amounts of accumulated magic contamination (a yellow or red "Contam" status) will make you start to [[Glow]] with magical contamination. Contamination is reported as a percent out of 300% maximum, internally tracked as 0-3000 points of contamination.
 
 
Glowing is bad for two reasons:
 
*A glowing target is easier to hit (similar to the effects of the [[Corona]] spell). Similarly, glow can reveal you if you are [[invisible]].
 
*You may suffer damage and mutations from the magical energies your body has absorbed.
 
 
 
 
 
==Accumulation==
 
Your magic contamination level can be increased via the following methods. Any behaviour marked with (Z) offends [[Zin]] and will reduce the piety of his worshippers.
 
 
 
===Haste===
 
*Spending time under the influence of [[Haste]] while not [[berserk]].
 
*+1 point for becoming hasted using a Haste spell or [[wand of hasting]].
 
*+1 point for having your already-in-force Haste effect extended by:
 
**Rage extension (Z)
 
**A potion of haste or berserk rage (Z)
 
**Xom sending you berserk.
 
**Invoking Okawaru's Haste power
 
*+2 points for having your Haste extended by:
 
**The Haste spell or a wand of hasting. (Z)
 
 
 
===Invisibility===
 
*Spending time [[invisible]].
 
*+1 point for making yourself invisible with a [[wand of invisibility]] or the [[Invisibility]] spell.(Z)
 
  
===Might===
+
Being at a severe contamination level makes you easier to hit and reveals you if [[Invisible]], similar to the [[Corona]] spell. It also lowers stealth and puts you at risk of [[Bad mutations]] and damaging explosions. The chance of exploding scales with contamination severity. Damage scales with player [[XL]]. Explosions at 200%+ contamination have increased radius and damage. When this happens, a mutation check will occur with a 1 in 5 chance of a single bad mutation or random [[Mutation]] (this is heavily weighted toward bad mutation outcomes). <!--if (x_chance_in_y(min(2000, you.magic_contamination), 3200-->
*+1 point for extending Might by:
 
**Quaffing a potion of might (Z)
 
  
===Teleport Control===
+
Any amount of contamination can cause [[Ugly thing]]s adjacent to you to change their colour.
*+1 point every time you ''successfully'' control a teleportation. This includes semi-controlled [[blink]]s. (Z)
 
*+1 point every time you make a ''fully-controlled'' blink. (Z)
 
  
===Miscasts and Miscast Effects===
+
==Contamination Levels==
*[[Miscasting]] spells.
+
{| class="wikitable"
*Being struck by the Divinations miscast effect of Sif Muna's wrath.
+
|-
*Unwielding a weapon with the [[distortion]] brand. (Z)
+
! Contam
*The capriciousness of [[Xom]] inflicting a miscast effect on you.
+
! Colour
*Zot traps (which apply random miscasts).
+
! Description
 +
|-
 +
| 0-999 (0-99%)
 +
| Grey
 +
| You are very lightly contaminated with residual magic.
 +
|-
 +
| 1000-1999 (100-199%)
 +
| Yellow
 +
| You are dangerously contaminated with residual magic. (Explosions up to 27 damage at XL 27)
 +
|-
 +
| 2000-2999 (200-299%)
 +
| Red
 +
| You are extremely contaminated with residual magic. (Explosions up to 33 damage at XL 27)
 +
|-
 +
| 3000 (300%)
 +
| Red (Max)
 +
| You are completely saturated with residual magic! (Explosions up to 33 damage at XL 27)
 +
|}
  
===Contaminating Miscast Effects===
+
==Sources==
The following miscasts can give you up to 18 contamination:
+
===Spells===
*Severity-3 Enchantments (25% chance)
+
*[[Irradiate]]: 185-400 per cast.
*Severity-3 Translocations (25% chance)
+
**When a player is hit ''by'' Irradiate: 400-600.
*Severity-2 Transmutations (25% chance)
 
  
The following miscasts can give you up to 34 contamination:
+
===Spell Miscasts===
*Severity-3 Transmutations (25% chance)
+
*Every [[Miscast]]: Depends on the miscast severity. See [[Miscast effect#Effects|Miscast effect]] for more information.
  
 
===Other===
 
===Other===
*Quaffing a [[potion of resistance]]. (+1) (Z)
+
*Removing an [[Artefact]] with *Contam: 1200
*Unequipping an [[artifact]] which induces magical contamination. This will usually add a minimum of 5 points.
+
*Removing a weapon with [[Distortion]] brand: 3000 (25% chance)
 
+
*Removing the [[Plutonium Sword]]: 700-1350
===Spending Time===
+
*[[Mutagenic fog]]: 250-500 per turn
For purposes of the above, "spending time" under the influence of an effect means having that effect in force when the handle_time() function is called (roughly once every 20 turns). When this occurs:
+
*[[Zot trap]]: 1500 - 3000 (one of many possible outcomes)
*60% chance of +1 contamination if you are invisible.
+
*[[Jiyva]] [[Penance]]: 0 - <code>100 * penance</code> (one of many possible outcomes)
*60% chance of +1 contamination if you are hasted and not berserk.
 
 
 
==Spell Effects==
 
Some spells will inflict magical contamination upon the caster:
 
*[[Irradiate]] - always a minimum of one point of contamination, although the caster can reach Yellow glow status in as few as two successive casts.
 
*[[Disjunction]] - one point of magical contamination per cast.
 
*[[Controlled Blink]] - causes contamination in the same manner as a [[scroll of blink]].
 
 
 
==Base Contamination for Miscasts==
 
To figure the baseline contamination level for a miscast, use the following calculation.
 
 
 
      A= (spell_level ^ 2) * margin_of_failure
 
      B= A+250
 
      C= B/500
 
      With C being your final number. Fractional points are rounded randomly.
 
  
 
==Dissipation==
 
==Dissipation==
Dissipation of magic contamination is handled by the handle_time() function. Each time it is called:
+
Magic contamination begins to dissipate after 7 turns at the rate of 20 per turn. Quaffing a [[Potion of cancellation]] instantly removes <code>-1 * (250-1000)</code> points of contamination.
*If you are neither Hasted (whether berserk or not) nor Invisible, you have a 50% chance of harmlessly dissipating one point of magic contamination.
 
*If you have 5 or more points of magic contamination, there is a 50% chance of a violent discharge occurring. The effects of this are as follows:
 
**If you are in a [[Zin|Sanctuary]], there is a ((contamination + 1) × 4)% chance of being told that Zin has prevented a violent discharge of magical energies.
 
**If the previous check failed (either the random roll was too high, or you weren't in a sanctuary to begin with), then there is a ((total contamination + 1) × 4)% chance of some of your contamination discharging violently. When this occurs:
 
***If your contamination total is 10 or higher then there is a 50% chance of a magical explosion erupting from your body.
 
***You receive one mutation. 20% of the time this will be an entirely random mutation; the rest of the time it will be from the list of [[bad mutations]]. If you have mutation resistance from an item, there is a 50% chance that this effect is ignored (down from its inherent 90% resistance chance; be careful!)
 
***A random amount of magic contamination (always at least one point, never more than 25% of your current contamination amount) is removed.
 
  
The magical explosions unleashed by violent discharge of magic contamination do damage specified by:
+
==Tips & Tricks==
dice_def(3, you.magic_contamination × (you.is_undead ? 4 : 2) / 4)
+
Being undead or in lichform, by way of [[Talisman of death]], prevents any contamination-related malmutations; instead, you are temporarily [[drain]]ed.
For example, if you are not undead, and have 50 points of magical contamination (this is a really, really severe problem...), you will take 3d25 (3-75) points of physical damage (AC applies).
 
  
Quaffing a [[potion of cancellation]] will reduce your contamination level by 1d5 points.
+
[[Amulet of dissipation]] will increase the rate at which contamination is resolved, thus reducing the number of bad outcomes.
  
One of the aspects of Sif Muna's wrath is reducing the remaining duration of all your enchantments to 1 turn; when this occurs, your magic contamination level is also reduced by 1d5 points.
+
==Summary of Major Changes in [[0.34]] Compared to Prior Versions==
 +
For clarity, these Dev notes summarize the major changes detailed specifically above and should allow players to adjust their expectations from the old system:
  
 +
*Contam has been rescaled internally. 1000 is now the start of yellow, 2000 the start of red, and 3000 the absolute cap.
 +
*Contam decays faster, but does not start to decay until 7 turns have passed since contam was last gained.
 +
*Low yellow is somewhat more dangerous than before and the difference between low/high has been narrowed. Very high levels of contam are worse than before (the mid-range is similar to the prior state).
 +
*Being invisible no longer prevents all contam decay.
 +
*Evoking a scarf of invisibility no longer gives a tiny bit of contam (it was largely irrelevant, requiring 6 consecutive uses to hit yellow).
 +
*Contam explosions are possible at lower levels of contam than before, do significantly more damage (and ignore the player's AC), are non-elemental, and their base damage is based on the player's XL rather than the amount of contam. Yellow-tier explosions are radius 1, red are radius 2 and do more damage than yellow.
 +
*Contam mutations no longer have a 50% chance to ignore rMut (along with a few other narrow interactions with mutation conflicts due to counting as 'forced'). This seems unnecessary, with rMut being both weaker and far rarer than when this system was first designed.
 +
*Contam is now listed as a percentage on the UI, while contaminated (near the Doom indicator). Yellow is 100% (ie: the start of actual negative gameplay effects), red is 200%, and the cap is 300%. While the specific number is admittedly unimportant for minor contam, it helps make the difference between low/high transparent to the player, and critically, allows contamination-costing spells to be more transparent about what their risks are in the current moment.
 +
*Contam is only shown on the status line once you have enough for it to have gameplay impact (ie: yellow or worse).
  
 +
==History==
 +
*In [[0.34]], a major rework of contamination system to clarify and simplify. All contam-inflicting things have been adjusted. The average number of mutations gained "should remain similar" to the old version. [https://github.com/crawl/crawl/commit/dccffc7fa4ce GitHub ref]
 +
*Prior to [[0.29]], the contamination level for the light grey warning was 3500 instead of 3000. This change was enacted to match [[Irradiate]], which had its contamination increased in this version.
 +
*Prior to [[0.28]], the [[Orb of Zot]] extended contamination.
 +
*Prior to [[0.26]], magic contamination decayed much slower: -25 per turn instead of -75, while the time between bad effects was also slower (200 - 600 turns).
 +
*Prior to [[0.25]], [[miscast effect]]s were different, and thus had different contamination levels.
 +
*Prior to [[0.19]], the light grey contamination level didn't exist.
 +
*Prior to [[0.10]], this effect was simply called [[glow]], a ambiguous term that also referred to the backlight caused by [[Sticky Flame]] and [[Corona]] (and contamination itself).
  
==History==
+
===Sources of Contamination===
Prior to 0.10, this effect was simply called [[glow]], a term which ambiguously referred either to magic contamination, or to the relatively harmless glow from [[Sticky Flame]] or [[Corona]].
+
*Prior to [[0.28]], [[invisibility]] caused contamination over time, and [[Disjunction]] had 750 - 1250 contamination on cast.
 +
*Prior to [[0.26]], casting [[Controlled Blink]] or reading a [[scroll of blinking]] contaminated the player.
 +
*Prior to [[0.20]], drinking a [[potion of haste]] contaminated the player, and the [[haste]] effect caused contamination over time.
  
 
[[Category:Magic]]
 
[[Category:Magic]]
 
[[Category:Game mechanics]]
 
[[Category:Game mechanics]]
 
[[Category:Status effects]]
 
[[Category:Status effects]]

Latest revision as of 13:35, 10 July 2026

Version 0.34: This article is up to date for the latest stable release of Dungeon Crawl Stone Soup.

Magic contamination is a dangerous condition caused by miscasts and some magical effects.

Overview

Various activities cause harmful magical energies to accumulate in your body. A small amount of magical contamination (a grey "% Contam" status) is harmless and will dissipate over time without any further effect. Larger amounts of accumulated magic contamination (a yellow or red "Contam" status) will make you start to Glow with magical contamination. Contamination is reported as a percent out of 300% maximum, internally tracked as 0-3000 points of contamination.

Being at a severe contamination level makes you easier to hit and reveals you if Invisible, similar to the Corona spell. It also lowers stealth and puts you at risk of Bad mutations and damaging explosions. The chance of exploding scales with contamination severity. Damage scales with player XL. Explosions at 200%+ contamination have increased radius and damage. When this happens, a mutation check will occur with a 1 in 5 chance of a single bad mutation or random Mutation (this is heavily weighted toward bad mutation outcomes).

Any amount of contamination can cause Ugly things adjacent to you to change their colour.

Contamination Levels

Contam Colour Description
0-999 (0-99%) Grey You are very lightly contaminated with residual magic.
1000-1999 (100-199%) Yellow You are dangerously contaminated with residual magic. (Explosions up to 27 damage at XL 27)
2000-2999 (200-299%) Red You are extremely contaminated with residual magic. (Explosions up to 33 damage at XL 27)
3000 (300%) Red (Max) You are completely saturated with residual magic! (Explosions up to 33 damage at XL 27)

Sources

Spells

  • Irradiate: 185-400 per cast.
    • When a player is hit by Irradiate: 400-600.

Spell Miscasts

Other

Dissipation

Magic contamination begins to dissipate after 7 turns at the rate of 20 per turn. Quaffing a Potion of cancellation instantly removes -1 * (250-1000) points of contamination.

Tips & Tricks

Being undead or in lichform, by way of Talisman of death, prevents any contamination-related malmutations; instead, you are temporarily drained.

Amulet of dissipation will increase the rate at which contamination is resolved, thus reducing the number of bad outcomes.

Summary of Major Changes in 0.34 Compared to Prior Versions

For clarity, these Dev notes summarize the major changes detailed specifically above and should allow players to adjust their expectations from the old system:

  • Contam has been rescaled internally. 1000 is now the start of yellow, 2000 the start of red, and 3000 the absolute cap.
  • Contam decays faster, but does not start to decay until 7 turns have passed since contam was last gained.
  • Low yellow is somewhat more dangerous than before and the difference between low/high has been narrowed. Very high levels of contam are worse than before (the mid-range is similar to the prior state).
  • Being invisible no longer prevents all contam decay.
  • Evoking a scarf of invisibility no longer gives a tiny bit of contam (it was largely irrelevant, requiring 6 consecutive uses to hit yellow).
  • Contam explosions are possible at lower levels of contam than before, do significantly more damage (and ignore the player's AC), are non-elemental, and their base damage is based on the player's XL rather than the amount of contam. Yellow-tier explosions are radius 1, red are radius 2 and do more damage than yellow.
  • Contam mutations no longer have a 50% chance to ignore rMut (along with a few other narrow interactions with mutation conflicts due to counting as 'forced'). This seems unnecessary, with rMut being both weaker and far rarer than when this system was first designed.
  • Contam is now listed as a percentage on the UI, while contaminated (near the Doom indicator). Yellow is 100% (ie: the start of actual negative gameplay effects), red is 200%, and the cap is 300%. While the specific number is admittedly unimportant for minor contam, it helps make the difference between low/high transparent to the player, and critically, allows contamination-costing spells to be more transparent about what their risks are in the current moment.
  • Contam is only shown on the status line once you have enough for it to have gameplay impact (ie: yellow or worse).

History

  • In 0.34, a major rework of contamination system to clarify and simplify. All contam-inflicting things have been adjusted. The average number of mutations gained "should remain similar" to the old version. GitHub ref
  • Prior to 0.29, the contamination level for the light grey warning was 3500 instead of 3000. This change was enacted to match Irradiate, which had its contamination increased in this version.
  • Prior to 0.28, the Orb of Zot extended contamination.
  • Prior to 0.26, magic contamination decayed much slower: -25 per turn instead of -75, while the time between bad effects was also slower (200 - 600 turns).
  • Prior to 0.25, miscast effects were different, and thus had different contamination levels.
  • Prior to 0.19, the light grey contamination level didn't exist.
  • Prior to 0.10, this effect was simply called glow, a ambiguous term that also referred to the backlight caused by Sticky Flame and Corona (and contamination itself).

Sources of Contamination