Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex

Conflicts:
	Plugins/Mineplex.Hub/src/mineplex/hub/gadget/types/ItemGadget.java
	Plugins/Mineplex.Hub/src/mineplex/hub/mount/types/Mule.java
This commit is contained in:
Jonathan Williams 2013-10-26 10:47:14 -05:00
commit df36145800
9 changed files with 33 additions and 60 deletions

View File

@ -32,7 +32,7 @@ public abstract class ItemGadget extends Gadget
{ {
Manager.RemoveItem(player); Manager.RemoveItem(player);
player.getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName()))); player.getInventory().setItem(3, ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName())));
_active.add(player); _active.add(player);
@ -41,7 +41,7 @@ public abstract class ItemGadget extends Gadget
public void RemoveItem(Player player) public void RemoveItem(Player player)
{ {
player.getInventory().setItem(2, null); player.getInventory().setItem(3, null);
_active.remove(player); _active.remove(player);

View File

@ -12,7 +12,7 @@ public class Mule extends Mount
{ {
public Mule(MountManager manager) public Mule(MountManager manager)
{ {
super(manager, "Horse of Horror", new String[] super(manager, "Mount Mule", new String[]
{ {
"Muley muley!" "Muley muley!"
}, },

View File

@ -72,20 +72,4 @@ public class Undead extends Mount
} }
} }
} }
@EventHandler
public void Toggle(PlayerToggleSneakEvent event)
{
if (event.getPlayer().isSneaking())
return;
if (IsActive(event.getPlayer()))
{
this.Disable(event.getPlayer());
}
else
{
this.Enable(event.getPlayer());
}
}
} }

View File

@ -2,7 +2,6 @@ package nautilus.game.arcade.game.games.halloween;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
@ -14,7 +13,6 @@ import org.bukkit.block.Block;
import org.bukkit.entity.*; import org.bukkit.entity.*;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityBreakDoorEvent;
import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.entity.EntityTargetEvent;
@ -289,7 +287,9 @@ public class Halloween extends SoloGame
C.cAqua + "Kill monsters to keep their numbers down.", C.cAqua + "Kill monsters to keep their numbers down.",
C.cGreen + "Kill giants quickly.", C.cGreen + "Kill giants quickly.",
C.cAqua + "Defend your team mates from monsters.", C.cAqua + "Defend your team mates from monsters.",
C.cGreen + "Stick together to survive.", C.cGreen + "Zombies, Giants and Spiders get faster over time.",
C.cAqua + "Stick together to survive.",
C.cGreen + "The Pumpkin King gets harder over time!",
}; };
@EventHandler @EventHandler

View File

@ -1,8 +1,5 @@
package nautilus.game.arcade.game.games.halloween.creatures; package nautilus.game.arcade.game.games.halloween.creatures;
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.UtilMath;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -10,10 +7,9 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.Game;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftGhast;
import org.bukkit.entity.Ghast; import org.bukkit.entity.Ghast;
import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.util.Vector; import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
public class MobGhast extends CreatureBase<Ghast> public class MobGhast extends CreatureBase<Ghast>
{ {
@ -39,7 +35,8 @@ public class MobGhast extends CreatureBase<Ghast>
@Override @Override
public void Damage(CustomDamageEvent event) public void Damage(CustomDamageEvent event)
{ {
if (event.GetCause() == DamageCause.SUFFOCATION)
event.SetCancelled("Suffocation Cancel");
} }
@Override @Override
@ -51,34 +48,23 @@ public class MobGhast extends CreatureBase<Ghast>
@Override @Override
public void Update(UpdateEvent event) public void Update(UpdateEvent event)
{ {
/* if (event.getType() == UpdateType.SLOW)
if (event.getType() == UpdateType.TICK) Teleport();
Move();
if (event.getType() == UpdateType.FAST)
Destroy();
*/
} }
private void Destroy() private void Teleport()
{ {
Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 0, 0), 8d).keySet(), GetEntity().getLocation(), true); Location loc = GetEntity().getLocation();
loc.setY(30);
loc.setX(0);
loc.setZ(0);
if (UtilMath.offset2d(GetEntity().getLocation(), loc) > 50 || GetEntity().getLocation().getY() > 80)
{
loc.setY(30 + 20 * Math.random());
loc.setX(60 * Math.random() - 30);
loc.setZ(60 * Math.random() - 30);
GetEntity().teleport(loc);
} }
private void Move()
{
SetTarget(GetPlayerTarget().add(0, 20, 0));
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 30)
return;
Vector dir = UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget());
((CraftGhast)GetEntity()).getHandle().setPositionRotation(
_loc.getX(), _loc.getY(), _loc.getZ(),
UtilAlg.GetYaw(dir), UtilAlg.GetPitch(dir));
_loc.add(dir.multiply(0.25));
} }
} }

View File

@ -29,8 +29,8 @@ public class MobGiant extends CreatureBase<Giant>
{ {
_tpLoc = ent.getLocation(); _tpLoc = ent.getLocation();
ent.setMaxHealth(300); ent.setMaxHealth(400);
ent.setHealth(300); ent.setHealth(400);
ent.setCustomName("Giant"); ent.setCustomName("Giant");
} }
@ -59,6 +59,7 @@ public class MobGiant extends CreatureBase<Giant>
if (event.getType() == UpdateType.FAST) if (event.getType() == UpdateType.FAST)
Destroy(); Destroy();
} }
private void Destroy() private void Destroy()
@ -87,7 +88,7 @@ public class MobGiant extends CreatureBase<Giant>
_tpLoc.setPitch(UtilAlg.GetPitch(dir)); _tpLoc.setPitch(UtilAlg.GetPitch(dir));
_tpLoc.setYaw(UtilAlg.GetYaw(dir)); _tpLoc.setYaw(UtilAlg.GetYaw(dir));
double speed = Math.min(0.30, 0.15 + (GetEntity().getTicksLived() / 12000d)); double speed = Math.min(0.30, 0.10 + (GetEntity().getTicksLived() / 12000d));
_tpLoc.add(dir.multiply(speed)); _tpLoc.add(dir.multiply(speed));

View File

@ -47,7 +47,7 @@ public class SuperSmash extends SoloGame
new Kit[] new Kit[]
{ {
new KitWitch(manager),
new KitSkeleton(manager), new KitSkeleton(manager),
new KitGolem(manager), new KitGolem(manager),
new KitSpider(manager), new KitSpider(manager),
@ -58,6 +58,7 @@ public class SuperSmash extends SoloGame
new KitSnowman(manager), new KitSnowman(manager),
new KitBlaze(manager), new KitBlaze(manager),
new KitWitch(manager),
new KitChicken(manager), new KitChicken(manager),
//new KitKnight(manager), //new KitKnight(manager),
new KitSkySquid(manager), new KitSkySquid(manager),
@ -66,6 +67,7 @@ public class SuperSmash extends SoloGame
new KitWolf(manager), new KitWolf(manager),
}, },
new String[] new String[]

View File

@ -49,7 +49,7 @@ public class KitWitch extends SmashKit
public void GiveItems(Player player) public void GiveItems(Player player)
{ {
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, 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 + "Stun Potion", C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Daze Potion",
new String[] new String[]
{ {
ChatColor.RESET + "Throw a potion that damages and slows", ChatColor.RESET + "Throw a potion that damages and slows",

View File

@ -33,9 +33,9 @@ public class PerkWitchPotion extends Perk
public PerkWitchPotion() public PerkWitchPotion()
{ {
super("Stun Potion", new String[] super("Daze Potion", new String[]
{ {
C.cYellow + "Right-Click" + C.cGray + " to use " + C.cGreen + "Paralyze Potion" C.cYellow + "Right-Click" + C.cGray + " to use " + C.cGreen + "Daze Potion"
}); });
} }