Hi there, I have made an state with yanfly buff that makes the hero inflict an state when it deals a critical hit, this is the code:
It works fine but now I want to give it a chance of inflict the state, lets say for example "when the hero deals a critical hit, there is a chance of 30% to inflict poison to the enemy"
Thanks for your help
Code:
<Custom Establish Effect>
if (target.result().critical) {
target.addState(x);
}
</Custom Establish Effect>
It works fine but now I want to give it a chance of inflict the state, lets say for example "when the hero deals a critical hit, there is a chance of 30% to inflict poison to the enemy"
Thanks for your help