4
4
* the terms of the GNU Lesser General Public License as published by the Free
5
5
* Software Foundation; either version 2.1 of the License, or (at your option)
6
6
* any later version.
7
- *
7
+ *
8
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
10
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11
11
* details.
12
- *
12
+ *
13
13
* You should have received a copy of the GNU Lesser General Public License
14
14
* along with this library; if not, write to the Free Software Foundation, Inc.,
15
15
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25
25
import pcgen .cdom .facet .BonusCheckingFacet ;
26
26
import pcgen .cdom .facet .FormulaResolvingFacet ;
27
27
import pcgen .cdom .facet .PlayerCharacterTrackingFacet ;
28
+ import pcgen .core .Globals ;
29
+ import pcgen .core .RuleConstants ;
28
30
import pcgen .core .SettingsHandler ;
29
31
import pcgen .core .SizeAdjustment ;
30
32
import pcgen .util .enumeration .Load ;
33
35
* LoadFacet calculates information about the Load for a Player Character. The
34
36
* underlying Load information used for these calculations is defined in the
35
37
* Game Mode LST files.
36
- *
38
+ *
37
39
*/
38
40
public class LoadFacet
39
41
{
@@ -46,7 +48,7 @@ public class LoadFacet
46
48
47
49
/**
48
50
* Returns the Load for the Player Character identified by the given CharID.
49
- *
51
+ *
50
52
* @param id
51
53
* The CharID identifying the Player Character for which the Load
52
54
* should be returned
@@ -57,6 +59,10 @@ public Load getLoadType(CharID id)
57
59
Float weight = totalWeightFacet .getTotalWeight (id );
58
60
double dbl = weight / getMaxLoad (id ).doubleValue ();
59
61
62
+ if (!Globals .checkRule (RuleConstants .SYS_LDPACSK ))
63
+ {
64
+ return Load .LIGHT ;
65
+ }
60
66
Float lightMult = SettingsHandler .getGameAsProperty ().get ().getLoadInfo ().getLoadMultiplier ("LIGHT" );
61
67
if (lightMult != null && dbl <= lightMult .doubleValue ())
62
68
{
@@ -81,7 +87,7 @@ public Load getLoadType(CharID id)
81
87
/**
82
88
* Returns the maximum Load for the Player Character identified by the given
83
89
* CharID.
84
- *
90
+ *
85
91
* @param id
86
92
* The CharID identifying the Player Character for which the
87
93
* maximum Load should be returned.
@@ -96,7 +102,7 @@ public Float getMaxLoad(CharID id)
96
102
/**
97
103
* Returns the maximum Load for the Player Character identified by the given
98
104
* CharID, multiplied by the given multiplier.
99
- *
105
+ *
100
106
* @param id
101
107
* The CharID identifying the Player Character for which the
102
108
* maximum Load should be returned.
@@ -122,7 +128,7 @@ public Float getMaxLoad(CharID id, double mult)
122
128
/**
123
129
* Returns the Load Multiplier for the size of the Player Character
124
130
* identified by the given CharID.
125
- *
131
+ *
126
132
* @param id
127
133
* The CharID identifying the Player Character for which the Load
128
134
* Multiplier will be returned.
0 commit comments