Added some things and stuff
This commit is contained in:
parent
0a09ae29f3
commit
616c444c16
|
@ -56,11 +56,16 @@ public class BombLobbers extends TeamGame
|
||||||
new KitWaller(manager)
|
new KitWaller(manager)
|
||||||
}, new String[]
|
}, new String[]
|
||||||
{
|
{
|
||||||
"Throw TNT to blow up your enemies!",
|
"Fight against your enemies using",
|
||||||
"Click with TNT to throw"
|
"the power of explosives!",
|
||||||
|
"",
|
||||||
|
"Left click TNT to throw at your enemy.",
|
||||||
|
"Last team alive wins!",
|
||||||
|
"Kaboom!"
|
||||||
});
|
});
|
||||||
|
|
||||||
DamageSelf = false;
|
DamageSelf = false;
|
||||||
|
DamageTeamSelf = false;
|
||||||
|
|
||||||
WorldWaterDamage = 5;
|
WorldWaterDamage = 5;
|
||||||
|
|
||||||
|
@ -174,7 +179,7 @@ public class BombLobbers extends TeamGame
|
||||||
_throwers.remove(tnt);
|
_throwers.remove(tnt);
|
||||||
_teams.remove(tnt);
|
_teams.remove(tnt);
|
||||||
|
|
||||||
for (Player other : UtilPlayer.getNearby(event.getEntity().getLocation(), 5))
|
for (Player other : UtilPlayer.getNearby(event.getEntity().getLocation(), 14))
|
||||||
{
|
{
|
||||||
Manager.GetCondition().Factory().Explosion("Throwing TNT", other, thrower, 50, 0.1, false, false);
|
Manager.GetCondition().Factory().Explosion("Throwing TNT", other, thrower, 50, 0.1, false, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package nautilus.game.arcade.game.games.lobbers.kits;
|
package nautilus.game.arcade.game.games.lobbers.kits;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.itemstack.ItemBuilder;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.game.games.lobbers.kits.perks.PerkCraftman;
|
import nautilus.game.arcade.game.games.lobbers.kits.perks.PerkCraftman;
|
||||||
|
@ -31,14 +32,23 @@ public class KitArmorer extends Kit
|
||||||
}, EntityType.ZOMBIE,
|
}, EntityType.ZOMBIE,
|
||||||
new ItemStack(Material.AIR));
|
new ItemStack(Material.AIR));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void GiveItems(Player player)
|
public void ApplyKit(Player player)
|
||||||
{
|
{
|
||||||
|
UtilInv.Clear(player);
|
||||||
|
|
||||||
|
for (Perk perk : GetPerks())
|
||||||
|
perk.Apply(player);
|
||||||
|
|
||||||
|
GiveItemsCall(player);
|
||||||
|
|
||||||
player.getInventory().setHelmet(new ItemBuilder(Material.GOLD_HELMET).setUnbreakable(true).build());
|
player.getInventory().setHelmet(new ItemBuilder(Material.GOLD_HELMET).setUnbreakable(true).build());
|
||||||
player.getInventory().setChestplate(new ItemBuilder(Material.GOLD_CHESTPLATE).setUnbreakable(true).build());
|
player.getInventory().setChestplate(new ItemBuilder(Material.GOLD_CHESTPLATE).setUnbreakable(true).build());
|
||||||
player.getInventory().setLeggings(new ItemBuilder(Material.GOLD_LEGGINGS).setUnbreakable(true).build());
|
player.getInventory().setLeggings(new ItemBuilder(Material.GOLD_LEGGINGS).setUnbreakable(true).build());
|
||||||
player.getInventory().setBoots(new ItemBuilder(Material.GOLD_BOOTS).setUnbreakable(true).build());
|
player.getInventory().setBoots(new ItemBuilder(Material.GOLD_BOOTS).setUnbreakable(true).build());
|
||||||
|
|
||||||
|
UtilInv.Update(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,4 +60,10 @@ public class KitArmorer extends Kit
|
||||||
ent.getEquipment().setBoots(new ItemBuilder(Material.GOLD_BOOTS).build());
|
ent.getEquipment().setBoots(new ItemBuilder(Material.GOLD_BOOTS).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void GiveItems(Player player)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package nautilus.game.arcade.game.games.lobbers.kits.perks;
|
package nautilus.game.arcade.game.games.lobbers.kits.perks;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
|
@ -75,7 +76,9 @@ public class PerkWaller extends Perk
|
||||||
if (!UtilInv.IsItem(event.getItem(), Material.STONE_SPADE, (byte) 0))
|
if (!UtilInv.IsItem(event.getItem(), Material.STONE_SPADE, (byte) 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw(), getFace(event.getPlayer().getLocation().getYaw())));
|
UtilInv.remove(event.getPlayer(), Material.STONE_SPADE, (byte) 0, 1);
|
||||||
|
|
||||||
|
_wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
|
@ -85,13 +88,18 @@ public class PerkWaller extends Perk
|
||||||
if (!Manager.GetGame().IsLive())
|
if (!Manager.GetGame().IsLive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Block block : event.GetBlocks())
|
Iterator<Block> iterator = event.GetBlocks().iterator();
|
||||||
|
|
||||||
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
|
Block block = iterator.next();
|
||||||
|
|
||||||
if (_wallBlocks.contains(block.getLocation()))
|
if (_wallBlocks.contains(block.getLocation()))
|
||||||
{
|
{
|
||||||
if (block.getData() != 2)
|
if (block.getData() != 2)
|
||||||
{
|
{
|
||||||
block.setData((byte) 2);
|
block.setData((byte) 2);
|
||||||
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +116,7 @@ public class PerkWaller extends Perk
|
||||||
|
|
||||||
for (TNTPrimed tnt : _tnt)
|
for (TNTPrimed tnt : _tnt)
|
||||||
{
|
{
|
||||||
for (Block near : UtilBlock.getInRadius(tnt.getLocation(), 1.5F).keySet())
|
for (Block near : UtilBlock.getInRadius(tnt.getLocation(), 2.0F).keySet())
|
||||||
{
|
{
|
||||||
if (_wallBlocks.contains(near.getLocation()))
|
if (_wallBlocks.contains(near.getLocation()))
|
||||||
{
|
{
|
||||||
|
@ -118,8 +126,11 @@ public class PerkWaller extends Perk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<Location> buildWall(final Location source, final float playerYaw, final BlockFace facing)
|
@SuppressWarnings("deprecation")
|
||||||
|
private Set<Location> buildWall(final Location source, final float playerYaw)
|
||||||
{
|
{
|
||||||
|
BlockFace facing = getFace(playerYaw + 180F);
|
||||||
|
|
||||||
Set<Location> allWallBlocks = new HashSet<Location>();
|
Set<Location> allWallBlocks = new HashSet<Location>();
|
||||||
Set<Location> baseWallBlocks = new HashSet<Location>();
|
Set<Location> baseWallBlocks = new HashSet<Location>();
|
||||||
|
|
||||||
|
@ -147,16 +158,15 @@ public class PerkWaller extends Perk
|
||||||
for (Location block : allWallBlocks)
|
for (Location block : allWallBlocks)
|
||||||
{
|
{
|
||||||
block.getBlock().setType(Material.SMOOTH_BRICK);
|
block.getBlock().setType(Material.SMOOTH_BRICK);
|
||||||
block.getWorld().playEffect(block, Effect.STEP_SOUND, 1.0F);
|
block.getBlock().setData((byte) 0);
|
||||||
|
|
||||||
|
block.getWorld().playEffect(block, Effect.STEP_SOUND, block.getBlock().getType());
|
||||||
}
|
}
|
||||||
return allWallBlocks;
|
return allWallBlocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockFace getFace(float yaw)
|
private BlockFace getFace(float yaw)
|
||||||
{
|
{
|
||||||
if (yaw < 0)
|
return axis[Math.round(yaw / 90f) & 0x3];
|
||||||
yaw = yaw * (-1);
|
|
||||||
|
|
||||||
return axis[Math.round(yaw / 90F) & 0x3];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue