diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index d24c7401..93600a36 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -208,6 +208,25 @@ public class Mine extends AbstractGameObject { //pre-load all building sets ArrayList serverMines = MineQueries.GET_ALL_MINES_FOR_SERVER(); + + for (Mine mine : serverMines) { + Mine.mineMap.put(mine, mine.buildingID); + Mine.towerMap.put(mine.buildingID, mine); + if(mine.capSize == 5){ + mine.liveLength = 1800; + } + if(mine.capSize == 10){ + if(ThreadLocalRandom.current().nextInt(0,100) > 50){ + mine.liveLength = 1800; + } else{ + mine.liveLength = 3600; + } + } + if(mine.capSize == 20){ + mine.liveLength = 3600; + } + } + ChinaMines.add(serverMines.get(0)); AmericaMines.add(serverMines.get(1)); EuroMines.add(serverMines.get(2)); @@ -244,12 +263,6 @@ public class Mine extends AbstractGameObject { ChinaMines.add(serverMines.get(33)); AmericaMines.add(serverMines.get(34)); SetTimes(); - - for (Mine mine : serverMines) { - Mine.mineMap.put(mine, mine.buildingID); - Mine.towerMap.put(mine.buildingID, mine); - - } } catch (Exception e) { e.printStackTrace(); }