2 ways to make magic miss.
1. bonus bNoMagicDamage,100;
2. bonus Mdef,100;
#1 makes magic miss always no matter what happens.
#2 can be made so a card ignores it, scripting wise its literally the only way, all magic is reduced by 10% though, meaning the card ignores your mdef but not all of it.