From fc7e6735a134903c6c803b978df75cea1299b94e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 12 Jun 2024 18:35:22 -0500 Subject: [PATCH] mine tower health scales with cap size --- src/engine/objects/Mine.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 309aea48..e600e476 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -99,7 +99,11 @@ public class Mine extends AbstractGameObject { this.openMinute = rs.getInt("mineLiveMinute"); this.capSize = rs.getInt("capSize"); this.liveTime = LocalDateTime.now().withHour(this.openHour).withMinute(this.openMinute); - + Building tower = BuildingManager.getBuildingFromCache(this.buildingID); + if(tower != null){ + tower.setMaxHitPoints(5000f * this.capSize); + tower.setCurrentHitPoints(tower.healthMax); + } } public static void releaseMineClaims(PlayerCharacter playerCharacter) {