diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java index 1fc23e682..d805d9dc4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java @@ -164,7 +164,7 @@ public abstract class Skywars extends Game ThrowableTNTModule tntModule = new ThrowableTNTModule() .setThrowAndDrop(true) - .setThrowStrength(1.4); + .setThrowStrength(1.6); tntModule.register(this); ItemStack tntItem = tntModule.getTntItem().clone(); @@ -195,6 +195,7 @@ public abstract class Skywars extends Game private void setupLoot() { new ChestLootModule() + .setPreGenerateLoot(true) .registerChestType("Island", WorldData.GetDataLocs("BROWN"), new ChestLootPool() @@ -206,7 +207,6 @@ public abstract class Skywars extends Game , new ChestLootPool() - .addItem(new ItemStack(Material.WOOD_SWORD)) .addItem(new ItemStack(Material.STONE_SWORD)) .addEnchantment(Enchantment.DAMAGE_ALL, 1) .setEnchantmentRarity(0.5) @@ -285,6 +285,7 @@ public abstract class Skywars extends Game new ChestLootPool() .addItem(new ItemStack(Material.WOOD), 16, 32) .addItem(new ItemStack(Material.COBBLESTONE), 16, 32) + .addItem(new ItemStack(Material.GLASS), 16, 32) .setProbability(0.9) , @@ -329,7 +330,6 @@ public abstract class Skywars extends Game new ChestLootPool() .addItem(new ItemStack(Material.DIAMOND_SWORD), 30) .addItem(new ItemStack(Material.DIAMOND), 1, 3) - .addItem(new ItemStack(Material.STICK), 1, 3) .setProbability(0.4) , @@ -356,19 +356,20 @@ public abstract class Skywars extends Game new ChestLootPool() .addItem(new ItemStack(Material.WOOD), 16, 32) .addItem(new ItemStack(Material.COBBLESTONE), 16, 32) + .addItem(new ItemStack(Material.GLASS), 16, 32) .setProbability(0.9) , new ChestLootPool() .addItem(new ItemStack(Material.EXP_BOTTLE), 5, 10, 130) - .addItem(new ItemStack(Material.ARROW), 4, 8, 160) + .addItem(new ItemStack(Material.ARROW), 6, 10, 160) .addItem(new ItemStack(Material.SNOW_BALL), 2, 5) .addItem(new ItemStack(Material.EGG), 2, 5) - .addItem(new ItemStack(Material.LAVA_BUCKET), 80) - .addItem(new ItemStack(Material.WATER_BUCKET)) + .addItem(new ItemStack(Material.LAVA_BUCKET), 60) + .addItem(new ItemStack(Material.WATER_BUCKET), 130) .addItem(new ItemStack(Material.ENDER_PEARL), 1, 2) - .addItem(new ItemStack(Material.MUSHROOM_SOUP)) - .setAmountsPerChest(1, 3) + .addItem(new ItemStack(Material.MUSHROOM_SOUP), 130) + .setAmountsPerChest(2, 3) , new ChestLootPool() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/PerkFireBurst.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/PerkFireBurst.java index 8d1e8412a..79d1fc160 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/PerkFireBurst.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/PerkFireBurst.java @@ -11,8 +11,6 @@ import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.common.util.UtilPlayer; import mineplex.core.recharge.Recharge; -import nautilus.game.arcade.game.GameTeam; - public class PerkFireBurst extends SkywarsPerk { @@ -40,11 +38,10 @@ public class PerkFireBurst extends SkywarsPerk } Location location = player.getLocation().add(0, LOCATION_Y_MODIFIER, 0); - GameTeam team = Manager.GetGame().GetTeam(player); for (Player other : UtilPlayer.getNearby(location, _range, true)) { - if (other.equals(player) || team.HasPlayer(other)) + if (other.equals(player) || isTeamDamage(player, other)) { continue; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java index 42b4d2df7..1d68ccb2a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/kits/perks/SkywarsPerk.java @@ -17,6 +17,8 @@ import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilInv; +import nautilus.game.arcade.game.Game; +import nautilus.game.arcade.game.games.skywars.TeamSkywars; import nautilus.game.arcade.kit.Perk; public abstract class SkywarsPerk extends Perk @@ -33,6 +35,12 @@ public abstract class SkywarsPerk extends Perk public abstract void onUseItem(Player player); + protected boolean isTeamDamage(Player player1, Player player2) + { + Game game = Manager.GetGame(); + return game instanceof TeamSkywars && game.GetTeam(player1).equals(game.GetTeam(player2)); + } + @EventHandler(priority = EventPriority.HIGH) public void playerInteract(PlayerInteractEvent event) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/module/ZombieGuardianModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/module/ZombieGuardianModule.java index 926475360..44fe28523 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/module/ZombieGuardianModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/module/ZombieGuardianModule.java @@ -22,6 +22,7 @@ import org.bukkit.potion.PotionEffectType; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilMath; +import mineplex.core.itemstack.ItemBuilder; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; @@ -36,10 +37,10 @@ public class ZombieGuardianModule extends Module private static final ItemStack[] ARMOUR = { - new ItemStack(Material.GOLD_BOOTS), - new ItemStack(Material.GOLD_LEGGINGS), - new ItemStack(Material.GOLD_CHESTPLATE), - new ItemStack(Material.GOLD_HELMET) + new ItemBuilder(Material.GOLD_BOOTS).setUnbreakable(true).build(), + new ItemBuilder(Material.GOLD_LEGGINGS).setUnbreakable(true).build(), + new ItemBuilder(Material.GOLD_CHESTPLATE).setUnbreakable(true).build(), + new ItemBuilder(Material.GOLD_HELMET).setUnbreakable(true).build(), }; private static final PotionEffect FIRE_RESISTANCE = new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 0, false, false); private static final int HEALTH = 15; @@ -155,8 +156,7 @@ public class ZombieGuardianModule extends Module return; } - event.AddMod("Negate", -event.GetDamage()); - event.AddMod("Blast Protection", 5); + event.AddMod("Blast Protection", -event.GetDamage() + 8); event.SetIgnoreArmor(true); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java index b4435cbc8..a3d6e09b8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java @@ -47,8 +47,7 @@ public class ChestLootModule extends Module private final Map> _chests; private long _destroyAfterOpened; - private boolean _autoRotateChests = true; - private boolean _spawnNearby; + private boolean _autoRotateChests = true, _spawnNearby, _preGenerateLoot; private int _spawnNearbyRadius = 8; public ChestLootModule() @@ -92,6 +91,12 @@ public class ChestLootModule extends Module return this; } + public ChestLootModule setPreGenerateLoot(boolean preGenerateLoot) + { + _preGenerateLoot = preGenerateLoot; + return this; + } + public void addChestLocation(String typeName, Location location) { for (Entry> entry : _chests.entrySet()) @@ -180,6 +185,11 @@ public class ChestLootModule extends Module ChestMetadata metadata = new ChestMetadata(block, chestType); metadataSet.add(metadata); + + if (_preGenerateLoot) + { + metadata.populateChest((Chest) block.getState()); + } } } @@ -209,7 +219,11 @@ public class ChestLootModule extends Module metadata.Opened = true; metadata.OpenedAt = System.currentTimeMillis(); - metadata.populateChest((Chest) block.getState()); + + if (!_preGenerateLoot) + { + metadata.populateChest((Chest) block.getState()); + } } @EventHandler