• 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

Limit multiple selections of a custom racial ability?

TCArknight

Well-known member
I have a couple of Custom Racial abilities that are selected through a configurable. One of these can be selected a maximum of three times, with minimum levels of 5,10 and 15 for first, second and third selections.

Is there a simple way with an prereq or eval rule to enforce these selections and grey out the choice on the selector?
 
Looks like what I used was a pre-req like Improved Natural Armor which was you could take it for every 5 summoner levels and is this code

Code:
        var allowed as number
        if (ishero = 0) then
          allowed = round(parent.field[xAllLev].value/5,0,-1) + 1
        elseif (isminion <> 0) then
          allowed = round(herofield[tCompLevel].value/5,0,-1) + 1
          endif

        ~ if we're a pick, then there must be complevel/5 or fewer copies of
        ~ this ability
        if (@ispick <> 0) then
          validif (tagcount[HasAbility.rcEiNatArm] <= allowed)

        ~ otherwise, look for fewer, since we're adding this
        else
          validif (tagcount[HasAbility.rcEiNatArm] < allowed)
          endif

        @message = "You may not have more than " & allowed & " copies of this ability."
 
Back
Top