Turn undead

Introduction
Knights and Priests have the innate ability to turn. This can be invoked with the #turn extended command.

This command is quite different from the turn undead spell or the wand of undead turning. In fact, it's a prayer to your god, not a spell.

Facts
Using the #turn command has the following effects.

First, a couple limitations:
 * If you are polymorphed into an undead or a demon, bad stuff will happen. Not recommended.
 * Since it's a prayer, it won't work in Gehennom either.

Otherwise, it worked:
 * You become helpless for 5 turns while you are praying. (Ouch!)
 * Turns hostile undead monsters that you can see with a base range of 5 squares. Range increases by 1 square every 5 levels. If your level is higher than 15, hostile demons are turned as well.
 * These monsters are woken if they are sleeping.
 * If you are lawful or neutral, certain undead monsters may be killed instantly. If you are chaotic, they may become peaceful. These monsters are, in increasing order of difficulty: zombie, mummy, wraith, vampire, ghost, lich.
 * Demons and those undead not listed above will flee. Unless you are confused, in which case it removes fleeing and paralysis effects from those monsters instead.

Commentary
The helplessness side-effect limits this ability's usefulness, especially since it's only likely to kill undead less powerful than yourself. Use with caution.

Strategy
Needs testing, but this would probably clear a graveyard pretty fast if you're high enough level.