diff --git a/Art/Treasure/4Qq2m6x.png b/Art/Treasure/4Qq2m6x.png new file mode 100644 index 000000000..dffbceeb6 Binary files /dev/null and b/Art/Treasure/4Qq2m6x.png differ diff --git a/Art/Treasure/canc.jpg b/Art/Treasure/canc.jpg new file mode 100644 index 000000000..06fe47f9a Binary files /dev/null and b/Art/Treasure/canc.jpg differ diff --git a/Art/Treasure/xxiJkbb.png b/Art/Treasure/xxiJkbb.png new file mode 100644 index 000000000..599eabdaf Binary files /dev/null and b/Art/Treasure/xxiJkbb.png differ diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java index d0b624505..c3d16a857 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java @@ -428,4 +428,15 @@ public class UtilAlg { return a.getWorld() == b.getWorld() && a.getX() == b.getX() && a.getY() == b.getY() && a.getZ() == b.getZ(); } + + public static int randomMidpoint(int min, int max) + { + int variance = max - min; + + int value = UtilMath.r(variance); + + value += min; + + return value; + } } 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 1cc2d5416..c7151b962 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 @@ -435,10 +435,23 @@ public class UtilEnt LivingEntity ent = (LivingEntity)cur; + //Feet double offset = UtilMath.offset(loc, ent.getLocation()); if (offset < dR) + { ents.put(ent, 1 - (offset/dR)); + continue; + } + + //Eyes + offset = UtilMath.offset(loc, ent.getEyeLocation()); + + if (offset < dR) + { + ents.put(ent, 1 - (offset/dR)); + continue; + } } return ents; diff --git a/Plugins/Mineplex.Core/.classpath b/Plugins/Mineplex.Core/.classpath index 7dba3b7ca..1b29691dd 100644 --- a/Plugins/Mineplex.Core/.classpath +++ b/Plugins/Mineplex.Core/.classpath @@ -12,8 +12,8 @@ - + diff --git a/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseMooshroom.java b/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseMooshroom.java new file mode 100644 index 000000000..8b6d64485 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/disguise/disguises/DisguiseMooshroom.java @@ -0,0 +1,16 @@ +package mineplex.core.disguise.disguises; + +import org.bukkit.entity.*; + +public class DisguiseMooshroom extends DisguiseAnimal +{ + public DisguiseMooshroom(org.bukkit.entity.Entity entity) + { + super(EntityType.MUSHROOM_COW, entity); + } + + public String getHurtSound() + { + return "mob.cow.hurt"; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java index 44eb1ca17..a439aca63 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java @@ -45,7 +45,7 @@ public class ItemFleshHook extends ItemGadget implements IThrown UtilAction.velocity(item, player.getLocation().getDirection(), 1.6, false, 0, 0.2, 10, false); - Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, + Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true, Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 0.5f); //Inform diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java index 90c80cc1c..ea3a786ba 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java @@ -57,7 +57,7 @@ public class ItemMelonLauncher extends ItemGadget implements IThrown UtilAction.velocity(item, player.getLocation().getDirection(), 1, false, 0, 0.2, 10, false); - Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, + Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true, null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f); //Inform diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java index 0d6d18762..3b0bfe79d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java @@ -114,7 +114,7 @@ public class MorphBat extends MorphGadget implements IThrown UtilAction.velocity(item, player.getLocation().getDirection(), 0.01, true, -0.3, 0, 10, false); - Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, + Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true, null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f); //Inform diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java index c2f0d04b1..e0a864177 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java @@ -97,7 +97,7 @@ public class MorphVillager extends MorphGadget implements IThrown UtilAction.velocity(gem, player.getLocation().getDirection(), 1, false, 0, 0.2, 1, false); //Throw - Manager.getProjectileManager().AddThrow(gem, player, this, -1, true, true, true, + Manager.getProjectileManager().AddThrow(gem, player, this, -1, true, true, true, true, null, 1.4f, 0.8f, null, null, 0, UpdateType.TICK, 0.5f); Manager.getDonationManager().RewardGems(null, this.GetName() + " Throw", player.getName(), player.getUniqueId(), -20); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileManager.java b/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileManager.java index 03f44665d..9708c5a77 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileManager.java @@ -31,107 +31,107 @@ public class ProjectileManager extends MiniPlugin } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, float hitboxGrow) + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, float hitboxGrow) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, null, 1f, 1f, null, 0, null, null, 0F, 0F, 0F, 0F, 1, hitboxGrow)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, float hitboxGrow) + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup, float hitboxGrow) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, pickup, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, pickup, null, 1f, 1f, null, 0, null, null, 0F, 0F, 0F, 0F, 1, hitboxGrow)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate , float hitboxGrow) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, effect, effectData, effectRate, null, 0F, 0F, 0F, 0F, 1, hitboxGrow)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, Effect effect, int effectData, UpdateType effectRate, float hitboxGrow) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxGrow)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, float pX, float pY, float pZ, float pS, int pC, UpdateType effectRate, float hitboxMult) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, null, 0, effectRate, particle, pX, pY, pZ, pS, pC, hitboxMult)); } // WITH CAN HIT PLAYERS LIST: public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, float hitboxGrow, List canHit) + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, float hitboxGrow, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, null, 1f, 1f, null, 0, null, null, 0F, 0F, 0F, 0F, 1, hitboxGrow, canHit)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, float hitboxGrow, List canHit) + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup, float hitboxGrow, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, pickup, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, pickup, null, 1f, 1f, null, 0, null, null, 0F, 0F, 0F, 0F, 1, hitboxGrow, canHit)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate , float hitboxGrow, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, effect, effectData, effectRate, null, 0F, 0F, 0F, 0F, 1, hitboxGrow, canHit)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, Effect effect, int effectData, UpdateType effectRate, float hitboxGrow, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxGrow, canHit)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult, canHit)); } public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, Sound sound, float soundVolume, float soundPitch, ParticleType particle, float pX, float pY, float pZ, float pS, int pC, UpdateType effectRate, float hitboxMult, List canHit) { _thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback, - expireTime, hitPlayer, hitBlock, idle, false, + expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false, sound, soundVolume, soundPitch, null, 0, effectRate, particle, pX, pY, pZ, pS, pC, hitboxMult, canHit)); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileUser.java b/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileUser.java index 3d71c0831..09d038abd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileUser.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/projectile/ProjectileUser.java @@ -11,6 +11,7 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import net.minecraft.server.v1_7_R4.AxisAlignedBB; +import net.minecraft.server.v1_7_R4.EntityPlayer; import net.minecraft.server.v1_7_R4.MathHelper; import net.minecraft.server.v1_7_R4.MovingObjectPosition; import net.minecraft.server.v1_7_R4.Vec3D; @@ -37,6 +38,7 @@ public class ProjectileUser private long _expireTime; private boolean _hitPlayer = false; + private boolean _hitNonPlayerEntity = false; private boolean _hitBlock = false; private boolean _idle = false; private boolean _pickup = false; @@ -61,7 +63,7 @@ public class ProjectileUser private List _canHit; public ProjectileUser(ProjectileManager throwInput, Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup, Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate, ParticleType particle, float particleX, float particleY, @@ -75,6 +77,7 @@ public class ProjectileUser _expireTime = expireTime; _hitPlayer = hitPlayer; + _hitNonPlayerEntity = hitNonPlayerEntity; _hitBlock = hitBlock; _idle = idle; _pickup = pickup; @@ -97,7 +100,7 @@ public class ProjectileUser } public ProjectileUser(ProjectileManager throwInput, Entity thrown, LivingEntity thrower, IThrown callback, - long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, + long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup, Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate, ParticleType particle, float particleX, float particleY, @@ -111,6 +114,7 @@ public class ProjectileUser _expireTime = expireTime; _hitPlayer = hitPlayer; + _hitNonPlayerEntity = hitNonPlayerEntity; _hitBlock = hitBlock; _idle = idle; _pickup = pickup; @@ -157,7 +161,7 @@ public class ProjectileUser return true; } - if (_hitPlayer) + if (_hitPlayer || _hitNonPlayerEntity) { double distanceToEntity = 0.0D; LivingEntity victim = null; @@ -181,6 +185,12 @@ public class ProjectileUser ((CraftEntity)_thrown).getHandle().motY, ((CraftEntity)_thrown).getHandle().motZ).grow(_hitboxGrow, _hitboxGrow, _hitboxGrow))) { + if (!_hitNonPlayerEntity && !(entity instanceof EntityPlayer)) + continue; + + if (!_hitPlayer && entity instanceof EntityPlayer) + continue; + if (entity instanceof net.minecraft.server.v1_7_R4.Entity) { Entity bukkitEntity = ((net.minecraft.server.v1_7_R4.Entity) entity).getBukkitEntity(); @@ -264,8 +274,8 @@ public class ProjectileUser //Idle if (_idle) { - if (_thrown.getVelocity().length() < 0.2 && - !UtilBlock.airFoliage(_thrown.getLocation().getBlock().getRelative(BlockFace.DOWN))) + if (_thrown.getVelocity().length() < 0.2 && (_thrown.isOnGround() || + !UtilBlock.airFoliage(_thrown.getLocation().getBlock().getRelative(BlockFace.DOWN)))) { _callback.Idle(this); return true; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java index 83f495718..6bec44e50 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java @@ -5,10 +5,6 @@ import java.sql.SQLException; import java.util.List; import java.util.UUID; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - import mineplex.core.MiniDbClientPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.common.util.Callback; @@ -16,6 +12,10 @@ import mineplex.core.common.util.NautHashMap; import mineplex.core.task.repository.TaskRepository; import mineplex.playerCache.PlayerCache; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + public class TaskManager extends MiniDbClientPlugin { private static Object _taskLock = new Object(); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index bbd306e36..212d6f90f 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -66,6 +66,7 @@ import mineplex.hub.modules.NewsManager; import mineplex.hub.modules.ParkourManager; import mineplex.hub.modules.SoccerManager; import mineplex.hub.modules.TextManager; +import mineplex.hub.modules.TrickOrTreatManager; import mineplex.hub.modules.WorldManager; import mineplex.hub.profile.gui.GUIProfile; import mineplex.hub.tutorial.TutorialManager; @@ -142,6 +143,7 @@ public class HubManager extends MiniClientPlugin private PacketHandler _packetHandler; private PersonalServerManager _personalServerManager; // private HalloweenSpookinessManager _halloweenManager; +// private TrickOrTreatManager _trickOrTreatManager; private Location _spawn; private int _scoreboardTick = 0; @@ -197,6 +199,8 @@ public class HubManager extends MiniClientPlugin new SoccerManager(this, _gadgetManager); new KothManager(this, _gadgetManager); + + new TrickOrTreatManager(_plugin, this, taskManager, donationManager, clientManager); _petManager = petManager; _partyManager = partyManager; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/TrickOrTreatManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/TrickOrTreatManager.java new file mode 100644 index 000000000..9b487669b --- /dev/null +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/TrickOrTreatManager.java @@ -0,0 +1,294 @@ +package mineplex.hub.modules; + +import java.util.Calendar; +import java.util.HashSet; +import java.util.Random; + +import mineplex.core.MiniPlugin; +import mineplex.core.account.CoreClientManager; +import mineplex.core.common.Rank; +import mineplex.core.common.util.C; +import mineplex.core.common.util.Callback; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.donation.DonationManager; +import mineplex.core.recharge.Recharge; +import mineplex.core.task.TaskManager; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.hub.HubManager; +import mineplex.hub.HubType; +import mineplex.hub.modules.trickortreat.Trick; + +import org.bukkit.ChatColor; +import org.bukkit.Instrument; +import org.bukkit.Material; +import org.bukkit.Note; +import org.bukkit.Note.Tone; +import org.bukkit.Sound; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.java.JavaPlugin; + +public class TrickOrTreatManager extends MiniPlugin +{ + /** + * + * @author Mysticate + * + */ + + private HubManager _manager; + private TaskManager _taskManager; + private DonationManager _donationManager; + private CoreClientManager _coreClientManager; + + private Calendar _cal = Calendar.getInstance(); + + private String _identifier = "villager"; + + private HashSet _interacting = new HashSet(); + + private String[] _nextYear = new String[] + { + "Nosy kids...", + "I'm out of candy!", + "Come back next year.", + "No double dipping!", + "I've seen that costume before...", + "You already have enough candy!", + "Once is enough.", + "Isn't it past your bedtime?", + "I already gave you my candy, what more do you want!", + "You again...", + "I said no more!", + "No taking the whole bowl.", + "I have my eye on you...", + "You know what happens to children who want more candy...", + "This was a great year, wasn't it?", + "Aww, did you come back just to talk to me?", + "*heavy staring*", + "Run along, now!", + "The real horror will be your dentist's face...", + "I've heard good things about the house down the road.", + "I started out with 700 pieces!", + "I might call it a night soon.", + "Meow", + "Sure is a mystical night, isn't it?", + "Do you want to hear my song? I wrote it myself!", + }; + + public TrickOrTreatManager(JavaPlugin plugin, HubManager manager, TaskManager taskManager, DonationManager donationManager, CoreClientManager coreClientManager) + { + super("Trick or Treat", plugin); + + _manager = manager; + _taskManager = taskManager; + _donationManager = donationManager; + _coreClientManager = coreClientManager; + + Trick.init(getPlugin()); + } + + @EventHandler + public void trickCommand(PlayerCommandPreprocessEvent event) + { + if (_manager.Type != HubType.Halloween) + return; + + if (!event.getMessage().toLowerCase().startsWith("/trick")) + return; + + if (!_coreClientManager.hasRank(event.getPlayer(), Rank.JNR_DEV)) + return; + + event.setCancelled(true); + new Trick(event.getPlayer(), "Command"); + } + + @EventHandler(priority = EventPriority.LOW) + public void onInteract(final PlayerInteractEntityEvent event) + { + if (_manager.Type != HubType.Halloween) + return; + + if (!(event.getRightClicked() instanceof LivingEntity)) + return; + + LivingEntity en = (LivingEntity) event.getRightClicked(); + + if (en.getCustomName() == null) + return; + + if (!new String(ChatColor.stripColor(en.getCustomName())).toLowerCase().trim().startsWith(_identifier)) + return; + + event.setCancelled(true); + + final String villagerName = ChatColor.stripColor(en.getCustomName()).substring(_identifier.length()).trim(); + + if (_interacting.contains(event.getPlayer().getName())) + return; + + if (!Recharge.Instance.use(event.getPlayer(), "ToT with " + villagerName, 2000, false, false)) + return; + + _interacting.add(event.getPlayer().getName()); + + final String task = "ToT " + _cal.get(Calendar.YEAR) + " " + villagerName; + + runAsync(new Runnable() + { + @Override + public void run() + { + if (!_taskManager.hasCompletedTask(event.getPlayer(), task)) + { + final boolean trick = UtilMath.r(10) > 5; + + UtilPlayer.message(event.getPlayer(), C.cDGreenB + "You: " + C.cGreenB + "Trick or Treat!"); + + event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.NOTE_PIANO, 1F, 1F); + + try { Thread.sleep(250); } catch (Exception ex) { } //XXX + + event.getPlayer().playNote(event.getPlayer().getLocation(), Instrument.PIANO, Note.natural(1, Tone.D)); + event.getPlayer().playNote(event.getPlayer().getLocation(), Instrument.PIANO, Note.natural(1, Tone.A)); + + try { Thread.sleep(1000); } catch (Exception ex) { } //XXX + + if (trick) //Trick + { + UtilPlayer.message(event.getPlayer(), C.cGoldB + villagerName + ": " + C.cYellowB + "I choose... TRICK!"); + + try { Thread.sleep(750); } catch (Exception ex) { } //XXX + + _taskManager.completedTask(null, event.getPlayer(), task); + + runSync(new Runnable() + { + @Override + public void run() + { + new Trick(event.getPlayer(), villagerName); + } + }); + } + else + { + UtilPlayer.message(event.getPlayer(), C.cGoldB + villagerName + ": " + C.cYellowB + "I choose... TREAT!"); + + try { Thread.sleep(750); } catch (Exception ex) { } //XXX + + UtilPlayer.message(event.getPlayer(), C.cGoldB + villagerName + ": " + C.cYellowB + "Have a Happy Halloween!"); + + _taskManager.completedTask(new Callback() + { + @Override + public void run(Boolean data) + { + if (!data) + return; + + if (UtilMath.r(10) > 5) //Coins + { + final int amount = Math.max(new Random().nextInt(100) + 100, (int) Math.floor(new Random().nextDouble() * 600)); + _donationManager.RewardCoins(new Callback() + { + public void run(Boolean completed) + { + if (completed) + { + UtilPlayer.message(event.getPlayer(), F.main("Treat", "You received " + F.elem(C.cYellow + amount + " Coins") + " from " + F.name(villagerName) + ".")); + + //Sound + event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.LEVEL_UP, 2f, 1.5f); + } + else + { + UtilPlayer.message(event.getPlayer(), F.main("Treat", "There was an error giving " + F.elem(C.cYellow + amount + " Coins") + " to you. Please visit that villager again.") + "."); + } + } + }, "Treat " + villagerName, event.getPlayer().getName(), _coreClientManager.getAccountId(event.getPlayer()), amount); + } + else //Gems + { + final int amount = Math.max(new Random().nextInt(100) + 100, (int) Math.floor(new Random().nextDouble() * 600)); + _donationManager.RewardGems(new Callback() + { + public void run(Boolean completed) + { + if (completed) + { + UtilPlayer.message(event.getPlayer(), F.main("Treat", "You received " + F.elem(C.cGreen + amount + " Gems") + " from " + F.name(villagerName) + ".")); + + //Sound + event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.LEVEL_UP, 2f, 1.5f); + } + else + { + UtilPlayer.message(event.getPlayer(), F.main("Treat", "There was an error giving " + F.elem(C.cGreen + amount + " Gems") + " to you. Please visit that villager again.") + "."); + } + } + }, "Treat " + villagerName, event.getPlayer().getName(), event.getPlayer().getUniqueId(), amount); + } + } + }, event.getPlayer(), task); + } + } + else + { + UtilPlayer.message(event.getPlayer(), C.cGoldB + villagerName + ": " + C.cYellowB + UtilMath.randomElement(_nextYear)); + } + + _interacting.remove(event.getPlayer().getName()); + } + }); + } + + @EventHandler + public void pumpkinHat(UpdateEvent event) + { + if (event.getType() != UpdateType.SEC) + return; + + for (Player player : UtilServer.getPlayers()) + { + if (player.getInventory().getHelmet() == null || player.getInventory().getHelmet().getType() == Material.AIR) + { + double rand = Math.random(); + + Material mat; + byte data = 0; + if (rand <= 0.25) + { + mat = Material.JACK_O_LANTERN; + } + else if (rand <= 0.5) + { + mat = Material.SKULL_ITEM; + data = 0; // Skeleton + } + else if (rand <= 0.75) + { + mat = Material.SKULL_ITEM; + data = 2; // Zombie + } + else + { + mat = Material.SKULL_ITEM; + data = 4; // Creeper + } + + player.getInventory().setHelmet(new ItemStack(mat, 1, (short) 0, data)); + } + } + } +} \ No newline at end of file diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/trickortreat/Trick.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/trickortreat/Trick.java new file mode 100644 index 000000000..0abd38323 --- /dev/null +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/trickortreat/Trick.java @@ -0,0 +1,235 @@ +package mineplex.hub.modules.trickortreat; + +import java.util.HashSet; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.NautHashMap; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilPlayer; +import net.minecraft.server.v1_7_R4.EntityLightning; +import net.minecraft.server.v1_7_R4.PacketPlayOutEntityLook; +import net.minecraft.server.v1_7_R4.PacketPlayOutEntityStatus; +import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityWeather; + +import org.bukkit.Bukkit; +import org.bukkit.Sound; +import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +public class Trick +{ + /** + * + * @author Mysticate + * + */ + + private static interface ITrick + { + public String onTrick(Player player); + } + + private static JavaPlugin _plugin; + private static HashSet _tricks = new HashSet(); + private static NautHashMap _lastTricks = new NautHashMap(); + + public static void init(JavaPlugin plugin) + { + _plugin = plugin; + } + + private static ITrick nextTrick(String name) + { + if (!_lastTricks.containsKey(name)) + return UtilAlg.Random(_tricks); + + ITrick last = _lastTricks.remove(name); + + //Attempt 10 times + for (int i = 0 ; i < 10 ; i++) + { + ITrick trick = UtilAlg.Random(_tricks); + if (trick == last) + continue; + + return trick; + } + + //Give up + return UtilAlg.Random(_tricks); + } + + static + { + _tricks.add(new ITrick() // blindness + { + @Override + public String onTrick(Player player) + { + player.playSound(player.getLocation(), Sound.ENDERMAN_SCREAM, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1.2F, 0F); + + for (int i = 0 ; i < UtilMath.r(5) ; i++) + player.playSound(player.getLocation(), i % 2 == 0 ? Sound.GHAST_SCREAM : Sound.GHAST_SCREAM2, 1.5F, 0F); + + player.playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.CREEPER_HISS, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_REMEDY, 1.2F, 0F); + + player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 400, 0)); + player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 400, 0)); + + return "See you around..."; + } + }); + + _tricks.add(new ITrick() // nausea + { + @Override + public String onTrick(Player player) + { + player.playSound(player.getLocation(), Sound.ENDERMAN_SCREAM, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1.2F, 0F); + + for (int i = 0 ; i < UtilMath.r(5) ; i++) + player.playSound(player.getLocation(), i % 2 == 0 ? Sound.GHAST_SCREAM : Sound.GHAST_SCREAM2, 1.5F, 0F); + + player.playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.CREEPER_HISS, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.GHAST_MOAN, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.ZOMBIE_WOODBREAK, 1.2F, 0F); + + player.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 400, 3)); + player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 400, 9)); + + return "Did someone eat too much candy?"; + } + }); + + _tricks.add(new ITrick() // Random teleport + { + @Override + public String onTrick(Player player) + { + player.teleport(player.getWorld().getHighestBlockAt(Math.max(UtilMath.r(100), 25), Math.max(UtilMath.r(100), 25)).getLocation().add(0, UtilMath.r(30), 0).clone().add(.5, 1, .5)); + + for (int i = 0 ; i < UtilMath.r(5) ; i++) + player.playSound(player.getLocation(), i % 2 == 0 ? Sound.GHAST_SCREAM : Sound.GHAST_SCREAM2, 1.5F, 0F); + + player.playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.CREEPER_HISS, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1.2F, 0F); + + return "Goodbye..."; + } + }); + +// _tricks.add(new ITrick() // Kick +// { +// @Override +// public String onTrick(final Player player) +// { +// for (int i = 0 ; i < 10 ; i++) +// player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1.2F, 0F); +// +// Bukkit.getScheduler().runTaskLater(_plugin, new Runnable() +// { +// @Override +// public void run() +// { +// player.kickPlayer(C.cDRedB + "Trick: " + C.cRedB + "Better luck next time!"); +// } +// }, 20); +// +// return "Off in such a hurry?"; +// } +// }); + + _tricks.add(new ITrick() // Shocking strikes + { + @Override + public String onTrick(final Player player) + { + for (int i = 0 ; i < UtilMath.r(5) ; i++) + player.playSound(player.getLocation(), i % 2 == 0 ? Sound.GHAST_SCREAM : Sound.GHAST_SCREAM2, 1.5F, 0F); + + player.playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.CREEPER_HISS, 1.2F, 0F); + + for (int i = 0 ; i < 5 ; i++) + player.playSound(player.getLocation(), Sound.ENDERMAN_SCREAM, 1.2F, 0F); + + UtilPlayer.sendPacket(player, new PacketPlayOutSpawnEntityWeather(new EntityLightning(((CraftWorld) player.getWorld()).getHandle(), player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ(), true, false))); + + for (int i = 0 ; i < 20 ; i++) + { + Bukkit.getScheduler().runTaskLater(_plugin, new Runnable() + { + @Override + public void run() + { + UtilPlayer.sendPacket(player, new PacketPlayOutEntityStatus(((CraftPlayer) player).getHandle(), (byte) 2)); + } + }, 2 * i); + } + + return "I hope you're not too shocked..."; + } + }); + + _tricks.add(new ITrick() // Creepy head spazmes + { + @Override + public String onTrick(final Player player) + { + for (int i = 0 ; i < UtilMath.r(5) ; i++) + player.playSound(player.getLocation(), i % 2 == 0 ? Sound.GHAST_SCREAM : Sound.GHAST_SCREAM2, 1.5F, 0F); + + player.playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1.2F, 0F); + + player.playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 1.2F, 0F); + player.playSound(player.getLocation(), Sound.CREEPER_HISS, 1.2F, 0F); + + for (int i = 0 ; i < 5 ; i++) + player.playSound(player.getLocation(), Sound.ENDERMAN_SCREAM, 1.2F, 0F); + + for (int i = 0 ; i < 40 ; i++) + { + final int i2 = i; + Bukkit.getScheduler().runTaskLater(_plugin, new Runnable() + { + @Override + public void run() + { + UtilPlayer.sendPacket(player, new PacketPlayOutEntityLook(player.getEntityId(), (byte) player.getLocation().getYaw(), (byte) ((i2 % 2 == 0 ? 1 : -1) * 80), true)); + } + }, i); + } + + return "What is wrong with your head, dear?"; + } + }); + } + + public Trick(Player player, String villager) + { + UtilPlayer.message(player, C.cGoldB + villager + ": " + C.cYellowB + nextTrick(player.getName()).onTrick(player)); + } +} diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java index dd2c17dcc..23ff9525c 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java @@ -204,7 +204,7 @@ public class BlockToss extends SkillCharge implements IThrown //Action UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0, 0, 1, true); - Factory.Projectile().AddThrow(block, cur, this, -1, true, true, true, + Factory.Projectile().AddThrow(block, cur, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1.2f); //Event diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java index 2d10d7972..edcb302ae 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/FleshHook.java @@ -107,7 +107,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown UtilAction.velocity(item, cur.getLocation().getDirection(), 1 + charge , false, 0, 0.2, 20, false); - Factory.Projectile().AddThrow(item, cur, this, -1, true, true, true, + Factory.Projectile().AddThrow(item, cur, this, -1, true, true, true, true, Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 0.6f); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FreezingBlast.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FreezingBlast.java index 5a60452db..b911be595 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FreezingBlast.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FreezingBlast.java @@ -69,7 +69,7 @@ public class FreezingBlast extends SkillActive implements IThrown //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79)); item.setVelocity(player.getLocation().getDirection()); - Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, + Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, true, Sound.FIZZ, 0.6f, 1.6f, null, 0, UpdateType.FASTEST, 1f); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java index aa7e359f0..9a8450374 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/GlacialBlade.java @@ -72,7 +72,7 @@ public class GlacialBlade extends SkillActive implements IThrown //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()).subtract(0, 0.2, 0), ItemStackFactory.Instance.CreateStack(370)); UtilAction.velocity(item, player.getLocation().getDirection(), 1.6, false, 0, 0.2, 10, false); - Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, + Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, true, null, 0, 0, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 0.3f); //Effect diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java index 339669ce4..153c00eff 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/IcePrison.java @@ -70,7 +70,7 @@ public class IcePrison extends SkillActive implements IThrown //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79)); item.setVelocity(player.getLocation().getDirection()); - Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, + Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, true, Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5f); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java index 125bb24f6..693f06299 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/LightningOrb.java @@ -101,7 +101,7 @@ public class LightningOrb extends SkillActive implements IThrown //Action Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(57)); item.setVelocity(player.getLocation().getDirection()); - Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 5000 - (400 * level), true, false, false, + Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 5000 - (400 * level), true, true, false, false, Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 0.4f); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java index 7765eb633..f3b1b406a 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java @@ -36,7 +36,7 @@ public class StaticLazer extends SkillChargeSword { super(skills, name, classType, skillType, cost, maxLevel, 0.012f, 0.004f, - 12000, -1000, true, true, + 16000, -1000, true, true, false, true); SetDesc(new String[] @@ -48,24 +48,25 @@ public class StaticLazer extends SkillChargeSword "Taking damage cancels charge.", "", "Deals #6#1 damage and travels up to", - "#20#10 blocks.", + "#20#10 blocks, but loses 1 damage", + "per 20 blocks travelled.", }); _fireOnFull = false; - _energyPerCharge = 1.2f; + _energyPerCharge = 2.4f; setAchievementSkill(true); } @Override public String GetRechargeString() { - return "Recharge: " + "#12#-1 Seconds"; + return "Recharge: " + "#16#-1 Seconds"; } @Override public String GetEnergyString() { - return "Energy: " + "24 per Second"; + return "Energy: " + "48 per Second"; } @Override @@ -82,7 +83,7 @@ public class StaticLazer extends SkillChargeSword Location newTarget = player.getEyeLocation().add(player.getLocation().getDirection().multiply(curRange)); //Hit Player - HashMap hits = UtilEnt.getInRadius(newTarget, 2); + HashMap hits = UtilEnt.getInRadius(newTarget, 1.25); hits.remove(player); if (!hits.isEmpty()) break; @@ -116,7 +117,7 @@ public class StaticLazer extends SkillChargeSword //Damage Event Factory.Damage().NewDamageEvent(other, player, null, - DamageCause.CUSTOM, 6 + level * charge, true, true, false, + DamageCause.CUSTOM, 2 + ((4 + level) * charge) - (curRange * 0.05), true, true, false, player.getName(), GetName()); } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java index e7b460fe3..0374f2a6a 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java @@ -7,6 +7,7 @@ import mineplex.core.common.util.C; import org.bukkit.ChatColor; import org.bukkit.Location; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; @@ -36,6 +37,7 @@ public class CustomDamageEvent extends Event implements Cancellable private Player _damagerPlayer; private Projectile _projectile; private Location _knockbackOrigin = null; + private Entity _knockbackSource = null; //Flags private boolean _ignoreArmor = false; @@ -46,7 +48,7 @@ public class CustomDamageEvent extends Event implements Cancellable public CustomDamageEvent(LivingEntity damagee, LivingEntity damager, Projectile projectile, DamageCause cause, double damage, boolean knockback, boolean ignoreRate, boolean ignoreArmor, - String initialSource, String initialReason, boolean cancelled) + String initialSource, String initialReason, boolean cancelled, Entity knockbackSource) { _eventCause = cause; @@ -64,6 +66,8 @@ public class CustomDamageEvent extends Event implements Cancellable _knockback = knockback; _ignoreRate = ignoreRate; _ignoreArmor = ignoreArmor; + + _knockbackSource = knockbackSource; if (initialSource != null && initialReason != null) AddMod(initialSource, initialReason, 0, true); @@ -266,6 +270,9 @@ public class CustomDamageEvent extends Event implements Cancellable public Location getKnockbackOrigin() { + if (_knockbackSource != null) + return _knockbackSource.getLocation(); + return _knockbackOrigin; } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java index e58efe9b1..e583cdcd6 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java @@ -32,6 +32,7 @@ import org.bukkit.Sound; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Arrow; +import org.bukkit.entity.Entity; import org.bukkit.entity.Fish; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -167,17 +168,35 @@ public class DamageManager extends MiniPlugin { NewDamageEvent(damagee, damager, proj, cause, damage, knockback, ignoreRate, ignoreArmor, - source, reason, false); + source, reason, false, null); } - + + public void NewDamageEvent(LivingEntity damagee, LivingEntity damager, Projectile proj, + DamageCause cause, double damage, boolean knockback, boolean ignoreRate, boolean ignoreArmor, + String source, String reason, Entity knockbackSource) + { + NewDamageEvent(damagee, damager, proj, + cause, damage, knockback, ignoreRate, ignoreArmor, + source, reason, false, knockbackSource); + } + public void NewDamageEvent(LivingEntity damagee, LivingEntity damager, Projectile proj, DamageCause cause, double damage, boolean knockback, boolean ignoreRate, boolean ignoreArmor, String source, String reason, boolean cancelled) + { + NewDamageEvent(damagee, damager, proj, + cause, damage, knockback, ignoreRate, ignoreArmor, + source, reason, cancelled, null); + } + + public void NewDamageEvent(LivingEntity damagee, LivingEntity damager, Projectile proj, + DamageCause cause, double damage, boolean knockback, boolean ignoreRate, boolean ignoreArmor, + String source, String reason, boolean cancelled, Entity knockbackSource) { _plugin.getServer().getPluginManager().callEvent( new CustomDamageEvent(damagee, damager, proj, cause, damage, knockback, ignoreRate, ignoreArmor, - source, reason, cancelled)); + source, reason, cancelled, knockbackSource)); } @EventHandler(priority = EventPriority.LOW) 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 1cc41f938..da25cb3c3 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 @@ -42,9 +42,9 @@ public class Fire extends MiniPlugin _damageManager = damageManager; } - public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double d, String skillName) + public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName) { - _fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, d, skillName)); + _fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, damage, skillName)); item.setPickupDelay(0); } diff --git a/Plugins/Mineplex.StaffServer/.classpath b/Plugins/Mineplex.StaffServer/.classpath index e03947a20..4a5882bf2 100644 --- a/Plugins/Mineplex.StaffServer/.classpath +++ b/Plugins/Mineplex.StaffServer/.classpath @@ -11,6 +11,6 @@ - + diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkBlockTossEVO.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkBlockTossEVO.java index d72652411..ff3419b10 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkBlockTossEVO.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkBlockTossEVO.java @@ -158,7 +158,7 @@ public class PerkBlockTossEVO extends Perk implements IThrown //Action UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0.2, 0, 1, true); - Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1f); //Event diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkSulphurBombEVO.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkSulphurBombEVO.java index b38629a80..504ee6d9a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkSulphurBombEVO.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/mobs/perks/PerkSulphurBombEVO.java @@ -82,7 +82,7 @@ public class PerkSulphurBombEVO extends Perk implements IThrown UtilAction.velocity(ent, player.getLocation().getDirection(), 1, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, Effect.SMOKE, 1, UpdateType.SLOW, 1f); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java index 5a7f6a0de..2e519edc8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/BombLobbers.java @@ -229,7 +229,7 @@ public class BombLobbers extends TeamGame implements IThrown canHit.add(pos); } - Manager.GetProjectile().AddThrow(tnt, player, this, -1L, true, false, true, .2F, canHit); + Manager.GetProjectile().AddThrow(tnt, player, this, -1L, true, true, false, true, .2F, canHit); Manager.getPlugin().getServer().getPluginManager().callEvent(new TNTThrowEvent(player, tnt)); @@ -343,7 +343,7 @@ public class BombLobbers extends TeamGame implements IThrown newTNT.setVelocity(tnt.getKey().getVelocity()); newTNT.setFuseTicks(60); - Manager.GetProjectile().AddThrow(newTNT, thrower, this, -1L, true, false, true, .2F); + Manager.GetProjectile().AddThrow(newTNT, thrower, this, -1L, true, true, false, true, .2F); tnt.getKey().remove(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkMortar.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkMortar.java index db295ff13..de34929a5 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkMortar.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/lobbers/kits/perks/PerkMortar.java @@ -68,7 +68,7 @@ public class PerkMortar extends Perk tnt.setFuseTicks(40); UtilAction.velocity(tnt, player.getLocation().getDirection(), 2.0D, false, 0.0D, 0.1D, 10.0D, false); - Manager.GetProjectile().AddThrow(tnt, player, l, -1L, true, false, false, .2F); + Manager.GetProjectile().AddThrow(tnt, player, l, -1L, true, true, false, false, .2F); player.playSound(player.getLocation(), Sound.CREEPER_HISS, 3.0F, 1.0F); @@ -107,7 +107,7 @@ public class PerkMortar extends Perk tnt.setFuseTicks(60); UtilAction.velocity(tnt, event.getTNT().getVelocity().add(new Vector(i / 5, 0, i / 5)).normalize(), 2.0D, false, 0.0D, 0.1D, 10.0D, false); - Manager.GetProjectile().AddThrow(tnt, event.getPlayer(), l, -1L, true, false, false, .2F); + Manager.GetProjectile().AddThrow(tnt, event.getPlayer(), l, -1L, true, true, false, false, .2F); // l.addThrower(event.getPlayer(), tnt); _scatter.add(tnt); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java index 6e255aea9..2fcd7a276 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/SuperSmash.java @@ -26,6 +26,7 @@ import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam.PlayerState; import nautilus.game.arcade.game.games.smash.kits.KitBlaze; import nautilus.game.arcade.game.games.smash.kits.KitChicken; +import nautilus.game.arcade.game.games.smash.kits.KitCow; import nautilus.game.arcade.game.games.smash.kits.KitCreeper; import nautilus.game.arcade.game.games.smash.kits.KitEnderman; import nautilus.game.arcade.game.games.smash.kits.KitGolem; @@ -109,6 +110,7 @@ public abstract class SuperSmash extends Game new KitWitherSkeleton(manager), new KitMagmaCube(manager), new KitZombie(manager), + new KitCow(manager), new KitSheep(manager) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitChicken.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitChicken.java index 91f27649c..bb4b110f9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitChicken.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitChicken.java @@ -33,7 +33,7 @@ public class KitChicken extends SmashKit new Perk[] { - new PerkSmashStats(4, 2.0, 0.1, 1.5), + new PerkSmashStats(4, 2.0, 0.15, 2), new PerkFlap(0.8, 0.8, false), new PerkEggGun(), new PerkChickenRocket() @@ -89,7 +89,7 @@ public class KitChicken extends SmashKit ChatColor.RESET + "while also gaining permanant flight.", })); - player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.LEATHER_CHESTPLATE)); + player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_CHESTPLATE)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitCow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitCow.java index 207ff9c34..b8bd5b816 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitCow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitCow.java @@ -2,15 +2,24 @@ package nautilus.game.arcade.game.games.smash.kits; import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.Sound; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; +import mineplex.core.common.util.F; import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilPlayer; import mineplex.core.disguise.disguises.DisguiseCow; +import mineplex.core.disguise.disguises.DisguiseMooshroom; import mineplex.core.itemstack.ItemStackFactory; import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.game.Game.GameState; +import nautilus.game.arcade.game.games.smash.perks.PerkCowAngryHerd; +import nautilus.game.arcade.game.games.smash.perks.PerkCowMilkSpiral; +import nautilus.game.arcade.game.games.smash.perks.PerkCowMooshroomMadness; +import nautilus.game.arcade.game.games.smash.perks.PerkCowStampede; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; @@ -20,7 +29,7 @@ public class KitCow extends SmashKit { public KitCow(ArcadeManager manager) { - super(manager, "Mad Cow", KitAvailability.Gem, 5000, + super(manager, "Cow", KitAvailability.Gem, 6000, new String[] { @@ -28,14 +37,16 @@ public class KitCow extends SmashKit new Perk[] { - new PerkSmashStats(7, 1.0, 0.25, 8), + new PerkSmashStats(6, 0.9, 0.25, 7.5), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), - - + new PerkCowStampede(), + new PerkCowAngryHerd(), + new PerkCowMilkSpiral(), + new PerkCowMooshroomMadness(), }, EntityType.COW, new ItemStack(Material.MILK_BUCKET), - "", 0, null); + "Mooshroom Madness", 0, null); } @Override @@ -44,24 +55,56 @@ public class KitCow extends SmashKit UtilInv.Clear(player); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, - C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Stampede", + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Angry Herd", new String[] { - ChatColor.RESET + "", + ChatColor.RESET + "Send forth an angry herd of Cows", + ChatColor.RESET + "which deal damage and knockback", + ChatColor.RESET + "to opponents. Can hit multiple times.", })); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SPADE, (byte)0, 1, - C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Body Slam", + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Milk Spiral", new String[] { + ChatColor.RESET + "Spray out a spiral of milk, propelling", + ChatColor.RESET + "yourself forwards through it. Deals damage", + ChatColor.RESET + "to opponents it collides with.", ChatColor.RESET + "", + ChatColor.RESET + "Crouching cancels propulsion.", })); + + if (Manager.GetGame().GetState() == GameState.Recruit) + { + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.LEATHER, (byte)0, 1, + C.cYellow + C.Bold + "Passive" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Stampede", + new String[] + { + ChatColor.RESET + "As you sprint, you will slowly", + ChatColor.RESET + "build up Speed Levels. You attacks", + ChatColor.RESET + "will deal extra damage and knockback", + ChatColor.RESET + "while you have Speed.", + })); + } + + if (Manager.GetGame().GetState() == GameState.Recruit) + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte)0, 1, + C.cYellow + C.Bold + "Smash Crystal" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Mooshroom Madness", + new String[] + { + ChatColor.RESET + "Transform into a powerful Mooshroom Cow.", + ChatColor.RESET + "This grants you +1 damage on all attacks", + ChatColor.RESET + "and abilities, halves ability cooldowns,", + ChatColor.RESET + "and increases your health to 15 hearts.", + ChatColor.RESET + "", + ChatColor.RESET + "You remain a Mooshroom until you die.", + })); 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.DIAMOND_BOOTS)); + player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitEnderman.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitEnderman.java index 21222ca52..dacd9344c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitEnderman.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitEnderman.java @@ -21,6 +21,7 @@ import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.game.Game.GameState; +import nautilus.game.arcade.game.games.smash.perks.PerkEndermanTeleport; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; @@ -50,6 +51,7 @@ public class KitEnderman extends SmashKit new PerkDoubleJump("Double Jump", 0.9, 0.9, false), new PerkBlink("Blink", 16, 6000), new PerkBlockToss(), + new PerkEndermanTeleport(), new PerkEndermanDragon() }, EntityType.ENDERMAN, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitGolem.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitGolem.java index cbab11fa3..88549d5da 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitGolem.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitGolem.java @@ -30,7 +30,7 @@ public class KitGolem extends SmashKit new Perk[] { - new PerkSmashStats(7, 1.0, 0.25, 8), + new PerkSmashStats(7, 1.0, 0.2, 8), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), new PerkSlow(0), new PerkFissure(), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitKnight.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitKnight.java index 98cdb65fc..73feb7ce8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitKnight.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitKnight.java @@ -214,13 +214,13 @@ public class KitKnight extends SmashKit Horse horse = (Horse)damagee.getVehicle(); //Damage Event - CustomDamageEvent newEvent = new CustomDamageEvent(horse, event.GetDamagerEntity(true), event.GetProjectile(), - event.GetCause(), event.GetDamageInitial(), true, false, false, - UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); +// CustomDamageEvent newEvent = new CustomDamageEvent(horse, event.GetDamagerEntity(true), event.GetProjectile(), +// event.GetCause(), event.GetDamageInitial(), true, false, false, +// UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); - _calledEvents.add(newEvent); - Manager.getPlugin().getServer().getPluginManager().callEvent(newEvent); - _calledEvents.remove(newEvent); +// _calledEvents.add(newEvent); +// Manager.getPlugin().getServer().getPluginManager().callEvent(newEvent); +// _calledEvents.remove(newEvent); } @EventHandler(priority = EventPriority.LOWEST) @@ -246,13 +246,13 @@ public class KitKnight extends SmashKit Player player = (Player)horse.getPassenger(); //Damage Event - final CustomDamageEvent newEvent = new CustomDamageEvent(player, event.GetDamagerEntity(true), event.GetProjectile(), - event.GetCause(), event.GetDamageInitial(), true, false, false, - UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); - - _calledEvents.add(newEvent); - Manager.getPlugin().getServer().getPluginManager().callEvent(newEvent); - _calledEvents.remove(newEvent); +// final CustomDamageEvent newEvent = new CustomDamageEvent(player, event.GetDamagerEntity(true), event.GetProjectile(), +// event.GetCause(), event.GetDamageInitial(), true, false, false, +// UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); +// +// _calledEvents.add(newEvent); +// Manager.getPlugin().getServer().getPluginManager().callEvent(newEvent); +// _calledEvents.remove(newEvent); //Add Knockback event.AddKnockback("Knockback Multiplier", 1.2); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitMagmaCube.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitMagmaCube.java index 98af5d8fa..4fca31e49 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitMagmaCube.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitMagmaCube.java @@ -30,7 +30,7 @@ public class KitMagmaCube extends SmashKit new Perk[] { - new PerkSmashStats(5, 1.75, 0.4, 5), + new PerkSmashStats(5, 1.75, 0.35, 5), new PerkDoubleJump("Double Jump", 1.2, 1, false), new PerkMagmaBoost(), new PerkMagmaBlast(), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitPig.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitPig.java index 9dac8b5b3..755cfa69d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitPig.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitPig.java @@ -37,7 +37,7 @@ public class KitPig extends SmashKit new Perk[] { - new PerkSmashStats(5, 1.7, 0.25, 5), + new PerkSmashStats(5, 1.5, 0.25, 5), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), new PerkPigBaconBounce(), new PerkPigBaconBomb(), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeletalHorse.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeletalHorse.java index 9fb2f108b..db9710e9c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeletalHorse.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeletalHorse.java @@ -36,7 +36,7 @@ public class KitSkeletalHorse extends SmashKit new Perk[] { - new PerkSmashStats(6, 1.4, 0.35, 6), + new PerkSmashStats(6, 1.4, 0.3, 6), new PerkDoubleJump("Double Jump", 1, 1, false), new PerkHorseKick(), new PerkBoneRush(), @@ -45,7 +45,7 @@ public class KitSkeletalHorse extends SmashKit }, EntityType.HORSE, new ItemStack(Material.BONE), - "Bone Storm", 24000, Sound.HORSE_SKELETON_DEATH); + "Bone Storm", 20000, Sound.HORSE_SKELETON_DEATH); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeleton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeleton.java index 8acafe07d..51ae9b75e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeleton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkeleton.java @@ -37,10 +37,10 @@ public class KitSkeleton extends SmashKit new Perk[] { - new PerkSmashStats(5, 1.25, 0.20, 6), + new PerkSmashStats(5, 1.25, 0.15, 6), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), - new PerkFletcher(2, 4, false), - new PerkKnockbackArrow(1.75), + new PerkFletcher(3, 3, false), + new PerkKnockbackArrow(1.5), new PerkBoneExplosion(), new PerkRopedArrow("Roped Arrow", 1, 5000), new PerkBarrage(5, 300, true, false, true), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkySquid.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkySquid.java index ec5ba59fb..06b78a82e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkySquid.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSkySquid.java @@ -13,6 +13,7 @@ import mineplex.core.disguise.disguises.DisguiseSquid; import mineplex.core.itemstack.ItemStackFactory; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.game.Game.GameState; +import nautilus.game.arcade.game.games.smash.perks.PerkFishFlurry; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; @@ -38,6 +39,7 @@ public class KitSkySquid extends SmashKit new PerkDoubleJump("Double Jump", 0.9, 0.9, false), new PerkSuperSquid(), new PerkInkBlast(), + new PerkFishFlurry(), new PerkStormSquid() }, EntityType.SQUID, @@ -67,6 +69,16 @@ public class KitSkySquid extends SmashKit ChatColor.RESET + "the sky in the direction you are looking.", })); + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SPADE, (byte)0, 1, + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Fish Flurry", + new String[] + { + ChatColor.RESET + "Target a location to create a geyser.", + ChatColor.RESET + "After a few seconds, the geyser will explode", + ChatColor.RESET + "with all sorts of marine life which will", + ChatColor.RESET + "damage nearby opponents.", + })); + if (Manager.GetGame().GetState() == GameState.Recruit) player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte)0, 1, C.cYellow + C.Bold + "Smash Crystal" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Storm Squid", diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSlime.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSlime.java index 2d319f847..3e40fcc29 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSlime.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSlime.java @@ -46,7 +46,7 @@ public class KitSlime extends SmashKit new Perk[] { - new PerkSmashStats(6, 1.75, 0.35, 3), + new PerkSmashStats(6, 1.75, 0.5, 3), new PerkDoubleJump("Double Jump", 1.2, 1, false), new PerkSlimeSlam(), new PerkSlimeRocket(), @@ -142,7 +142,7 @@ public class KitSlime extends SmashKit player.setExp(0.99f); - Manager.GetCondition().Factory().Speed("Giga Slime", player, player, 20, 1, false, false, false); + Manager.GetCondition().Factory().Speed("Giga Slime", player, player, 20, 2, false, false, false); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSnowman.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSnowman.java index 68eb1004d..4771d3865 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSnowman.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSnowman.java @@ -92,8 +92,8 @@ public class KitSnowman extends SmashKit new String[] { ChatColor.RESET + "Creates a field of snow around you", - ChatColor.RESET + "granting 150% damage to opponents", - ChatColor.RESET + "who are standing on it.", + ChatColor.RESET + "granting +1 damage and 60% knockback", + ChatColor.RESET + "to opponents standing on it.", ChatColor.RESET + "", ChatColor.RESET + "Your aura shrinks on low energy.", })); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSpider.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSpider.java index 2dd3c0108..89cfb0379 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSpider.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitSpider.java @@ -34,7 +34,7 @@ public class KitSpider extends SmashKit new Perk[] { - new PerkSmashStats(7, 1.5, 0.3, 6), + new PerkSmashStats(6, 1.5, 0.25, 6), new PerkSpiderLeap(), new PerkNeedler(), new PerkWebShot(), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java index 6ec3cf4b0..71e08c798 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java @@ -34,7 +34,7 @@ public class KitWolf extends SmashKit new Perk[] { - new PerkSmashStats(5, 1.6, 0.3, 4.5), + new PerkSmashStats(5, 1.6, 0.25, 4.5), new PerkDoubleJump("Wolf Jump", 1.0, 1.0, true), new PerkWolf(), }, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java index 08ea676e6..7ab935e7c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java @@ -37,7 +37,7 @@ public class KitZombie extends SmashKit new Perk[] { - new PerkSmashStats(6, 1.25, 0.3, 4.5), + new PerkSmashStats(6, 1.25, 0.25, 5), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), new PerkFletcher(2, 2, false), new PerkKnockbackArrow(1.5), @@ -66,7 +66,7 @@ public class KitZombie extends SmashKit })); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, - C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Deaths Grasp", + C.cYellow + C.Bold + "Left-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Deaths Grasp", new String[] { ChatColor.RESET + "Leap forwards. If you collide with an ", @@ -99,6 +99,7 @@ public class KitZombie extends SmashKit player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_CHESTPLATE)); player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS)); + player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowCharge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowCharge.java new file mode 100644 index 000000000..a03be6065 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowCharge.java @@ -0,0 +1,36 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import org.bukkit.Location; +import org.bukkit.entity.Cow; +import org.bukkit.entity.Player; +import org.bukkit.util.Vector; + +public class DataCowCharge +{ + public long Time; + public Player Player; + public Vector Direction; + + public Cow Cow; + + public Location LastLoc; + public long LastMoveTime; + + public DataCowCharge(Player player, Cow cow) + { + Time = System.currentTimeMillis(); + + Player = player; + + Direction = player.getLocation().getDirection(); + Direction.setY(0); + Direction.normalize(); + Direction.multiply(0.75); + Direction.setY(-0.2); + + Cow = cow; + + LastLoc = Cow.getLocation(); + LastMoveTime = System.currentTimeMillis(); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowMilkSpiral.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowMilkSpiral.java new file mode 100644 index 000000000..f4bb60f93 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataCowMilkSpiral.java @@ -0,0 +1,112 @@ +package nautilus.game.arcade.game.games.smash.perks; + +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.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; + +import org.bukkit.Location; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.util.Vector; + +public class DataCowMilkSpiral +{ + public long Time; + public Player Player; + public Vector Direction; + + public boolean SuperActive; + + public boolean DisableVelocity = false; + + public Location Spiral; + public Location SpiralA = null; + public Location SpiralB = null; + + public DataCowMilkSpiral(Player player, boolean superActive) + { + Time = System.currentTimeMillis(); + + Player = player; + + SuperActive = superActive; + + Direction = player.getLocation().getDirection(); + + Spiral = player.getLocation().add(new Vector(0,1,0)).add(player.getLocation().getDirection().multiply(2)); + } + + public boolean update() + { + //Propel + if (!DisableVelocity && !Player.isSneaking() && !UtilTime.elapsed(Time, SuperActive ? 2400 : 1800)) + UtilAction.velocity(Player, Direction.clone().add(new Vector(0, 0.1, 0)).normalize().multiply(0.45)); + else + DisableVelocity = true; + + //Move Forward + Spiral.add(Direction.clone().multiply(0.7)); + + //Spiral + for (int i=0 ; i<2 ; i++) + { + double lead = i * ((2d * Math.PI)/2); + + //Orbit + double speed = 3d; + double oX = -Math.sin(Player.getTicksLived()/speed + lead) * 1.5; + double oZ = Math.cos(Player.getTicksLived()/speed + lead) * 1.5; + + Location newSpiral = Spiral.clone(); + newSpiral.add(UtilAlg.getLeft(Direction).multiply(oX)); + newSpiral.add(UtilAlg.getUp(Direction).multiply(oZ)); + + newSpiral.getWorld().playSound(newSpiral, Sound.SPLASH, 0.2f, 0.75f); + + if (i == 0) + { + if (SpiralA != null) + { + while (UtilMath.offset(SpiralA, newSpiral) > 0.2) + { + SpiralA.add(UtilAlg.getTrajectory(SpiralA, newSpiral).multiply(0.2)); + UtilParticle.PlayParticle(SuperActive ? ParticleType.RED_DUST : ParticleType.FIREWORKS_SPARK, SpiralA, 0, 0, 0, 0, 1, ViewDist.LONG, UtilServer.getPlayers()); + } + } + else + { + SpiralA = newSpiral; + } + } + + + else + { + if (SpiralB != null) + { + while (UtilMath.offset(SpiralB, newSpiral) > 0.1) + { + SpiralB.add(UtilAlg.getTrajectory(SpiralB, newSpiral).multiply(0.1)); + UtilParticle.PlayParticle(SuperActive ? ParticleType.RED_DUST : ParticleType.FIREWORKS_SPARK, SpiralB, 0, 0, 0, 0, 1, ViewDist.LONG, UtilServer.getPlayers()); + } + } + else + { + SpiralB = newSpiral; + } + } + } + + if (UtilBlock.solid(Spiral.getBlock())) + return true; + + return (UtilTime.elapsed(Time, 3000)); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataSquidGeyser.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataSquidGeyser.java new file mode 100644 index 000000000..298a40fe3 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/DataSquidGeyser.java @@ -0,0 +1,20 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.HashSet; + +import org.bukkit.block.Block; +import org.bukkit.entity.Player; + +public class DataSquidGeyser +{ + public Player Player; + public HashSet Blocks; + public long StartTime; + + public DataSquidGeyser(Player player, HashSet blocks) + { + StartTime = System.currentTimeMillis(); + Player = player; + Blocks = blocks; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowAngryHerd.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowAngryHerd.java new file mode 100644 index 000000000..c28fec9ae --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowAngryHerd.java @@ -0,0 +1,213 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.ArrayList; +import java.util.Iterator; + +import org.bukkit.Location; +import org.bukkit.Sound; +import org.bukkit.entity.Cow; +import org.bukkit.entity.MushroomCow; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.util.Vector; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.disguise.disguises.DisguiseBase; +import mineplex.core.disguise.disguises.DisguiseMooshroom; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.kit.SmashPerk; + +public class PerkCowAngryHerd extends SmashPerk +{ + private ArrayList _active = new ArrayList(); + + public PerkCowAngryHerd() + { + super("Angry Herd", new String[] + { + C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Angry Herd" + }); + } + + + @EventHandler + public void shoot(PlayerInteractEvent event) + { + 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() == null) + return; + + if (!event.getPlayer().getItemInHand().getType().toString().contains("_AXE")) + return; + + Player player = event.getPlayer(); + + if (!Kit.HasKit(player)) + return; + + if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? 6000 : 12000, true, true)) + return; + + event.setCancelled(true); + + for (double i=-2 ; i<3 ; i++) + { + Vector dir = player.getLocation().getDirection(); + dir.setY(0); + dir.normalize(); + + Location loc = player.getLocation(); + + loc.add(dir); + loc.add(UtilAlg.getLeft(dir).multiply(i*1.5)); + + Manager.GetGame().CreatureAllowOverride = true; + Cow cow = player.getWorld().spawn(loc, isSuperActive(player) ? MushroomCow.class : Cow.class); + Manager.GetGame().CreatureAllowOverride = false; + + _active.add(new DataCowCharge(player, cow)); + } + + //Sound + player.getWorld().playSound(player.getLocation(), Sound.COW_IDLE, 2f, 0.6f); + + //Inform + UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + ".")); + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + Iterator activeIter = _active.iterator(); + + while (activeIter.hasNext()) + { + DataCowCharge data = activeIter.next(); + + //Expire + if (UtilTime.elapsed(data.Time, 3000)) + { + if (data.Cow.isValid()) + { + data.Cow.remove(); + UtilParticle.PlayParticle(ParticleType.EXPLODE, data.Cow.getLocation().add(0, 1, 0), 0, 0, 0, 0, 1, ViewDist.NORMAL, UtilServer.getPlayers()); + } + + activeIter.remove(); + continue; + } + + //Set Moved + if (UtilMath.offset(data.Cow.getLocation(), data.LastLoc) > 1) + { + + data.LastLoc = data.Cow.getLocation(); + data.LastMoveTime = System.currentTimeMillis(); + } + + //Stuck Remove + if (UtilTime.elapsed(data.LastMoveTime, 1000)) + { + if (data.Cow.isValid()) + { + data.Cow.remove(); + UtilParticle.PlayParticle(ParticleType.EXPLODE, data.Cow.getLocation().add(0, 1, 0), 0, 0, 0, 0, 1, ViewDist.NORMAL, UtilServer.getPlayers()); + } + + activeIter.remove(); + continue; + } + + //Gravity + if (UtilEnt.isGrounded(data.Cow)) + { + data.Direction.setY(-0.1); + } + else + { + data.Direction.setY(Math.max(-1, data.Direction.getY() - 0.03)); + } + + //Move + if (UtilTime.elapsed(data.LastMoveTime, 350) && UtilEnt.isGrounded(data.Cow)) + data.Cow.setVelocity(data.Direction.clone().add(new Vector(0,0.75,0))); + else + data.Cow.setVelocity(data.Direction); + + if (Math.random() > 0.99) + data.Cow.getWorld().playSound(data.Cow.getLocation(), Sound.COW_IDLE, 1f, 1f); + + if (Math.random() > 0.97) + data.Cow.getWorld().playSound(data.Cow.getLocation(), Sound.COW_WALK, 1f, 1.2f); + + //Hit + for (Player player : Manager.GetGame().GetPlayers(true)) + { + if (player.equals(data.Player)) + continue; + + if (UtilMath.offset(player, data.Cow) < 2.2) + { + if (Recharge.Instance.use(player, "Hit by " + data.Player.getName(), 600, false, false)) + { + //Damage Event + Manager.GetDamage().NewDamageEvent(player, data.Player, null, + DamageCause.CUSTOM, 5, true, true, false, + UtilEnt.getName(data.Player), GetName(), + data.Cow); + + UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.Cow.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0, 12, ViewDist.LONG, UtilServer.getPlayers()); + + data.Cow.getWorld().playSound(data.Cow.getLocation(), Sound.ZOMBIE_WOOD, 0.75f, 0.8f); + data.Cow.getWorld().playSound(data.Cow.getLocation(), Sound.COW_HURT, 1.5f, 0.75f); + } + } + } + } + } + + @EventHandler + public void Knockback(CustomDamageEvent event) + { + if (event.GetReason() == null || !event.GetReason().contains(GetName())) + return; + + event.AddKnockback(GetName(), 1.25); + } + + @Override + public boolean isSuperActive(Player player) + { + DisguiseBase disguise = Manager.GetDisguise().getDisguise(player); + + return disguise != null && disguise instanceof DisguiseMooshroom; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMilkSpiral.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMilkSpiral.java new file mode 100644 index 000000000..0bea3c61a --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMilkSpiral.java @@ -0,0 +1,111 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.HashMap; +import java.util.Iterator; + +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.disguise.disguises.DisguiseBase; +import mineplex.core.disguise.disguises.DisguiseMooshroom; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import nautilus.game.arcade.kit.SmashPerk; + +public class PerkCowMilkSpiral extends SmashPerk +{ + private HashMap _active = new HashMap(); + + public PerkCowMilkSpiral() + { + super("Milk Spiral", new String[] + { + C.cYellow + "Right Click" + C.cGray + " with Spade to " + C.cGreen + "Milk Spiral", + C.cGray + "Crouch to cancel movement for Milk Spiral" + }); + } + + @EventHandler + public void activate(PlayerInteractEvent event) + { + 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("_SPADE")) + return; + + Player player = event.getPlayer(); + + if (!Kit.HasKit(player)) + return; + + if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? 6000 : 12000, true, true)) + return; + + _active.put(player, new DataCowMilkSpiral(player, isSuperActive(player))); + + //Inform + UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + ".")); + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + Iterator activeIter = _active.values().iterator(); + + while (activeIter.hasNext()) + { + DataCowMilkSpiral data = activeIter.next(); + + if (data.update()) + activeIter.remove(); + + for (Player player : Manager.GetGame().GetPlayers(true)) + { + if (player.equals(data.Player)) + continue; + + if (UtilMath.offset(player.getLocation().add(0, 1, 0), data.Spiral) < 2) + { + Manager.GetDamage().NewDamageEvent(player, data.Player, null, + DamageCause.CUSTOM, 6, true, false, false, + player.getName(), GetName()); + + UtilParticle.PlayParticle(isSuperActive(player) ? ParticleType.RED_DUST : ParticleType.FIREWORKS_SPARK, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0.3f, 30, ViewDist.LONG, UtilServer.getPlayers()); + player.getWorld().playSound(player.getLocation(), Sound.SPLASH, 0.25f, 2f); + } + } + } + } + + @Override + public boolean isSuperActive(Player player) + { + DisguiseBase disguise = Manager.GetDisguise().getDisguise(player); + + return disguise != null && disguise instanceof DisguiseMooshroom; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMooshroomMadness.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMooshroomMadness.java new file mode 100644 index 000000000..4ec1a0909 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowMooshroomMadness.java @@ -0,0 +1,77 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.HashSet; + +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.entity.PlayerDeathEvent; + +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.disguise.disguises.DisguiseBase; +import mineplex.core.disguise.disguises.DisguiseMooshroom; +import mineplex.core.recharge.Recharge; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.kit.SmashPerk; + +public class PerkCowMooshroomMadness extends SmashPerk +{ + private HashSet _cowSuperActive = new HashSet(); + + public PerkCowMooshroomMadness() + { + super("Mooshroom Madness", new String[] + { + }, false); + } + + @Override + public void addSuperCustom(Player player) + { + _cowSuperActive.add(player.getName()); + + //Disguise + DisguiseMooshroom disguise = new DisguiseMooshroom(player); + + if (Manager.GetGame().GetTeam(player) != null) + disguise.setName(Manager.GetGame().GetTeam(player).GetColor() + player.getName()); + else + disguise.setName(player.getName()); + + disguise.setCustomNameVisible(true); + Manager.GetDisguise().disguise(disguise); + + //Armor + player.setMaxHealth(30); + player.setHealth(30); + + //Sound + player.getWorld().playSound(player.getLocation(), Sound.COW_HURT, 5f, 0.25f); + + //Recharges + Recharge.Instance.recharge(player, "Angry Herd"); + Recharge.Instance.recharge(player, "Milk Spiral"); + } + + @EventHandler + public void damageBuff(CustomDamageEvent event) + { + Player player = event.GetDamagerPlayer(true); + if (player == null) + return; + + if (_cowSuperActive.contains(player.getName())) + { + event.AddMod(player.getName(), GetName(), 1, false); + } + } + + @Override + public boolean isSuperActive(Player player) + { + DisguiseBase disguise = Manager.GetDisguise().getDisguise(player); + + return disguise != null && disguise instanceof DisguiseMooshroom; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowStampede.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowStampede.java new file mode 100644 index 000000000..287ba285e --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkCowStampede.java @@ -0,0 +1,197 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.WeakHashMap; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.disguise.disguises.DisguiseBase; +import mineplex.core.disguise.disguises.DisguiseMooshroom; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.minecraft.game.classcombat.Skill.SkillFactory; +import mineplex.minecraft.game.classcombat.Skill.ISkill.SkillType; +import mineplex.minecraft.game.classcombat.Skill.event.SkillEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.kit.SmashPerk; + +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +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.event.player.PlayerQuitEvent; +import org.bukkit.potion.PotionEffectType; + +public class PerkCowStampede extends SmashPerk +{ + private WeakHashMap _sprintTime = new WeakHashMap(); + private WeakHashMap _sprintStr = new WeakHashMap(); + + public PerkCowStampede() + { + super("Stampede", new String[] + { + C.cGray + "Build up Speed Levels as you sprint.", + C.cGray + "+1 damage for each Speed Level.", + }); + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.FASTER) + return; + + for (Player cur : UtilServer.getPlayers()) + { + if (!Kit.HasKit(cur)) + continue; + + //Active - Check for Disable + if (_sprintTime.containsKey(cur)) + { + //Stopped + if (!cur.isSprinting() || cur.getLocation().getBlock().isLiquid()) + { + _sprintTime.remove(cur); + _sprintStr.remove(cur); + cur.removePotionEffect(PotionEffectType.SPEED); + continue; + } + + long time = _sprintTime.get(cur); + int str = _sprintStr.get(cur); + + //Apply Speed + if (str > 0) + Manager.GetCondition().Factory().Speed(GetName(), cur, cur, 1.9, !isSuperActive(cur) ? str-1 : str, false, true, true); + + //Upgrade Speed + if (!UtilTime.elapsed(time, 3000)) + continue; + + _sprintTime.put(cur, System.currentTimeMillis()); + + if (str < 3) + { + _sprintStr.put(cur, str+1); + + //Effect + cur.getWorld().playSound(cur.getLocation(), Sound.COW_HURT, 2f, 0.75f + 0.25f * str); + } + + //Event + UtilServer.getServer().getPluginManager().callEvent(new SkillEvent(cur, GetName(), ClassType.Brute)); + } + else if (cur.isSprinting() || !cur.getLocation().getBlock().isLiquid()) + { + //Start Timer + if (!_sprintTime.containsKey(cur)) + { + _sprintTime.put(cur, System.currentTimeMillis()); + _sprintStr.put(cur, 0); + } + } + } + } + + @EventHandler + public void particle(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player ent : _sprintStr.keySet()) + { + if (_sprintStr.get(ent) <= 0) + continue; + + UtilParticle.PlayParticle(isSuperActive(ent) ? ParticleType.RED_DUST : ParticleType.CRIT, ent.getLocation(), + (float)(Math.random() - 0.5), 0.2f + (float)Math.random(), (float)(Math.random() - 0.5), 0, _sprintStr.get(ent) * 2, + ViewDist.NORMAL, UtilServer.getPlayers()); + } + } + + @EventHandler(priority = EventPriority.HIGH) + public void damage(CustomDamageEvent event) + { + if (event.IsCancelled()) + return; + + if (event.GetCause() != DamageCause.ENTITY_ATTACK) + return; + + Player damager = event.GetDamagerPlayer(false); + if (damager == null) return; + + if (!_sprintStr.containsKey(damager)) + return; + + if (_sprintStr.get(damager) == 0) + return; + + LivingEntity damagee = event.GetDamageeEntity(); + if (damagee == null) return; + + //Remove + _sprintTime.remove(damager); + int str = _sprintStr.remove(damager); + damager.removePotionEffect(PotionEffectType.SPEED); + + //Damage + event.AddMod(damager.getName(), GetName(), str, true); + event.AddKnockback(GetName(), 1 + (0.1 * str)); + + //Inform + UtilPlayer.message(damagee, F.main("Game", F.name(damager.getName()) + " hit you with " + F.skill(GetName()) + ".")); + + //Effect + damager.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_WOOD, 1f, 2f); + damager.getWorld().playSound(damager.getLocation(), Sound.COW_HURT, 2f, 2f); + + //Event + UtilServer.getServer().getPluginManager().callEvent(new SkillEvent(damager, GetName(), ClassType.Brute, damagee)); + } + + @EventHandler(priority = EventPriority.HIGH) + public void damageCancel(CustomDamageEvent event) + { + if (event.IsCancelled()) + return; + + Player damagee = event.GetDamageePlayer(); + if (damagee == null) return; + + clean(damagee); + Manager.GetCondition().EndCondition(damagee, null, GetName()); + } + + @EventHandler + public void quit(PlayerQuitEvent event) + { + clean(event.getPlayer()); + } + + public void clean(Player player) + { + _sprintTime.remove(player); + _sprintStr.remove(player); + } + + @Override + public boolean isSuperActive(Player player) + { + DisguiseBase disguise = Manager.GetDisguise().getDisguise(player); + + return disguise != null && disguise instanceof DisguiseMooshroom; + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java new file mode 100644 index 000000000..4cf3bb8ac --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java @@ -0,0 +1,118 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.HashMap; + +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerQuitEvent; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTextMiddle; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import nautilus.game.arcade.kit.SmashPerk; + +public class PerkEndermanTeleport extends SmashPerk +{ + private HashMap _target = new HashMap(); + private HashMap _charge = new HashMap(); + + public PerkEndermanTeleport() + { + super("Teleport", new String[] + { + C.cYellow + "Hold Sneak" + C.cGray + " to " + C.cGreen + "Teleport" + }); + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : UtilServer.getPlayers()) + { + if (!Kit.HasKit(player)) + continue; + + if (!player.isSneaking() || !Recharge.Instance.usable(player, GetName())) + { + _target.remove(player); + _charge.remove(player); + continue; + } + + Block block = player.getTargetBlock(null, 200); + + if (!_target.containsKey(player) || !_charge.containsKey(player)) + { + if (block == null || block.getType() == Material.AIR) + continue; + + _target.put(player, block); + _charge.put(player, 0f); + } + + //Invalid Block - End + if (block == null || block.getType() == Material.AIR) + { + _target.remove(player); + _charge.remove(player); + } + //Same Block - Increase Charge + else if (block.equals(_target.get(player))) + { + _charge.put(player, _charge.get(player) + 0.015f); + + UtilTextMiddle.display(null, UtilTextMiddle.progress(_charge.get(player)), 0, 10, 10, player); + + if (_charge.get(player) >= 1f) + { + UtilTextMiddle.display(null, C.cGreen + "Teleported", 0, 10, 10, player); + Recharge.Instance.useForce(player, GetName(), 5000); + + while (block.getRelative(BlockFace.UP).getType() != Material.AIR) + { + block = block.getRelative(BlockFace.UP); + } + + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f); + player.teleport(block.getLocation().add(0.5, 1, 0.5)); + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f); + + UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0.1f, 100, ViewDist.LONG, UtilServer.getPlayers()); + } + else + { + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 1f + _charge.get(player)); + UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0.05f, 10, ViewDist.LONG, UtilServer.getPlayers()); + } + } + //New Block - Reset + else + { + _target.put(player, block); + _charge.put(player, 0f); + } + } + } + + @EventHandler + public void clean(PlayerQuitEvent event) + { + _target.remove(event.getPlayer()); + _charge.remove(event.getPlayer()); + } +} + + diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkFishFlurry.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkFishFlurry.java new file mode 100644 index 000000000..65fb06b9b --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkFishFlurry.java @@ -0,0 +1,206 @@ +package nautilus.game.arcade.game.games.smash.perks; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; + +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Item; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.util.Vector; + +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.UtilEnt; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.projectile.IThrown; +import mineplex.core.projectile.ProjectileUser; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.kit.SmashPerk; + +public class PerkFishFlurry extends SmashPerk implements IThrown +{ + private ArrayList _active = new ArrayList(); + + public PerkFishFlurry() + { + super("Fish Flurry", new String[] + { + C.cYellow + "Right-Click" + C.cGray + " with Spade to use " + C.cGreen + "Fish Flurry" + }); + } + + + @EventHandler + public void shoot(PlayerInteractEvent event) + { + 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() == null) + return; + + if (!event.getPlayer().getItemInHand().getType().toString().contains("_SPADE")) + return; + + Player player = event.getPlayer(); + + if (isSuperActive(player)) + return; + + if (!Kit.HasKit(player)) + return; + + Block block = player.getTargetBlock(null, 64); + + if (block == null || block.getType() == Material.AIR) + { + UtilPlayer.message(player, F.main("Game", "You must target a block.")); + return; + } + + if (!Recharge.Instance.use(player, GetName(), 24000, true, true)) + return; + + event.setCancelled(true); + + HashSet blocks = new HashSet(); + + for (Block cur : UtilBlock.getInRadius(block, 3.5d).keySet()) + { + if (UtilBlock.airFoliage(cur)) + continue; + + if (!UtilBlock.airFoliage(cur.getRelative(BlockFace.UP))) + continue; + + blocks.add(cur); + } + + _active.add(new DataSquidGeyser(player, blocks)); + + //Inform + UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + ".")); + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + Iterator activeIter = _active.iterator(); + + while (activeIter.hasNext()) + { + DataSquidGeyser data = activeIter.next(); + + //paticles + for (Block block : data.Blocks) + UtilParticle.PlayParticle(ParticleType.SPLASH, block.getLocation().add(0.5, 1, 0.5), 0.25f, 0, 0.25f, 0, 10, ViewDist.LONG, UtilServer.getPlayers()); + + //sound + Block block = UtilAlg.Random(data.Blocks); + if (Math.random() > 0.5) + block.getWorld().playSound(block.getLocation(), Math.random() > 0.5 ? Sound.SPLASH : Sound.SPLASH2, 0.5f, 1f); + + //Fish + if (!UtilTime.elapsed(data.StartTime, 2000)) + { + + } + else if (!UtilTime.elapsed(data.StartTime, 6000)) + { + for (int i=0 ; i<1 ; i++) + { + Item fish = block.getWorld().dropItem(block.getLocation().add(0.5, 1.5, 0.5), + ItemStackFactory.Instance.CreateStack(Material.RAW_FISH, (byte)UtilMath.r(4), 1, "Fish" + System.currentTimeMillis())); + + Vector random = new Vector( + Math.random() - 0.5, + 1 + Math.random() * 1, + Math.random() - 0.5); + + + UtilAction.velocity(fish, random, 0.25 + 0.4 * Math.random(), false, 0, 0.2, 10, false); + + Manager.GetProjectile().AddThrow(fish, data.Player, this, + -1, true, false, true, true, + null, 1f, 1f, + null, UpdateType.TICK, 1f); + } + } + else + { + activeIter.remove(); + } + } + } + + @Override + public void Collide(LivingEntity target, Block block, ProjectileUser data) + { + if (target != null) + { + //Damage Event + Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, + DamageCause.PROJECTILE, 3, true, true, false, + UtilEnt.getName(data.GetThrower()), GetName()); + + UtilParticle.PlayParticle(ParticleType.EXPLODE, target.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0, 12, ViewDist.LONG, UtilServer.getPlayers()); + } + + data.GetThrown().remove(); + } + + @Override + public void Idle(ProjectileUser data) + { + data.GetThrown().remove(); + } + + @Override + public void Expire(ProjectileUser data) + { + data.GetThrown().remove(); + } + + + @EventHandler + public void Knockback(CustomDamageEvent event) + { + if (event.GetReason() == null || !event.GetReason().contains(GetName())) + return; + + event.AddKnockback(GetName(), 1.5); + + event.setKnockbackOrigin(event.GetDamageeEntity().getLocation().add(Math.random()-0.5, -0.1, Math.random()-0.5)); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/snowfight/SnowFight.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/snowfight/SnowFight.java index a2e27f88e..8c10034b1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/snowfight/SnowFight.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/snowfight/SnowFight.java @@ -153,7 +153,7 @@ public class SnowFight extends TeamGame { if(IsOnIce(player)) { - Bukkit.getPluginManager().callEvent(new CustomDamageEvent(player, null, null, DamageCause.CUSTOM, 2.0D, false, true, true, "Ice", "Ice", false)); + Bukkit.getPluginManager().callEvent(new CustomDamageEvent(player, null, null, DamageCause.CUSTOM, 2.0D, false, true, true, "Ice", "Ice", false, null)); } } @@ -510,7 +510,7 @@ public class SnowFight extends TeamGame if(player instanceof Player) { Player damagee = (Player) player; - Bukkit.getPluginManager().callEvent(new CustomDamageEvent(damagee, null, null, DamageCause.CUSTOM, damage, false, true, true, "Ice Meteoroid", "Ice Meteoroid", false)); + Bukkit.getPluginManager().callEvent(new CustomDamageEvent(damagee, null, null, DamageCause.CUSTOM, damage, false, true, true, "Ice Meteoroid", "Ice Meteoroid", false, null)); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java index 16df44336..3da737a34 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java @@ -3,6 +3,10 @@ package nautilus.game.arcade.game.games.turfforts; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -16,15 +20,19 @@ import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; +import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityShootBowEvent; +import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.event.player.PlayerQuitEvent; import net.minecraft.server.v1_7_R4.EntityArrow; import net.minecraft.server.v1_7_R4.Item; @@ -45,6 +53,8 @@ import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; +import nautilus.game.arcade.events.PlayerGameRespawnEvent; +import nautilus.game.arcade.events.PlayerKitGiveEvent; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.TeamGame; import nautilus.game.arcade.game.games.turfforts.kits.KitInfiltrator; @@ -103,9 +113,11 @@ public class TurfForts extends TeamGame private long _fightTime = 90000; private boolean _fight = false; private int _lines = 0; - + private HashMap _enemyTurf = new HashMap(); - + + private Set playersThatNeedBlocks = new HashSet(); + public TurfForts(ArcadeManager manager) { super(manager, GameType.TurfWars, @@ -266,7 +278,7 @@ public class TurfForts extends TeamGame EndCheck(); } } - + @EventHandler public void BowCancel(EntityShootBowEvent event) { @@ -284,7 +296,9 @@ public class TurfForts extends TeamGame { if (event.isCancelled()) // this statement might save just a small amount of time return; - + + + if (!IsAlive(event.getPlayer())) { event.setCancelled(true); @@ -296,6 +310,18 @@ public class TurfForts extends TeamGame event.setCancelled(true); return; } + + Block block = event.getBlock(); + + GameTeam team = GetTeam(event.getPlayer()); + GameTeam otherTeam = GetOtherTeam(team); + + if (block.getType().equals(Material.WOOL) && (block.getData() == 14 && team.GetColor() != ChatColor.RED) || (block.getData() == 3 && team.GetColor() != ChatColor.AQUA)) + { + UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot break the " + F.elem(otherTeam.GetColor() + otherTeam.GetName()) + " team's blocks!")); + event.setCancelled(true); + return; + } } @EventHandler(ignoreCancelled = true) @@ -525,13 +551,44 @@ public class TurfForts extends TeamGame { for (Player player : team.GetPlayers(true)) { - player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOL, team.GetColorData(), 24)); + if (UtilPlayer.isSpectator(player)) + { + this.playersThatNeedBlocks.add(player.getUniqueId()); + } + else + { + addBlocks(team, player); + } } } } } } - + + public void addBlocks(GameTeam team, Player player) + { + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOL, team.GetColorData(), 24)); + } + + @EventHandler(ignoreCancelled = true) + public void onQuit(PlayerQuitEvent event) + { + this.playersThatNeedBlocks.remove(event.getPlayer().getUniqueId()); + } + + @EventHandler(ignoreCancelled = true) + public void onSpawn(PlayerKitGiveEvent event) + { + Player player = event.GetPlayer(); + if (this.playersThatNeedBlocks.contains(player.getUniqueId())) + { + this.playersThatNeedBlocks.remove(player.getUniqueId()); + this.addBlocks(GetTeam(player), player); + } + } + + + @Override @EventHandler public void ScoreboardUpdate(UpdateEvent event) @@ -707,23 +764,6 @@ public class TurfForts extends TeamGame } */ - //Added by TheMineBench. - @EventHandler - public void blockBreak(BlockBreakEvent event) { - - Block block = event.getBlock(); - - GameTeam team = GetTeam(event.getPlayer()); - GameTeam otherTeam = GetOtherTeam(team); - - if (block.getType().equals(Material.WOOL) && (block.getData() == 14 && team.GetColor() != ChatColor.RED) || (block.getData() == 3 && team.GetColor() != ChatColor.AQUA)) - { - UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot break the " + F.elem(otherTeam.GetColor() + otherTeam.GetName()) + " team's blocks!")); - event.setCancelled(true); - return; - } - - } public GameTeam GetOtherTeam(GameTeam team) { return team.GetColor() == ChatColor.RED ? GetTeam(ChatColor.AQUA) : GetTeam(ChatColor.RED); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkArcticAura.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkArcticAura.java index cd84bcc8f..a6019a40b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkArcticAura.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkArcticAura.java @@ -47,17 +47,6 @@ public class PerkArcticAura extends Perk //Snow Manager.GetBlockRestore().Snow(block, (byte)1, (byte)1, (long)(duration * (1 + blocks.get(block))), 250, 0); } - - for (Player other : Manager.GetGame().GetPlayers(true)) - { - if (other.equals(player)) - continue; - - if (UtilMath.offset(player, other) > range) - continue; - - Manager.GetCondition().Factory().Slow("Aura Slow", other, player, 0.9, 0, false, false, false, false); - } } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBaconBlast.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBaconBlast.java index a815995cc..d69147917 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBaconBlast.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBaconBlast.java @@ -69,7 +69,7 @@ public class PerkBaconBlast extends Perk implements IThrown UtilAction.velocity(ent, player.getLocation().getDirection(), 1, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, 0.5f); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBatForm.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBatForm.java index e5a3216e0..cdbe1d699 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBatForm.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBatForm.java @@ -166,7 +166,7 @@ public class PerkBatForm extends SmashPerk } //Move - data.Location.add(data.Direction.clone().multiply(0.75)); + data.Location.add(data.Direction.clone().multiply(1)); //Effect UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, data.Location, 0, 0, 0, 0, 1, @@ -186,6 +186,9 @@ public class PerkBatForm extends SmashPerk HashMap targets = UtilEnt.getInRadius(data.Location, 10); for (LivingEntity cur : targets.keySet()) { + if (cur.equals(data.Shooter)) + continue; + Manager.GetDamage().NewDamageEvent(cur, data.Shooter, null, DamageCause.CUSTOM, 12 * targets.get(cur) + 0.5, true, false, false, data.Shooter.getName(), GetName()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlink.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlink.java index 554fe76a3..8d6e783c8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlink.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlink.java @@ -3,6 +3,7 @@ package nautilus.game.arcade.kit.perks; import org.bukkit.Color; import org.bukkit.Effect; import org.bukkit.Location; +import org.bukkit.Sound; import org.bukkit.FireworkEffect.Type; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -104,7 +105,9 @@ public class PerkBlink extends SmashPerk //Firework UtilFirework.playFirework(player.getEyeLocation(), Type.BALL, Color.BLACK, false, false); + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 1f); player.teleport(loc); + player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 1f); //Firework UtilFirework.playFirework(player.getEyeLocation(), Type.BALL, Color.BLACK, false, false); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockToss.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockToss.java index c65127338..4e759312c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockToss.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBlockToss.java @@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.projectile.IThrown; import mineplex.core.projectile.ProjectileUser; +import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; @@ -74,6 +75,9 @@ public class PerkBlockToss extends SmashPerk implements IThrown if (UtilBlock.usable(grab)) return; + + if (!Recharge.Instance.usable(player, GetName())) + return; if (!UtilBlock.airFoliage(grab.getRelative(BlockFace.UP)) || Manager.GetBlockRestore().Contains(grab.getRelative(BlockFace.UP))) { @@ -126,6 +130,9 @@ public class PerkBlockToss extends SmashPerk implements IThrown for (Player cur : throwSet) { + Recharge.Instance.recharge(cur, GetName()); + Recharge.Instance.use(cur, GetName(), 2000, false, true); + BlockTossData data = _hold.remove(cur); FallingBlock block = cur.getWorld().spawnFallingBlock(cur.getEyeLocation().add(cur.getLocation().getDirection()), data.Type, data.Data); @@ -143,7 +150,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown //Action UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0.2, 0, 1, true); - Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1f); //Event diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBoneExplosion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBoneExplosion.java index 12c099961..5a388d7ae 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBoneExplosion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBoneExplosion.java @@ -57,7 +57,7 @@ public class PerkBoneExplosion extends SmashPerk if (!Recharge.Instance.use(player, GetName(), 10000, true, true)) return; - HashMap nearby = UtilPlayer.getInRadius(player.getLocation(), 10); + HashMap nearby = UtilPlayer.getInRadius(player.getLocation(), 7); for (Player other : nearby.keySet()) { if (player.equals(other)) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCowBomb.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCowBomb.java index 5050e26e3..e3461cd2f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCowBomb.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCowBomb.java @@ -75,7 +75,7 @@ public class PerkCowBomb extends Perk implements IThrown UtilAction.velocity(ent, player.getLocation().getDirection(), 1.4, false, 0, 0.3, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, 0.5f); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperElectricity.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperElectricity.java index d2f7f5a6a..c9054de14 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperElectricity.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperElectricity.java @@ -55,6 +55,8 @@ public class PerkCreeperElectricity extends Perk SetPowered(damagee, true); + Manager.GetCondition().Factory().Speed(GetName(), damagee, damagee, 4, 1, false, false, false); + //Sound damagee.getWorld().playSound(damagee.getLocation(), Sound.CREEPER_HISS, 3f, 1.25f); @@ -117,8 +119,10 @@ public class PerkCreeperElectricity extends Perk //Inform UtilPlayer.message(damagee, F.main("Skill", "You hit " + F.elem(UtilEnt.getName(event.GetDamagerPlayer(false))) + " with " + F.skill(GetName()) + ".")); - //Lightning + //Elec damagee.getWorld().strikeLightningEffect(damagee.getLocation()); + Manager.GetCondition().Factory().Shock(GetName(), event.GetDamagerEntity(false), event.GetDamageeEntity(), 1, false, false); + SetPowered(damagee, false); //Damage Event diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperSulphurBomb.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperSulphurBomb.java index e5dc574de..e9759b073 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperSulphurBomb.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperSulphurBomb.java @@ -76,12 +76,12 @@ public class PerkCreeperSulphurBomb extends SmashPerk implements IThrown org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.COAL, (byte)0)); - UtilAction.velocity(ent, player.getLocation().getDirection(), 1, false, 0, 0.2, 10, false); + UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, - 0.5f); + 0.65f); //Inform UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + ".")); @@ -130,6 +130,6 @@ public class PerkCreeperSulphurBomb extends SmashPerk implements IThrown if (event.GetReason() == null || !event.GetReason().contains(GetName())) return; - event.AddKnockback(GetName(), 1.5); + event.AddKnockback(GetName(), 2); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeadlyBones.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeadlyBones.java index d8ea85b93..5ff154476 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeadlyBones.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeadlyBones.java @@ -106,6 +106,6 @@ public class PerkDeadlyBones extends SmashPerk if (event.GetReason() == null || !event.GetReason().contains(GetName())) return; - event.AddKnockback(GetName(), 3); + event.AddKnockback(GetName(), 2.5); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeathsGrasp.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeathsGrasp.java index 51883a447..2730c825b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeathsGrasp.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDeathsGrasp.java @@ -44,7 +44,7 @@ public class PerkDeathsGrasp extends Perk { super("Deaths Grasp", new String[] { - C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Deaths Grasp", + C.cYellow + "Left-Click" + C.cGray + " with Bow to use " + C.cGreen + "Deaths Grasp", C.cGray + "+100% Arrow Damage to enemies thrown by Deaths Grasp" }); } @@ -143,7 +143,7 @@ public class PerkDeathsGrasp extends Perk DamageCause.CUSTOM, 6, false, true, false, damager.getName(), GetName()); - UtilAction.velocity(damagee, UtilAlg.getTrajectory(damagee, damager), 1.8, false, 0, 1, 1.8, true); + UtilAction.velocity(damagee, UtilAlg.getTrajectory2d(damagee, damager), 1.6, false, 0, 1.2, 1.8, true); UtilAction.zeroVelocity(damager); @@ -156,6 +156,7 @@ public class PerkDeathsGrasp extends Perk UtilPlayer.message(damagee, F.main("Game", F.name(damager.getName()) + " hit you with " + F.skill(GetName()) + ".")); Recharge.Instance.recharge(damager, GetName()); + Recharge.Instance.use(damager, GetName(), 2000, true, true); } @EventHandler(priority = EventPriority.HIGH) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFirefly.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFirefly.java index 2907433d2..5b8a4d23a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFirefly.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFirefly.java @@ -20,6 +20,10 @@ import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilFirework; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; import mineplex.core.recharge.Recharge; @@ -89,7 +93,7 @@ public class PerkFirefly extends SmashPerk if (event.getType() != UpdateType.TICK) return; - _tick = (_tick + 1)%3; + _tick = (_tick + 1)%1000; Iterator dataIterator = _data.iterator(); @@ -106,26 +110,35 @@ public class PerkFirefly extends SmashPerk data.Player.getWorld().playSound(data.Player.getLocation(), Sound.EXPLODE, 0.2f, 0.6f); data.Location = data.Player.getLocation(); - if (_tick == 0) - { - //Firework - UtilFirework.playFirework(data.Player.getLocation().add(0, 0.6, 0), Type.BURST, Color.ORANGE, false, false); - } + //Sound and Effect + UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, data.Player.getLocation().add(0, 1, 0), 0.6f, 0.6f, 0.6f, 0, 10, ViewDist.LONG, UtilServer.getPlayers()); + float progress = (float)(System.currentTimeMillis()-data.Time)/1500f; + + data.Player.getWorld().playSound(data.Player.getLocation(), Sound.BLAZE_BREATH, 0.5f, 1f + progress); } //Velocity - else if (!UtilTime.elapsed(data.Time, 2500) || superActive) + else if (!UtilTime.elapsed(data.Time, 2750) || superActive) { UtilAction.velocity(data.Player, data.Player.getLocation().getDirection().multiply(superActive ? 0.9 : 0.7).add(new Vector(0,0.15,0))); data.Player.getWorld().playSound(data.Player.getLocation(), Sound.EXPLODE, 0.6f, 1.2f); - if (_tick == 0) + //Sound and Effect + if (!isSuperActive(data.Player)) { - //Firework - UtilFirework.playFirework(data.Player.getLocation().add(0, 0.6, 0), isSuperActive(data.Player) ? Type.BALL : Type.BURST, Color.RED, false, superActive); - } - - for (Player other : UtilPlayer.getNearby(data.Player.getLocation(), isSuperActive(data.Player) ? 6 : 4)) + UtilParticle.PlayParticle(ParticleType.FLAME, data.Player.getLocation().add(0, 1, 0), 0.6f, 0.6f, 0.6f, 0, 40, ViewDist.LONG, UtilServer.getPlayers()); + + data.Player.getWorld().playSound(data.Player.getLocation(), Sound.EXPLODE, 0.5f, 1.25f); + } + else + { + UtilParticle.PlayParticle(ParticleType.FLAME, data.Player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0, 60, ViewDist.LONG, UtilServer.getPlayers()); + UtilParticle.PlayParticle(ParticleType.LAVA, data.Player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0, 40, ViewDist.LONG, UtilServer.getPlayers()); + + data.Player.getWorld().playSound(data.Player.getLocation(), Sound.EXPLODE, 0.75f, 0.75f); + } + + for (Player other : UtilPlayer.getNearby(data.Player.getLocation(), isSuperActive(data.Player) ? 7 : 4)) { if (other.equals(data.Player)) continue; @@ -136,10 +149,9 @@ public class PerkFirefly extends SmashPerk other.playEffect(EntityEffect.HURT); if (_tick == 0) - if (!data.Targets.contains(other)) + { + if (Recharge.Instance.use(other, GetName() + " hit by " + data.Player.getName(), 2000, false, false)) { - data.Targets.add(other); - //Damage Event Manager.GetDamage().NewDamageEvent(other, data.Player, null, DamageCause.CUSTOM, 10, true, true, false, @@ -147,6 +159,7 @@ public class PerkFirefly extends SmashPerk UtilPlayer.message(other, F.main("Game", F.elem(Manager.GetColor(data.Player) + data.Player.getName()) + " hit you with " + F.elem(GetName()) + ".")); } + } } } else diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFlap.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFlap.java index 23056492c..490e1e79a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFlap.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFlap.java @@ -93,7 +93,7 @@ public class PerkFlap extends SmashPerk if (UtilEnt.isGrounded(player) || UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN))) { - player.setExp(0.999f); + player.setExp(Math.min(0.9999f, player.getExp() + 0.03f)); player.setAllowFlight(true); } else if (Recharge.Instance.usable(player, GetName()) && player.getExp() > 0) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIcePath.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIcePath.java index bc1bbd109..bfea95ac1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIcePath.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIcePath.java @@ -60,8 +60,8 @@ public class PerkIcePath extends Perk if (!Recharge.Instance.use(player, GetName(), 12000, true, true)) return; - UtilAction.zeroVelocity(player); - player.teleport(player.getLocation().add(0, 0.75, 0)); + player.teleport(player.getLocation().add(0, 1, 0)); + UtilAction.velocity(player, new Vector(0,0.5,0)); _data.add(new IcePathData(player)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInferno.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInferno.java index 739a9afc8..3d04b54bd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInferno.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInferno.java @@ -46,7 +46,8 @@ public class PerkInferno extends SmashPerk if (!Kit.HasKit(player)) continue; - player.setExp((float) Math.min(0.999, player.getExp()+0.015)); + if (!player.isBlocking()) + player.setExp((float) Math.min(0.999, player.getExp()+0.025)); } } @@ -105,7 +106,7 @@ public class PerkInferno extends SmashPerk //Fire Item fire = cur.getWorld().dropItem(cur.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER)); - Manager.GetFire().Add(fire, cur, 0.7, 0, 0.5, 1, "Inferno"); + Manager.GetFire().Add(fire, cur, 0.7, 0, 0.5, 1.25, "Inferno"); fire.teleport(cur.getEyeLocation()); double x = 0.07 - (UtilMath.r(14)/100d); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInkBlast.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInkBlast.java index 725b1ab07..7e977ed2b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInkBlast.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkInkBlast.java @@ -18,7 +18,11 @@ import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.projectile.IThrown; import mineplex.core.projectile.ProjectileUser; @@ -71,9 +75,10 @@ public class PerkInkBlast extends SmashPerk implements IThrown UtilInv.Update(player); - for (int i=0 ; i<7 ; i++) + for (int i=0 ; i<8 ; i++) { - org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.INK_SACK)); + org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), + ItemStackFactory.Instance.CreateStack(Material.INK_SACK, (byte)0, 1, "Ink" + Math.random())); Vector random = new Vector(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5); random.normalize(); @@ -84,9 +89,9 @@ public class PerkInkBlast extends SmashPerk implements IThrown UtilAction.velocity(ent, player.getLocation().getDirection().add(random), 1 + 0.4 * Math.random(), false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, - Effect.SMOKE, 4, UpdateType.TICK, + ParticleType.EXPLODE, UpdateType.TICK, 0.5f); } @@ -110,8 +115,8 @@ public class PerkInkBlast extends SmashPerk implements IThrown Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, DamageCause.PROJECTILE, 3, true, true, false, UtilEnt.getName(data.GetThrower()), GetName()); - - Manager.GetCondition().Factory().Blind(GetName(), target, data.GetThrower(), 1.5, 0, false, false, false); + + UtilParticle.PlayParticle(ParticleType.EXPLODE, target.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0, 12, ViewDist.LONG, UtilServer.getPlayers()); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIronHook.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIronHook.java index b707bf669..e629b7d8d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIronHook.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkIronHook.java @@ -63,7 +63,7 @@ public class PerkIronHook extends Perk implements IThrown UtilAction.velocity(item, player.getLocation().getDirection(), 1.8, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(item, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(item, player, this, -1, true, true, true, true, Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 0.6f); //Inform diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLazer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLazer.java index e1cf6acf9..34fdec4b0 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLazer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLazer.java @@ -151,7 +151,7 @@ public class PerkLazer extends Perk if (other.equals(player)) continue; - if (UtilMath.offset(newTarget, other.getLocation().add(0, 1, 0)) < 3) + if (UtilMath.offset(newTarget, other.getLocation().add(0, 1, 0)) < 2.5) { hitPlayer = true; break; @@ -189,7 +189,7 @@ public class PerkLazer extends Perk continue; //Do from center - if (UtilMath.offset(target, other.getLocation().add(0, 1, 0)) < 3.5) + if (UtilMath.offset(target, other.getLocation().add(0, 1, 0)) < 3) { //Damage Event Manager.GetDamage().NewDamageEvent(other, player, null, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java index 3844440ba..4c39ea23d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java @@ -57,7 +57,7 @@ public class PerkNeedler extends SmashPerk if (!Kit.HasKit(player)) return; - if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? 600 : 1800, !isSuperActive(player), !isSuperActive(player))) + if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? 600 : 2000, !isSuperActive(player), !isSuperActive(player))) return; _active.put(player, 8); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBomb.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBomb.java index c4d4511c2..ba3a225c8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBomb.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBomb.java @@ -69,7 +69,7 @@ public class PerkPigBaconBomb extends SmashPerk if (!Kit.HasKit(player)) return; - float energy = 0.40f; + float energy = 0.30f; DisguiseBase disguise = Manager.GetDisguise().getDisguise(player); if (disguise != null && disguise instanceof DisguisePigZombie) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBounce.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBounce.java index 934899998..cff63ed81 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBounce.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkPigBaconBounce.java @@ -89,7 +89,7 @@ public class PerkPigBaconBounce extends SmashPerk implements IThrown player.setExp(Math.max(0f, player.getExp() - energy)); //Launch - Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.PORK)); + Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.PORK, (byte) 0, 1, "Bacon"+System.currentTimeMillis())); UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false); Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.4f); ent.setPickupDelay(9999); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicSlam.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicSlam.java index f3ee858f5..4b41a42e4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicSlam.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSeismicSlam.java @@ -78,7 +78,7 @@ public class PerkSeismicSlam extends Perk if (!Kit.HasKit(player)) return; - if (!Recharge.Instance.use(player, GetName(), 6000, true, true)) + if (!Recharge.Instance.use(player, GetName(), 7000, true, true)) return; //Action @@ -115,7 +115,7 @@ public class PerkSeismicSlam extends Perk _live.remove(player); //Action - int damage = 11; + int damage = 10; double range = 8; HashMap targets = UtilEnt.getInRadius(player.getLocation(), range); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java index a0f5a5529..1b16508b9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java @@ -195,7 +195,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown UtilAction.velocity(slime, player.getLocation().getDirection(), 1 + charge/2d, false, 0, 0.2, 10, true); - Manager.GetProjectile().AddThrow(slime, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(slime, player, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1f); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkStormSquid.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkStormSquid.java index fd5f576e7..91086313b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkStormSquid.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkStormSquid.java @@ -93,7 +93,7 @@ public class PerkStormSquid extends SmashPerk //Damage Event Manager.GetDamage().NewDamageEvent(cur, player, null, - DamageCause.CUSTOM, 20 * targets.get(cur), false, true, false, + DamageCause.CUSTOM, 16 * targets.get(cur), false, true, false, player.getName(), GetName()); //Velocity diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSuperSquid.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSuperSquid.java index beb829f45..385cb0d51 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSuperSquid.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSuperSquid.java @@ -13,9 +13,12 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; @@ -93,8 +96,8 @@ public class PerkSuperSquid extends SmashPerk UtilAction.velocity(cur, 0.6, 0.1, 1, true); - cur.getWorld().playSound(cur.getLocation(), Sound.SPLASH2, 0.2f, 1f); - cur.getWorld().playEffect(cur.getLocation(), Effect.STEP_SOUND, 8); + cur.getWorld().playSound(cur.getLocation(), Sound.SPLASH2, 0.5f, 1f); + UtilParticle.PlayParticle(ParticleType.SPLASH, cur.getLocation().add(0, 0.5, 0), 0.3f, 0.3f, 0.3f, 0, 60, ViewDist.LONG, UtilServer.getPlayers()); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherImage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherImage.java index b37320e06..5a7fccc01 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherImage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherImage.java @@ -36,7 +36,8 @@ public class PerkWitherImage extends SmashPerk { super("Wither Image", new String[] { - C.cYellow + "Right-Click" + C.cGray + " with Axe to " + C.cGreen + "Wither Image" + C.cYellow + "Right-Click" + C.cGray + " with Axe to " + C.cGreen + "Wither Image", + C.cYellow + "Double Right-Click" + C.cGray + " with Axe to " + C.cGreen + "Wither Swap" }); } @@ -105,7 +106,7 @@ public class PerkWitherImage extends SmashPerk } else { - if (!Recharge.Instance.use(player, "Wither Swap", 1000, true, false)) + if (!Recharge.Instance.use(player, "Wither Swap", 2000, true, false)) return; Skeleton skel = _images.get(player); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java index f03f12567..de3505cc3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java @@ -191,7 +191,7 @@ public class PerkWitherSkull extends SmashPerk double scale = 0.4 + 0.6 * Math.min(1, skull.getTicksLived()/20d); //Players - HashMap players = UtilPlayer.getInRadius(skull.getLocation(), 7); + HashMap players = UtilPlayer.getInRadius(skull.getLocation(), 6); for (Player player : players.keySet()) { if (!Manager.GetGame().IsAlive(player)) @@ -199,7 +199,7 @@ public class PerkWitherSkull extends SmashPerk //Damage Event Manager.GetDamage().NewDamageEvent(player, (LivingEntity)skull.getShooter(), null, - DamageCause.CUSTOM, 2 + 10 * players.get(player) * scale, true, true, false, + DamageCause.CUSTOM, 12 * players.get(player) * scale, true, true, false, UtilEnt.getName((LivingEntity)skull.getShooter()), GetName()); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java index 57a79f2f9..594742f60 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWolf.java @@ -82,7 +82,7 @@ public class PerkWolf extends SmashPerk if (!Kit.HasKit(player)) return; - if (!Recharge.Instance.use(player, "Cub Tackle", isSuperActive(player) ? 800 : 8000, !isSuperActive(player), !isSuperActive(player))) + if (!Recharge.Instance.use(player, "Cub Tackle", isSuperActive(player) ? 1600 : 8000, !isSuperActive(player), !isSuperActive(player))) return; //Get Nearest Wolf @@ -255,7 +255,7 @@ public class PerkWolf extends SmashPerk if (!Kit.HasKit(player)) return; - if (!Recharge.Instance.use(player, "Wolf Strike", isSuperActive(player) ? 800 : 8000, !isSuperActive(player), !isSuperActive(player))) + if (!Recharge.Instance.use(player, "Wolf Strike", isSuperActive(player) ? 1600 : 8000, !isSuperActive(player), !isSuperActive(player))) return; //Velocity diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWoolBomb.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWoolBomb.java index 8615521fb..4dc6c0825 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWoolBomb.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWoolBomb.java @@ -107,7 +107,7 @@ public class PerkWoolBomb extends Perk implements IThrown UtilAction.velocity(ent, player.getLocation().getDirection(), 1, false, 0, 0.2, 10, false); - Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, + Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, 0.5f); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/data/FireflyData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/data/FireflyData.java index 10b4187a7..c04f9b167 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/data/FireflyData.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/data/FireflyData.java @@ -9,7 +9,6 @@ public class FireflyData public org.bukkit.entity.Player Player; public org.bukkit.Location Location; public long Time; - public HashSet Targets = new HashSet(); public FireflyData(org.bukkit.entity.Player player) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index a18abd254..0594c35ef 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -522,24 +522,17 @@ public class GameLobbyManager implements Listener, IPacketHandler { // WriteKitLine("Free", 0, 159, (byte)15); // WriteKitLine("Kits", 1, 159, (byte)4); - - ArrayList kitsA = new ArrayList(); - ArrayList kitsB = new ArrayList(); - - for (int i=0 ; i