From 8238a199d54a4aede9c8a133bb04f01ee2ed8d52 Mon Sep 17 00:00:00 2001 From: Mini-Chiss Date: Fri, 28 Aug 2015 20:06:39 -0700 Subject: [PATCH] gem stuff --- .../game/games/evolution/Evolution.java | 2 +- .../game/arcade/managers/GameGemManager.java | 41 +++++++++++++++++-- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java index a6245c90a..e1e23d10b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java @@ -140,7 +140,7 @@ public class Evolution extends SoloGame GemAssistDeathRespawn = .5; CompassEnabled = true; - CompassGiveItem = false; + CompassGiveItem = false; AutomaticRespawn = false; DeathSpectateSecs = 4.0; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java index 07bb93f7a..c9cdafe4a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java @@ -9,6 +9,7 @@ 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; import mineplex.minecraft.game.core.combat.CombatComponent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import nautilus.game.arcade.ArcadeFormat; @@ -36,8 +37,9 @@ public class GameGemManager implements Listener { ArcadeManager Manager; - boolean DoubleGem = true; - + boolean DoubleGem = false; + boolean TimeReward = true; + public GameGemManager(ArcadeManager manager) { Manager = manager; @@ -184,8 +186,21 @@ public class GameGemManager implements Listener total += (int)(earned * (gemFinder * 0.25)); } } + + //Time Reward + if (TimeReward) + { + long timeOnline = 7380000; + + double hoursOnline = timeOnline/3600000d; + + if (hoursOnline > 5) + hoursOnline = 5; + + total += (int)(earned * (hoursOnline * 0.2)); + } - if (DoubleGem && game.GemDoubleEnabled && UtilPlayer.is1_8(player)) + if (DoubleGem && game.GemDoubleEnabled) total += earned; Manager.GetDonation().RewardGems(null, "Earned " + game.GetName(), player.getName(), player.getUniqueId(), total); @@ -290,8 +305,26 @@ public class GameGemManager implements Listener } } + //Time Reward + if (TimeReward) + { + long timeOnline = 7380000; + + double hoursOnline = timeOnline/3600000d; + + if (hoursOnline > 5) + hoursOnline = 5; + + int extraGems = (int)(earnedGems * (hoursOnline * 0.2));; + + UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " + + F.elem("Online for " + UtilTime.MakeStr(timeOnline) )); + + totalGems += extraGems; + } + //Double Gem - if (DoubleGem && game.GemDoubleEnabled && UtilPlayer.is1_8(player)) + if (DoubleGem && game.GemDoubleEnabled) { UtilPlayer.message(player, F.elem(C.cGreen + "+" + (earnedGems) + " Gems") + " for " + F.elem(C.cDGreen + "Double Gem Weekend"));