Add additional voice lines
This commit is contained in:
parent
93df8f2878
commit
5c98456995
@ -525,14 +525,13 @@ public class ChristmasCommon extends SoloGame
|
||||
@Override
|
||||
public Location GetSpectatorLocation()
|
||||
{
|
||||
List<Player> alive = GetPlayers(true);
|
||||
|
||||
if (alive.isEmpty())
|
||||
if (!IsLive())
|
||||
{
|
||||
return super.GetSpectatorLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Player> alive = GetPlayers(true);
|
||||
List<Location> locations = new ArrayList<>(alive.size());
|
||||
alive.forEach(player -> locations.add(player.getLocation()));
|
||||
return UtilAlg.getAverageLocation(locations);
|
||||
@ -560,7 +559,7 @@ public class ChristmasCommon extends SoloGame
|
||||
if (victory)
|
||||
{
|
||||
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);
|
||||
|
@ -58,7 +58,7 @@ class SwitchParkour extends SectionChallenge
|
||||
|
||||
_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")
|
||||
.setInteraction((player, clickType) -> activateCheckpoint());
|
||||
.setInteraction((player, clickType) -> activateCheckpoint(player));
|
||||
_checkpoint = _worldData.GetCustomLocs(String.valueOf(Material.LAPIS_ORE.getId()));
|
||||
_checkpoint.forEach(location -> MapUtil.QuickChangeBlockAt(location, Material.AIR));
|
||||
|
||||
@ -146,12 +146,6 @@ class SwitchParkour extends SectionChallenge
|
||||
public void checkpointInteract(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (UtilPlayer.isSpectator(player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Block block = event.getClickedBlock();
|
||||
|
||||
if (block == null || block.getType() != Material.LEVER)
|
||||
@ -159,12 +153,12 @@ class SwitchParkour extends SectionChallenge
|
||||
return;
|
||||
}
|
||||
|
||||
activateCheckpoint();
|
||||
activateCheckpoint(player);
|
||||
}
|
||||
|
||||
private void activateCheckpoint()
|
||||
private void activateCheckpoint(Player player)
|
||||
{
|
||||
if (_hasCheckpointed)
|
||||
if (_hasCheckpointed || UtilPlayer.isSpectator(player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ class BossFight extends SectionChallenge
|
||||
|
||||
_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;
|
||||
_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;
|
||||
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)
|
||||
|
@ -103,6 +103,9 @@ public class Phase1 extends BossPhase
|
||||
|
||||
_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
|
||||
@ -206,6 +209,7 @@ public class Phase1 extends BossPhase
|
||||
_host.CreatureAllowOverride = false;
|
||||
_completing = true;
|
||||
_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())
|
||||
|
@ -7,9 +7,14 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
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.util.Vector;
|
||||
|
||||
@ -112,6 +117,7 @@ public class Phase2 extends BossPhase
|
||||
onAttack(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<>();
|
||||
|
||||
@ -178,6 +184,25 @@ public class Phase2 extends BossPhase
|
||||
_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
|
||||
public void bossDamage(CustomDamageEvent event)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ public class Section2 extends Section
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user