Browse Source

allow BH and huntsman on all but priest

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
afa9ddf89e
  1. 2
      src/engine/net/client/handlers/ObjectActionMsgHandler.java
  2. 16
      src/engine/objects/Mine.java

2
src/engine/net/client/handlers/ObjectActionMsgHandler.java

@ -195,7 +195,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
} }
hPMod = (building.getMaxHitPoints() * Realm.getRealmHealthMod(city)); hPMod = (building.getMaxHitPoints() * Realm.getRealmHealthMod(city));
float percentOfHealth = building.getCurrentHitpoints() / building.getHealthMax();
building.setMaxHitPoints(building.getMaxHitPoints() + hPMod); building.setMaxHitPoints(building.getMaxHitPoints() + hPMod);
building.setCurrentHitPoints(building.getMaxHitPoints() * percentOfHealth);
} }
} }

16
src/engine/objects/Mine.java

@ -61,8 +61,6 @@ public class Mine extends AbstractGameObject {
public int liveTime; public int liveTime;
public int liveLength = 3600;
public static ArrayList<Mine> ChinaMines = new ArrayList<>(); public static ArrayList<Mine> ChinaMines = new ArrayList<>();
public static ArrayList<Mine> EuroMines = new ArrayList<>(); public static ArrayList<Mine> EuroMines = new ArrayList<>();
public static ArrayList<Mine> AmericaMines = new ArrayList<>(); public static ArrayList<Mine> AmericaMines = new ArrayList<>();
@ -388,15 +386,15 @@ public class Mine extends AbstractGameObject {
if (nationCapitolTOL == null) if (nationCapitolTOL == null)
return false; return false;
int treeRank = nationCapitolTOL.getRank(); //int treeRank = nationCapitolTOL.getRank();
if (treeRank < 1) //if (treeRank < 1)
return false; // return false;
if (guildUnderMineLimit(playerGuild.getNation(), treeRank) == false) { //if (guildUnderMineLimit(playerGuild.getNation(), treeRank) == false) {
ErrorPopupMsg.sendErrorMsg(playerCharacter, "Your nation cannot support another mine."); // ErrorPopupMsg.sendErrorMsg(playerCharacter, "Your nation cannot support another mine.");
return false; // return false;
} //}
return true; return true;
} }

Loading…
Cancel
Save