mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Axes' Critical Strikes now uses the rank system
This commit is contained in:
parent
9ff8692625
commit
105a81aede
@ -22,7 +22,7 @@ public enum SubSkillType {
|
|||||||
/* Axes */
|
/* Axes */
|
||||||
AXES_ARMOR_IMPACT(20),
|
AXES_ARMOR_IMPACT(20),
|
||||||
AXES_AXE_MASTERY(4),
|
AXES_AXE_MASTERY(4),
|
||||||
AXES_CRITICAL_STRIKES,
|
AXES_CRITICAL_STRIKES(1),
|
||||||
AXES_GREATER_IMPACT,
|
AXES_GREATER_IMPACT,
|
||||||
AXES_SKULL_SPLITTER(1),
|
AXES_SKULL_SPLITTER(1),
|
||||||
|
|
||||||
|
@ -26,10 +26,16 @@ public class ArcheryManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canDaze(LivingEntity target) {
|
public boolean canDaze(LivingEntity target) {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.ARCHERY_DAZE))
|
||||||
|
return false;
|
||||||
|
|
||||||
return target instanceof Player && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.ARCHERY_DAZE);
|
return target instanceof Player && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.ARCHERY_DAZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canSkillShot() {
|
public boolean canSkillShot() {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.ARCHERY_SKILL_SHOT))
|
||||||
|
return false;
|
||||||
|
|
||||||
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.ARCHERY_SKILL_SHOT);
|
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.ARCHERY_SKILL_SHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,10 +12,7 @@ import com.gmail.nossr50.util.Permissions;
|
|||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
|
import com.gmail.nossr50.util.random.RandomChanceUtil;
|
||||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
import com.gmail.nossr50.util.skills.*;
|
||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
|
||||||
import com.gmail.nossr50.util.skills.SkillActivationType;
|
|
||||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
||||||
@ -29,22 +26,37 @@ public class AxesManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUseAxeMastery() {
|
public boolean canUseAxeMastery() {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.AXES_AXE_MASTERY))
|
||||||
|
return false;
|
||||||
|
|
||||||
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_AXE_MASTERY);
|
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_AXE_MASTERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canCriticalHit(LivingEntity target) {
|
public boolean canCriticalHit(LivingEntity target) {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.AXES_CRITICAL_STRIKES))
|
||||||
|
return false;
|
||||||
|
|
||||||
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_CRITICAL_STRIKES);
|
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_CRITICAL_STRIKES);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canImpact(LivingEntity target) {
|
public boolean canImpact(LivingEntity target) {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT))
|
||||||
|
return false;
|
||||||
|
|
||||||
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT) && Axes.hasArmor(target);
|
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT) && Axes.hasArmor(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canGreaterImpact(LivingEntity target) {
|
public boolean canGreaterImpact(LivingEntity target) {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.AXES_GREATER_IMPACT))
|
||||||
|
return false;
|
||||||
|
|
||||||
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_GREATER_IMPACT) && !Axes.hasArmor(target);
|
return target.isValid() && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.AXES_GREATER_IMPACT) && !Axes.hasArmor(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUseSkullSplitter(LivingEntity target) {
|
public boolean canUseSkullSplitter(LivingEntity target) {
|
||||||
|
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.AXES_SKULL_SPLITTER))
|
||||||
|
return false;
|
||||||
|
|
||||||
return target.isValid() && mcMMOPlayer.getAbilityMode(SuperAbilityType.SKULL_SPLITTER) && Permissions.skullSplitter(getPlayer());
|
return target.isValid() && mcMMOPlayer.getAbilityMode(SuperAbilityType.SKULL_SPLITTER) && Permissions.skullSplitter(getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,6 +91,11 @@ Axes:
|
|||||||
Rank_1: 5
|
Rank_1: 5
|
||||||
RetroMode:
|
RetroMode:
|
||||||
Rank_1: 50
|
Rank_1: 50
|
||||||
|
CriticalStrikes:
|
||||||
|
Standard:
|
||||||
|
Rank_1: 2
|
||||||
|
RetroMode:
|
||||||
|
Rank_1: 20
|
||||||
ArmorImpact:
|
ArmorImpact:
|
||||||
Standard:
|
Standard:
|
||||||
Rank_1: 5
|
Rank_1: 5
|
||||||
|
Loading…
Reference in New Issue
Block a user