Merge pull request #131 from jedk1/master

Added WaterArms Nerfs
This commit is contained in:
MistPhizzle 2015-06-04 19:43:50 -04:00
commit 901283c31e
3 changed files with 53 additions and 9 deletions

View file

@ -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.Normal", 24);
config.addDefault("Abilities.Water.WaterArms.Whip.NightAugments.MaxLength.FullMoon", 30); 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.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); config.addDefault("Abilities.Water.WaterArms.Whip.Grapple.RespectRegions", false);

View file

@ -54,8 +54,16 @@ public class WaterArmsWhip {
private int initLength = config private int initLength = config
.getInt("Abilities.Water.WaterArms.Arms.InitialLength"); .getInt("Abilities.Water.WaterArms.Arms.InitialLength");
private double pullMultiplier = config
.getDouble("Abilities.Water.WaterArms.Whip.Pull.Multiplier");
private double punchDamage = config private double punchDamage = config
.getDouble("Abilities.Water.WaterArms.Whip.Punch.PunchDamage"); .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 private boolean grappleRespectRegions = config
.getBoolean("Abilities.Water.WaterArms.Whip.Grapple.RespectRegions"); .getBoolean("Abilities.Water.WaterArms.Whip.Grapple.RespectRegions");
private long holdTime = config private long holdTime = config
@ -100,28 +108,51 @@ public class WaterArmsWhip {
} }
this.player = player; this.player = player;
this.ability = ability; this.ability = ability;
getNightAugments(); getAugments();
createInstance(); createInstance();
} }
private void getNightAugments() { private void getAugments() {
if (ability.equals(Whip.Punch)) {
whipLength = punchLength;
}
World world = player.getWorld(); World world = player.getWorld();
if (WaterMethods.isNight(world)) { if (WaterMethods.isNight(world)) {
if (GeneralMethods.hasRPG()) { if (GeneralMethods.hasRPG()) {
if (BendingManager.events.get(world).equalsIgnoreCase( if (BendingManager.events.get(world).equalsIgnoreCase(
WorldEvents.LunarEclipse.toString())) { WorldEvents.LunarEclipse.toString())) {
whipLength = whipLengthFullMoon; if (ability.equals(Whip.Punch)) {
whipLength = punchLengthFullMoon;
} else {
whipLength = whipLengthFullMoon;
}
} else if (BendingManager.events.get(world).equalsIgnoreCase( } else if (BendingManager.events.get(world).equalsIgnoreCase(
"FullMoon")) { "FullMoon")) {
whipLength = whipLengthFullMoon; if (ability.equals(Whip.Punch)) {
whipLength = punchLengthFullMoon;
} else {
whipLength = whipLengthFullMoon;
}
} else { } else {
whipLength = whipLengthNight; if (ability.equals(Whip.Punch)) {
whipLength = punchLengthNight;
} else {
whipLength = whipLengthNight;
}
} }
} else { } else {
if (WaterMethods.isFullMoon(world)) { if (WaterMethods.isFullMoon(world)) {
whipLength = whipLengthFullMoon; if (ability.equals(Whip.Punch)) {
whipLength = punchLengthFullMoon;
} else {
whipLength = whipLengthFullMoon;
}
} else { } 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( Vector vector = endOfArm.toVector().subtract(
entity.getLocation().toVector()); entity.getLocation().toVector());
entity.setVelocity(vector.multiply(0.15)); entity.setVelocity(vector.multiply(pullMultiplier));
} }
break; break;
case Punch: case Punch:
@ -349,7 +380,7 @@ public class WaterArmsWhip {
dz = location.getZ() - newlocation.getZ(); dz = location.getZ() - newlocation.getZ();
Vector vector = new Vector(dx, dy, dz); Vector vector = new Vector(dx, dy, dz);
if (distance > .5) { if (distance > .5) {
grabbedEntity.setVelocity(vector.normalize().multiply(1)); grabbedEntity.setVelocity(vector.normalize().multiply(.65));
} else { } else {
grabbedEntity.setVelocity(new Vector(0, 0, 0)); grabbedEntity.setVelocity(new Vector(0, 0, 0));
} }

View file

@ -354,8 +354,16 @@ Abilities:
MaxLength: MaxLength:
Normal: 24 Normal: 24
FullMoon: 30 FullMoon: 30
Pull:
Multiplier: 0.15
Punch: Punch:
PunchDamage: 3.0 PunchDamage: 3.0
MaxLength:
Normal: 10
NightAugments:
MaxLength:
Normal: 11
FullMoon: 13
Grapple: Grapple:
RespectRegions: false RespectRegions: false
Grab: Grab: