From 0fa2c646aa348eb926182c86092d7e3e5a51a3da Mon Sep 17 00:00:00 2001
From: geph
+ Could not load feats from the database ({featsLoadError}). Run{" "}
+
+ No feats in your compendium yet. Seed SRD content from Settings or add General
+ feats in the Compendium.
+ {feat.name} Lvl {feat.level_requirement}+ No eligible feats for this slot.npm run db:migrate and refresh the page.
+
+ Allocate ability increases on the Abilities step. +
)} ) @@ -1596,7 +1737,30 @@ export default function BuilderPage() { e.preventDefault() ;(e.currentTarget as HTMLDivElement).click() }} - onClick={() => setCharacter({ ...character, background_id: character.background_id === bg.id ? null : bg.id })} + onClick={() => { + const nextId = + character.background_id === bg.id ? null : bg.id + const nextBg = nextId + ? backgrounds.find((b) => b.id === nextId) + : null + setCharacter((prev) => { + let next: CharacterDraft = { + ...prev, + background_id: nextId, + } + if (nextBg) { + next = applyBackgroundProficienciesToDraft(next, nextBg) + } else { + next = { + ...next, + tool_proficiencies: [], + weapon_proficiencies: [], + armor_proficiencies: [], + } + } + return next + }) + }} className={`p-2 rounded-lg border-2 text-left transition-all cursor-pointer ${ character.background_id === bg.id ? "border-accent bg-accent/10" @@ -1631,16 +1795,20 @@ export default function BuilderPage() {Set your character's core abilities.
{/* Method Selection */} -+ + {abilityMethod === "custom" ? ( +
{getAbilityModifier(character[ability])}
Proficiencies
+ {effectiveWeaponProficiencies.length > 0 && ( ++ Weapons: + {effectiveWeaponProficiencies.join(", ")} +
+ )} + {effectiveArmorProficiencies.length > 0 && ( ++ Armor: + {effectiveArmorProficiencies.join(", ")} +
+ )} + {effectiveToolProficiencies.length > 0 && ( ++ Tools: + {effectiveToolProficiencies.join(", ")} +
+ )} + {(character.languages?.length ?? 0) > 0 && ( ++ Languages: + {(character.languages ?? []).join(", ")} +
+ )} +Weapon Proficiencies
- {primaryClass?.weapon_proficiencies?.join(", ") || "None"} + {effectiveWeaponProficiencies.join(", ") || "None"}
Armor Proficiencies
- {primaryClass?.armor_proficiencies?.join(", ") || "None"} + {effectiveArmorProficiencies.join(", ") || "None"}
+ Tools & Languages +
++ {[ + ...effectiveToolProficiencies, + ...(character.languages ?? []), + ].join(", ") || "None"} +
+- {(detailsModal.item as Background).description} -
- {(detailsModal.item as Background).skill_proficiencies && ( -Skills
-- {(detailsModal.item as Background).skill_proficiencies?.join(", ")} -
-Starting Feat
-- {(detailsModal.item as Background).feat_granted} -
-{bg.description}
+ )} + + {abilityText && ( +Ability Scores
+{abilityText}
+Skills
+{bg.skill_proficiencies.join(", ")}
+{section.label}
+{section.items.join(", ")}
+Origin Feat
+{bg.feat_granted}
+ {grantedFeat?.description && ( ++ {grantedFeat.description} +
+ )} +Background Feature
+ {bg.feature?.name && ( +{bg.feature.name}
+ )} + {bg.feature?.description && ( ++ {bg.feature.description} +
+ )} +Granted Spells
+Starting Equipment
+{equipmentText}
+Starting Gold
+{bg.starting_gold} gp
+