• 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

Favored Enemy bonus

mbran01

Well-known member
I am trying to input the Foe Hunter feat. This basically gives you a favored enemy and if you are a ranger and choose the same favored enemy as your favored foe they stack. The issue is that I can not seem to get the bonus added to the ranger's favored enemy. Here is what I have:

~if we choose the same favored foe they stack
if (field[usrChosen1].chosen.pulltags[thingid.feDragon] = 1) then
if (hero.childfound[resEnemSel].tagis[thingid.feDragon] = 1) then
hero.child[resEnemUpg].field[resMax].value += 1
endif
endif

If I use this: hero.child[resEnemUpg].field[resMax].value += 1
by itself it works fine, as soon as I put it in the if statment it quits working (no errors, just doesn't work). Which makes me think my if/then statements are broken.
 
I think I figured it out. Here is what I came up with it seems to work.

~if we choose the same favored foe they stack
if (hero.childfound[resEnemSel].tagis[thingid.feDragon] <> 1) then
if (field[usrChosen1].chosen.pulltags[thingid.feDragon] = 1) then
foreach pick in hero where "thingid.feDragon"
hero.childfound[resEnemUpg].field[resMax].value += .5
perform hero.childfound[fFoeHunter].delete[Helper.ShowSpec]
nexteach
endif
endif

I think its beginning to sink in. It'll be a slow painful process, but I think I am learning.
 
I do have one question though, the feat gives me a .5 upgrade, is there a way to modifiy it so that it only counts 1 tag so I can have just full values. Not a big deal just curious.
 
Well I answered my own question. I put this on at the end of the script.

~delete our half upgrade
if (hero.childfound[resEnemUpg].field[resMax].value = .5) then
hero.childfound[resEnemUpg].field[resMax].value -= .5
endif

Oh, and I forgot to say thank you so...Thank you for your help!!
 
Back
Top