The lightning moat is a well-known, though rarely used, weapon of defense. It consists of a number of pillars, topped with some kind of globe, placed around the position to be held; when activated, electricity will arc from pillar to pillar, making the perimeter impassable by anyone who does not want to come out the other side extra crispy. The principle appears to be similar to that used by Gilgamesh Wulfenbach's lightning staff and ionization system, which it may or may not have inspired; Maxim suggested that this device's rarity is for insurance reasons, but it might also have to do with energy requirements.
Castle Sturmvoraus had a lightning moat in operation during the tense leadup to the Battle of Sturmhalten. This was highly effective, forcing Agatha's rescue party to take a considerable detour, and only finally brought down through sneakiness and treachery from within.