Nerfed LavaSurge

Added a Cooldown for LavaSurge.
This commit is contained in:
Brendan Wilson 2014-11-29 13:36:58 -05:00
parent b55d8caa5e
commit 76f8e48a62
2 changed files with 10 additions and 2 deletions

View file

@ -464,8 +464,9 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.LavaFlow.ParticleDensity", 0.33);
config.addDefault("Abilities.Earth.LavaSurge.Enabled", true);
config.addDefault("Abilities.Earth.LavaSurge.Description", "This ability allows an Earthbender to bend an existing Lava Source to create a large wave that deals damage and knocks back anything in its path. To use, simply tap sneak (Default: Shift) while targeting an earthbendable block. Once a source has been selected, left click to launch the wave off into the direction you are looking. This ability has a small knockback and does a fair amount of damage.");
config.addDefault("Abilities.Earth.LavaSurge.Damage", 4);
config.addDefault("Abilities.Earth.LavaSurge.Description", "LavaSurge is a fundamental move for any Lavabender out there. To use, simply sneak (Default: Shift) while looking at a source of Earth or Lava, then click in a direction. A surge of lava will swiftly travel towards the target you were pointing at, dealing moderate damage, a large knockback, and setting them on fire.");
config.addDefault("Abilities.Earth.LavaSurge.Damage", 4);
config.addDefault("Abilities.Earth.LavaSurge.Cooldown", 1000);
config.addDefault("Abilities.Earth.LavaSurge.FractureRadius", 1);
config.addDefault("Abilities.Earth.LavaSurge.PrepareRange", 7);
config.addDefault("Abilities.Earth.LavaSurge.TravelRange", 15);

View file

@ -27,6 +27,7 @@ public class LavaSurge
{
public static ConcurrentHashMap<Player, LavaSurge> instances = new ConcurrentHashMap<Player, LavaSurge>();
public static int impactDamage = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.LavaSurge.Damage");
public static int cooldown = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.LavaSurge.Cooldown");
public static int fractureRadius = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.LavaSurge.FractureRadius");
public static int prepareRange = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.LavaSurge.PrepareRange");
public static int travelRange = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.LavaSurge.TravelRange");
@ -59,6 +60,9 @@ public class LavaSurge
if(!isEligible())
return;
if(Methods.getBendingPlayer(player.getName()).isOnCooldown("LavaSurge"))
return;
lastTime = System.currentTimeMillis();
@ -151,6 +155,7 @@ public class LavaSurge
public void openFracture()
{
List<Block> affectedBlocks = Methods.getBlocksAroundPoint(sourceBlock.getLocation(), fractureRadius);
for(Block b : affectedBlocks)
@ -164,6 +169,8 @@ public class LavaSurge
li = fracture.listIterator();
fractureOpen = true;
Methods.getBendingPlayer(player.getName()).addCooldown("LavaSurge", cooldown);
}
public void skipFracture()