Merge remote-tracking branch 'ProjectKorra/master' into patch

This commit is contained in:
Benford 2015-09-27 11:16:29 -04:00
commit 9607ac6eb2
8 changed files with 53 additions and 35 deletions

View file

@ -934,12 +934,12 @@ public class PKListener implements Listener {
}
*/
if (element != null) {
if (ConfigManager.deathMsgConfig.get().contains(element.toString() + "." + ability)) {
message = ConfigManager.deathMsgConfig.get().getString(element + "." + ability);
if (ConfigManager.deathMsgConfig.get().contains(element.toString() + "." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString(element + "." + tempAbility);
}
} else {
if (ConfigManager.deathMsgConfig.get().contains("Combo." + ability)) {
message = ConfigManager.deathMsgConfig.get().getString("Combo." + ability);
if (ConfigManager.deathMsgConfig.get().contains("Combo." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString("Combo." + tempAbility);
}
}
message = message.replace("{victim}", event.getEntity().getName()).replace("{attacker}", event.getEntity().getKiller().getName()).replace("{ability}", ability);

View file

@ -303,7 +303,7 @@ public class AirCombo implements ConfigLoadable {
direction = player.getEyeLocation().getDirection();
for (double i = -5; i < 10; i += 1) {
FireComboStream fs = new FireComboStream(null, direction.clone().add(new Vector(0, 0.03 * i, 0)), player.getLocation(), range, speed);
FireComboStream fs = new FireComboStream(null, direction.clone().add(new Vector(0, 0.03 * i, 0)), player.getLocation(), range, speed, "AirSlice");
fs.setDensity(1);
fs.setSpread(0F);
fs.setUseNewParticles(true);
@ -347,7 +347,7 @@ public class AirCombo implements ConfigLoadable {
for (double i = 0; i < 30; i++) {
Vector vec = GeneralMethods.getDirection(player.getLocation(), origin.clone().add(origToDest.clone().multiply(i / 30)));
FireComboStream fs = new FireComboStream(null, vec, player.getLocation(), range, speed);
FireComboStream fs = new FireComboStream(null, vec, player.getLocation(), range, speed, "AirSweep");
fs.setDensity(1);
fs.setSpread(0F);
fs.setUseNewParticles(true);
@ -396,7 +396,11 @@ public class AirCombo implements ConfigLoadable {
}
if (damage != 0)
if (entity instanceof LivingEntity)
GeneralMethods.damageEntity(player, entity, damage, "AirCombo");
if (fstream.getAbility().equalsIgnoreCase("AirSweep")) {
GeneralMethods.damageEntity(player, entity, damage, Element.Air, "AirSweep");
} else {
GeneralMethods.damageEntity(player, entity, damage, Element.Air, "AirCombo");
}
}
}

View file

@ -116,52 +116,52 @@ public class DisplayCommand extends PKCommand {
}
}
if (element.equalsIgnoreCase("earth")) {
sender.sendMessage(ChatColor.DARK_GREEN + "Combos:" + ChatColor.GREEN + "/bending display earthcombo");
//sender.sendMessage(ChatColor.DARK_GREEN + "Combos: " + ChatColor.GREEN + "/bending display EarthCombos");
if (sender.hasPermission("bending.earth.lavabending")) {
sender.sendMessage(ChatColor.DARK_GREEN + "Lavabending abilities: " + ChatColor.GREEN + "/bending display lavabending");
sender.sendMessage(ChatColor.DARK_GREEN + "Lavabending abilities: " + ChatColor.GREEN + "/bending display Lavabending");
}
if (sender.hasPermission("bending.earth.metalbending")) {
sender.sendMessage(ChatColor.DARK_GREEN + "Metalbending abilities: " + ChatColor.GREEN + "/bending display metalbending");
sender.sendMessage(ChatColor.DARK_GREEN + "Metalbending abilities: " + ChatColor.GREEN + "/bending display Metalbending");
}
if (sender.hasPermission("bending.earth.sandbending")) {
sender.sendMessage(ChatColor.DARK_GREEN + "Sandbending abilities: " + ChatColor.GREEN + "/bending display sandbending");
sender.sendMessage(ChatColor.DARK_GREEN + "Sandbending abilities: " + ChatColor.GREEN + "/bending display Sandbending");
}
}
if (element.equalsIgnoreCase("air")) {
sender.sendMessage(ChatColor.DARK_GRAY + "Combos:" + ChatColor.GRAY + "/bending display aircombo");
sender.sendMessage(ChatColor.DARK_GRAY + "Combos: " + ChatColor.GRAY + "/bending display AirCombos");
if (sender.hasPermission("bending.air.flight")) {
sender.sendMessage(ChatColor.DARK_GRAY + "Flight abilities: " + ChatColor.GRAY + "/bending display flight");
sender.sendMessage(ChatColor.DARK_GRAY + "Flight abilities: " + ChatColor.GRAY + "/bending display Flight");
}
//if (sender.hasPermission("bending.air.spiritualprojection")) {
// sender.sendMessage(ChatColor.DARK_GRAY + "SpiritualProjection abilities: " + ChatColor.GRAY + "/bending display spiritualprojection");
//}
}
if (element.equalsIgnoreCase("fire")) {
sender.sendMessage(ChatColor.DARK_RED + "Combos:" + ChatColor.RED + "/bending display firecombo");
sender.sendMessage(ChatColor.DARK_RED + "Combos: " + ChatColor.RED + "/bending display FireCombos");
if (sender.hasPermission("bending.fire.lightningbending")) {
sender.sendMessage(ChatColor.DARK_RED + "Lightning abilities: " + ChatColor.RED + "/bending display lightning");
sender.sendMessage(ChatColor.DARK_RED + "Lightning abilities: " + ChatColor.RED + "/bending display Lightning");
}
if (sender.hasPermission("bending.fire.combustionbending")) {
sender.sendMessage(ChatColor.DARK_RED + "Combustion abilities: " + ChatColor.RED + "/bending display combustion");
sender.sendMessage(ChatColor.DARK_RED + "Combustion abilities: " + ChatColor.RED + "/bending display Combustion");
}
}
if (element.equalsIgnoreCase("water")) {
sender.sendMessage(ChatColor.DARK_AQUA + "Combos:" + ChatColor.AQUA + "/bending display watercombo");
sender.sendMessage(ChatColor.DARK_AQUA + "Combos: " + ChatColor.AQUA + "/bending display WaterCombos");
if (sender.hasPermission("bending.water.bloodbending")) {
sender.sendMessage(ChatColor.DARK_AQUA + "Bloodbending abilities: " + ChatColor.AQUA + "/bending display bloodbending");
sender.sendMessage(ChatColor.DARK_AQUA + "Bloodbending abilities: " + ChatColor.AQUA + "/bending display Bloodbending");
}
if (sender.hasPermission("bending.water.healing")) {
sender.sendMessage(ChatColor.DARK_AQUA + "Healing abilities: " + ChatColor.AQUA + "/bending display healing");
sender.sendMessage(ChatColor.DARK_AQUA + "Healing abilities: " + ChatColor.AQUA + "/bending display Healing");
}
if (sender.hasPermission("bending.water.icebending")) {
sender.sendMessage(ChatColor.DARK_AQUA + "Icebending abilities: " + ChatColor.AQUA + "/bending display icebending");
sender.sendMessage(ChatColor.DARK_AQUA + "Icebending abilities: " + ChatColor.AQUA + "/bending display Icebending");
}
if (sender.hasPermission("bending.water.plantbending")) {
sender.sendMessage(ChatColor.DARK_AQUA + "Plantbending abilities: " + ChatColor.AQUA + "/bending display plantbending");
sender.sendMessage(ChatColor.DARK_AQUA + "Plantbending abilities: " + ChatColor.AQUA + "/bending display Plantbending");
}
}
if (element.equalsIgnoreCase("chi")) {
sender.sendMessage(ChatColor.GOLD + "Combos: " + ChatColor.YELLOW + "/bending display chicombo");
sender.sendMessage(ChatColor.GOLD + "Combos: " + ChatColor.YELLOW + "/bending display ChiCombos");
}
}

View file

@ -39,7 +39,7 @@ public class HelpCommand extends PKCommand {
if (instances.keySet().contains(arg.toLowerCase())) {//bending help command
instances.get(arg).help(sender, true);
} else if (Arrays.asList(Commands.comboaliases).contains(arg)) { //bending help elementcombo
sender.sendMessage(ChatColor.GOLD + "Proper Usage: " + ChatColor.RED + "/bending display " + arg + ChatColor.GOLD + " or " + ChatColor.RED + "/bending help <comboname>");
sender.sendMessage(ChatColor.GOLD + "Proper Usage: " + ChatColor.RED + "/bending display " + arg + ChatColor.GOLD + " or " + ChatColor.RED + "/bending help <Combo Name>");
} else if (GeneralMethods.abilityExists(arg)) { //bending help ability
String ability = GeneralMethods.getAbility(arg);
ChatColor color = GeneralMethods.getAbilityColor(ability);
@ -47,19 +47,23 @@ public class HelpCommand extends PKCommand {
sender.sendMessage(color + AbilityModuleManager.descriptions.get(GeneralMethods.getAbility(ability)));
} else if (Arrays.asList(Commands.airaliases).contains(args.get(0))) {
sender.sendMessage(AirMethods.getAirColor() + "Air is the element of freedom. Airbenders are natural pacifists and " + "great explorers. There is nothing stopping them from scaling the tallest of mountains and walls easily. They specialize in redirection, " + "from blasting things away with gusts of winds, to forming a shield around them to prevent damage. Easy to get across flat terrains, " + "such as oceans, there is practically no terrain off limits to Airbenders. They lack much raw damage output, but make up for it with " + "with their ridiculous amounts of utility and speed.");
sender.sendMessage(ChatColor.YELLOW + "Airbenders can chain their abilities into combos, type " + AirMethods.getAirColor() + "/b help AirCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qffg9m3");
} else if (Arrays.asList(Commands.wateraliases).contains(args.get(0))) {
sender.sendMessage(WaterMethods.getWaterColor() + "Water is the element of change. Waterbending focuses on using your " + "opponents own force against them. Using redirection and various dodging tactics, you can be made " + "practically untouchable by an opponent. Waterbending provides agility, along with strong offensive " + "skills while in or near water.");
sender.sendMessage(ChatColor.YELLOW + "Waterbenders can chain their abilities into combos, type " + WaterMethods.getWaterColor() + "/b help WaterCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/lod3plv");
} else if (Arrays.asList(Commands.earthaliases).contains(args.get(0))) {
sender.sendMessage(EarthMethods.getEarthColor() + "Earth is the element of substance. Earthbenders share many of the " + "same fundamental techniques as Waterbenders, but their domain is quite different and more readily " + "accessible. Earthbenders dominate the ground and subterranean, having abilities to pull columns " + "of rock straight up from the earth or drill their way through the mountain. They can also launch " + "themselves through the air using pillars of rock, and will not hurt themselves assuming they land " + "on something they can bend. The more skilled Earthbenders can even bend metal.");
//sender.sendMessage(ChatColor.YELLOW + "Earthbenders can chain their abilities into combos, type " + EarthMethods.getEarthColor() + "/b help EarthCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qaudl42");
} else if (Arrays.asList(Commands.firealiases).contains(args.get(0))) {
sender.sendMessage(FireMethods.getFireColor() + "Fire is the element of power. Firebenders focus on destruction and " + "incineration. Their abilities are pretty straight forward: set things on fire. They do have a bit " + "of utility however, being able to make themselves un-ignitable, extinguish large areas, cook food " + "in their hands, extinguish large areas, small bursts of flight, and then comes the abilities to shoot " + "fire from your hands.");
sender.sendMessage(ChatColor.YELLOW + "Firebenders can chain their abilities into combos, type " + FireMethods.getFireColor() + "/b help FireCombo" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Firebenders can chain their abilities into combos, type " + FireMethods.getFireColor() + "/b help FireCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/k4fkjhb");
} else if (Arrays.asList(Commands.chialiases).contains(args.get(0))) {
sender.sendMessage(ChiMethods.getChiColor() + "Chiblockers focus on bare handed combat, utilizing their agility and " + "speed to stop any bender right in their path. Although they lack the ability to bend any of the " + "other elements, they are great in combat, and a serious threat to any bender. Chiblocking was " + "first shown to be used by Ty Lee in Avatar: The Last Airbender, then later by members of the " + "Equalists in The Legend of Korra.");
sender.sendMessage(ChatColor.YELLOW + "Chiblockers can chain their abilities into combos, type " + ChiMethods.getChiColor() + "/b help ChiCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/mkp9n6y");
} else {
//combos - handled differently because they're stored in CamelCase in ComboManager

View file

@ -60,12 +60,12 @@ public class ConfigManager {
config.addDefault("Chi.SwiftKick", "{victim} was kicked to the floor by {attacker}'s {ability}");
config.addDefault("Chi.RapidPunch", "{victim} took all the hits against {attacker}'s {ability}");
config.addDefault("Combo.AirCombo", "{victim} was overwhelmed by {attacker}'s skill {ability}");
config.addDefault("Combo.AirSweep", "{victim} was swept away by {attacker}'s {ability}");
config.addDefault("Combo.FireKick", "{victim} was kicked to the floor with flames by {attacker}'s {ability}");
config.addDefault("Combo.FireSpin", "{victim} was caught in {attacker}'s {ability} inferno");
config.addDefault("Combo.JetBlaze", "{victim} was blasted away by {attacker}'s {ability}");
config.addDefault("Combo.FireWheel", "{victim} was incinerated by {attacker}'s {ability}");
config.addDefault("Combo.IceBullet", "{victim}'s heart was frozen by {attacker}'s {ability}");
config.addDefault("Combo.IceBullets", "{victim}'s heart was frozen by {attacker}'s {ability}");
deathMsgConfig.save();
break;

View file

@ -283,7 +283,7 @@ public class FireCombo implements ConfigLoadable {
Vector vec = GeneralMethods.getDirection(player.getLocation(), destination.clone());
vec = GeneralMethods.rotateXZ(vec, i);
FireComboStream fs = new FireComboStream(this, vec, player.getLocation(), range, speed);
FireComboStream fs = new FireComboStream(this, vec, player.getLocation(), range, speed, "FireKick");
fs.setSpread(0.2F);
fs.setDensity(5);
fs.setUseNewParticles(true);
@ -316,7 +316,7 @@ public class FireCombo implements ConfigLoadable {
vec = GeneralMethods.rotateXZ(vec, i - 180);
vec.setY(0);
FireComboStream fs = new FireComboStream(this, vec, player.getLocation().clone().add(0, 1, 0), range, speed);
FireComboStream fs = new FireComboStream(this, vec, player.getLocation().clone().add(0, 1, 0), range, speed, "FireSpin");
fs.setSpread(0.0F);
fs.setDensity(1);
fs.setUseNewParticles(true);
@ -354,7 +354,7 @@ public class FireCombo implements ConfigLoadable {
}
player.setVelocity(player.getVelocity().normalize().multiply(speed));
FireComboStream fs = new FireComboStream(this, player.getVelocity().clone().multiply(-1), player.getLocation(), 3, 0.5);
FireComboStream fs = new FireComboStream(this, player.getVelocity().clone().multiply(-1), player.getLocation(), 3, 0.5, "JetBlast");
fs.setDensity(1);
fs.setSpread(0.9F);
fs.setUseNewParticles(true);
@ -379,7 +379,7 @@ public class FireCombo implements ConfigLoadable {
direction = player.getVelocity().clone().multiply(-1);
player.setVelocity(player.getVelocity().normalize().multiply(speed));
FireComboStream fs = new FireComboStream(this, direction, player.getLocation(), 5, 1);
FireComboStream fs = new FireComboStream(this, direction, player.getLocation(), 5, 1, "JetBlaze");
fs.setDensity(8);
fs.setSpread(1.0F);
fs.setUseNewParticles(true);
@ -423,7 +423,7 @@ public class FireCombo implements ConfigLoadable {
topBlock = topBlock.getLocation().add(0, -1, 0).getBlock();
currentLoc.setY(topBlock.getY() + FIRE_WHEEL_STARTING_HEIGHT);
FireComboStream fs = new FireComboStream(this, direction, currentLoc.clone().add(0, -1, 0), 5, 1);
FireComboStream fs = new FireComboStream(this, direction, currentLoc.clone().add(0, -1, 0), 5, 1, "FireWheel");
fs.setDensity(0);
fs.setSinglePoint(true);
fs.setCollisionRadius(1.5);
@ -491,6 +491,7 @@ public class FireCombo implements ConfigLoadable {
private double speed;
private Location initialLoc, currentLoc;
private double distance;
private String ability;
ParticleEffect particleEffect = ParticleEffect.FLAME;
private FireCombo fireCombo;
@ -504,13 +505,14 @@ public class FireCombo implements ConfigLoadable {
private int checkCollisionDelay = 1;
private int checkCollisionCounter = 0;
public FireComboStream(FireCombo fireCombo, Vector direction, Location loc, double distance, double speed) {
public FireComboStream(FireCombo fireCombo, Vector direction, Location loc, double distance, double speed, String ability) {
this.fireCombo = fireCombo;
this.direction = direction;
this.speed = speed;
this.initialLoc = loc.clone();
this.currentLoc = loc.clone();
this.distance = distance;
this.ability = ability;
}
public void cancel() {
@ -525,6 +527,10 @@ public class FireCombo implements ConfigLoadable {
return this.currentLoc;
}
public String getAbility() {
return this.ability;
}
public boolean isCancelled() {
return cancelled;
}

View file

@ -317,7 +317,7 @@ public class WaterCombo {
Vector vec = player.getEyeLocation().getDirection().normalize();
Location loc = player.getEyeLocation().add(vec.clone().multiply(radius + 1.3));
FireComboStream fs = new FireComboStream(null, vec,
loc, range, speed);
loc, range, speed, "IceBullet");
fs.setDensity(10);
fs.setSpread(0.1F);
fs.setUseNewParticles(true);
@ -370,7 +370,11 @@ public class WaterCombo {
}
if (damage != 0)
if (entity instanceof LivingEntity)
GeneralMethods.damageEntity(player, entity, damage, SubElement.Icebending, "IceBullets");
if (fstream.getAbility().equalsIgnoreCase("IceBullet")) {
GeneralMethods.damageEntity(player, entity, damage, SubElement.Icebending, "IceBullets");
} else {
GeneralMethods.damageEntity(player, entity, damage, Element.Water, "WaterCombo");
}
}
}

View file

@ -1,6 +1,6 @@
name: ProjectKorra
author: ProjectKorra
version: 1.8.0 BETA 4
version: 1.8.0 BETA 5
main: com.projectkorra.projectkorra.ProjectKorra
softdepend: [PreciousStones, WorldGuard, WorldEdit, Factions, MassiveCore, GriefPrevention, Towny, NoCheatPlus, LWC]
commands: