This commit is contained in:
Mysticate 2015-09-30 22:31:03 -04:00
parent 4a023c4644
commit a6d7cccbe5
4 changed files with 39 additions and 16 deletions

View File

@ -736,7 +736,7 @@ public enum Achievement
MONSTER_MAZE_SURVIVAL("Die Already!", 1200,
new String[]{"Monster Maze.ToughCompetition"},
new String[]{"Survive past the 15th Safe Pad"},
new String[]{"Survive past the 10th Safe Pad"},
new int[]{1},
AchievementCategory.MONSTER_MAZE),

View File

@ -141,12 +141,36 @@ public class Maze implements Listener
return _curSafe;
}
public boolean isOnPad(Player player)
public boolean isOnPad(Player player, boolean checkNotActive )
{
if (_safePad == null)
return false;
return _safePad.isOn(player);
if (_safePad.isOn(player))
return true;
if (checkNotActive)
{
for (SafePad pad : _oldSafePads)
{
if (pad.isOn(player))
{
return true;
}
}
if (_nextSafePad != null)
{
if (_nextSafePad.isOn(player))
{
return true;
}
}
return false;
}
return false;
}
@EventHandler
@ -253,7 +277,7 @@ public class Maze implements Listener
return;
}
float percentage = (float) Math.min(Math.max(_phaseTimer / 15, 0), 1);
float percentage = (float) Math.min(Math.max(_phaseTimer / Math.max(6, 16 - (_curSafe - 1)), 0), 1);
for (Player p : _host.GetPlayers(true))
{
p.setExp(percentage);
@ -297,7 +321,7 @@ public class Maze implements Listener
if (!Recharge.Instance.usable(player, "Monster Hit"))
continue;
if (isOnPad(player))
if (isOnPad(player, true))
continue;
//Hit Snowman
@ -893,33 +917,33 @@ 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 + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5);
}
if(_phaseTimer == 15 || _phaseTimer == 10)
{
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5);
}
if(_phaseTimer == 5 || _phaseTimer == 4)
{
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5);
}
if(_phaseTimer == 3)
{
UtilTextMiddle.display("", C.cYellow + C.Bold + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cYellow + C.Bold + (int) _phaseTimer, 5, 40, 5);
}
if(_phaseTimer == 2)
{
UtilTextMiddle.display("", C.cGold + C.Bold + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cGold + C.Bold + (int) _phaseTimer, 5, 40, 5);
spawnSafePad();
}
if(_phaseTimer == 1)
{
UtilTextMiddle.display("", C.cRed + C.Bold + (int) _phaseTimer, 5, 40, 5, _host.GetPlayers(true).toArray(new Player[_host.GetPlayers(true).size()]));
UtilTextMiddle.display("", C.cRed + C.Bold + (int) _phaseTimer, 5, 40, 5);
}
if(_phaseTimer == 0)

View File

@ -12,7 +12,6 @@ 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;
@ -138,14 +137,14 @@ public class SafePad
public void build()
{
MapUtil.QuickChangeBlockAt(_loc, _tempMat.getId(), _tempData);
_loc.getWorld().playEffect(_loc, Effect.STEP_SOUND, _loc.getBlock().getTypeId());
// _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());
// _loc.getWorld().playEffect(_loc, Effect.STEP_SOUND, _loc.getBlock().getTypeId());
}
}

View File

@ -71,7 +71,7 @@ public class PilotTracker extends StatTracker<MonsterMaze>
{
_launched.remove(player);
if (getGame().getMaze().isOnPad(player))
if (getGame().getMaze().isOnPad(player, false))
{
addStat(player);
}