From afa9ddf89e6afdb83de82ace73838854f5484da5 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 3 Mar 2024 20:03:35 -0600 Subject: [PATCH] allow BH and huntsman on all but priest --- .../client/handlers/ObjectActionMsgHandler.java | 2 ++ src/engine/objects/Mine.java | 16 +++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) 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; }