From 2bbdeb89ff6e72da9f59b3d455e823d2bbdae0e2 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 23 Feb 2024 20:06:59 -0600 Subject: [PATCH] Revert "randomized mine times" This reverts commit 2f4287783eda8123ae854e92151e5f3ee5dbc20a. --- src/engine/objects/Mine.java | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 0ada9544..2f47b888 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -114,35 +114,34 @@ public class Mine extends AbstractGameObject { mineTower.setMaxHitPoints(5000 * this.capSize); mineTower.setCurrentHitPoints((float)5000 * this.capSize); this.mineTime = ThreadLocalRandom.current().nextInt(1-23); - this.mineTime *= 100; refactorMineTime(this); } public static void refactorMineTime(Mine mine){ if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("sunday")){ - mine.mineTime += 100; + mine.mineTime += 1; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("monday")){ - mine.mineTime += 200; + mine.mineTime += 2; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("tuesday")){ - mine.mineTime += 300; + mine.mineTime += 3; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("wednesday")){ - mine.mineTime += 400; + mine.mineTime += 4; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("thursday")){ - mine.mineTime += 500; + mine.mineTime += 5; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("friday")){ - mine.mineTime += 600; + mine.mineTime += 6; } if(DateTime.now().dayOfWeek().getName().toLowerCase().equals("saturday")){ - mine.mineTime += 700; + mine.mineTime += 7; } - if(mine.mineTime >= 2400) - mine.mineTime -= 2400; + if(mine.mineTime >= 24) + mine.mineTime -= 24; } public static void releaseMineClaims(PlayerCharacter playerCharacter) { @@ -228,7 +227,7 @@ public class Mine extends AbstractGameObject { // Mine times are those of the nation not individual guild. - Guild mineNatonGuild = mine.getOwningGuild(); + Guild mineNatonGuild = mine.getOwningGuild().getNation(); // Adjust the serialized mine time based upon whether // the Guild's mine window has passed or not and if it was claimed. @@ -237,8 +236,7 @@ public class Mine extends AbstractGameObject { if (mineNatonGuild.isEmptyGuild() == false && mine.isActive == false) { - //int guildWOO = mineNatonGuild.getNation().getMineTime(); - int guildWOO = mine.mineTime; + int guildWOO = mineNatonGuild.getNation().getMineTime(); LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO); if (mineOpenTime.isAfter(guildMineTime) || mine.wasClaimed == true)