Added get and set Methods to Chi abilities

This commit is contained in:
Nathan Braun 2015-01-02 00:24:06 -08:00
parent fdcb34f2ee
commit 35ec8565b2
4 changed files with 79 additions and 7 deletions

View file

@ -13,11 +13,13 @@ import com.projectkorra.ProjectKorra.waterbending.Bloodbending;
public class AcrobatStance {
public static double chiBlockBost = ProjectKorra.plugin.getConfig().getDouble("Abilities.Chi.AcrobatStance.ChiBlockBoost");
public static double paralyzeDodgeBoost = ProjectKorra.plugin.getConfig().getDouble("Abilities.Chi.AcrobatStance.ParalyzeChanceDecrease");
public static double CHI_BLOCK_BOOST = ProjectKorra.plugin.getConfig().getDouble("Abilities.Chi.AcrobatStance.ChiBlockBoost");
public static double PARA_DODGE_BOOST = ProjectKorra.plugin.getConfig().getDouble("Abilities.Chi.AcrobatStance.ParalyzeChanceDecrease");
public static ConcurrentHashMap<Player, AcrobatStance> instances = new ConcurrentHashMap<Player, AcrobatStance>();
private Player player;
public double chiBlockBost = CHI_BLOCK_BOOST;
public double paralyzeDodgeBoost = PARA_DODGE_BOOST;
public AcrobatStance(Player player) {
this.player = player;
@ -75,4 +77,24 @@ public class AcrobatStance {
public static boolean isInAcrobatStance(Player player) {
return instances.containsKey(player);
}
public double getChiBlockBost() {
return chiBlockBost;
}
public void setChiBlockBost(double chiBlockBost) {
this.chiBlockBost = chiBlockBost;
}
public double getParalyzeDodgeBoost() {
return paralyzeDodgeBoost;
}
public void setParalyzeDodgeBoost(double paralyzeDodgeBoost) {
this.paralyzeDodgeBoost = paralyzeDodgeBoost;
}
public Player getPlayer() {
return player;
}
}

View file

@ -28,7 +28,7 @@ public class ChiPassive {
public static boolean willChiBlock(Player attacker, Player player) {
if (AcrobatStance.isInAcrobatStance(attacker)) {
dodgeChance = dodgeChance - AcrobatStance.chiBlockBost;
dodgeChance = dodgeChance - AcrobatStance.CHI_BLOCK_BOOST;
}
Random rand = new Random();

View file

@ -18,16 +18,18 @@ public class RapidPunch {
public static ConcurrentHashMap<Player, RapidPunch> instances = new ConcurrentHashMap<Player, RapidPunch>();
public static List<Player> punching = new ArrayList<Player>();
private static int damage = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.RapidPunch.Damage");
private static int punches = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.RapidPunch.Punches");
private int damage = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.RapidPunch.Damage");
private int punches = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.RapidPunch.Punches");
private int distance = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.RapidPunch.Distance");
private long cooldown = ProjectKorra.plugin.getConfig().getLong("Abilities.Chi.RapidPunch.Cooldown");
private int numpunches;
// private long timers;
private Entity target;
private Player player;
public RapidPunch(Player p) {// , Entity t) {
player = p;
BendingPlayer bPlayer = Methods.getBendingPlayer(p.getName());
if (instances.containsKey(p))
return;
@ -78,4 +80,33 @@ public class RapidPunch {
+ " This has a short cooldown.";
}
public int getDamage() {
return damage;
}
public void setDamage(int damage) {
this.damage = damage;
}
public int getDistance() {
return distance;
}
public void setDistance(int distance) {
this.distance = distance;
}
public long getCooldown() {
return cooldown;
}
public void setCooldown(long cooldown) {
this.cooldown = cooldown;
if(player != null)
Methods.getBendingPlayer(player.getName()).addCooldown("RapidPunch", cooldown);
}
public Player getPlayer() {
return player;
}
}

View file

@ -13,8 +13,8 @@ import com.projectkorra.ProjectKorra.waterbending.Bloodbending;
public class WarriorStance {
public static int strength = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.WarriorStance.Strength") - 1;
public static int resistance = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.WarriorStance.Resistance");
public int strength = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.WarriorStance.Strength") - 1;
public int resistance = ProjectKorra.plugin.getConfig().getInt("Abilities.Chi.WarriorStance.Resistance");
private Player player;
public static ConcurrentHashMap<Player, WarriorStance> instances = new ConcurrentHashMap<Player, WarriorStance>();
@ -75,4 +75,23 @@ public class WarriorStance {
instances.remove(player);
}
public int getStrength() {
return strength;
}
public void setStrength(int strength) {
this.strength = strength;
}
public int getResistance() {
return resistance;
}
public void setResistance(int resistance) {
this.resistance = resistance;
}
public Player getPlayer() {
return player;
}
}