New source found from dndbeyond.com

This commit is contained in:
2026-07-08 01:00:09 -07:00
parent 9a983a6d7b
commit dcefa0d2f2
2865 changed files with 222467 additions and 49053 deletions
@@ -416,6 +416,9 @@ export function getInfusionRules(feature) {
var _a, _b;
return (_b = (_a = getDefinition(feature)) === null || _a === void 0 ? void 0 : _a.infusionRules) !== null && _b !== void 0 ? _b : [];
}
export function getItemPlans(feature) {
return feature.itemPlans;
}
/**
*
* @param feature
@@ -427,3 +430,7 @@ export function getFeatListContracts(featureContract) {
var _a, _b;
return (_b = (_a = getDefinition(featureContract)) === null || _a === void 0 ? void 0 : _a.grantedFeats) !== null && _b !== void 0 ? _b : [];
}
export function getHasItemMappings(feature) {
var _a, _b;
return (_b = (_a = getDefinition(feature)) === null || _a === void 0 ? void 0 : _a.hasItemMappings) !== null && _b !== void 0 ? _b : false;
}
@@ -7,10 +7,11 @@ import { DefinitionPoolUtils } from '../DefinitionPool';
import { FeatGenerators } from '../Feat';
import { FeatList } from '../FeatList';
import { InfusionChoiceGenerators } from '../InfusionChoice';
import { ItemPlanGenerators } from '../ItemPlan';
import { ModifierGenerators } from '../Modifier';
import { OptionAccessors, OptionGenerators } from '../Option';
import { SpellGenerators } from '../Spell';
import { getCreatureRules, getDefinitionKey, getEntityTypeId, getFeatListContracts, getId, getInfusionRules, getOptions, getUniqueKey, } from './accessors';
import { getCreatureRules, getDefinitionKey, getEntityTypeId, getFeatListContracts, getHasItemMappings, getId, getInfusionRules, getOptions, getUniqueKey, } from './accessors';
export function generateClassFeature(charClass, classFeature, ruleData, classesLookupData, definitionPool, characterId, choiceComponents, baseFeats) {
const id = getId(classFeature);
const entityTypeId = getEntityTypeId(classFeature);
@@ -22,6 +23,9 @@ export function generateClassFeature(charClass, classFeature, ruleData, classesL
const feats = FeatGenerators.generateDataOriginFeats(id, entityTypeId, featLookup, DataOriginTypeEnum.CLASS_FEATURE, classFeature, charClass);
const options = generateClassFeatureOptions(classFeature, charClass, featLookup, actionLookup, spellLookup, optionLookup, modifierLookup, valueLookup, spellListDataOriginLookup, ruleData);
const infusionChoices = InfusionChoiceGenerators.generateInfusionChoices(getInfusionRules(classFeature), DataOriginTypeEnum.CLASS_FEATURE, classFeature, charClass, infusionChoiceInfusionLookup, knownInfusionLookupByChoiceKey, characterId);
const itemPlans = getHasItemMappings(classFeature)
? ItemPlanGenerators.generateItemPlans(choices, options, DataOriginTypeEnum.CLASS_FEATURE, classFeature, charClass)
: [];
const featLists = getFeatListContracts(classFeature).map((contract) => new FeatList(contract, choiceComponents.definitionKeyNameMap, baseFeats));
return Object.assign(Object.assign({}, classFeature), { actions,
choices,
@@ -29,7 +33,8 @@ export function generateClassFeature(charClass, classFeature, ruleData, classesL
modifiers,
spells,
options,
infusionChoices, accessType: DefinitionPoolUtils.getDefinitionAccessType(getDefinitionKey(classFeature), definitionPool), featLists });
infusionChoices,
itemPlans, accessType: DefinitionPoolUtils.getDefinitionAccessType(getDefinitionKey(classFeature), definitionPool), featLists });
}
/**
*
@@ -31,7 +31,7 @@ classes, choiceComponents, baseFeats) {
const featLists = choiceComponents && baseFeats
? getFeatListContracts(classFeatureMapping).map((contract) => new FeatList(contract, choiceComponents.definitionKeyNameMap, baseFeats))
: [];
return Object.assign(Object.assign({}, classFeatureMapping), { actions: [], choices: [], feats: [], modifiers: [], options: [], spells: [], infusionChoices: [], accessType: DefinitionPoolUtils.getDefinitionAccessType(definitionKey, definitionPool), featLists });
return Object.assign(Object.assign({}, classFeatureMapping), { actions: [], choices: [], feats: [], modifiers: [], options: [], spells: [], infusionChoices: [], accessType: DefinitionPoolUtils.getDefinitionAccessType(definitionKey, definitionPool), featLists, itemPlans: [] });
}
/**
*