diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index de6a9fbf..4e4b34da 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -195,7 +195,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { } hPMod = (building.getMaxHitPoints() * Realm.getRealmHealthMod(city)); + float percentOfHealth = building.getCurrentHitpoints() / building.getHealthMax(); building.setMaxHitPoints(building.getMaxHitPoints() + hPMod); + building.setCurrentHitPoints(building.getMaxHitPoints() * percentOfHealth); } } diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index cf93c03f..a2ea484e 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -61,8 +61,6 @@ public class Mine extends AbstractGameObject { public int liveTime; - public int liveLength = 3600; - public static ArrayList ChinaMines = new ArrayList<>(); public static ArrayList EuroMines = new ArrayList<>(); public static ArrayList AmericaMines = new ArrayList<>(); @@ -388,15 +386,15 @@ public class Mine extends AbstractGameObject { if (nationCapitolTOL == null) return false; - int treeRank = nationCapitolTOL.getRank(); + //int treeRank = nationCapitolTOL.getRank(); - if (treeRank < 1) - return false; + //if (treeRank < 1) + // return false; - if (guildUnderMineLimit(playerGuild.getNation(), treeRank) == false) { - ErrorPopupMsg.sendErrorMsg(playerCharacter, "Your nation cannot support another mine."); - return false; - } + //if (guildUnderMineLimit(playerGuild.getNation(), treeRank) == false) { + // ErrorPopupMsg.sendErrorMsg(playerCharacter, "Your nation cannot support another mine."); + // return false; + //} return true; }