Add config options for Torrent

This commit is contained in:
MistPhizzle 2014-07-29 10:38:03 -04:00
parent 01784ad412
commit 33e4d6a6fb
3 changed files with 13 additions and 4 deletions

View file

@ -261,7 +261,10 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Torrent.Enabled", true);
config.addDefault("Abilities.Water.Torrent.Description", "Torrent is one of the strongest moves in a waterbender's arsenal. To use, first click a source block to select it; then hold shift to begin streaming the water around you. Water flowing around you this way will damage and knock back nearby enemies and projectiles. If you release shift during this, you will create a large wave that expands outwards from you, launching anything in its path back. Instead, if you click you release the water and channel it to flow towards your cursor. Anything caught in the blast will be tossed about violently and take damage. Finally, if you click again when the water is torrenting, it will freeze the area around it when it is obstructed.");
config.addDefault("Abilities.Water.Torrent.Range", 25);
config.addDefault("Abilities.Water.Torrent.DeflectDamage", 1);
config.addDefault("Abilities.Water.Torrent.Damage", 2);
config.addDefault("Abilities.Water.Plantbending.RegrowTime", 180000);
config.addDefault("Abilities.Water.WaterBubble.Enabled", true);

View file

@ -8,12 +8,14 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import com.projectkorra.ProjectKorra.Methods;
import com.projectkorra.ProjectKorra.ProjectKorra;
import com.projectkorra.ProjectKorra.TempBlock;
import com.projectkorra.ProjectKorra.Ability.AvatarState;
@ -23,12 +25,13 @@ public class Torrent {
private static ConcurrentHashMap<Player, Torrent> instances = new ConcurrentHashMap<Player, Torrent>();
private static ConcurrentHashMap<TempBlock, Player> frozenblocks = new ConcurrentHashMap<TempBlock, Player>();
static FileConfiguration config = ProjectKorra.plugin.getConfig();
static long interval = 30;
static double range = 25;
static double range = config.getInt("Abilities.Water.Torrent.Range");
private static int defaultrange = 20;
private static int selectrange = 10;
private static int damage = 2;
private static int deflectdamage = 1;
private static int damage = config.getInt("Abilities.Water.Torrent.Damage");
private static int deflectdamage = config.getInt("Abilities.Water.Torrent.DeflectDamage");
private static int maxlayer = 3;
private static double factor = 1;
private static double radius = 3;

View file

@ -193,6 +193,9 @@ Abilities:
Torrent:
Enabled: true
Description: "Torrent is one of the strongest moves in a waterbender's arsenal. To use, first click a source block to select it; then hold shift to begin streaming the water around you. Water flowing around you this way will damage and knock back nearby enemies and projectiles. If you release shift during this, you will create a large wave that expands outwards from you, launching anything in its path back. Instead, if you click you release the water and channel it to flow towards your cursor. Anything caught in the blast will be tossed about violently and take damage. Finally, if you click again when the water is torrenting, it will freeze the area around it when it is obstructed."
Damage: 2
DeflectDamage: 1
Range: 25
WaterBubble:
Enabled: true
Description: "To use, the bender must merely have the ability selected. All water around the user in a small bubble will vanish, replacing itself once the user either gets too far away or selects a different ability."