BUG: The chance for Poison almost always happens, Even though its at 5% Chance,
CODE:
CODE:
code_language.skript:
on damage:
if {Poison::%attacker%} is more than 0:
set {_Poisona} to 0.2 * {Poison::%attacker%}
add 2 to {_Poisona}
chance of 5%
if {Poison_cooldown::%victim%} is not set:
apply potion of poison 2 to victim for "%{_Poisona}% seconds" parsed as a timespan
set {Poison_cooldown::%victim%} to now
if difference between {Poison_cooldown::%victim%} and now is greater than 10 seconds:
apply potion of poison 2 to victim for "%{_Poisona}% seconds" parsed as a timespan
set {Poison_cooldown::%victim%} to now