Add additional voice lines
This commit is contained in:
parent
93df8f2878
commit
5c98456995
|
@ -525,14 +525,13 @@ public class ChristmasCommon extends SoloGame
|
||||||
@Override
|
@Override
|
||||||
public Location GetSpectatorLocation()
|
public Location GetSpectatorLocation()
|
||||||
{
|
{
|
||||||
List<Player> alive = GetPlayers(true);
|
if (!IsLive())
|
||||||
|
|
||||||
if (alive.isEmpty())
|
|
||||||
{
|
{
|
||||||
return super.GetSpectatorLocation();
|
return super.GetSpectatorLocation();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
List<Player> alive = GetPlayers(true);
|
||||||
List<Location> locations = new ArrayList<>(alive.size());
|
List<Location> locations = new ArrayList<>(alive.size());
|
||||||
alive.forEach(player -> locations.add(player.getLocation()));
|
alive.forEach(player -> locations.add(player.getLocation()));
|
||||||
return UtilAlg.getAverageLocation(locations);
|
return UtilAlg.getAverageLocation(locations);
|
||||||
|
@ -560,7 +559,7 @@ public class ChristmasCommon extends SoloGame
|
||||||
if (victory)
|
if (victory)
|
||||||
{
|
{
|
||||||
WorldTimeSet = 18000;
|
WorldTimeSet = 18000;
|
||||||
sendSantaMessage("Well done everyone! You saved Christmas!", null);
|
Manager.runSyncLater(() -> sendSantaMessage("You did it! I can’t believe it! You saved Christmas!", null), 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCustomWinLine(customLine);
|
SetCustomWinLine(customLine);
|
||||||
|
|
|
@ -58,7 +58,7 @@ class SwitchParkour extends SectionChallenge
|
||||||
|
|
||||||
_checkpointTrigger = _worldData.GetCustomLocs(String.valueOf(Material.LAPIS_BLOCK.getId())).get(0).getBlock().getLocation();
|
_checkpointTrigger = _worldData.GetCustomLocs(String.valueOf(Material.LAPIS_BLOCK.getId())).get(0).getBlock().getLocation();
|
||||||
_checkpointHologram = new Hologram(host.getArcadeManager().getHologramManager(), _checkpointTrigger.clone().add(0.5, 1, 0.5), C.cGoldB + "Checkpoint")
|
_checkpointHologram = new Hologram(host.getArcadeManager().getHologramManager(), _checkpointTrigger.clone().add(0.5, 1, 0.5), C.cGoldB + "Checkpoint")
|
||||||
.setInteraction((player, clickType) -> activateCheckpoint());
|
.setInteraction((player, clickType) -> activateCheckpoint(player));
|
||||||
_checkpoint = _worldData.GetCustomLocs(String.valueOf(Material.LAPIS_ORE.getId()));
|
_checkpoint = _worldData.GetCustomLocs(String.valueOf(Material.LAPIS_ORE.getId()));
|
||||||
_checkpoint.forEach(location -> MapUtil.QuickChangeBlockAt(location, Material.AIR));
|
_checkpoint.forEach(location -> MapUtil.QuickChangeBlockAt(location, Material.AIR));
|
||||||
|
|
||||||
|
@ -146,12 +146,6 @@ class SwitchParkour extends SectionChallenge
|
||||||
public void checkpointInteract(PlayerInteractEvent event)
|
public void checkpointInteract(PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if (UtilPlayer.isSpectator(player))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
|
|
||||||
if (block == null || block.getType() != Material.LEVER)
|
if (block == null || block.getType() != Material.LEVER)
|
||||||
|
@ -159,12 +153,12 @@ class SwitchParkour extends SectionChallenge
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
activateCheckpoint();
|
activateCheckpoint(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void activateCheckpoint()
|
private void activateCheckpoint(Player player)
|
||||||
{
|
{
|
||||||
if (_hasCheckpointed)
|
if (_hasCheckpointed || UtilPlayer.isSpectator(player))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ class BossFight extends SectionChallenge
|
||||||
|
|
||||||
_innerGate.forEach(location -> MapUtil.QuickChangeBlockAt(location, Material.NETHER_FENCE));
|
_innerGate.forEach(location -> MapUtil.QuickChangeBlockAt(location, Material.NETHER_FENCE));
|
||||||
}
|
}
|
||||||
else if (!_dialogueC && UtilTime.elapsed(_start, 45000))
|
else if (!_dialogueC && UtilTime.elapsed(_start, 44000))
|
||||||
{
|
{
|
||||||
_dialogueC = true;
|
_dialogueC = true;
|
||||||
_host.sendBossMessage("Yes it was me! There is nothing you and your friends can do now, you are too late!", ChristmasNewAudio.PK_IT_WAS_ME);
|
_host.sendBossMessage("Yes it was me! There is nothing you and your friends can do now, you are too late!", ChristmasNewAudio.PK_IT_WAS_ME);
|
||||||
|
@ -169,7 +169,7 @@ class BossFight extends SectionChallenge
|
||||||
{
|
{
|
||||||
_dialogueA = true;
|
_dialogueA = true;
|
||||||
spawnBoss();
|
spawnBoss();
|
||||||
_host.sendBossMessage("Hahaha! I’ve been expecting you Santa Claus.", ChristmasNewAudio.PK_LAUGH);
|
_host.sendBossMessage("Hahaha! I’ve been expecting you Santa Claus. You fell right into my trap.", ChristmasNewAudio.PK_LAUGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.random() < 0.15)
|
if (Math.random() < 0.15)
|
||||||
|
|
|
@ -103,6 +103,9 @@ public class Phase1 extends BossPhase
|
||||||
|
|
||||||
_shield.add(stand);
|
_shield.add(stand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_host.getArcadeManager().runSyncLater(() -> _host.sendSantaMessage("He has a shield that’s protecting him from your attacks. Just try and survive while I think of a way to destroy it.", null), 80);
|
||||||
|
_host.getArcadeManager().runSyncLater(() -> _host.sendBossMessage("That’s right! I’ve learned about all your tricks that you’ve used before. I won’t be falling for them again!", null), 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -206,6 +209,7 @@ public class Phase1 extends BossPhase
|
||||||
_host.CreatureAllowOverride = false;
|
_host.CreatureAllowOverride = false;
|
||||||
_completing = true;
|
_completing = true;
|
||||||
_host.sendSantaMessage("GWEN? Is that you?", null);
|
_host.sendSantaMessage("GWEN? Is that you?", null);
|
||||||
|
_host.getArcadeManager().runSyncLater(() -> _host.sendBossMessage("That’s right! I’ve learned about all your tricks that you’ve used before. I won’t be falling for them again!", null), 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_animation.update())
|
if (_animation.update())
|
||||||
|
|
|
@ -7,9 +7,14 @@ import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
@ -112,6 +117,7 @@ public class Phase2 extends BossPhase
|
||||||
onAttack(null);
|
onAttack(null);
|
||||||
|
|
||||||
_host.sendBossMessage("Now you've really done it!", null);
|
_host.sendBossMessage("Now you've really done it!", null);
|
||||||
|
_host.getArcadeManager().runSyncLater(() -> _host.sendSantaMessage("Great! He’s now vulnerable to your attacks.", null), 50);
|
||||||
|
|
||||||
Map<Player, Location> lastLocation = new HashMap<>();
|
Map<Player, Location> lastLocation = new HashMap<>();
|
||||||
|
|
||||||
|
@ -178,6 +184,25 @@ public class Phase2 extends BossPhase
|
||||||
_section.setObjective("Defeat the Pumpkin King", _boss.getHealth() / _boss.getMaxHealth());
|
_section.setObjective("Defeat the Pumpkin King", _boss.getHealth() / _boss.getMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void projectileHit(ProjectileHitEvent event)
|
||||||
|
{
|
||||||
|
Projectile projectile = event.getEntity();
|
||||||
|
ProjectileSource source = projectile.getShooter();
|
||||||
|
|
||||||
|
if (source == null || !(source instanceof Player))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (projectile instanceof Arrow && UtilMath.offset2dSquared(_boss, projectile) < 4)
|
||||||
|
{
|
||||||
|
Player player = (Player) projectile.getShooter();
|
||||||
|
|
||||||
|
_host.getArcadeManager().GetDamage().NewDamageEvent(_boss, player, projectile, DamageCause.CUSTOM, 4, false, true, true, player.getName(), "Archery");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void bossDamage(CustomDamageEvent event)
|
public void bossDamage(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class Section2 extends Section
|
||||||
@Override
|
@Override
|
||||||
public void onSantaTarget()
|
public void onSantaTarget()
|
||||||
{
|
{
|
||||||
_host.sendSantaMessage("Oh no! Those witches looks particularly nasty.", ChristmasNewAudio.SANTA_WITCHES);
|
_host.sendSantaMessage("Oh no! Those spiders looks particularly nasty.", ChristmasNewAudio.SANTA_WITCHES);
|
||||||
_host.getArcadeManager().runSyncLater(() -> _host.sendSantaMessage("There’s another present hidden within that ice maze.", ChristmasNewAudio.SANTA_ICE_MAZE), 150);
|
_host.getArcadeManager().runSyncLater(() -> _host.sendSantaMessage("There’s another present hidden within that ice maze.", ChristmasNewAudio.SANTA_ICE_MAZE), 150);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue