I'm trying to code a card that works similarly to Magical Hats.
Choose 1 Spell/Trap Card from your Deck. Special Summon it as a Normal Monster (ATK 0/DEF 0) in face-down Defense Position, Set all monsters you control, and shuffle them on the field.
I figured I'd take a look at the coding for Magical Hats to get an idea for how to do this. It didn't turn out too well. When I activate the card, it lets me select a Spell/Trap Card, but it doesn't Special Summon it. So I took out the coding I used to make it into a monster. It Special Summons the card now, but the "monster" can be targeted and destroyed by Mystical Space Typhoon.
Does anyone have any advice on how I can re-code this?