Rebalance tank kit and set final values for kill streak crown rewards

This commit is contained in:
AlexTheCoder 2017-05-13 01:00:10 -04:00
parent a42e6ed9e4
commit 37d3b47995
2 changed files with 32 additions and 53 deletions

View File

@ -6,11 +6,11 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.FireworkEffect.Type; import org.bukkit.FireworkEffect.Type;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -455,9 +455,12 @@ public class CastleAssault extends TeamGame
} }
int crowns = 0; int crowns = 0;
for (GemData data : GetGems(player).values()) for (Entry<String, GemData> data : GetGems(player).entrySet())
{ {
crowns += data.Gems; if (data.getKey().equals("Kills"))
{
crowns += data.getValue().Gems;
}
} }
{ {
@ -479,16 +482,6 @@ public class CastleAssault extends TeamGame
AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false);
} }
} }
if (GetKit(player) != null)
{
KitPlayer kit = (KitPlayer) GetKit(player);
int kitLevel = kit.getUpgradeLevel(player.getUniqueId());
if (kitLevel > 0)
{
AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false);
}
}
} }
} }
SetState(GameState.End); SetState(GameState.End);
@ -548,9 +541,12 @@ public class CastleAssault extends TeamGame
} }
int crowns = 0; int crowns = 0;
for (GemData data : GetGems(player).values()) for (Entry<String, GemData> data : GetGems(player).entrySet())
{ {
crowns += data.Gems; if (data.getKey().equals("Kills"))
{
crowns += data.getValue().Gems;
}
} }
{ {
@ -572,16 +568,6 @@ public class CastleAssault extends TeamGame
AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false);
} }
} }
if (GetKit(player) != null)
{
KitPlayer kit = (KitPlayer) GetKit(player);
int kitLevel = kit.getUpgradeLevel(player.getUniqueId());
if (kitLevel > 0)
{
AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false);
}
}
} }
} }
SetState(GameState.End); SetState(GameState.End);
@ -613,38 +599,34 @@ public class CastleAssault extends TeamGame
AddGems(player, 10, "Participation", false, false); AddGems(player, 10, "Participation", false, false);
} }
int crowns = 0;
for (Entry<String, GemData> data : GetGems(player).entrySet())
{
if (data.getKey().equals("Kills"))
{
crowns += data.getValue().Gems;
}
}
{ {
int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak();
if (streak >= 2 && streak < 4) if (streak >= 2 && streak < 4)
{ {
AddGems(player, 10, streak + " Player Kill Streak", false, false); AddGems(player, 0.5 * crowns, streak + " Player Kill Streak", false, false);
} }
else if (streak >= 4 && streak < 6) else if (streak >= 4 && streak < 6)
{ {
AddGems(player, 15, streak + " Player Kill Streak", false, false); AddGems(player, 1 * crowns, streak + " Player Kill Streak", false, false);
} }
else if (streak >= 6 && streak < 8) else if (streak >= 6 && streak < 8)
{ {
AddGems(player, 20, streak + " Player Kill Streak", false, false); AddGems(player, 1.5 * crowns, streak + " Player Kill Streak", false, false);
} }
else if (streak >= 8) else if (streak >= 8)
{ {
AddGems(player, 25, streak + " Player Kill Streak", false, false); AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false);
} }
} }
KitPlayer kit = (KitPlayer) GetKit(player);
int kitLevel = kit.getUpgradeLevel(player.getUniqueId());
if (kitLevel > 0)
{
int crowns = 0;
for (GemData data : GetGems(player).values())
{
crowns += data.Gems;
}
AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false);
}
} }
} }
SetState(GameState.End); SetState(GameState.End);
@ -1407,7 +1389,7 @@ public class CastleAssault extends TeamGame
} }
UtilTextBottom.display(GetTeam(player).GetColor() + player.getName() + " has the TNT!", UtilServer.getPlayers()); UtilTextBottom.display(GetTeam(player).GetColor() + player.getName() + " has the TNT!", UtilServer.getPlayers());
UtilFirework.playFirework(player.getEyeLocation(), Type.BURST, Color.RED, false, false); UtilFirework.playFirework(player.getEyeLocation(), Type.BURST, GetTeam(player).GetColorBase(), false, false);
if (player.getInventory().getHelmet() == null || player.getInventory().getHelmet().getType() == Material.AIR) if (player.getInventory().getHelmet() == null || player.getInventory().getHelmet().getType() == Material.AIR)
{ {
player.getInventory().setHelmet(_wearableTnt.build()); player.getInventory().setHelmet(_wearableTnt.build());

View File

@ -14,7 +14,6 @@ import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkIronSkin;
public class KitTank extends KitPlayer public class KitTank extends KitPlayer
{ {
@ -26,18 +25,16 @@ public class KitTank extends KitPlayer
C.cGrayB + "Starting Kit:", C.cGrayB + "Starting Kit:",
C.cGray + "Diamond Sword", C.cGray + "Diamond Sword",
C.cGray + "Diamond Helmet, Iron Chestplate, Iron Leggings, Diamond Boots", C.cGray + "Diamond Helmet, Iron Chestplate, Iron Leggings, Diamond Boots",
C.cGray + "Protection I on Iron Armor", C.cGray + "Protection I on Iron Armor"
C.cGreenB + "Passive Ability:",
C.cGreen + "Iron Skin: Take half a heart less damage from all Attacks"
}, },
new Perk[][] new Perk[][]
{ {
new Perk[] {new PerkIronSkin(1, false)}, new Perk[] {},
new Perk[] {new PerkIronSkin(1, false)}, new Perk[] {},
new Perk[] {new PerkIronSkin(1, false)}, new Perk[] {},
new Perk[] {new PerkIronSkin(1, false)}, new Perk[] {},
new Perk[] {new PerkIronSkin(1, false)}, new Perk[] {},
new Perk[] {new PerkIronSkin(1, false)} new Perk[] {}
}, },
new String[][] new String[][]
{ {