Dungeon Guardian

The  is an enemy that spawns if the player enters the dungeon in a world where Skeletron has not been killed. It will appear in order to kill the player as soon as the dungeon music starts. In addition, it will also target any other players in the vicinity of the player who entered the dungeon.

Due to its unattainably high attack and defense, the Dungeon Guardian will always take 1 damage from all attacks (except criticals, which deal 2 damage) and will kill any player in one hit unless they have the Master Ninja Gear or Black Belt which has a chance to dodge attacks. A player with max HP, has 100+ defense with Beetle Armor and under the effect of Lifeforce Potion may survive one hit from this monster as well.



History
Before the Dungeon Guardian existed, Skeletron Heads fulfilled a similar role. Unlike with the Dungeon Guardian, killing all of the Skeletron Heads after they appear will grant the player access to the Dungeon as if they had killed Skeletron normally. The Dungeon Guardian was presumably introduced to counteract this unintended behavior.

Strategies
Due to the high defense of the Dungeon Guardian, it is best to use armor/accessories that boost your critical strike chance rather than damage, and use a rapid hitting weapon such as a Megashark or S.D.M.G. with Crystal Bullets to increase the number of times you hit it.
 * One tactic that can be used to kill the Dungeon Guardian (post 1.2) is to make a skybridge out of Asphalt Blocks. Run on the asphalt with Hermes/Flurry/Spectre/Lightning Boots in order to maintain a faster speed than the dungeon guardian. Get four Teleporters and set them one on each end and then an other 60-70 blocks away from the one nearest to the edge. Put a pressure plate on each of the edge teleporters and wire them so that once you step on it, you teleport in the opposite direction.

This will allow you to switch running directions without being killed by the guardian. If using a Minishark or Megashark, this fight should take you no longer than 10-15 minutes.


 * Another useful and common tactic is to wear Frost Armor and use 3-4 Gravitation Potions, any rapid-firing weapon and Chlorophyte bullets, wearing Wings and reforge all your accessories so they grant maximum critical chance. Activate your Gravitation Potion, dig a straight line into the dungeon, and once you hear the sound you hear when summoning any boss you press the "Up" button (Default on W), flap your wings very shortly so he can catch up and start firing at it. To make distance between you and the Dungeon Guardian you wait a bit longer before you flip back and forth using your Gravitation Potion, and to close the distance you keep it fast-paced.

It will take you around 7-10 minutes and if you combine this with Ammo Reservation Potions and an Ammo Box, you (most likely) only need your ammo bar full of Chlorophyte Bullets and (most likely again) still have a nice amount of bullets left.


 * You can also use the Piranha Gun and Frost Armor, since the Dungeon Guardian is affected by Frostburn and the Piranha Gun latches onto the Dungeon Guardian, making it easier because you don't have to aim, however, you need to be close, else the Piranha will return and need to be fired again.


 * Another tactic is to use Venom Bullets and a Megashark, Minishark or a Chain Gun, since he isn't resistant to venom debuff and this makes the fight go faster because he will always take 4 damage per second.


 * A cheatsy yet effective way to farm for the Bone Key is to make a Hoik, which is a teleportation glitch that allows players to shift through ramp blocks into other teleporters, etc.

Bugs

 * If two people are on a server, It is possible to summon Skeletron and the Dungeon Guardian at the same time. If these two interact with each other, the Dungeon Guardian will kill Skeletron. This will render a glitch in which Skeletron is dead, however the Dungeon Guardian is still active in the dungeon, rendering it impossible to access the dungeon until you kill the Dungeon Guardian itself.
 * If you are close to the area of the Dungeon where the Guardian will come out and kill you, but you aren't in the dungeon itself but underground near it, he may go through the dungeon walls and kill you, even if you don't mean to go inside it via mining.(uh-oh!)