Beta ready commit

This commit is contained in:
Sam 2016-09-05 17:59:49 +01:00
parent 34ee62bdc3
commit 8ebaad4736
11 changed files with 217 additions and 128 deletions

View File

@ -133,9 +133,9 @@ public class QuiverPayload extends TeamGame
private static final String DATA_POINT_KIT_BLUE = "LIGHT_BLUE"; private static final String DATA_POINT_KIT_BLUE = "LIGHT_BLUE";
private static final String CUSTOM_LOCATION_BARRIER_RED = "73"; private static final String CUSTOM_LOCATION_BARRIER_RED = "73";
private static final String CUSTOM_LOCATION_BARRIER_BLUE = "21"; private static final String CUSTOM_LOCATION_BARRIER_BLUE = "21";
private static final int SPAWN_SHIELD_RADIUS = 5; private static final int SPAWN_SHIELD_RADIUS = 5;
private static final String OVERTIME = C.cGold + "!!! " + C.cDRedB + "OVERTIME" + C.cGold + " !!!"; private static final String OVERTIME = C.cGold + "!!! " + C.cDRedB + "OVERTIME" + C.cGold + " !!!";
private Minecart _minecart; private Minecart _minecart;
@ -162,10 +162,10 @@ public class QuiverPayload extends TeamGame
private Map<UUID, Integer> _killstreakAmount = new HashMap<>(); private Map<UUID, Integer> _killstreakAmount = new HashMap<>();
private Map<UUID, Long> _killstreamLast = new HashMap<>(); private Map<UUID, Long> _killstreamLast = new HashMap<>();
private long _lastTeamKill; private long _lastTeamKill;
private Set<ObjectiveParticle> _objectiveParticle = new HashSet<>(); private Set<ObjectiveParticle> _objectiveParticle = new HashSet<>();
private Set<SpawnBarrier> _spawnBarrier = new HashSet<>(); private Set<SpawnBarrier> _spawnBarrier = new HashSet<>();
private Team _payloadTeam; private Team _payloadTeam;
public QuiverPayload(ArcadeManager manager) public QuiverPayload(ArcadeManager manager)
@ -174,12 +174,8 @@ public class QuiverPayload extends TeamGame
new KitBeserker(manager), new KitNewNinja(manager), new KitBarrage(manager), new KitSkyWarrior(manager), new KitPyromancer(manager), new KitNecromancer(manager), new KitBeserker(manager), new KitNewNinja(manager), new KitBarrage(manager), new KitSkyWarrior(manager), new KitPyromancer(manager), new KitNecromancer(manager),
}, new String[] { }, new String[] { "Arrows one hit kill opponents.", "You recieve one arrow per kill.", "Stand next to the payload to move it towards the enemy base.",
"Lasts 10 minutes or until a team scores " + MAX_SCORE + " points", });
"Arrows one hit kill opponents.", "You recieve one arrow per kill.", "Stand next to the payload to move it towards the enemy base.", "Lasts 10 minutes or until a team scores "
+ MAX_SCORE + " points",
});
this.PlayersPerTeam = 5; this.PlayersPerTeam = 5;
this.DeathOut = false; this.DeathOut = false;
@ -190,6 +186,8 @@ public class QuiverPayload extends TeamGame
this.TeamArmor = true; this.TeamArmor = true;
this.TeamArmorHotbar = true; this.TeamArmorHotbar = true;
this.HungerSet = 20; this.HungerSet = 20;
this._help = new String[] { "Standing near the payload increases your Ultimate charge.", "Arrow powerups respawn every 20 seconds.",
"Killing or assisting on kills increases your Ultimate Charge.", "You can change your Kit during the game by clicking the Zombies in your Spawn." };
registerModule(new VersionModule(MinecraftVersion.Version1_9, "One in the Quiver Payload requires Minecraft 1.9!")); registerModule(new VersionModule(MinecraftVersion.Version1_9, "One in the Quiver Payload requires Minecraft 1.9!"));
@ -246,19 +244,19 @@ public class QuiverPayload extends TeamGame
for (GameTeam gameTeam : _teamScore.keySet()) for (GameTeam gameTeam : _teamScore.keySet())
{ {
Scoreboard.write(gameTeam.GetColor() + C.Bold + "Team " + gameTeam.getDisplayName()); Scoreboard.write(gameTeam.GetColor() + C.Bold + "Team " + gameTeam.getDisplayName());
int alivePlayers = 0; int alivePlayers = 0;
for (Player player : gameTeam.GetPlayers(true)) for (Player player : gameTeam.GetPlayers(true))
{ {
if (UtilPlayer.isSpectator(player)) if (UtilPlayer.isSpectator(player))
{ {
continue; continue;
} }
alivePlayers++; alivePlayers++;
} }
Scoreboard.write(alivePlayers + "/" + gameTeam.GetPlayers(true).size() + " Alive"); Scoreboard.write(alivePlayers + "/" + gameTeam.GetPlayers(true).size() + " Alive");
Scoreboard.writeNewLine(); Scoreboard.writeNewLine();
} }
@ -274,9 +272,9 @@ public class QuiverPayload extends TeamGame
Scoreboard.writeNewLine(); Scoreboard.writeNewLine();
} }
} }
Scoreboard.write(C.cRedB + "Game End"); Scoreboard.write(C.cRedB + "Game End");
if (_isOvertime) if (_isOvertime)
{ {
Scoreboard.write(OVERTIME); Scoreboard.write(OVERTIME);
@ -315,13 +313,13 @@ public class QuiverPayload extends TeamGame
spawnKitNPCs(WorldData.GetDataLocs(DATA_POINT_KIT_BLUE), GetTeam(org.bukkit.ChatColor.AQUA)); spawnKitNPCs(WorldData.GetDataLocs(DATA_POINT_KIT_BLUE), GetTeam(org.bukkit.ChatColor.AQUA));
CreatureAllowOverride = false; CreatureAllowOverride = false;
Set<Location> redBarriers = new HashSet<>(); Set<Location> redBarriers = new HashSet<>();
Set<Location> blueBarriers = new HashSet<>(); Set<Location> blueBarriers = new HashSet<>();
redBarriers.addAll(WorldData.GetCustomLocs(CUSTOM_LOCATION_BARRIER_RED)); redBarriers.addAll(WorldData.GetCustomLocs(CUSTOM_LOCATION_BARRIER_RED));
blueBarriers.addAll(WorldData.GetCustomLocs(CUSTOM_LOCATION_BARRIER_BLUE)); blueBarriers.addAll(WorldData.GetCustomLocs(CUSTOM_LOCATION_BARRIER_BLUE));
_spawnBarrier.add(new SpawnBarrier(this, GetTeam(org.bukkit.ChatColor.RED), redBarriers)); _spawnBarrier.add(new SpawnBarrier(this, GetTeam(org.bukkit.ChatColor.RED), redBarriers));
_spawnBarrier.add(new SpawnBarrier(this, GetTeam(org.bukkit.ChatColor.AQUA), blueBarriers)); _spawnBarrier.add(new SpawnBarrier(this, GetTeam(org.bukkit.ChatColor.AQUA), blueBarriers));
} }
@ -500,32 +498,34 @@ public class QuiverPayload extends TeamGame
if (same) if (same)
{ {
String subTitle = C.cRed + "The track will now shrink over time!"; String subTitle = C.cRed + "The track will now shrink over time!";
UtilTextMiddle.display(OVERTIME, subTitle, 10, 30, 10); UtilTextMiddle.display(OVERTIME, subTitle, 10, 30, 10);
UtilServer.broadcast(OVERTIME + " " + subTitle); UtilServer.broadcast(OVERTIME + " " + subTitle);
_isOvertime = true; _isOvertime = true;
return; return;
// double shortest = Double.MAX_VALUE; // double shortest = Double.MAX_VALUE;
// //
// for (GameTeam gameTeam : _teamScore.keySet()) // for (GameTeam gameTeam : _teamScore.keySet())
// { // {
// double distance = getTrackDistanceToMarker(getDestination(gameTeam), gameTeam); // double distance =
// // getTrackDistanceToMarker(getDestination(gameTeam),
// if (distance < shortest) // gameTeam);
// { //
// shortest = distance; // if (distance < shortest)
// WinnerTeam = gameTeam; // {
// } // shortest = distance;
// } // WinnerTeam = gameTeam;
// }
// }
} }
AnnounceEnd(WinnerTeam); AnnounceEnd(WinnerTeam);
SetState(GameState.End); SetState(GameState.End);
return; return;
} }
if (event.getType() == UpdateType.SEC && _isOvertime) if (event.getType() == UpdateType.SEC && _isOvertime)
{ {
if (_lastOvertimeTrack.isEmpty()) if (_lastOvertimeTrack.isEmpty())
@ -533,16 +533,16 @@ public class QuiverPayload extends TeamGame
_lastOvertimeTrack.add(_pathMarkers.get(0).getBlock().getRelative(BlockFace.DOWN)); _lastOvertimeTrack.add(_pathMarkers.get(0).getBlock().getRelative(BlockFace.DOWN));
_lastOvertimeTrack.add(_pathMarkers.get(_pathMarkers.size() - 1).getBlock().getRelative(BlockFace.DOWN)); _lastOvertimeTrack.add(_pathMarkers.get(_pathMarkers.size() - 1).getBlock().getRelative(BlockFace.DOWN));
} }
Set<Block> newTracks = new HashSet<>(); Set<Block> newTracks = new HashSet<>();
for (Block block : _lastOvertimeTrack) for (Block block : _lastOvertimeTrack)
{ {
if (isMinecartNearMarker(block.getLocation())) if (isMinecartNearMarker(block.getLocation()))
{ {
Location locationA = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_RED)); Location locationA = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_RED));
Location locationB = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_BLUE)); Location locationB = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_BLUE));
if (UtilMath.offset(_minecart.getLocation(), locationA) < UtilMath.offset(_minecart.getLocation(), locationB)) if (UtilMath.offset(_minecart.getLocation(), locationA) < UtilMath.offset(_minecart.getLocation(), locationB))
{ {
WinnerTeam = GetTeam(org.bukkit.ChatColor.AQUA); WinnerTeam = GetTeam(org.bukkit.ChatColor.AQUA);
@ -557,9 +557,9 @@ public class QuiverPayload extends TeamGame
displayEndEffect(); displayEndEffect();
return; return;
} }
for (Block other : UtilBlock.getInRadius(block, 1.5).keySet()) for (Block other : UtilBlock.getInRadius(block, 1.5).keySet())
{ {
if (other.getType() == Material.RAILS) if (other.getType() == Material.RAILS)
{ {
block.setType(Material.AIR); block.setType(Material.AIR);
@ -568,7 +568,7 @@ public class QuiverPayload extends TeamGame
} }
} }
} }
_lastOvertimeTrack = newTracks; _lastOvertimeTrack = newTracks;
} }
@ -595,7 +595,7 @@ public class QuiverPayload extends TeamGame
{ {
powerupGenerator.update(); powerupGenerator.update();
} }
for (SpawnBarrier spawnBarrier : _spawnBarrier) for (SpawnBarrier spawnBarrier : _spawnBarrier)
{ {
spawnBarrier.playParticles(); spawnBarrier.playParticles();
@ -622,12 +622,16 @@ public class QuiverPayload extends TeamGame
if (percentage >= 100) if (percentage >= 100)
{ {
UtilTextBottom.display((_coloredMessage ? C.cWhiteB : C.cAquaB) + "ULTIMATE READY (PRESS SNEAK)", player); UtilTextBottom.display((_coloredMessage ? C.cWhiteB : C.cAquaB) + "ULTIMATE READY (PRESS SNEAK)", player);
player.setExp(0.999F);
player.setLevel(100);
continue; continue;
} }
String percentageFormatted = new DecimalFormat("0.0").format(percentage); String percentageFormatted = new DecimalFormat("0.0").format(percentage);
UtilTextBottom.displayProgress("Ultimate", percentage / 100, percentageFormatted + "%", player); UtilTextBottom.displayProgress("Ultimate", percentage / 100, percentageFormatted + "%", player);
player.setExp((float) percentage / 100);
player.setLevel((int) percentage);
for (Perk perk : kit.GetPerks()) for (Perk perk : kit.GetPerks())
{ {
@ -732,6 +736,21 @@ public class QuiverPayload extends TeamGame
case 5: case 5:
name = "PENTA"; name = "PENTA";
break; break;
case 6:
name = "HEXA";
break;
case 7:
name = "SEPTA";
break;
case 8:
name = "OCTA";
break;
case 9:
name = "NONA";
break;
case 10:
name = "DECA";
break;
} }
if (name != null) if (name != null)
@ -742,7 +761,7 @@ public class QuiverPayload extends TeamGame
} }
AddGems(player, GEMS_KILLSTREAK * kills, name + " Killstreak", true, true); AddGems(player, GEMS_KILLSTREAK * kills, name + " Killstreak", true, true);
UtilServer.broadcast(C.cRedB + player.getName() + C.cWhite + " got a " + C.cRedB + name + " KILL" + C.cWhite + "!"); UtilServer.broadcast(C.cGreenB + player.getName() + C.cWhite + " got a " + C.cGreenB + name + " KILL" + C.cWhite + "!");
} }
} }
@ -750,7 +769,7 @@ public class QuiverPayload extends TeamGame
} }
} }
} }
for (SpawnBarrier spawnBarrier : _spawnBarrier) for (SpawnBarrier spawnBarrier : _spawnBarrier)
{ {
spawnBarrier.update(); spawnBarrier.update();
@ -891,6 +910,21 @@ public class QuiverPayload extends TeamGame
for (GameTeam gameTeam : _teamScore.keySet()) for (GameTeam gameTeam : _teamScore.keySet())
{ {
if (gameTeam.GetPlayers(true).isEmpty())
{
for (GameTeam otherTeam : _teamScore.keySet())
{
if (gameTeam.equals(otherTeam))
{
continue;
}
WinnerTeam = otherTeam;
awardWinGems();
displayEndEffect();
}
}
if (isMinecartNearMarker(getDestination(gameTeam)) && _teamDirection.equals(gameTeam)) if (isMinecartNearMarker(getDestination(gameTeam)) && _teamDirection.equals(gameTeam))
{ {
int score = _teamScore.get(gameTeam); int score = _teamScore.get(gameTeam);
@ -1018,7 +1052,7 @@ public class QuiverPayload extends TeamGame
UtilTextMiddle.display("", message, 10, 20, 10); UtilTextMiddle.display("", message, 10, 20, 10);
UtilServer.broadcast(message); UtilServer.broadcast(message);
} }
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
{ {
if (GetTeam(player).equals(_teamDirection)) if (GetTeam(player).equals(_teamDirection))
@ -1028,7 +1062,7 @@ public class QuiverPayload extends TeamGame
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1, 0); player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1, 0);
} }
displayPointScoreEffect(); displayPointScoreEffect();
new BukkitRunnable() new BukkitRunnable()
@ -1139,7 +1173,7 @@ public class QuiverPayload extends TeamGame
{ {
return; return;
} }
if (!(event.GetEvent().getEntity() instanceof Player)) if (!(event.GetEvent().getEntity() instanceof Player))
{ {
return; return;
@ -1155,7 +1189,7 @@ public class QuiverPayload extends TeamGame
player.getInventory().addItem(Quiver.SUPER_ARROW); player.getInventory().addItem(Quiver.SUPER_ARROW);
killed.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 10, 0)); killed.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 10, 0));
incrementUltimate(player, ULTIMATE_PERCENTAGE_INCREASE_KILL); incrementUltimate(player, ULTIMATE_PERCENTAGE_INCREASE_KILL);
if (_killstreakAmount.containsKey(player.getUniqueId())) if (_killstreakAmount.containsKey(player.getUniqueId()))
@ -1287,11 +1321,12 @@ public class QuiverPayload extends TeamGame
{ {
event.AddMod("Projectile", SUPER_ARROW_DAMAGE_REASON, SUPER_ARROW_DAMAGE_MOD, false); event.AddMod("Projectile", SUPER_ARROW_DAMAGE_REASON, SUPER_ARROW_DAMAGE_MOD, false);
event.SetDamageToLevel(false);
event.SetKnockback(false); event.SetKnockback(false);
} }
} }
event.SetDamageToLevel(false);
if (UtilMath.offset(player.getLocation(), UtilAlg.findClosest(player.getLocation(), GetTeam(player).GetSpawns())) < SPAWN_SHIELD_RADIUS) if (UtilMath.offset(player.getLocation(), UtilAlg.findClosest(player.getLocation(), GetTeam(player).GetSpawns())) < SPAWN_SHIELD_RADIUS)
{ {
event.SetCancelled("Spawn Shield"); event.SetCancelled("Spawn Shield");
@ -1409,7 +1444,7 @@ public class QuiverPayload extends TeamGame
return C.cAqua + "" + C.cWhite + "[ " + progress + C.cWhite + " ]" + C.cRed + ""; return C.cAqua + "" + C.cWhite + "[ " + progress + C.cWhite + " ]" + C.cRed + "";
} }
private void awardWinGems() private void awardWinGems()
{ {
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
@ -1418,16 +1453,16 @@ public class QuiverPayload extends TeamGame
{ {
continue; continue;
} }
AddGems(player, 10, "Winning Team", false, false); AddGems(player, 10, "Winning Team", false, false);
} }
} }
private void spawnKitNPCs(List<Location> locations, GameTeam gameTeam) private void spawnKitNPCs(List<Location> locations, GameTeam gameTeam)
{ {
int i = 0; int i = 0;
Location spawnsAverage = UtilAlg.getAverageLocation(gameTeam.GetSpawns()).subtract(0, 1, 0); Location spawnsAverage = UtilAlg.getAverageLocation(gameTeam.GetSpawns()).subtract(0, 1, 0);
for (Location location : locations) for (Location location : locations)
{ {
if (i >= GetKits().length) if (i >= GetKits().length)
@ -1439,7 +1474,7 @@ public class QuiverPayload extends TeamGame
ProgressingKit progressingKit = (ProgressingKit) GetKits()[i++]; ProgressingKit progressingKit = (ProgressingKit) GetKits()[i++];
UtilEnt.CreatureLook(entity, spawnsAverage); UtilEnt.CreatureLook(entity, spawnsAverage);
_kitNPC.put(entity, progressingKit); _kitNPC.put(entity, progressingKit);
} }
} }
@ -1449,9 +1484,14 @@ public class QuiverPayload extends TeamGame
return _kitNPC.containsKey(entity); return _kitNPC.containsKey(entity);
} }
@EventHandler // TODO DEBUG COMMANDS REMOVE ON PR @EventHandler //DEBUG COMMANDS
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{ {
if (!UtilServer.isTestServer())
{
return;
}
Player player = event.getPlayer(); Player player = event.getPlayer();
if (event.getMessage().startsWith("/maxpower")) if (event.getMessage().startsWith("/maxpower"))
@ -1478,7 +1518,7 @@ public class QuiverPayload extends TeamGame
else if (event.getMessage().startsWith("/overtime")) else if (event.getMessage().startsWith("/overtime"))
{ {
event.setCancelled(true); event.setCancelled(true);
_isOvertime = true; _isOvertime = true;
} }
} }
@ -1488,7 +1528,7 @@ public class QuiverPayload extends TeamGame
{ {
return assist ? GEMS_ASSIST : GEMS_KILL; return assist ? GEMS_ASSIST : GEMS_KILL;
} }
public Set<SpawnBarrier> getSpawnBarriers() public Set<SpawnBarrier> getSpawnBarriers()
{ {
return _spawnBarrier; return _spawnBarrier;

View File

@ -60,7 +60,7 @@ public class SpawnBarrier
for (Location location : _barriers) for (Location location : _barriers)
{ {
if (UtilMath.offset(player.getLocation(), location) < 3) if (UtilMath.offset(player.getLocation(), location) < 4)
{ {
UtilAction.velocity(player, UtilAlg.getTrajectory(location, player.getLocation()).normalize().setY(0.4)); UtilAction.velocity(player, UtilAlg.getTrajectory(location, player.getLocation()).normalize().setY(0.4));
} }

View File

@ -37,7 +37,6 @@ public class KitBarrage extends ProgressingKit
private static final String DOUBLE_JUMP = "Double Jump"; private static final String DOUBLE_JUMP = "Double Jump";
private static final String ULTIMATE = "Ultimate"; private static final String ULTIMATE = "Ultimate";
private static final String ARROWS = "Arrows";
private static final String SUPER_ARROW = "Super Arrow"; private static final String SUPER_ARROW = "Super Arrow";
private static final Perk[][] PERKS = { private static final Perk[][] PERKS = {
@ -46,21 +45,11 @@ public class KitBarrage extends ProgressingKit
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW), new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(10) new UltimateBarrage(10)
}, },
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(11)
},
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW), new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(12) new UltimateBarrage(12)
}, },
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(13)
},
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW), new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
@ -69,27 +58,42 @@ public class KitBarrage extends ProgressingKit
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW), new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(15) new UltimateBarrage(16)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(18)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
new UltimateBarrage(20)
} }
}; };
private static final String[][] UPGRADE_DETAILS = { private static final String[][] UPGRADE_DETAILS = {
{ {
increase(ULTIMATE, ARROWS, 10) increaseArrows(2),
}, },
{ {
increase(ULTIMATE, ARROWS, 10) increaseArrows(2),
}, },
{ {
increase(ULTIMATE, ARROWS, 10) increaseArrows(2),
}, },
{ {
increase(ULTIMATE, ARROWS, 10) increaseArrows(2),
}, },
{ {
increase(ULTIMATE, ARROWS, 10) increaseArrows(2),
}, },
}; };
private static final String increaseArrows(int arrows)
{
return C.cWhite + "Increase arrows fired from " + C.cGreen + ULTIMATE + C.cWhite + " by " + C.cGreen + arrows + C.cWhite + ".";
}
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_AXE); private static final ItemStack IN_HAND = new ItemStack(Material.IRON_AXE);

View File

@ -31,7 +31,7 @@ public class KitBeserker extends ProgressingKit
"Deal " + C.cGreen + "+1" + C.cWhite + " more damage", "Deal " + C.cGreen + "+1" + C.cWhite + " more damage",
"", "",
C.cGreenB + "ULTIMATE", C.cGreenB + "ULTIMATE",
"You eqiup " + C.cGreen + "iron" + C.cWhite + " chestplate, leggings and boots.", "You equip " + C.cGreen + "iron" + C.cWhite + " chestplate, leggings and boots.",
"Arrows do not one hit you.", "Arrows do not one hit you.",
"Lasts for " + C.cGreen + "6" + C.cWhite + " seconds." "Lasts for " + C.cGreen + "6" + C.cWhite + " seconds."
}; };
@ -100,7 +100,7 @@ public class KitBeserker extends ProgressingKit
public KitBeserker(ArcadeManager manager) public KitBeserker(ArcadeManager manager)
{ {
super(manager, "Beserker", "quiverbeserker", KitAvailability.Free, DESCRIPTION, PERKS, UPGRADE_DETAILS, EntityType.ZOMBIE, IN_HAND); super(manager, "Berserker", "quiverbeserker", KitAvailability.Free, DESCRIPTION, PERKS, UPGRADE_DETAILS, EntityType.ZOMBIE, IN_HAND);
} }
@Override @Override

View File

@ -1,5 +1,8 @@
package nautilus.game.arcade.game.games.quiver.kits; package nautilus.game.arcade.game.games.quiver.kits;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -12,6 +15,7 @@ import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.Game.GameState; import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.quiver.Quiver; import nautilus.game.arcade.game.games.quiver.Quiver;
import nautilus.game.arcade.game.games.quiver.QuiverPayload;
import nautilus.game.arcade.game.games.quiver.ultimates.UltimateNecromancer; import nautilus.game.arcade.game.games.quiver.ultimates.UltimateNecromancer;
import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.Perk;
@ -27,7 +31,7 @@ public class KitNecromancer extends ProgressingKit
"Successful arrow hits restore " + C.cGreen + "2" + C.cWhite + " hearts.", "Successful arrow hits restore " + C.cGreen + "2" + C.cWhite + " hearts.",
"", "",
C.cGreenB + "ULTIMATE", C.cGreenB + "ULTIMATE",
"Summon " + C.cGreen + "3 Undead Minions" + C.cWhite + " that shoot at other players", "Summon " + C.cGreen + "4 Undead Minions" + C.cWhite + " that shoot at other players",
"Lasts for " + C.cGreen + "10" + C.cWhite + " seconds." "Lasts for " + C.cGreen + "10" + C.cWhite + " seconds."
}; };
@ -39,32 +43,32 @@ public class KitNecromancer extends ProgressingKit
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(10000, 3) new UltimateNecromancer(10000, 4)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(10500, 3) new UltimateNecromancer(10500, 4)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(11000, 3) new UltimateNecromancer(11000, 4)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(11500, 3) new UltimateNecromancer(11500, 4)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(12000, 3) new UltimateNecromancer(12000, 4)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkLifestealArrows(8), new PerkLifestealArrows(8),
new UltimateNecromancer(12500, 3) new UltimateNecromancer(12500, 4)
} }
}; };
@ -111,6 +115,21 @@ public class KitNecromancer extends ProgressingKit
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), () -> UtilInv.Update(player), 10); UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), () -> UtilInv.Update(player), 10);
} }
} }
@Override
public void onSelected(UUID player)
{
super.onSelected(player);
if (!Manager.GetGame().IsLive())
{
return;
}
QuiverPayload quiverPayload = (QuiverPayload) Manager.GetGame();
quiverPayload.resetUltimate(Bukkit.getPlayer(player), true);
}
@Override @Override
public boolean showUpgrades() public boolean showUpgrades()

View File

@ -45,33 +45,33 @@ public class KitPyromancer extends ProgressingKit
private static final Perk[][] PERKS = { private static final Perk[][] PERKS = {
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60), new PerkFireArrows(3, 60),
new UltimatePyromancer() new UltimatePyromancer(5000)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(3, 60),
new UltimatePyromancer(5500)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(3, 60),
new UltimatePyromancer(6000)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(3, 60),
new UltimatePyromancer(6500)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(3, 60),
new UltimatePyromancer(7000)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60), new PerkFireArrows(2, 60),
new UltimatePyromancer() new UltimatePyromancer(7500)
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60),
new UltimatePyromancer()
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60),
new UltimatePyromancer()
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60),
new UltimatePyromancer()
},
{
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkFireArrows(2, 60),
new UltimatePyromancer()
} }
}; };

View File

@ -27,7 +27,7 @@ public class KitSkyWarrior extends ProgressingKit
{ {
private static final String[] DESCRIPTION = { private static final String[] DESCRIPTION = {
"Something to do with the kit", "We\'ll see you in the sky.",
"", "",
"Gain permanent Speed I", "Gain permanent Speed I",
"", "",
@ -42,12 +42,13 @@ public class KitSkyWarrior extends ProgressingKit
"", "",
"Once all arrows are fired you teleport to a random", "Once all arrows are fired you teleport to a random",
"teammate dealing damage to all players within", "teammate dealing damage to all players within",
C.cGreen + "10" + C.cWhite + " blocks for " + C.cGreen + "2" + C.cWhite + " damage." C.cGreen + "10" + C.cWhite + " blocks for " + C.cGreen + "5" + C.cWhite + " damage."
}; };
private static final String DOUBLE_JUMP = "Double Jump"; private static final String DOUBLE_JUMP = "Double Jump";
private static final String ULTIMATE = "Ultimate"; private static final String ULTIMATE = "Ultimate";
private static final String DURATION = "Duration"; private static final String DAMAGE = "Damage";
private static final String DAMAGE_TELEPORT = "Teleportation Damage";
private static final Perk[][] PERKS = { private static final Perk[][] PERKS = {
{ {
@ -58,45 +59,50 @@ public class KitSkyWarrior extends ProgressingKit
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkSpeed(0), new PerkSpeed(0),
new UltimateSkyWarrior(5, 10, 10, 5, 30) new UltimateSkyWarrior(5.5, 10, 11, 5, 30)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkSpeed(0), new PerkSpeed(0),
new UltimateSkyWarrior(5, 10, 10, 5, 30) new UltimateSkyWarrior(6, 10, 12, 5, 30)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkSpeed(0), new PerkSpeed(0),
new UltimateSkyWarrior(5, 10, 10, 5, 30) new UltimateSkyWarrior(6.5, 10, 13, 5, 30)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkSpeed(0), new PerkSpeed(0),
new UltimateSkyWarrior(5, 10, 10, 5, 30) new UltimateSkyWarrior(7, 10, 14, 5, 30)
}, },
{ {
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true), new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
new PerkSpeed(0), new PerkSpeed(0),
new UltimateSkyWarrior(5, 10, 10, 5, 30) new UltimateSkyWarrior(7.5, 10, 15, 5, 30)
} }
}; };
private static final String[][] UPGRADE_DETAILS = { private static final String[][] UPGRADE_DETAILS = {
{ {
increase(ULTIMATE, DURATION, 12) increase(ULTIMATE, DAMAGE, 10),
increase(ULTIMATE, DAMAGE_TELEPORT, 10),
}, },
{ {
increase(ULTIMATE, DURATION, 12) increase(ULTIMATE, DAMAGE, 10),
increase(ULTIMATE, DAMAGE_TELEPORT, 10),
}, },
{ {
increase(ULTIMATE, DURATION, 12) increase(ULTIMATE, DAMAGE, 10),
increase(ULTIMATE, DAMAGE_TELEPORT, 10),
}, },
{ {
increase(ULTIMATE, DURATION, 12) increase(ULTIMATE, DAMAGE, 10),
increase(ULTIMATE, DAMAGE_TELEPORT, 10),
}, },
{ {
increase(ULTIMATE, DURATION, 12) increase(ULTIMATE, DAMAGE, 10),
increase(ULTIMATE, DAMAGE_TELEPORT, 10),
}, },
}; };

View File

@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
@ -44,7 +43,6 @@ public abstract class Ultimate extends Perk
ChatColor teamColor = Manager.GetGame().GetTeam(player).GetColor(); ChatColor teamColor = Manager.GetGame().GetTeam(player).GetColor();
player.sendMessage(F.main("Game", "Activated " + F.skill(GetName())));
UtilServer.broadcast(teamColor + C.Bold + player.getName() + C.cWhiteB + " activated their " + teamColor + C.Bold + GetName() + C.cWhiteB + "."); UtilServer.broadcast(teamColor + C.Bold + player.getName() + C.cWhiteB + " activated their " + teamColor + C.Bold + GetName() + C.cWhiteB + ".");
for (Player other : UtilServer.getPlayers()) for (Player other : UtilServer.getPlayers())
@ -57,7 +55,6 @@ public abstract class Ultimate extends Perk
{ {
_lastUltimate.remove(player.getUniqueId()); _lastUltimate.remove(player.getUniqueId());
player.sendMessage(F.main("Game", "Deactivated " + F.skill(GetName())));
player.playSound(player.getLocation(), Sound.BLAZE_DEATH, 1, 0); player.playSound(player.getLocation(), Sound.BLAZE_DEATH, 1, 0);
} }

View File

@ -39,7 +39,6 @@ public class UltimateNinja extends Ultimate
if (getLastUltimate().containsKey(event.GetDamagerPlayer(false).getUniqueId()) && event.GetDamagerPlayer(false).getItemInHand().getType() == Material.DIAMOND_SWORD) if (getLastUltimate().containsKey(event.GetDamagerPlayer(false).getUniqueId()) && event.GetDamagerPlayer(false).getItemInHand().getType() == Material.DIAMOND_SWORD)
{ {
event.AddMod(event.GetDamagerPlayer(false).getName(), GetName(), 9001, true); event.AddMod(event.GetDamagerPlayer(false).getName(), GetName(), 9001, true);
event.SetDamageToLevel(false);
} }
} }

View File

@ -21,11 +21,15 @@ public class UltimatePyromancer extends Ultimate
private static final double CHARGE_PER_SECOND = 0.4; private static final double CHARGE_PER_SECOND = 0.4;
private long _length;
private Map<UUID, Integer> _tasks = new HashMap<>(); private Map<UUID, Integer> _tasks = new HashMap<>();
public UltimatePyromancer() public UltimatePyromancer(long length)
{ {
super("Fire Blossom", new String[] {}); super("Fire Blossom", new String[] {});
_length = length;
} }
@Override @Override
@ -47,7 +51,7 @@ public class UltimatePyromancer extends Ultimate
Arrow arrow = player.launchProjectile(Arrow.class); Arrow arrow = player.launchProjectile(Arrow.class);
arrow.setCritical(true); arrow.setCritical(true);
arrow.setVelocity(new Vector((Math.random() - 0.5) * 7, 0.1, (Math.random() - 0.5) * 7)); arrow.setVelocity(new Vector((Math.random() - 0.5) * 9, 0.1, (Math.random() - 0.5) * 9));
} }
}.runTaskTimer(Manager.getPlugin(), 0, 1)).getTaskId()); }.runTaskTimer(Manager.getPlugin(), 0, 1)).getTaskId());
} }
@ -70,7 +74,7 @@ public class UltimatePyromancer extends Ultimate
@Override @Override
public long getLength() public long getLength()
{ {
return 5000; return _length;
} }
} }

View File

@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
@ -168,6 +169,25 @@ public class UltimateSkyWarrior extends Ultimate
{ {
cancel(player); cancel(player);
} }
}
@EventHandler
public void onPlayerMove(PlayerMoveEvent event)
{
if (!getLastUltimate().containsKey(event.getPlayer().getUniqueId()))
{
return;
}
Location from = event.getFrom();
Location to = event.getTo();
if (from.getX() == to.getX() && from.getZ() == to.getZ())
{
return;
}
event.setTo(from);
} }
@Override @Override