From bfb257c410333381ae3e5da38815da254756f5d5 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 12 May 2024 20:46:49 -0500 Subject: [PATCH] trainer buildings granted 3 slots at r1 --- src/engine/Enum.java | 18 ++++++++++++++++++ src/engine/objects/Blueprint.java | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/src/engine/Enum.java b/src/engine/Enum.java index 9f06698c..47c48bbb 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -1655,6 +1655,24 @@ public class Enum { return extents; } + public boolean isTrainerBuilding(){ + switch(this){ + case AMAZONHALL: + case CATHEDRAL: + case GREATHALL: + case KEEP: + case THIEFHALL: + case TEMPLEHALL: + case WIZARDHALL: + case ELVENHALL: + case ELVENSANCTUM: + case IREKEIHALL: + case FORESTHALL: + return true; + } + return false; + } + } public enum UpdateType { diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index 36db2dd5..ab1feea9 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -310,6 +310,10 @@ public class Blueprint { // Early exit for buildings with single or no slots + if(this.buildingGroup.isTrainerBuilding() && currentRank > 0){ + return 3; + } + if (this.maxSlots <= 1 && this.buildingGroup.equals(BuildingGroup.TOL) == false) return maxSlots;