Hi, I have created a Taunt state which force the ennemies to focus their physical attacks on your ally with the taunt state.
My problem is when the spell is casted during the turn, nexts ennemies attacks will not be redirect to my ally who use Taunt.
I'm using Yanfly's target core to create a custom target eval on my basic physical attack :
NB : if multiple allies or ennemies have the taunt state, we choose randomly the target of the attack (with the taunt state, obviously)
but it doesn't work... And basic attacks don't works at all with this target eval.
Need help please !
My problem is when the spell is casted during the turn, nexts ennemies attacks will not be redirect to my ally who use Taunt.
I'm using Yanfly's target core to create a custom target eval on my basic physical attack :
JavaScript:
<Custom Target Eval>
var members = foes.aliveMembers();
var tauntTargets[];
var clearInitialTargetDone = false;
targets.push(target);
for (var i = 0; i < members.length; ++i)
{
if(members[i].isStateAffected(5))
{
tauntTargets.push(members[i]);
if(!clearInitialTargetDone)
{
targets.pop();
clearInitialTargetDone = true;
}
}
}
if(tauntTargets.length > 0)
{
targets.push(tauntTargets[Math.randomInt(tauntTargets.length -1)]);
}
</Custom Target Eval>
NB : if multiple allies or ennemies have the taunt state, we choose randomly the target of the attack (with the taunt state, obviously)
but it doesn't work... And basic attacks don't works at all with this target eval.
Need help please !