diff --git a/src/com/projectkorra/ProjectKorra/ConfigManager.java b/src/com/projectkorra/ProjectKorra/ConfigManager.java index e6cd9320..3830d5d6 100644 --- a/src/com/projectkorra/ProjectKorra/ConfigManager.java +++ b/src/com/projectkorra/ProjectKorra/ConfigManager.java @@ -398,7 +398,12 @@ public class ConfigManager { config.addDefault("Abilities.Water.WaterArms.Whip.NightAugments.MaxLength.Normal", 24); config.addDefault("Abilities.Water.WaterArms.Whip.NightAugments.MaxLength.FullMoon", 30); + config.addDefault("Abilities.Water.WaterArms.Whip.Pull.Multiplier", Double.valueOf(0.15)); + config.addDefault("Abilities.Water.WaterArms.Whip.Punch.PunchDamage", Double.valueOf(3.0)); + config.addDefault("Abilities.Water.WaterArms.Whip.Punch.MaxLength", 10); + config.addDefault("Abilities.Water.WaterArms.Whip.Punch.NightAugments.MaxLength.Normal", 11); + config.addDefault("Abilities.Water.WaterArms.Whip.Punch.NightAugments.MaxLength.FullMoon", 13); config.addDefault("Abilities.Water.WaterArms.Whip.Grapple.RespectRegions", false); diff --git a/src/com/projectkorra/ProjectKorra/waterbending/WaterArmsWhip.java b/src/com/projectkorra/ProjectKorra/waterbending/WaterArmsWhip.java index 9e293efa..56b43be5 100644 --- a/src/com/projectkorra/ProjectKorra/waterbending/WaterArmsWhip.java +++ b/src/com/projectkorra/ProjectKorra/waterbending/WaterArmsWhip.java @@ -54,8 +54,16 @@ public class WaterArmsWhip { private int initLength = config .getInt("Abilities.Water.WaterArms.Arms.InitialLength"); + private double pullMultiplier = config + .getDouble("Abilities.Water.WaterArms.Whip.Pull.Multiplier"); private double punchDamage = config .getDouble("Abilities.Water.WaterArms.Whip.Punch.PunchDamage"); + private int punchLength = config + .getInt("Abilities.Water.WaterArms.Whip.Punch.MaxLength"); + private int punchLengthNight = config + .getInt("Abilities.Water.WaterArms.Whip.Punch.NightAugments.MaxLength.Normal"); + private int punchLengthFullMoon = config + .getInt("Abilities.Water.WaterArms.Whip.Punch.NightAugments.MaxLength.FullMoon"); private boolean grappleRespectRegions = config .getBoolean("Abilities.Water.WaterArms.Whip.Grapple.RespectRegions"); private long holdTime = config @@ -100,28 +108,51 @@ public class WaterArmsWhip { } this.player = player; this.ability = ability; - getNightAugments(); + getAugments(); createInstance(); } - private void getNightAugments() { + private void getAugments() { + if (ability.equals(Whip.Punch)) { + whipLength = punchLength; + } World world = player.getWorld(); if (WaterMethods.isNight(world)) { if (GeneralMethods.hasRPG()) { if (BendingManager.events.get(world).equalsIgnoreCase( WorldEvents.LunarEclipse.toString())) { - whipLength = whipLengthFullMoon; + if (ability.equals(Whip.Punch)) { + whipLength = punchLengthFullMoon; + } else { + whipLength = whipLengthFullMoon; + } } else if (BendingManager.events.get(world).equalsIgnoreCase( "FullMoon")) { - whipLength = whipLengthFullMoon; + if (ability.equals(Whip.Punch)) { + whipLength = punchLengthFullMoon; + } else { + whipLength = whipLengthFullMoon; + } } else { - whipLength = whipLengthNight; + if (ability.equals(Whip.Punch)) { + whipLength = punchLengthNight; + } else { + whipLength = whipLengthNight; + } } } else { if (WaterMethods.isFullMoon(world)) { - whipLength = whipLengthFullMoon; + if (ability.equals(Whip.Punch)) { + whipLength = punchLengthFullMoon; + } else { + whipLength = whipLengthFullMoon; + } } else { - whipLength = whipLengthNight; + if (ability.equals(Whip.Punch)) { + whipLength = punchLengthNight; + } else { + whipLength = whipLengthNight; + } } } } @@ -286,7 +317,7 @@ public class WaterArmsWhip { } Vector vector = endOfArm.toVector().subtract( entity.getLocation().toVector()); - entity.setVelocity(vector.multiply(0.15)); + entity.setVelocity(vector.multiply(pullMultiplier)); } break; case Punch: @@ -349,7 +380,7 @@ public class WaterArmsWhip { dz = location.getZ() - newlocation.getZ(); Vector vector = new Vector(dx, dy, dz); if (distance > .5) { - grabbedEntity.setVelocity(vector.normalize().multiply(1)); + grabbedEntity.setVelocity(vector.normalize().multiply(.65)); } else { grabbedEntity.setVelocity(new Vector(0, 0, 0)); } diff --git a/src/config.yml b/src/config.yml index 39ef4f8b..76f103a6 100644 --- a/src/config.yml +++ b/src/config.yml @@ -356,6 +356,12 @@ Abilities: FullMoon: 30 Punch: PunchDamage: 3.0 + MaxLength: + Normal: 10 + NightAugments: + MaxLength: + Normal: 11 + FullMoon: 13 Grapple: RespectRegions: false Grab: