New source found from dndbeyond.com
This commit is contained in:
@@ -67,9 +67,12 @@ export default function ClassSpellManager({
|
||||
const isSpellbookSpellcaster = ClassUtils.isSpellbookSpellcaster(charClass);
|
||||
const isSpellbookEmpty = knownSpellCount === 0 && activeCantripsCount === 0;
|
||||
|
||||
const spellCastingLearningStyle = ClassUtils.getSpellCastingLearningStyle(charClass);
|
||||
const buttonAddText = Constants.SpellCastingLearningStyleAddText[spellCastingLearningStyle];
|
||||
const removeButtonText = Constants.SpellCastingLearningStyleRemoveText[spellCastingLearningStyle];
|
||||
const spellCastingLearningStyle =
|
||||
ClassUtils.getSpellCastingLearningStyle(charClass);
|
||||
const buttonAddText =
|
||||
Constants.SpellCastingLearningStyleAddText[spellCastingLearningStyle];
|
||||
const removeButtonText =
|
||||
Constants.SpellCastingLearningStyleRemoveText[spellCastingLearningStyle];
|
||||
const [state, setState] = useState({
|
||||
collapsedGroups: {
|
||||
activeSpells:
|
||||
@@ -138,9 +141,10 @@ export default function ClassSpellManager({
|
||||
}
|
||||
}
|
||||
|
||||
const spellDisplayListType = spellCastingLearningStyle === Constants.SpellCastingLearningStyle.Prepared
|
||||
? "Prepared"
|
||||
: "Known";
|
||||
const spellDisplayListType =
|
||||
spellCastingLearningStyle === Constants.SpellCastingLearningStyle.Prepared
|
||||
? "Prepared"
|
||||
: "Known";
|
||||
let spellsNode: React.ReactNode;
|
||||
let spellsExtraNode: React.ReactNode;
|
||||
let spellsClsNames: Array<string> = [
|
||||
@@ -200,21 +204,19 @@ export default function ClassSpellManager({
|
||||
return (
|
||||
<div className="ct-class-spell-manager__empty">
|
||||
{ClassUtils.isSpellbookSpellcaster(charClass) && (
|
||||
<React.Fragment>
|
||||
You currently have no prepared spells.
|
||||
</React.Fragment>
|
||||
<>You currently have no prepared spells.</>
|
||||
)}
|
||||
{ClassUtils.isPreparedSpellcaster(charClass) && (
|
||||
<React.Fragment>
|
||||
<>
|
||||
You currently have no prepared spells. Learn and prepare spells from
|
||||
your list of available spells below.
|
||||
</React.Fragment>
|
||||
</>
|
||||
)}
|
||||
{ClassUtils.isKnownSpellcaster(charClass) && (
|
||||
<React.Fragment>
|
||||
<>
|
||||
You currently have no known spells. Learn spells from your list of
|
||||
available spells below.
|
||||
</React.Fragment>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
@@ -251,7 +253,10 @@ export default function ClassSpellManager({
|
||||
const { collapsedGroups } = state;
|
||||
|
||||
let heading: React.ReactNode = "Prepared Spells";
|
||||
if (ClassUtils.isKnownSpellcaster(charClass) && spellCastingLearningStyle !== Constants.SpellCastingLearningStyle.Prepared) {
|
||||
if (
|
||||
ClassUtils.isKnownSpellcaster(charClass) &&
|
||||
spellCastingLearningStyle !== Constants.SpellCastingLearningStyle.Prepared
|
||||
) {
|
||||
heading = "Known Spells";
|
||||
}
|
||||
|
||||
@@ -307,7 +312,7 @@ export default function ClassSpellManager({
|
||||
</div>
|
||||
)}
|
||||
{!isSpellbookEmpty && (
|
||||
<React.Fragment>
|
||||
<>
|
||||
{renderSpellListSpellStatus()}
|
||||
<SpellManager
|
||||
charClassId={ClassUtils.getActiveId(charClass)}
|
||||
@@ -325,7 +330,7 @@ export default function ClassSpellManager({
|
||||
showCustomize={false}
|
||||
proficiencyBonus={proficiencyBonus}
|
||||
/>
|
||||
</React.Fragment>
|
||||
</>
|
||||
)}
|
||||
</Collapsible>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user