mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
AvatarState config options (#676)
* Adds config options for abilities in avatar state * Adds AvatarState config option for each ability
This commit is contained in:
parent
fb70ed6f59
commit
bdaa68ede1
19 changed files with 111 additions and 98 deletions
|
@ -11,7 +11,6 @@ import org.bukkit.util.Vector;
|
|||
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
|
||||
public class AirBurst extends AirAbility {
|
||||
|
||||
|
@ -56,8 +55,8 @@ public class AirBurst extends AirAbility {
|
|||
this.affectedEntities = new ArrayList<>();
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
this.chargeTime = 0;
|
||||
this.damage = AvatarState.getValue(this.damage);
|
||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Air.AirBurst.ChargeTime");
|
||||
this.damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Air.AirBurst.Damage");
|
||||
}
|
||||
start();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class AirShield extends AirAbility {
|
|||
super(player);
|
||||
|
||||
this.maxRadius = getConfig().getDouble("Abilities.Air.AirShield.Radius");
|
||||
this.isToggledByAvatarState = getConfig().getBoolean("Abilities.Air.AirShield.IsAvatarStateToggle");
|
||||
this.isToggledByAvatarState = getConfig().getBoolean("Abilities.Avatar.AvatarState.Air.AirShield.IsAvatarStateToggle");
|
||||
this.radius = this.maxRadius;
|
||||
this.speed = getConfig().getDouble("Abilities.Air.AirShield.Speed");
|
||||
this.streams = getConfig().getInt("Abilities.Air.AirShield.Streams");
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
|
||||
/**
|
||||
|
@ -88,15 +87,11 @@ public class Suffocate extends AirAbility {
|
|||
this.tasks = new ArrayList<>();
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
cooldown = 0;
|
||||
chargeTime = 0;
|
||||
requireConstantAim = false;
|
||||
damage = AvatarState.getValue(damage);
|
||||
range *= 2;
|
||||
slow = AvatarState.getValue(slow);
|
||||
slowRepeat = AvatarState.getValue(slowRepeat);
|
||||
blind = AvatarState.getValue(blind);
|
||||
blindRepeat = AvatarState.getValue(blindRepeat);
|
||||
cooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Air.Suffocate.Cooldown");
|
||||
chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Air.Suffocate.ChargeTime");
|
||||
damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Air.Suffocate.Damage");
|
||||
range = getConfig().getDouble("Abilities.Avatar.AvatarState.Air.Suffocate.Range");
|
||||
|
||||
}
|
||||
|
||||
if (particleCount < 1) {
|
||||
|
|
|
@ -284,7 +284,7 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Water.Surge.Description", "Surge offers great utility and is one of the most important defence abilities for waterbender's. It can be used to push entities back, used to push yourself in a direction, trap entities and protect yourself with a shield.");
|
||||
config.addDefault("Abilities.Water.Surge.Instructions", "\n" + "(Shield) Left click on a water source and then hold sneak while looking up to create a water shield that will move wherever you look. Additionally, you can left click to turn this shield into ice. If you let go of sneak at any point, this ability will cancel." + "\n" + "(Surge) Tap sneak at a water source and click in a direction to fire a surge of water that will knock entities back. Additionally, if you tap sneak again before the surge reaches an entity, when it hits them it will encase them in ice.");
|
||||
config.addDefault("Abilities.Water.Torrent.Description", "Torrent is one of the strongest moves in a waterbender's arsenal. It has the potential to do immense damage and to be comboed with other abilities to perform a deal a large damage burst. Torrent is fundamental for waterbender's. ");
|
||||
config.addDefault("Abilities.Water.Torrent.Instructions", "\n" + "(Torrent) Left click at a water source and hold sneak to form the torrent. Then, left click and the torrent will shoot out, moving in the direction you're looking. If the torrent hits an entity, it can drag them and deal damage. Additionally, if you click before the torrent hits a surface or entity it will freeze on impact." + "\n" + "(Wave) Left click a water source and hold sneak to form a torrent around you. Then, release sneak to send a wave of water expanding outwards every direction that will push entities back.");
|
||||
config.addDefault("Abilities.Water.Torrent.Instructions", "\n" + "(Torrent) Left click at a water source and hold sneak to form the torrent. Then, left click and the torrent will shoot out, moving in the direction you're looking. If the torrent hits an entity, it can drag them and deal damage. Additionally, if you left click before the torrent hits a surface or entity it will freeze on impact." + "\n" + "(Wave) Left click a water source and hold sneak to form a torrent around you. Then, release sneak to send a wave of water expanding outwards every direction that will push entities back.");
|
||||
config.addDefault("Abilities.Water.Torrent.DeathMessage", "{victim} was taken down by {attacker}'s {ability}");
|
||||
config.addDefault("Abilities.Water.WaterArms.Description", "One of the most diverse moves in a Waterbender's arsenal, this move creates tendrils " + "of water from the players arms to emulate their actual arms. It has the potential to do a variety of things that can either do mass amounts of damage, or used for mobility.");
|
||||
config.addDefault("Abilities.Water.WaterArms.Instructions", "To activate this ability, tap sneak at a water source. Additionally, to de-activate this ability, hold sneak and left click." + "\n" + "(Pull) Left click at a target and your arms will expand outwards, pulling entities towards you if they're in range." + "\n" + "(Punch) Left click and one arm will expand outwards, punching anyone it hits and dealing damage." + "\n" + "(Grapple) Left click to send your arms forward, pulling you to whatever surface they land on." + "\n" + "(Grab) Left click to grab an entity that's in range. They will then be controlled and moved in whatever direction you look. Additionally, if you left click again you can throw the target that you're controlling." + "\n" + "(Freeze) Left click to rapidly fire ice blasts at a target, damaging the target and giving them slowness." + "\n" + "(Spear) Left click to send an ice spear out, damaging and freezing whoever it hits in ice blocks.");
|
||||
|
@ -524,7 +524,6 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Avatar.AvatarState.Enabled", true);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Cooldown", 7200000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Duration", 480000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PowerMultiplier", 3.5);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.Regeneration.Enabled", true);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.Regeneration.Power", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.Speed.Enabled", true);
|
||||
|
@ -533,6 +532,47 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.DamageResistance.Power", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.FireResistance.Enabled", true);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.PotionEffects.FireResistance.Power", 3);
|
||||
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.AirBurst.ChargeTime", 1000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.AirBurst.Damage", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.AirShield.IsAvatarStateToggle", true);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.Suffocate.Cooldown", 0);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.Suffocate.ChargeTime", 1000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.Suffocate.Damage", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Air.Suffocate.Range", 16);
|
||||
|
||||
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ShiftCooldown", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickLavaCooldown", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickLandCooldown", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ShiftPlatformRadius", 18);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickRadius", 18);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.LavaFlow.ShiftRadius", 18);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.MetalClips.Cooldown", 2000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.MetalClips.Range", 20);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.MetalClips.CrushDamage", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.RaiseEarth.Wall.Height", 20);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.RaiseEarth.Column.Width", 16);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.Shockwave.Range", 20);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.Shockwave.Cooldown", 0);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.Shockwave.ChargeTime", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.Shockwave.Damage", 5);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Earth.Shockwave.Knockback", 2);
|
||||
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.Blaze.Ring.Range", 14);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireJet.IsAvatarStateToggle", true);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.Lightning.ChargeTime", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.Lightning.Damage", 6);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.Lightning.Cooldown", 1000);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireBurst.ChargeTime", 1);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireBurst.Damage", 3);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireBurst.Cooldown", 0);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.ChargeTime", 1500);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.Damage", 5);
|
||||
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Water.Surge.Wall.Radius", 4);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Water.Surge.Wave.Radius", 20);
|
||||
config.addDefault("Abilities.Avatar.AvatarState.Water.WaterManipulation.Damage", 5);
|
||||
|
||||
config.addDefault("Abilities.Air.Passive.Factor", 0.3);
|
||||
config.addDefault("Abilities.Air.Passive.AirAgility.Enabled", true);
|
||||
|
@ -581,7 +621,6 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Air.AirShield.Streams", 5);
|
||||
config.addDefault("Abilities.Air.AirShield.Speed", 10);
|
||||
config.addDefault("Abilities.Air.AirShield.Particles", 5);
|
||||
config.addDefault("Abilities.Air.AirShield.IsAvatarStateToggle", true);
|
||||
|
||||
config.addDefault("Abilities.Air.AirSpout.Enabled", true);
|
||||
config.addDefault("Abilities.Air.AirSpout.Height", 16);
|
||||
|
@ -1086,7 +1125,6 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Fire.FireJet.Speed", 0.8);
|
||||
config.addDefault("Abilities.Fire.FireJet.Duration", 2000);
|
||||
config.addDefault("Abilities.Fire.FireJet.Cooldown", 7000);
|
||||
config.addDefault("Abilities.Fire.FireJet.IsAvatarStateToggle", true);
|
||||
|
||||
config.addDefault("Abilities.Fire.FireShield.Enabled", true);
|
||||
config.addDefault("Abilities.Fire.FireShield.Radius", 3);
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
package com.projectkorra.projectkorra.earthbending;
|
||||
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.LavaAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||
import com.projectkorra.projectkorra.util.TempBlock;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -17,11 +13,14 @@ import org.bukkit.block.BlockFace;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.LavaAbility;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||
import com.projectkorra.projectkorra.util.TempBlock;
|
||||
|
||||
public class LavaFlow extends LavaAbility {
|
||||
|
||||
|
@ -118,22 +117,12 @@ public class LavaFlow extends LavaAbility {
|
|||
this.allowNaturalFlow = getConfig().getBoolean("Abilities.Earth.LavaFlow.AllowNaturalFlow");
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
shiftCooldown = 0;
|
||||
clickLavaCooldown = 0;
|
||||
clickLandCooldown = 0;
|
||||
shiftPlatformRadius = AvatarState.getValue(shiftPlatformRadius);
|
||||
shiftMaxRadius = AvatarState.getValue(shiftMaxRadius);
|
||||
shiftFlowSpeed = AvatarState.getValue(shiftFlowSpeed);
|
||||
shiftRemoveDelay = AvatarState.getValue(shiftRemoveDelay);
|
||||
clickRange = AvatarState.getValue(clickRange);
|
||||
clickLavaRadius = AvatarState.getValue(clickLavaRadius);
|
||||
clickLandRadius = AvatarState.getValue(clickLandRadius);
|
||||
clickLavaCleanupDelay = (long) AvatarState.getValue(clickLavaCleanupDelay);
|
||||
clickLandCleanupDelay = (long) AvatarState.getValue(clickLandCleanupDelay);
|
||||
lavaCreateSpeed = AvatarState.getValue(lavaCreateSpeed);
|
||||
landCreateSpeed = AvatarState.getValue(landCreateSpeed);
|
||||
upwardFlow = AvatarState.getValue(upwardFlow);
|
||||
downwardFlow = AvatarState.getValue(downwardFlow);
|
||||
shiftCooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.LavaFlow.ShiftCooldown");
|
||||
clickLavaCooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickLavaCooldown");
|
||||
clickLandCooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickLandCooldown");
|
||||
shiftPlatformRadius = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.LavaFlow.ShiftPlatformRadius");
|
||||
clickLavaRadius = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.LavaFlow.ClickRadius");
|
||||
shiftMaxRadius = getConfig().getDouble("Abilities.Avatar.AvatarState.LavaFlow.Earth.ShiftRadius");
|
||||
}
|
||||
|
||||
if (type == AbilityType.SHIFT) {
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.bukkit.util.Vector;
|
|||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.MetalAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
import com.projectkorra.projectkorra.util.TempArmor;
|
||||
|
||||
|
@ -83,11 +82,9 @@ public class MetalClips extends MetalAbility {
|
|||
}
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
cooldown = 0;
|
||||
range = AvatarState.getValue(range);
|
||||
crushDamage = AvatarState.getValue(crushDamage);
|
||||
magnetRange = AvatarState.getValue(magnetRange);
|
||||
magnetPower = AvatarState.getValue(magnetPower);
|
||||
cooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.MetalClips.Cooldown");;
|
||||
range = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.MetalClips.Range");
|
||||
crushDamage = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.MetalClips.CrushDamage");
|
||||
}
|
||||
|
||||
if (abilityType == 0) {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package com.projectkorra.projectkorra.earthbending;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -13,10 +12,10 @@ import org.bukkit.block.BlockFace;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
|
||||
public class RaiseEarth extends EarthAbility {
|
||||
|
||||
|
@ -45,7 +44,7 @@ public class RaiseEarth extends EarthAbility {
|
|||
|
||||
try {
|
||||
if (bPlayer.isAvatarState()) {
|
||||
height = (int) (2.0 / 5.0 * (double) AvatarState.getValue(height));
|
||||
height = getConfig().getInt("Abilities.Avatar.AvatarState.Earth.RaiseEarth.Column.Height");
|
||||
}
|
||||
block = BlockSource.getEarthSourceBlock(player, selectRange, ClickType.LEFT_CLICK);
|
||||
if (block == null) {
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package com.projectkorra.projectkorra.earthbending;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
|
@ -12,6 +7,10 @@ import org.bukkit.block.BlockFace;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
|
||||
public class RaiseEarthWall extends EarthAbility {
|
||||
|
||||
private int selectRange;
|
||||
|
@ -32,8 +31,8 @@ public class RaiseEarthWall extends EarthAbility {
|
|||
}
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
height = (int) (2.0 / 5.0 * (double) AvatarState.getValue(height));
|
||||
width = AvatarState.getValue(width);
|
||||
height = getConfig().getInt("Abilities.Avatar.AvatarState.Earth.RaiseEarth.Wall.Height");
|
||||
width = getConfig().getInt("Abilities.Avatar.AvatarState.Earth.RaiseEarth.Wall.Height");
|
||||
}
|
||||
|
||||
Vector direction = player.getEyeLocation().getDirection().normalize();
|
||||
|
|
|
@ -64,9 +64,9 @@ public class Ripple extends EarthAbility {
|
|||
this.entities = new ArrayList<>();
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
range = AvatarState.getValue(range);
|
||||
damage = AvatarState.getValue(damage);
|
||||
knockback = AvatarState.getValue(knockback);
|
||||
range = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.Shockwave.Range");
|
||||
damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.Shockwave.Damage");
|
||||
knockback = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.Shockwave.Knockback");
|
||||
}
|
||||
|
||||
initializeLocations();
|
||||
|
|
|
@ -27,8 +27,9 @@ public class Shockwave extends EarthAbility {
|
|||
this.range = getConfig().getDouble("Abilities.Earth.Shockwave.Range");
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
chargeTime = 0;
|
||||
cooldown = 0;
|
||||
range = getConfig().getDouble("Abilities.Avatar.AvatarState.Earth.Shockwave.Range");
|
||||
cooldown = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.Shockwave.Cooldown");
|
||||
chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Earth.Shockwave.ChargeTime");
|
||||
}
|
||||
|
||||
if (!bPlayer.canBend(this) || hasAbility(player, Shockwave.class)) {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package com.projectkorra.projectkorra.firebending;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||
|
||||
public class BlazeRing extends FireAbility {
|
||||
|
||||
private int range;
|
||||
|
@ -22,8 +21,9 @@ public class BlazeRing extends FireAbility {
|
|||
this.cooldown = getConfig().getLong("Abilities.Fire.Blaze.Ring.Cooldown");
|
||||
this.location = player.getLocation();
|
||||
|
||||
this.range = (int) AvatarState.getValue(this.range, player);
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
range = getConfig().getInt("Abilities.Avatar.AvatarState.Fire.Blaze.Ring.Range");
|
||||
}
|
||||
if (!bPlayer.canBend(this) || bPlayer.isOnCooldown("BlazeRing")) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -75,8 +75,8 @@ public class FireBlastCharged extends FireAbility {
|
|||
this.range = getDayFactor(range);
|
||||
}
|
||||
if (bPlayer.isAvatarState()) {
|
||||
this.chargeTime = 0;
|
||||
this.maxDamage = AvatarState.getValue(maxDamage);
|
||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.ChargeTime");
|
||||
this.maxDamage = getConfig().getDouble("Abilities.Avatar.AvatarState.Fire.FireBlast.Charged.Damage");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,9 @@ public class FireBurst extends FireAbility {
|
|||
chargeTime /= getDayFactor();
|
||||
}
|
||||
if (bPlayer.isAvatarState() || isSozinsComet(player.getWorld())) {
|
||||
chargeTime = 0;
|
||||
chargeTime = getConfig().getLong("Abilities.Avatar.Fire.FireBurst.ChargeTime");
|
||||
damage = getConfig().getInt("Abilities.Avatar.Fire.FireBurst.Damage");
|
||||
cooldown = getConfig().getLong("Abilities.Avatar.Fire.FireBurst.Cooldown");
|
||||
}
|
||||
|
||||
start();
|
||||
|
|
|
@ -42,7 +42,7 @@ public class FireJet extends FireAbility {
|
|||
abil.remove();
|
||||
}
|
||||
|
||||
this.avatarStateToggled = getConfig().getBoolean("Abilities.Fire.FireJet.IsAvatarStateToggle");
|
||||
this.avatarStateToggled = getConfig().getBoolean("Abilities.Avatar.Fire.FireJet.IsAvatarStateToggle");
|
||||
this.duration = getConfig().getLong("Abilities.Fire.FireJet.Duration");
|
||||
this.speed = getConfig().getDouble("Abilities.Fire.FireJet.Speed");
|
||||
this.cooldown = getConfig().getLong("Abilities.Fire.FireJet.Cooldown");
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.bukkit.util.Vector;
|
|||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
import com.projectkorra.projectkorra.ability.LightningAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
|
||||
public class Lightning extends LightningAbility {
|
||||
|
@ -105,13 +104,10 @@ public class Lightning extends LightningAbility {
|
|||
this.stunDuration = getDayFactor(this.stunDuration);
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
this.chargeTime = 0;
|
||||
this.cooldown = 0;
|
||||
this.damage = AvatarState.getValue(damage);
|
||||
this.maxChainArcs = AvatarState.getValue(maxChainArcs);
|
||||
this.chainArcChance = AvatarState.getValue(chainArcChance);
|
||||
this.chainRange = AvatarState.getValue(chainRange);
|
||||
this.stunChance = AvatarState.getValue(stunChance);
|
||||
this.chargeTime = getConfig().getLong("Abilities.Avatar.Fire.Lightning.ChargeTime");
|
||||
this.cooldown = getConfig().getLong("Abilities.Avatar.Fire.Lightning.Cooldown");
|
||||
this.damage = getConfig().getDouble("Abilities.Avatar.Fire.Lightning.Damage");
|
||||
|
||||
} else if (isSozinsComet(player.getWorld())) {
|
||||
this.chargeTime = 0;
|
||||
this.cooldown = 0;
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.bukkit.util.Vector;
|
|||
import com.projectkorra.projectkorra.BendingPlayer;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.WaterAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.firebending.FireBlast;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
|
@ -64,7 +63,7 @@ public class SurgeWall extends WaterAbility {
|
|||
}
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
radius = AvatarState.getValue(radius);
|
||||
radius = getConfig().getDouble("Abilities.Avatar.AvatarState.Water.Surge.Wall.Radius");
|
||||
}
|
||||
|
||||
SurgeWall wall = getAbility(player, SurgeWall.class);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SurgeWave extends WaterAbility {
|
|||
this.frozenBlocks = new ConcurrentHashMap<>();
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
maxRadius = AvatarState.getValue(maxRadius);
|
||||
maxRadius = getConfig().getDouble("Abilities.Avatar.AvatarState.Water.Surge.Wave.Radius");
|
||||
}
|
||||
maxRadius = getNightFactor(maxRadius);
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
|||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
import com.projectkorra.projectkorra.ability.WaterAbility;
|
||||
import com.projectkorra.projectkorra.ability.util.Collision;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.BlockSource;
|
||||
import com.projectkorra.projectkorra.util.ClickType;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
|
@ -272,7 +271,7 @@ public class WaterManipulation extends WaterAbility {
|
|||
entity.setVelocity(vector.normalize().multiply(pushFactor));
|
||||
|
||||
if (bPlayer.isAvatarState()) {
|
||||
damage = AvatarState.getValue(damage);
|
||||
damage = getConfig().getDouble("Abilities.Avatar.AvatarState.Water.WaterManipulation.Damage");
|
||||
}
|
||||
damage = getNightFactor(damage);
|
||||
DamageHandler.damageEntity(entity, damage, this);
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue