Hi everyone,
I have an enemy I'm trying to create that uses a skill which casts a state on itself.
When the state is applied, the enemy is supposed react to a physical attack from any actor and then attack the entire party instantly. Here's what I tried to set up on the state itself:
When that wasn't working, I tried to shove everything under Custom Respond Effect (thinking that putting the check for physical damage before the damage eval was the problem), like so:
And, trialing it in battle, when any actor attacks the enemy when the state is applied, skill 97 isn't forced.
I have a funny feeling this is something to do with using "user" (thinking that the enemy with the state applied to it is the "user") and perhaps this needs to change?
I have an enemy I'm trying to create that uses a skill which casts a state on itself.
When the state is applied, the enemy is supposed react to a physical attack from any actor and then attack the entire party instantly. Here's what I tried to set up on the state itself:
Code:
<Custom Apply Effect>
user._counterAttack = false;
</Custom Apply Effect>
<Custom React Effect>
if (value > 0 && this.isPhysical()) {
user._counterAttack = true;
}
</Custom React Effect>
<Custom Respond Effect>
if (user._counterAttack){
user.forceActionCast(97, 0);
user._counterAttack = false;
}
</Custom React Effect>
When that wasn't working, I tried to shove everything under Custom Respond Effect (thinking that putting the check for physical damage before the damage eval was the problem), like so:
Code:
<Custom Respond Effect>
if (value > 0 && this.isPhysical()) {
user._counterAttack = true;
}
if (user._counterAttack){
user.forceActionCast(97, 0);
user._counterAttack = false;
}
</Custom Respond Effect>
And, trialing it in battle, when any actor attacks the enemy when the state is applied, skill 97 isn't forced.
I have a funny feeling this is something to do with using "user" (thinking that the enemy with the state applied to it is the "user") and perhaps this needs to change?