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

@ -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!"));
@ -507,18 +505,20 @@ public class QuiverPayload extends TeamGame
_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);
@ -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 + "!");
}
}
@ -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);
@ -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");
@ -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"))

View File

@ -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));
}

View File

@ -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,28 +58,43 @@ 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);
private static final ItemStack[] PLAYER_ITEMS = {

View File

@ -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

View File

@ -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)
}
};
@ -112,6 +116,21 @@ public class KitNecromancer extends ProgressingKit
}
}
@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()
{

View File

@ -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)
}
};

View File

@ -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),
},
};

View File

@ -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);
}

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)
{
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 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;
}
}

View File

@ -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;
@ -170,6 +171,25 @@ public class UltimateSkyWarrior extends Ultimate
}
}
@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
public void cancel(Player player)
{