From c6e1edee910720ba472d503aeefb9a798469059b Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 23 Jan 2019 12:34:21 -0800 Subject: [PATCH] Rupture will now check your rank before activating --- .../java/com/gmail/nossr50/skills/swords/SwordsManager.java | 6 +++--- .../java/com/gmail/nossr50/util/skills/CombatUtils.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java index 8ac106a84..f797c3f16 100644 --- a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java @@ -32,8 +32,8 @@ public class SwordsManager extends SkillManager { return mcMMOPlayer.getToolPreparationMode(ToolType.SWORD) && Permissions.serratedStrikes(getPlayer()); } - public boolean canUseBleed() { - return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE); + public boolean canUseRupture() { + return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_RUPTURE); } public boolean canUseCounterAttack(Entity target) { @@ -49,7 +49,7 @@ public class SwordsManager extends SkillManager { * * @param target The defending entity */ - public void bleedCheck(LivingEntity target) { + public void ruptureCheck(LivingEntity target) { if (SkillUtils.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_RUPTURE, getPlayer(), this.skill, getSkillLevel(), activationChance)) { if (getSkillLevel() >= AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE)) { diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index 92f7892d7..e594ab40f 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -54,8 +54,8 @@ public final class CombatUtils { mcMMOPlayer.checkAbilityActivation(PrimarySkillType.SWORDS); } - if (swordsManager.canUseBleed()) { - swordsManager.bleedCheck(target); + if (swordsManager.canUseRupture()) { + swordsManager.ruptureCheck(target); } if (swordsManager.canUseSerratedStrike()) {