mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
ShockWave - Range, Knockback, Damage
Added shockwave range, knockback, and damage config options
This commit is contained in:
parent
6ee4026dce
commit
cee6b2875e
2 changed files with 10 additions and 3 deletions
|
@ -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.");
|
||||
|
|
|
@ -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<Integer, Ripple> instances = new ConcurrentHashMap<Integer, Ripple>();
|
||||
private static ConcurrentHashMap<Integer[], Block> blocks = new ConcurrentHashMap<Integer[], Block>();
|
||||
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue