diff --git a/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.java b/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.java index ae8ca1c1..9453ff66 100644 --- a/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.java +++ b/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.java @@ -65,9 +65,12 @@ public class CastleSiegeNew extends TeamGame // protected String[] _help; private int _undeadIndex = 0; private int _defenderIndex = 0; + private int _generalIndex = 0; private ChatColor defenderTipColor; private ChatColor undeadTipColor; + private ChatColor generalTipColor; private boolean showDefTip = true; + private boolean showGenTips = false; private static final String[] DESCRIPTION = { C.cAqua + "Defenders" + C.cWhite + " must defend the King.", @@ -77,7 +80,7 @@ public class CastleSiegeNew extends TeamGame C.cRed + "Undead" + C.cWhite + " must kill the King.", C.cRed + "Undead" + C.cWhite + " lose when the sun rises." }; - // Original Tip strings - commented out original calling (_help DNF) + // Original Tip strings private static final String[] TIPS = { "TNT randomly spawns at 3 different locations outside the undead forest.", "Right-click TNT to pick it up.", @@ -89,14 +92,27 @@ public class CastleSiegeNew extends TeamGame "Defenders respawn as wolves with no armor or weapons.", "Wolves must wait 6 seconds in between respawns.", "Coordination and teamwork are important to winning as Defenders.", - "In order to add this tip, I had to add the SUPER TEDIOUS... One line string... to the CastleSiegeNew.java file..." + "A strong defense has around 75% marksmen and 25% knights", + "Defense, watch out for undead who try to knock you off!", + "Click fences to open them!", + "Defense should avoid retreating to improve their chance of winning!", + "TNT is deadly! Attack TNT from a distance", + "Wolves are best suited to target Undead holding TNT." }; + // Undead Tips - Colored red private static final String[] UndeadTips = { "TNT randomly spawns at 3 different locations outside the undead forest.", "Right-click TNT to pick it up.", "TNT will automatically explode 30 seconds after being picked up.", - "Undead respawn instantly." + "Undead respawn instantly.", + " Iron Bars and Cracked Stone Bricks are weak points. Blow them open with TNT!", + "Click while holding TNT to explode.", + "Use your axe to break oak fences! Other fences cannot be broken…", + "Opening multiple pathways are useful for the Undead!", + " Iron bars can only be destroyed with TNT", + "The skeleton kit is useful to kill marksmen", + "Skeletons can only pick up extra arrows shot from knights and paladins!" }; // Defender Tips - Colored aqua private static final String[] DefenderTips = { @@ -108,6 +124,13 @@ public class CastleSiegeNew extends TeamGame "Coordination and teamwork are important to winning as Defenders." }; + // Defender Tips - Colored yellow + private static final String[] GeneralTips = { + "Use 1.8.9 for the best gameplay experience!", + "Castle Siege is a challenging game! Work together to succeed.", + "Use Team Chat to coordinate! Message in Team Chat using this format: #(message)" + }; + private static final int START_TIME = 14000; private static final int UNDEAD_BURN_TIME = 24000; private static final int DEFENDER_WIN_TIME = UNDEAD_BURN_TIME + 200; @@ -237,10 +260,10 @@ public class CastleSiegeNew extends TeamGame } @EventHandler - public void DisplayTips(UpdateEvent event) + public void DisplayCSTips(UpdateEvent event) { - if (showDefTip) { + if (showDefTip && !showGenTips) { if (!inLobby() || event.getType() != UpdateType.SLOWER) { return; } @@ -266,7 +289,7 @@ public class CastleSiegeNew extends TeamGame showDefTip = false; } - else { + else if (!showDefTip && !showGenTips) { if (!inLobby() || event.getType() != UpdateType.SLOWER) { return; } @@ -289,6 +312,33 @@ public class CastleSiegeNew extends TeamGame } _undeadIndex = (_undeadIndex + 1) % UndeadTips.length; + showGenTips = true; + } + + else { + if (!inLobby() || event.getType() != UpdateType.SLOWER) { + return; + } + + if (Manager.GetGameHostManager().isCommunityServer()) { + return; + } + + generalTipColor = generalTipColor == ChatColor.YELLOW ? ChatColor.YELLOW : ChatColor.YELLOW; + String gen = C.cWhiteB + "TIP> " + ChatColor.RESET + generalTipColor + GeneralTips[_generalIndex]; + + for (Player player : UtilServer.getPlayersCollection()) { + if (!Manager.getPreferences().get(player).isActive(Preference.GAME_TIPS)) { + continue; + } + + player.playSound(player.getLocation(), Sound.CHICKEN_EGG_POP, 1f, 1f); + UtilPlayer.message(player, gen); + + } + + _generalIndex = (_generalIndex + 1) % GeneralTips.length; + showGenTips = false; showDefTip = true; } } diff --git a/Nautilus.Game.Arcade/target/classes/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.class b/Nautilus.Game.Arcade/target/classes/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.class index 2ad78571..535d68bf 100644 Binary files a/Nautilus.Game.Arcade/target/classes/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.class and b/Nautilus.Game.Arcade/target/classes/nautilus/game/arcade/game/games/castlesiegenew/CastleSiegeNew.class differ diff --git a/out/artifacts/nautilus_game_arcade_jar/nautilus-game-arcade.jar b/out/artifacts/nautilus_game_arcade_jar/nautilus-game-arcade.jar index 4886f3b4..9b910050 100644 Binary files a/out/artifacts/nautilus_game_arcade_jar/nautilus-game-arcade.jar and b/out/artifacts/nautilus_game_arcade_jar/nautilus-game-arcade.jar differ