mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Converted to BreathSphere
BreathBending move was converted to BreathSphere, move ready for basic use and complete enough for a release.
This commit is contained in:
parent
13ee8969f3
commit
e803445011
30 changed files with 103 additions and 41 deletions
|
@ -18,10 +18,10 @@ public enum StockAbilities {
|
|||
AvatarState,
|
||||
|
||||
// Project Korra
|
||||
Extraction, Smokescreen, Combustion, Breathbending;
|
||||
Extraction, Smokescreen, Combustion, BreathSphere;
|
||||
|
||||
private enum AirbendingAbilities {
|
||||
AirBlast, AirBubble, AirShield, AirSuction, AirSwipe, Tornado, AirScooter, AirSpout, AirBurst, Breathbending;
|
||||
AirBlast, AirBubble, AirShield, AirSuction, AirSwipe, Tornado, AirScooter, AirSpout, AirBurst, BreathSphere;
|
||||
}
|
||||
|
||||
private enum WaterbendingAbilities {
|
||||
|
|
|
@ -189,10 +189,10 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Air.AirSwipe.Cooldown", 1500);
|
||||
config.addDefault("Abilities.Air.AirSwipe.ChargeFactor", 3);
|
||||
|
||||
config.addDefault("Abilities.Air.Breathbending.Enabled", true);
|
||||
config.addDefault("Abilities.Air.Breathbending.CanBeUsedOnUndeadMobs", true);
|
||||
config.addDefault("Abilities.Air.Breathbending.Range", 5);
|
||||
config.addDefault("Abilities.Air.Breathbending.Damage", 0.5);
|
||||
config.addDefault("Abilities.Air.BreathSphere.Enabled", true);
|
||||
config.addDefault("Abilities.Air.BreathSphere.CanBeUsedOnUndeadMobs", true);
|
||||
config.addDefault("Abilities.Air.BreathSphere.Range", 5);
|
||||
config.addDefault("Abilities.Air.BreathSphere.Damage", 0.5);
|
||||
|
||||
config.addDefault("Abilities.Air.Tornado.Radius", 10);
|
||||
config.addDefault("Abilities.Air.Tornado.Height", 25);
|
||||
|
|
|
@ -78,7 +78,7 @@ import com.projectkorra.ProjectKorra.airbending.AirShield;
|
|||
import com.projectkorra.ProjectKorra.airbending.AirSpout;
|
||||
import com.projectkorra.ProjectKorra.airbending.AirSuction;
|
||||
import com.projectkorra.ProjectKorra.airbending.AirSwipe;
|
||||
import com.projectkorra.ProjectKorra.airbending.Breathbending;
|
||||
import com.projectkorra.ProjectKorra.airbending.BreathSphere;
|
||||
import com.projectkorra.ProjectKorra.airbending.Tornado;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.Paralyze;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.RapidPunch;
|
||||
|
@ -1840,8 +1840,16 @@ public class Methods {
|
|||
}
|
||||
|
||||
public static void breakBreathbendingHold(Entity entity) {
|
||||
if(Breathbending.isBreathbent(entity)) {
|
||||
Breathbending.breakBreathbend(entity);
|
||||
if(BreathSphere.isBreathbent(entity)) {
|
||||
BreathSphere.breakBreathSphere(entity);
|
||||
return;
|
||||
}
|
||||
|
||||
if(entity instanceof Player) {
|
||||
Player player = (Player) entity;
|
||||
if(BreathSphere.isChannelingSphere(player)) {
|
||||
BreathSphere.remove(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ import com.projectkorra.ProjectKorra.airbending.AirShield;
|
|||
import com.projectkorra.ProjectKorra.airbending.AirSpout;
|
||||
import com.projectkorra.ProjectKorra.airbending.AirSuction;
|
||||
import com.projectkorra.ProjectKorra.airbending.AirSwipe;
|
||||
import com.projectkorra.ProjectKorra.airbending.Breathbending;
|
||||
import com.projectkorra.ProjectKorra.airbending.BreathSphere;
|
||||
import com.projectkorra.ProjectKorra.airbending.Tornado;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.ChiPassive;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.HighJump;
|
||||
|
@ -154,7 +154,7 @@ public class PKListener implements Listener {
|
|||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || Breathbending.isBreathbent(player)) {
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || BreathSphere.isBreathbent(player)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ public class PKListener implements Listener {
|
|||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
Methods.cooldowns.put(player.getName(), System.currentTimeMillis());
|
||||
}
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || Breathbending.isBreathbent(player)) {
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || BreathSphere.isBreathbent(player)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
Player player = event.getPlayer();
|
||||
Methods.cooldowns.put(player.getName(), System.currentTimeMillis());
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || Breathbending.isBreathbent(player)) {
|
||||
if (Paralyze.isParalyzed(player) || Bloodbending.isBloodbended(player) || BreathSphere.isBreathbent(player)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ public class PKListener implements Listener {
|
|||
|
||||
if (event.isCancelled()) return;
|
||||
|
||||
if(Breathbending.isBreathbent(player)) {
|
||||
if(BreathSphere.isBreathbent(player)) {
|
||||
if(!Methods.getBoundAbility(player).equalsIgnoreCase("AirSwipe") || !Methods.getBoundAbility(player).equalsIgnoreCase("FireBlast") || !Methods.getBoundAbility(player).equalsIgnoreCase("EarthBlast") || !Methods.getBoundAbility(player).equalsIgnoreCase("WaterManipulation")) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -353,8 +353,8 @@ public class PKListener implements Listener {
|
|||
if (abil.equalsIgnoreCase("AirShield")) {
|
||||
new AirShield(player);
|
||||
}
|
||||
if(abil.equalsIgnoreCase("Breathbending")) {
|
||||
new Breathbending(player);
|
||||
if(abil.equalsIgnoreCase("BreathSphere")) {
|
||||
new BreathSphere(player);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ public class PKListener implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
if(Breathbending.isBreathbent(player)) {
|
||||
if(BreathSphere.isBreathbent(player)) {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1, 100));
|
||||
}
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ public class PKListener implements Listener {
|
|||
Entity entity = event.getEntity();
|
||||
if (entity != null)
|
||||
if (Paralyze.isParalyzed(entity)
|
||||
|| Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
|| Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -582,7 +582,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -600,7 +600,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -609,7 +609,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -618,7 +618,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || Breathbending.isBreathbent(entity))
|
||||
if (Paralyze.isParalyzed(entity) || Bloodbending.isBloodbended(entity) || BreathSphere.isBreathbent(entity))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
@ -629,7 +629,7 @@ public class PKListener implements Listener {
|
|||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if(Breathbending.isBreathbent(player)) {
|
||||
if(BreathSphere.isBreathbent(player)) {
|
||||
if(!Methods.getBoundAbility(player).equalsIgnoreCase("AirSwipe") || !Methods.getBoundAbility(player).equalsIgnoreCase("FireBlast") || !Methods.getBoundAbility(player).equalsIgnoreCase("EarthBlast") || !Methods.getBoundAbility(player).equalsIgnoreCase("WaterManipulation")) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -836,7 +836,7 @@ public class PKListener implements Listener {
|
|||
if (event.isCancelled()) return;
|
||||
|
||||
Player p = event.getPlayer();
|
||||
if (Tornado.getPlayers().contains(p) || Bloodbending.isBloodbended(p) || Breathbending.isBreathbent(p)
|
||||
if (Tornado.getPlayers().contains(p) || Bloodbending.isBloodbended(p) || BreathSphere.isBreathbent(p)
|
||||
|| FireJet.getPlayers().contains(p)
|
||||
|| AvatarState.getPlayers().contains(p)) {
|
||||
event.setCancelled(p.getGameMode() != GameMode.CREATIVE);
|
||||
|
|
|
@ -294,6 +294,7 @@ public class AirBlast {
|
|||
if (entity.getFireTicks() > 0)
|
||||
entity.getWorld().playEffect(entity.getLocation(), Effect.EXTINGUISH, 0);
|
||||
entity.setFireTicks(0);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -256,6 +256,7 @@ public class AirSuction {
|
|||
entity.getWorld().playEffect(entity.getLocation(),
|
||||
Effect.EXTINGUISH, 0);
|
||||
entity.setFireTicks(0);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,6 +263,8 @@ public class AirSwipe {
|
|||
if (entity instanceof Player) {
|
||||
new Flight((Player) entity, player);
|
||||
}
|
||||
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
if (elements.containsKey(direction)) {
|
||||
elements.remove(direction);
|
||||
|
|
|
@ -18,7 +18,7 @@ public class AirbendingManager implements Runnable {
|
|||
AirPassive.handlePassive(Bukkit.getServer());
|
||||
AirBurst.progressAll();
|
||||
AirScooter.progressAll();
|
||||
Breathbending.progressAll();
|
||||
BreathSphere.progressAll();
|
||||
AirSpout.spoutAll();
|
||||
AirBubble.handleBubbles(Bukkit.getServer());
|
||||
AirSuction.progressAll();
|
||||
|
|
|
@ -17,19 +17,19 @@ import com.projectkorra.ProjectKorra.ProjectKorra;
|
|||
import com.projectkorra.ProjectKorra.TempPotionEffect;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
|
||||
public class Breathbending {
|
||||
public class BreathSphere {
|
||||
|
||||
public static ConcurrentHashMap<Player, Breathbending> instances = new ConcurrentHashMap<Player, Breathbending>();
|
||||
public static ConcurrentHashMap<Player, BreathSphere> instances = new ConcurrentHashMap<Player, BreathSphere>();
|
||||
|
||||
ConcurrentHashMap<Entity, Location> targetentities = new ConcurrentHashMap<Entity, Location>();
|
||||
|
||||
private static boolean canBeUsedOnUndead = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.Breathbending.CanBeUsedOnUndeadMobs");
|
||||
private int range = ProjectKorra.plugin.getConfig().getInt("Abilities.Air.Breathbending.Range");
|
||||
private double damage = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.Breathbending.Damage");
|
||||
private static boolean canBeUsedOnUndead = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.BreathSphere.CanBeUsedOnUndeadMobs");
|
||||
private int range = ProjectKorra.plugin.getConfig().getInt("Abilities.Air.BreathSphere.Range");
|
||||
private double damage = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.BreathSphere.Damage");
|
||||
|
||||
private Player player;
|
||||
|
||||
public Breathbending(Player player) {
|
||||
public BreathSphere(Player player) {
|
||||
if (instances.containsKey(player)) {
|
||||
remove(player);
|
||||
return;
|
||||
|
@ -80,7 +80,7 @@ public class Breathbending {
|
|||
}
|
||||
}
|
||||
|
||||
if (!Methods.canBend(player.getName(), "Breathbending")) {
|
||||
if (!Methods.canBend(player.getName(), "BreathSphere")) {
|
||||
remove(player);
|
||||
return;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class Breathbending {
|
|||
remove(player);
|
||||
return;
|
||||
}
|
||||
if (!Methods.getBoundAbility(player).equalsIgnoreCase("Breathbending")) {
|
||||
if (!Methods.getBoundAbility(player).equalsIgnoreCase("BreathSphere")) {
|
||||
remove(player);
|
||||
return;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class Breathbending {
|
|||
if (AvatarState.isAvatarState(player)) {
|
||||
ArrayList<Entity> entities = new ArrayList<Entity>();
|
||||
for (Entity entity : Methods.getEntitiesAroundPoint(player.getLocation(), range)) {
|
||||
if (Methods.isRegionProtectedFromBuild(player, "Breathbending", entity.getLocation()))
|
||||
if (Methods.isRegionProtectedFromBuild(player, "BreathSphere", entity.getLocation()))
|
||||
continue;
|
||||
entities.add(entity);
|
||||
if (!targetentities.containsKey(entity) && entity instanceof LivingEntity) {
|
||||
|
@ -158,7 +158,7 @@ public class Breathbending {
|
|||
}
|
||||
}
|
||||
|
||||
public static void breakBreathbend(Entity entity) {
|
||||
public static void breakBreathSphere(Entity entity) {
|
||||
for (Player player : instances.keySet()) {
|
||||
if (instances.get(player).targetentities.containsKey(entity)) {
|
||||
instances.remove(player);
|
||||
|
@ -192,7 +192,7 @@ public class Breathbending {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static Location getBreathbendingLocation(Entity entity) {
|
||||
public static Location getBreathSphereLocation(Entity entity) {
|
||||
for (Player player : instances.keySet()) {
|
||||
if (instances.get(player).targetentities.containsKey(entity)) {
|
||||
return instances.get(player).targetentities.get(entity);
|
||||
|
@ -200,5 +200,14 @@ public class Breathbending {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isChannelingSphere(Player player){
|
||||
if(instances.containsKey(player)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void removeAll() {
|
||||
instances.clear();
|
||||
}
|
||||
|
||||
}
|
|
@ -150,6 +150,8 @@ public class Tornado {
|
|||
velocity.multiply(timefactor);
|
||||
entity.setVelocity(velocity);
|
||||
entity.setFallDistance(0);
|
||||
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
if (entity instanceof Player) {
|
||||
new Flight((Player) entity);
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.projectkorra.ProjectKorra.BendingPlayer;
|
|||
import com.projectkorra.ProjectKorra.Element;
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.airbending.BreathSphere;
|
||||
|
||||
public class ChiPassive {
|
||||
|
||||
|
@ -37,9 +38,13 @@ public class ChiPassive {
|
|||
}
|
||||
|
||||
public static void blockChi(final Player player) {
|
||||
if(BreathSphere.isChannelingSphere(player)) {
|
||||
BreathSphere.remove(player);
|
||||
}
|
||||
final BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer == null) return;
|
||||
bPlayer.blockChi();
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(ProjectKorra.plugin, new Runnable() {
|
||||
public void run() {
|
||||
bPlayer.unblockChi();
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.projectkorra.ProjectKorra.Element;
|
|||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
import com.projectkorra.ProjectKorra.airbending.BreathSphere;
|
||||
|
||||
public class Paralyze {
|
||||
|
||||
|
@ -42,6 +43,12 @@ public class Paralyze {
|
|||
if (entity instanceof Creature) {
|
||||
((Creature) entity).setTarget(null);
|
||||
}
|
||||
|
||||
if (entity instanceof Player) {
|
||||
if(BreathSphere.isChannelingSphere((Player) entity)) {
|
||||
BreathSphere.remove((Player) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isParalyzed(Entity entity) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
|||
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.airbending.BreathSphere;
|
||||
|
||||
public class RapidPunch {
|
||||
|
||||
|
@ -59,6 +60,9 @@ public class RapidPunch {
|
|||
if (ChiPassive.willChiBlock((Player) target)) {
|
||||
ChiPassive.blockChi((Player) target);
|
||||
}
|
||||
if(BreathSphere.isChannelingSphere((Player) target)) {
|
||||
BreathSphere.remove((Player) target);
|
||||
}
|
||||
lt.setNoDamageTicks(0);
|
||||
}
|
||||
cooldowns.put(p.getName(), System.currentTimeMillis());
|
||||
|
|
|
@ -389,6 +389,9 @@ public class EarthBlast {
|
|||
// || testblock.equals(block2)) {
|
||||
// entity.setVelocity(entity.getVelocity().clone()
|
||||
// .add(direction));
|
||||
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
Location location = player.getEyeLocation();
|
||||
Vector vector = location.getDirection();
|
||||
entity.setVelocity(vector.normalize().multiply(pushfactor));
|
||||
|
|
|
@ -259,6 +259,8 @@ public class Ripple {
|
|||
Vector vector = direction.clone();
|
||||
vector.setY(.5);
|
||||
entity.setVelocity(vector);
|
||||
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -177,6 +177,7 @@ public class Combustion {
|
|||
if (entity instanceof LivingEntity) {
|
||||
if (entity.getLocation().distance(block) < radius) { // They are close enough to the explosion.
|
||||
Methods.damageEntity(player, entity, damage);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,6 +220,7 @@ public class FireBlast {
|
|||
if (entity instanceof LivingEntity) {
|
||||
entity.setFireTicks(50);
|
||||
Methods.damageEntity(player, entity, (int) Methods.getFirebendingDayAugment((double) damage, entity.getWorld()));
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
new Enflamed(entity, player);
|
||||
instances.remove(id);
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ public class Fireball {
|
|||
double damage = slope * (distance - innerradius) + maxdamage;
|
||||
// Methods.verbose(damage);
|
||||
Methods.damageEntity(player, entity, damage);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
|
||||
private void fireball() {
|
||||
|
|
|
@ -154,6 +154,7 @@ public class Lightning {
|
|||
double damage = maxdamage - (distance / strikeradius) * .5;
|
||||
hitentities.add(entity);
|
||||
Methods.damageEntity(player, entity, (int) damage);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
|
||||
public static boolean isNearbyChannel(Location location) {
|
||||
|
|
|
@ -187,6 +187,7 @@ public class WallOfFire {
|
|||
if (entity instanceof LivingEntity) {
|
||||
Methods.damageEntity(player, entity, damage);
|
||||
new Enflamed(entity, player);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ public class Bloodbending {
|
|||
continue;
|
||||
}
|
||||
Methods.damageEntity(player, entity, 0);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
targetentities.put(entity, entity.getLocation().clone());
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +74,7 @@ public class Bloodbending {
|
|||
return;
|
||||
}
|
||||
Methods.damageEntity(player, target, 0);
|
||||
Methods.breakBreathbendingHold(target);
|
||||
targetentities.put(target, target.getLocation().clone());
|
||||
}
|
||||
this.player = player;
|
||||
|
@ -166,6 +168,7 @@ public class Bloodbending {
|
|||
if (entity instanceof Creature) {
|
||||
((Creature) entity).setTarget(null);
|
||||
}
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
for (Entity entity : targetentities.keySet()) {
|
||||
|
@ -199,6 +202,7 @@ public class Bloodbending {
|
|||
if (entity instanceof Creature) {
|
||||
((Creature) entity).setTarget(null);
|
||||
}
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ public class HealingWaters {
|
|||
if (!Methods.isRegionProtectedFromBuild(player, "HealingWaters", player.getLocation()))
|
||||
if(player.getHealth() < player.getMaxHealth()) {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 70, 1));
|
||||
Methods.breakBreathbendingHold(player);
|
||||
}
|
||||
// for(PotionEffect effect : player.getActivePotionEffects()) {
|
||||
// if(Methods.isNegativeEffect(effect.getType())) {
|
||||
|
@ -93,6 +94,7 @@ public class HealingWaters {
|
|||
private static void applyHealingToEntity(LivingEntity le) {
|
||||
if(le.getHealth() < le.getMaxHealth()) {
|
||||
le.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 70, 1));
|
||||
Methods.breakBreathbendingHold(le);
|
||||
}
|
||||
// for(PotionEffect effect : le.getActivePotionEffects()) {
|
||||
// if(Methods.isNegativeEffect(effect.getType())) {
|
||||
|
|
|
@ -243,6 +243,7 @@ public class IceSpike {
|
|||
PotionEffect effect = new PotionEffect(PotionEffectType.SLOW, 70, mod);
|
||||
new TempPotionEffect(entity, effect);
|
||||
}
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -306,6 +306,7 @@ public class IceSpike2 {
|
|||
new TempPotionEffect(entity, effect);
|
||||
entity.damage(damage, player);
|
||||
}
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,7 @@ public class OctopusForm {
|
|||
entity.setVelocity(Methods.getDirection(player.getLocation(), location).normalize().multiply(1.75));
|
||||
if (entity instanceof LivingEntity)
|
||||
Methods.damageEntity(player, entity, damage);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -507,6 +507,7 @@ public class Torrent {
|
|||
damagedealt = (int) (Methods.getWaterbendingNightAugment(world) * (double) deflectdamage);
|
||||
}
|
||||
Methods.damageEntity(player, entity, damagedealt);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -526,6 +527,7 @@ public class Torrent {
|
|||
}
|
||||
// if (((LivingEntity) entity).getNoDamageTicks() == 0) {
|
||||
Methods.damageEntity(player, entity, damagedealt);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
// Methods.verbose("Hit! Health at "
|
||||
// + ((LivingEntity) entity).getHealth());
|
||||
hurtentities.add(entity);
|
||||
|
|
|
@ -367,6 +367,7 @@ public class WaterManipulation {
|
|||
if (AvatarState.isAvatarState(player))
|
||||
damage = AvatarState.getValue(damage);
|
||||
Methods.damageEntity(player, entity, (int) Methods.waterbendingNightAugment(damage, player.getWorld()));
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
progressing = false;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -304,6 +304,7 @@ public class Wave {
|
|||
if (entity.getFireTicks() > 0)
|
||||
entity.getWorld().playEffect(entity.getLocation(), Effect.EXTINGUISH, 0);
|
||||
entity.setFireTicks(0);
|
||||
Methods.breakBreathbendingHold(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ Abilities:
|
|||
Speed: 25
|
||||
Cooldown: 1500
|
||||
ChargeFactor: 3
|
||||
Breathbending:
|
||||
BreathSphere:
|
||||
Enabled: true
|
||||
CanBeUsedOnUndeadMobs: true
|
||||
Range: 5
|
||||
|
|
|
@ -51,7 +51,7 @@ permissions:
|
|||
bending.ability.AirSpout: true
|
||||
bending.ability.AirSuction: true
|
||||
bending.ability.AirSwipe: true
|
||||
bending.ability.Breathbending: true
|
||||
bending.ability.BreathSphere: true
|
||||
bending.ability.Tornado: true
|
||||
bending.air.passive: true
|
||||
bending.water:
|
||||
|
@ -116,4 +116,4 @@ permissions:
|
|||
bending.chi.grapplinghook: true
|
||||
bending.avatar:
|
||||
default: false
|
||||
description: Grants the Avatar Color.
|
||||
description: Grants the Avatar Color.
|
Loading…
Reference in a new issue