Browse Source

nations can only have 1 bane placed on them at a time

lakebane-master
fatboy 7 months ago
parent
commit
379dbe668c
  1. 9
      src/engine/objects/Bane.java

9
src/engine/objects/Bane.java

@ -231,6 +231,15 @@ public final class Bane { @@ -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());

Loading…
Cancel
Save