BH Gem Fixes
This commit is contained in:
parent
85a3edc75e
commit
0aae7d24ed
@ -20,7 +20,6 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
|
@ -252,7 +252,7 @@ public class HideSeek extends TeamGame
|
||||
|
||||
//Axe
|
||||
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 Hunters" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Upgrades Axe");
|
||||
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
@ -266,7 +266,7 @@ public class HideSeek extends TeamGame
|
||||
ItemStack firework = ItemStackFactory.Instance.CreateStack(Material.FIREWORK, (byte)0, 5, C.cYellow + C.Bold + "Firework" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "+2 Gems");
|
||||
FireworkMeta metaData = (FireworkMeta) firework.getItemMeta();
|
||||
metaData.setPower(1);
|
||||
metaData.addEffect(FireworkEffect.builder().flicker(true).withColor(Color.AQUA).with(Type.BALL).trail(true).build());
|
||||
metaData.addEffect(FireworkEffect.builder().flicker(true).withColor(Color.AQUA).with(Type.BALL_LARGE).trail(true).build());
|
||||
firework.setItemMeta(metaData);
|
||||
player.getInventory().setItem(5, firework);
|
||||
|
||||
@ -347,7 +347,7 @@ public class HideSeek extends TeamGame
|
||||
//Set New
|
||||
_forms.put(player, new CreatureForm(this, player, event.getRightClicked().getType()));
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void ChangeDisguise(CustomDamageEvent event)
|
||||
{
|
||||
@ -472,10 +472,10 @@ public class HideSeek extends TeamGame
|
||||
LivingEntity damagee = (LivingEntity)event.getEntity().getVehicle();
|
||||
|
||||
EntityDamageByEntityEvent eventEE = (EntityDamageByEntityEvent)event;
|
||||
|
||||
|
||||
LivingEntity damager = null;
|
||||
Projectile proj = null;
|
||||
|
||||
|
||||
if (eventEE.getDamager() instanceof Projectile)
|
||||
{
|
||||
proj = (Projectile)eventEE.getDamager();
|
||||
@ -567,20 +567,20 @@ public class HideSeek extends TeamGame
|
||||
{
|
||||
if (!(event.getEntity() instanceof Player))
|
||||
return;
|
||||
|
||||
|
||||
Player shooter = (Player)event.getEntity();
|
||||
|
||||
|
||||
if (!_hiders.HasPlayer(shooter))
|
||||
return;
|
||||
|
||||
|
||||
Arrow arrow = shooter.getWorld().spawnArrow(
|
||||
shooter.getEyeLocation().add(shooter.getLocation().getDirection().multiply(1.5)),
|
||||
shooter.getLocation().getDirection(), (float) event.getProjectile().getVelocity().length(), 0f);
|
||||
arrow.setShooter(shooter);
|
||||
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void ArrowHit(CustomDamageEvent event)
|
||||
{
|
||||
@ -589,10 +589,10 @@ public class HideSeek extends TeamGame
|
||||
|
||||
if (event.GetProjectile() == null)
|
||||
return;
|
||||
|
||||
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
|
||||
if (!_seekers.HasPlayer(damagee))
|
||||
return;
|
||||
|
||||
@ -670,7 +670,7 @@ public class HideSeek extends TeamGame
|
||||
|
||||
if (!player.getItemInHand().getType().toString().contains("_AXE"))
|
||||
return;
|
||||
|
||||
|
||||
if (!_hiders.HasPlayer(player))
|
||||
return;
|
||||
|
||||
@ -750,7 +750,7 @@ public class HideSeek extends TeamGame
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
if (!UtilEvent.isAction(event, ActionType.R_BLOCK))
|
||||
return;
|
||||
|
||||
if (!UtilGear.isMat(player.getItemInHand(), Material.FIREWORK))
|
||||
@ -762,9 +762,9 @@ public class HideSeek extends TeamGame
|
||||
return;
|
||||
}
|
||||
|
||||
this.AddGems(player, 4, "Fireworks", true);
|
||||
this.AddGems(player, 3, "Fireworks", true);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void HiderTimeGems(UpdateEvent event)
|
||||
{
|
||||
@ -773,10 +773,10 @@ public class HideSeek extends TeamGame
|
||||
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
|
||||
for (Player player : _hiders.GetPlayers(true))
|
||||
{
|
||||
this.AddGems(player, 5d/60d, "Seconds Alive", true);
|
||||
this.AddGems(player, 0.05, "Seconds Alive", true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -798,6 +798,39 @@ public class HideSeek extends TeamGame
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WaterDamage(UpdateEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldWaterDamage(UpdateEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
for (Player player : _hiders.GetPlayers(true))
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(player, null, null,
|
||||
DamageCause.DROWNING, 1, false, false, false,
|
||||
"Water", "Water Damage");
|
||||
|
||||
player.getWorld().playSound(player.getLocation(),
|
||||
Sound.SPLASH, 0.8f,
|
||||
1f + (float) Math.random() / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PlayerDeath(PlayerQuitEvent event)
|
||||
{
|
||||
@ -848,7 +881,7 @@ public class HideSeek extends TeamGame
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "You are now a Hunter!");
|
||||
|
||||
|
||||
player.eject();
|
||||
player.leaveVehicle();
|
||||
player.teleport(_seekers.GetSpawn());
|
||||
@ -880,7 +913,18 @@ public class HideSeek extends TeamGame
|
||||
@Override
|
||||
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||
{
|
||||
return 4;
|
||||
if (_hiders.HasPlayer(killed))
|
||||
{
|
||||
if (!assist)
|
||||
return 4;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!assist)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -891,8 +935,8 @@ public class HideSeek extends TeamGame
|
||||
|
||||
Announce(C.cAqua + C.Bold + "Hiders have 20 Seconds to hide!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Timer(UpdateEvent event)
|
||||
@ -957,13 +1001,13 @@ public class HideSeek extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public GameTeam ChooseTeam(Player player)
|
||||
{
|
||||
if (CanJoinTeam(_seekers))
|
||||
return _seekers;
|
||||
|
||||
|
||||
return _hiders;
|
||||
}
|
||||
|
||||
@ -984,10 +1028,10 @@ public class HideSeek extends TeamGame
|
||||
for (Location loc : _seekers.GetSpawns())
|
||||
if (UtilMath.offset(loc, location) < 24)
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DeathMessageType GetDeathMessageType()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user