• 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

2 Combat Edges as a Prerequisites?

You could either do:
Code:
hero.tagis[Edge.edgTDNCO] + hero.tagis[Edge.edgTDOffic] <> 0
For every combat Edge (seems like a lot to list, though, and you'll miss any if you happen to add one later.)

Or set up a variable to act as a counter, step through Edges just like you would when stepping through Knowledge skills, and check for the Edge type (I'm not sure of the syntax on that but I can try to find it tomorrow) and increment the variable by 1 each time it finds a Combat one. Then you just set a validif for the variable being > 1 and drop out of the foreach loop.
 
So, you mean how to make it be "Any 2 Combat Edges"? That would need to reference an eachpick where Edge is EdgeType.Combat.
 
OK, I got it if you mean "Any 2 Combat Edges"

Make a Pre-reqs
Message is "Requires any 2 Combat Edges."
Code:
        var total as number
        total = 0

        ~Make sure at least two Combat Edges exist.
          foreach pick in hero where "EdgeType.Combat"
              total += 1
          nexteach

        ~if we have at least two valid edges, we're valid
        validif (total >= 2)

        ~if we got here, we're invalid
        if (@ispick <> 0) then
          altpick.linkvalid = 0
          endif
 
Last edited:
I think you can simplify that a bit. Maybe something like:

Code:
        var total as number
        total = 0

        ~Make sure at least two Combat Edges exist.
          foreach pick in hero where "EdgeType.Combat"
              total += 1
             if (total >= 2)
                validif (total >= 2)
                done
             endif
          nexteach

        ~if we got here, we're invalid
        if (@ispick <> 0) then
          altpick.linkvalid = 0
          endif

That "done" should get your dropped out of the code a lot quicker if it gets there. I'm also not sure you should bother including the whole "if (@ispick <> 0) then" section since is stays invalid unless it's forced valid by the validif line, but there could be some completely other reason for that of which I'm utterly unaware (which is entirely likely, mind you).
 
Back
Top