diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java index cbdc955e4..822efa06e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java @@ -56,11 +56,16 @@ public class BombLobbers extends TeamGame new KitWaller(manager) }, new String[] { - "Throw TNT to blow up your enemies!", - "Click with TNT to throw" + "Fight against your enemies using", + "the power of explosives!", + "", + "Left click TNT to throw at your enemy.", + "Last team alive wins!", + "Kaboom!" }); DamageSelf = false; + DamageTeamSelf = false; WorldWaterDamage = 5; @@ -174,7 +179,7 @@ public class BombLobbers extends TeamGame _throwers.remove(tnt); _teams.remove(tnt); - for (Player other : UtilPlayer.getNearby(event.getEntity().getLocation(), 5)) + for (Player other : UtilPlayer.getNearby(event.getEntity().getLocation(), 14)) { Manager.GetCondition().Factory().Explosion("Throwing TNT", other, thrower, 50, 0.1, false, false); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/KitArmorer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/KitArmorer.java index de1651826..be7f2c64a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/KitArmorer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/KitArmorer.java @@ -1,6 +1,7 @@ package nautilus.game.arcade.game.games.lobbers.kits; import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilInv; import mineplex.core.itemstack.ItemBuilder; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.game.games.lobbers.kits.perks.PerkCraftman; @@ -31,14 +32,23 @@ public class KitArmorer extends Kit }, EntityType.ZOMBIE, new ItemStack(Material.AIR)); } - + @Override - public void GiveItems(Player player) + public void ApplyKit(Player player) { + UtilInv.Clear(player); + + for (Perk perk : GetPerks()) + perk.Apply(player); + + GiveItemsCall(player); + player.getInventory().setHelmet(new ItemBuilder(Material.GOLD_HELMET).setUnbreakable(true).build()); player.getInventory().setChestplate(new ItemBuilder(Material.GOLD_CHESTPLATE).setUnbreakable(true).build()); player.getInventory().setLeggings(new ItemBuilder(Material.GOLD_LEGGINGS).setUnbreakable(true).build()); player.getInventory().setBoots(new ItemBuilder(Material.GOLD_BOOTS).setUnbreakable(true).build()); + + UtilInv.Update(player); } @Override @@ -50,4 +60,10 @@ public class KitArmorer extends Kit ent.getEquipment().setBoots(new ItemBuilder(Material.GOLD_BOOTS).build()); } + @Override + public void GiveItems(Player player) + { + + } + } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkWaller.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkWaller.java index 187ab2a49..211110b66 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkWaller.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkWaller.java @@ -1,6 +1,7 @@ package nautilus.game.arcade.game.games.lobbers.kits.perks; import java.util.HashSet; +import java.util.Iterator; import java.util.Set; import mineplex.core.common.util.C; @@ -75,7 +76,9 @@ public class PerkWaller extends Perk if (!UtilInv.IsItem(event.getItem(), Material.STONE_SPADE, (byte) 0)) return; - _wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw(), getFace(event.getPlayer().getLocation().getYaw()))); + UtilInv.remove(event.getPlayer(), Material.STONE_SPADE, (byte) 0, 1); + + _wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw())); } @SuppressWarnings("deprecation") @@ -85,13 +88,18 @@ public class PerkWaller extends Perk if (!Manager.GetGame().IsLive()) return; - for (Block block : event.GetBlocks()) + Iterator iterator = event.GetBlocks().iterator(); + + while (iterator.hasNext()) { + Block block = iterator.next(); + if (_wallBlocks.contains(block.getLocation())) { if (block.getData() != 2) { block.setData((byte) 2); + iterator.remove(); } } } @@ -108,7 +116,7 @@ public class PerkWaller extends Perk for (TNTPrimed tnt : _tnt) { - for (Block near : UtilBlock.getInRadius(tnt.getLocation(), 1.5F).keySet()) + for (Block near : UtilBlock.getInRadius(tnt.getLocation(), 2.0F).keySet()) { if (_wallBlocks.contains(near.getLocation())) { @@ -118,8 +126,11 @@ public class PerkWaller extends Perk } } - private Set buildWall(final Location source, final float playerYaw, final BlockFace facing) + @SuppressWarnings("deprecation") + private Set buildWall(final Location source, final float playerYaw) { + BlockFace facing = getFace(playerYaw + 180F); + Set allWallBlocks = new HashSet(); Set baseWallBlocks = new HashSet(); @@ -147,16 +158,15 @@ public class PerkWaller extends Perk for (Location block : allWallBlocks) { block.getBlock().setType(Material.SMOOTH_BRICK); - block.getWorld().playEffect(block, Effect.STEP_SOUND, 1.0F); + block.getBlock().setData((byte) 0); + + block.getWorld().playEffect(block, Effect.STEP_SOUND, block.getBlock().getType()); } return allWallBlocks; } private BlockFace getFace(float yaw) { - if (yaw < 0) - yaw = yaw * (-1); - - return axis[Math.round(yaw / 90F) & 0x3]; + return axis[Math.round(yaw / 90f) & 0x3]; } }