Browse Source

Revert "randomized mine times"

This reverts commit 2f4287783e.
lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
2bbdeb89ff
  1. 24
      src/engine/objects/Mine.java

24
src/engine/objects/Mine.java

@ -114,35 +114,34 @@ public class Mine extends AbstractGameObject { @@ -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 { @@ -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 { @@ -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)

Loading…
Cancel
Save