diff --git a/src/com/projectkorra/ProjectKorra/ConfigManager.java b/src/com/projectkorra/ProjectKorra/ConfigManager.java index c6050552..e04d2b76 100644 --- a/src/com/projectkorra/ProjectKorra/ConfigManager.java +++ b/src/com/projectkorra/ProjectKorra/ConfigManager.java @@ -488,6 +488,9 @@ public class ConfigManager { + "Lastly, if you fall from a great enough height with this ability selected, you will automatically create a shockwave."); config.addDefault("Abilities.Earth.Shockwave.FallThreshold", 10); config.addDefault("Abilities.Earth.Shockwave.ChargeTime", 2500); + config.addDefault("Abilities.Earth.Shockwave.Damage", 5); + config.addDefault("Abilities.Earth.Shockwave.Knockback", 1.1); + config.addDefault("Abilities.Earth.Shockwave.Range", 15); config.addDefault("Abilities.Earth.Tremorsense.Enabled", true); config.addDefault("Abilities.Earth.Tremorsense.Description", "This is a pure utility ability for earthbenders. If you are in an area of low-light and are standing on top of an earthbendable block, this ability will automatically turn that block into glowstone, visible *only by you*. If you lose contact with a bendable block, the light will go out as you have lost contact with the earth and cannot 'see' until you can touch earth again. Additionally, if you click with this ability selected, smoke will appear above nearby earth with pockets of air beneath them."); diff --git a/src/com/projectkorra/ProjectKorra/earthbending/Ripple.java b/src/com/projectkorra/ProjectKorra/earthbending/Ripple.java index 194a35ae..18ab6db4 100644 --- a/src/com/projectkorra/ProjectKorra/earthbending/Ripple.java +++ b/src/com/projectkorra/ProjectKorra/earthbending/Ripple.java @@ -13,15 +13,18 @@ import org.bukkit.entity.Player; import org.bukkit.util.Vector; import com.projectkorra.ProjectKorra.Methods; +import com.projectkorra.ProjectKorra.ProjectKorra; +import com.projectkorra.ProjectKorra.Ability.AvatarState; public class Ripple { private static ConcurrentHashMap instances = new ConcurrentHashMap(); private static ConcurrentHashMap blocks = new ConcurrentHashMap(); - static final double radius = 15; - private static final int damage = 5; + static final double radius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Earth.Shockwave.Range"); + private static final double damage = ProjectKorra.plugin.getConfig().getDouble("Abilities.Earth.Shockwave.Damage"); private static int ID = Integer.MIN_VALUE; + private static double knockback = ProjectKorra.plugin.getConfig().getDouble("Abilities.Earth.Shockwave.Knockback"); private Player player; private Vector direction; @@ -258,7 +261,8 @@ public class Ripple { Vector vector = direction.clone(); vector.setY(.5); - entity.setVelocity(vector); + double knock = AvatarState.isAvatarState(player) ? AvatarState.getValue(knockback) : knockback; + entity.setVelocity(vector.clone().normalize().multiply(knock)); Methods.breakBreathbendingHold(entity);