From a42e6ed9e46ade1dcd9424ab006effad284334d9 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Fri, 12 May 2017 18:44:05 -0400 Subject: [PATCH] Change crown calculations again --- .../games/castleassault/CastleAssault.java | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java index 54ba4fa72..54e71d589 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java @@ -454,23 +454,29 @@ public class CastleAssault extends TeamGame AddGems(player, 10, "Participation", false, false); } + int crowns = 0; + for (GemData data : GetGems(player).values()) + { + crowns += data.Gems; + } + { int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); 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) { - 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) { - AddGems(player, 20, streak + " Player Kill Streak", false, false); + AddGems(player, 1.5 * crowns, streak + " Player Kill Streak", false, false); } else if (streak >= 8) { - AddGems(player, 25, streak + " Player Kill Streak", false, false); + AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); } } @@ -480,12 +486,6 @@ public class CastleAssault extends TeamGame 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); } } @@ -547,37 +547,40 @@ public class CastleAssault extends TeamGame AddGems(player, 10, "Participation", false, false); } + int crowns = 0; + for (GemData data : GetGems(player).values()) + { + crowns += data.Gems; + } + { int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); 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) { - 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) { - AddGems(player, 20, streak + " Player Kill Streak", false, false); + AddGems(player, 1.5 * crowns, streak + " Player Kill Streak", false, false); } 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) + if (GetKit(player) != null) { - int crowns = 0; - for (GemData data : GetGems(player).values()) + KitPlayer kit = (KitPlayer) GetKit(player); + int kitLevel = kit.getUpgradeLevel(player.getUniqueId()); + if (kitLevel > 0) { - crowns += data.Gems; + AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false); } - - AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false); } } }