Yanfly Class System - restricting certain subclasses to specific classes

Hi,


I'm implementing Yanfly ClassChangeCore http://yanfly.moe/2015/11/27/yep-32-class-change-core/ along with Subclass http://yanfly.moe/2015/11/29/yep-34-subclass/


I can't seem to achieve what I to, though. I have 3 primary classes; Warrior, Thief and Mage. I want the 3 classes to have several unique subclasses, so Warrior might have a subclass Paladin, Gladiator etc.. In other words you can't be a Mage/Thief + Paladin, only Warrior + Paladin.


I can restrict actors to certain subclasses and classes by writing <Restrict Subclass: 1> , but since I don't know which class the actor will have (since they can be changed), I can't do that. And writing  <Restrict Subclass: 1> on a class instead of an actor doesn't work. 


Is there any way to do this? I don't mind changing code in the script if necessary.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-class-system-restricting-certain-subclasses-to-specific-classes.67019/