So, i've found this example of block damage using YEP Auto Passive State, but i wanted it to reduce damage instead of setting it to 0.
Code:
[COLOR=rgb(0,0,136)]<Custom[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,0,102)]React[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,0,102)]Effect[/COLOR][COLOR=rgb(0,0,136)]>[/COLOR][COLOR=rgb(0,0,0)]
//just replace 50/100 with the percentage.
if(Math.random()>50/100) {
target.startAnimation(53);
value = 0;
}
[/COLOR][COLOR=rgb(0,0,136)]</Custom[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,0,102)]React[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,0,102)]Effect[/COLOR][COLOR=rgb(0,0,136)]>[/COLOR]