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:
Benford 2016-02-18 18:03:32 -05:00
parent af0cd7f3f7
commit bb88553db0
3 changed files with 5 additions and 2 deletions

View file

@ -84,7 +84,6 @@ public class AirSwipe extends AirAbility {
launch();
}
start();
bPlayer.addCooldown(this);
}
public static boolean removeSwipesAroundPoint(Location loc, double radius) {
@ -228,6 +227,7 @@ public class AirSwipe extends AirAbility {
}
private void launch() {
bPlayer.addCooldown("AirSwipe", cooldown);
origin = player.getEyeLocation();
for (double i = -arc; i <= arc; i += stepSize) {
double angle = Math.toRadians((double) i);

View file

@ -195,12 +195,14 @@ public class FireCombo extends FireAbility implements ComboAbility {
affectedEntities.add(entity);
GeneralMethods.damageEntity(this, entity, damage);
entity.setFireTicks((int) (fireTicks * 20));
new FireDamageTimer(entity, player);
}
} else if (ability.equalsIgnoreCase("FireWheel")) {
if (!affectedEntities.contains(entity)) {
affectedEntities.add(entity);
GeneralMethods.damageEntity(this, entity, damage);
entity.setFireTicks((int) (fireTicks * 20));
new FireDamageTimer(entity, player);
this.remove();
}
}

View file

@ -258,7 +258,8 @@ public class WaterSpout extends WaterAbility {
for (WaterSpout spout : getAbilities(sourcePlayer, WaterSpout.class)) {
Location top = spout.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);
if (loc0.distance(spoutl) <= radius) {
removed = true;