diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java index e9a1f96c8..e6759bc03 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java @@ -121,6 +121,7 @@ public class HideSeek extends TeamGame C.cRed + "Seekers" + C.cWhite + " Find and kill the Hiders!", }); + this.DamageSelf = false; this.DeathOut = false; this.InventoryOpen = false; this.HungerSet = 20; @@ -763,6 +764,21 @@ public class HideSeek extends TeamGame this.AddGems(player, 4, "Fireworks", true); } + + @EventHandler + public void HiderTimeGems(UpdateEvent event) + { + if (GetState() != GameState.Live) + return; + + if (event.getType() != UpdateType.SEC) + return; + + for (Player player : _hiders.GetPlayers(true)) + { + this.AddGems(player, 5d/60d, "Seconds Alive", true); + } + } @EventHandler public void UpdateSeekers(UpdateEvent event) @@ -875,6 +891,8 @@ public class HideSeek extends TeamGame Announce(C.cAqua + C.Bold + "Hiders have 20 Seconds to hide!"); } + + @EventHandler public void Timer(UpdateEvent event) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/forms/BlockForm.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/forms/BlockForm.java index 7452aff23..77adbba82 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/forms/BlockForm.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/forms/BlockForm.java @@ -7,6 +7,7 @@ import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; +import mineplex.core.disguise.disguises.DisguiseCat; import mineplex.core.disguise.disguises.DisguiseChicken; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hungergames/HungerGames.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hungergames/HungerGames.java index c66645d86..746f7d5de 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hungergames/HungerGames.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hungergames/HungerGames.java @@ -30,6 +30,7 @@ import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; @@ -53,6 +54,8 @@ public class HungerGames extends SoloGame private ArrayList> _spreadTypeBlocks; private Location _spreadSafe = null; private HashMap _redOutTime = new HashMap(); + + private long totalTime = 0; public HungerGames(ArcadeManager manager) { @@ -374,8 +377,15 @@ public class HungerGames extends SoloGame if (!IsLive()) return; + long time = System.currentTimeMillis(); + if (_redLocations.isEmpty()) + { + if (UtilTime.elapsed(GetStateTime(), 6000)) + SetState(GameState.End); + return; + } int max = Math.max(5, Math.min(100, _redLocations.size()/100)); @@ -426,6 +436,26 @@ public class HungerGames extends SoloGame RedSpread(block.getRelative(BlockFace.WEST).getRelative(BlockFace.DOWN)); } } + + totalTime += System.currentTimeMillis() - time; + } + + @EventHandler + public void RedTimer(UpdateEvent event) + { + if (event.getType() != UpdateType.SEC) + return; + + if (!IsLive()) + return; + + System.out.println(" "); + System.out.println("Game Time: " + UtilTime.MakeStr(System.currentTimeMillis() - this.GetStateTime())); + System.out.println("Creep Size: " + _redLocations.size()); + System.out.println("Creep Time: " + UtilTime.convertString(totalTime, 4, TimeUnit.SECONDS)); + + + totalTime = 0; } public boolean RedSpread(Block block) @@ -666,4 +696,11 @@ public class HungerGames extends SoloGame { } + + //XXX REMOVE ME + @Override + public void EndCheck() + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index 4a2cdc0b2..d0c607bdf 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -99,15 +99,19 @@ public class GameManager implements Listener //Stop Countdown! if (game.GetCountdown() != -1 && UtilServer.getPlayers().length < Manager.GetPlayerMin() && - !game.GetCountdownForce()) + !game.GetCountdownForce() && game.GetType() != GameType.HungerGames) //XXX REMOVE ME { game.SetCountdown(-1); Manager.GetLobby().DisplayWaiting(); } - + if (game.GetCountdown() != -1) StateCountdown(game, -1, false); - + else if (game.GetType() == GameType.HungerGames) //XXX REMOVE ME + { + StateCountdown(game, 1, false); + return; + } else if (game.AutoStart) { if (UtilServer.getPlayers().length >= Manager.GetPlayerFull()) @@ -124,7 +128,7 @@ public class GameManager implements Listener for (Player player : UtilServer.getPlayers()) player.playSound(player.getLocation(), Sound.NOTE_PLING, 2f, 2f); - if (game.GetPlayers(true).size() < 2) + if (game.GetPlayers(true).size() < 2 && false) // XXX REMOVE FALSE { game.Announce(C.cWhite + C.Bold + game.GetName() + " ended, not enough players!"); game.SetState(GameState.Dead);