I'm not sure I'll be able to get everything you want, because I'm having a very hard time figuring out what you're trying to say. However, you have some fundamental flaws in your JavaScript syntax, so we can at least correct that and see how it goes from there.
When you have an if conditional, you must put the condition inside parentheses, and you do not put a semicolon at the end of that line. So the correct syntax is:
I would expect due to you typing this incorrectly, none of your code in your states will work.
If the user is affected by a certain state, while use the default defend skill, it should give the user a extra effect, that his spell costs 15% less mp, in the next round.
You will need more than a passive state for this, you will need to add code to the function that gets called when the actor selects Guard. Inside of that, if they have the passive state, then also add your MP-decreasing state with a duration of one round.
If the user attack a target which applied him a certain state, which already affected by that same state, it should be removed or ignore to apply it again.
Unfortunately, I just can't understand what you're asking here. However:
JavaScript:
JS Passive Condition>
if target.isStateAffected(33);
target.removeState(33); {
condition = true;
} else {
condition = false;
}
</JS Passive Condition>
That's completely wrong. In addition to the errors with the if condition that I listed above, your braces are in the wrong place. The correctly-written version of that code is:
JavaScript:
<JS Passive Condition>
if (target.isStateAffected(33))
{
target.removeState(33);
condition = true;
}
else
condition = false;
</JS Passive Condition>
That being said...this will still never do anything. There's no such thing as "target" in a passive state, passive states only apply (and know anything about) the actor they're applied to.
This sounds like something you'd just add to the damage formula of a skill:
Code:
if (a.states().includes($dataStates[X])) b.removeState(33); then your damage formula
That will remove state 33 from the target if the attacker has passive state X.
Funny, about 2. at rpg maker vx ace it successfully remove the state if setup "remove by damage 100%" but not in mz.
It should.