Nerfed Archery damage to eliminate constant one-hit kills

This commit is contained in:
GJ
2013-09-11 11:33:49 -04:00
parent cfd5bfe2c4
commit 44626c36a9
5 changed files with 5 additions and 1 deletions

View File

@ -807,6 +807,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getSkillShotIncreaseLevel() { return config.getInt("Skills.Archery.SkillShot_IncreaseLevel", 50); }
public double getSkillShotIncreasePercentage() { return config.getDouble("Skills.Archery.SkillShot_IncreasePercentage", 0.1D); }
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot_MaxBonus", 2.0D); }
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot_MaxDamage", 9.0D); }
public double getDazeBonusMax() { return config.getDouble("Skills.Archery.Daze_MaxChance", 50.0D); }
public int getDazeMaxBonusLevel() { return config.getInt("Skills.Archery.Daze_MaxBonusLevel", 1000); }

View File

@ -22,6 +22,7 @@ public class Archery {
public static int skillShotIncreaseLevel = AdvancedConfig.getInstance().getSkillShotIncreaseLevel();
public static double skillShotIncreasePercentage = AdvancedConfig.getInstance().getSkillShotIncreasePercentage();
public static double skillShotMaxBonusPercentage = AdvancedConfig.getInstance().getSkillShotBonusMax();
public static double skillShotMaxBonusDamage = AdvancedConfig.getInstance().getSkillShotDamageMax();
public static int dazeMaxBonusLevel = AdvancedConfig.getInstance().getDazeMaxBonusLevel();
public static int dazeModifier = AdvancedConfig.getInstance().getDazeModifier();

View File

@ -102,7 +102,7 @@ public class ArcheryManager extends SkillManager {
*/
public void skillShot(LivingEntity target, double damage, Arrow arrow) {
double damageBonusPercent = Math.min(((getSkillLevel() / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage), Archery.skillShotMaxBonusPercentage);
double archeryBonus = (damage * damageBonusPercent) - damage;
double archeryBonus = Math.min(damage * damageBonusPercent, Archery.skillShotMaxBonusDamage);
CombatUtils.dealDamage(target, archeryBonus, DamageCause.PROJECTILE, arrow, mcMMOPlayer, SkillType.ARCHERY);
}