From 379dbe668cb8ada80731b8a811290d0d6f83e80e Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 13:04:56 -0500 Subject: [PATCH] nations can only have 1 bane placed on them at a time --- src/engine/objects/Bane.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index 70a4b4fc..d158ff6f 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -231,6 +231,15 @@ public final class Bane { return false; } } + if(targetCity.getGuild().getNation().getSubGuildList() != null) { + + for (Guild subGuild : targetCity.getGuild().getNation().getSubGuildList()) { + if (getBaneByAttackerGuild(subGuild) != null) { + PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "This Nation Already Has a Bane Placed On It"); + return false; + } + } + } stone.addEffectBit((1 << 19)); stone.setMaxHitPoints(stone.getBlueprint().getMaxHealth(stone.getRank())); stone.setCurrentHitPoints(stone.getMaxHitPoints());