Bridges scoreboard fix
SG balance DONT QUIT msg improvement
This commit is contained in:
parent
3f2b7444a3
commit
46dfb532fb
@ -1219,6 +1219,9 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
//Display Individual Players
|
||||
if (this.GetPlayers(true).size() < 10)
|
||||
{
|
||||
if (!team.IsTeamAlive())
|
||||
continue;
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
for (Player player : team.GetPlayers(true))
|
||||
@ -1228,7 +1231,7 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
}
|
||||
|
||||
//Display Players Alive
|
||||
else
|
||||
else
|
||||
{
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(team.GetColor() + team.GetName() + " Team");
|
||||
|
@ -1478,16 +1478,16 @@ public class SurvivalGames extends SoloGame
|
||||
if (!(event.getEntity() instanceof Fireball))
|
||||
return;
|
||||
|
||||
Collection<Block> blocks = UtilBlock.getInRadius(event.getEntity().getLocation(), 2).keySet();
|
||||
Collection<Block> blocks = UtilBlock.getInRadius(event.getEntity().getLocation(), 2.4).keySet();
|
||||
|
||||
|
||||
Iterator<Block> blockIter = blocks.iterator();
|
||||
while (blockIter.hasNext())
|
||||
{
|
||||
Block block = blockIter.next();
|
||||
|
||||
block.setType(Material.NETHERRACK);
|
||||
|
||||
// Iterator<Block> blockIter = blocks.iterator();
|
||||
// while (blockIter.hasNext())
|
||||
// {
|
||||
// Block block = blockIter.next();
|
||||
//
|
||||
// block.setType(Material.NETHERRACK);
|
||||
//
|
||||
// //Dont destroy above hollow ground
|
||||
//
|
||||
// if (!UtilBlock.solid(block.getRelative(BlockFace.DOWN)))
|
||||
@ -1510,9 +1510,9 @@ public class SurvivalGames extends SoloGame
|
||||
// //Stable!
|
||||
// if (stableSides >= 3)
|
||||
// blockIter.remove();
|
||||
}
|
||||
// }
|
||||
|
||||
//Manager.GetExplosion().BlockExplosion(blocks, event.getEntity().getLocation(), false);
|
||||
Manager.GetExplosion().BlockExplosion(blocks, event.getEntity().getLocation(), false);
|
||||
}
|
||||
|
||||
public boolean isStableBlock(Block block)
|
||||
@ -1870,16 +1870,11 @@ public class SurvivalGames extends SoloGame
|
||||
_baseLoot.registerLoot(new RandomItem(Material.BAKED_POTATO, 30, 1, 3));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.COOKED_BEEF, 30, 1, 2));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.COOKED_CHICKEN, 30, 1, 2));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.RAW_FISH, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.RAW_BEEF, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.RAW_CHICKEN, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.POTATO_ITEM, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.CARROT_ITEM, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.RED_MUSHROOM, 15, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.BROWN_MUSHROOM, 15, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.CARROT_ITEM, 30, 1, 3));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.MUSHROOM_SOUP, 15, 1, 1));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.WHEAT, 30, 1, 6));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.APPLE, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.PORK, 30, 1, 5));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.APPLE, 30, 1, 4));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.PORK, 30, 1, 4));
|
||||
_baseLoot.registerLoot(new RandomItem(Material.ROTTEN_FLESH, 40, 1, 6));
|
||||
|
||||
// Weapons
|
||||
@ -1927,6 +1922,7 @@ public class SurvivalGames extends SoloGame
|
||||
// Food
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.BAKED_POTATO, 30, 1, 5));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.CAKE, 30));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.MUSHROOM_SOUP, 30, 1, 1));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.COOKED_BEEF, 30, 1, 3));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.COOKED_CHICKEN, 30, 1, 3));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.COOKED_FISH, 30, 1, 6));
|
||||
@ -1936,9 +1932,6 @@ public class SurvivalGames extends SoloGame
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.APPLE, 30, 2, 6));
|
||||
|
||||
// Loot for chests in spawn
|
||||
// Random bowl
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.BOWL, 30, 1, 2));
|
||||
|
||||
// Weaponry and ores
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.STONE_SWORD, 30));
|
||||
_spawnLoot.registerLoot(new RandomItem(Material.IRON_AXE, 30));
|
||||
@ -2196,7 +2189,7 @@ public class SurvivalGames extends SoloGame
|
||||
TNTPrimed tnt = player.getWorld()
|
||||
.spawn(player.getEyeLocation().add(player.getLocation().getDirection()), TNTPrimed.class);
|
||||
|
||||
tnt.setFuseTicks(50);
|
||||
tnt.setFuseTicks(60);
|
||||
|
||||
UtilAction.velocity(tnt, player.getLocation().getDirection(), 0.5, false, 0, 0.1, 10, false);
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class PerkBladeVortex extends Perk
|
||||
if (!Kit.HasKit(player))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), 24000, true, true))
|
||||
if (!Recharge.Instance.use(player, GetName(), 16000, true, true))
|
||||
return;
|
||||
|
||||
Recharge.Instance.setDisplayForce(player, GetName(), true);
|
||||
|
@ -42,7 +42,7 @@ public class PerkHiltSmash extends Perk
|
||||
return false;
|
||||
|
||||
//Check Energy/Recharge
|
||||
if (!Recharge.Instance.use(player, GetName(), 6000, true, true))
|
||||
if (!Recharge.Instance.use(player, GetName(), 10000, true, true))
|
||||
return false;
|
||||
|
||||
//Allow
|
||||
|
@ -22,6 +22,7 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -30,7 +31,8 @@ import nautilus.game.arcade.kit.Perk;
|
||||
public class PerkHorsePet extends Perk
|
||||
{
|
||||
private HashMap<Player, Horse> _horseMap = new HashMap<Player, Horse>();
|
||||
|
||||
private HashMap<Player, Long> _deathTime = new HashMap<Player, Long>();
|
||||
|
||||
public PerkHorsePet()
|
||||
{
|
||||
super("Horse Master", new String[]
|
||||
@ -41,6 +43,11 @@ public class PerkHorsePet extends Perk
|
||||
|
||||
@Override
|
||||
public void Apply(Player player)
|
||||
{
|
||||
spawnHorse(player, false);
|
||||
}
|
||||
|
||||
public void spawnHorse(Player player, boolean baby)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
@ -55,14 +62,14 @@ public class PerkHorsePet extends Perk
|
||||
horse.setMaxDomestication(1);
|
||||
horse.setJumpStrength(1);
|
||||
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE));
|
||||
horse.setBaby();
|
||||
horse.setAgeLock(true);
|
||||
horse.setMaxHealth(40);
|
||||
horse.setHealth(40);
|
||||
|
||||
UtilEnt.Vegetate(horse);
|
||||
|
||||
_horseMap.put(player, horse);
|
||||
|
||||
horse.getWorld().playSound(horse.getLocation(), Sound.HORSE_ANGRY, 2f, 1f);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -71,6 +78,20 @@ public class PerkHorsePet extends Perk
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
//Respawn
|
||||
Iterator<Player> respawnIterator = _deathTime.keySet().iterator();
|
||||
while (respawnIterator.hasNext())
|
||||
{
|
||||
Player player = respawnIterator.next();
|
||||
|
||||
if (UtilTime.elapsed(_deathTime.get(player), 15000))
|
||||
{
|
||||
respawnIterator.remove();
|
||||
spawnHorse(player, true);
|
||||
}
|
||||
}
|
||||
|
||||
//Update
|
||||
Iterator<Player> playerIterator = _horseMap.keySet().iterator();
|
||||
while (playerIterator.hasNext())
|
||||
{
|
||||
@ -78,9 +99,10 @@ public class PerkHorsePet extends Perk
|
||||
Horse horse = _horseMap.get(player);
|
||||
|
||||
//Dead
|
||||
if (!horse.isValid())
|
||||
if (!horse.isValid() || horse.isDead())
|
||||
{
|
||||
horse.getWorld().playSound(horse.getLocation(), Sound.HORSE_DEATH, 1f, 1f);
|
||||
_deathTime.put(player, System.currentTimeMillis());
|
||||
playerIterator.remove();
|
||||
continue;
|
||||
}
|
||||
@ -88,13 +110,19 @@ public class PerkHorsePet extends Perk
|
||||
//Return to Owner
|
||||
if (UtilMath.offset(horse, player) > 3)
|
||||
{
|
||||
if (UtilMath.offset(horse, player) > 24)
|
||||
{
|
||||
horse.teleport(player);
|
||||
continue;
|
||||
}
|
||||
|
||||
float speed = Math.min(1f, (float)(UtilMath.offset(horse, player) - 5) / 8f);
|
||||
|
||||
UtilEnt.CreatureMove(horse, player.getLocation().add(UtilAlg.getTrajectory(player, horse).multiply(2.5)), 1f + speed);
|
||||
}
|
||||
|
||||
//Age
|
||||
if (horse.getTicksLived() > 1200 && !horse.isAdult())
|
||||
if (horse.getTicksLived() > 900 && !horse.isAdult())
|
||||
{
|
||||
horse.setAdult();
|
||||
horse.getWorld().playSound(horse.getLocation(), Sound.HORSE_ANGRY, 2f, 1f);
|
||||
@ -153,7 +181,7 @@ public class PerkHorsePet extends Perk
|
||||
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent((Player)ent, event.GetDamagerEntity(true), event.GetProjectile(),
|
||||
event.GetCause(), event.GetDamage(), true, false, false,
|
||||
event.GetCause(), event.GetDamage() * 0.25, true, false, false,
|
||||
UtilEnt.getName(event.GetDamagerEntity(true)), event.GetReason());
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class PerkSeismicSlamHG extends Perk
|
||||
//Velocity
|
||||
UtilAction.velocity(cur,
|
||||
UtilAlg.getTrajectory2d(player.getLocation().toVector(), cur.getLocation().toVector()),
|
||||
1.8 * targets.get(cur), true, 0, 0.4 + 1.0 * targets.get(cur), 1.4, true);
|
||||
2.2 * targets.get(cur), true, 0, 0.3 + 0.9 * targets.get(cur), 1.2, true);
|
||||
|
||||
//Condition
|
||||
Manager.GetCondition().Factory().Falling(GetName(), cur, player, 10, false, true);
|
||||
|
@ -12,6 +12,7 @@ import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.teleport.event.MineplexTeleportEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -1073,7 +1074,7 @@ public class GameFlagManager implements Listener
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.SLOWER)
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
if (Manager.GetGame().GetType() == GameType.MineStrike)
|
||||
@ -1084,9 +1085,12 @@ public class GameFlagManager implements Listener
|
||||
if (Manager.IsAlive(player))
|
||||
continue;
|
||||
|
||||
UtilPlayer.message(player, " ");
|
||||
UtilPlayer.message(player, C.cWhite + C.Bold + "You are out of the game, but " + C.cGold + C.Bold + "DON'T QUIT" + C.cWhite + C.Bold + "!");
|
||||
UtilPlayer.message(player, C.cWhite + C.Bold + "The next game will be starting soon...");
|
||||
if (Recharge.Instance.use(player, "Dont Quit Message", 30000, false, false))
|
||||
{
|
||||
UtilPlayer.message(player, " ");
|
||||
UtilPlayer.message(player, C.cWhite + C.Bold + "You are out of the game, but " + C.cGold + C.Bold + "DON'T QUIT" + C.cWhite + C.Bold + "!");
|
||||
UtilPlayer.message(player, C.cWhite + C.Bold + "The next game will be starting soon...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user