Merge pull request #482 from Simplicitee/master

Various changes
This commit is contained in:
OmniCypher 2016-04-14 18:19:31 -07:00
commit eaf183f8c4
4 changed files with 22 additions and 12 deletions

View file

@ -770,15 +770,10 @@ public class PKListener implements Listener {
}
if (!event.isCancelled() && bPlayer.hasElement(Element.CHI) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.CHI)) {
if (player.isSprinting()) {
event.setDamage(0);
event.setCancelled(true);
} else {
double initdamage = event.getDamage();
double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor();
double finaldamage = initdamage - newdamage;
event.setDamage(finaldamage);
}
double initdamage = event.getDamage();
double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor();
double finaldamage = initdamage - newdamage;
event.setDamage(finaldamage);
}
if (!event.isCancelled() && event.getCause() == DamageCause.FALL) {

View file

@ -91,7 +91,7 @@ public class AirScooter extends AirAbility {
@Override
public void progress() {
if (!bPlayer.canBendIgnoreCooldowns(this)) {
if (!bPlayer.canBendIgnoreBindsCooldowns(this)) {
remove();
return;
}

View file

@ -672,9 +672,11 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Torrent.Enabled", true);
config.addDefault("Abilities.Water.Torrent.Range", 25);
config.addDefault("Abilities.Water.Torrent.SelectRange", 10);
config.addDefault("Abilities.Water.Torrent.Damage", 3);
config.addDefault("Abilities.Water.Torrent.InitialDamage", 3);
config.addDefault("Abilities.Water.Torrent.DeflectDamage", 1);
config.addDefault("Abilities.Water.Torrent.SuccessiveDamage", 1);
config.addDefault("Abilities.Water.Torrent.MaxLayer", 3);
config.addDefault("Abilities.Water.Torrent.MaxHits", 2);
config.addDefault("Abilities.Water.Torrent.Push", 1);
config.addDefault("Abilities.Water.Torrent.Angle", 20);
config.addDefault("Abilities.Water.Torrent.Radius", 3);

View file

@ -38,6 +38,8 @@ public class Torrent extends WaterAbility {
private boolean freeze;
private int layer;
private int maxLayer;
private int maxHits;
private int hits = 1;
private long time;
private long interval;
private long cooldown;
@ -47,6 +49,7 @@ public class Torrent extends WaterAbility {
private double push;
private double maxUpwardForce;
private double damage;
private double successiveDamage;
private double deflectDamage;
private double range;
private double selectRange;
@ -68,7 +71,9 @@ public class Torrent extends WaterAbility {
this.radius = getConfig().getDouble("Abilities.Water.Torrent.Radius");
this.maxUpwardForce = getConfig().getDouble("Abilities.Water.Torrent.MaxUpwardForce");
this.interval = getConfig().getLong("Abilities.Water.Torrent.Interval");
this.damage = getConfig().getDouble("Abilities.Water.Torrent.Damage");
this.damage = getConfig().getDouble("Abilities.Water.Torrent.InitialDamage");
this.successiveDamage = getConfig().getDouble("Abilities.Water.Torrent.SuccessiveDamage");
this.maxHits = getConfig().getInt("Abilities.Water.Torrent.MaxHits");
this.deflectDamage = getConfig().getDouble("Abilities.Water.Torrent.DeflectDamage");
this.range = getConfig().getDouble("Abilities.Water.Torrent.Range");
this.selectRange = getConfig().getDouble("Abilities.Water.Torrent.SelectRange");
@ -535,6 +540,14 @@ public class Torrent extends WaterAbility {
}
if (entity instanceof LivingEntity && !hurtEntities.contains(entity)) {
double damageDealt = getNightFactor(damage);
if (hits > 1 && hits <= maxHits) {
damageDealt = getNightFactor(successiveDamage);
}
if (hits == maxHits) {
hits = maxHits + 1;
} else {
hits += 1;
}
DamageHandler.damageEntity(entity, damageDealt, this);
AirAbility.breakBreathbendingHold(entity);
hurtEntities.add(entity);