Hi,
As the title says, am trying to create a skill that will only be able to target enemies that have a certain passive state applied to them. I am using VisuStella's BattleCore and SkillsStatesCore and have been able to successfully add the passive state to an enemy. However when I use the following notetag on my skill, it still allows the player to target any enemy in the troop.
<JS Targets>
targets=user.opponentsUnit().aliveMembers().filter(member => member.isStateAffected(3));
</JS Targets>
I read in the documentation that passive states are seen differently than states that are applied directly. The documentation says that when creating a damage formula you should use "a.states().includes($dataStates[X])" to check for them rather than "a.isStateAffected(X)"
This led me to believe that maybe if I replaced "member.isStateAffected(3)" with "member.states().includes($dataStates[3])" it might work. However this resulted in the same issue.
What am I doing wrong?
Thank you in advance for any help!
As the title says, am trying to create a skill that will only be able to target enemies that have a certain passive state applied to them. I am using VisuStella's BattleCore and SkillsStatesCore and have been able to successfully add the passive state to an enemy. However when I use the following notetag on my skill, it still allows the player to target any enemy in the troop.
<JS Targets>
targets=user.opponentsUnit().aliveMembers().filter(member => member.isStateAffected(3));
</JS Targets>
I read in the documentation that passive states are seen differently than states that are applied directly. The documentation says that when creating a damage formula you should use "a.states().includes($dataStates[X])" to check for them rather than "a.isStateAffected(X)"
This led me to believe that maybe if I replaced "member.isStateAffected(3)" with "member.states().includes($dataStates[3])" it might work. However this resulted in the same issue.
What am I doing wrong?
Thank you in advance for any help!