Glyph of warding

Glyph of warding is an abjuration spell that causes an inscription to harm those who pass it.

Effect
This powerful inscription harms those who enter, pass, or open the warded area or object. A glyph can guard a bridge or passage, ward a portal, trap a chest or box, and so on.

You set the conditions of the ward. Typically, any creature violating the warded area without speaking a pass phrase (which you set when casting the spell) is subject to the magic it stores. Glyphs can be set according to physical characteristics (such as height or weight) or creature type, subtype, or species (such as "drow" or "aberration"). Glyphs can also be set with respect to good, evil, law, or chaos, or to pass those of your religion. They cannot be set according to class, HD, or level. Glyphs respond to invisible creatures normally but are not triggered by those who travel past them ethereally. Multiple glyphs cannot be cast on the same area. However, if a cabinet had three drawers, each could be separately warded.

When casting the spell, you weave a tracery of faintly glowing lines around the warding sigil. The glyph can be placed to conform to any shape up to the limitations of your total square footage. When the spell is completed, the glyph and tracery become nearly invisible.

Glyphs cannot be affected or bypassed by such means as physical or magical probing, though they can be dispelled. Mislead, polymorph, and nondetection can fool a glyph.

Read magic allows you to identify a glyph of warding with a successful Spellcraft check (DC 13). Identifying the glyph does not discharge it and allows you to know the basic nature of the glyph (version, type of damage caused, what spell is stored).

The DM may decide that the exact glyphs available to a cleric depend on your deity. He or she might also make new glyphs available according to the magical research rules.

Note: Magic traps such as glyph of warding are hard to detect and disable. A rogue (only) can use the Search skill to find the glyph and Disable Device to thwart it. The DC in each case is 25 + spell level, or 28 for glyph of warding.

Known Versions
Depending on the version selected, a glyph either blasts the intruder or activates a spell.

Blast Glyph
A blast deals 1d8 points of damage per two caster levels to the intruder and to all within 5 feet of the intruder (maximum 5d8). This damage is acid, cold, fire, electricity, or sonic (caster's choice, made at time of casting). Those affected can make Reflex saves to take half damage.

Spell Glyph
You can store any harmful spell of up to 3rd level that you know. All level-dependent features of the spell are based on your level at the time of casting. If the spell has targets, it targets the intruder. If the spell has an area or an amorphous effect (such as a cloud), the area or effect is centered on the intruder. If the spell summons creatures, they appear as close as possible to the intruder and attack. All saving throws operate as normal, except that the DC is based on the level of the glyph.

Material Component
You trace the glyph with incense, which must first be sprinkled with powdered diamond worth at least 200 gp.