I would like to reference a characters state rate in my skill / state notetags to check for their state rates.
As an example, I have this notetag in one of my skills:
(Note: State 195 is a powerup-state that strengthens certain skills like this one, State 65 is blindness)
<Post-Damage Eval>
if (user.isStateAffected(195)) {
user.removeState(195);
rate = 30;
if (Math.randomInt(100)+1 <= rate) {target.addState(65);}
} else {
user.addState(195);
}
</Post-Damage Eval>
Now, if an enemy has "State Rate: Blindness * 50%" for example, the actual chance will still be 30% instead of 15%.
Looking through the console, I believe this is what I am looking for:
But clearly these are not values I can easily reference in code like most other values.
So how do I utilize these values in my code? I am looking for something like this:
Edit: This code is actually correct from the get-go
<Post-Damage Eval>
if (user.isStateAffected(195)) {
user.removeState(195);
rate = 30 * target.stateRate(65);
if (Math.randomInt(100)+1 <= rate) {target.addState(65);}
} else {
user.addState(195);
}
</Post-Damage Eval>
Any help is welcome.
As an example, I have this notetag in one of my skills:
(Note: State 195 is a powerup-state that strengthens certain skills like this one, State 65 is blindness)
<Post-Damage Eval>
if (user.isStateAffected(195)) {
user.removeState(195);
rate = 30;
if (Math.randomInt(100)+1 <= rate) {target.addState(65);}
} else {
user.addState(195);
}
</Post-Damage Eval>
Now, if an enemy has "State Rate: Blindness * 50%" for example, the actual chance will still be 30% instead of 15%.
Looking through the console, I believe this is what I am looking for:
But clearly these are not values I can easily reference in code like most other values.
So how do I utilize these values in my code? I am looking for something like this:
Edit: This code is actually correct from the get-go
<Post-Damage Eval>
if (user.isStateAffected(195)) {
user.removeState(195);
rate = 30 * target.stateRate(65);
if (Math.randomInt(100)+1 <= rate) {target.addState(65);}
} else {
user.addState(195);
}
</Post-Damage Eval>
Any help is welcome.