Open weso12 opened 3 years ago
Thanks for the report. I looked at the issue and found that the problem is related to "random" targeting in general.
When I wrote the plugin I had intended it to be used for skills where you would select a target and hadn't considered what happens if the skill picks a random target.
So for example you pick an ally, and then if the ally is dead, it would apply the skill to another ally. And if you pick an opponent, it would apply the skill to another opponent. This is to match the default targeting behavior.
Problem is, for random targeting, this logic doesn't work, because we don't actually have a specific target at this point (an actor or an enemy). How "any" target should be determined is open to interpretation at this point. Would it randomly decide to attack allies or opponents, and then from the selected team, pick one random target?
The issue could be fixed if a specific team were to be determined for a random target, but I'm not sure what would be the best way to do it.
To replicate the issue here's what I did