robin hood regen nerf

This commit is contained in:
Chiss 2013-10-29 10:43:04 +11:00
parent ad487e48bd
commit 33c7d594a0

View File

@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -91,23 +92,43 @@ public class KitRobinHood extends SmashKit
@EventHandler
public void Aura(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW)
return;
for (Player player : Manager.GetGame().GetPlayers(true))
if (event.getType() == UpdateType.FAST)
{
if (!HasKit(player))
continue;
for (Player other : Manager.GetGame().GetPlayers(true))
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (other.equals(player))
if (!HasKit(player))
continue;
if (UtilMath.offset(player, other) > 8)
for (Player other : Manager.GetGame().GetPlayers(true))
{
if (other.equals(player))
continue;
if (UtilMath.offset(player, other) > 8)
continue;
Manager.GetCondition().Factory().Regen("Aura", other, player, 1.9, 0, false, false, false);
}
}
}
if (event.getType() == UpdateType.SLOW)
{
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (!HasKit(player))
continue;
Manager.GetCondition().Factory().Regen("Aura", other, player, 4.9, 0, false, false, false);
for (Player other : Manager.GetGame().GetPlayers(true))
{
if (other.equals(player))
continue;
if (UtilMath.offset(player, other) > 8)
continue;
UtilPlayer.health(other, 1);
}
}
}
}