|
|
@ -106,21 +106,6 @@ public class Mine extends AbstractGameObject { |
|
|
|
|
|
|
|
|
|
|
|
this.production = Resource.valueOf(rs.getString("mine_resource")); |
|
|
|
this.production = Resource.valueOf(rs.getString("mine_resource")); |
|
|
|
this.lastClaimer = null; |
|
|
|
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(){ |
|
|
|
public static void SetTimes(){ |
|
|
@ -159,6 +144,85 @@ public class Mine extends AbstractGameObject { |
|
|
|
AmericaMines.get(11).liveTime = 22; |
|
|
|
AmericaMines.get(11).liveTime = 22; |
|
|
|
AmericaMines.get(12).liveTime = 22; |
|
|
|
AmericaMines.get(12).liveTime = 22; |
|
|
|
AmericaMines.get(13).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) { |
|
|
|
public static void releaseMineClaims(PlayerCharacter playerCharacter) { |
|
|
|
|
|
|
|
|
|
|
|