Buffed Iron Arm, adding ranks to Iron Arm, Iron Grip, Arrow Deflect, and Disarm

This commit is contained in:
nossr50 2019-01-28 03:55:30 -08:00
parent 00f5491718
commit fc7b4a6790
7 changed files with 54 additions and 41 deletions

View File

@ -22,6 +22,11 @@ Version 2.1.2
(Skills) Fixed a bug where Magic Hunter would work without treasure hunter
(Skills) As long are you are empty handed mcMMO will no longer put items into your hands
(Skills) Improved the styling on /smelting
(Skills) Iron Arm Style can now reach a bonus damage of 10 (up from 8)
(Skills) Iron Arm Style now uses a rank system
(Skills) Iron Grip now uses a rank system
(Skills) Disarm now uses a rank system
(Skills) Arrow Deflect now uses a rank system
(Style) Locked skills now are styled differently in the skill command display
(Style) Added @ symbol styling for hover tooltips to the locale
(Style) Added the skill names in the skill commands display to the locale so it can now be edited and styled
@ -34,6 +39,7 @@ Version 2.1.2
(Config) Added an option for Party XP gains to not update XP bars
(Config) Added an option for Passive XP gains to not update XP bars (smelting/brewing)
(Config) Added warnings if mcMMO finds a MaxBonusLevel of 0 for any skill that incorporates RNG
(Config) Removed config options for Iron Arm
Version 2.1.1
= Fixed an issue where excavation wasn't using the correct permission node

View File

@ -610,22 +610,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
}
if (getIronArmMinBonus() < 0) {
reason.add("Skills.Unarmed.IronArmStyle.BonusMin should be at least 0!");
}
if (getIronArmMaxBonus() < 0) {
reason.add("Skills.Unarmed.IronArmStyle.BonusMax should be at least 0!");
}
if (getIronArmMaxBonus() < getIronArmMinBonus()) {
reason.add("Skills.Unarmed.IronArmStyle.BonusMax should be greater than or equal to Skills.Unarmed.IronArm.BonusMin!");
}
if (getIronArmIncreaseLevel() < 1) {
reason.add("Skills.Unarmed.IronArmStyle.IncreaseLevel should be at least 1!");
}
/* WOODCUTTING */
/*if (getLeafBlowUnlockLevel() < 0) {
@ -1023,17 +1007,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
/* UNARMED */
public double getIronArmMinBonus() { return config.getDouble("Skills.Unarmed.IronArmStyle.BonusMin", 3.0D); }
public double getIronArmMaxBonus() { return config.getDouble("Skills.Unarmed.IronArmStyle.BonusMax", 8.0D); }
public int getIronArmIncreaseLevel() {
int increaseLevel = config.getInt("Skills.Unarmed.IronArmStyle.IncreaseLevel", 5);
if(mcMMO.isRetroModeEnabled())
return increaseLevel * 10;
return increaseLevel;
}
public boolean getDisarmProtected() { return config.getBoolean("Skills.Unarmed.Disarm.AntiTheft", false); }

View File

@ -86,12 +86,12 @@ public enum SubSkillType {
TAMING_THICK_FUR(1),
/* Unarmed */
UNARMED_ARROW_DEFLECT,
UNARMED_ARROW_DEFLECT(1),
UNARMED_BERSERK(1),
UNARMED_BLOCK_CRACKER,
UNARMED_DISARM,
UNARMED_IRON_ARM_STYLE,
UNARMED_IRON_GRIP,
UNARMED_DISARM(1),
UNARMED_IRON_ARM_STYLE(5),
UNARMED_IRON_GRIP(1),
/* Woodcutting */
/* WOODCUTTING_BARK_SURGEON(3),*/

View File

@ -1,16 +1,11 @@
package com.gmail.nossr50.skills.unarmed;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
public class Unarmed {
public static double ironArmMinBonusDamage = AdvancedConfig.getInstance().getIronArmMinBonus();
public static double ironArmMaxBonusDamage = AdvancedConfig.getInstance().getIronArmMaxBonus();
public static int ironArmIncreaseLevel = AdvancedConfig.getInstance().getIronArmIncreaseLevel();
public static boolean blockCrackerSmoothBrick = Config.getInstance().getUnarmedBlockCrackerSmoothbrickToCracked();
public static double berserkDamageModifier = 1.5;

View File

@ -16,6 +16,7 @@ import com.gmail.nossr50.util.Permissions;
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.RankUtils;
import com.gmail.nossr50.util.skills.SkillActivationType;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
@ -35,6 +36,9 @@ public class UnarmedManager extends SkillManager {
}
public boolean canUseIronArm() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.UNARMED_IRON_GRIP))
return false;
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.UNARMED_IRON_ARM_STYLE);
}
@ -43,16 +47,25 @@ public class UnarmedManager extends SkillManager {
}
public boolean canDisarm(LivingEntity target) {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.UNARMED_DISARM))
return false;
return target instanceof Player && ((Player) target).getInventory().getItemInMainHand().getType() != Material.AIR && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.UNARMED_DISARM);
}
public boolean canDeflect() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.UNARMED_ARROW_DEFLECT))
return false;
Player player = getPlayer();
return ItemUtils.isUnarmed(player.getInventory().getItemInMainHand()) && Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.UNARMED_ARROW_DEFLECT);
}
public boolean canUseBlockCracker() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.UNARMED_BLOCK_CRACKER))
return false;
return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.UNARMED_BLOCK_CRACKER);
}
@ -130,12 +143,11 @@ public class UnarmedManager extends SkillManager {
return 0;
}
//linear check no cap
return getIronArmDamage();
}
public double getIronArmDamage() {
return Math.min(Unarmed.ironArmMinBonusDamage + (getSkillLevel() / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
return RankUtils.getRank(getPlayer(), SubSkillType.UNARMED_IRON_ARM_STYLE) * 2;
}
/**

View File

@ -541,9 +541,7 @@ Skills:
# BonusMin: Minimum bonus damage for unarmed
# BonusMax: Maximum bonus damage for unarmed
# IncreaseLevel: Bonus damage increases every increase level
BonusMin: 3.0
BonusMax: 8.0
IncreaseLevel: 5
IncreaseLevel: 10
#
# Settings for Woodcutting
###

View File

@ -399,6 +399,35 @@ Unarmed:
Rank_1: 10
RetroMode:
Rank_1: 100
ArrowDeflect:
Standard:
Rank_1: 20
RetroMode:
Rank_1: 200
Disarm:
Standard:
Rank_1: 25
RetroMode:
Rank_1: 250
IronGrip:
Standard:
Rank_1: 60
RetroMode:
Rank_1: 600
IronArmStyle:
Standard:
Rank_1: 2
Rank_2: 25
Rank_3: 50
Rank_4: 75
Rank_5: 100
RetroMode:
Rank_1: 20
Rank_2: 250
Rank_3: 500
Rank_4: 750
Rank_5: 1000
Woodcutting:
Splinter:
Standard: