Hello guys! First post here,
Anyways I was trying to make a fire shield state that has a chance to add burn to attackers.
In these forums I've found this code I'll include below that allows me to add burn to attackers, however I don't want it to happen every time.
<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
user.addState(x);
}
</Custom React Effect>
I was hoping someone could enlighten me on a way to use random variable in this code that would cause this to
happen only 50% of the time. I am using Yanflys states plugin and many others.
Anyways I was trying to make a fire shield state that has a chance to add burn to attackers.
In these forums I've found this code I'll include below that allows me to add burn to attackers, however I don't want it to happen every time.
<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
user.addState(x);
}
</Custom React Effect>
I was hoping someone could enlighten me on a way to use random variable in this code that would cause this to
happen only 50% of the time. I am using Yanflys states plugin and many others.