Bloodbending only usable at Night (Configurable)

This commit is contained in:
MistPhizzle 2014-07-11 14:15:39 -04:00
parent a17f98af45
commit 2bd751479d
3 changed files with 13 additions and 0 deletions

View file

@ -187,6 +187,7 @@ public class ConfigManager {
+ "be forced to move in that direction. Additionally, clicking while bloodbending will "
+ "launch that target off in the direction you're looking. "
+ "People who are capable of bloodbending are immune to your technique, and you are immune to theirs.");
config.addDefault("Abilities.Water.Bloodbending.CanOnlyBeUsedAtNight", false);
config.addDefault("Abilities.Water.Bloodbending.ThrowFactor", 2);
config.addDefault("Abilities.Water.Bloodbending.Range", 10);

View file

@ -24,6 +24,7 @@ public class Bloodbending {
ConcurrentHashMap<Entity, Location> targetentities = new ConcurrentHashMap<Entity, Location>();
private static final double factor = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.Bloodbending.ThrowFactor");
private static final boolean onlyUsableAtNight = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Water.Bloodbending.OnlyUsableAtNight");
private Player player;
private int range = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.Bloodbending.Range");
@ -33,6 +34,11 @@ public class Bloodbending {
remove(player);
return;
}
if (onlyUsableAtNight && !Methods.isNight(player.getWorld())) {
remove(player);
return;
}
range = (int) Methods.waterbendingNightAugment(range, player.getWorld());
if (AvatarState.isAvatarState(player)) {
range = AvatarState.getValue(range);
@ -100,6 +106,11 @@ public class Bloodbending {
return;
}
if (onlyUsableAtNight && !Methods.isNight(player.getWorld())) {
remove(player);
return;
}
if (!Methods.canBend(player.getName(), "Bloodbending")) {
remove(player);
return;

View file

@ -136,6 +136,7 @@ Abilities:
Bloodbending:
Enabled: true
Description: "This ability was made illegal for a reason. With this ability selected, sneak while targeting something and you will bloodbend that target. Bloodbent targets cannot move, bend, or attack. You are free to control their actions by looking elsewhere - they will be forced to move in that direction. Additionally, clicking while bloodbending will launch that target off in the direction you're looking. People who are capable of bloodbending are immune to technique, and you are immune to theirs."
CanOnlyBeUsedAtNight: false
ThrowFactor: 2
Range: 10
HealingWaters: