Hello
@Volimance!
A purely evented solution you can try is to give the enemy target another invisible state. Let's call it "target".
You then in your common event check wich enemy has the state target and run your conditionnals on him only.
It's quite a lot of conditionnals but I don't see any other way.
For a fully automated solution you'll have to use javascript, because the editor indeed lacks a way to get the current target of an action directly. (And to add/check/remove a state by its id too.)
The script snippet spoiler'd below is a way to do that.
Spoiler
var targetIndex = BattleManager._action._targetIndex //get the target of the current action
var target = $gameTroop.members()[targetIndex]; //get the enemy object from the index
var predatorSID = 5; var predatorSR = 7; //change here predator state ID and predator state Result to what you need
var preySID = 6; var preySR = 8; //same but with prey
if (target.isStateAffected(predatorSID)) { //if target is a predator
target.addState(predatorSR); //add the state of ID predator result
} else if (target.isStateAffected(preySID)) { //same with prey
target.addState(preySR);
}
This is meant to be used for single target spells, in a common event called by using a skill or item in battle only.
It won't work for multiple target spells and will crash your game if used outside battle.
I don't know if it works with yanfly passive states, but it does in my test project.
If I am understanding the script correctly then for the variables enumerated above (5, 6, 7, 8) I would use the IDs of the states as the occur in my project, correct?
Then once I've updated the script with the locally accurate state IDs, I'd then make a common event, click that diamond, turn to the third page and click on the script... button and paste the whole mess into that window, hit okay. I'd then link the skill to the common event as normal.
Also, given your precaution, I'd make certain to set the skill to only be accessible from the battle menu to prevent a game crash.
Is my understanding close to correct?
Thank you so much for taking the time to help me with this!!!