diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 2c398cdb..796a62f9 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -106,21 +106,6 @@ public class Mine extends AbstractGameObject { this.production = Resource.valueOf(rs.getString("mine_resource")); this.lastClaimer = null; - - //int capRoll = ThreadLocalRandom.current().nextInt(0,101); - //if(capRoll >= 0 && capRoll <= 33){ - this.capSize = 5; - //} - //if(capRoll >= 34 && capRoll <= 66){ - // this.capSize = 10; - //} - //if(capRoll >= 67 && capRoll <= 100){ - // this.capSize = 20; - //} - Building mineTower = BuildingManager.getBuilding(this.buildingID); - mineTower.setMaxHitPoints(5000 * this.capSize); - mineTower.setCurrentHitPoints((float)5000 * this.capSize); - //add a comment } public static void SetTimes(){ @@ -159,6 +144,85 @@ public class Mine extends AbstractGameObject { AmericaMines.get(11).liveTime = 22; AmericaMines.get(12).liveTime = 22; AmericaMines.get(13).liveTime = 22; + + int count = 1; + for(Mine mine : EuroMines){ + switch(count){ + case 1: + mine.capSize = 3; + break; + case 2: + mine.capSize = 5; + break; + case 3: + mine.capSize = 10; + break; + case 4: + mine.capSize = 20; + break; + } + count ++; + if(count == 5) + count = 1; + + Building mineTower = BuildingManager.getBuilding(mine.buildingID); + if(mineTower != null){ + mineTower.setMaxHitPoints(5000 * mine.capSize); + mineTower.setCurrentHitPoints((float) 5000 * mine.capSize); + } + } + + for(Mine mine : ChinaMines){ + switch(count){ + case 1: + mine.capSize = 3; + break; + case 2: + mine.capSize = 5; + break; + case 3: + mine.capSize = 10; + break; + case 4: + mine.capSize = 20; + break; + } + count ++; + if(count == 5) + count = 1; + + Building mineTower = BuildingManager.getBuilding(mine.buildingID); + if(mineTower != null){ + mineTower.setMaxHitPoints(5000 * mine.capSize); + mineTower.setCurrentHitPoints((float) 5000 * mine.capSize); + } + } + + for(Mine mine : AmericaMines){ + switch(count){ + case 1: + mine.capSize = 3; + break; + case 2: + mine.capSize = 5; + break; + case 3: + mine.capSize = 10; + break; + case 4: + mine.capSize = 20; + break; + } + count ++; + if(count == 5) + count = 1; + + Building mineTower = BuildingManager.getBuilding(mine.buildingID); + if(mineTower != null){ + mineTower.setMaxHitPoints(5000 * mine.capSize); + mineTower.setCurrentHitPoints((float) 5000 * mine.capSize); + } + } } public static void releaseMineClaims(PlayerCharacter playerCharacter) {