Skip to content

Commit

Permalink
Corrected pf_Cleric test;
Browse files Browse the repository at this point in the history
1. Corrected the typo in special properties (light crossbow);
2. Corrected maxdex for MAXDEX bonus;
  • Loading branch information
Vest committed Dec 27, 2024
1 parent efd9bd9 commit e049370
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
8 changes: 7 additions & 1 deletion code/src/java/pcgen/core/PlayerCharacter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5477,7 +5477,13 @@ public int processOldMaxDex()
{
final int statBonus = (int) getStatBonusTo("MISC", "MAXDEX");
final Load load = getHouseRuledLoadType();
int bonus = (load == Load.MEDIUM) ? 2 : (load == Load.HEAVY) ? 1 : (load == Load.OVERLOAD) ? 0 : statBonus;
int bonus = switch (load)
{
case MEDIUM -> 3;
case HEAVY -> 1;
case OVERLOAD -> 0;
default -> statBonus;
};

// If this is still true after all the equipment has been
// examined, then we should use the Maximum - Maximum Dex modifier.
Expand Down
1 change: 0 additions & 1 deletion code/src/java/pcgen/util/enumeration/Load.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public enum Load
HEAVY(FontManipulation::bold_italic, UIPropertyContext::getVirtualColor),
OVERLOAD(FontManipulation::bold_italic, UIPropertyContext::getNotQualifiedColor);


private static final DoubleFunction<Double> LIGHT_ENCUMBERED_MOVE = unencumberedMove -> unencumberedMove;
private static final DoubleFunction<Double> MEDIUM_HEAVY_ENCUMBERED_MOVE = unencumberedMove -> {
if (CoreUtility.doublesEqual(unencumberedMove, 5) || CoreUtility.doublesEqual(unencumberedMove, 10))
Expand Down
5 changes: 4 additions & 1 deletion code/src/test/pcgen/inttest/PcgenFtlTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.logging.Logger;

Expand Down Expand Up @@ -89,7 +90,7 @@ public static void runTest(String character, String mode) throws IOException
TestHelper.createDummySettingsFile(TEST_CONFIG_FILE, configFolder, pccLoc);

// Fire off PCGen, which will produce an XML file
//String characterFile = "code/testsuite/PCGfiles/" + character + Constants.EXTENSION_CHARACTER_FILE;
// String characterFile = "code/testsuite/PCGfiles/" + character + Constants.EXTENSION_CHARACTER_FILE;

//String outputFile = outputFile.getCanonicalPath();

Expand Down Expand Up @@ -121,6 +122,8 @@ public static void runTest(String character, String mode) throws IOException
// the XML of the actual result
var actual = Files.readString(outputFile.toPath());

LOG.info(
MessageFormat.format("Comparing the expected ({0}) and actual ({1}) results", expectedFile, outputFile));
Diff myDiff = DiffBuilder.compare(Input.fromString(expected))
.withTest(Input.fromString(actual))
.build();
Expand Down
1 change: 0 additions & 1 deletion code/testsuite/PCGfiles/pf_Cleric.pcg
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ CHARACTERMAGIC:
CHARACTERDMNOTES:

# Kits
KIT:Character Traits

# Character Master/Follower

Expand Down
26 changes: 13 additions & 13 deletions code/testsuite/csheets/pf_Cleric.xml
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,9 @@ BIO
<multiplier>2</multiplier>
</critical>
<to_hit>
<hit>+2</hit>
<magic_hit>+0</magic_hit>
<total_hit>+2</total_hit>
<hit>+0</hit>
<magic_hit>-2</magic_hit>
<total_hit>+0</total_hit>
</to_hit>
<feat>
<hit>+0</hit>
Expand All @@ -888,7 +888,7 @@ BIO
<num_attacks>1</num_attacks>
<reach>5</reach>
<size>M</size>
<special_properties></special_properties>
<special_properties>You draw a light crossbow back by pulling a lever. Loading a light crossbow is a move action that provokes attacks of opportunity.&amp;nl;Normally, operating a light crossbow requires two hands. However, you can shoot, but not load, a light crossbow with one hand at a -2 penalty on attack rolls. You can shoot a light crossbow with each hand, but you take a penalty on attack rolls as if attacking with two light weapons. This penalty is cumulative with the penalty for one-handed firing.</special_properties>
<template>
<hit>+0</hit>
<damage>+0</damage>
Expand All @@ -900,27 +900,27 @@ BIO
<ranges>
<range>
<distance>30 ft.</distance>
<to_hit>+2</to_hit>
<to_hit>+0</to_hit>
<damage>1d8</damage>
</range>
<range>
<distance>80 ft.</distance>
<to_hit>+2</to_hit>
<to_hit>+0</to_hit>
<damage>1d8</damage>
</range>
<range>
<distance>160 ft.</distance>
<to_hit>+0</to_hit>
<to_hit>-2</to_hit>
<damage>1d8</damage>
</range>
<range>
<distance>240 ft.</distance>
<to_hit>-2</to_hit>
<to_hit>-4</to_hit>
<damage>1d8</damage>
</range>
<range>
<distance>320 ft.</distance>
<to_hit>-4</to_hit>
<to_hit>-6</to_hit>
<damage>1d8</damage>
</range>
</ranges>
Expand Down Expand Up @@ -1397,8 +1397,8 @@ BIO
<long>Medium</long>
<short>M</short>
</size>
<special_properties></special_properties>
<type>WEAPON.RESIZABLE.RANGED.SIMPLE.CONTAINER.PROJECTILE.PIERCING.CROSSBOW.WEAPON GROUP CROSSBOWS.WOODEN</type>
<special_properties>You draw a light crossbow back by pulling a lever. Loading a light crossbow is a move action that provokes attacks of opportunity.&amp;nl;Normally, operating a light crossbow requires two hands. However, you can shoot, but not load, a light crossbow with one hand at a -2 penalty on attack rolls. You can shoot a light crossbow with each hand, but you take a penalty on attack rolls as if attacking with two light weapons. This penalty is cumulative with the penalty for one-handed firing.</special_properties>
<type>WEAPON.RESIZABLE.RANGED.SIMPLE.CONTAINER.PROJECTILE.PIERCING.CROSSBOW.WEAPON GROUP CROSSBOWS.LIGHTCROSSBOW.WOODEN</type>
<weight>4</weight>
<bonuslist></bonuslist>
</item>
Expand Down Expand Up @@ -1881,8 +1881,8 @@ BIO
<long>Medium</long>
<short>M</short>
</size>
<special_properties></special_properties>
<type>WEAPON.RESIZABLE.RANGED.SIMPLE.CONTAINER.PROJECTILE.PIERCING.CROSSBOW.WEAPON GROUP CROSSBOWS.WOODEN</type>
<special_properties>You draw a light crossbow back by pulling a lever. Loading a light crossbow is a move action that provokes attacks of opportunity.&amp;nl;Normally, operating a light crossbow requires two hands. However, you can shoot, but not load, a light crossbow with one hand at a -2 penalty on attack rolls. You can shoot a light crossbow with each hand, but you take a penalty on attack rolls as if attacking with two light weapons. This penalty is cumulative with the penalty for one-handed firing.</special_properties>
<type>WEAPON.RESIZABLE.RANGED.SIMPLE.CONTAINER.PROJECTILE.PIERCING.CROSSBOW.WEAPON GROUP CROSSBOWS.LIGHTCROSSBOW.WOODEN</type>
<weight>4</weight>
<bonuslist></bonuslist>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Unarmed Strike KEY:Unarmed Strike OUTPUTNAME:Unarmed Strike PROFICIENCY:WEAPO
# Equipment Name Unique Key SORTKEY Output Name Required Weapon Proficiency Type Contains Cost Weight Base Item for EQMOD Crit Mult Crit Range Damage Modifier Wield Category Requires Modification? Range Size Source Page Weapon prop. bonus Magic item aura Magic item caster level Required equipment slot Item construction cost Required feats and spells Special Property Description Visible
Blowgun KEY:Blowgun (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Blowgun TYPE:Weapon.Resizable.Ranged.Simple.Container.Projectile.Piercing.Blowgun.Weapon Group Thrown CONTAINS:UNLIM|Dart COST:2 WT:1 CRITMULT:x2 CRITRANGE:1 DAMAGE:1d2 WIELD:TwoHandsOnly RANGE:20 SIZE:M SOURCEPAGE:p.145 DESC:Blowguns are generally used to deliver debilitating (but rarely fatal) poisons from a distance. They are nearly silent when fired. VISIBLE:NO
Heavy Crossbow KEY:Heavy Crossbow (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Crossbow (Heavy) TYPE:Weapon.Resizable.Ranged.Simple.Container.Projectile.Piercing.Crossbow.Weapon Group Crossbows CONTAINS:UNLIM|Bolt COST:50 WT:8 CRITMULT:x2 CRITRANGE:2 DAMAGE:1d10 WIELD:TwoHandsOnly RANGE:120 SIZE:M SOURCEPAGE:p.145 DESC:You draw a heavy crossbow back by turning a small winch. Loading a heavy crossbow is a fullround action that provokes attacks of opportunity.&nl;Normally, operating a heavy crossbow requires two hands. However, you can shoot, but not load, a heavy crossbow with one hand at a -4 penalty on attack rolls. You can shoot a heavy crossbow with each hand, but you take a penalty on attack rolls as if attacking with two one-handed weapons. This penalty is cumulative with the penalty for one-handed firing. VISIBLE:NO
Light Crossbow KEY:Light Crossbow (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Crossbow (Light) TYPE:Weapon.Resizable.Ranged.Simple.Container.Projectile.Piercing.Crossbow.Weapon Group Crossbows.LightCrossbow CONTAINS:UNLIM|Bolt COST:35 WT:4 CRITMULT:x2 CRITRANGE:2 DAMAGE:1d8 WIELD:LightCrossbow1 RANGE:80 SIZE:M SOURCEPAGE:p.145 SPROP:You draw a light crossbow back by pulling a lever. Loading a light crossbow is a move action that provokes attacks of opportunity.&nl;Normally, operating a light crossbow requires two hands. However, you can shoot, but not load, a light crossbow with one hand at a -2 penalty on attack rolls. You can shoot a light crossbow with each hand, but you take a penalty on attack rolls as if attacking with two light weapons. This penalty is cumulative with the penalty for onehanded firing. VISIBLE:NO BONUS:WEAPON|TOHIT|-2|!PREEQUIPBOTH:1,TYPE=LightCrossbow
Light Crossbow KEY:Light Crossbow (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Crossbow (Light) TYPE:Weapon.Resizable.Ranged.Simple.Container.Projectile.Piercing.Crossbow.Weapon Group Crossbows.LightCrossbow CONTAINS:UNLIM|Bolt COST:35 WT:4 CRITMULT:x2 CRITRANGE:2 DAMAGE:1d8 WIELD:LightCrossbow1 RANGE:80 SIZE:M SOURCEPAGE:p.145 SPROP:You draw a light crossbow back by pulling a lever. Loading a light crossbow is a move action that provokes attacks of opportunity.&nl;Normally, operating a light crossbow requires two hands. However, you can shoot, but not load, a light crossbow with one hand at a -2 penalty on attack rolls. You can shoot a light crossbow with each hand, but you take a penalty on attack rolls as if attacking with two light weapons. This penalty is cumulative with the penalty for one-handed firing. VISIBLE:NO BONUS:WEAPON|TOHIT|-2|!PREEQUIPBOTH:1,TYPE=LightCrossbow
Dart KEY:Dart (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Dart TYPE:Weapon.Resizable.Ranged.Simple.Thrown.Piercing.Dart.Weapon Group Thrown COST:0.5 WT:0.5 CRITMULT:x2 CRITRANGE:1 DAMAGE:1d4 WIELD:Light RANGE:20 SIZE:M SOURCEPAGE:p.142 VISIBLE:NO
Javelin KEY:Javelin (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Javelin TYPE:Weapon.Resizable.Ranged.Simple.Thrown.Piercing.Javelin.Spear.Weapon Group Spears.Weapon Group Thrown COST:1 WT:2 CRITMULT:x2 CRITRANGE:1 DAMAGE:1d6 WIELD:OneHandOnly RANGE:30 SIZE:M SOURCEPAGE:p.146 DESC:A javelin is a thin throwing spear. Since it is not designed for melee, you are treated as nonproficient with it and take a -4 penalty on attack rolls if you use a javelin as a melee weapon. VISIBLE:NO
Sling KEY:Sling (Base) SORTKEY:zzBase PROFICIENCY:WEAPON|Sling TYPE:Weapon.Resizable.Ranged.Simple.Container.Projectile.Bludgeoning.Sling.Weapon Group Thrown CONTAINS:UNLIM|Sling Stone COST:0 WT:0 CRITMULT:x2 CRITRANGE:1 DAMAGE:1d4 WIELD:OneHandOnly RANGE:50 SIZE:M SOURCEPAGE:p.148 BONUS:WEAPON|DAMAGE|STR DESC:A sling is little more than a leather cup attached to a pair of strings. Your Strength modifier applies to damage rolls when you use a sling, just as it does for thrown weapons. You can fire, but not load, a sling with one hand. Loading a sling is a move action that requires two hands and provokes attacks of opportunity.&nl;You can hurl ordinary stones with a sling, but stones are not as dense or as round as bullets. Thus, such an attack deals damage as if the weapon were designed for a creature one size category smaller than you and you take a -1 penalty on attack rolls. VISIBLE:NO
Expand Down Expand Up @@ -352,4 +352,3 @@ Improvised Weapon (2d4) PROFICIENCY:WEAPON|Improvised Weapon TYPE:Weapon.Melee.
Improvised Weapon (2d6) PROFICIENCY:WEAPON|Improvised Weapon TYPE:Weapon.Melee.Improvised COST:0 WT:12 CRITMULT:x2 CRITRANGE:1 DAMAGE:2d6 WIELD:TwoHanded SIZE:M
Improvised Weapon (2d8) PROFICIENCY:WEAPON|Improvised Weapon TYPE:Weapon.Melee.Improvised COST:0 WT:12 CRITMULT:x2 CRITRANGE:1 DAMAGE:2d8 WIELD:TwoHanded SIZE:M
Improvised Weapon (2d10) PROFICIENCY:WEAPON|Improvised Weapon TYPE:Weapon.Melee.Improvised COST:0 WT:12 CRITMULT:x2 CRITRANGE:1 DAMAGE:2d10 WIELD:TwoHanded SIZE:M

0 comments on commit e049370

Please sign in to comment.