Halloween event changes final
This commit is contained in:
parent
95449fec26
commit
c9a295d56e
@ -207,21 +207,27 @@ public class Halloween extends SoloGame
|
||||
if (_wave >= _waves.size())
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), "Pumpkin Kings Head", 0, true);
|
||||
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false);
|
||||
|
||||
SetState(GameState.End);
|
||||
SetCustomWinLine("You defeated the Pumpkin King!!!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
|
||||
return;
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false);
|
||||
}
|
||||
|
||||
if (GetPlayers(true).size() == 0)
|
||||
{
|
||||
SetState(GameState.End);
|
||||
SetCustomWinLine("The Pumpkin King is victorious again!");
|
||||
SetCustomWinLine("You earned Pumpkin Kings Head!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
}
|
||||
|
||||
else if (GetPlayers(true).size() == 0)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false);
|
||||
}
|
||||
|
||||
SetState(GameState.End);
|
||||
SetCustomWinLine("You lost...");
|
||||
AnnounceEnd(this.GetTeamList().get(1));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +276,7 @@ public class Halloween extends SoloGame
|
||||
if (player == null) return;
|
||||
|
||||
for (int i=0 ; i<event.GetDamage() ; i++)
|
||||
Manager.GetGame().AddGems(player, 0.01, "Damage", true);
|
||||
Manager.GetGame().AddGems(player, 0.02, "Damage", true);
|
||||
}
|
||||
|
||||
public int GetMaxMobs()
|
||||
@ -282,6 +288,7 @@ public class Halloween extends SoloGame
|
||||
private int _helpIndex = 0;
|
||||
private String[] _help = new String[]
|
||||
{
|
||||
C.cGreen + "Giants one hit kill you! Stay away!!!",
|
||||
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.",
|
||||
|
@ -29,8 +29,8 @@ public class MobGiant extends CreatureBase<Giant>
|
||||
{
|
||||
_tpLoc = ent.getLocation();
|
||||
|
||||
ent.setMaxHealth(400);
|
||||
ent.setHealth(400);
|
||||
ent.setMaxHealth(600);
|
||||
ent.setHealth(600);
|
||||
|
||||
ent.setCustomName("Giant");
|
||||
}
|
||||
@ -88,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.10 + (GetEntity().getTicksLived() / 12000d));
|
||||
double speed = Math.min(0.35, 0.1 + (GetEntity().getTicksLived() / 8000d));
|
||||
|
||||
|
||||
_tpLoc.add(dir.multiply(speed));
|
||||
|
@ -81,7 +81,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
ent.setSkeletonType(SkeletonType.WITHER);
|
||||
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
|
||||
ent.setMaxHealth(200);
|
||||
ent.setMaxHealth(500);
|
||||
ent.setHealth(ent.getMaxHealth());
|
||||
|
||||
ent.getWorld().strikeLightningEffect(ent.getLocation());
|
||||
@ -196,6 +196,9 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
if (event.getType() == UpdateType.SLOW)
|
||||
KingTarget();
|
||||
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
KingTrail();
|
||||
|
||||
//Shield
|
||||
if (event.getType() == UpdateType.TICK)
|
||||
ShieldOrbit(false);
|
||||
@ -204,6 +207,15 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
ShieldSpawn();
|
||||
}
|
||||
|
||||
private void KingTrail()
|
||||
{
|
||||
if (GetState() >= 4)
|
||||
{
|
||||
//Particles
|
||||
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, GetEntity().getLocation().add(0, 1.5, 0), 0.2f, 0.4f, 0.2f, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void KingTarget()
|
||||
{
|
||||
if (Math.random() > 0.25)
|
||||
@ -520,7 +532,6 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
GetEntity().getWorld().playSound(GetEntity().getLocation(), Sound.WITHER_HURT, 1f, 2f);
|
||||
}
|
||||
|
||||
|
||||
for (int i=0 ; i<toSpawn ; i++)
|
||||
{
|
||||
//Spawn
|
||||
@ -599,12 +610,12 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
//Target
|
||||
_minionTargets.put(minion, GetRandomPlayer());
|
||||
}
|
||||
|
||||
//Announce
|
||||
Host.Announce(C.cAqua + C.Bold + "Kill the Pumpkin Minions!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void StateUpdate()
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ public class Wave1 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 15000))
|
||||
if (UtilTime.elapsed(_start, 30000))
|
||||
return;
|
||||
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
|
@ -16,7 +16,7 @@ public class Wave2 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 15000))
|
||||
if (UtilTime.elapsed(_start, 30000))
|
||||
return;
|
||||
|
||||
if (tick == 0)
|
||||
|
@ -18,10 +18,10 @@ public class Wave3 extends WaveBase
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick > 200 && tick % 10 == 0 && !UtilTime.elapsed(_start, 25000))
|
||||
if (tick > 200 && tick % 10 == 0 && !UtilTime.elapsed(_start, 35000))
|
||||
Host.AddCreature(new MobSpiderWebber(Host, GetSpawn()));
|
||||
|
||||
if (tick % 10 == 0 && !UtilTime.elapsed(_start, 15000))
|
||||
if (tick % 8 == 0 && !UtilTime.elapsed(_start, 25000))
|
||||
Host.AddCreature(new MobSpiderLeaper(Host, GetSpawn()));
|
||||
}
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ public class Wave4 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 25000))
|
||||
if (UtilTime.elapsed(_start, 30000))
|
||||
return;
|
||||
|
||||
if (tick > 0 && tick % 100 == 0)
|
||||
if (tick > 0 && tick % 70 == 0)
|
||||
{
|
||||
Location loc = GetSpawn();
|
||||
loc.setY(30 + 20 * Math.random());
|
||||
@ -32,7 +32,7 @@ public class Wave4 extends WaveBase
|
||||
if (Host.GetCreatures().size() > Host.GetMaxMobs())
|
||||
return;
|
||||
|
||||
if (tick % 20 == 0)
|
||||
if (tick % 10 == 0)
|
||||
Host.AddCreature(new MobPigZombie(Host, GetSpawn()));
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class Wave5 extends WaveBase
|
||||
@Override
|
||||
public void Spawn(int tick)
|
||||
{
|
||||
if (UtilTime.elapsed(_start, 20000))
|
||||
if (UtilTime.elapsed(_start, 30000))
|
||||
return;
|
||||
|
||||
if (tick == 0)
|
||||
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -63,6 +64,9 @@ public abstract class WaveBase
|
||||
{
|
||||
System.out.println("Wave " + wave + " has started.");
|
||||
Host.Announce(C.cRed + C.Bold + "Wave " + wave + ": " + C.cYellow + _name);
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 2f, 1f);
|
||||
}
|
||||
|
||||
//Display
|
||||
|
@ -25,17 +25,17 @@ public class WaveBoss extends WaveBase
|
||||
}
|
||||
|
||||
//Increasing difficulty of mobs
|
||||
if (Host.GetCreatures().size() < 20 + (tick/300) && !_king.IsFinal())
|
||||
if (Host.GetCreatures().size() < 40 + (tick/200) && !_king.IsFinal())
|
||||
{
|
||||
if (tick % Math.max(5, 20 - tick/600) == 0)
|
||||
if (tick % Math.max(5, 15 - tick/400) == 0)
|
||||
if (Math.random() > 0.10)
|
||||
Host.AddCreature(new MobZombie(Host, Host.GetRandomSpawn()));
|
||||
else
|
||||
Host.AddCreature(new MobCreeper(Host, Host.GetRandomSpawn()));
|
||||
}
|
||||
|
||||
//Giant every 2 minutes
|
||||
if (tick % 2400 == 0 && !_king.IsFinal())
|
||||
//Giant every 1.5 minutes
|
||||
if (tick % 1800 == 0 && !_king.IsFinal())
|
||||
{
|
||||
Host.AddCreature(new MobGiant(Host, GetSpawn()));
|
||||
}
|
||||
|
@ -60,8 +60,8 @@ public class PerkSeismicHammer extends Perk
|
||||
return;
|
||||
|
||||
//Action
|
||||
int damage = 10;
|
||||
double range = 10;
|
||||
int damage = 8;
|
||||
double range = 8;
|
||||
|
||||
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), range);
|
||||
for (LivingEntity cur : targets.keySet())
|
||||
|
Loading…
Reference in New Issue
Block a user