From 22824288a8a251313cf3af7908f0fffa442a6ca3 Mon Sep 17 00:00:00 2001 From: Frank Nielson Date: Tue, 13 Feb 2024 19:45:29 -0700 Subject: [PATCH 1/3] Fixed encumbrance showing up as more than Light --- .../pcgen/cdom/facet/analysis/LoadFacet.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/code/src/java/pcgen/cdom/facet/analysis/LoadFacet.java b/code/src/java/pcgen/cdom/facet/analysis/LoadFacet.java index c431189f0d0..5ee32161756 100644 --- a/code/src/java/pcgen/cdom/facet/analysis/LoadFacet.java +++ b/code/src/java/pcgen/cdom/facet/analysis/LoadFacet.java @@ -4,12 +4,12 @@ * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -25,6 +25,8 @@ import pcgen.cdom.facet.BonusCheckingFacet; import pcgen.cdom.facet.FormulaResolvingFacet; import pcgen.cdom.facet.PlayerCharacterTrackingFacet; +import pcgen.core.Globals; +import pcgen.core.RuleConstants; import pcgen.core.SettingsHandler; import pcgen.core.SizeAdjustment; import pcgen.util.enumeration.Load; @@ -33,7 +35,7 @@ * LoadFacet calculates information about the Load for a Player Character. The * underlying Load information used for these calculations is defined in the * Game Mode LST files. - * + * */ public class LoadFacet { @@ -46,7 +48,7 @@ public class LoadFacet /** * Returns the Load for the Player Character identified by the given CharID. - * + * * @param id * The CharID identifying the Player Character for which the Load * should be returned @@ -57,6 +59,10 @@ public Load getLoadType(CharID id) Float weight = totalWeightFacet.getTotalWeight(id); double dbl = weight / getMaxLoad(id).doubleValue(); + if (!Globals.checkRule(RuleConstants.SYS_LDPACSK)) + { + return Load.LIGHT; + } Float lightMult = SettingsHandler.getGameAsProperty().get().getLoadInfo().getLoadMultiplier("LIGHT"); if (lightMult != null && dbl <= lightMult.doubleValue()) { @@ -81,7 +87,7 @@ public Load getLoadType(CharID id) /** * Returns the maximum Load for the Player Character identified by the given * CharID. - * + * * @param id * The CharID identifying the Player Character for which the * maximum Load should be returned. @@ -96,7 +102,7 @@ public Float getMaxLoad(CharID id) /** * Returns the maximum Load for the Player Character identified by the given * CharID, multiplied by the given multiplier. - * + * * @param id * The CharID identifying the Player Character for which the * maximum Load should be returned. @@ -122,7 +128,7 @@ public Float getMaxLoad(CharID id, double mult) /** * Returns the Load Multiplier for the size of the Player Character * identified by the given CharID. - * + * * @param id * The CharID identifying the Player Character for which the Load * Multiplier will be returned. From 1be201fbb5fb24afc7b68ff3a1af12a95fb44b2e Mon Sep 17 00:00:00 2001 From: Frank Nielson Date: Tue, 13 Feb 2024 11:11:23 -0700 Subject: [PATCH 2/3] Fixed house rule for load being ignored when applied to AC and movement checks. --- code/src/java/pcgen/core/PlayerCharacter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/code/src/java/pcgen/core/PlayerCharacter.java b/code/src/java/pcgen/core/PlayerCharacter.java index 0f3f5f5cacc..3750acafb9e 100644 --- a/code/src/java/pcgen/core/PlayerCharacter.java +++ b/code/src/java/pcgen/core/PlayerCharacter.java @@ -5444,6 +5444,7 @@ public int modToACFromEquipment() @Deprecated public int processOldAcCheck() { + System.out.println("Using old AC Check!"); Load load = getHouseRuledLoadType(); int bonus = 0; From 58af05d1ccbcb1aae3768e06ea1b73b1d4805b98 Mon Sep 17 00:00:00 2001 From: Frank Nielson Date: Tue, 13 Feb 2024 11:48:32 -0700 Subject: [PATCH 3/3] Foxed style and removed old print statement --- code/src/java/pcgen/core/PlayerCharacter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/code/src/java/pcgen/core/PlayerCharacter.java b/code/src/java/pcgen/core/PlayerCharacter.java index 3750acafb9e..0f3f5f5cacc 100644 --- a/code/src/java/pcgen/core/PlayerCharacter.java +++ b/code/src/java/pcgen/core/PlayerCharacter.java @@ -5444,7 +5444,6 @@ public int modToACFromEquipment() @Deprecated public int processOldAcCheck() { - System.out.println("Using old AC Check!"); Load load = getHouseRuledLoadType(); int bonus = 0;