Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,11 @@ private String proficiencyPrereq(JsonNode profPrereq) {
for (JsonNode p : iterableElements(profPrereq)) {
for (Entry<String, JsonNode> prof : iterableFields(p)) {
switch (prof.getKey()) {
case "armor" -> profs.add(String.format("%s armor",
replaceText(prof.getValue().asText())));
case "armor" -> {
String armor = replaceText(prof.getValue().asText());
armor = armor.equals("shield") ? armor + "s" : armor + " armor";
profs.add(armor);
}
case "weapon" -> profs.add(String.format("a %s weapon",
replaceText(prof.getValue().asText())));
case "weaponGroup" -> profs.add(String.format("%s weapons",
Expand Down Expand Up @@ -518,12 +521,14 @@ String listPrerequisites(JsonNode variantNode) {
case background -> values.add(backgroundPrereq(value));
case campaign -> values.add(replaceConjoinOr(value, " Campaign"));
case culture -> values.add(replaceConjoinOr(value, " Culture"));
case exclusiveFeatCategory -> values.add("Can't Have Another " + replaceConjoinOr(value, " Feat"));
case exclusiveFeatCategory -> values.add("Can't Have Another " +
JsonSource.featureTypeToString(replaceConjoinOr(value, ""), Map.of()));
case expertise -> values.add(expertisePrereq(value));
case feat -> values.add(featPrereq(value));
case featCategory -> values.add("Any " + replaceConjoinOr(value, " Feat"));
case featCategory -> values.add("Any " +
JsonSource.featureTypeToString(replaceConjoinOr(value, ""), Map.of()));
case feature -> values.add(replaceConjoinOr(value, " Feature"));
case optionalfeature -> values.add(replaceConjoinOr(value, ""));
case optionalfeature -> values.add(replaceText("{@optfeature " + replaceConjoinOr(value, "") + "}"));
case group -> values.add(replaceConjoinOr(value, " Group"));
case item -> values.add(replaceConjoinOr(value, ""));
case itemProperty -> values.add(itemPropertyPrereq(value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,8 @@ public static String featureTypeToString(String featureType, Map<String, Homebre
// Parser.FEAT_CATEGORY_TO_FULL
// Parser.OPT_FEATURE_TYPE_TO_FULL
return switch (featureType.toUpperCase()) {
case "D" -> "Dragonmark";
case "D" -> "Dragonmark Feat";
case "DG" -> "Dark Gift Feat";
case "EB" -> "Epic Boon Feat";
case "FS" -> "Fighting Style Feat";
case "G" -> "General Feat";
Expand All @@ -1430,6 +1431,7 @@ public static String featureTypeToString(String featureType, Map<String, Homebre
case "FS:P" -> "Fighting Style, Paladin";
case "FS:R" -> "Fighting Style, Ranger";
case "PB" -> "Pact Boon";
case "PPACT" -> "Planar Pact Feat";
case "OR" -> "Onomancy Resonant";
case "RN" -> "Rune Knight Rune";
case "AF" -> "Alchemical Formula";
Expand Down
Loading