mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Rupture will now check your rank before activating
This commit is contained in:
parent
6428c65720
commit
c6e1edee91
@ -32,8 +32,8 @@ public class SwordsManager extends SkillManager {
|
|||||||
return mcMMOPlayer.getToolPreparationMode(ToolType.SWORD) && Permissions.serratedStrikes(getPlayer());
|
return mcMMOPlayer.getToolPreparationMode(ToolType.SWORD) && Permissions.serratedStrikes(getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUseBleed() {
|
public boolean canUseRupture() {
|
||||||
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE);
|
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_RUPTURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUseCounterAttack(Entity target) {
|
public boolean canUseCounterAttack(Entity target) {
|
||||||
@ -49,7 +49,7 @@ public class SwordsManager extends SkillManager {
|
|||||||
*
|
*
|
||||||
* @param target The defending entity
|
* @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 (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)) {
|
if (getSkillLevel() >= AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE)) {
|
||||||
|
@ -54,8 +54,8 @@ public final class CombatUtils {
|
|||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.SWORDS);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.SWORDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swordsManager.canUseBleed()) {
|
if (swordsManager.canUseRupture()) {
|
||||||
swordsManager.bleedCheck(target);
|
swordsManager.ruptureCheck(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swordsManager.canUseSerratedStrike()) {
|
if (swordsManager.canUseSerratedStrike()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user