mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
commit
901283c31e
3 changed files with 53 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,32 +108,55 @@ 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())) {
|
||||
if (ability.equals(Whip.Punch)) {
|
||||
whipLength = punchLengthFullMoon;
|
||||
} else {
|
||||
whipLength = whipLengthFullMoon;
|
||||
}
|
||||
} else if (BendingManager.events.get(world).equalsIgnoreCase(
|
||||
"FullMoon")) {
|
||||
if (ability.equals(Whip.Punch)) {
|
||||
whipLength = punchLengthFullMoon;
|
||||
} else {
|
||||
whipLength = whipLengthFullMoon;
|
||||
}
|
||||
} else {
|
||||
if (ability.equals(Whip.Punch)) {
|
||||
whipLength = punchLengthNight;
|
||||
} else {
|
||||
whipLength = whipLengthNight;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (WaterMethods.isFullMoon(world)) {
|
||||
if (ability.equals(Whip.Punch)) {
|
||||
whipLength = punchLengthFullMoon;
|
||||
} else {
|
||||
whipLength = whipLengthFullMoon;
|
||||
}
|
||||
} else {
|
||||
if (ability.equals(Whip.Punch)) {
|
||||
whipLength = punchLengthNight;
|
||||
} else {
|
||||
whipLength = whipLengthNight;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void createInstance() {
|
||||
if (WaterArms.instances.containsKey(player)) {
|
||||
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -354,8 +354,16 @@ Abilities:
|
|||
MaxLength:
|
||||
Normal: 24
|
||||
FullMoon: 30
|
||||
Pull:
|
||||
Multiplier: 0.15
|
||||
Punch:
|
||||
PunchDamage: 3.0
|
||||
MaxLength:
|
||||
Normal: 10
|
||||
NightAugments:
|
||||
MaxLength:
|
||||
Normal: 11
|
||||
FullMoon: 13
|
||||
Grapple:
|
||||
RespectRegions: false
|
||||
Grab:
|
||||
|
|
Loading…
Reference in a new issue