gem stuff

This commit is contained in:
Mini-Chiss 2015-08-28 20:06:39 -07:00
parent d879bc68ab
commit 8238a199d5
2 changed files with 38 additions and 5 deletions

View File

@ -140,7 +140,7 @@ public class Evolution extends SoloGame
GemAssistDeathRespawn = .5;
CompassEnabled = true;
CompassGiveItem = false;
CompassGiveItem = false;
AutomaticRespawn = false;
DeathSpectateSecs = 4.0;

View File

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