diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java index 58a648011..2ee444296 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java @@ -19,6 +19,7 @@ import org.bukkit.event.*; import org.bukkit.event.entity.*; import org.bukkit.event.hanging.*; import org.bukkit.event.player.*; +import org.bukkit.potion.*; import java.util.*; @@ -232,7 +233,10 @@ public class SneakyAssassins extends SoloGame for (Player player : Bukkit.getOnlinePlayers()) { if (IsAlive(player)) + { Manager.GetDisguise().undisguise(player); + player.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 80, 0)); + } } this.Announce(C.cRed + C.Bold + "Players Revealed!"); @@ -242,7 +246,10 @@ public class SneakyAssassins extends SoloGame for (Player player : Bukkit.getOnlinePlayers()) { if (IsAlive(player)) + { Manager.GetDisguise().disguise(DisguiseFactory.createDisguise(player, _disguiseType)); + player.removePotionEffect(PotionEffectType.WITHER); + } } _revealCountdown = 60; @@ -284,6 +291,13 @@ public class SneakyAssassins extends SoloGame event.setCancelled(true); } + @EventHandler(ignoreCancelled = true) + public void onWitherEffectDamager(CustomDamageEvent event) + { + if (event.GetCause() == EntityDamageEvent.DamageCause.WITHER) + event.SetCancelled("Wither damage disabled"); + } + public NpcManager getNpcManager() { return _npcManager; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpItem.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpItem.java index d3c32b578..f88bfb88d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpItem.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpItem.java @@ -59,7 +59,7 @@ public class PowerUpItem else if (x == 1 && z == 1) beaconBaseBlock.setType(Material.BEACON); else - beaconBaseBlock.setTypeIdAndData(Material.STAINED_GLASS.getId(), DyeColor.GREEN.getWoolData(), false); + beaconBaseBlock.setTypeIdAndData(Material.STAINED_GLASS.getId(), DyeColor.YELLOW.getWoolData(), false); } } } @@ -72,7 +72,7 @@ public class PowerUpItem FireworkEffect effect = FireworkEffect .builder() .flicker(false) - .withColor(Color.LIME) + .withColor(Color.YELLOW) .with(FireworkEffect.Type.BURST) .trail(false) .build(); @@ -90,7 +90,7 @@ public class PowerUpItem effect = FireworkEffect .builder() .flicker(false) - .withColor(Color.LIME) + .withColor(Color.YELLOW) .with(FireworkEffect.Type.BALL_LARGE) .trail(true) .build(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java index bca6dd0ac..4c96b44d8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java @@ -75,6 +75,8 @@ public class PowerUpManager implements Listener getPowerUps().add(powerUp); powerUp.activate(); + + getGame().Announce("Power-up spawning..."); } public List getPowerUps() @@ -166,14 +168,7 @@ public class PowerUpManager implements Listener if (PowerUpType.SMOKE_BOMB.powerUpPlayer(event.getPlayer(), getRandom())) UtilPlayer.message(event.getPlayer(), F.main("Power-Up", "+1 " + F.item("Smoke Bomb"))); - if (count < 5) - { - PowerUpType.WEAPON.powerUpPlayer(event.getPlayer(), getRandom()); - PowerUpType.ARMOR.powerUpPlayer(event.getPlayer(), getRandom()); - - UtilPlayer.message(event.getPlayer(), F.main("Power-Up", "Your " + F.item("Sword") + " and " + F.item("Armor") + " have been upgraded")); - } - else if (count == 5) + if (count == 5) { PowerUpType.COMPASS.powerUpPlayer(event.getPlayer(), getRandom()); @@ -181,6 +176,18 @@ public class PowerUpManager implements Listener getGame().Announce(F.name(event.getPlayer().getName()) + " has become a " + F.skill("Master Assassin")); } + else + { + if (count < 5) + { + PowerUpType.WEAPON.powerUpPlayer(event.getPlayer(), getRandom()); + PowerUpType.ARMOR.powerUpPlayer(event.getPlayer(), getRandom()); + + UtilPlayer.message(event.getPlayer(), F.main("Power-Up", "Your " + F.item("Sword") + " and " + F.item("Armor") + " have been upgraded")); + } + + getGame().Announce(F.name(event.getPlayer().getName()) + " collected a " + F.skill("Power-Up")); + } schedulePowerUpSpawn(10); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRevealer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRevealer.java index 3c2a7b935..2169e0a65 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRevealer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRevealer.java @@ -13,6 +13,7 @@ import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.block.*; import org.bukkit.event.player.*; +import org.bukkit.potion.*; import java.util.*; @@ -135,6 +136,7 @@ public class PerkRevealer extends Perk implements IThrown getRevealedPlayers().put(player, info); Manager.GetDisguise().undisguise(player); + player.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 100, 0)); } info._expirationSeconds = 5;