From 4974fc17aa17799f12ce277b89833cabe2b1d918 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 27 Oct 2013 15:24:28 +1100 Subject: [PATCH] Halloween balance (slightly easier) Giant hitbox improved --- .../mineplex/core/common/util/UtilEnt.java | 19 ++++++++-- .../src/mineplex/hub/HubManager.java | 4 +-- .../minecraft/game/core/fire/Fire.java | 1 - .../games/halloween/creatures/MobGiant.java | 2 +- .../halloween/creatures/PumpkinKing.java | 10 +++--- .../game/games/halloween/kits/KitFinn.java | 2 +- .../games/halloween/kits/KitRobinHood.java | 6 ++-- .../game/games/halloween/kits/KitThor.java | 2 +- .../game/games/halloween/waves/Wave4.java | 2 +- .../game/games/halloween/waves/Wave5.java | 2 +- .../arcade/kit/perks/PerkBlizzardFinn.java | 35 ++++++++----------- .../arcade/kit/perks/PerkHammerThrow.java | 7 +++- .../arcade/kit/perks/PerkInfernoFinn.java | 4 +-- .../arcade/kit/perks/PerkSeismicHammer.java | 2 +- .../game/arcade/managers/GameFlagManager.java | 8 +++-- 15 files changed, 60 insertions(+), 46 deletions(-) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java index a91c130b4..256ce7f94 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilEnt.java @@ -21,6 +21,7 @@ import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Giant; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -329,9 +330,21 @@ public class UtilEnt } } else - if (loc.getY() > ent.getLocation().getY() && loc.getY() < ent.getLocation().getY() + 2) - if (UtilMath.offset2d(loc, ent.getLocation()) < 0.5 * mult) - return true; + { + if (ent instanceof Giant) + { + if (loc.getY() > ent.getLocation().getY() && loc.getY() < ent.getLocation().getY() + 12) + if (UtilMath.offset2d(loc, ent.getLocation()) < 4) + return true; + } + else + { + if (loc.getY() > ent.getLocation().getY() && loc.getY() < ent.getLocation().getY() + 2) + if (UtilMath.offset2d(loc, ent.getLocation()) < 0.5 * mult) + return true; + } + } + return false; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 3d197bc1f..1865f3877 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -570,10 +570,10 @@ public class HubManager extends MiniClientPlugin UtilParticle.PlayParticle(other, ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 1); else if (player.getName().equalsIgnoreCase("defek7")) - UtilParticle.PlayParticle(other, ParticleType.ANGRY_VILLAGER, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 1); + UtilParticle.PlayParticle(other, ParticleType.FIREWORKS_SPARK, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2); else if (player.getName().equalsIgnoreCase("Spu_")) - UtilParticle.PlayParticle(other, ParticleType.NOTE, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 1); + UtilParticle.PlayParticle(other, ParticleType.FLAME, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2); else if (player.getName().equalsIgnoreCase("sterling_")) UtilParticle.PlayParticle(other, ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2); diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java index 7f9dea9f5..0caed97f0 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/fire/Fire.java @@ -79,7 +79,6 @@ public class Fire extends MiniPlugin continue; } - if (!UtilEnt.hitBox(fire.getLocation(), ent, 1.5, null)) continue; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/MobGiant.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/MobGiant.java index b39c288a2..80a73a7ba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/MobGiant.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/MobGiant.java @@ -88,7 +88,7 @@ public class MobGiant extends CreatureBase _tpLoc.setPitch(UtilAlg.GetPitch(dir)); _tpLoc.setYaw(UtilAlg.GetYaw(dir)); - double speed = Math.min(0.35, 0.1 + (GetEntity().getTicksLived() / 8000d)); + double speed = Math.min(0.35, 0.1 + (GetEntity().getTicksLived() / 12000d)); _tpLoc.add(dir.multiply(speed)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/PumpkinKing.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/PumpkinKing.java index 2ffbdfffa..cf889eb44 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/PumpkinKing.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/creatures/PumpkinKing.java @@ -81,7 +81,7 @@ public class PumpkinKing extends CreatureBase ent.setSkeletonType(SkeletonType.WITHER); ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN)); - ent.setMaxHealth(500); + ent.setMaxHealth(400); ent.setHealth(ent.getMaxHealth()); ent.getWorld().strikeLightningEffect(ent.getLocation()); @@ -109,8 +109,8 @@ public class PumpkinKing extends CreatureBase UtilPlayer.message(event.GetDamagerPlayer(true), F.main("Boss", "You must destroy " + F.elem("Pumpkin Minions") + " first!")); } - if (event.GetCause() == DamageCause.ENTITY_EXPLOSION) - event.SetCancelled("Explosion Resist"); + if (event.GetDamagerPlayer(true) == null) + event.SetCancelled("Non-Player"); event.SetKnockback(false); } @@ -506,7 +506,7 @@ public class PumpkinKing extends CreatureBase shieldIterator.remove(); } - if (!UtilTime.elapsed(_shieldSpawn, 8000)) + if (!UtilTime.elapsed(_shieldSpawn, 10000)) return; if (_shields.size() >= _shieldsMax) @@ -650,7 +650,7 @@ public class PumpkinKing extends CreatureBase } else if (GetState() == 3) { - if (UtilTime.elapsed(_stateTime, 15000)) + if (UtilTime.elapsed(_stateTime, 20000)) { SetState(0); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitFinn.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitFinn.java index 26d5b9d50..0b3bde56a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitFinn.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitFinn.java @@ -35,7 +35,7 @@ public class KitFinn extends SmashKit { new PerkInfernoFinn(), new PerkBlizzardFinn(), - new PerkFletcher(3, 4, true), + new PerkFletcher(1, 4, true), }, EntityType.ZOMBIE, new ItemStack(Material.GOLD_SWORD)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitRobinHood.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitRobinHood.java index f70fcc0bb..86529239e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitRobinHood.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitRobinHood.java @@ -32,9 +32,9 @@ public class KitRobinHood extends SmashKit }, new Perk[] - { - new PerkFletcher(1, 4, true), - new PerkBarrage(4, 250, true, true), + { + new PerkFletcher(1, 8, true), + new PerkBarrage(8, 125, true, true), new PerkQuickshotRobinHood() }, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitThor.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitThor.java index d914fa882..884c12b44 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitThor.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/kits/KitThor.java @@ -35,7 +35,7 @@ public class KitThor extends SmashKit new Perk[] { new PerkKnockbackAttack(2), - new PerkFletcher(3, 4, true), + new PerkFletcher(1, 4, true), new PerkSeismicHammer(), new PerkHammerThrow(), }, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave4.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave4.java index 99523af14..59c8d35a6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave4.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave4.java @@ -11,7 +11,7 @@ public class Wave4 extends WaveBase { public Wave4(Halloween host) { - super(host, "Ghasts and friends!", 60000, host.GetSpawnSet(3)); + super(host, "Ghasts and friends!", 80000, host.GetSpawnSet(3)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave5.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave5.java index 7a753d0d1..d7b5200aa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave5.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/halloween/waves/Wave5.java @@ -9,7 +9,7 @@ public class Wave5 extends WaveBase { public Wave5(Halloween host) { - super(host, "Double the Giants! Double the fun!", 60000, host.GetSpawnSet(1)); + super(host, "Double the Giants! Double the fun!", 80000, host.GetSpawnSet(1)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlizzardFinn.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlizzardFinn.java index 2398a1f4d..19aeb41d6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlizzardFinn.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlizzardFinn.java @@ -47,27 +47,27 @@ public class PerkBlizzardFinn extends Perk { if (event.isCancelled()) return; - + if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK) return; - + if (UtilBlock.usable(event.getClickedBlock())) return; - + if (!event.getPlayer().getItemInHand().getType().toString().contains("DIAMOND_SWORD")) return; - + Player player = event.getPlayer(); - + if (!Kit.HasKit(player)) return; - - if (!Recharge.Instance.use(player, GetName(), 4000, true)) + + if (!Recharge.Instance.use(player, GetName(), 2000, true)) return; - + _active.put(player, System.currentTimeMillis()); } - + @EventHandler public void Update(UpdateEvent event) { @@ -78,14 +78,14 @@ public class PerkBlizzardFinn extends Perk { if (!_active.containsKey(player)) continue; - + if (!player.isBlocking()) { _active.remove(player); continue; } - - if (UtilTime.elapsed(_active.get(player), 2000)) + + if (UtilTime.elapsed(_active.get(player), 1000)) { _active.remove(player); continue; @@ -124,20 +124,13 @@ public class PerkBlizzardFinn extends Perk LivingEntity damagee = event.GetDamageeEntity(); if (damagee == null) return; - - event.SetCancelled("Blizzard"); + + event.SetCancelled("Snowball Damage"); if (damagee instanceof Player) return; damagee.setVelocity(proj.getVelocity().multiply(0.15).add(new Vector(0, 0.15, 0))); - - //Damage Event - if (damagee instanceof Player) - if (Recharge.Instance.use((Player)damagee, GetName(), 250, false)) - Manager.GetDamage().NewDamageEvent(damagee, event.GetDamagerEntity(true), null, - DamageCause.PROJECTILE, 1.5, false, true, false, - UtilEnt.getName(event.GetDamagerEntity(true)), GetName()); } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHammerThrow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHammerThrow.java index 0d1c6932c..f68e1d8c2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHammerThrow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHammerThrow.java @@ -7,6 +7,7 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.block.Block; import org.bukkit.entity.Entity; +import org.bukkit.entity.Giant; import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -127,9 +128,13 @@ public class PerkHammerThrow extends Perk implements IThrown if (target == null) return; + double damage = 16; + if (target instanceof Giant) + damage = 8; + //Damage Event Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, - DamageCause.LIGHTNING, 16, true, true, false, + DamageCause.LIGHTNING, damage, true, true, false, UtilEnt.getName(data.GetThrower()), GetName()); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInfernoFinn.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInfernoFinn.java index d1801a17b..e3d2a17f6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInfernoFinn.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInfernoFinn.java @@ -55,7 +55,7 @@ public class PerkInfernoFinn extends Perk if (!Kit.HasKit(player)) return; - if (!Recharge.Instance.use(player, "Inferno", 4000, true)) + if (!Recharge.Instance.use(player, "Inferno", 2000, true)) return; _active.put(player, System.currentTimeMillis()); @@ -78,7 +78,7 @@ public class PerkInfernoFinn extends Perk continue; } - if (UtilTime.elapsed(_active.get(cur), 1500)) + if (UtilTime.elapsed(_active.get(cur), 1000)) { _active.remove(cur); continue; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicHammer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicHammer.java index 3d5f446cd..c7f42d3b2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicHammer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicHammer.java @@ -61,7 +61,7 @@ public class PerkSeismicHammer extends Perk //Action int damage = 8; - double range = 8; + double range = 10; HashMap targets = UtilEnt.getInRadius(player.getLocation(), range); for (LivingEntity cur : targets.keySet()) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java index cd511412c..7f75b70c1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java @@ -3,6 +3,8 @@ package nautilus.game.arcade.managers; import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; @@ -664,12 +666,14 @@ public class GameFlagManager implements Listener { 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); + Manager.GetDamage().NewDamageEvent(player, null, null, - DamageCause.VOID, 4, true, false, false, + DamageCause.VOID, 4, false, false, false, "Void", "Void Damage"); player.getWorld().playSound(player.getLocation(), Sound.NOTE_BASS, 2f, 1f); - player.getWorld().playSound(player.getLocation(), Sound.NOTE_BASS, 2f, 1f); + player.getWorld().playSound(player.getLocation(), Sound.NOTE_BASS, 2f, 1f); } } }