From 771f643b428b38424d389f6bde440be086c8e789 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 28 Jul 2016 21:01:29 +0100 Subject: [PATCH] Jumping disabled during Pyromancer ULT --- .../game/arcade/game/games/quiver/QuiverPayload.java | 5 +++-- .../games/quiver/ultimates/UltimatePyromancer.java | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/QuiverPayload.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/QuiverPayload.java index 0e2d487cd..ee74d50b6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/QuiverPayload.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/QuiverPayload.java @@ -72,6 +72,7 @@ public class QuiverPayload extends TeamGame private static final int ULTIMATE_PERCENTAGE_INCREASE_KILL = 5; private static final int ULTIMATE_PERCENTAGE_INCREASE_ASSIST = 2; private static final long POWERUP_SPAWN_DELAY = 20000; + private static final int RESPAWN_ARROW_GIVE_DELAY = 30; private Minecart _minecart; private Hologram _hologram; @@ -220,7 +221,7 @@ public class QuiverPayload extends TeamGame GameTeam teamA = GetTeamList().get(0); GameTeam teamB = GetTeamList().get(1); - if (getTrackDistanceToMarker(getDestination(teamA)) < getTrackDistanceToMarker(getDestination(teamB))) + if (getTrackDistanceToMarker(getDestination(teamA)) > getTrackDistanceToMarker(getDestination(teamB))) { WinnerTeam = teamA; } @@ -576,7 +577,7 @@ public class QuiverPayload extends TeamGame player.getInventory().addItem(Quiver.SUPER_ARROW); } } - }.runTaskLater(Manager.getPlugin(), 10); + }.runTaskLater(Manager.getPlugin(), RESPAWN_ARROW_GIVE_DELAY); } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/ultimates/UltimatePyromancer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/ultimates/UltimatePyromancer.java index 45222a394..10fb518ad 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/ultimates/UltimatePyromancer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/quiver/ultimates/UltimatePyromancer.java @@ -13,10 +13,13 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import org.bukkit.event.entity.ProjectileHitEvent; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; +import mineplex.core.common.Rank; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; @@ -98,7 +101,8 @@ public class UltimatePyromancer extends Ultimate Set entities = new HashSet<>(); - player.setWalkSpeed(0.1F); + player.setWalkSpeed(0.05F); + player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, (int) ((getLength() / 1000) * 20), -10)); _tasks.put(player.getUniqueId(), (new BukkitRunnable() { @@ -111,7 +115,7 @@ public class UltimatePyromancer extends Ultimate Arrow arrow = player.launchProjectile(Arrow.class); arrow.setCritical(true); - arrow.setVelocity(new Vector((Math.random() - 0.5) * 3, 0, (Math.random() - 0.5) * 3)); + arrow.setVelocity(new Vector((Math.random() - 0.5) * 4, 0, (Math.random() - 0.5) * 4)); entities.add(arrow); } @@ -132,7 +136,7 @@ public class UltimatePyromancer extends Ultimate { entity.remove(); } - + _entities.remove(player.getUniqueId()); }