This commit is contained in:
Mysticate 2015-09-24 21:01:18 -04:00
parent 7445fda922
commit d9b6d8f0e3

View File

@ -699,32 +699,32 @@ public class Maze implements Listener
_phaseTimer -= .25;
if(_phaseTimer == 20) // only gets to this by running out of time naturally, not by player
{
UtilTextMiddle.display("", C.cGreen + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 15 || _phaseTimer == 10)
{
UtilTextMiddle.display("", C.cGreen + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 5 || _phaseTimer == 4)
{
UtilTextMiddle.display("", C.cGreen + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 3)
{
UtilTextMiddle.display("", C.cYellow + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 2)
{
UtilTextMiddle.display("", C.cGold + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 1)
{
UtilTextMiddle.display("", C.cRed + C.Bold + _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, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
}
if(_phaseTimer == 0)
@ -762,46 +762,52 @@ public class Maze implements Listener
{
if(_safePad == null)
return;
for (Player p : Host.GetPlayers(true))
{
if(_safePad.isOn(p) && !_playersOnPad.contains(p))
if (!_safePad.isOn(p))
{
UtilPlayer.message(p, F.main("Game", "You made it to the Safe Pad!"));
_playersOnPad.add(p);
Host.AddGems(p, 2, "Got to Safe Pad", true, true);
if(_playersOnPad.size() == 1) // first player
if (_playersOnPad.contains(p))
{
if(_phaseTimer > 15)
{
_phaseTimer = 15; // reduce countdown to 15
ArrayList<Player> pElse = Host.GetPlayers(false);
pElse.remove(p);
for(Player i : pElse)
{
UtilPlayer.message(i, F.main("Game", F.name(p.getName()) + " made it to the Safe Pad first!"));
UtilPlayer.message(i, F.main("Game", "You have " + F.time("15 Seconds") + " to make it to the Safe Pad!"));
}
}
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 + "You got to the Safe Pad!", 5, 40, 5, p);
UtilTextMiddle.display("", C.cRed + C.Bold + "Get back to the Safe Pad!", 0, 5, 0, p);
}
continue;
}
if(!_safePad.isOn(p) && _playersOnPad.contains(p))
if (_playersOnPad.contains(p))
continue;
UtilPlayer.message(p, F.main("Game", "You made it to the Safe Pad!"));
_playersOnPad.add(p);
Host.AddGems(p, 2, "Safe Pads Reached", true, true);
if (_playersOnPad.size() == 1) // first player
{
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);
Host.Announce(F.main("Game", F.name(p.getName()) + " made it to the Safe Pad first!"));
UtilTextMiddle.display("", C.cYellow + C.Bold + "You got to the Safe Pad first!", 5, 40, 5, p);
Host.AddGems(p, 7.5, "First Safe Pads", true, true);
p.playSound(p.getLocation(), Sound.SUCCESSFUL_HIT, 1.0f, 1.0f);
_phaseTimer = Math.min(15, _phaseTimer);
for (Player player : Host.GetPlayers(true))
{
if (player == p)
continue;
UtilPlayer.message(player, F.main("Game", "You have " + F.time("15 Seconds") + " to make it to the Safe Pad!"));
}
}
else // not the first
{
p.playSound(p.getLocation(), Sound.SUCCESSFUL_HIT, 1.0f, 1.0f);
UtilTextMiddle.display("", C.cYellow + C.Bold + "You got to the Safe Pad!", 5, 40, 5, p);
}
}
}
public void smasher(PlayerInteractEvent event)
{
if(!UtilEvent.isAction(event, ActionType.R)) return;