Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
2bbb29c8bb
@ -0,0 +1,14 @@
|
||||
package mineplex.core.pet.types;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import mineplex.core.pet.Pet;
|
||||
|
||||
public class Pumpkin extends Pet
|
||||
{
|
||||
public Pumpkin()
|
||||
{
|
||||
super("Pumpling", EntityType.ZOMBIE, -1);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package mineplex.hub.commands;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.hub.HubManager;
|
||||
|
||||
public class GadgetToggle extends CommandBase<HubManager>
|
||||
{
|
||||
public GadgetToggle(HubManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ADMIN, new String[] {"gadget"});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Execute(Player caller, String[] args)
|
||||
{
|
||||
Plugin.ToggleGadget(caller);
|
||||
}
|
||||
}
|
@ -64,6 +64,24 @@ public class Halloween extends SoloGame
|
||||
public long damage = 0;
|
||||
public long target = 0;
|
||||
|
||||
public long updateBossA = 0;
|
||||
public long updateBossB = 0;
|
||||
public long updateBossC = 0;
|
||||
public long updateBossD = 0;
|
||||
public long updateBossE = 0;
|
||||
public long updateBossF = 0;
|
||||
public long updateBossG = 0;
|
||||
public long updateBossH = 0;
|
||||
public long updateBossI = 0;
|
||||
public long updateBossJ = 0;
|
||||
public long updateBossK = 0;
|
||||
public long updateBossL = 0;
|
||||
public long updateBossM = 0;
|
||||
public long updateBossN = 0;
|
||||
public long updateBossO = 0;
|
||||
|
||||
public boolean bossDebug = false;
|
||||
|
||||
public Halloween(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Halloween,
|
||||
@ -171,6 +189,26 @@ public class Halloween extends SoloGame
|
||||
System.out.println("Update Time: " + UtilTime.convertString(update, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Damage Time: " + UtilTime.convertString(damage, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Target Time: " + UtilTime.convertString(target, 4, TimeUnit.MILLISECONDS));
|
||||
|
||||
if (bossDebug)
|
||||
{
|
||||
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||
System.out.println("Update Boss State: " + UtilTime.convertString(updateBossA, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Blocks: " + UtilTime.convertString(updateBossB, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Health: " + UtilTime.convertString(updateBossC, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Minion Orbit: " + UtilTime.convertString(updateBossD, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Minion Move: " + UtilTime.convertString(updateBossE, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Minion Attack: " + UtilTime.convertString(updateBossF, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Minion Arrow: " + UtilTime.convertString(updateBossG, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Minion Spawn: " + UtilTime.convertString(updateBossH, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss King Control: " + UtilTime.convertString(updateBossI, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss King Leap: " + UtilTime.convertString(updateBossJ, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss King Bomb: " + UtilTime.convertString(updateBossK, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss King Target: " + UtilTime.convertString(updateBossL, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss King Trail: " + UtilTime.convertString(updateBossM, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Shield Orbit: " + UtilTime.convertString(updateBossN, 4, TimeUnit.MILLISECONDS));
|
||||
System.out.println("Update Boss Shield Spawn: " + UtilTime.convertString(updateBossO, 4, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||
|
||||
total = 0;
|
||||
@ -181,6 +219,22 @@ public class Halloween extends SoloGame
|
||||
update = 0;
|
||||
damage = 0;
|
||||
target = 0;
|
||||
|
||||
updateBossA = 0;
|
||||
updateBossB = 0;
|
||||
updateBossC = 0;
|
||||
updateBossD = 0;
|
||||
updateBossE = 0;
|
||||
updateBossF = 0;
|
||||
updateBossG = 0;
|
||||
updateBossH = 0;
|
||||
updateBossI = 0;
|
||||
updateBossJ = 0;
|
||||
updateBossK = 0;
|
||||
updateBossL = 0;
|
||||
updateBossM = 0;
|
||||
updateBossN = 0;
|
||||
updateBossO = 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -499,7 +553,7 @@ public class Halloween extends SoloGame
|
||||
{
|
||||
PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(audio.getName(),
|
||||
player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ(),
|
||||
3f, 1F);
|
||||
20f, 1F);
|
||||
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -78,6 +78,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
super(game, null, Skeleton.class, loc);
|
||||
|
||||
_kingLocation = loc;
|
||||
|
||||
game.bossDebug = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -168,54 +170,74 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
@Override
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
//Main
|
||||
if (event.getType() == UpdateType.FASTER)
|
||||
StateUpdate();
|
||||
|
||||
Host.updateBossA += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
KingDestroyBlocks();
|
||||
|
||||
Host.updateBossB += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
KingUpdateHealth();
|
||||
Host.updateBossC += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
|
||||
//Minions
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
MinionOrbit();
|
||||
|
||||
Host.updateBossD += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.FASTER)
|
||||
MinionAttack();
|
||||
|
||||
MinionMove();
|
||||
Host.updateBossE += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
MinionAttackDamage();
|
||||
|
||||
Host.updateBossF += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.FASTEST)
|
||||
MinionArrow();
|
||||
|
||||
Host.updateBossG += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
MinionSpawn();
|
||||
Host.updateBossH += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
|
||||
//Final
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
KingControl();
|
||||
|
||||
Host.updateBossI += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.SEC)
|
||||
KingLeap();
|
||||
|
||||
Host.updateBossJ += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.SEC)
|
||||
KingBomb();
|
||||
|
||||
Host.updateBossK += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.SEC)
|
||||
KingTarget();
|
||||
|
||||
Host.updateBossL += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
KingTrail();
|
||||
|
||||
Host.updateBossM += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
//Shield
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
ShieldOrbit(false);
|
||||
|
||||
Host.updateBossN += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
ShieldSpawn();
|
||||
Host.updateBossO += System.currentTimeMillis() - start;
|
||||
start = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
@ -296,27 +318,32 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
private void KingUpdateHealth()
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
String text = "";
|
||||
double percent = 0;
|
||||
|
||||
if (_shields.size() > 0)
|
||||
{
|
||||
if (_shields.size() > 0)
|
||||
percent = (double)_shields.size() / (double)_shieldsMax;
|
||||
text = C.cGreen + C.Bold + "Kill the Flame Shield";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_minions.size() > 0)
|
||||
{
|
||||
double percent = (double)_shields.size() / (double)_shieldsMax;
|
||||
UtilDisplay.displayTextBar(Host.Manager.GetPlugin(), player, percent, C.cGreen + C.Bold + "Kill the Flame Shield");
|
||||
percent = (double)_minions.size() / (double)_minionsMax;
|
||||
text = C.cYellow + C.Bold + "Kill the Pumpkin Soldiers";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_minions.size() > 0)
|
||||
{
|
||||
double percent = (double)_minions.size() / (double)_minionsMax;
|
||||
UtilDisplay.displayTextBar(Host.Manager.GetPlugin(), player, percent, C.cYellow + C.Bold + "Kill the Pumpkin Soldiers");
|
||||
}
|
||||
else
|
||||
{
|
||||
double percent = GetEntity().getHealth()/GetEntity().getMaxHealth();
|
||||
UtilDisplay.displayTextBar(Host.Manager.GetPlugin(), player, percent, C.cGold + C.Bold + "Kill the Pumpkin King");
|
||||
}
|
||||
percent = GetEntity().getHealth()/GetEntity().getMaxHealth();
|
||||
text = C.cGold + C.Bold + "Kill the Pumpkin King";
|
||||
}
|
||||
}
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
UtilDisplay.displayTextBar(Host.Manager.GetPlugin(), player, percent, text);
|
||||
}
|
||||
}
|
||||
|
||||
private void KingDestroyBlocks()
|
||||
@ -395,12 +422,13 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
loc.setYaw(UtilAlg.GetYaw(UtilAlg.getTrajectory(GetEntity(), minion)));
|
||||
|
||||
//Move
|
||||
EntityCreature ec = ((CraftCreature)minion).getHandle();
|
||||
ec.getControllerMove().a(loc.getX(), loc.getY(), loc.getZ(), 1.4);
|
||||
UtilEnt.CreatureMoveFast(minion, loc, 1.4f);
|
||||
// EntityCreature ec = ((CraftCreature)minion).getHandle();
|
||||
// ec.getControllerMove().a(loc.getX(), loc.getY(), loc.getZ(), 1.4);
|
||||
}
|
||||
}
|
||||
|
||||
public void MinionAttack()
|
||||
public void MinionMove()
|
||||
{
|
||||
if (GetState() != 3)
|
||||
return;
|
||||
@ -416,14 +444,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
minion.setTarget(target);
|
||||
|
||||
Location loc = target.getLocation().add(UtilAlg.getTrajectory(target, minion).multiply(1));
|
||||
if (UtilMath.offset(loc, minion.getLocation()) > 12)
|
||||
loc = minion.getLocation().add(UtilAlg.getTrajectory(minion.getLocation(), loc).multiply(12));
|
||||
|
||||
//Move
|
||||
EntityCreature ec = ((CraftCreature)minion).getHandle();
|
||||
Navigation nav = ec.getNavigation();
|
||||
nav.a(loc.getX(), loc.getY(), loc.getZ(), 1f);
|
||||
UtilEnt.CreatureMove(minion, target.getLocation(), 1f);
|
||||
|
||||
_minions.add(minion);
|
||||
}
|
||||
@ -451,7 +472,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
//Damage Event
|
||||
Host.Manager.GetDamage().NewDamageEvent(target, minion, null,
|
||||
DamageCause.ENTITY_ATTACK, 3, true, true, false,
|
||||
DamageCause.ENTITY_ATTACK, 4, true, false, false,
|
||||
UtilEnt.getName(minion), GetName());
|
||||
|
||||
//Sound
|
||||
@ -690,7 +711,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
//Announce
|
||||
Host.Announce(C.cAqua + C.Bold + "Kill the Pumpkin Minions!");
|
||||
|
||||
MinionAttack();
|
||||
MinionMove();
|
||||
|
||||
Host.playSound(HalloweenAudio.BOSS_STAGE_MINION_ATTACK);
|
||||
}
|
||||
|
@ -37,9 +37,9 @@ public class PerkFlameSlam extends Perk
|
||||
|
||||
public PerkFlameSlam()
|
||||
{
|
||||
super("Flame Slam", new String[]
|
||||
super("Flame Charge", new String[]
|
||||
{
|
||||
C.cYellow + "Right-Click" + C.cGray + " with Axe to " + C.cGreen + "Flame Slam"
|
||||
C.cYellow + "Right-Click" + C.cGray + " with Axe to " + C.cGreen + "Flame Charge"
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user