Im trying to make a formula using Yanfly Skill Core that checks if enemy has a specific state then has a 25% chance to proc to add another state. Here's what I have and it won't work
<Post-Damage Eval>
ChanceRate = .25;
if (b.result().isHit()) {
if b.isStateAffected(27) && if Math.random() < ChanceRate {
b.addState(8);
}
}
</Post-Damage Eval>
Heres the error I get in the debug:
SyntaxError: Unexpected identifier {stack: (...), message: "Unexpected identifier"}message: "Unexpected identifier"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error
<Post-Damage Eval>
ChanceRate = .25;
if (b.result().isHit()) {
if b.isStateAffected(27) && if Math.random() < ChanceRate {
b.addState(8);
}
}
</Post-Damage Eval>
Heres the error I get in the debug:
SyntaxError: Unexpected identifier {stack: (...), message: "Unexpected identifier"}message: "Unexpected identifier"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error