diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MMMazes.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MMMazes.java index 8a17914b0..314ca1a9d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MMMazes.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MMMazes.java @@ -1,7 +1,9 @@ package nautilus.game.arcade.game.games.monstermaze; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; +import java.util.List; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilBlock; @@ -16,7 +18,7 @@ public class MMMazes { public static MazePreset getRandomMapPreset(Location loc) { - return new MazePreset(M1, loc); // TODO randomization + return new MazePreset(getRandomMap(), loc); } public static class MazePreset @@ -96,20 +98,31 @@ public class MMMazes } } } - + ArrayList locsToPickFrom = new ArrayList<>(_validSafePadSpawns); - - int numberOfSafeZones = 4; - for(int i = 0; i < numberOfSafeZones; i++) + + int numberOfSafeZones = 8; + for (int i = 0; i < numberOfSafeZones; i++) { - Location l = UtilAlg.Random(locsToPickFrom); - - for(Block b : UtilBlock.getInBoundingBox(l.clone().add(1, 0, 1), l.clone().subtract(1, 0, 1), false)) + Location toAdd = null; + if (locsToPickFrom == null) { - _safeZones.add(b.getLocation()); + toAdd = UtilAlg.Random(locsToPickFrom); } - - for(Block b : UtilBlock.getInRadius(l.getBlock(), 6).keySet()) + else + { + ArrayList toBeAwayFrom = new ArrayList(_safeZones); + toBeAwayFrom.add(_center); + toAdd = UtilAlg.getLocationAwayFromOtherLocations(locsToPickFrom, toBeAwayFrom); + } + + _safeZones.add(toAdd); +// for(Block b : UtilBlock.getInBoundingBox(toAdd.clone().add(1, 0, 1), toAdd.clone().subtract(1, 0, 1), false)) +// { +// _safeZones.add(b.getLocation()); +// } + + for (Block b : UtilBlock.getInRadius(toAdd.getBlock(), 6).keySet()) { locsToPickFrom.remove(b.getLocation()); } @@ -162,21 +175,26 @@ public class MMMazes for (int i = 0 ; i < 3 ; i++) { - mod.subtract(0, i, 0).getBlock().setType(Material.GOLD_BLOCK); - } + mod.subtract(0, 1, 0).getBlock().setType(Material.GOLD_BLOCK); + } } for(Location loc : _centerSafeZone) { - loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.STAINED_GLASS); - loc.getBlock().getRelative(BlockFace.DOWN).setData((byte)8); + for (int i = 0 ; i < 3 ; i++) + { + Block cur = loc.clone().subtract(0, i, 0).getBlock(); + + cur.getRelative(BlockFace.DOWN).setType(Material.STAINED_CLAY); + cur.getRelative(BlockFace.DOWN).setData((byte) 13); + } } - for(Location loc : _safeZones) - { - loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.STAINED_GLASS); - loc.getBlock().getRelative(BlockFace.DOWN).setData((byte)8); - } +// for(Location loc : _safeZones) +// { +// loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.STAINED_CLAY); +// loc.getBlock().getRelative(BlockFace.DOWN).setData((byte) 5); +// } _built = true; } @@ -185,6 +203,11 @@ public class MMMazes return _spawns; } + public ArrayList getSafeZones() + { + return _safeZones; + } + public boolean isBuilt() { return _built; @@ -205,120 +228,329 @@ public class MMMazes { return _centerSafeZone; } - + public ArrayList getValidSafePadSpawns() { return _validSafePadSpawns; } - + public Location getCenter() { return _center; } } - + // PARSED MAZES - private static final int[][] M1 = { - {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - }; + private static final int[][] getRandomMap() + { + List maps = Arrays.asList(M1, M2, M3); + return maps.get(UtilMath.r(maps.size())); + } + private static final int[][] M1 = { + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,1,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,1,0,0,1,0,0,0}, + {0,0,0,2,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,2,0,0,0}, + {0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0}, + }; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/Maze.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/Maze.java index 43a73c03e..8c4f2a36f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/Maze.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/Maze.java @@ -61,6 +61,7 @@ public class Maze implements Listener private HashSet _waypoints; private HashSet _disabledWaypoints; private HashSet _oldDisabledWaypoints; + private ArrayList _safeZones; private Location _center; @@ -68,6 +69,7 @@ public class Maze implements Listener private SafePad _safePad = null; private SafePad _oldSafePad = null; + private boolean _canSpawn = true; private ArrayList _playersOnPad = new ArrayList(); @@ -80,6 +82,10 @@ public class Maze implements Listener private HashMap _ents = new HashMap(); + private long _lastBeacon = System.currentTimeMillis(); + + private int _curSafe = 0; + @SuppressWarnings("deprecation") public Maze(MonsterMaze host, MazePreset maze) { @@ -88,6 +94,7 @@ public class Maze implements Listener _map = maze.getMaze(); _spawns = maze.getSpawns(); _goals = maze.getValidSafePadSpawns(); + _safeZones = maze.getSafeZones(); _waypoints = new HashSet(); _disabledWaypoints = new HashSet(); @@ -108,11 +115,14 @@ public class Maze implements Listener loc.getBlock().setType(Material.STAINED_GLASS); loc.getBlock().setData((byte)3); } - _center = maze.getCenter(); - - pickNextLocForSafePad(); + _center = maze.getCenter(); } - + + public SafePad getSafePad() + { + return _safePad; + } + public boolean isOnPad(Player player) { if (_safePad == null) @@ -123,7 +133,7 @@ public class Maze implements Listener public void update() { - if(_safePad != null) // TODO probably a good idea to check if this will screw up compasses in inventories before the game starts + if (_safePad != null) // TODO probably a good idea to check if this will screw up compasses in inventories before the game starts { for(Player p : Host.GetPlayers(true)) { @@ -133,11 +143,11 @@ public class Maze implements Listener if(Host.GetState() == GameState.Live) { - UtilRadar.displayRadar(p, Arrays.asList(_safePadRadarData), false); + UtilRadar.displayRadar(p, Arrays.asList(_safePadRadarData), true); } } - } + if (Host.IsLive()) { //checkGoal(); @@ -145,7 +155,20 @@ public class Maze implements Listener move(); bump(); removeMobsOnSafePad(); - if(_phaseTimer > 15) + + if (_safePad == null && UtilTime.elapsed(_lastBeacon, 3000 + (1000 * UtilMath.r(10)))) + { + try + { + spawnSafePad(); + } + catch (Exception ex) + { + System.out.println("AN EXCEPTION OCCURED WHILE TRYING TO SPAWN A SAFE PAD!"); + } + } + + if (_phaseTimer > 15) { for(Player p : Host.GetPlayers(true)) { @@ -356,6 +379,36 @@ public class Maze implements Listener return cur; } + @SuppressWarnings("deprecation") + public void addSafeZone() + { + if (_safeZones.isEmpty()) + return; + + Location zone = _safeZones.remove(UtilMath.r(_safeZones.size())); + for (Block b : UtilBlock.getInBoundingBox(zone.clone().add(1, 0, 1), zone.clone().subtract(1, 0, 1), false)) + { + for (int i = 0 ; i < 3 ; i++) + { + Block cur = b.getLocation().clone().subtract(0, i, 0).getBlock(); + + cur.getRelative(BlockFace.DOWN).setType(Material.STAINED_CLAY); + cur.getRelative(BlockFace.DOWN).setData((byte) 13); + } + + Iterator iterator = _map.iterator(); + while (iterator.hasNext()) + { + Location loc = iterator.next(); + + if (loc.getBlockX() == b.getX() && loc.getBlockY() == b.getY() && loc.getBlockZ() == b.getZ()) + { + iterator.remove(); + } + } + } + } + public void fillSpawn(int numToSpawn) { System.out.println("spawning " + numToSpawn + " entities on map"); @@ -442,65 +495,90 @@ public class Maze implements Listener private void pickNextLocForSafePad() // short method name { - ArrayList goals = new ArrayList(_goals); - if(_oldSafePad != null) + if (_oldSafePad != null) { - goals.clear(); - for(Location loc : _goals) - { - if(UtilMath.offset2d(loc, _oldSafePad.getLocation()) > 60) - { - goals.add(loc); - } - } + _nextSafePadLoc = UtilAlg.findFurthest(_oldSafePad.getLocation(), _goals); + } + else + { + _nextSafePadLoc = _goals.get(UtilMath.r(_goals.size())); } - - System.out.println("Picking next goal from " + goals.size() + " goals."); - _nextSafePadLoc = UtilAlg.Random(goals); - _safePadRadarData = new RadarData(_nextSafePadLoc, '\u25A0' + ""); } + private void stopSafePad() + { + if (_safePad != null) + { + _oldSafePad = _safePad; + _safePad = null; + _oldSafePad.turnOffBeacon(); + _padDecayTimer = 11; + + _oldDisabledWaypoints = new HashSet(_disabledWaypoints); + } + } + public void spawnSafePad() { - if(_safePad != null) - { - _oldSafePad = _safePad; - _oldSafePad.turnOffBeacon(); - _padDecayTimer = 11; - - _oldDisabledWaypoints = new HashSet<>(_disabledWaypoints); - } + if (!_canSpawn) + return; + + pickNextLocForSafePad(); + _disabledWaypoints.clear(); + + _canSpawn = false; + + final Maze instance = this; - _safePad = new SafePad(Host, this, _nextSafePadLoc.clone().subtract(0,1,0)); // maybe don't need to clone() - _safePad.build(); + //Delay + final SafePad safePad = new SafePad(Host, instance, _nextSafePadLoc.clone().subtract(0, 1, 0)); // maybe don't need to clone() + safePad.build(); - Iterator iter = _waypoints.iterator(); - while (iter.hasNext()) { - Block b = iter.next(); - if(UtilBlock.getInBoundingBox(_safePad.getLocation().clone().add(2, 0, 2), _safePad.getLocation().clone().add(-2, 0, -2)).contains(b.getRelative(BlockFace.DOWN))) + addSafeZone(); + + //Delay for beacon. + Bukkit.getScheduler().scheduleSyncDelayedTask(Host.Manager.getPlugin(), new Runnable() + { + @Override + public void run() { - _disabledWaypoints.add(b); - iter.remove(); + _curSafe++; + + _canSpawn = true; + _safePad = safePad; + + Host.Announce(F.main("Game", "A Safe Pad has spawned!")); + UtilTextMiddle.display("", C.cYellow + C.Bold + "A Safe Pad has spawned!", 5, 40, 5); + + Iterator iter = _waypoints.iterator(); + while (iter.hasNext()) { + Block b = iter.next(); + if (UtilBlock.getInBoundingBox(_safePad.getLocation().clone().add(2, 0, 2), _safePad.getLocation().clone().add(-2, 0, -2)).contains(b.getRelative(BlockFace.DOWN))) + { + _disabledWaypoints.add(b); + iter.remove(); + } + } + + Iterator it = _ents.keySet().iterator(); + while (it.hasNext()) { + Entity e = it.next(); + if (_safePad.isOn(e)) + { + System.out.println("entity on newly spawned safepad removed"); + _ents.remove(_ents.get(e)); + it.remove(); + e.remove(); + } + } + + Bukkit.getPluginManager().callEvent(new SafepadBuildEvent()); } - } - - Iterator it = _ents.keySet().iterator(); - while (it.hasNext()) { - Entity e = it.next(); - if(_safePad.isOn(e)) - { - System.out.println("entity on newly spawned safepad removed"); - _ents.remove(_ents.get(e)); - it.remove(); - e.remove(); - } - } - - Bukkit.getPluginManager().callEvent(new SafepadBuildEvent()); + }, 50); } - + public void decrementSafePadTime() { if(_padDecayTimer == -1) return; @@ -511,7 +589,7 @@ public class Maze implements Listener { if(_padDecayTimer == 10) { - _oldSafePad.setGlassData((byte)5); // green + _oldSafePad.setBreakData((byte)5); // green _oldSafePad.turnOffBeacon(); _oldSafePad.setCrackedProgress(1); } @@ -521,7 +599,7 @@ public class Maze implements Listener } else if(_padDecayTimer == 8) { - _oldSafePad.setGlassData((byte)4); // yellow + _oldSafePad.setBreakData((byte)4); // yellow _oldSafePad.setCrackedProgress(3); } else if(_padDecayTimer == 7) @@ -530,7 +608,7 @@ public class Maze implements Listener } else if(_padDecayTimer == 6) { - _oldSafePad.setGlassData((byte)1); // orange + _oldSafePad.setBreakData((byte)1); // orange _oldSafePad.setCrackedProgress(5); } else if(_padDecayTimer == 5) @@ -539,7 +617,7 @@ public class Maze implements Listener } else if(_padDecayTimer == 4) { - _oldSafePad.setGlassData((byte)14); // red + _oldSafePad.setBreakData((byte)14); // red _oldSafePad.setCrackedProgress(7); } else if(_padDecayTimer == 3) @@ -553,7 +631,8 @@ public class Maze implements Listener else if(_padDecayTimer == 1) { _oldSafePad.setCrackedProgress(-1); - _oldSafePad.destroy(); + _oldSafePad.destroyBase(); + _oldSafePad.destroySurface(); if(_oldDisabledWaypoints.size() > 0) { @@ -563,9 +642,11 @@ public class Maze implements Listener } _oldDisabledWaypoints.clear(); } + + _oldSafePad = null; // make sure mobs can go on it. } } - if(_padDecayTimer == 1) + if (_padDecayTimer == 1) { _padDecayTimer = -1; } @@ -578,34 +659,32 @@ public class Maze implements Listener _phaseTimer--; if(_phaseTimer == 20) // only gets to this by running out of time naturally, not by player { - UtilTextMiddle.display(C.cGreen + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cGreen + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 15 || _phaseTimer == 10) { - UtilTextMiddle.display(C.cGreen + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cGreen + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 5 || _phaseTimer == 4) { - UtilTextMiddle.display(C.cGreen + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cGreen + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 3) { - UtilTextMiddle.display(C.cYellow + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cYellow + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 2) { - pickNextLocForSafePad(); - UtilFirework.playFirework(_nextSafePadLoc, Type.BALL, Color.ORANGE, false, false); - UtilTextMiddle.display(C.cGold + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cGold + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 1) { - UtilTextMiddle.display(C.cRed + C.Bold + _phaseTimer, C.cWhite + "Seconds Left", 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); + UtilTextMiddle.display("", C.cRed + C.Bold + _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()])); } if(_phaseTimer == 0) @@ -614,6 +693,7 @@ public class Maze implements Listener { if(_safePad.isOn(p)) { + UtilTextMiddle.display("", C.cYellow + C.Bold + "The Safe Pad expired!", 5, 40, 5); // maybe send them a happy message? =) // UtilPlayer.message(p, F.main("Game", "Since you were on the Safe Pad, you didn't die!")); } @@ -622,15 +702,18 @@ public class Maze implements Listener Host.Manager.GetDamage().NewDamageEvent(p, null, null, DamageCause.CUSTOM, 500, false, false, false, "Game", "Map damage"); - UtilTextMiddle.display("", C.cRed + "You didn't make it to the Safe Pad!", 5, 40, 5, p); + UtilTextMiddle.display("", C.cRed + C.Bold + "You didn't make it to the Safe Pad!", 5, 40, 5, p); UtilPlayer.message(p, F.main("Game", "You didn't make it to the Safe Pad!")); } } spawn(15); - spawnSafePad(); + + stopSafePad(); + _lastBeacon = System.currentTimeMillis(); + _playersOnPad.clear(); //_phaseTimer = -1; - _phaseTimer = 90; + _phaseTimer = 90 - (_curSafe * 3); } } @@ -659,18 +742,18 @@ public class Maze implements Listener } } - UtilTextMiddle.display(C.cYellow + C.Bold + "Safe Pad", C.cWhite + "You got to the Safe Pad first!", 5, 40, 5, p); + UtilTextMiddle.display("", C.cYellow + C.Bold + "You got to the Safe Pad first!", 5, 40, 5, p); Host.AddGems(p, 7.5, "First to Safe Pad", true, true); p.playSound(p.getLocation(), Sound.SUCCESSFUL_HIT, 1.0f, 1.0f); } else // not the first { p.playSound(p.getLocation(), Sound.SUCCESSFUL_HIT, 1.0f, 1.0f); - UtilTextMiddle.display(C.cYellow + C.Bold + "Safe Pad", C.cWhite + "You got to the Safe Pad!", 5, 40, 5, p); + UtilTextMiddle.display("", C.cYellow + C.Bold + "You got to the Safe Pad!", 5, 40, 5, p); } } if(!_safePad.isOn(p) && _playersOnPad.contains(p)) { - UtilTextMiddle.display(C.cRed + C.Bold + "DANGER", C.cWhite + "Get back to the Safe Pad!", 0, 10, 0, p); + UtilTextMiddle.display("", C.cRed + C.Bold + "Get back to the Safe Pad!", 0, 10, 0, p); //UtilTextBottom.display(C.cRed + "Get back to the Safe Pad!", p); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java index 112135535..e7a9f1b84 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/MonsterMaze.java @@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.monstermaze; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; @@ -71,6 +72,8 @@ public class MonsterMaze extends SoloGame this.PrepareFreeze = false; + this.HungerSet = 20; + registerStatTrackers( new SnowmanHitTracker(this), new AbilityUseTracker(this), @@ -97,32 +100,15 @@ public class MonsterMaze extends SoloGame @EventHandler public void GameStateChange(GameStateChangeEvent event) { - if(event.GetState() == GameState.Prepare) - { - //if(WorldData.MapName.contains("MonsterTest")) _monsterType = EntityType.CREEPER; - - setupJumpers(); - } - else if(event.GetState() == GameState.Live) + if(event.GetState() == GameState.Live) { _maze.removePlayerContainmentUnit(); Announce(C.cYellow + C.Scramble + "@@" + C.cAqua + C.Bold + " Monster Maze is best played in 3rd Person! (Push F5) " + C.cYellow + C.Scramble + "@@"); + UtilTextMiddle.display(C.cYellow + C.Bold + "Push F5", C.cAqua + C.Bold + "Monster Maze is best played in 3rd Person!"); for (Team team : GetScoreboard().GetScoreboard().getTeams()) team.setCanSeeFriendlyInvisibles(true); - - Bukkit.getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable() - { - @Override - public void run() - { - if (!IsLive()) - return; - - _maze.spawnSafePad(); - } - }, 80); } else if(event.GetState() == GameState.Recruit) { @@ -136,17 +122,6 @@ public class MonsterMaze extends SoloGame } } - private void setupJumpers() - { - for(Player p : GetPlayers(true)) - { - if(GetKit(p) instanceof KitJumper) - { - setJumpsLeft(p, 5); - } - } - } - private void setJumpsLeft(Player player, int jumps) { if (jumps <= 0) @@ -202,7 +177,7 @@ public class MonsterMaze extends SoloGame { if (IsLive() && UtilInv.contains(pl, Material.FEATHER, (byte) 0, 1)) { - while (Manager.GetCondition().HasCondition(pl, ConditionType.JUMP, null)) + while (Manager.GetCondition().GetActiveCondition(pl, ConditionType.JUMP) != null) Manager.GetCondition().GetActiveCondition(pl, ConditionType.JUMP).Expire(); } else @@ -211,16 +186,8 @@ public class MonsterMaze extends SoloGame Manager.GetCondition().Factory().Jump("No jumping", pl, null, 9999999, 250, true, false, false); } - if (GetPlayers(true).size() > 4) - { - if (!Manager.GetCondition().HasCondition(pl, ConditionType.INVISIBILITY, null)) - Manager.GetCondition().Factory().Invisible("Hide players", pl, null, 9999999, 2, true, false, false); - } - else - { - while (Manager.GetCondition().HasCondition(pl, ConditionType.INVISIBILITY, null)) - Manager.GetCondition().GetActiveCondition(pl, ConditionType.INVISIBILITY).Expire(); - } + if (!Manager.GetCondition().HasCondition(pl, ConditionType.INVISIBILITY, null)) + Manager.GetCondition().Factory().Invisible("Hide players", pl, null, 9999999, 2, true, false, false); } } @@ -278,8 +245,7 @@ public class MonsterMaze extends SoloGame Scoreboard.Write(C.cYellow + C.Bold + "Players"); if (GetPlayers(true).size() > 6) - { - + { Scoreboard.Write(C.cWhite + GetPlayers(true).size()); } else @@ -294,13 +260,13 @@ public class MonsterMaze extends SoloGame Scoreboard.Write(C.cGreen + C.Bold + "Safe Pad"); - if (IsLive()) + if (_maze.getSafePad() != null) { Scoreboard.Write(C.cWhite + UtilTime.MakeStr(_maze.getPhaseTimer() * 1000)); } else { - Scoreboard.Write("Unknown"); + Scoreboard.Write("None"); } Scoreboard.Draw(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/SafePad.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/SafePad.java index 855f95749..a2e91b4ce 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/SafePad.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/SafePad.java @@ -3,11 +3,6 @@ package nautilus.game.arcade.game.games.monstermaze; import java.util.ArrayList; import java.util.Iterator; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; - import mineplex.core.common.util.MapUtil; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilParticle; @@ -17,6 +12,12 @@ import mineplex.core.common.util.UtilPlayer; import net.minecraft.server.v1_7_R4.Packet; import net.minecraft.server.v1_7_R4.PacketPlayOutBlockBreakAnimation; +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; + public class SafePad { private MonsterMaze Host; @@ -33,52 +34,61 @@ public class SafePad _loc = loc; + //beacon surface + for (int x = -2 ; x < 3 ; x++) + { + for (int z = -2 ; z < 3 ; z++) + { + if (x == 0 && z == 0) + continue; + + _blocks.add(new SafePadBlock(loc.clone().add(x, 0, z), Material.STAINED_CLAY, (byte) 5)); + } + } + // beacon _blocks.add(new SafePadBlock(loc.clone().add(0, 0, 0), Material.BEACON, (byte)0)); // beacon base - _blocks.add(new SafePadBlock(loc.clone().add(-1, -1, -1), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(0, -1, -1), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(1, -1, -1), Material.GOLD_BLOCK, (byte)0)); + for (int x = -1 ; x < 2 ; x++) + { + for (int z = -1 ; z < 2 ; z++) + { + _blocks.add(new SafePadBlock(loc.clone().add(x, -1, z), Material.IRON_BLOCK, (byte)0)); + } + } - _blocks.add(new SafePadBlock(loc.clone().add(-1, -1, 0), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(0, -1, 0), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(1, -1, 0), Material.GOLD_BLOCK, (byte)0)); + // corner blocks + _blocks.add(new SafePadBlock(loc.clone().add(2, -1, 2), Material.QUARTZ_BLOCK, (byte) 1)); + _blocks.add(new SafePadBlock(loc.clone().add(-2, -1, 2), Material.QUARTZ_BLOCK, (byte) 1)); + _blocks.add(new SafePadBlock(loc.clone().add(2, -1, -2), Material.QUARTZ_BLOCK, (byte) 1)); + _blocks.add(new SafePadBlock(loc.clone().add(-2, -1, -2), Material.QUARTZ_BLOCK, (byte) 1)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, -1, 1), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(0, -1, 1), Material.GOLD_BLOCK, (byte)0)); - _blocks.add(new SafePadBlock(loc.clone().add(1, -1, 1), Material.GOLD_BLOCK, (byte)0)); + // stairs + _blocks.add(new SafePadBlock(loc.clone().add(-1, -1, 2), Material.QUARTZ_STAIRS, (byte) 7)); + _blocks.add(new SafePadBlock(loc.clone().add(0, -1, 2), Material.QUARTZ_STAIRS, (byte) 7)); + _blocks.add(new SafePadBlock(loc.clone().add(1, -1, 2), Material.QUARTZ_STAIRS, (byte) 7)); - // glass - _blocks.add(new SafePadBlock(loc.clone().add(-2, 0, -2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, 0, -2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(0, 0, -2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(1, 0, -2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(2, 0, -2), Material.STAINED_GLASS, (byte)5)); + _blocks.add(new SafePadBlock(loc.clone().add(-1, -1, -2), Material.QUARTZ_STAIRS, (byte) 6)); + _blocks.add(new SafePadBlock(loc.clone().add(0, -1, -2), Material.QUARTZ_STAIRS, (byte) 6)); + _blocks.add(new SafePadBlock(loc.clone().add(1, -1, -2), Material.QUARTZ_STAIRS, (byte) 6)); + + _blocks.add(new SafePadBlock(loc.clone().add(2, -1, -1), Material.QUARTZ_STAIRS, (byte) 5)); + _blocks.add(new SafePadBlock(loc.clone().add(2, -1, 0), Material.QUARTZ_STAIRS, (byte) 5)); + _blocks.add(new SafePadBlock(loc.clone().add(2, -1, 1), Material.QUARTZ_STAIRS, (byte) 5)); + + _blocks.add(new SafePadBlock(loc.clone().add(-2, -1, -1), Material.QUARTZ_STAIRS, (byte) 4)); + _blocks.add(new SafePadBlock(loc.clone().add(-2, -1, 0), Material.QUARTZ_STAIRS, (byte) 4)); + _blocks.add(new SafePadBlock(loc.clone().add(-2, -1, 1), Material.QUARTZ_STAIRS, (byte) 4)); - _blocks.add(new SafePadBlock(loc.clone().add(-2, 0, -1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, 0, -1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(0, 0, -1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(1, 0, -1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(2, 0, -1), Material.STAINED_GLASS, (byte)5)); - - _blocks.add(new SafePadBlock(loc.clone().add(-2, 0, 0), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, 0, 0), Material.STAINED_GLASS, (byte)5)); - // (this is where the beacon is, so no glass) - _blocks.add(new SafePadBlock(loc.clone().add(1, 0, 0), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(2, 0, 0), Material.STAINED_GLASS, (byte)5)); - - _blocks.add(new SafePadBlock(loc.clone().add(-2, 0, 1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, 0, 1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(0, 0, 1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(1, 0, 1), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(2, 0, 1), Material.STAINED_GLASS, (byte)5)); - - _blocks.add(new SafePadBlock(loc.clone().add(-2, 0, 2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(-1, 0, 2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(0, 0, 2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(1, 0, 2), Material.STAINED_GLASS, (byte)5)); - _blocks.add(new SafePadBlock(loc.clone().add(2, 0, 2), Material.STAINED_GLASS, (byte)5)); + // air slabs + for (int x = -2 ; x < 3 ; x++) + { + for (int z = -2 ; z < 3 ; z++) + { + _blocks.add(new SafePadBlock(loc.clone().add(x, -2, z), Material.AIR, (byte) 0)); + } + } } public class SafePadBlock @@ -137,12 +147,14 @@ public class SafePad public void build() { MapUtil.QuickChangeBlockAt(_loc, _tempMat.getId(), _tempData); + _loc.getWorld().playEffect(_loc, Effect.STEP_SOUND, _loc.getBlock().getTypeId()); } @SuppressWarnings("deprecation") public void restore() { MapUtil.QuickChangeBlockAt(_loc, _origM.getId(), _origD); + _loc.getWorld().playEffect(_loc, Effect.STEP_SOUND, _loc.getBlock().getTypeId()); } } @@ -154,24 +166,28 @@ public class SafePad } } - public void setGlassData(byte newData) + public void setBreakData(byte newData) { - for(SafePadBlock spb : _blocks) + for (SafePadBlock spb : _blocks) { - if(!spb.getBlockMaterial().equals(Material.STAINED_GLASS)) continue; + if (spb.getBlockMaterial() != Material.STAINED_CLAY) + continue; + spb.setData(newData); } } public void turnOffBeacon() { - for(SafePadBlock bl : _blocks) + for (SafePadBlock bl : _blocks) { - if(bl.getBlockMaterial().equals(Material.GOLD_BLOCK)) bl.restore(); - if(bl.getBlockMaterial().equals(Material.BEACON)) + if (bl.getBlockMaterial() == Material.IRON_BLOCK) + bl.setMaterial(Material.QUARTZ_BLOCK); + + if (bl.getBlockMaterial() == Material.BEACON) { - bl.setMaterial(Material.STAINED_GLASS); - bl.setData((byte)5); + bl.setMaterial(Material.STAINED_CLAY); + bl.setData((byte) 5); } } } @@ -184,9 +200,10 @@ public class SafePad while(iter.hasNext()) { SafePadBlock spb = iter.next(); - if(!spb.getLocation().getBlock().getType().equals(Material.STAINED_GLASS)) continue; + if (!spb.getLocation().getBlock().getType().equals(Material.STAINED_CLAY)) + continue; - UtilParticle.PlayParticle(ParticleType.BLOCK_DUST.getParticle(Material.STAINED_GLASS, spb.getBlockData()), spb.getLocation(), 0.5f, 0.5f, 0.5f, 0.05f, 8, ViewDist.NORMAL, Host.GetPlayers(false).toArray(new Player[Host.GetPlayers(false).size()])); + UtilParticle.PlayParticle(ParticleType.BLOCK_DUST.getParticle(Material.STAINED_CLAY, spb.getBlockData()), spb.getLocation(), 0.5f, 0.5f, 0.5f, 0.05f, 8, ViewDist.NORMAL, Host.GetPlayers(false).toArray(new Player[Host.GetPlayers(false).size()])); i++; @@ -211,15 +228,29 @@ public class SafePad } }*/ } - - public void destroy() + + public void destroyBase() { - for(SafePadBlock bl : _blocks) - { - bl.restore(); + for (final SafePadBlock bl : _blocks) + { + if (bl.getBlockMaterial() == Material.QUARTZ_BLOCK || bl.getBlockMaterial() == Material.QUARTZ_STAIRS) + { + bl.restore(); + } } } + public void destroySurface() + { + for (final SafePadBlock bl : _blocks) + { + if (bl.getBlockMaterial() != Material.QUARTZ_BLOCK && bl.getBlockMaterial() != Material.QUARTZ_STAIRS) + { + bl.restore(); + } + } + } + public Location getLocation() { return _loc; @@ -227,6 +258,6 @@ public class SafePad public boolean isOn(Entity e) { - return UtilAlg.inBoundingBox(e.getLocation(), getLocation().clone().add(2, 0, 2), getLocation().clone().add(-2, 5, -2)); + return UtilAlg.inBoundingBox(e.getLocation(), getLocation().clone().add(2.999, 5, 2), getLocation().clone().add(-2, 0, -2.999)); } }