mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
commit
2b02d1cfc9
5 changed files with 31 additions and 17 deletions
|
@ -892,12 +892,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);
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue