From dab8eef697b8f8a159846b75db1083a153f68e56 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 23 Dec 2018 16:34:47 +0000 Subject: [PATCH] Cubic heal trigger based on target HP. --- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- .../com/l2jmobius/gameserver/model/cubic/CubicInstance.java | 5 ++++- 10 files changed, 40 insertions(+), 10 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java index d0c2171eab..d827eefcf4 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/cubic/CubicInstance.java @@ -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; } }