• 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

Giving bonus to Favored Enemies

frumple

Well-known member
Is there a tag I can use to distinguish favored enemies or favored terrains a character has. This is so I can add a bonus to them when an ability is activated.

So far I have the following:

Code:
foreach pick in hero from Ability where "FavTaken.?"
       eachpick.field[abValue].value += 1
    nexteach

But this gets both favored enemies and terrain. I just want the bonus to be added to one of them.

If there isn't such a distinguishing tag, could one be added? It would make things much easier to code when dealing with favored enemies/terrains.

Thanks!
 
FavTaken lists the class that takes the favored enemy terrain, what about doing

Code:
foreach pick in hero from Ability where "thingid.fe?"
  eachpick.field[abValue].value += 1
nexteach
 
Yep that works.

The only drawback is that it depends on the favored enemy having "fe" as the first two characters in its ID. If there was a tag it would be much more general.
 
I agree, but when you look at every tag that is on the favored enemy thing there is nothing that identifies them individually except for thingid and as it's not the easiest to add new favored enemies (you have to do it in raw XML) the likelihood that Lone Wolf won't follow their own naming convention is slim.
 
There is a tag that can be used to figure out whether you're looking at a favored terrain or a favored enemy. Hint: it's a tag that is present on all favored terrains, and not present on any favored enemies.
 
don't know if it's useful but I also just noticed that favored enemies have the portal.ClsFavor1 and favored terrain have portal.ClsFavor2
 
Andrew - portal. tags should be avoided if there's another way. Think about some of the projects you've been working on recently - re-using an existing set of abilities, but in a different portal. The portal. tags aren't going to work for cases where something like that has been done.

Oh, and looking for Id patterns - your fe? suggestion - that should not be used. Never count on Ids to be consistent unless you are the only person adding them.
 
Thanks for the info, I didn't even know what the portal tags are for also I knew the fe? wasn't a great idea, but it was AN idea :-D
 
Back
Top