Halloween game additions
This commit is contained in:
parent
01cb69d28b
commit
7eb1cc6519
@ -291,8 +291,7 @@ public class Explosion extends MiniPlugin
|
||||
|
||||
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
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,11 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -44,6 +46,7 @@ public class Halloween extends SoloGame
|
||||
private ArrayList<WaveBase> _waves;
|
||||
private int _wave = 0;
|
||||
|
||||
private int _maxMobs = 100;
|
||||
private HashSet<CreatureBase> _mobs = new HashSet<CreatureBase>();
|
||||
private PumpkinKing _king;
|
||||
|
||||
@ -60,9 +63,10 @@ public class Halloween extends SoloGame
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Do not die.",
|
||||
"Work as a team!",
|
||||
"Revive fallen allies!",
|
||||
"Defeat the hordes of monsters"
|
||||
"Defeat the waves of monsters",
|
||||
"Kill the Pumpkin King"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
@ -96,13 +100,13 @@ public class Halloween extends SoloGame
|
||||
_waves.add(new WaveVictory(this));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void TeamGen(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
GetTeamList().add(new GameTeam("Halloween Monsters", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
GetTeamList().add(new GameTeam("Pumpkin King", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -204,6 +208,9 @@ public class Halloween extends SoloGame
|
||||
|
||||
if (_wave >= _waves.size())
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false);
|
||||
|
||||
SetState(GameState.End);
|
||||
SetCustomWinLine("You defeated the Pumpkin King!!!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
@ -253,4 +260,54 @@ public class Halloween extends SoloGame
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -84,6 +84,9 @@ public abstract class CreatureBase<T extends LivingEntity>
|
||||
|
||||
public Location GetRoamTarget()
|
||||
{
|
||||
if (Math.random() > 0.75)
|
||||
return GetPlayerTarget();
|
||||
|
||||
Vector vec = new Vector(UtilMath.r(80) - 40, 0, UtilMath.r(80) - 40);
|
||||
return vec.toLocation(Host.GetSpectatorLocation().getWorld());
|
||||
}
|
||||
|
@ -64,8 +64,8 @@ public class MobGiant extends CreatureBase<Giant>
|
||||
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, 2, 0), 3.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, 2, 0), 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()
|
||||
@ -87,7 +87,10 @@ public class MobGiant extends CreatureBase<Giant>
|
||||
_tpLoc.setPitch(UtilAlg.GetPitch(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
|
||||
GetEntity().teleport(_tpLoc);
|
||||
|
@ -29,6 +29,8 @@ public class MobSkeletonArcher extends CreatureBase<Skeleton>
|
||||
{
|
||||
ent.getEquipment().setItemInHand(new ItemStack(Material.BOW));
|
||||
ent.setCustomName("Skeleton Archer");
|
||||
|
||||
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.halloween.creatures;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguiseSkeleton;
|
||||
import mineplex.core.disguise.disguises.DisguiseSpider;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -28,10 +29,12 @@ public class MobSkeletonWarrior extends CreatureBase<Zombie>
|
||||
@Override
|
||||
public void SpawnCustom(Zombie ent)
|
||||
{
|
||||
DisguiseSpider spider = new DisguiseSpider(ent);
|
||||
DisguiseSkeleton spider = new DisguiseSkeleton(ent);
|
||||
Host.Manager.GetDisguise().disguise(spider);
|
||||
ent.setCustomName("Skeleton Warrior");
|
||||
ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_HOE));
|
||||
|
||||
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,6 +28,8 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
|
||||
public void SpawnCustom(CaveSpider ent)
|
||||
{
|
||||
ent.setCustomName("Leaping Spider");
|
||||
|
||||
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 99999, 1, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,8 +1,6 @@
|
||||
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.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguiseSpider;
|
||||
@ -51,19 +49,8 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
Move();
|
||||
|
||||
if (event.getType() == UpdateType.SEC)
|
||||
Web();
|
||||
}
|
||||
|
||||
private void Web()
|
||||
{
|
||||
if (GetTarget() == null)
|
||||
return;
|
||||
|
||||
if (Math.random() > 0.5)
|
||||
return;
|
||||
|
||||
|
||||
if (event.getType() == UpdateType.SLOW)
|
||||
Speed();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,9 @@ public class MobZombie extends CreatureBase<Zombie>
|
||||
{
|
||||
if (event.getType() == UpdateType.SLOW)
|
||||
Move();
|
||||
|
||||
if (event.getType() == UpdateType.SLOW)
|
||||
Speed();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
shieldIterator.remove();
|
||||
}
|
||||
|
||||
if (!UtilTime.elapsed(_shieldSpawn, 3000))
|
||||
if (!UtilTime.elapsed(_shieldSpawn, 8000))
|
||||
return;
|
||||
|
||||
if (_shields.size() >= _shieldsMax)
|
||||
|
@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
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.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -26,6 +28,7 @@ public class KitFinn extends SmashKit
|
||||
{
|
||||
"Jake is hiding in his pocket.",
|
||||
"",
|
||||
"Nearby allies receive " + C.cGreen + "Speed 1"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
@ -85,4 +88,28 @@ public class KitFinn extends SmashKit
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
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.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -26,12 +28,11 @@ public class KitRobinHood extends SmashKit
|
||||
{
|
||||
"Trick or treating from the rich...",
|
||||
"",
|
||||
"Nearby allies receive " + C.cGreen + "Regeneration 1"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
{
|
||||
new PerkSpeed(1),
|
||||
new PerkRegeneration(0),
|
||||
new PerkFletcher(1, 4, true),
|
||||
new PerkBarrage(4, 250, true, true),
|
||||
new PerkQuickshotRobinHood()
|
||||
@ -86,4 +87,28 @@ public class KitRobinHood extends SmashKit
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
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.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -27,6 +29,7 @@ public class KitThor extends SmashKit
|
||||
{
|
||||
"Smash and kill with your Thor Hammer!",
|
||||
"",
|
||||
"Nearby allies receive " + C.cGreen + "Strength 1"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
@ -96,4 +99,28 @@ public class KitThor extends SmashKit
|
||||
if (HasKit(damagee))
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,33 +2,29 @@ package nautilus.game.arcade.game.games.halloween.waves;
|
||||
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
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.MobZombie;
|
||||
import nautilus.game.arcade.game.games.halloween.creatures.MobSkeletonWarrior;
|
||||
|
||||
public class Wave1 extends WaveBase
|
||||
{
|
||||
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
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
if (UtilTime.elapsed(_start, 15000))
|
||||
return;
|
||||
|
||||
if (Host.GetCreatures().size() > 60)
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick % 10 == 0)
|
||||
Host.AddCreature(new MobZombie(Host, GetSpawn()));
|
||||
Host.AddCreature(new MobSkeletonWarrior(Host, GetSpawn()));
|
||||
|
||||
if (tick % 20 == 0)
|
||||
Host.AddCreature(new MobSkeletonArcher(Host, GetSpawn()));
|
||||
|
||||
if (tick % 30 == 0)
|
||||
Host.AddCreature(new MobCreeper(Host, GetSpawn()));
|
||||
}
|
||||
}
|
||||
|
@ -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.creatures.MobCreeper;
|
||||
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;
|
||||
|
||||
public class Wave2 extends WaveBase
|
||||
@ -17,22 +16,19 @@ public class Wave2 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
if (UtilTime.elapsed(_start, 15000))
|
||||
return;
|
||||
|
||||
if (tick == 0)
|
||||
Host.AddCreature(new MobGiant(Host, GetSpawn()));
|
||||
|
||||
if (Host.GetCreatures().size() > 60)
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick % 10 == 0)
|
||||
Host.AddCreature(new MobZombie(Host, GetSpawn()));
|
||||
|
||||
if (tick % 20 == 0)
|
||||
Host.AddCreature(new MobSkeletonArcher(Host, GetSpawn()));
|
||||
|
||||
if (tick % 30 == 0)
|
||||
if (tick % 25 == 0)
|
||||
Host.AddCreature(new MobCreeper(Host, GetSpawn()));
|
||||
}
|
||||
}
|
||||
|
@ -15,16 +15,13 @@ public class Wave3 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (Host.GetCreatures().size() > 60)
|
||||
return;
|
||||
|
||||
if (tick % 10 == 0)
|
||||
if (tick > 200 && tick % 10 == 0 && !UtilTime.elapsed(_start, 25000))
|
||||
Host.AddCreature(new MobSpiderWebber(Host, GetSpawn()));
|
||||
|
||||
if (tick % 10 == 0)
|
||||
if (tick % 10 == 0 && !UtilTime.elapsed(_start, 15000))
|
||||
Host.AddCreature(new MobSpiderLeaper(Host, GetSpawn()));
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ public class Wave4 extends WaveBase
|
||||
{
|
||||
public Wave4(Halloween host)
|
||||
{
|
||||
super(host, "Ghasts (and friends!)", 60000, host.GetSpawnSet(3));
|
||||
super(host, "Ghasts and friends!", 60000, host.GetSpawnSet(3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
if (UtilTime.elapsed(_start, 25000))
|
||||
return;
|
||||
|
||||
if (tick > 0 && tick % 100 == 0)
|
||||
@ -29,7 +29,7 @@ public class Wave4 extends WaveBase
|
||||
Host.AddCreature(new MobGhast(Host, loc));
|
||||
}
|
||||
|
||||
if (Host.GetCreatures().size() > 60)
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick % 20 == 0)
|
||||
|
@ -3,7 +3,7 @@ package nautilus.game.arcade.game.games.halloween.waves;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
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
|
||||
{
|
||||
@ -18,7 +18,8 @@ public class Wave5 extends WaveBase
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
return;
|
||||
|
||||
this.SpawnBeacons(Host.GetSpawnSet(2));
|
||||
if (tick == 0)
|
||||
SpawnBeacons(Host.GetSpawnSet(2));
|
||||
|
||||
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()))));
|
||||
}
|
||||
|
||||
if (Host.GetCreatures().size() > 60)
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick % 20 == 0)
|
||||
{
|
||||
Host.AddCreature(new MobGiant(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(1).get(UtilMath.r(Host.GetSpawnSet(1).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 MobGiant(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size()))));
|
||||
Host.AddCreature(new MobCreeper(Host, Host.GetSpawnSet(1).get(UtilMath.r(Host.GetSpawnSet(1).size()))));
|
||||
Host.AddCreature(new MobCreeper(Host, Host.GetSpawnSet(2).get(UtilMath.r(Host.GetSpawnSet(2).size()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null,
|
||||
DamageCause.LIGHTNING, 12, true, true, false,
|
||||
DamageCause.LIGHTNING, 16, true, true, false,
|
||||
UtilEnt.getName(data.GetThrower()), GetName());
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -101,7 +102,7 @@ public class PerkInfernoFinn extends Perk
|
||||
@EventHandler
|
||||
public void Refresh(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SLOWER)
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
@ -112,8 +113,13 @@ public class PerkInfernoFinn extends Perk
|
||||
if (!Kit.HasKit(player))
|
||||
continue;
|
||||
|
||||
player.getInventory().remove(Material.GOLD_SWORD);
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD, (byte)0, 1, "Flaming Sword"));
|
||||
if (!UtilGear.isMat(player.getItemInHand(), Material.GOLD_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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user