From a9578d94a0d43109b9e6b7994ebeb5a7964dcc20 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Fri, 5 Jun 2015 00:30:11 +0100 Subject: [PATCH 1/4] Added WaterArms Nerfs. --- .../ProjectKorra/ConfigManager.java | 5 ++ .../waterbending/WaterArmsWhip.java | 49 +++++++++++++++---- src/config.yml | 6 +++ 3 files changed, 51 insertions(+), 9 deletions(-) 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: From 7bbb2fe741634d588c170ca64f18e8f4126ad959 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Fri, 5 Jun 2015 00:34:41 +0100 Subject: [PATCH 2/4] Added multiplier config. --- src/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.yml b/src/config.yml index 76f103a6..ac75d4ad 100644 --- a/src/config.yml +++ b/src/config.yml @@ -354,6 +354,8 @@ Abilities: MaxLength: Normal: 24 FullMoon: 30 + Pull: + Multiplier: 0.15 Punch: PunchDamage: 3.0 MaxLength: From cff68f45c3221ad36d2ced369edd3bc83e618936 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Fri, 5 Jun 2015 00:35:13 +0100 Subject: [PATCH 3/4] Revert "Added multiplier config." This reverts commit 7bbb2fe741634d588c170ca64f18e8f4126ad959. --- src/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/config.yml b/src/config.yml index ac75d4ad..76f103a6 100644 --- a/src/config.yml +++ b/src/config.yml @@ -354,8 +354,6 @@ Abilities: MaxLength: Normal: 24 FullMoon: 30 - Pull: - Multiplier: 0.15 Punch: PunchDamage: 3.0 MaxLength: From 88498155f9822094301def3e6b0b6525e10f67af Mon Sep 17 00:00:00 2001 From: jedk1 Date: Fri, 5 Jun 2015 00:35:57 +0100 Subject: [PATCH 4/4] Added WaterArms Pull Multiplier Config. --- src/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.yml b/src/config.yml index 76f103a6..ac75d4ad 100644 --- a/src/config.yml +++ b/src/config.yml @@ -354,6 +354,8 @@ Abilities: MaxLength: Normal: 24 FullMoon: 30 + Pull: + Multiplier: 0.15 Punch: PunchDamage: 3.0 MaxLength: