View Single Post
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 10th, 2018, 07:21 AM
Code:
    <prereq message="This ability (or an equivalent) has already been added to the hero.">
      <match><![CDATA[
        thing.useronce
        ]]></match>
      <validate><![CDATA[
        ~ If this is a pick, we're valid
        validif (@ispick <> 0)

        ~ Otherwise, see if the identity tag for this thing appears in the
        ~ "HasFeat" group on the Hero. If it does, we already have this feat,
        ~ so we don't need another copy
        if (altthing.tagis[component.BaseFeat] <> 0) then
          @valid = !altthing.tagmatch[thingid,IsFeat,current]
        else
        ~if we're not a feat, perform the same check using the HasAbility group
          @valid = !altthing.tagmatch[thingid,Ability,current]
          endif
        ]]></validate>
      </prereq>
That's the code for the pre-req. I would say check you custom abilities you've added, see if any of them have the same Ability tag as the one you want to add there. If so, I assume it would be for the purposes of meeting the same pre-reqs as the other, but if that is the case you should be useing HasAbility tags. Although there is a mismatch between the note and code there... Maybe it switched recently? I will look into it.
Aaron is offline   #14 Reply With Quote