Unnamed
public text v1 · immutablevoid::breakondamage(damage, aura) {
float damage_perc = damage/p_maxhp;
float break_chance = damage_perc/0.75;
if (break_chance) > 1 {
break_chance = 1;
}
int roll = rand(0,100);
if ((break_chance x 100) >= roll) {
removeaura(aura);
}
}
// This will replace whatever function you have for removeaura() for roots and fear. Also before calling this function for removing roots, the damage type must be checked to not be damage caused by roots (if possible)