diff --git a/Plugins/Mineplex.Core/src/mineplex/core/explosion/Explosion.java b/Plugins/Mineplex.Core/src/mineplex/core/explosion/Explosion.java index 9a0fbb8be..97a0465e1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/explosion/Explosion.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/explosion/Explosion.java @@ -110,7 +110,7 @@ public class Explosion extends MiniPlugin if (!_regenerateGround) { - if (cur.getTypeId() != 98 || cur.getData() != 0) + if (cur.getTypeId() != 98 || (cur.getData() != 0 && cur.getData() != 3)) cur.setTypeId(0); } @@ -136,7 +136,7 @@ public class Explosion extends MiniPlugin for (Block cur : blocks.keySet()) { if (blocks.get(cur).getKey() == 98) - if (blocks.get(cur).getValue() == 0) + if (blocks.get(cur).getValue() == 0 || blocks.get(cur).getValue() == 3) continue; //TNT @@ -184,7 +184,7 @@ public class Explosion extends MiniPlugin //Crack for (Block cur : UtilBlock.getInRadius(fLoc, 4d).keySet()) if (cur.getTypeId() == 98) - if (cur.getData() == 0) + if (cur.getData() == 0 || cur.getData() == 3) cur.setTypeIdAndData(98, (byte)2, true); } }, 1); @@ -310,7 +310,7 @@ public class Explosion extends MiniPlugin for (Block cur : blocks.keySet()) { if (blocks.get(cur).getKey() == 98) - if (blocks.get(cur).getValue() == 0) + if (blocks.get(cur).getValue() == 0 || blocks.get(cur).getValue() == 3) continue; double chance = 0.2 + (double)_explosionBlocks.size()/(double)120; diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java index 54e454b35..7ee948f50 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java @@ -53,7 +53,7 @@ public class CripplingBlow extends Skill if (level == 0) return; //Stun - Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, level, false, true, true, true); + Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, level, false, true, false, true); //Damage event.AddMod(damager.getName(), GetName(), 0, true); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Cooldown.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Cooldown.java new file mode 100644 index 000000000..4f9df3e9d --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Cooldown.java @@ -0,0 +1,42 @@ +package mineplex.minecraft.game.classcombat.Skill.Global; + +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; + +import mineplex.core.recharge.RechargeEvent; +import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.minecraft.game.classcombat.Skill.Skill; +import mineplex.minecraft.game.classcombat.Skill.SkillFactory; + +public class Cooldown extends Skill +{ + public Cooldown(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels) + { + super(skills, name, classType, skillType, cost, levels); + + SetDesc(new String[] + { + "You quickly recover from using skills;", + "Skill cooldowns are reduced by #0#12 %.", + }); + } + + @EventHandler + public void Resist(RechargeEvent event) + { + int level = getLevel(event.GetPlayer()); + if (level <= 0) + return; + + + double reduction = 0.12f * level; + + event.SetRecharge((long) (event.GetRecharge() * (1 - reduction))); + } + + @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 b6426146f..c0f0e788e 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 @@ -34,7 +34,7 @@ public class Fortitude extends Skill "up to #0#1 of the health you lost.", "", "You restore health at a rate of", - "1 health per #3.5#-0.5 seconds.", + "1 health per #4.5#-0.5 seconds.", "", "This does not stack, and is reset if", "you are hit again." @@ -91,7 +91,7 @@ public class Fortitude extends Skill int level = getLevel(cur); if (level == 0) continue; - if (UtilTime.elapsed(_last.get(cur), 3500 - (500 * level))) + if (UtilTime.elapsed(_last.get(cur), 4500 - (500 * level))) { _health.put(cur, _health.get(cur) - 1); _last.put(cur, System.currentTimeMillis()); 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 58f4e20fa..5eb3ec2aa 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 @@ -146,7 +146,7 @@ public class HiltSmash extends SkillActive if (event.IsCancelled()) return; - if (event.GetCause() != DamageCause.ENTITY_ATTACK) + if (event.GetCause() != DamageCause.CUSTOM) return; Player damager = event.GetDamagerPlayer(false); 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 index d2074ed40..a1bfaaba2 100644 --- 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 @@ -11,7 +11,9 @@ import org.bukkit.block.BlockFace; import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; +import org.bukkit.event.block.BlockFadeEvent; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.core.common.util.F; @@ -155,7 +157,13 @@ public class IcePrison extends SkillActive implements IThrown Factory.BlockRestore().Add(freeze, 79, (byte)0, time); freeze.getWorld().playEffect(freeze.getLocation(), Effect.STEP_SOUND, 79); } - + + @EventHandler + public void BlockFade(BlockFadeEvent event) + { + if (event.getBlock().getType() == Material.ICE) + event.setCancelled(true); + } @Override public void Reset(Player player) 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 3cc06a06a..dc67bd0c9 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 @@ -45,7 +45,7 @@ public class LightningOrb extends SkillActive implements IThrown { "Launch a lightning orb. Upon a direct", "hit with player, or #5#-0.4 seconds, it will", - "strike all enemies with #3#0.5 Blocks ", + "strike all enemies within #3#0.5 Blocks ", "with lightning, giving them Slow 3", "for #2#1 seconds." }); 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 0c571ba56..e0b60ed91 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 @@ -151,13 +151,14 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory //Passive C AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 1, 3)); AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 1, 3)); - AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 2)); + AddSkill(new Cooldown(this, "Quick Recovery", ClassType.Global, SkillType.GlobalPassive, 1, 3)); + //AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 2)); AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 1, 3)); AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 1, 3)); AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 1, 3)); - AddSkill(new Recharge(this, "Quick Recovery", ClassType.Assassin, SkillType.GlobalPassive, 1, 3)); + AddSkill(new Recharge(this, "Rest", ClassType.Assassin, SkillType.GlobalPassive, 1, 3)); //AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1)); @@ -371,7 +372,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new FireBlast(this, "Fire Blast", ClassType.Mage, SkillType.Axe, 1, 5, 60, -3, - 10000, -1000, true, + 11000, -1000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); @@ -385,7 +386,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe, 1, 5, 60, -2, - 10000, -1000, true, + 11000, -1000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); @@ -393,7 +394,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe, 1, 5, 60, -3, - 10000, -1000, true, + 11000, -1000, true, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index befee8790..275db50c1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -457,6 +457,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation public void HubClock(Player player) { + if (_game != null && !_game.GiveClock) + return; + player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte)0, 1, (short)0, C.cGreen + "Return to Hub", new String[] {"", ChatColor.RESET + "Click while holding this", ChatColor.RESET + "to return to the Hub."})); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index e53e8ab81..eeec661f9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -176,6 +176,8 @@ public abstract class Game implements Listener //Addons public boolean CompassEnabled = false; public boolean SoupEnabled = true; + + public boolean GiveClock = true; public double GemMultiplier = 1; @@ -1028,6 +1030,4 @@ public abstract class Game implements Listener { return _prepareCountdown; } - - } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java index 34d192b9e..78f7ec30c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java @@ -56,7 +56,7 @@ public abstract class TeamGame extends Game GetLocationStore().put(player.getName(), player.getLocation()); //Announcement - Announce(team.GetColor() + C.Bold + player.getName() + " has disconnected! 3 minutes to reconnect."); + Announce(team.GetColor() + C.Bold + player.getName() + " has disconnected! 3 minutes to rejoin."); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java index 7632f852e..abde01166 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java @@ -176,8 +176,6 @@ public class CastleSiege extends TeamGame Entity ent = GetKits()[5+i].SpawnEntity(WorldData.GetDataLocs("PINK").get(i)); this.CreatureAllowOverride = false; - Manager.GetCondition().Factory().Invulnerable("Kit", (LivingEntity)ent, (LivingEntity)ent, 999999, false, false); - Manager.GetLobby().AddKitLocation(ent, GetKits()[5+i], WorldData.GetDataLocs("PINK").get(i)); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java index 84a50e80c..d88db6d5b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java @@ -17,11 +17,11 @@ import org.bukkit.entity.Player; public class ChampionsDominate extends Domination { public ChampionsDominate(ArcadeManager manager) - { + { super(manager, GameType.ChampionsDominate, - + new Kit[] - { + { new KitBrute(manager), new KitRanger(manager), new KitKnight(manager), @@ -33,7 +33,7 @@ public class ChampionsDominate extends Domination { "Capture Beacons faster with more people!", "Make sure you use all of your Skill/Item Tokens", - "Collect Emeralds to get 500 Points", + "Collect Emeralds to get 300 Points", "Collect Resupply Chests to restock your inventory", "Customize your Class to suit your play style", "Diamond Sword boosts Sword Skill by 1 Level", @@ -41,7 +41,7 @@ public class ChampionsDominate extends Domination "Gold Weapons deal 7 damage", "Iron Weapons deal 6 damage", "Diamond Weapons deal 5 damage", - + }; this.Manager.GetDamage().UseSimpleWeaponDamage = false; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java index 536d6c23a..99326ef1d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java @@ -1,26 +1,33 @@ package nautilus.game.arcade.game.games.common; import java.util.ArrayList; +import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; 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.entity.ItemDespawnEvent; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerPickupItemEvent; import mineplex.core.common.util.C; +import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.combat.CombatComponent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; +import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.TeamGame; import nautilus.game.arcade.game.games.champions.ChampionsDominate; @@ -33,6 +40,9 @@ public class Domination extends TeamGame private ArrayList _points = new ArrayList(); private ArrayList _emerald = new ArrayList(); private ArrayList _resupply = new ArrayList(); + + //Stats + private HashMap _stats = new HashMap(); //Scoreboard private ArrayList _lastScoreboard = new ArrayList(); @@ -62,6 +72,8 @@ public class Domination extends TeamGame this.WorldTimeSet = 2000; this.DeathSpectateSecs = 10; + + //this.QuitOut = false; } @Override @@ -117,7 +129,7 @@ public class Domination extends TeamGame if (!IsLive()) return; - if (event.getType() == UpdateType.FAST) + if (event.getType() == UpdateType.FASTER) for (CapturePoint cur : _points) cur.Update(); @@ -293,4 +305,61 @@ public class Domination extends TeamGame { return "Domination"; } + + public PlayerData GetStats(Player player) + { + if (!_stats.containsKey(player.getName())) + _stats.put(player.getName(), new PlayerData(player.getName())); + + return _stats.get(player.getName()); + } + + @EventHandler + public void StatsKillAssistDeath(CombatDeathEvent event) + { + Game game = Manager.GetGame(); + if (game == null) return; + + if (!(event.GetEvent().getEntity() instanceof Player)) + return; + + Player killed = (Player)event.GetEvent().getEntity(); + GetStats(killed).Deaths++; + + if (event.GetLog().GetKiller() != null) + { + Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName()); + + if (killer != null && !killer.equals(killed)) + GetStats(killer).Kills++; + } + + for (CombatComponent log : event.GetLog().GetAttackers()) + { + if (event.GetLog().GetKiller() != null && log.equals(event.GetLog().GetKiller())) + continue; + + Player assist = UtilPlayer.searchExact(log.GetName()); + + //Assist + if (assist != null) + GetStats(assist).Assists++; + } + } + + @EventHandler(priority = EventPriority.MONITOR) + public void StatsKillAssistDeath(CustomDamageEvent event) + { + Player damager = event.GetDamagerPlayer(true); + if (damager != null) + { + GetStats(damager).DamageDealt += event.GetDamage(); + } + + Player damagee = event.GetDamageePlayer(); + if (damagee != null) + { + GetStats(damagee).DamageTaken += event.GetDamage(); + } + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/CapturePoint.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/CapturePoint.java index dc5af64f2..ee202ce68 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/CapturePoint.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/CapturePoint.java @@ -107,7 +107,7 @@ public class CapturePoint if (!_captured) return; - Host.AddScore(_owner, 8); + Host.AddScore(_owner, 2); } private void CaptureUpdate() @@ -290,7 +290,9 @@ public class CapturePoint { for (Player player : capturers) { - Host.AddGems(player, 3, "Control Point Capture", true); + Host.AddGems(player, 3, "Control Point Score", true); + + Host.GetStats(player).CaptureScore += 30; } } } @@ -330,7 +332,20 @@ public class CapturePoint } if (_captureAmount != _captureMax) + { + //Reward + if (capturers != null) + { + for (Player player : capturers) + { + Host.AddGems(player, 0.1, "Control Point Score", true); + Host.GetStats(player).CaptureScore += 1; + } + } + Indicate(color); + } + } public void Firework(Location loc, Color color, boolean major) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Emerald.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Emerald.java index af74e534e..2efb0949b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Emerald.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Emerald.java @@ -50,24 +50,20 @@ public class Emerald } return; - } + } if (!UtilTime.elapsed(_time, 60000)) return; //Spawn _ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.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()); + _ent.setVelocity(new Vector(0,1,0)); //Block _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.EMERALD_BLOCK); //Firework - UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build()); + UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build()); } public void Pickup(Player player, Item item) @@ -94,13 +90,13 @@ public class Emerald _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK); //Give Points - Host.AddScore(team, 500); + Host.AddScore(team, 300); //Inform - UtilPlayer.message(player, C.cGreen + C.Bold + "You scored 500 Points for your team!"); + UtilPlayer.message(player, C.cGreen + C.Bold + "You scored 300 Points for your team!"); //Firework - UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BALL_LARGE).trail(true).build()); + UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BALL_LARGE).trail(true).build()); //Gems Host.AddGems(player, 3, "Emerald Powerup", true); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/PlayerData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/PlayerData.java new file mode 100644 index 000000000..1445a6a15 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/PlayerData.java @@ -0,0 +1,20 @@ +package nautilus.game.arcade.game.games.common.dominate_data; + +public class PlayerData +{ + public String Name; + + public int Kills = 0; + public int Deaths = 0; + public int Assists = 0; + + public double DamageDealt = 0; + public double DamageTaken = 0; + + public int CaptureScore = 0; + + public PlayerData(String name) + { + Name = name; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Resupply.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Resupply.java index a3f6400a5..1d54450a6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Resupply.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/dominate_data/Resupply.java @@ -6,6 +6,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.games.common.Domination; +import nautilus.game.arcade.kit.Kit; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -57,14 +58,13 @@ public class Resupply //Spawn _ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.CHEST)); - _ent.setVelocity(new Vector(0,0,0)); - _ent.teleport(_loc); + _ent.setVelocity(new Vector(0,1,0)); //Block _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.GOLD_BLOCK); //Firework - UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BURST).trail(true).build()); + UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BURST).trail(true).build()); } public void Pickup(Player player, Item item) @@ -90,10 +90,14 @@ public class Resupply _time = System.currentTimeMillis(); _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK); + Kit kit = Host.GetKit(player); + if (kit != null) + kit.GiveItems(player); + //Inform UtilPlayer.message(player, C.cYellow + C.Bold + "Your inventory was restocked!"); //Firework - UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BALL_LARGE).trail(true).build()); + UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BALL_LARGE).trail(true).build()); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java index 16df25d34..dec91fc45 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java @@ -636,7 +636,13 @@ public class GameFlagManager implements Listener GameTeam team = game.GetTeam(event.getPlayer()); if (team != null) - team.SetPlayerState(event.getPlayer(), PlayerState.OUT); + { + if (game.InProgress()) + team.SetPlayerState(event.getPlayer(), PlayerState.OUT); + else + team.RemovePlayer(event.getPlayer()); + } + } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index a13b4a1c1..b6860fe39 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -52,6 +52,7 @@ import mineplex.core.packethandler.PacketHandler; import mineplex.core.packethandler.PacketVerifier; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; @@ -645,6 +646,13 @@ public class GameLobbyManager implements IPacketRunnable, Listener _gemMap.remove(event.getPlayer()); _kitMap.remove(event.getPlayer()); } + + @EventHandler(priority = EventPriority.LOWEST) + public void DamageCancel(CustomDamageEvent event) + { + if (_kits.containsKey(event.GetDamageeEntity())) + event.SetCancelled("Kit Cancel"); + } @EventHandler public void Update(UpdateEvent event) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java index 14b035740..a3d67b552 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java @@ -261,6 +261,9 @@ public class GamePlayerManager implements Listener @EventHandler public void KitDamage(CustomDamageEvent event) { + if (Manager.GetGame() != null && Manager.GetGame().InProgress()) + return; + if (event.GetCause() != DamageCause.ENTITY_ATTACK) return;