• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Detecting Duplicate Selection

AndrewD2

Well-known member
I've got a Custom Ability for an Oracle that grants them a spell like ability from the wizard/sorcerer list. Great I copy Major Magic from the Rogue. But then the next thing is that you can take it multiple times but can't take it for the same spell twice.

I say great, it's like spell focus so I go grab this eval rule from Spell Focus

Code:
    ~ If we're not shown, just get out now
    doneif (tagis[Helper.ShowSpec] = 0)

          @valid = 1 - tagis[Helper.Duplicate]

      if (@valid = 0) then
        hero.panelvalid[feats] = 0
        endif

I see that it assigns the Helper.Duplicate tag if it's the same one that's selected, but it appears that it decides that through a procedure that I'm not sure what it does, and the name looked like it might be specifically for spell focus.

So trying to figure out how to add the Helper.Duplicate tag if the SpInfo matches on two different selections of this ability and I'm guessing I also need to figure out what the panelvalid id is for the oracle class tab since doing something on the feats panel would be kinda useless.

If there's a Custom Ability that already does that that I could copy, great, but I don't know it.

Thanks for any help,
Andrew
 
Have each copy pull the SpInfo tag for the chosen spell.

Then (in a later eval rule) have each copy foreach through all copies of this custom ability specifically, looking for an intersect between this copies SpInfo tag and the current pick's copy (increment a variable for each match found). After the foreach, have a validif the variable is 1 or less (there will always be 1 match, since the copy will intersect with itself).
 
Back
Top