• 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

How to add either/or requirements

Aril

Well-known member
Is it possible to create an ability that can have alternative requirements for entry?

For instance, is it possible to make Feat C require EITHER Feat A OR Feat B for entry?
 
Yes, for example:
In pre-reqs
validif (#hasfeat[featA_id] > 0)
validif (#hasfeat[featB_id] > 0)

This will be valid as long as one (or both) feats exist.

I'm also quite sure that | represents "or" in scripting. I just can't find something in my HL notes to confirm it.
 
You can also take advantage of the fact that #hasfeat[] will return "0" if false, and "1" if true, and add them together, and get the total:


As an exprreq, rather than a prereq:

#hasfeat[featA_Id] + #hasfeat[featB_Id] <> 0


Or, convert it into the full tags - skip the macro (this one also works in an exprreq:

tagexpr[HasFeat.FeatA_Id | HasFeat.FeatB_Id] <> 0
 
Back
Top