Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
39384470e7
@ -288,11 +288,6 @@ public class AntiHack extends MiniPlugin
|
||||
public void sendReport(Player player, String report, String severity)
|
||||
{
|
||||
//XXX Send to Database for Staff
|
||||
|
||||
if (severity.equals("Extreme"))
|
||||
{
|
||||
Punish.AddPunishment(player.getName(), Category.Hacking, report, null, 1, true, 86400000);
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetAll(Player player)
|
||||
|
@ -37,6 +37,7 @@ public class Explosion extends MiniPlugin
|
||||
private boolean _regenerateGround = false;
|
||||
private boolean _temporaryDebris = true;
|
||||
private boolean _enableDebris = false;
|
||||
private boolean _tntSpread = true;
|
||||
private HashSet<FallingBlock> _explosionBlocks = new HashSet<FallingBlock>();
|
||||
|
||||
private BlockRestore _blockRestore;
|
||||
@ -139,7 +140,7 @@ public class Explosion extends MiniPlugin
|
||||
continue;
|
||||
|
||||
//TNT
|
||||
if (blocks.get(cur).getKey() == 46)
|
||||
if (_tntSpread && blocks.get(cur).getKey() == 46)
|
||||
{
|
||||
TNTPrimed ent = cur.getWorld().spawn(cur.getLocation().add(0.5, 0.5, 0.5), TNTPrimed.class);
|
||||
Vector vec = UtilAlg.getTrajectory(fEnt, ent);
|
||||
@ -258,14 +259,19 @@ public class Explosion extends MiniPlugin
|
||||
_regenerateGround = regenerate;
|
||||
}
|
||||
|
||||
public void SetDebris(boolean debris)
|
||||
public void SetDebris(boolean value)
|
||||
{
|
||||
_enableDebris = debris;
|
||||
_enableDebris = value;
|
||||
}
|
||||
|
||||
public void SetTNTSpread(boolean value)
|
||||
{
|
||||
_tntSpread = value;
|
||||
}
|
||||
|
||||
public void SetTemporaryDebris(boolean enabled)
|
||||
public void SetTemporaryDebris(boolean value)
|
||||
{
|
||||
_temporaryDebris = enabled;
|
||||
_temporaryDebris = value;
|
||||
}
|
||||
|
||||
public HashSet<FallingBlock> GetExplosionBlocks()
|
||||
|
@ -14,7 +14,7 @@ public enum GameType
|
||||
Dragons("Dragons"),
|
||||
Evolution("Evolution"),
|
||||
Halloween("Halloween Horror"),
|
||||
HideSeek("Hide and Seek"),
|
||||
HideSeek("Block Hunt"),
|
||||
Horse("Horseback"),
|
||||
HungerGames("Hunger Games"),
|
||||
MineWare("MineWare"),
|
||||
|
@ -47,11 +47,11 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
@ -84,7 +84,7 @@ public class HideSeek extends TeamGame
|
||||
private GameTeam _seekers;
|
||||
|
||||
private long _hideTime = 20000;
|
||||
private long _gameTime = 300000;
|
||||
private long _gameTime = 360000;
|
||||
|
||||
private boolean _started = false;
|
||||
|
||||
@ -103,13 +103,13 @@ public class HideSeek extends TeamGame
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new NullKit(manager),
|
||||
//new KitHiderSwapper(manager),
|
||||
new KitHiderSwapper(manager),
|
||||
new KitHiderQuick(manager),
|
||||
new KitHiderShocker(manager),
|
||||
new NullKit(manager),
|
||||
new KitSeekerLeaper(manager),
|
||||
new KitSeekerTNT(manager),
|
||||
new KitSeekerHunter(manager),
|
||||
new KitSeekerRadar(manager),
|
||||
},
|
||||
|
||||
new String[]
|
||||
@ -145,6 +145,7 @@ public class HideSeek extends TeamGame
|
||||
_allowedEnts.add(EntityType.SHEEP);
|
||||
|
||||
Manager.GetExplosion().SetRegenerate(true);
|
||||
Manager.GetExplosion().SetTNTSpread(false);
|
||||
}
|
||||
|
||||
public Material GetItemEquivilent(Material mat)
|
||||
@ -183,8 +184,6 @@ public class HideSeek extends TeamGame
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void CustomTeamGeneration(GameStateChangeEvent event)
|
||||
{
|
||||
@ -197,7 +196,7 @@ public class HideSeek extends TeamGame
|
||||
|
||||
_seekers = GetTeamList().get(1);
|
||||
_seekers.SetColor(ChatColor.RED);
|
||||
_seekers.SetName("Seekers");
|
||||
_seekers.SetName("Hunters");
|
||||
|
||||
RestrictKits();
|
||||
}
|
||||
@ -216,7 +215,7 @@ public class HideSeek extends TeamGame
|
||||
}
|
||||
else
|
||||
{
|
||||
if (kit.GetName().contains("Seeker"))
|
||||
if (kit.GetName().contains("Hunter"))
|
||||
team.GetRestrictedKits().add(kit);
|
||||
}
|
||||
}
|
||||
@ -254,7 +253,7 @@ public class HideSeek extends TeamGame
|
||||
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.WOOD_AXE, (byte)1, 1, C.cGreen + "Speed Axe"));
|
||||
|
||||
//Bow
|
||||
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, C.cYellow + C.Bold + "Shoot Seekers" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Upgrades Axe");
|
||||
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, C.cYellow + C.Bold + "Shoot Hunters" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Upgrades Axe");
|
||||
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
player.getInventory().setItem(1, bow);
|
||||
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
@ -305,10 +304,11 @@ 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;
|
||||
|
||||
//UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
|
||||
if (!(GetKit(player) instanceof KitHiderSwapper))
|
||||
UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
|
||||
|
||||
//Remove Old
|
||||
_forms.get(player).Remove();
|
||||
@ -334,10 +334,11 @@ 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;
|
||||
|
||||
//UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
|
||||
if (!(GetKit(player) instanceof KitHiderSwapper))
|
||||
UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
|
||||
|
||||
//Remove Old
|
||||
_forms.get(player).Remove();
|
||||
@ -345,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)
|
||||
@ -505,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();
|
||||
@ -559,6 +588,12 @@ public class HideSeek extends TeamGame
|
||||
|
||||
if (event.GetProjectile() == null)
|
||||
return;
|
||||
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
if (!_seekers.HasPlayer(damagee))
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(true);
|
||||
if (damager == null) return;
|
||||
@ -581,7 +616,7 @@ public class HideSeek extends TeamGame
|
||||
|
||||
_arrowHits.put(player, count);
|
||||
|
||||
if (count == 2)
|
||||
if (count == 3)
|
||||
{
|
||||
player.getInventory().remove(Material.WOOD_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_AXE, (byte)1, 1, C.cGreen + "Super Axe"));
|
||||
@ -592,7 +627,7 @@ public class HideSeek extends TeamGame
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Super Axe") + "!"));
|
||||
}
|
||||
else if (count == 4)
|
||||
else if (count == 6)
|
||||
{
|
||||
player.getInventory().remove(Material.STONE_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)1, 1, C.cGreen + "Ultra Axe"));
|
||||
@ -603,7 +638,7 @@ public class HideSeek extends TeamGame
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Ultra Axe") + "!"));
|
||||
}
|
||||
else if (count == 6)
|
||||
else if (count == 9)
|
||||
{
|
||||
player.getInventory().remove(Material.IRON_AXE);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)1, 1, C.cGreen + "Hyper Axe"));
|
||||
@ -634,6 +669,9 @@ public class HideSeek extends TeamGame
|
||||
|
||||
if (!player.getItemInHand().getType().toString().contains("_AXE"))
|
||||
return;
|
||||
|
||||
if (!_hiders.HasPlayer(player))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, "Axe Boost", 10000, true))
|
||||
return;
|
||||
@ -786,14 +824,14 @@ public class HideSeek extends TeamGame
|
||||
AddGems(player, 10, "Forced Seeker", false);
|
||||
|
||||
Announce(F.main("Game", F.elem(_hiders.GetColor() + player.getName()) + " was moved to " +
|
||||
F.elem(C.cRed + C.Bold + "Seekers") + "."));
|
||||
F.elem(C.cRed + C.Bold + "Hunters") + "."));
|
||||
|
||||
player.getWorld().strikeLightningEffect(player.getLocation());
|
||||
|
||||
player.damage(1000);
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "You are now a Seeker!");
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "You are now a Hunter!");
|
||||
|
||||
player.eject();
|
||||
player.leaveVehicle();
|
||||
@ -869,7 +907,7 @@ public class HideSeek extends TeamGame
|
||||
for (Location loc : WorldData.GetDataLocs("BLACK"))
|
||||
loc.getBlock().setType(Material.AIR);
|
||||
|
||||
Announce(C.cRed + C.Bold + "The Seekers have been released!");
|
||||
Announce(C.cRed + C.Bold + "The Hunters have been released!");
|
||||
}
|
||||
}
|
||||
//Seek Time
|
||||
@ -880,13 +918,13 @@ public class HideSeek extends TeamGame
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lSeek Time: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lSeek Time: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(0));
|
||||
|
||||
SetState(GameState.End);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@ -34,7 +33,7 @@ public class KitHiderQuick extends Kit
|
||||
|
||||
},
|
||||
EntityType.SLIME,
|
||||
new ItemStack(Material.IRON_BOOTS));
|
||||
new ItemStack(Material.FEATHER));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -51,10 +50,10 @@ public class KitHiderQuick extends Kit
|
||||
|
||||
DisguiseSlime slime = new DisguiseSlime(ent);
|
||||
slime.SetSize(2);
|
||||
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
|
||||
slime.SetName(GetAvailability().GetColor() + GetName());
|
||||
slime.SetCustomNameVisible(true);
|
||||
|
||||
DisguiseBlock block = new DisguiseBlock(ent, 20, 0);
|
||||
DisguiseBlock block = new DisguiseBlock(ent, 46, 0);
|
||||
|
||||
ToBlock(block, slime);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@ -51,10 +50,10 @@ public class KitHiderShocker extends Kit
|
||||
|
||||
DisguiseSlime slime = new DisguiseSlime(ent);
|
||||
slime.SetSize(2);
|
||||
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
|
||||
slime.SetName(GetAvailability().GetColor() + GetName());
|
||||
slime.SetCustomNameVisible(true);
|
||||
|
||||
DisguiseBlock block = new DisguiseBlock(ent, 47, 0);
|
||||
DisguiseBlock block = new DisguiseBlock(ent, 61, 0);
|
||||
|
||||
ToBlock(block, slime);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@ -26,7 +25,7 @@ public class KitHiderSwapper extends Kit
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Can change form up to 24 times!"
|
||||
"Can change form unlimited times!"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
@ -50,7 +49,7 @@ public class KitHiderSwapper extends Kit
|
||||
|
||||
DisguiseSlime slime = new DisguiseSlime(ent);
|
||||
slime.SetSize(2);
|
||||
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
|
||||
slime.SetName(GetAvailability().GetColor() + GetName());
|
||||
slime.SetCustomNameVisible(true);
|
||||
|
||||
ToBlock(ent, slime);
|
||||
|
@ -0,0 +1,81 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.perks.PerkLeap;
|
||||
|
||||
public class KitSeekerLeaper extends Kit
|
||||
{
|
||||
public KitSeekerLeaper(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Leaper Hunter", KitAvailability.Free,
|
||||
new String[]
|
||||
{
|
||||
"Leap after those pretty blocks!",
|
||||
},
|
||||
new Perk[]
|
||||
{
|
||||
new PerkLeap("Leap", 1.1, 1, 8000),
|
||||
},
|
||||
EntityType.ZOMBIE,
|
||||
new ItemStack(Material.COMPASS));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
//Sword
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE));
|
||||
|
||||
//Bow
|
||||
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW);
|
||||
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
player.getInventory().setItem(1, bow);
|
||||
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
|
||||
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.IRON_HELMET));
|
||||
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.IRON_CHESTPLATE));
|
||||
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.IRON_LEGGINGS));
|
||||
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SpawnCustom(LivingEntity ent)
|
||||
{
|
||||
ent.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));
|
||||
ent.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));
|
||||
ent.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));
|
||||
ent.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_EXPLOSION)
|
||||
return;
|
||||
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
if (HasKit(damagee))
|
||||
event.SetCancelled("TNT Resistant");
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -15,33 +16,39 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.perks.PerkFletcher;
|
||||
import nautilus.game.arcade.kit.perks.PerkRadar;
|
||||
|
||||
public class KitSeekerHunter extends Kit
|
||||
public class KitSeekerRadar extends Kit
|
||||
{
|
||||
public KitSeekerHunter(ArcadeManager manager)
|
||||
public KitSeekerRadar(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Hunter Seeker", KitAvailability.Blue,
|
||||
super(manager, "Radar Hunter", KitAvailability.Blue,
|
||||
new String[]
|
||||
{
|
||||
"Tick......tick...tick.tick.",
|
||||
"tick......tick...tick.tick.",
|
||||
},
|
||||
new Perk[]
|
||||
{
|
||||
new PerkRadar(),
|
||||
new PerkFletcher(2, 4, false),
|
||||
},
|
||||
EntityType.ZOMBIE,
|
||||
new ItemStack(Material.BOW));
|
||||
new ItemStack(Material.COMPASS));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
//Sword
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOD_SWORD));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
|
||||
|
||||
//Bow
|
||||
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW);
|
||||
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
player.getInventory().setItem(1, bow);
|
||||
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
|
||||
//Radar
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COMPASS, (byte)0, 1, "Radar Scanner"));
|
||||
|
||||
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_HELMET));
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.hideseek.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -21,7 +22,7 @@ public class KitSeekerTNT extends Kit
|
||||
{
|
||||
public KitSeekerTNT(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Bomber Seeker", KitAvailability.Free,
|
||||
super(manager, "TNT Hunter", KitAvailability.Green,
|
||||
|
||||
new String[]
|
||||
{
|
||||
@ -39,8 +40,15 @@ public class KitSeekerTNT extends Kit
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
//Sword
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD));
|
||||
|
||||
//Bow
|
||||
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW);
|
||||
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
player.getInventory().setItem(1, bow);
|
||||
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
|
||||
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.GOLD_HELMET));
|
||||
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.GOLD_CHESTPLATE));
|
||||
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.GOLD_LEGGINGS));
|
||||
|
@ -337,13 +337,13 @@ public class HungerGames extends SoloGame
|
||||
for (int x=WorldData.MinX ; x<=WorldData.MaxX ; x++)
|
||||
{
|
||||
block = WorldData.World.getHighestBlockAt(x, WorldData.MinZ);
|
||||
while (!UtilBlock.solid(block) && block.getY() > 0)
|
||||
while (!UtilBlock.solid(block) && !block.isLiquid() && block.getY() > 0)
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
if (block.getY() > 0)
|
||||
_redLocations.add(block.getLocation());
|
||||
|
||||
block = WorldData.World.getHighestBlockAt(x, WorldData.MaxZ);
|
||||
while (!UtilBlock.solid(block) && block.getY() > 0)
|
||||
while (!UtilBlock.solid(block) && !block.isLiquid() && block.getY() > 0)
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
if (block.getY() > 0)
|
||||
_redLocations.add(block.getLocation());
|
||||
@ -352,13 +352,13 @@ public class HungerGames extends SoloGame
|
||||
for (int z=WorldData.MinZ ; z<=WorldData.MaxZ ; z++)
|
||||
{
|
||||
block = WorldData.World.getHighestBlockAt(WorldData.MinX, z);
|
||||
while (!UtilBlock.solid(block) && block.getY() > 0)
|
||||
while (!UtilBlock.solid(block) && !block.isLiquid() && block.getY() > 0)
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
if (block.getY() > 0)
|
||||
_redLocations.add(block.getLocation());
|
||||
|
||||
block = WorldData.World.getHighestBlockAt(WorldData.MaxX, z);
|
||||
while (!UtilBlock.solid(block) && block.getY() > 0)
|
||||
while (!UtilBlock.solid(block) && !block.isLiquid() && block.getY() > 0)
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
if (block.getY() > 0)
|
||||
_redLocations.add(block.getLocation());
|
||||
@ -377,7 +377,7 @@ public class HungerGames extends SoloGame
|
||||
if (_redLocations.isEmpty())
|
||||
return;
|
||||
|
||||
int max = Math.max(5, Math.min(40, _redLocations.size()/100));
|
||||
int max = Math.max(5, Math.min(100, _redLocations.size()/100));
|
||||
|
||||
for (int i=0 ; i<max ; i++)
|
||||
{
|
||||
@ -510,10 +510,10 @@ public class HungerGames extends SoloGame
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (player.getLocation().getChunk().getX() - loc.getChunk().getX() > 6)
|
||||
if (player.getLocation().getChunk().getX() - loc.getChunk().getX() > UtilServer.getServer().getViewDistance())
|
||||
continue;
|
||||
|
||||
if (player.getLocation().getChunk().getZ() - loc.getChunk().getZ() > 6)
|
||||
if (player.getLocation().getChunk().getZ() - loc.getChunk().getZ() > UtilServer.getServer().getViewDistance())
|
||||
continue;
|
||||
|
||||
player.sendBlockChange(loc, id, data);
|
||||
|
@ -72,6 +72,8 @@ public class PerkRadar extends Perk
|
||||
Recharge.Instance.useForce(player, "Radar", (long)(2000 * scale));
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.NOTE_STICKS, 1f, (float)(2 - 1*scale));
|
||||
|
||||
player.setCompassTarget(player.getLocation().add(Math.random()*10 - 5, 0, Math.random()*10 - 5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
@ -59,11 +61,9 @@ public class PerkSmokebomb extends Perk
|
||||
Manager.GetCondition().Factory().Blind(GetName(), player, player, 2, 0, false, false, true);
|
||||
}
|
||||
|
||||
for (int i=0 ; i<3 ; i++)
|
||||
{
|
||||
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 2f, 0.5f);
|
||||
player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, 80);
|
||||
}
|
||||
//Effects
|
||||
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 2f, 0.5f);
|
||||
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, player.getLocation(), 0f, 0f, 0f, 0, 1);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));
|
||||
|
@ -144,6 +144,7 @@ public class GameCreationManager implements Listener
|
||||
Manager.GetCreature().SetDisableCustomDrops(false);
|
||||
Manager.GetDamage().SetEnabled(true);
|
||||
Manager.GetExplosion().SetRegenerate(false);
|
||||
Manager.GetExplosion().SetTNTSpread(true);
|
||||
|
||||
HashMap<String, ChatColor> pastTeams = null;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -993,19 +993,16 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
||||
|
||||
if (client.GetRank().Has(Rank.ULTRA) || donor.OwnsUnknownPackage(game.GetName() + " " + ent.GetKit().GetName()) || donor.OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA") || ent.GetKit().GetAvailability() == KitAvailability.Free)
|
||||
{
|
||||
entityName = ChatColor.GREEN + entityName;
|
||||
entityName = ent.GetKit().GetAvailability().GetColor() + entityName;
|
||||
}
|
||||
else
|
||||
{
|
||||
entityName = ChatColor.RED + entityName;
|
||||
entityName = ChatColor.RED + C.Bold + entityName;
|
||||
|
||||
if (ent.GetKit().GetAvailability() != KitAvailability.Blue)
|
||||
entityName += ChatColor.WHITE + " (" + ChatColor.GREEN + ent.GetKit().GetCost() + " Gems" + ChatColor.WHITE + ")";
|
||||
}
|
||||
|
||||
if (ent.GetKit().GetAvailability() == KitAvailability.Blue)
|
||||
{
|
||||
entityName += ChatColor.WHITE + " (" + ChatColor.AQUA + "Ultra" + ChatColor.WHITE + ")";
|
||||
entityName += ChatColor.RESET + " " + ChatColor.WHITE + C.Line + "Gem Locked";
|
||||
else
|
||||
entityName += ChatColor.RESET + " " + ChatColor.WHITE + C.Line + "Ultra Locked";
|
||||
}
|
||||
|
||||
return entityName;
|
||||
|
Loading…
Reference in New Issue
Block a user