Halloween game additions

This commit is contained in:
Chiss 2013-10-27 00:06:44 +11:00
parent 01cb69d28b
commit 7eb1cc6519
21 changed files with 237 additions and 67 deletions

View File

@ -291,8 +291,7 @@ public class Explosion extends MiniPlugin
blocks.put(cur, new AbstractMap.SimpleEntry<Integer, Byte>(cur.getTypeId(), cur.getData())); blocks.put(cur, new AbstractMap.SimpleEntry<Integer, Byte>(cur.getTypeId(), cur.getData()));
if (cur.getTypeId() != 98 || cur.getData() != 0) cur.setType(Material.AIR);
cur.setType(Material.AIR);
} }
//DELAY //DELAY

View File

@ -65,4 +65,20 @@ 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

@ -20,9 +20,11 @@ import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.entity.ItemSpawnEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -44,6 +46,7 @@ public class Halloween extends SoloGame
private ArrayList<WaveBase> _waves; private ArrayList<WaveBase> _waves;
private int _wave = 0; private int _wave = 0;
private int _maxMobs = 100;
private HashSet<CreatureBase> _mobs = new HashSet<CreatureBase>(); private HashSet<CreatureBase> _mobs = new HashSet<CreatureBase>();
private PumpkinKing _king; private PumpkinKing _king;
@ -60,9 +63,10 @@ public class Halloween extends SoloGame
new String[] new String[]
{ {
"Do not die.",
"Work as a team!", "Work as a team!",
"Revive fallen allies!", "Defeat the waves of monsters",
"Defeat the hordes of monsters" "Kill the Pumpkin King"
}); });
this.DamagePvP = false; this.DamagePvP = false;
@ -96,13 +100,13 @@ public class Halloween extends SoloGame
_waves.add(new WaveVictory(this)); _waves.add(new WaveVictory(this));
} }
@EventHandler @EventHandler(priority = EventPriority.MONITOR)
public void TeamGen(GameStateChangeEvent event) public void TeamGen(GameStateChangeEvent event)
{ {
if (event.GetState() != GameState.Live) if (event.GetState() != GameState.Live)
return; return;
GetTeamList().add(new GameTeam("Halloween Monsters", ChatColor.RED, WorldData.GetDataLocs("RED"))); GetTeamList().add(new GameTeam("Pumpkin King", ChatColor.RED, WorldData.GetDataLocs("RED")));
} }
@EventHandler @EventHandler
@ -189,7 +193,7 @@ public class Halloween extends SoloGame
for (CreatureBase base : _mobs) for (CreatureBase base : _mobs)
base.Target(event); base.Target(event);
} }
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)
public void EntityDeath(EntityDeathEvent event) public void EntityDeath(EntityDeathEvent event)
{ {
@ -204,6 +208,9 @@ public class Halloween extends SoloGame
if (_wave >= _waves.size()) if (_wave >= _waves.size())
{ {
for (Player player : GetPlayers(false))
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false);
SetState(GameState.End); SetState(GameState.End);
SetCustomWinLine("You defeated the Pumpkin King!!!"); SetCustomWinLine("You defeated the Pumpkin King!!!");
AnnounceEnd(this.GetTeamList().get(0)); AnnounceEnd(this.GetTeamList().get(0));
@ -253,4 +260,54 @@ public class Halloween extends SoloGame
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler(priority = EventPriority.MONITOR)
public void GemAward(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
Player player = event.GetDamagerPlayer(true);
if (player == null) return;
for (int i=0 ; i<event.GetDamage() ; i++)
Manager.GetGame().AddGems(player, 0.01, "Damage", true);
}
public int GetMaxMobs()
{
return _maxMobs;
}
private long _helpTimer = 0;
private int _helpIndex = 0;
private String[] _help = new String[]
{
C.cAqua + "Work together with your team mates.",
C.cGreen + "Each kit gives a buff to nearby allies.",
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.",
};
@EventHandler
public void StateUpdate(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC)
return;
if (this.GetState() != GameState.Recruit)
return;
if (!UtilTime.elapsed(_helpTimer, 8000))
return;
_helpTimer = System.currentTimeMillis();
Announce(C.cWhite + C.Bold + "TIP " + ChatColor.RESET + _help[_helpIndex]);
_helpIndex = (_helpIndex + 1)%_help.length;
}
} }

View File

@ -84,6 +84,9 @@ public abstract class CreatureBase<T extends LivingEntity>
public Location GetRoamTarget() public Location GetRoamTarget()
{ {
if (Math.random() > 0.75)
return GetPlayerTarget();
Vector vec = new Vector(UtilMath.r(80) - 40, 0, UtilMath.r(80) - 40); Vector vec = new Vector(UtilMath.r(80) - 40, 0, UtilMath.r(80) - 40);
return vec.toLocation(Host.GetSpectatorLocation().getWorld()); return vec.toLocation(Host.GetSpectatorLocation().getWorld());
} }

View File

@ -64,8 +64,8 @@ public class MobGiant extends CreatureBase<Giant>
private void Destroy() private void Destroy()
{ {
Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 8, 0), 6d).keySet(), GetEntity().getLocation().add(0, 8, 0), false); Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 8, 0), 6d).keySet(), GetEntity().getLocation().add(0, 8, 0), false);
Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 2, 0), 3.5d).keySet(), GetEntity().getLocation(), true); Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 2, 0), 5d).keySet(), GetEntity().getLocation(), true);
Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 0, 0), 3.5d).keySet(), GetEntity().getLocation(), true); Host.Manager.GetExplosion().BlockExplosion(UtilBlock.getInRadius(GetEntity().getLocation().add(0, 0, 0), 5d).keySet(), GetEntity().getLocation(), true);
} }
private void Move() private void Move()
@ -87,7 +87,10 @@ 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));
_tpLoc.add(dir.multiply(0.1)); double speed = Math.min(0.30, 0.15 + (GetEntity().getTicksLived() / 12000d));
_tpLoc.add(dir.multiply(speed));
//Move //Move
GetEntity().teleport(_tpLoc); GetEntity().teleport(_tpLoc);

View File

@ -29,6 +29,8 @@ public class MobSkeletonArcher extends CreatureBase<Skeleton>
{ {
ent.getEquipment().setItemInHand(new ItemStack(Material.BOW)); ent.getEquipment().setItemInHand(new ItemStack(Material.BOW));
ent.setCustomName("Skeleton Archer"); ent.setCustomName("Skeleton Archer");
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
} }
@Override @Override

View File

@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseSkeleton;
import mineplex.core.disguise.disguises.DisguiseSpider; import mineplex.core.disguise.disguises.DisguiseSpider;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -28,10 +29,12 @@ public class MobSkeletonWarrior extends CreatureBase<Zombie>
@Override @Override
public void SpawnCustom(Zombie ent) public void SpawnCustom(Zombie ent)
{ {
DisguiseSpider spider = new DisguiseSpider(ent); DisguiseSkeleton spider = new DisguiseSkeleton(ent);
Host.Manager.GetDisguise().disguise(spider); Host.Manager.GetDisguise().disguise(spider);
ent.setCustomName("Skeleton Warrior"); ent.setCustomName("Skeleton Warrior");
ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_HOE)); ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_HOE));
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
} }
@Override @Override

View File

@ -28,6 +28,8 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
public void SpawnCustom(CaveSpider ent) public void SpawnCustom(CaveSpider ent)
{ {
ent.setCustomName("Leaping Spider"); ent.setCustomName("Leaping Spider");
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 99999, 1, false, false, false);
} }
@Override @Override

View File

@ -1,8 +1,6 @@
package nautilus.game.arcade.game.games.halloween.creatures; package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseSpider; import mineplex.core.disguise.disguises.DisguiseSpider;
@ -51,19 +49,8 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
if (event.getType() == UpdateType.FAST) if (event.getType() == UpdateType.FAST)
Move(); Move();
if (event.getType() == UpdateType.SEC) if (event.getType() == UpdateType.SLOW)
Web(); Speed();
}
private void Web()
{
if (GetTarget() == null)
return;
if (Math.random() > 0.5)
return;
} }
private void Move() private void Move()
@ -106,4 +93,14 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
} }
} }
} }
public void Speed()
{
if (GetEntity().getTicksLived() > 3600)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 2, false, false, false);
else if (GetEntity().getTicksLived() > 2400)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 1, false, false, false);
else if (GetEntity().getTicksLived() > 1200)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 0, false, false, false);
}
} }

View File

@ -40,6 +40,9 @@ public class MobZombie extends CreatureBase<Zombie>
{ {
if (event.getType() == UpdateType.SLOW) if (event.getType() == UpdateType.SLOW)
Move(); Move();
if (event.getType() == UpdateType.SLOW)
Speed();
} }
private void Move() private void Move()
@ -88,4 +91,14 @@ public class MobZombie extends CreatureBase<Zombie>
{ {
} }
public void Speed()
{
if (GetEntity().getTicksLived() > 3600)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 2, false, false, false);
else if (GetEntity().getTicksLived() > 2400)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 1, false, false, false);
else if (GetEntity().getTicksLived() > 1200)
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 10, 0, false, false, false);
}
} }

View File

@ -494,7 +494,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
shieldIterator.remove(); shieldIterator.remove();
} }
if (!UtilTime.elapsed(_shieldSpawn, 3000)) if (!UtilTime.elapsed(_shieldSpawn, 8000))
return; return;
if (_shields.size() >= _shieldsMax) if (_shields.size() >= _shieldsMax)

View File

@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilMath;
import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -26,6 +28,7 @@ public class KitFinn extends SmashKit
{ {
"Jake is hiding in his pocket.", "Jake is hiding in his pocket.",
"", "",
"Nearby allies receive " + C.cGreen + "Speed 1"
}, },
new Perk[] new Perk[]
@ -85,4 +88,28 @@ public class KitFinn extends SmashKit
Manager.GetCondition().Factory().FireItemImmunity(GetName(), player, player, 1.9, false); Manager.GetCondition().Factory().FireItemImmunity(GetName(), player, player, 1.9, false);
} }
} }
@EventHandler
public void Aura(UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
return;
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (!HasKit(player))
continue;
for (Player other : Manager.GetGame().GetPlayers(true))
{
if (other.equals(player))
continue;
if (UtilMath.offset(player, other) > 8)
continue;
Manager.GetCondition().Factory().Speed("Aura", other, player, 1.9, 0, false, false, false);
}
}
}
} }

View File

@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilMath;
import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -26,12 +28,11 @@ public class KitRobinHood extends SmashKit
{ {
"Trick or treating from the rich...", "Trick or treating from the rich...",
"", "",
"Nearby allies receive " + C.cGreen + "Regeneration 1"
}, },
new Perk[] new Perk[]
{ {
new PerkSpeed(1),
new PerkRegeneration(0),
new PerkFletcher(1, 4, true), new PerkFletcher(1, 4, true),
new PerkBarrage(4, 250, true, true), new PerkBarrage(4, 250, true, true),
new PerkQuickshotRobinHood() new PerkQuickshotRobinHood()
@ -86,4 +87,28 @@ public class KitRobinHood extends SmashKit
Manager.GetCondition().Factory().FireItemImmunity(GetName(), player, player, 1.9, false); Manager.GetCondition().Factory().FireItemImmunity(GetName(), player, player, 1.9, false);
} }
} }
@EventHandler
public void Aura(UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
return;
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (!HasKit(player))
continue;
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);
}
}
}
} }

View File

@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilMath;
import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -27,6 +29,7 @@ public class KitThor extends SmashKit
{ {
"Smash and kill with your Thor Hammer!", "Smash and kill with your Thor Hammer!",
"", "",
"Nearby allies receive " + C.cGreen + "Strength 1"
}, },
new Perk[] new Perk[]
@ -96,4 +99,28 @@ public class KitThor extends SmashKit
if (HasKit(damagee)) if (HasKit(damagee))
event.AddMod("Thor Boost", "Thor Boost", 4, false); event.AddMod("Thor Boost", "Thor Boost", 4, false);
} }
@EventHandler
public void Aura(UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
return;
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (!HasKit(player))
continue;
for (Player other : Manager.GetGame().GetPlayers(true))
{
if (other.equals(player))
continue;
if (UtilMath.offset(player, other) > 8)
continue;
Manager.GetCondition().Factory().Strength("Aura", other, player, 1.9, 0, false, false, false);
}
}
}
} }

View File

@ -2,33 +2,29 @@ package nautilus.game.arcade.game.games.halloween.waves;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.halloween.Halloween;
import nautilus.game.arcade.game.games.halloween.creatures.MobCreeper;
import nautilus.game.arcade.game.games.halloween.creatures.MobSkeletonArcher; import nautilus.game.arcade.game.games.halloween.creatures.MobSkeletonArcher;
import nautilus.game.arcade.game.games.halloween.creatures.MobZombie; import nautilus.game.arcade.game.games.halloween.creatures.MobSkeletonWarrior;
public class Wave1 extends WaveBase public class Wave1 extends WaveBase
{ {
public Wave1(Halloween host) public Wave1(Halloween host)
{ {
super(host, "Zombies and Skeletons and Creepers! OH MY!", 60000, host.GetSpawnSet(1)); super(host, "Skeletons? Farmers? FARMER SKELETONS!!!", 60000, host.GetSpawnSet(1));
} }
@Override @Override
public void Spawn(int tick) public void Spawn(int tick)
{ {
if (UtilTime.elapsed(_start, 20000)) if (UtilTime.elapsed(_start, 15000))
return; return;
if (Host.GetCreatures().size() > 60) if (Host.GetCreatures().size() > Host.GetMaxMobs())
return; return;
if (tick % 10 == 0) if (tick % 10 == 0)
Host.AddCreature(new MobZombie(Host, GetSpawn())); Host.AddCreature(new MobSkeletonWarrior(Host, GetSpawn()));
if (tick % 20 == 0) if (tick % 20 == 0)
Host.AddCreature(new MobSkeletonArcher(Host, GetSpawn())); Host.AddCreature(new MobSkeletonArcher(Host, GetSpawn()));
if (tick % 30 == 0)
Host.AddCreature(new MobCreeper(Host, GetSpawn()));
} }
} }

View File

@ -4,7 +4,6 @@ import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.halloween.Halloween;
import nautilus.game.arcade.game.games.halloween.creatures.MobCreeper; import nautilus.game.arcade.game.games.halloween.creatures.MobCreeper;
import nautilus.game.arcade.game.games.halloween.creatures.MobGiant; import nautilus.game.arcade.game.games.halloween.creatures.MobGiant;
import nautilus.game.arcade.game.games.halloween.creatures.MobSkeletonArcher;
import nautilus.game.arcade.game.games.halloween.creatures.MobZombie; import nautilus.game.arcade.game.games.halloween.creatures.MobZombie;
public class Wave2 extends WaveBase public class Wave2 extends WaveBase
@ -17,22 +16,19 @@ public class Wave2 extends WaveBase
@Override @Override
public void Spawn(int tick) public void Spawn(int tick)
{ {
if (UtilTime.elapsed(_start, 20000)) if (UtilTime.elapsed(_start, 15000))
return; return;
if (tick == 0) if (tick == 0)
Host.AddCreature(new MobGiant(Host, GetSpawn())); Host.AddCreature(new MobGiant(Host, GetSpawn()));
if (Host.GetCreatures().size() > 60) if (Host.GetCreatures().size() > Host.GetMaxMobs())
return; return;
if (tick % 10 == 0) if (tick % 10 == 0)
Host.AddCreature(new MobZombie(Host, GetSpawn())); Host.AddCreature(new MobZombie(Host, GetSpawn()));
if (tick % 20 == 0) if (tick % 25 == 0)
Host.AddCreature(new MobSkeletonArcher(Host, GetSpawn()));
if (tick % 30 == 0)
Host.AddCreature(new MobCreeper(Host, GetSpawn())); Host.AddCreature(new MobCreeper(Host, GetSpawn()));
} }
} }

View File

@ -15,16 +15,13 @@ public class Wave3 extends WaveBase
@Override @Override
public void Spawn(int tick) public void Spawn(int tick)
{ {
if (UtilTime.elapsed(_start, 20000)) if (Host.GetCreatures().size() > Host.GetMaxMobs())
return; return;
if (Host.GetCreatures().size() > 60) if (tick > 200 && tick % 10 == 0 && !UtilTime.elapsed(_start, 25000))
return;
if (tick % 10 == 0)
Host.AddCreature(new MobSpiderWebber(Host, GetSpawn())); Host.AddCreature(new MobSpiderWebber(Host, GetSpawn()));
if (tick % 10 == 0) if (tick % 10 == 0 && !UtilTime.elapsed(_start, 15000))
Host.AddCreature(new MobSpiderLeaper(Host, GetSpawn())); Host.AddCreature(new MobSpiderLeaper(Host, GetSpawn()));
} }
} }

View File

@ -11,13 +11,13 @@ public class Wave4 extends WaveBase
{ {
public Wave4(Halloween host) public Wave4(Halloween host)
{ {
super(host, "Ghasts (and friends!)", 60000, host.GetSpawnSet(3)); super(host, "Ghasts and friends!", 60000, host.GetSpawnSet(3));
} }
@Override @Override
public void Spawn(int tick) public void Spawn(int tick)
{ {
if (UtilTime.elapsed(_start, 20000)) if (UtilTime.elapsed(_start, 25000))
return; return;
if (tick > 0 && tick % 100 == 0) if (tick > 0 && tick % 100 == 0)
@ -29,7 +29,7 @@ public class Wave4 extends WaveBase
Host.AddCreature(new MobGhast(Host, loc)); Host.AddCreature(new MobGhast(Host, loc));
} }
if (Host.GetCreatures().size() > 60) if (Host.GetCreatures().size() > Host.GetMaxMobs())
return; return;
if (tick % 20 == 0) if (tick % 20 == 0)

View File

@ -3,7 +3,7 @@ package nautilus.game.arcade.game.games.halloween.waves;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.halloween.Halloween;
import nautilus.game.arcade.game.games.halloween.creatures.MobGiant; import nautilus.game.arcade.game.games.halloween.creatures.*;
public class Wave5 extends WaveBase public class Wave5 extends WaveBase
{ {
@ -18,7 +18,8 @@ public class Wave5 extends WaveBase
if (UtilTime.elapsed(_start, 20000)) if (UtilTime.elapsed(_start, 20000))
return; return;
this.SpawnBeacons(Host.GetSpawnSet(2)); if (tick == 0)
SpawnBeacons(Host.GetSpawnSet(2));
if (tick == 0) if (tick == 0)
{ {
@ -26,19 +27,19 @@ public class Wave5 extends WaveBase
Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size())))); Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size()))));
} }
if (Host.GetCreatures().size() > 60) if (Host.GetCreatures().size() > Host.GetMaxMobs())
return; return;
if (tick % 20 == 0) if (tick % 20 == 0)
{ {
Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(1).get(UtilMath.r(Host.GetSpawnSet(1).size())))); Host.AddCreature(new MobZombie(Host, Host.GetSpawnSet(1).get(UtilMath.r(Host.GetSpawnSet(1).size()))));
Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size())))); Host.AddCreature(new MobZombie(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size()))));
} }
if (tick % 40 == 0) if (tick % 60 == 0)
{ {
Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(1).get(UtilMath.r(Host.GetSpawnSet(1).size())))); Host.AddCreature(new MobCreeper(Host, Host.GetSpawnSet(1).get(UtilMath.r(Host.GetSpawnSet(1).size()))));
Host.AddCreature(new MobGiant(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size())))); Host.AddCreature(new MobCreeper(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size()))));
} }
} }
} }

View File

@ -129,7 +129,7 @@ public class PerkHammerThrow extends Perk implements IThrown
//Damage Event //Damage Event
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null, Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null,
DamageCause.LIGHTNING, 12, true, true, false, DamageCause.LIGHTNING, 16, true, true, false,
UtilEnt.getName(data.GetThrower()), GetName()); UtilEnt.getName(data.GetThrower()), GetName());
} }

View File

@ -13,6 +13,7 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
@ -101,7 +102,7 @@ public class PerkInfernoFinn extends Perk
@EventHandler @EventHandler
public void Refresh(UpdateEvent event) public void Refresh(UpdateEvent event)
{ {
if (event.getType() != UpdateType.SLOWER) if (event.getType() != UpdateType.SLOW)
return; return;
for (Player player : UtilServer.getPlayers()) for (Player player : UtilServer.getPlayers())
@ -112,8 +113,13 @@ public class PerkInfernoFinn extends Perk
if (!Kit.HasKit(player)) if (!Kit.HasKit(player))
continue; continue;
player.getInventory().remove(Material.GOLD_SWORD); if (!UtilGear.isMat(player.getItemInHand(), Material.GOLD_SWORD))
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD, (byte)0, 1, "Flaming Sword")); continue;
if (player.getItemInHand().getDurability() == player.getItemInHand().getType().getMaxDurability())
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+1));
else
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()-1));
} }
} }
} }