diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java index 8de9356d1..7038aa834 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java @@ -254,15 +254,15 @@ public class UtilBlock return blockUseSet.contains(block); } - public static HashMap getInRadius(Location loc, Double dR) + public static HashMap getInRadius(Location loc, double dR) { return getInRadius(loc, dR, 999); } - public static HashMap getInRadius(Location loc, Double dR, double heightLimit) + public static HashMap getInRadius(Location loc, double dR, double heightLimit) { HashMap blockList = new HashMap(); - int iR = dR.intValue() + 1; + int iR = (int)dR + 1; for (int x=-iR ; x <= iR ; x++) for (int z=-iR ; z <= iR ; z++) @@ -282,6 +282,26 @@ public class UtilBlock return blockList; } + public static HashMap getInRadius(Block block, double dR) + { + HashMap blockList = new HashMap(); + int iR = (int)dR + 1; + + for (int x=-iR ; x <= iR ; x++) + for (int z=-iR ; z <= iR ; z++) + for (int y=-iR ; y <= iR ; y++) + { + Block curBlock = block.getRelative(x, y, z); + + double offset = UtilMath.offset(block.getLocation(), curBlock.getLocation()); + + if (offset <= dR) + blockList.put(curBlock, 1 - (offset/dR)); + } + + return blockList; + } + public static boolean isBlock(ItemStack item) { if (item == null) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/energy/Energy.java b/Plugins/Mineplex.Core/src/mineplex/core/energy/Energy.java index 1395a72b3..23c65dd85 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/energy/Energy.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/energy/Energy.java @@ -49,13 +49,6 @@ public class Energy extends MiniClientPlugin //Get Exp Attribs double energy = 0.4; - //Sprint Reduce - if (cur.isSprinting()) - { - Get(cur).LastEnergy = System.currentTimeMillis(); - energy -= 0.2; - } - //Modify Energy EnergyEvent energyEvent = new EnergyEvent(cur, energy, EnergyChangeReason.Recharge); _plugin.getServer().getPluginManager().callEvent(energyEvent); @@ -155,6 +148,7 @@ public class Energy extends MiniClientPlugin Get(player).MaxEnergyMods.remove(reason); } + /* ENERGY NO LONGER USED ON ATTACK public void AddEnergySwingMod(Player player, String reason, int amount) { Get(player).SwingEnergyMods.put(reason, amount); @@ -188,4 +182,5 @@ public class Energy extends MiniClientPlugin if (event.getEntity() instanceof Player) ModifyEnergy((Player)event.getEntity(), -10); } + */ } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/PvpClass.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/PvpClass.java index f3b9b1029..248b8b573 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/PvpClass.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/PvpClass.java @@ -55,7 +55,7 @@ public class PvpClass implements IPvpClass _skillSet = new HashSet(); _skillSet.addAll(_classes.GetSkillFactory().GetSkillsFor(this)); - _skillSet.addAll(_classes.GetSkillFactory().GetGlobalSkills()); + _skillSet.addAll(_classes.GetSkillFactory().GetGlobalSkillsFor(this)); _skillDefault = _classes.GetSkillFactory().GetDefaultSkillsFor(this); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/BackStab.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/BackStab.java index 03da2d2f8..922c3b2b7 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/BackStab.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/BackStab.java @@ -1,5 +1,6 @@ package mineplex.minecraft.game.classcombat.Skill.Assassin; +import org.bukkit.Effect; import org.bukkit.Sound; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -60,6 +61,7 @@ public class BackStab extends Skill //Effect damagee.getWorld().playSound(damagee.getLocation(), Sound.HURT_FLESH, 1f, 2f); + damagee.getWorld().playEffect(damagee.getLocation(), Effect.STEP_SOUND, 55); return; } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Blink.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Blink.java index d353cfb2f..b9ee5c73d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Blink.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Blink.java @@ -17,9 +17,11 @@ import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilWorld; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -119,8 +121,7 @@ public class Blink extends SkillActive curRange += 0.2; //Smoke Trail - if (!lastSmoke.equals(newTarget.getBlock())) - lastSmoke.getWorld().playEffect(lastSmoke.getLocation(), Effect.SMOKE, 4); + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1); lastSmoke = newTarget.getBlock(); } @@ -182,9 +183,8 @@ public class Blink extends SkillActive curRange += 0.2; //Smoke Trail - if (!lastSmoke.equals(newTarget.getBlock())) - lastSmoke.getWorld().playEffect(lastSmoke.getLocation(), Effect.SMOKE, 4); - + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1); + lastSmoke = newTarget.getBlock(); if (UtilMath.offset(newTarget, target) < 0.4) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ComboAttack.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ComboAttack.java index 192a11188..7395e58a9 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ComboAttack.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ComboAttack.java @@ -3,6 +3,7 @@ package mineplex.minecraft.game.classcombat.Skill.Assassin; import java.util.HashSet; import java.util.WeakHashMap; +import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -61,6 +62,9 @@ public class ComboAttack extends Skill //Increase Repeat _repeat.put(damager, Math.min(1 + level, _repeat.get(damager) + 1)); _last.put(damager, System.currentTimeMillis()); + + //Sound + damager.getWorld().playSound(damager.getLocation(), Sound.NOTE_STICKS, 1f, 0.7f + (0.3f * _repeat.get(damager))); } @EventHandler diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Evade.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Evade.java index e4de4a0b8..80f7d18f4 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Evade.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Evade.java @@ -21,7 +21,9 @@ import mineplex.core.updater.UpdateType; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -142,6 +144,10 @@ public class Evade extends SkillActive else target = FindLocationBehind(damager, damagee); if (target == null) return; + + //Effect + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, damagee.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10); //Action Factory.Teleport().TP(damagee, target); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java index bbc5f3527..52ecc9089 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java @@ -18,7 +18,9 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.common.util.F; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -116,9 +118,6 @@ public class Flash extends SkillActive _flash.put(player, _flash.get(player) - 1); - //Smoke Trail - Block lastSmoke = player.getLocation().getBlock(); - double maxRange = 6; double curRange = 0; while (curRange <= maxRange) @@ -133,10 +132,7 @@ public class Flash extends SkillActive curRange += 0.2; //Smoke Trail - if (!lastSmoke.equals(newTarget.getBlock())) - lastSmoke.getWorld().playEffect(lastSmoke.getLocation(), Effect.SMOKE, 4); - - lastSmoke = newTarget.getBlock(); + UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, newTarget.clone().add(0, 0.5, 0), 0, 0, 0, 0, 1); } //Modify Range diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/MarkedForDeath.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/MarkedForDeath.java index 9dc179e8f..8d031c5b5 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/MarkedForDeath.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/MarkedForDeath.java @@ -174,7 +174,7 @@ public class MarkedForDeath extends SkillActive for (Entity ent : _arrows) { - UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(), 0, 0, 0, 0, 1); + UtilParticle.PlayParticle(ParticleType.MOB_SPELL, ent.getLocation(), 0, 0, 0, 0, 1); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java index ccb70697d..14778146b 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java @@ -21,8 +21,10 @@ import mineplex.core.recharge.Recharge; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilGear; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -58,7 +60,7 @@ public class Recall extends Skill } @EventHandler - public void Crouch(PlayerDropItemEvent event) + public void Activate(PlayerDropItemEvent event) { Player player = event.getPlayer(); @@ -78,7 +80,7 @@ public class Recall extends Skill return; //Use Recharge - if (!Recharge.Instance.use(player, GetName(), GetName(level), 90000 - (15000 - level), true, true)) + if (!Recharge.Instance.use(player, GetName(), GetName(level), 90000 - (15000 - level), true, false)) return; //Use Energy @@ -106,6 +108,8 @@ public class Recall extends Skill //Effect player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, 133); player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f); + UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20); //Return Item item = _items.remove(player); @@ -116,8 +120,9 @@ public class Recall extends Skill UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); //Effect - player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, 133); player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f); + UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 20); Reset(player); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeBomb.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeBomb.java index 94533d94e..1731e8dd3 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeBomb.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeBomb.java @@ -60,7 +60,7 @@ public class SmokeBomb extends Skill event.setCancelled(true); - if (!Recharge.Instance.use(player, GetName(), GetName(level), 120000 - (level * 30000), true, true)) + if (!Recharge.Instance.use(player, GetName(), GetName(level), 120000 - (level * 30000), true, false)) return; //Action diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java index 9745533a5..d80a0388d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java @@ -19,9 +19,11 @@ import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; @@ -96,7 +98,7 @@ public class Stealth extends Skill public void Add(Player player) { _active.add(player); - + int level = getLevel(player); //Inform @@ -108,6 +110,10 @@ public class Stealth extends Skill //Sound player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 0.5f, 0.5f); + + //Effect + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10); } public void Remove(Player player, LivingEntity source) @@ -119,6 +125,10 @@ public class Stealth extends Skill //Conditions Factory.Condition().EndCondition(player, null, GetName()); + + //Effect + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, player.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 10); } @EventHandler diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Bloodlust.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Bloodlust.java index 291cd5b89..7c6146c00 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Bloodlust.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Bloodlust.java @@ -3,6 +3,7 @@ package mineplex.minecraft.game.classcombat.Skill.Brute; import java.util.WeakHashMap; import org.bukkit.Sound; +import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -12,8 +13,10 @@ import mineplex.core.common.util.F; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; @@ -111,6 +114,19 @@ public class Bloodlust extends Skill return false; } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Entity ent : _str.keySet()) + { + UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _str.get(ent) * 2); + } + } @Override public void Reset(Player player) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java index cfa5b6bff..6e89068f7 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java @@ -115,7 +115,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown base + (charge * base), false, 0, 0.2, 20, false); Factory.Projectile().AddThrow(item, cur, this, -1, true, true, true, - Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 1.5d); + Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 1.5d); //Inform UtilPlayer.message(cur, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Stampede.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Stampede.java index ae28b569f..fdf9817b2 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Stampede.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Stampede.java @@ -10,14 +10,17 @@ import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.Skill.event.SkillEvent; import org.bukkit.Sound; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -106,6 +109,18 @@ public class Stampede extends Skill } } + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Entity ent : _sprintStr.keySet()) + { + UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _sprintStr.get(ent) * 2); + } + } @EventHandler(priority = EventPriority.HIGH) public void Damage(CustomDamageEvent event) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Takedown.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Takedown.java index 11a4ed377..fc3885948 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Takedown.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/Takedown.java @@ -4,6 +4,8 @@ import java.util.HashMap; import org.bukkit.GameMode; import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -19,8 +21,10 @@ import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -177,6 +181,22 @@ public class Takedown extends SkillActive //Inform UtilPlayer.message(damager, F.main(GetClassType().name(), "You hit " + F.name(UtilEnt.getName(damagee)) + " with " + F.skill(GetName(level)) + ".")); UtilPlayer.message(damagee, F.main(GetClassType().name(), F.name(damager.getName()) + " hit you with " + F.skill(GetName(level)) + ".")); + + //Sound + damager.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_WOOD, 1f, 0.5f); + } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Entity ent : _live.keySet()) + { + UtilParticle.PlayParticle(ParticleType.CRIT, ent.getLocation(), + (float)(Math.random() - 0.5), (float)(Math.random() * 1.4), (float)(Math.random() - 0.5), 0, 4); + } } @Override diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/BreakFall.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/BreakFall.java index aeaab63b2..7680b9137 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/BreakFall.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/BreakFall.java @@ -19,7 +19,7 @@ public class BreakFall extends Skill SetDesc(new String[] { "You roll when you hit the ground;", - "Fall damage is reduced by 2.", + "Fall damage is reduced by #0#2.", }); } @@ -38,7 +38,7 @@ public class BreakFall extends Skill int level = getLevel(player); if (level == 0) return; - event.AddMod(null, GetName(), -2, false); + event.AddMod(null, GetName(), -(2 * level), false); } @Override diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Fitness.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Fitness.java index 283a0588e..9cd7a34f0 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Fitness.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Fitness.java @@ -14,8 +14,7 @@ public class Fitness extends Skill SetDesc(new String[] { - "You are extremely fit;", - "Maximum Energy is increased by 60 (33%)." + "Maximum Energy is increased by #0#30 ( #0#16 %)." }); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Rations.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Rations.java index 353bbde09..47690b10f 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Rations.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Rations.java @@ -20,9 +20,9 @@ public class Rations extends Skill SetDesc(new String[] { - "After not moving for 3 seconds,", - "you snack on rations, slowly", - "replenishing your hunger." + "After not moving for #4#-1 seconds,", + "you snack on rations, replenishing", + "#0#1 hunger every second." }); } @@ -38,11 +38,11 @@ public class Rations extends Skill if (level > 0) { - if (UtilTime.elapsed(Factory.Movement().Get(cur).LastMovement, 3000)) + if (UtilTime.elapsed(Factory.Movement().Get(cur).LastMovement, 7000 - (1000 * level))) { cur.setSaturation(0f); cur.setExhaustion(0f); - UtilPlayer.hunger(cur, 1); + UtilPlayer.hunger(cur, level); } } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Recharge.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Recharge.java index a7320fcfc..4a72a9765 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Recharge.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Recharge.java @@ -17,11 +17,11 @@ public class Recharge extends Skill SetDesc(new String[] { - "For every 1.5 seconds since you", + "For every second since you", "last used Energy, you receive", - "+50% Energy regenerate rate.", + "+ #0#20 % Energy regenerate rate.", "", - "Maximum of +300% bonus." + "Maximum of + #0#100 % bonus." }); } @@ -31,17 +31,18 @@ public class Recharge extends Skill if (event.GetReason() != EnergyChangeReason.Recharge) return; - if (getLevel(event.GetPlayer()) <= 0) + int level = getLevel(event.GetPlayer()); + if (level <= 0) return; long duration = System.currentTimeMillis() - Factory.Energy().Get(event.GetPlayer()).LastEnergy; - int bonus = (int) (duration / 1500); + int bonus = (int) (duration / 1000); - if (bonus > 6) - bonus = 6; + if (bonus > 5) + bonus = 5; - event.AddMod(bonus * 0.2); + event.AddMod(bonus * (level * 0.08)); } @Override diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java index 79b8c3307..b2aeff1d2 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java @@ -18,7 +18,7 @@ public class Resistance extends Skill SetDesc(new String[] { "Your body and mind is exceptionally resistant.", - "Durations on you are 50% shorter for;", + "Durations on you are #20#20 % shorter for;", "Slow, Fire, Shock, Confusion, Poison, Blindness." }); } @@ -27,13 +27,16 @@ public class Resistance extends Skill public void Resist(ConditionApplyEvent event) { if (event.GetCondition().GetType() != ConditionType.BURNING && + event.GetCondition().GetType() != ConditionType.SLOW && event.GetCondition().GetType() != ConditionType.SHOCK && event.GetCondition().GetType() != ConditionType.CONFUSION && event.GetCondition().GetType() != ConditionType.POISON && event.GetCondition().GetType() != ConditionType.BLINDNESS) return; + + double reduction = 0.2 + (0.2 * getLevel(event.GetCondition().GetEnt())); - event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * 0.5)); + event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * (1 - reduction))); } @Override diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Stamina.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Stamina.java deleted file mode 100644 index 63200eafe..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Stamina.java +++ /dev/null @@ -1,33 +0,0 @@ -package mineplex.minecraft.game.classcombat.Skill.Global; - -import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; -import mineplex.minecraft.game.classcombat.Skill.Skill; -import mineplex.minecraft.game.classcombat.Skill.SkillFactory; - -import org.bukkit.entity.Player; - -public class Stamina extends Skill -{ - public Stamina(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels) - { - super(skills, name, classType, skillType, cost, levels); - - SetDesc(new String[] - { - "You have exceptional Stamina;", - "Swinging weapons uses 75% less Energy." - }); - } - - @Override - public void OnPlayerAdd(Player player) - { - Factory.Energy().AddEnergySwingMod(player, GetName(), -3); - } - - @Override - public void Reset(Player player) - { - Factory.Energy().RemoveEnergySwingMod(player, GetName()); - } -} diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/ISkillFactory.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/ISkillFactory.java index 41cb6c633..c1e9a951e 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/ISkillFactory.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/ISkillFactory.java @@ -7,7 +7,7 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass; public interface ISkillFactory { - List GetGlobalSkills(); + List GetGlobalSkillsFor(IPvpClass gameClass); List GetSkillsFor(IPvpClass gameClass); HashMap GetDefaultSkillsFor(IPvpClass gameClass); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/BullsCharge.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/BullsCharge.java index cde6019ff..805a8bf87 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/BullsCharge.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/BullsCharge.java @@ -3,19 +3,25 @@ package mineplex.minecraft.game.classcombat.Skill.Knight; import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.Sound; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.potion.PotionEffectType; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -112,7 +118,20 @@ public class BullsCharge extends SkillActive UtilPlayer.message(damager, F.main(GetClassType().name(), "You hit " + F.name(UtilEnt.getName(damagee)) +" with " + F.skill(GetName(level)) + ".")); } - + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : GetUsers()) + { + if (player.hasPotionEffect(PotionEffectType.SPEED)) + UtilParticle.PlayParticle(ParticleType.CRIT, player.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3); + } + } @Override public void Reset(Player player) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Fortitude.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Fortitude.java index efecf3672..b6426146f 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Fortitude.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Fortitude.java @@ -11,8 +11,10 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -72,8 +74,6 @@ public class Fortitude extends Skill double diff = _preHealth.remove(damagee) - damagee.getHealth(); - System.out.println("Fortitude Diff: " + diff); - _health.put(damagee, Math.min(level,(int)(diff + 0.5))); _last.put(damagee, System.currentTimeMillis()); } @@ -101,6 +101,9 @@ public class Fortitude extends Skill //Heal UtilPlayer.health(cur, 1); + + //Effect + UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HiltSmash.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HiltSmash.java index 18cc6b1aa..588e7cc2b 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HiltSmash.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HiltSmash.java @@ -135,6 +135,9 @@ public class HiltSmash extends SkillActive Factory.Damage().NewDamageEvent((LivingEntity)ent, player, null, DamageCause.ENTITY_ATTACK, 3 + level, false, true, false, player.getName(), GetName()); + + //Sound + player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_WOOD, 1f, 1.4f); } @EventHandler diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java index 055809f51..fa0c92a4c 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java @@ -7,13 +7,19 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.condition.Condition; import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -57,7 +63,7 @@ public class HoldPosition extends SkillActive public void Skill(Player player, int level) { double duration = 3.5 + (1.5 * level); - + //Action Factory.Condition().Factory().Slow(GetName(), player, player, duration, 3, false, true, false, true); Factory.Condition().Factory().Protection(GetName(), player, player, duration, 3, false, true, true); @@ -69,7 +75,7 @@ public class HoldPosition extends SkillActive player.getWorld().playSound(player.getLocation(), Sound.ENDERMAN_SCREAM, 1.5f, 0f); player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, 49); } - + @EventHandler(priority = EventPriority.HIGH) public void Damage(CustomDamageEvent event) { @@ -84,15 +90,34 @@ public class HoldPosition extends SkillActive Condition data = Factory.Condition().GetActiveCondition(damagee, ConditionType.DAMAGE_RESISTANCE); if (data == null) return; - + if (!data.GetReason().equals(GetName())) return; - + //Damage event.AddMod(damagee.getName(), GetName(), 0, false); event.SetKnockback(false); } + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : GetUsers()) + { + Condition data = Factory.Condition().GetActiveCondition(player, ConditionType.DAMAGE_RESISTANCE); + if (data == null) continue; + + if (!data.GetReason().equals(GetName())) + continue; + + UtilParticle.PlayParticle(ParticleType.MOB_SPELL, player.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 3 + getLevel(player)); + } + } + @Override public void Reset(Player player) { diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Riposte.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Riposte.java index 4b011449f..54dac157e 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Riposte.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Riposte.java @@ -15,9 +15,11 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -153,6 +155,8 @@ public class Riposte extends SkillActive //Energy Factory.Energy().ModifyEnergy(damager, 20); UtilPlayer.health(damager, 1); + + UtilParticle.PlayParticle(ParticleType.HEART, damager.getEyeLocation(), 0, 0.3f, 0, 0, 1); //Inform UtilPlayer.message(damager, F.main(GetClassType().name(), "You countered with " + F.skill(GetName(level)) + ".")); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/ShieldSmash.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/ShieldSmash.java new file mode 100644 index 000000000..d29c2f3de --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/ShieldSmash.java @@ -0,0 +1,122 @@ +package mineplex.minecraft.game.classcombat.Skill.Knight; + +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.block.Action; +import org.bukkit.util.Vector; + +import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilPlayer; +import mineplex.minecraft.game.classcombat.Skill.SkillActive; +import mineplex.minecraft.game.classcombat.Skill.SkillFactory; + +public class ShieldSmash extends SkillActive +{ + public ShieldSmash(SkillFactory skills, String name, ClassType classType, SkillType skillType, + int cost, int levels, + int energy, int energyMod, + long recharge, long rechargeMod, boolean rechargeInform, + Material[] itemArray, + Action[] actionArray) + { + super(skills, name, classType, skillType, + cost, levels, + energy, energyMod, + recharge, rechargeMod, rechargeInform, + itemArray, + actionArray); + + SetDesc(new String[] + { + "Smash your shield into an enemy,", + "dealing #1.6#0.2 knockback." + }); + } + + @Override + public boolean CustomCheck(Player player, int level) + { + if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9) + { + UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water.")); + return false; + } + + if (!mineplex.core.recharge.Recharge.Instance.use(player, GetName() + " Cooldown", 250, false, false)) + return false; + + return true; + } + + @Override + public void Skill(Player player, int level) + { + //AoE Area + Location loc = player.getLocation(); + loc.add(player.getLocation().getDirection().setY(0).normalize().multiply(1.5)); + loc.add(0, 0.8, 0); + + //Particle + UtilParticle.PlayParticle(ParticleType.LARGE_SMOKE, loc, 0, 0, 0, 0, 1); + + boolean hit = false; + + for (Entity other : player.getWorld().getEntities()) + { + if (!(other instanceof LivingEntity)) + continue; + + LivingEntity cur = (LivingEntity)other; + + if (cur.equals(player)) + continue; + + if (UtilMath.offset(loc, cur.getLocation()) > 2) + continue; + + hit = true; + + Vector dir = player.getLocation().getDirection(); + if (dir.getY() < 0) + dir.setY(0); + + //Velocity + UtilAction.velocity(cur, dir, 1.6 + 0.2 * level, false, 0, 0.3, 0.8 + 0.05 * level, true); + + //Condition + Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true); + + //Inform + UtilPlayer.message((Player)cur, F.main(GetClassType().name(), F.name(player.getName()) +" hit you with " + F.skill(GetName(level)) + ".")); + } + + if (hit) + { + //Inform + UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName(level)) + ".")); + + //Sound + player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_METAL, 1f, 0.9f); + } + else + { + //Inform + UtilPlayer.message(player, F.main("Skill", "You missed " + F.skill(GetName(level)) + ".")); + } + } + + @Override + public void Reset(Player player) + { + + } +} diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java index 2bfdbfb9f..a2ef0c950 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java @@ -7,6 +7,7 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerDropItemEvent; @@ -17,8 +18,10 @@ import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilGear; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; @@ -210,6 +213,19 @@ public class ArcticArmor extends Skill Material.SNOW_BALL, (byte)0, true); } } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Entity ent : _active) + { + UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, ent.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, 3); + } + } @Override public void Reset(Player player) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java index 51e2e67ff..97683e709 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java @@ -41,9 +41,8 @@ public class FireBlast extends SkillActive { "Launch a fireball which explodes on impact", "dealing large knockback to enemies within", - "#3.5#1.5 Blocks range.", - "", - "#20#8 flames are spewed out, igniting players.", + "#3.5#1.5 Blocks range. Also ignites enemies", + "for up to #2#2 seconds." }); } @@ -107,17 +106,12 @@ public class FireBlast extends SkillActive //Damage Event Factory.Condition().Factory().Ignite(GetName(), cur, player, (2 + (2 * level)) * range, false, false); + //Condition + Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true); + //Velocity UtilAction.velocity(cur, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), cur.getEyeLocation()), - 0.5 + 1.5 * range, false, 0, 0.2 + 0.4 * range, 1.2, true); - } - - //Fire - for (int i=0 ; i<20 * (level * 8) ; i++) - { - Item fire = player.getWorld().dropItem(proj.getLocation().add(0, 0.5, 0), ItemStackFactory.Instance.CreateStack(Material.FIRE)); - fire.setVelocity(new Vector((Math.random() - 0.5)/2,Math.random()/2+0.5,(Math.random() - 0.5)/2)); - Factory.Fire().Add(fire, player, 8, 2, 3, 0, GetName()); + 0.5 + 1.5 * range, false, 0, 0.2 + 0.6 * range, 1.2, true); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Fissure.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Fissure.java index a6ca8556f..213243709 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Fissure.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Fissure.java @@ -40,11 +40,12 @@ public class Fissure extends SkillActive "creating an impassable wall.", "", "Players struck by the initial slam", - "receive Slow 2 for 4 seconds", + "receive Slow 3 for #2#0.5 seconds", "", "Players struck by the fissure", - "receive (4 + Power) damage.", - "Fissure gains Power as it extends" + "receive #2#0.4 damage plus an ", + "additional #0.6#0.2 damage for", + "every block fissure has travelled." }); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java index 12129c0c0..5ed904355 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java @@ -99,7 +99,7 @@ public class FissureData if (UtilMath.offset(block.getLocation().add(0.5, 0.5, 0.5), cur.getLocation()) < 1.5) { //Condition - Host.Factory.Condition().Factory().Slow("Fissure", cur, _player, 4, 1, false, true, true, true); + Host.Factory.Condition().Factory().Slow("Fissure", cur, _player, 1 + _level, 2, false, true, true, true); } } } @@ -149,15 +149,15 @@ public class FissureData //Damage if (!_hit.contains(cur)) - if (UtilMath.offset(up.getLocation().add(0.5, 0.5, 0.5), cur.getLocation()) < 1.5) + if (UtilMath.offset(up.getLocation().add(0.5, 0.5, 0.5), cur.getLocation()) < 1.8) { _hit.add(cur); - int damage = 4 + _handled; + double damage = 2 + (0.4 * _level) + (_handled * (0.7 + 0.1 * _level)); //Damage Event Host.Factory.Damage().NewDamageEvent(cur, _player, null, - DamageCause.CUSTOM, damage, false, false, false, + DamageCause.CUSTOM, damage, true, false, false, _player.getName(), "Fissure"); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java index 3eb9f67bc..58f193785 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java @@ -14,9 +14,11 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.projectile.IThrown; import mineplex.core.projectile.ProjectileUser; +import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -39,7 +41,7 @@ public class GlacialBlade extends SkillActive implements IThrown SetDesc(new String[] { "Swinging your sword releases a", - "shard of ice, dealing 5 damage", + "shard of ice, dealing 4 damage", "to anything it hits.", "", "Will not work if enemies are close." @@ -63,8 +65,9 @@ public class GlacialBlade extends SkillActive implements IThrown { //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()).subtract(0, 0.2, 0), ItemStackFactory.Instance.CreateStack(370)); - UtilAction.velocity(item, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false); - Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, 1.5d); + UtilAction.velocity(item, player.getLocation().getDirection(), 1.6, false, 0, 0.2, 10, false); + Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, + null, 0, 0, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5d); //Effect item.getWorld().playSound(item.getLocation(), Sound.ORB_PICKUP, 1f, 2f); @@ -84,7 +87,7 @@ public class GlacialBlade extends SkillActive implements IThrown //Damage Factory.Damage().NewDamageEvent(target, data.GetThrower(), null, - DamageCause.CUSTOM, 5, true, true, false, + DamageCause.CUSTOM, 4, true, true, false, UtilEnt.getName(data.GetThrower()), GetName()); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java new file mode 100644 index 000000000..d2074ed40 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java @@ -0,0 +1,165 @@ +package mineplex.minecraft.game.classcombat.Skill.Mage; + +import java.util.HashMap; + +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Item; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.block.Action; + +import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.core.common.util.F; +import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.projectile.IThrown; +import mineplex.core.projectile.ProjectileUser; +import mineplex.core.updater.UpdateType; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilPlayer; +import mineplex.minecraft.game.classcombat.Skill.SkillActive; +import mineplex.minecraft.game.classcombat.Skill.SkillFactory; + +public class IcePrison extends SkillActive implements IThrown +{ + public IcePrison(SkillFactory skills, String name, ClassType classType, SkillType skillType, + int cost, int levels, + int energy, int energyMod, + long recharge, long rechargeMod, boolean rechargeInform, + Material[] itemArray, + Action[] actionArray) + { + super(skills, name, classType, skillType, + cost, levels, + energy, energyMod, + recharge, rechargeMod, rechargeInform, + itemArray, + actionArray); + + SetDesc(new String[] + { + "Launch an icy orb. When it collides,", + "it creates a hollow sphere of ice", + "thats lasts for #2#1 seconds.", + }); + } + + @Override + public boolean CustomCheck(Player player, int level) + { + if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9) + { + UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water.")); + return false; + } + + return true; + } + + @Override + public void Skill(Player player, int level) + { + //Action + Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79)); + item.setVelocity(player.getLocation().getDirection()); + Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 2000, true, false, false, + Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 2d); + + //Inform + UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); + + //Effect + item.getWorld().playSound(item.getLocation(), Sound.SILVERFISH_HIT, 2f, 1f); + } + + @Override + public void Collide(LivingEntity target, Block block, ProjectileUser data) + { + Action(target, data); + } + + @Override + public void Idle(ProjectileUser data) + { + Action(null, data); + } + + @Override + public void Expire(ProjectileUser data) + { + Action(null, data); + } + + public void Action(LivingEntity target, ProjectileUser data) + { + //Effect + data.GetThrown().getWorld().playEffect(data.GetThrown().getLocation(), Effect.STEP_SOUND, 79); + + //Remove + data.GetThrown().remove(); + + //Thrower + if (!(data.GetThrower() instanceof Player)) + return; + + Player player = (Player)data.GetThrower(); + + //Level + int level = getLevel(player); + if (level == 0) return; + + Block block = data.GetThrown().getLocation().getBlock(); + + //Sphere + HashMap blocks = UtilBlock.getInRadius(block, 3.8d); + for (Block cur : blocks.keySet()) + { + if (!UtilBlock.airFoliage(cur)) + continue; + + if (UtilMath.offset(block.getLocation(), cur.getLocation()) <= 2.9) + continue; + + //Leave roof hole + if (cur.getX() == block.getX() && cur.getZ() == block.getZ() && cur.getY() > block.getY()) + continue; + + FreezeBlock(cur, block, level); + } + + /* + FreezeBlock(block.getRelative(3, 0, 3), block, level); + FreezeBlock(block.getRelative(-3, 0, -3), block, level); + FreezeBlock(block.getRelative(-3, 0, 3), block, level); + FreezeBlock(block.getRelative(3, 0, -3), block, level); + */ + } + + public void FreezeBlock(Block freeze, Block mid, int level) + { + if (!UtilBlock.airFoliage(freeze)) + return; + + long time = 4000 + (1000 * level); + + int yDiff = freeze.getY() - mid.getY(); + + time -= yDiff * 1000 - Math.random() * 1000; + + Factory.BlockRestore().Add(freeze, 79, (byte)0, time); + freeze.getWorld().playEffect(freeze.getLocation(), Effect.STEP_SOUND, 79); + } + + + @Override + public void Reset(Player player) + { + + } +} diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java index 056fbe3ca..adbc713c5 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Inferno.java @@ -103,7 +103,7 @@ public class Inferno extends SkillActive } //Fire - Item fire = cur.getWorld().dropItem(cur.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.FIRE)); + Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.FIRE)); Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName()); fire.teleport(cur.getEyeLocation()); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java index 640054551..3cc06a06a 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java @@ -44,10 +44,10 @@ public class LightningOrb extends SkillActive implements IThrown SetDesc(new String[] { "Launch a lightning orb. Upon a direct", - "hit with player, or 4 seconds, it will", - "strike all enemies with #3#1 Blocks ", + "hit with player, or #5#-0.4 seconds, it will", + "strike all enemies with #3#0.5 Blocks ", "with lightning, giving them Slow 3", - "for #2#2 seconds." + "for #2#1 seconds." }); } @@ -69,7 +69,7 @@ public class LightningOrb extends SkillActive implements IThrown //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(57)); item.setVelocity(player.getLocation().getDirection()); - Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 4000, true, false, false, + Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 5000 - (400 * level), true, false, false, Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 1.5d); //Inform @@ -113,20 +113,20 @@ public class LightningOrb extends SkillActive implements IThrown if (level == 0) return; - HashMap hit = UtilPlayer.getInRadius(data.GetThrown().getLocation(), 3 + level); + HashMap hit = UtilPlayer.getInRadius(data.GetThrown().getLocation(), 3 + 0.5 * level); //Lightning Condition for (Player cur : hit.keySet()) { - Factory.Condition().Factory().Lightning(GetName(), cur, player, 2, 1, false, true); + Factory.Condition().Factory().Lightning(GetName(), cur, player, 0, 0.5, false, true); } //Lightning for (Player cur : hit.keySet()) { - if (!UtilAlg.HasSight(data.GetThrown().getLocation(), cur)) + if (cur.equals(player)) continue; - + //Inform UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(player.getName()) + " hit you with " + F.skill(GetName(level)) + ".")); @@ -137,8 +137,7 @@ public class LightningOrb extends SkillActive implements IThrown //Apply Conditions for (Player cur : hit.keySet()) { - Factory.Condition().Factory().Shock(GetName(), cur, player, 1, false, true); - Factory.Condition().Factory().Slow(GetName(), cur, player, 2 + (2 * level), 2, false, true, true, true); + Factory.Condition().Factory().Slow(GetName(), cur, player, 2 + (1 * level), 2, false, true, true, true); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java index da7bcd4ad..b205ccb8d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java @@ -23,7 +23,6 @@ import org.bukkit.util.Vector; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.common.util.F; import mineplex.core.itemstack.ItemStackFactory; -import mineplex.core.recharge.Recharge; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilAction; @@ -33,17 +32,14 @@ import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; -import mineplex.minecraft.game.classcombat.Skill.SkillActive; +import mineplex.minecraft.game.classcombat.Skill.SkillActiveCharge; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; -public class Rupture extends SkillActive +public class Rupture extends SkillActiveCharge { - private int maxPower = 5; - private HashSet _items = new HashSet(); private WeakHashMap _target = new WeakHashMap(); - private WeakHashMap _charge = new WeakHashMap(); public Rupture(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels, @@ -57,7 +53,8 @@ public class Rupture extends SkillActive energy, energyMod, recharge, rechargeMod, rechargeInform, itemArray, - actionArray); + actionArray, + 0.01f, 0.005f); SetDesc(new String[] { @@ -67,9 +64,12 @@ public class Rupture extends SkillActive "towards where you are looking,", "giving Slow 2 to nearby opponents.", "", + GetChargeString(), + "", "Release Block to release the rupture,", "causing earth and players to fly upward,", "dealing up to #3#1 inital damage." + }); } @@ -79,6 +79,7 @@ public class Rupture extends SkillActive return "Energy: #14#-2 per Second"; } + @SuppressWarnings("deprecation") @Override public boolean CustomCheck(Player player, int level) { @@ -101,9 +102,9 @@ public class Rupture extends SkillActive public void Skill(Player player, int level) { _target.put(player, player.getLocation().subtract(0, 1, 0)); - _charge.put(player, 0); + _charge.put(player, 0f); } - + public void Clean(Player player) { _target.remove(player); @@ -157,21 +158,7 @@ public class Rupture extends SkillActive continue; } - //Charge - if (Recharge.Instance.use(cur, GetName() + " Charge", 600, false, false)) - { - int charge = 0; - if (_charge.containsKey(cur)) - charge += _charge.get(cur); - - if (charge < maxPower) - { - _charge.put(cur, charge + 1); - - //Inform - UtilPlayer.message(cur, F.main(GetClassType().name(), GetName() + ": " + F.elem((_charge.get(cur) * (100/maxPower)) + "% Power"))); - } - } + Charge(cur); MoveRupture(cur); } @@ -269,12 +256,12 @@ public class Rupture extends SkillActive public void DoRupture(Player player) { Location loc = _target.get(player); - int power = _charge.get(player); + float charge = _charge.get(player); Clean(player); - double range = 2 + 2 * (power/5d); - double mult = 0.5 + 0.5 * (power/maxPower); + double range = 2 + 2 * charge; + double mult = 0.5 + 0.5 * charge; int level = getLevel(player); @@ -296,7 +283,7 @@ public class Rupture extends SkillActive //Damage Event Factory.Damage().NewDamageEvent(cur, player, null, - DamageCause.CUSTOM, 1 + ( ((double)power/(double)maxPower) * (3 + level)), false, true, false, + DamageCause.CUSTOM, 1 + (charge * (3 + level)), false, true, false, player.getName(), GetName()); } @@ -306,7 +293,7 @@ public class Rupture extends SkillActive Block locBlock = loc.getBlock(); - while (done < power * 12 && attempts < power * 100) + while (done < charge * 40 && attempts < charge * 200) { attempts++; @@ -325,7 +312,7 @@ public class Rupture extends SkillActive vec.normalize(); //Scale - vec.multiply(0.1 + 0.3 * Math.random() + 0.6 * ((double)power/(double)maxPower)); + vec.multiply(0.1 + 0.3 * Math.random() + 0.6 * charge); //Block! Item item = loc.getWorld().dropItem(side, ItemStackFactory.Instance.CreateStack(locBlock.getTypeId(), locBlock.getData())); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java index 4c9c8c698..b7a8ba97a 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java @@ -73,8 +73,6 @@ public class Void extends Skill //Remove Condition Factory.Condition().EndCondition(event.getPlayer(), null, GetName()); - - Factory.Energy().RemoveEnergySwingMod(player, GetName()); } else { @@ -86,8 +84,6 @@ public class Void extends Skill //Remove Condition Factory.Condition().EndCondition(event.getPlayer(), null, GetName()); - - Factory.Energy().AddEnergySwingMod(player, GetName(), -4); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Agility.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Agility.java index a1ee4a506..f11ecdc71 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Agility.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Agility.java @@ -12,11 +12,15 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.potion.PotionEffectType; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.minecraft.game.core.condition.Condition; +import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -132,6 +136,20 @@ public class Agility extends SkillActive for (Player cur : expired) _active.remove(cur); } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : _active) + { + if (player.isSprinting()) + UtilParticle.PlayParticle(ParticleType.SPELL, player.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4); + } + } @Override public void Reset(Player player) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Disengage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Disengage.java index 0b114a523..7871fcc19 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Disengage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Disengage.java @@ -19,7 +19,9 @@ import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -113,6 +115,7 @@ public class Disengage extends SkillActive //Effect damagee.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 0.5f, 1.6f); + UtilParticle.PlayParticle(ParticleType.ANGRY_VILLAGER, damager.getEyeLocation(), 0, 0, 0, 0, 1); //Inform UtilPlayer.message(damagee, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java index ed7e438a9..bcb6a8234 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/NapalmShot.java @@ -149,7 +149,7 @@ public class NapalmShot extends SkillActive { Entity arrow = arrowIterator.next(); - if (arrow.isDead() || !arrow.isValid()) + if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround()) arrowIterator.remove(); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Overcharge.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Overcharge.java index 935227f9c..a36af720a 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Overcharge.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Overcharge.java @@ -5,7 +5,9 @@ import java.util.WeakHashMap; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.minecraft.game.classcombat.Skill.SkillChargeBow; @@ -14,6 +16,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent; import org.bukkit.Sound; import org.bukkit.entity.Arrow; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; @@ -81,6 +84,18 @@ public class Overcharge extends SkillChargeBow //Effect damagee.getWorld().playSound(damagee.getLocation(), Sound.HURT_FLESH, 1f, 0.5f); } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Entity ent : _arrows.keySet()) + { + UtilParticle.PlayParticle(ParticleType.RED_DUST, ent.getLocation(), 0, 0, 0, 0, 1); + } + } @EventHandler public void Clean(UpdateEvent event) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java index d310400cf..04ddd93e4 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java @@ -4,10 +4,13 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.core.recharge.Recharge; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.minecraft.game.classcombat.Skill.Skill; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -42,6 +45,9 @@ public class VitalitySpores extends Skill { Factory.Condition().Factory().Regen(GetName(), cur, cur, 6.9, 0, false, true, true); UtilPlayer.health(cur, 1); + + if (Recharge.Instance.use(cur, GetName(), 2000, false, false)) + UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1); } } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java index 45faa3aec..95b9b6e03 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java @@ -18,10 +18,12 @@ import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilGear; +import mineplex.core.common.util.UtilParticle; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent.ActionType; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilPlayer; import mineplex.minecraft.game.classcombat.Skill.SkillActive; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; @@ -178,6 +180,19 @@ public class WolfsFury extends SkillActive //Effect player.getWorld().playSound(player.getLocation(), Sound.WOLF_WHINE, 0.6f, 0.8f); } + + @EventHandler + public void Particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : _active.keySet()) + { + UtilParticle.PlayParticle(ParticleType.RED_DUST, player.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)(Math.random() * 1), (float)(Math.random() - 0.5), 0, 4); + } + } @Override public void Reset(Player player) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java index 6ebcf3f0b..cbd41716d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java @@ -313,14 +313,14 @@ public abstract class Skill implements ISkill, Listener public void DisplayProgress(Player player, String ability, float amount) { - player.setExp(amount); - //UtilDisplay.displayTextBar(Factory.GetPlugin(), player, amount, C.cYellow + C.Bold + ability + ChatColor.RESET + " - " + C.cGreen + C.Bold + (int)(amount*100) + "%"); + //player.setExp(amount); + UtilDisplay.displayTextBar(Factory.GetPlugin(), player, amount, C.cYellow + C.Bold + ability + ChatColor.RESET + " - " + C.cGreen + C.Bold + (int)(amount*100) + "%"); player.playSound(player.getLocation(), Sound.NOTE_PIANO, 0.5f, 0.5f + (amount * 1.5f)); } public void ResetProgress(Player player) { - player.setExp(0f); + //player.setExp(0f); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java index 4c4852064..f850fd0a0 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java @@ -150,13 +150,19 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory public void AddGlobal() { //Passive C - AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 1, 1)); - AddSkill(new Fitness(this, "Fitness", ClassType.Global, SkillType.GlobalPassive, 1, 1)); - AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1)); - AddSkill(new Recharge(this, "Recharge", ClassType.Global, SkillType.GlobalPassive, 1, 1)); - AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 1, 1)); - AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 1)); -//AddSkill(new Swim(this, "Swim", ClassType.Global, SkillType.GlobalPassive, 1, 1)); + AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 5, 3)); + AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 5, 4)); + AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 5, 2)); + + AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 5, 5)); + AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 5, 3)); + + AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 5, 3)); + AddSkill(new Recharge(this, "Quick Recovery", ClassType.Assassin, SkillType.GlobalPassive, 5, 3)); + + + //AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1)); + //AddSkill(new Swim(this, "Swim", ClassType.Global, SkillType.GlobalPassive, 1, 1)); } public void AddAssassin() @@ -318,6 +324,13 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory 16000, 2000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); + + AddSkill(new ShieldSmash(this, "Shield Smash", ClassType.Knight, SkillType.Axe, + 5, 5, + 0, 0, + 8000, -1000, true, + new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, + new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); //Passive A @@ -361,31 +374,41 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new FireBlast(this, "Fire Blast", ClassType.Mage, SkillType.Axe, 5, 5, 40, -2, - 4000, 0, true, + 8000, -1000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); + AddSkill(new IcePrison(this, "Ice Prison", ClassType.Mage, SkillType.Axe, + 5, 5, + 40, -2, + 21000, -1000, true, + new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, + new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); + AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe, 5, 5, 40, -2, - 4000, 0, true, + 8000, -1000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); + + AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe, + 5, 5, + 40, -3, + 8000, -1000, true, + new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, + new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); + + /* AddSkill(new FreezingBlast(this, "Freezing Blast", ClassType.Mage, SkillType.Axe, 5, 5, 40, -2, 4000, 0, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); - - AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe, - 5, 5, - 40, -2, - 4000, 0, true, - new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, - new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); - + */ + // AddSkill(new Tundra(this, "Tundra", ClassType.Mage, SkillType.Axe, 830, 200, 1)); @@ -636,13 +659,13 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory } @Override - public List GetGlobalSkills() + public List GetGlobalSkillsFor(IPvpClass gameClass) { List skills = new LinkedList(); for (ISkill cur : _skillMap.values()) { - if (cur.GetClassType() == ClassType.Global) + if (cur.GetSkillType() == SkillType.GlobalPassive && (cur.GetClassType() == ClassType.Global || (gameClass != null && cur.GetClassType() == gameClass.GetType()))) { skills.add(cur); } @@ -658,7 +681,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory for (ISkill cur : _skillMap.values()) { - if (cur.GetClassType() == gameClass.GetType()) + if (cur.GetClassType() == gameClass.GetType() && cur.GetSkillType() != SkillType.GlobalPassive) { skills.add(cur); } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java index 8c661e597..98f15fc63 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java @@ -119,7 +119,7 @@ public class SkillPage extends ShopPageBase int slotNumber = 46; - for (ISkill skill : Plugin.GetSkillFactory().GetGlobalSkills()) + for (ISkill skill : Plugin.GetSkillFactory().GetGlobalSkillsFor(clientClass.GetGameClass())) { BuildSkillItem(skill, slotNumber++, clientClass); } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java index 0995482ad..e643baa35 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java @@ -234,7 +234,7 @@ public class ConditionEffect implements Listener ent.playEffect(EntityEffect.HURT); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void Lightning(CustomDamageEvent event) { if (event.IsCancelled()) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index d4ee19fef..c5ef020a0 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -44,12 +44,12 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; public class Arcade extends JavaPlugin implements INautilusPlugin -{ +{ private String WEB_CONFIG = "webServer"; //Modules private CoreClientManager _clientManager; - private DonationManager _donationManager; + private DonationManager _donationManager; private DamageManager _damageManager; private ArcadeManager _gameManager; @@ -59,24 +59,24 @@ public class Arcade extends JavaPlugin implements INautilusPlugin { //Delete Old Games Folders DeleteFolders(); - - //Configs + + //Configs getConfig().addDefault(WEB_CONFIG, "http://accounts.mineplex.com/"); getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG)); saveConfig(); - - _clientManager = CoreClientManager.Initialize(this, GetWebServerAddress()); + + _clientManager = CoreClientManager.Initialize(this, GetWebServerAddress()); CommandCenter.Initialize(this, _clientManager); - ItemStackFactory.Initialize(this, false); - Recharge.Initialize(this); - - _donationManager = new DonationManager(this, GetWebServerAddress()); + ItemStackFactory.Initialize(this, false); + Recharge.Initialize(this); + + _donationManager = new DonationManager(this, GetWebServerAddress()); ConditionManager conditionManager = new ConditionManager(this); - + new MessageManager(this, _clientManager); - + AntiStack antistack = new AntiStack(this); Creature creature = new Creature(this); @@ -89,7 +89,7 @@ public class Arcade extends JavaPlugin implements INautilusPlugin DisguiseManager disguiseManager = new DisguiseManager(this, packetHandler); _damageManager = new DamageManager(this, new CombatManager(this), new NpcManager(this, creature), disguiseManager); - + Portal portal = new Portal(this); //Arcade Manager diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java index 540930ab6..7b8f9c18b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java @@ -72,7 +72,7 @@ public class Dominate extends TeamGame this.DeathOut = false; this.PrepareFreeze = false; - this.DeathSpectateSecs = 8; + this.DeathSpectateSecs = 10; } @Override @@ -236,17 +236,17 @@ public class Dominate extends TeamGame { CapturePoint cp = _points.get(i); - String out = cp.GetScoreboardName(); + String out = cp.GetScoreboardName(); if (out.length() >= 16) out = out.substring(0, 15); _lastScoreboard.add(out); GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(5 - i); - } - } + } + } - public void EndCheckScore() + public void EndCheckScore() { GameTeam winner = null; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/Emerald.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/Emerald.java index e7737796f..86ef855a5 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/Emerald.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/Emerald.java @@ -60,6 +60,9 @@ public class Emerald _ent.setVelocity(new Vector(0,0,0)); _ent.teleport(_loc); + //Firework + UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build()); + //Block _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.EMERALD_BLOCK);