Fix Acrobatics and Archery command classes

This commit is contained in:
nossr50 2019-09-23 12:58:28 -07:00
parent 810a29cb9d
commit b399c415dc
3 changed files with 6 additions and 11 deletions

View File

@ -56,10 +56,10 @@ public class AcrobaticsCommand extends SkillCommand {
double rollChance, graceChance;
//Chance to roll at half
RandomChanceSkill roll_rcs = new RandomChanceSkill(player, SubSkillType.ACROBATICS_ROLL);
RandomChanceSkill roll_rcs = new RandomChanceSkill(pluginRef, player, SubSkillType.ACROBATICS_ROLL);
//Chance to graceful roll
RandomChanceSkill grace_rcs = new RandomChanceSkill(player, SubSkillType.ACROBATICS_ROLL);
RandomChanceSkill grace_rcs = new RandomChanceSkill(pluginRef, player, SubSkillType.ACROBATICS_ROLL);
grace_rcs.setSkillLevel(grace_rcs.getSkillLevel() * 2); //Double Odds
//Chance Stat Calculations

View File

@ -3,7 +3,6 @@ package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.archery.Archery;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.entity.Player;
@ -43,7 +42,7 @@ public class ArcheryCommand extends SkillCommand {
// SKILL SHOT
if (canSkillShot) {
skillShotBonus = percent.format(Archery.getDamageBonusPercent(player));
skillShotBonus = percent.format(pluginRef.getDynamicSettingsManager().getSkillBehaviourManager().getArcheryBehaviour().getSkillShotDamageBonusPercent(player));
}
}
@ -74,11 +73,7 @@ public class ArcheryCommand extends SkillCommand {
if (canUseSubSkill(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK)) {
messages.add(getStatMessage(SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK,
<<<<<<< HEAD
String.valueOf(pluginRef.getCombatTools().getLimitBreakDamage(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK))));
=======
String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK, 1000))));
>>>>>>> 308e3a4b1f46e9e3de28d6d540dd055a540ed4d5
String.valueOf(pluginRef.getCombatTools().getLimitBreakDamageAgainstQuality(player, SubSkillType.ARCHERY_ARCHERY_LIMIT_BREAK, 1000))));
}
return messages;

View File

@ -47,12 +47,12 @@ public class ArcheryBehaviour {
}
public double getSkillShotBonusDamage(Player player, double oldDamage) {
double damageBonusPercent = getDamageBonusPercent(player);
double damageBonusPercent = getSkillShotDamageBonusPercent(player);
double newDamage = oldDamage + (oldDamage * damageBonusPercent);
return Math.min(newDamage, getSkillShotDamageCap());
}
public double getDamageBonusPercent(Player player) {
public double getSkillShotDamageBonusPercent(Player player) {
return ((pluginRef.getRankTools().getRank(player, SubSkillType.ARCHERY_SKILL_SHOT)) * pluginRef.getConfigManager().getConfigArchery().getSkillShotDamageMultiplier()) / 100.0D;
}