Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex
Conflicts: Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/forms/CreatureForm.java
This commit is contained in:
commit
3f93e6daf1
Binary file not shown.
@ -122,7 +122,7 @@ public class ServerMonitor
|
||||
try
|
||||
{
|
||||
process = new ProcessBuilder(new String[] {"/bin/sh", cmd, serverToKill.Address, serverToKill.Name}).start();
|
||||
process.waitFor();
|
||||
process.wait(1000);
|
||||
BufferedReader reader=new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line = reader.readLine();
|
||||
|
||||
@ -156,7 +156,7 @@ public class ServerMonitor
|
||||
try
|
||||
{
|
||||
process = new ProcessBuilder(new String[] {"/bin/sh", cmd, serverSpace.Address, serverGroup.ScriptName, serverGroup.Prefix + "-" + serverNum, "1", serverSpace.US ? "us" : "eu"}).start();
|
||||
process.waitFor();
|
||||
process.wait(3000);
|
||||
BufferedReader reader=new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line = reader.readLine();
|
||||
|
||||
|
@ -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;
|
||||
@ -616,7 +617,7 @@ public class HideSeek extends TeamGame
|
||||
|
||||
_arrowHits.put(player, count);
|
||||
|
||||
if (count == 3)
|
||||
if (count == 4)
|
||||
{
|
||||
player.getInventory().remove(Material.WOOD_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_AXE, (byte)1, 1, C.cGreen + "Super Axe"));
|
||||
@ -627,7 +628,7 @@ public class HideSeek extends TeamGame
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Super Axe") + "!"));
|
||||
}
|
||||
else if (count == 6)
|
||||
else if (count == 8)
|
||||
{
|
||||
player.getInventory().remove(Material.STONE_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)1, 1, C.cGreen + "Ultra Axe"));
|
||||
@ -638,7 +639,7 @@ public class HideSeek extends TeamGame
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Ultra Axe") + "!"));
|
||||
}
|
||||
else if (count == 9)
|
||||
else if (count == 12)
|
||||
{
|
||||
player.getInventory().remove(Material.IRON_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)1, 1, C.cGreen + "Hyper Axe"));
|
||||
@ -649,7 +650,7 @@ public class HideSeek extends TeamGame
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Hyper Axe") + "!"));
|
||||
}
|
||||
else if (count < 9)
|
||||
else if (count < 12)
|
||||
{
|
||||
//Sound
|
||||
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 1f, 1f);
|
||||
@ -673,7 +674,7 @@ public class HideSeek extends TeamGame
|
||||
if (!_hiders.HasPlayer(player))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, "Axe Boost", 10000, true))
|
||||
if (!Recharge.Instance.use(player, "Axe Boost", 16000, true))
|
||||
return;
|
||||
|
||||
if (UtilGear.isMat(player.getItemInHand(), Material.WOOD_AXE))
|
||||
@ -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)
|
||||
|
@ -42,7 +42,7 @@ public class CreatureForm extends Form
|
||||
|
||||
_disguise.setSoundDisguise(new DisguiseCat(Player));
|
||||
Host.Manager.GetDisguise().disguise(_disguise);
|
||||
|
||||
|
||||
((CraftEntity)Player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0));
|
||||
|
||||
//Inform
|
||||
|
@ -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<Entry<Integer, Integer>> _spreadTypeBlocks;
|
||||
private Location _spreadSafe = null;
|
||||
private HashMap<Player, Long> _redOutTime = new HashMap<Player, Long>();
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class PerkShockingStrike extends Perk
|
||||
return;
|
||||
|
||||
Manager.GetCondition().Factory().Slow(GetName(), event.GetDamageeEntity(), damager, 2, 1, false, false, false, false);
|
||||
Manager.GetCondition().Factory().Blind(GetName(), event.GetDamageeEntity(), damager, 1.5, 1, false, false, false);
|
||||
Manager.GetCondition().Factory().Blind(GetName(), event.GetDamageeEntity(), damager, 1, 0, false, false, false);
|
||||
Manager.GetCondition().Factory().Shock(GetName(), event.GetDamageeEntity(), damager, 1, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -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 && game.GetType() != GameType.HungerGames) // XXX REMOVE HG
|
||||
{
|
||||
game.Announce(C.cWhite + C.Bold + game.GetName() + " ended, not enough players!");
|
||||
game.SetState(GameState.Dead);
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user