Tweak archery distance XP function to reward better.

This commit is contained in:
gmcferrin 2013-01-29 10:55:06 -05:00
parent d2cb88d93b
commit 1e7b54ef0d
2 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,8 @@ public class Archery {
public static boolean pvpEnabled = Config.getInstance().getArcheryPVP();
public static boolean pveEnabled = Config.getInstance().getArcheryPVE();
public static double distanceXpModifer = 0.1;
public static double distanceXpModifer = 0.025;
protected static void incrementTrackerValue(LivingEntity livingEntity) {
for (TrackedEntity trackedEntity : trackedEntities) {
if (trackedEntity.getLivingEntity().getEntityId() == livingEntity.getEntityId()) {

View File

@ -19,9 +19,9 @@ public class ArcheryManager extends SkillManager {
public void distanceXpBonus(LivingEntity target) {
Location shooterLocation = player.getEyeLocation();
Location targetLocation = target.getLocation();
double distance = shooterLocation.distance(targetLocation);
double squaredDistance = shooterLocation.distanceSquared(targetLocation);
int bonusXp = (int) (distance * Archery.distanceXpModifer);
int bonusXp = (int) (squaredDistance * Archery.distanceXpModifer);
SkillTools.xpProcessing(player, profile, SkillType.ARCHERY, bonusXp);
}