Beta ready commit
This commit is contained in:
parent
34ee62bdc3
commit
8ebaad4736
|
@ -133,9 +133,9 @@ public class QuiverPayload extends TeamGame
|
|||
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_BLUE = "21";
|
||||
|
||||
|
||||
private static final int SPAWN_SHIELD_RADIUS = 5;
|
||||
|
||||
|
||||
private static final String OVERTIME = C.cGold + "!!! " + C.cDRedB + "OVERTIME" + C.cGold + " !!!";
|
||||
|
||||
private Minecart _minecart;
|
||||
|
@ -162,10 +162,10 @@ public class QuiverPayload extends TeamGame
|
|||
private Map<UUID, Integer> _killstreakAmount = new HashMap<>();
|
||||
private Map<UUID, Long> _killstreamLast = new HashMap<>();
|
||||
private long _lastTeamKill;
|
||||
|
||||
|
||||
private Set<ObjectiveParticle> _objectiveParticle = new HashSet<>();
|
||||
private Set<SpawnBarrier> _spawnBarrier = new HashSet<>();
|
||||
|
||||
|
||||
private Team _payloadTeam;
|
||||
|
||||
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 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",
|
||||
|
||||
});
|
||||
}, 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", });
|
||||
|
||||
this.PlayersPerTeam = 5;
|
||||
this.DeathOut = false;
|
||||
|
@ -190,6 +186,8 @@ public class QuiverPayload extends TeamGame
|
|||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
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!"));
|
||||
|
||||
|
@ -246,19 +244,19 @@ public class QuiverPayload extends TeamGame
|
|||
for (GameTeam gameTeam : _teamScore.keySet())
|
||||
{
|
||||
Scoreboard.write(gameTeam.GetColor() + C.Bold + "Team " + gameTeam.getDisplayName());
|
||||
|
||||
|
||||
int alivePlayers = 0;
|
||||
|
||||
|
||||
for (Player player : gameTeam.GetPlayers(true))
|
||||
{
|
||||
if (UtilPlayer.isSpectator(player))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
alivePlayers++;
|
||||
}
|
||||
|
||||
|
||||
Scoreboard.write(alivePlayers + "/" + gameTeam.GetPlayers(true).size() + " Alive");
|
||||
Scoreboard.writeNewLine();
|
||||
}
|
||||
|
@ -274,9 +272,9 @@ public class QuiverPayload extends TeamGame
|
|||
Scoreboard.writeNewLine();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Scoreboard.write(C.cRedB + "Game End");
|
||||
|
||||
|
||||
if (_isOvertime)
|
||||
{
|
||||
Scoreboard.write(OVERTIME);
|
||||
|
@ -315,13 +313,13 @@ public class QuiverPayload extends TeamGame
|
|||
spawnKitNPCs(WorldData.GetDataLocs(DATA_POINT_KIT_BLUE), GetTeam(org.bukkit.ChatColor.AQUA));
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
|
||||
|
||||
Set<Location> redBarriers = new HashSet<>();
|
||||
Set<Location> blueBarriers = new HashSet<>();
|
||||
|
||||
|
||||
redBarriers.addAll(WorldData.GetCustomLocs(CUSTOM_LOCATION_BARRIER_RED));
|
||||
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.AQUA), blueBarriers));
|
||||
}
|
||||
|
@ -500,32 +498,34 @@ public class QuiverPayload extends TeamGame
|
|||
if (same)
|
||||
{
|
||||
String subTitle = C.cRed + "The track will now shrink over time!";
|
||||
|
||||
|
||||
UtilTextMiddle.display(OVERTIME, subTitle, 10, 30, 10);
|
||||
UtilServer.broadcast(OVERTIME + " " + subTitle);
|
||||
|
||||
|
||||
_isOvertime = true;
|
||||
return;
|
||||
|
||||
// double shortest = Double.MAX_VALUE;
|
||||
//
|
||||
// for (GameTeam gameTeam : _teamScore.keySet())
|
||||
// {
|
||||
// double distance = getTrackDistanceToMarker(getDestination(gameTeam), gameTeam);
|
||||
//
|
||||
// if (distance < shortest)
|
||||
// {
|
||||
// shortest = distance;
|
||||
// WinnerTeam = gameTeam;
|
||||
// }
|
||||
// }
|
||||
|
||||
// double shortest = Double.MAX_VALUE;
|
||||
//
|
||||
// for (GameTeam gameTeam : _teamScore.keySet())
|
||||
// {
|
||||
// double distance =
|
||||
// getTrackDistanceToMarker(getDestination(gameTeam),
|
||||
// gameTeam);
|
||||
//
|
||||
// if (distance < shortest)
|
||||
// {
|
||||
// shortest = distance;
|
||||
// WinnerTeam = gameTeam;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
AnnounceEnd(WinnerTeam);
|
||||
SetState(GameState.End);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (event.getType() == UpdateType.SEC && _isOvertime)
|
||||
{
|
||||
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(_pathMarkers.size() - 1).getBlock().getRelative(BlockFace.DOWN));
|
||||
}
|
||||
|
||||
|
||||
Set<Block> newTracks = new HashSet<>();
|
||||
|
||||
|
||||
for (Block block : _lastOvertimeTrack)
|
||||
{
|
||||
if (isMinecartNearMarker(block.getLocation()))
|
||||
{
|
||||
Location locationA = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_RED));
|
||||
Location locationB = UtilAlg.findClosest(_minecart.getLocation(), WorldData.GetDataLocs(DATA_POINT_BLUE));
|
||||
|
||||
|
||||
if (UtilMath.offset(_minecart.getLocation(), locationA) < UtilMath.offset(_minecart.getLocation(), locationB))
|
||||
{
|
||||
WinnerTeam = GetTeam(org.bukkit.ChatColor.AQUA);
|
||||
|
@ -557,9 +557,9 @@ public class QuiverPayload extends TeamGame
|
|||
displayEndEffect();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (Block other : UtilBlock.getInRadius(block, 1.5).keySet())
|
||||
{
|
||||
{
|
||||
if (other.getType() == Material.RAILS)
|
||||
{
|
||||
block.setType(Material.AIR);
|
||||
|
@ -568,7 +568,7 @@ public class QuiverPayload extends TeamGame
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_lastOvertimeTrack = newTracks;
|
||||
}
|
||||
|
||||
|
@ -595,7 +595,7 @@ public class QuiverPayload extends TeamGame
|
|||
{
|
||||
powerupGenerator.update();
|
||||
}
|
||||
|
||||
|
||||
for (SpawnBarrier spawnBarrier : _spawnBarrier)
|
||||
{
|
||||
spawnBarrier.playParticles();
|
||||
|
@ -622,12 +622,16 @@ public class QuiverPayload extends TeamGame
|
|||
if (percentage >= 100)
|
||||
{
|
||||
UtilTextBottom.display((_coloredMessage ? C.cWhiteB : C.cAquaB) + "ULTIMATE READY (PRESS SNEAK)", player);
|
||||
player.setExp(0.999F);
|
||||
player.setLevel(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
String percentageFormatted = new DecimalFormat("0.0").format(percentage);
|
||||
|
||||
UtilTextBottom.displayProgress("Ultimate", percentage / 100, percentageFormatted + "%", player);
|
||||
player.setExp((float) percentage / 100);
|
||||
player.setLevel((int) percentage);
|
||||
|
||||
for (Perk perk : kit.GetPerks())
|
||||
{
|
||||
|
@ -732,6 +736,21 @@ public class QuiverPayload extends TeamGame
|
|||
case 5:
|
||||
name = "PENTA";
|
||||
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)
|
||||
|
@ -742,7 +761,7 @@ public class QuiverPayload extends TeamGame
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
spawnBarrier.update();
|
||||
|
@ -891,6 +910,21 @@ public class QuiverPayload extends TeamGame
|
|||
|
||||
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))
|
||||
{
|
||||
int score = _teamScore.get(gameTeam);
|
||||
|
@ -1018,7 +1052,7 @@ public class QuiverPayload extends TeamGame
|
|||
UtilTextMiddle.display("", message, 10, 20, 10);
|
||||
UtilServer.broadcast(message);
|
||||
}
|
||||
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
if (GetTeam(player).equals(_teamDirection))
|
||||
|
@ -1028,7 +1062,7 @@ public class QuiverPayload extends TeamGame
|
|||
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1, 0);
|
||||
}
|
||||
|
||||
|
||||
displayPointScoreEffect();
|
||||
|
||||
new BukkitRunnable()
|
||||
|
@ -1139,7 +1173,7 @@ public class QuiverPayload extends TeamGame
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!(event.GetEvent().getEntity() instanceof Player))
|
||||
{
|
||||
return;
|
||||
|
@ -1155,7 +1189,7 @@ public class QuiverPayload extends TeamGame
|
|||
|
||||
player.getInventory().addItem(Quiver.SUPER_ARROW);
|
||||
killed.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 10, 0));
|
||||
|
||||
|
||||
incrementUltimate(player, ULTIMATE_PERCENTAGE_INCREASE_KILL);
|
||||
|
||||
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.SetDamageToLevel(false);
|
||||
event.SetKnockback(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
event.SetDamageToLevel(false);
|
||||
|
||||
if (UtilMath.offset(player.getLocation(), UtilAlg.findClosest(player.getLocation(), GetTeam(player).GetSpawns())) < SPAWN_SHIELD_RADIUS)
|
||||
{
|
||||
event.SetCancelled("Spawn Shield");
|
||||
|
@ -1409,7 +1444,7 @@ public class QuiverPayload extends TeamGame
|
|||
|
||||
return C.cAqua + "♚ " + C.cWhite + "[ " + progress + C.cWhite + " ]" + C.cRed + " ♚";
|
||||
}
|
||||
|
||||
|
||||
private void awardWinGems()
|
||||
{
|
||||
for (Player player : GetPlayers(true))
|
||||
|
@ -1418,16 +1453,16 @@ public class QuiverPayload extends TeamGame
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
AddGems(player, 10, "Winning Team", false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void spawnKitNPCs(List<Location> locations, GameTeam gameTeam)
|
||||
{
|
||||
int i = 0;
|
||||
Location spawnsAverage = UtilAlg.getAverageLocation(gameTeam.GetSpawns()).subtract(0, 1, 0);
|
||||
|
||||
|
||||
for (Location location : locations)
|
||||
{
|
||||
if (i >= GetKits().length)
|
||||
|
@ -1439,7 +1474,7 @@ public class QuiverPayload extends TeamGame
|
|||
ProgressingKit progressingKit = (ProgressingKit) GetKits()[i++];
|
||||
|
||||
UtilEnt.CreatureLook(entity, spawnsAverage);
|
||||
|
||||
|
||||
_kitNPC.put(entity, progressingKit);
|
||||
}
|
||||
}
|
||||
|
@ -1449,9 +1484,14 @@ public class QuiverPayload extends TeamGame
|
|||
return _kitNPC.containsKey(entity);
|
||||
}
|
||||
|
||||
@EventHandler // TODO DEBUG COMMANDS REMOVE ON PR
|
||||
@EventHandler //DEBUG COMMANDS
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (!UtilServer.isTestServer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (event.getMessage().startsWith("/maxpower"))
|
||||
|
@ -1478,7 +1518,7 @@ public class QuiverPayload extends TeamGame
|
|||
else if (event.getMessage().startsWith("/overtime"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
|
||||
|
||||
_isOvertime = true;
|
||||
}
|
||||
}
|
||||
|
@ -1488,7 +1528,7 @@ public class QuiverPayload extends TeamGame
|
|||
{
|
||||
return assist ? GEMS_ASSIST : GEMS_KILL;
|
||||
}
|
||||
|
||||
|
||||
public Set<SpawnBarrier> getSpawnBarriers()
|
||||
{
|
||||
return _spawnBarrier;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class SpawnBarrier
|
|||
|
||||
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));
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ public class KitBarrage extends ProgressingKit
|
|||
|
||||
private static final String DOUBLE_JUMP = "Double Jump";
|
||||
private static final String ULTIMATE = "Ultimate";
|
||||
private static final String ARROWS = "Arrows";
|
||||
private static final String SUPER_ARROW = "Super Arrow";
|
||||
|
||||
private static final Perk[][] PERKS = {
|
||||
|
@ -46,21 +45,11 @@ public class KitBarrage extends ProgressingKit
|
|||
new PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
|
||||
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 PerkFletcher(5, 1, true, -1, true, SUPER_ARROW),
|
||||
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 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 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 = {
|
||||
{
|
||||
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);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class KitBeserker extends ProgressingKit
|
|||
"Deal " + C.cGreen + "+1" + C.cWhite + " more damage",
|
||||
"",
|
||||
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.",
|
||||
"Lasts for " + C.cGreen + "6" + C.cWhite + " seconds."
|
||||
};
|
||||
|
@ -100,7 +100,7 @@ public class KitBeserker extends ProgressingKit
|
|||
|
||||
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
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package nautilus.game.arcade.game.games.quiver.kits;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -12,6 +15,7 @@ import mineplex.core.itemstack.ItemBuilder;
|
|||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
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.kit.KitAvailability;
|
||||
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.",
|
||||
"",
|
||||
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."
|
||||
};
|
||||
|
||||
|
@ -39,32 +43,32 @@ public class KitNecromancer extends ProgressingKit
|
|||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkLifestealArrows(8),
|
||||
new UltimateNecromancer(10000, 3)
|
||||
new UltimateNecromancer(10000, 4)
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkLifestealArrows(8),
|
||||
new UltimateNecromancer(10500, 3)
|
||||
new UltimateNecromancer(10500, 4)
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkLifestealArrows(8),
|
||||
new UltimateNecromancer(11000, 3)
|
||||
new UltimateNecromancer(11000, 4)
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkLifestealArrows(8),
|
||||
new UltimateNecromancer(11500, 3)
|
||||
new UltimateNecromancer(11500, 4)
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkLifestealArrows(8),
|
||||
new UltimateNecromancer(12000, 3)
|
||||
new UltimateNecromancer(12000, 4)
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@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
|
||||
public boolean showUpgrades()
|
||||
|
|
|
@ -45,33 +45,33 @@ public class KitPyromancer extends ProgressingKit
|
|||
private static final Perk[][] PERKS = {
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkFireArrows(2, 60),
|
||||
new UltimatePyromancer()
|
||||
new PerkFireArrows(3, 60),
|
||||
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 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()
|
||||
},
|
||||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
new PerkFireArrows(2, 60),
|
||||
new UltimatePyromancer()
|
||||
new UltimatePyromancer(7500)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public class KitSkyWarrior extends ProgressingKit
|
|||
{
|
||||
|
||||
private static final String[] DESCRIPTION = {
|
||||
"Something to do with the kit",
|
||||
"We\'ll see you in the sky.",
|
||||
"",
|
||||
"Gain permanent Speed I",
|
||||
"",
|
||||
|
@ -42,12 +42,13 @@ public class KitSkyWarrior extends ProgressingKit
|
|||
"",
|
||||
"Once all arrows are fired you teleport to a random",
|
||||
"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 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 = {
|
||||
{
|
||||
|
@ -58,45 +59,50 @@ public class KitSkyWarrior extends ProgressingKit
|
|||
{
|
||||
new PerkDoubleJump(DOUBLE_JUMP, 0.9, 0.9, true),
|
||||
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 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 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 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 PerkSpeed(0),
|
||||
new UltimateSkyWarrior(5, 10, 10, 5, 30)
|
||||
new UltimateSkyWarrior(7.5, 10, 15, 5, 30)
|
||||
}
|
||||
};
|
||||
|
||||
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),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
|
|||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
|
@ -44,7 +43,6 @@ public abstract class Ultimate extends Perk
|
|||
|
||||
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 + ".");
|
||||
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
|
@ -57,7 +55,6 @@ public abstract class Ultimate extends Perk
|
|||
{
|
||||
_lastUltimate.remove(player.getUniqueId());
|
||||
|
||||
player.sendMessage(F.main("Game", "Deactivated " + F.skill(GetName())));
|
||||
player.playSound(player.getLocation(), Sound.BLAZE_DEATH, 1, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ public class UltimateNinja extends Ultimate
|
|||
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.SetDamageToLevel(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,15 @@ public class UltimatePyromancer extends Ultimate
|
|||
|
||||
private static final double CHARGE_PER_SECOND = 0.4;
|
||||
|
||||
private long _length;
|
||||
|
||||
private Map<UUID, Integer> _tasks = new HashMap<>();
|
||||
|
||||
public UltimatePyromancer()
|
||||
public UltimatePyromancer(long length)
|
||||
{
|
||||
super("Fire Blossom", new String[] {});
|
||||
|
||||
_length = length;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +51,7 @@ public class UltimatePyromancer extends Ultimate
|
|||
|
||||
Arrow arrow = player.launchProjectile(Arrow.class);
|
||||
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());
|
||||
}
|
||||
|
@ -70,7 +74,7 @@ public class UltimatePyromancer extends Ultimate
|
|||
@Override
|
||||
public long getLength()
|
||||
{
|
||||
return 5000;
|
||||
return _length;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
|||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
@ -168,6 +169,25 @@ public class UltimateSkyWarrior extends Ultimate
|
|||
{
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue