Spellcasters loyal to the goodly army cooperated on a spell of sealing that bound the demoness Zuggtmoy (a major instigator in the Horde of Elemental Evil) to some of the deepest chambers in the castle's dungeons.