Can Spell Detect Magic

When we want to know if a spell is capable of detecting magic, we run through the spell's special abilities and execute any scripts named CanSpellDetectMagic. If any script returns a answer contining the character 'Y', we stop and assume that the spell can, indeed, detect magic.
Right now this is done only at the start of a Give Treasure event when we want to know whether or not to include the option "Detect" in the menu.

Context