Turn Undead/sandbox

Turn Undead checks
Turning undead consists of the following checks:
 * 1) Turning check: This determines the maximum number of Hit Dice a monster can have and still be affected from your turn undead attempt. If this check does not produce a number equal or higher to the monster near you that has the lowest hit dice, then you will not be able to turn at all and a message pops up saying "You lack conviction to turn the target".
 * 2) Turning damage: This determines the number of total Hit Dice you will be able to turn. This means that the sum of the affected monsters' hit dice must be less or equal to that number. To determine which monsters you turn, the game starts from the monster with the lowest HD (hit dice) and works its way up. For example: If you can turn 30 total hit dice and you have monsters with (5, 7, 10, 15) HD around you, you will turn the ones with (5, 7, 10) for a total of 22 hit dice and not the (15, 10, 5) that would utilize all 30 of your hit dice.

Before making the checks, your effective turning level is calculated. This consists of: The checks add the following things to produce the final number:
 * 1) The sum of your inherent turning levels. Your inherent turning level starts to increase from the level you receive the Turn Undead feat. For clerics, their cleric level is their inherent turning level. For paladins, their level minus 3 is their inherent turning level. A character with both cleric and paladin levels will add their inherent turning levels.
 * 2) Any bonus to your turn level from other sources.
 * 1) Turning check:
 * 2) Your effective turning level.
 * 3) A die roll (1d20 + your charisma modifier) that adds a positive/negative bonus (from -4 to +4) according to the table on the right.
 * 4) Any bonus to your maximum hit dice from other sources.
 * 5) Turning damage:
 * 6) Your effective turning level.
 * 7) A die roll (2d6 + your charisma modifier) that adds the result as is (unlike the die roll of the turning check).
 * 8) Any bonus to your total hit dice from other sources.

Turn Undead effects
When a monster is affected by your turn attempt, one of the following may happen to it:

Cowering undead: That's the default behavior of turn undead. The monster cowers in place for a period of time. It is not in a helpless state. Once the timer expires, the monster will resume attacking.

Destroying undead: When a monster is affected by your turn attempt, its hit dice are compared to your turning check result. If your turning check result is at least double the monster's hit dice, then the monster is destroyed instead of turned. This effect, in contrast to the cowering effect, is negated by deathblock or deathward. Having the Mighty Turning enhancement means this effect is always applied instead of the cower effect.

Cleric domains may augment Turn Undead to produce more effects. Some of those affecting nearby allies.

Bonuses to Turning
There are also items, spells, and enhancements which can help increase your turning ability by boosting your effective cleric level for turning or the number of maximum hit dice you can affect or the number of total hit dice you can turn. These bonuses, according to their type, are added to their respective parts of the turn undead calculations (some in more than one place).

Note: Levels gained in Epic Destiny of any Divine Sphere do not add to your Effective Cleric Levels for purposes of Turn Undead.

Bonuses to Turning Level
Note 1: The feat Aureon's Instruction cannot be taken by Sun Elf. Note 2: The Radiant Servant enhancements stack with the Knight of the Chalice enhancements.
 * (+2 normal bonus)
 * Eternal Faith items
 * (+2 insightful bonus)
 * Insightful Faith items
 * (+3 exceptional bonus)
 * The spell Seek Eternal Rest will add a stacking +4 sacred bonus to your turning level.
 * The enhancement Improved Turning (RS/KotC) can add from 1 to 3 points to your turning level.
 * The feat Improved Turning will add 1 to your turning level.
 * The feat Aureon's Instruction grants +2 to your effective level for Turn Undead.
 * The enhancement Bane of the Restless (Sun Elf) grants +6 to your turning level.
 * The Past Life: Cleric can add from 2 to 6 turning levels.
 * Death Domain adds +2 to your turning level.
 * The filigree Embraced by Light: Turn Undead adds +2 to your turning level (unconfirmed).
 * The filigree Embraced by Light: Turn Undead adds +2 to your turning level (unconfirmed).

Bonuses to Max Hit Dice
Note 1: The first 2 normal (in lieu of an official word) bonuses do not stack. Note 2: The feat Aureon's Instruction cannot be taken by Sun Elf.
 * (+2 normal bonus)
 * Eternal Faith items
 * (+X normal bonus)
 * Hallowed items
 * (+2 insightful bonus)
 * Insightful Faith items
 * The feat Aureon's Instruction grants +4 to maximum Hit Dice affected when using Turn Undead.

Bonuses to Total Hit Dice
Note 1: The first 3 normal (in lieu of an official word) bonuses do not stack. Note 2: The feat Aureon's Instruction cannot be taken by Sun Elf. Note 3: The Radiant Servant enhancements stack with the Knight of the Chalice enhancements.
 * (+4 normal bonus)
 * Eternal Faith items
 * (+2 normal bonus)
 * Sacred items
 * (+6 normal bonus)
 * Silver Flame items
 * (+4 insightful bonus)
 * Insightful Faith items
 * The enhancement Improved Turning (RS/KotC) can add from 2 to 6 total hit dice.
 * Death Domain adds +2 to the hit dice of undead affected.
 * The feat Aureon's Instruction grants +4 to the total Hit Dice affected by Turn Undead.
 * The enhancement Bane of the Restless (Sun Elf) adds 6 to the number of hit dice you can turn.
 * The enhancement Bane of the Restless (Sun Elf) adds 6 to the number of hit dice you can turn.

Sources of Extra Charges
See: Channel Divinity: Sources of extra charges