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);
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);
@ -41,7 +41,7 @@ public abstract class ItemGadget extends Gadget
public void RemoveItem(Player player)
{
player.getInventory().setItem(2, null);
player.getInventory().setItem(3, null);
_active.remove(player);

View File

@ -12,7 +12,7 @@ public class Mule extends Mount
{
public Mule(MountManager manager)
{
super(manager, "Horse of Horror", new String[]
super(manager, "Mount Mule", new String[]
{
"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.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -14,7 +13,6 @@ import org.bukkit.block.Block;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityBreakDoorEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
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.cGreen + "Kill giants quickly.",
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

View File

@ -1,8 +1,5 @@
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.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -10,10 +7,9 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftGhast;
import org.bukkit.entity.Ghast;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.util.Vector;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
public class MobGhast extends CreatureBase<Ghast>
{
@ -39,7 +35,8 @@ public class MobGhast extends CreatureBase<Ghast>
@Override
public void Damage(CustomDamageEvent event)
{
if (event.GetCause() == DamageCause.SUFFOCATION)
event.SetCancelled("Suffocation Cancel");
}
@Override
@ -51,34 +48,23 @@ public class MobGhast extends CreatureBase<Ghast>
@Override
public void Update(UpdateEvent event)
{
/*
if (event.getType() == UpdateType.TICK)
Move();
if (event.getType() == UpdateType.FAST)
Destroy();
*/
if (event.getType() == UpdateType.SLOW)
Teleport();
}
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);
private void Move()
if (UtilMath.offset2d(GetEntity().getLocation(), loc) > 50 || GetEntity().getLocation().getY() > 80)
{
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));
loc.setY(30 + 20 * Math.random());
loc.setX(60 * Math.random() - 30);
loc.setZ(60 * Math.random() - 30);
GetEntity().teleport(loc);
}
}
}

View File

@ -29,8 +29,8 @@ public class MobGiant extends CreatureBase<Giant>
{
_tpLoc = ent.getLocation();
ent.setMaxHealth(300);
ent.setHealth(300);
ent.setMaxHealth(400);
ent.setHealth(400);
ent.setCustomName("Giant");
}
@ -59,6 +59,7 @@ public class MobGiant extends CreatureBase<Giant>
if (event.getType() == UpdateType.FAST)
Destroy();
}
private void Destroy()
@ -87,7 +88,7 @@ public class MobGiant extends CreatureBase<Giant>
_tpLoc.setPitch(UtilAlg.GetPitch(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));

View File

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

View File

@ -49,7 +49,7 @@ public class KitWitch extends SmashKit
public void GiveItems(Player 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 + "Stun Potion",
C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Daze Potion",
new String[]
{
ChatColor.RESET + "Throw a potion that damages and slows",

View File

@ -33,9 +33,9 @@ public class PerkWitchPotion extends Perk
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"
});
}