I'm making a skill where it's supposed to go like this
"Skill chooses a random ailment to add to the ally"
I want it to choose one from a pool of ailments and go with that, but im not sure how to do that
probably don't even need a plugin.
you can use the skill's after effect.
I don't remember how it would retain the battlers from the previous calculation, to access them to add the state, but they should be there somewhere. It only needs the right call.
that way you remove anything not related to the damage formula out of it.
.....you know... *as everyone SHOULD do*, whenever possible.
There's BattleManager._action._targetIndex but that requires a bit of coding knowledge to know how to use it as an index for the troop array. It also isn't reliably available at all given points of a battler's turn...caethyril gave a pretty thorough dissertation recently on how difficult it is to reliably retrieve the current target, wrote a whole little plugin function for it.