Magic contamination

From CrawlWiki
Revision as of 22:39, 5 December 2015 by Thelo2 (talk | contribs) (Renamed some references from "glow" to "contamination")
Jump to: navigation, search
Version 0.16: This article may not be up to date for the latest stable release of Crawl.

Magic contamination is a potential side effect of powerful magic, divine retribution or favour, or the incompetent use of magic.

Overview

Various activities cause harmful magical energies to accumulate in your body. A small amount of magical contamination (a dark grey "Contam" 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 "Contam" status) will make you start to glow with magical contamination. Contamination is bad for two reasons:

  • A target glowing with severe contamination 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

Might

  • +1 point for extending Might by:
    • Quaffing a potion of might (Z)

Teleport Control

  • +1 point every time you successfully control a teleportation. This includes semi-controlled blinks. (Z)
  • +1 point every time you make a fully-controlled blink. (Z)

Miscasts and Miscast Effects

  • Miscasting spells.
  • Being struck by the Divinations miscast effect of Sif Muna's wrath.
  • Unwielding a weapon with the distortion brand. (Z)
  • The capriciousness of Xom inflicting a miscast effect on you.
  • Zot traps (which apply random miscasts).

Contaminating Miscast Effects

The following miscasts can give you up to 18 contamination:

  • Severity-3 Enchantments (25% chance)
  • Severity-3 Translocations (25% chance)
  • Severity-2 Transmutations (25% chance)

The following miscasts can give you up to 34 contamination:

  • Severity-3 Transmutations (25% chance)

Other

  • Quaffing a potion of resistance. (+1) (Z)
  • Removing an artifact that induces magical contamination. This will usually add a minimum of 5 points.
  • Using an amulet of stasis to prematurely end a status effect that is prevented by stasis, such as Slow, Haste, or the delay before teleporting. This contamination is sometimes harmless (grey), but it has the potential to be hazardous (yellow).

Spending Time

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:

  • 60% chance of +1 contamination if you are invisible.
  • 60% chance of +1 contamination if you are hasted and not berserk.

Spell Effects

Some spells will inflict magical contamination upon the caster:

  • Irradiate - 1.5 - 3 points of contamination, meaning 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 one point of 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 of magic contamination is handled by the handle_time() function. Each time it is called:

  • 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 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:

dice_def(3, you.magic_contamination × (you.is_undead ? 4 : 2) / 4)

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.

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.


History

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.