Various fixes (#545)

* Fix SandSpout creation from EarthPassive sand

* Fixed WaterCombo IceWave not applying cooldown to WaterWave
This commit is contained in:
Matt 2016-08-15 15:10:16 -04:00 committed by OmniCypher
parent 4cccc6e527
commit 3c09394c53
3 changed files with 25 additions and 8 deletions

View file

@ -60,6 +60,10 @@ public class SandSpout extends SandAbility {
return;
}
if (EarthPassive.isPassiveSand(topBlock)) {
return;
}
flight = new Flight(player);
start();
bPlayer.addCooldown(this);
@ -80,6 +84,12 @@ public class SandSpout extends SandAbility {
}
Block block = getGround();
if (EarthPassive.isPassiveSand(block)) {
remove();
return;
}
if (block != null && (block.getType() == Material.SAND || block.getType() == Material.SANDSTONE || block.getType() == Material.RED_SANDSTONE)) {
double dy = player.getLocation().getY() - block.getY();
if (dy > height) {

View file

@ -75,6 +75,12 @@ public class WaterCombo extends IceAbility implements ComboAbility {
}
if (name.equalsIgnoreCase("IceWave")) {
if (bPlayer.isOnCooldown("IceWave") && !bPlayer.isAvatarState()) {
remove();
return;
}
this.cooldown = getConfig().getLong("Abilities.Water.WaterCombo.IceWave.Cooldown");
} else if (name.equalsIgnoreCase("IceBullet")) {
this.damage = getConfig().getDouble("Abilities.Water.WaterCombo.IceBullet.Damage");
@ -205,13 +211,9 @@ public class WaterCombo extends IceAbility implements ComboAbility {
return;
} else if (name.equalsIgnoreCase("IceWave")) {
if (origin == null && WaterSpoutWave.containsType(player, WaterSpoutWave.AbilityType.RELEASE)) {
if (bPlayer.isOnCooldown("IceWave") && !bPlayer.isAvatarState()) {
remove();
return;
}
bPlayer.addCooldown("IceWave", cooldown);
origin = player.getLocation();
WaterSpoutWave wave = WaterSpoutWave.getType(player, WaterSpoutWave.AbilityType.RELEASE).get(0);
wave.setIceWave(true);
} else if (!WaterSpoutWave.containsType(player, WaterSpoutWave.AbilityType.RELEASE)) {
@ -305,7 +307,12 @@ public class WaterCombo extends IceAbility implements ComboAbility {
if (waterGrabber != null) {
waterGrabber.remove();
}
bPlayer.addCooldown(this);
if (name == "IceWave") {
bPlayer.addCooldown("WaterWave", getConfig().getLong("Abilities.Water.WaterSpout.Wave.Cooldown"));
}
}
public void revertBlocks() {

View file

@ -449,7 +449,7 @@ public class WaterSpoutWave extends WaterAbility {
@Override
public String getName() {
return this.isIceWave() ? "IceWave" : "WaterSpout";
return "WaterSpout";
}
@Override