Eval to Remove all spells of a specific type?

I have a casting system set up in RMMV based around a state.
Using Yanfly's states & buffs core, I'm using a state removal eval to remove all skills of the "Cast" type

The basic logic is:
 


for(each of the actor's skills)


{


   if(the skill is of Stype3)


   {


       remove the skill


   }


}
Where are you using the state removal eval?  In a damage formula?  In a script call?  What is the context?  What is your actor object called?
Where are you using the state removal eval?  In a damage formula?  In a script call?  What is the context?  What is your actor object called?

The state itself
 


<Custom Leave Effect>


>Eval goes here


</Custom Leave Effect>

I think the actor object is just "this"
Bump

Original thread: https://forums.rpgmakerweb.com/threads/eval-to-remove-all-spells-of-a-specific-type.64252/