mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 04:39:32 +00:00
Various changes
- Changed where the cooldown is called in AirSwipe - Added instances for FireDamageTimer in appropriate firecombos - Fixed math mistake in WaterSpout
This commit is contained in:
parent
af0cd7f3f7
commit
bb88553db0
|
@ -84,7 +84,6 @@ public class AirSwipe extends AirAbility {
|
||||||
launch();
|
launch();
|
||||||
}
|
}
|
||||||
start();
|
start();
|
||||||
bPlayer.addCooldown(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean removeSwipesAroundPoint(Location loc, double radius) {
|
public static boolean removeSwipesAroundPoint(Location loc, double radius) {
|
||||||
|
@ -228,6 +227,7 @@ public class AirSwipe extends AirAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void launch() {
|
private void launch() {
|
||||||
|
bPlayer.addCooldown("AirSwipe", cooldown);
|
||||||
origin = player.getEyeLocation();
|
origin = player.getEyeLocation();
|
||||||
for (double i = -arc; i <= arc; i += stepSize) {
|
for (double i = -arc; i <= arc; i += stepSize) {
|
||||||
double angle = Math.toRadians((double) i);
|
double angle = Math.toRadians((double) i);
|
||||||
|
|
|
@ -195,12 +195,14 @@ public class FireCombo extends FireAbility implements ComboAbility {
|
||||||
affectedEntities.add(entity);
|
affectedEntities.add(entity);
|
||||||
GeneralMethods.damageEntity(this, entity, damage);
|
GeneralMethods.damageEntity(this, entity, damage);
|
||||||
entity.setFireTicks((int) (fireTicks * 20));
|
entity.setFireTicks((int) (fireTicks * 20));
|
||||||
|
new FireDamageTimer(entity, player);
|
||||||
}
|
}
|
||||||
} else if (ability.equalsIgnoreCase("FireWheel")) {
|
} else if (ability.equalsIgnoreCase("FireWheel")) {
|
||||||
if (!affectedEntities.contains(entity)) {
|
if (!affectedEntities.contains(entity)) {
|
||||||
affectedEntities.add(entity);
|
affectedEntities.add(entity);
|
||||||
GeneralMethods.damageEntity(this, entity, damage);
|
GeneralMethods.damageEntity(this, entity, damage);
|
||||||
entity.setFireTicks((int) (fireTicks * 20));
|
entity.setFireTicks((int) (fireTicks * 20));
|
||||||
|
new FireDamageTimer(entity, player);
|
||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,8 @@ public class WaterSpout extends WaterAbility {
|
||||||
for (WaterSpout spout : getAbilities(sourcePlayer, WaterSpout.class)) {
|
for (WaterSpout spout : getAbilities(sourcePlayer, WaterSpout.class)) {
|
||||||
Location top = spout.getLocation();
|
Location top = spout.getLocation();
|
||||||
Location base = spout.getBase().getLocation();
|
Location base = spout.getBase().getLocation();
|
||||||
for (double d = base.getY(); d <= top.getBlockY(); d += 0.25) {
|
double dist = top.getBlockY() - base.getBlockY();
|
||||||
|
for (double d = 0; d <= dist; d += 0.25) {
|
||||||
Location spoutl = base.clone().add(0, d, 0);
|
Location spoutl = base.clone().add(0, d, 0);
|
||||||
if (loc0.distance(spoutl) <= radius) {
|
if (loc0.distance(spoutl) <= radius) {
|
||||||
removed = true;
|
removed = true;
|
||||||
|
|
Loading…
Reference in a new issue