Cubic heal trigger based on target HP.

This commit is contained in:
MobiusDev
2018-12-23 16:34:47 +00:00
parent 251c83368f
commit dab8eef697
10 changed files with 40 additions and 10 deletions

View File

@ -189,7 +189,10 @@ public class CubicInstance
final L2Character target = stream.sorted(Comparator.comparingInt(L2Character::getCurrentHpPercent)).findFirst().orElse(null);
if (target != null)
{
activateCubicSkill(skill, target);
if (Rnd.nextDouble() > (target.getCurrentHp() / target.getMaxHp()))
{
activateCubicSkill(skill, target);
}
break;
}
}