Also, create another identity tag group on abilities - HasAbility, for example.
Each ability pushes that tag to the hero when it's learned:
Code:
perform hero.pushtags[HasAbility.?]
Each class will duplicate each of its cost tags and convert them to a HasAbility tag while duplicating them:
Code:
perform pushtags[AdvCst100.?,HasAbility]
perform pushtags[AdvCst200.?,HasAbility]
etc.
Then, when the class needs to ask "how many of my abilities have been added?" here's the test it can perform:
Code:
thecount = hero.intersect[HasAbility,HasAbility,counttarget]