Taming's Beast Lore now uses a rank system

This commit is contained in:
nossr50 2019-01-26 11:21:25 -08:00
parent b39340227f
commit baf1796b08
7 changed files with 32 additions and 1 deletions

View File

@ -120,6 +120,7 @@ Version 2.1.0
! (Skills) Arrow Retrieval now uses a rank system
! (Skills) Axes' Critical Strikes now uses a rank system
! (Skills) Axes' Greater Impact now uses a rank system
! (Skills) Taming's Beast Lore now uses a rank system
! (Kraken) Removed everything involving the kraken
= (Skills) Shake now sends custom damage types for better nocheat compat
! (Config) Unarmed.IronArm in advanced.yml is now Unarmed.IronArmStyle

View File

@ -74,7 +74,7 @@ public enum SubSkillType {
SWORDS_SERRATED_STRIKES(1),
/* Taming */
TAMING_BEAST_LORE,
TAMING_BEAST_LORE(1),
TAMING_CALL_OF_THE_WILD,
TAMING_ENVIRONMENTALLY_AWARE(1),
TAMING_FAST_FOOD_SERVICE(1),

View File

@ -40,6 +40,9 @@ public class HerbalismManager extends SkillManager {
}
public boolean canGreenThumbBlock(BlockState blockState) {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.HERBALISM_GREEN_THUMB))
return false;
Player player = getPlayer();
ItemStack item = player.getInventory().getItemInMainHand();
@ -47,6 +50,9 @@ public class HerbalismManager extends SkillManager {
}
public boolean canUseShroomThumb(BlockState blockState) {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.HERBALISM_SHROOM_THUMB))
return false;
Player player = getPlayer();
PlayerInventory inventory = player.getInventory();
Material itemType = inventory.getItemInMainHand().getType();
@ -55,6 +61,9 @@ public class HerbalismManager extends SkillManager {
}
public boolean canUseHylianLuck() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.HERBALISM_HYLIAN_LUCK))
return false;
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.HERBALISM_HYLIAN_LUCK);
}

View File

@ -37,6 +37,9 @@ public class MiningManager extends SkillManager {
}
public boolean canUseDemolitionsExpertise() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.MINING_DEMOLITIONS_EXPERTISE))
return false;
return getSkillLevel() >= BlastMining.getDemolitionExpertUnlockLevel() && Permissions.demolitionsExpertise(getPlayer());
}
@ -52,6 +55,9 @@ public class MiningManager extends SkillManager {
}
public boolean canUseBiggerBombs() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.MINING_BIGGER_BOMBS))
return false;
return getSkillLevel() >= BlastMining.getBiggerBombsUnlockLevel() && Permissions.biggerBombs(getPlayer());
}

View File

@ -36,10 +36,16 @@ public class SwordsManager extends SkillManager {
}
public boolean canUseCounterAttack(Entity target) {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_COUNTER_ATTACK))
return false;
return target instanceof LivingEntity && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_COUNTER_ATTACK);
}
public boolean canUseSerratedStrike() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_SERRATED_STRIKES))
return false;
return mcMMOPlayer.getAbilityMode(SuperAbilityType.SERRATED_STRIKES) && Permissions.serratedStrikes(getPlayer());
}

View File

@ -21,6 +21,7 @@ import com.gmail.nossr50.util.player.NotificationManager;
import com.gmail.nossr50.util.player.UserManager;
import com.gmail.nossr50.util.random.RandomChanceUtil;
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
import com.gmail.nossr50.util.skills.RankUtils;
import com.gmail.nossr50.util.skills.SkillActivationType;
import org.bukkit.Location;
import org.bukkit.Sound;
@ -67,6 +68,9 @@ public class TamingManager extends SkillManager {
}
public boolean canUseBeastLore() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_BEAST_LORE))
return false;
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.TAMING_BEAST_LORE);
}

View File

@ -156,6 +156,11 @@ Axes:
Rank_3: 150
Rank_4: 200
Taming:
BeastLore:
Standard:
Rank_1: 2
RetroMode:
Rank_1: 20
FastFoodService:
Standard:
Rank_1: 5