mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
commit
eaf183f8c4
4 changed files with 22 additions and 12 deletions
|
@ -770,16 +770,11 @@ public class PKListener implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!event.isCancelled() && bPlayer.hasElement(Element.CHI) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.CHI)) {
|
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 initdamage = event.getDamage();
|
||||||
double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor();
|
double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor();
|
||||||
double finaldamage = initdamage - newdamage;
|
double finaldamage = initdamage - newdamage;
|
||||||
event.setDamage(finaldamage);
|
event.setDamage(finaldamage);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!event.isCancelled() && event.getCause() == DamageCause.FALL) {
|
if (!event.isCancelled() && event.getCause() == DamageCause.FALL) {
|
||||||
Player source = Flight.getLaunchedBy(player);
|
Player source = Flight.getLaunchedBy(player);
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class AirScooter extends AirAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void progress() {
|
public void progress() {
|
||||||
if (!bPlayer.canBendIgnoreCooldowns(this)) {
|
if (!bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
||||||
remove();
|
remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -672,9 +672,11 @@ public class ConfigManager {
|
||||||
config.addDefault("Abilities.Water.Torrent.Enabled", true);
|
config.addDefault("Abilities.Water.Torrent.Enabled", true);
|
||||||
config.addDefault("Abilities.Water.Torrent.Range", 25);
|
config.addDefault("Abilities.Water.Torrent.Range", 25);
|
||||||
config.addDefault("Abilities.Water.Torrent.SelectRange", 10);
|
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.DeflectDamage", 1);
|
||||||
|
config.addDefault("Abilities.Water.Torrent.SuccessiveDamage", 1);
|
||||||
config.addDefault("Abilities.Water.Torrent.MaxLayer", 3);
|
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.Push", 1);
|
||||||
config.addDefault("Abilities.Water.Torrent.Angle", 20);
|
config.addDefault("Abilities.Water.Torrent.Angle", 20);
|
||||||
config.addDefault("Abilities.Water.Torrent.Radius", 3);
|
config.addDefault("Abilities.Water.Torrent.Radius", 3);
|
||||||
|
|
|
@ -38,6 +38,8 @@ public class Torrent extends WaterAbility {
|
||||||
private boolean freeze;
|
private boolean freeze;
|
||||||
private int layer;
|
private int layer;
|
||||||
private int maxLayer;
|
private int maxLayer;
|
||||||
|
private int maxHits;
|
||||||
|
private int hits = 1;
|
||||||
private long time;
|
private long time;
|
||||||
private long interval;
|
private long interval;
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
|
@ -47,6 +49,7 @@ public class Torrent extends WaterAbility {
|
||||||
private double push;
|
private double push;
|
||||||
private double maxUpwardForce;
|
private double maxUpwardForce;
|
||||||
private double damage;
|
private double damage;
|
||||||
|
private double successiveDamage;
|
||||||
private double deflectDamage;
|
private double deflectDamage;
|
||||||
private double range;
|
private double range;
|
||||||
private double selectRange;
|
private double selectRange;
|
||||||
|
@ -68,7 +71,9 @@ public class Torrent extends WaterAbility {
|
||||||
this.radius = getConfig().getDouble("Abilities.Water.Torrent.Radius");
|
this.radius = getConfig().getDouble("Abilities.Water.Torrent.Radius");
|
||||||
this.maxUpwardForce = getConfig().getDouble("Abilities.Water.Torrent.MaxUpwardForce");
|
this.maxUpwardForce = getConfig().getDouble("Abilities.Water.Torrent.MaxUpwardForce");
|
||||||
this.interval = getConfig().getLong("Abilities.Water.Torrent.Interval");
|
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.deflectDamage = getConfig().getDouble("Abilities.Water.Torrent.DeflectDamage");
|
||||||
this.range = getConfig().getDouble("Abilities.Water.Torrent.Range");
|
this.range = getConfig().getDouble("Abilities.Water.Torrent.Range");
|
||||||
this.selectRange = getConfig().getDouble("Abilities.Water.Torrent.SelectRange");
|
this.selectRange = getConfig().getDouble("Abilities.Water.Torrent.SelectRange");
|
||||||
|
@ -535,6 +540,14 @@ public class Torrent extends WaterAbility {
|
||||||
}
|
}
|
||||||
if (entity instanceof LivingEntity && !hurtEntities.contains(entity)) {
|
if (entity instanceof LivingEntity && !hurtEntities.contains(entity)) {
|
||||||
double damageDealt = getNightFactor(damage);
|
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);
|
DamageHandler.damageEntity(entity, damageDealt, this);
|
||||||
AirAbility.breakBreathbendingHold(entity);
|
AirAbility.breakBreathbendingHold(entity);
|
||||||
hurtEntities.add(entity);
|
hurtEntities.add(entity);
|
||||||
|
|
Loading…
Reference in a new issue