BH Updates
This commit is contained in:
parent
29ce493f64
commit
2e6758e23c
@ -304,7 +304,7 @@ public class HideSeek extends TeamGame
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, "Change Form", 2000, true))
|
||||
if (!Recharge.Instance.use(player, "Change Form", 6000, true))
|
||||
return;
|
||||
|
||||
if (!(GetKit(player) instanceof KitHiderSwapper))
|
||||
@ -334,7 +334,7 @@ public class HideSeek extends TeamGame
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, "Change Form", 2000, true))
|
||||
if (!Recharge.Instance.use(player, "Change Form", 6000, true))
|
||||
return;
|
||||
|
||||
if (!(GetKit(player) instanceof KitHiderSwapper))
|
||||
@ -346,6 +346,34 @@ public class HideSeek extends TeamGame
|
||||
//Set New
|
||||
_forms.put(player, new CreatureForm(this, player, event.getRightClicked().getType()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ChangeDisguise(CustomDamageEvent event)
|
||||
{
|
||||
Player player = event.GetDamagerPlayer(false);
|
||||
if (player == null) return;
|
||||
|
||||
if (!UtilGear.isMat(player.getItemInHand(), Material.SLIME_BALL))
|
||||
return;
|
||||
|
||||
if (!_allowedEnts.contains(event.GetDamageeEntity().getType()))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", "You cannot morph into " + F.elem(UtilEnt.getName(event.GetDamageeEntity())) + "."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, "Change Form", 6000, true))
|
||||
return;
|
||||
|
||||
if (!(GetKit(player) instanceof KitHiderSwapper))
|
||||
UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
|
||||
|
||||
//Remove Old
|
||||
_forms.get(player).Remove();
|
||||
|
||||
//Set New
|
||||
_forms.put(player, new CreatureForm(this, player, event.GetDamageeEntity().getType()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void FallingBlockBreak(ItemSpawnEvent event)
|
||||
@ -506,10 +534,10 @@ public class HideSeek extends TeamGame
|
||||
|
||||
for (Creature ent : _mobs.keySet())
|
||||
{
|
||||
if (UtilMath.offset(ent.getLocation(), _mobs.get(ent)) < 8)
|
||||
if (UtilMath.offset(ent.getLocation(), _mobs.get(ent)) < 5)
|
||||
continue;
|
||||
|
||||
Location loc = _mobs.get(ent).add(UtilAlg.getTrajectory(_mobs.get(ent), ent.getLocation()).multiply(Math.random() * 6));
|
||||
Location loc = _mobs.get(ent).add(UtilAlg.getTrajectory(_mobs.get(ent), ent.getLocation()).multiply(Math.random() * 3));
|
||||
|
||||
EntityCreature ec = ((CraftCreature)ent).getHandle();
|
||||
Navigation nav = ec.getNavigation();
|
||||
|
@ -696,9 +696,12 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "WARNING: " + C.cWhite + C.Bold +"RETURN TO PLAYABLE AREA!");
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "WARNING: " + C.cWhite + C.Bold + "RETURN TO PLAYABLE AREA!");
|
||||
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory2d(player.getLocation(), game.GetSpectatorLocation()), 1, true, 0.4, 0, 10, true);
|
||||
if (player.getLocation().getY() > game.WorldData.MaxY)
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory2d(player.getLocation(), game.GetSpectatorLocation()), 1, true, 0, 0, 10, true);
|
||||
else
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory2d(player.getLocation(), game.GetSpectatorLocation()), 1, true, 0.4, 0, 10, true);
|
||||
|
||||
Manager.GetDamage().NewDamageEvent(player, null, null,
|
||||
DamageCause.VOID, 4, false, false, false,
|
||||
|
Loading…
Reference in New Issue
Block a user